@refrakt-md/editor 0.16.1 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,617 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dockerfile-BKs6k2Af.js","assets/simple-mode-GW_nhZxv.js","assets/factor-kuTfRLto.js","assets/nsis-LdVXkNf5.js","assets/pug-DeIclll2.js","assets/javascript-iXu5QeM3.js"])))=>i.map(i=>d[i]);
2
- (function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=t(i);fetch(i.href,s)}})();const Tp=!1;var dd=Array.isArray,PC=Array.prototype.indexOf,$a=Array.prototype.includes,hd=Array.from,EC=Object.defineProperty,ya=Object.getOwnPropertyDescriptor,$C=Object.getOwnPropertyDescriptors,Y0=Object.prototype,QC=Array.prototype,Pg=Object.getPrototypeOf,Zv=Object.isExtensible;const Ji=()=>{};function LC(n){for(var e=0;e<n.length;e++)n[e]()}function U0(){var n,e,t=new Promise((r,i)=>{n=r,e=i});return{promise:t,resolve:n,reject:e}}function Mc(n,e){if(Array.isArray(n))return n;if(!(Symbol.iterator in n))return Array.from(n);const t=[];for(const r of n)if(t.push(r),t.length===e)break;return t}const Yn=2,pf=4,pd=8,G0=1<<24,ys=16,Si=32,Zo=64,Eg=128,ei=512,Xn=1024,Un=2048,_i=4096,jr=8192,ds=16384,$g=32768,Eo=65536,Xv=1<<17,H0=1<<18,Ja=1<<19,MC=1<<20,cs=1<<25,$o=32768,Pp=1<<21,Qg=1<<22,js=1<<23,So=Symbol("$state"),DC=Symbol("legacy props"),qC=Symbol(""),la=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function RC(n){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function IC(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function NC(n,e,t){throw new Error("https://svelte.dev/e/each_key_duplicate")}function BC(n){throw new Error("https://svelte.dev/e/effect_in_teardown")}function jC(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function zC(n){throw new Error("https://svelte.dev/e/effect_orphan")}function ZC(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function XC(n){throw new Error("https://svelte.dev/e/props_invalid_value")}function FC(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function VC(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function WC(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function YC(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const UC=1,GC=2,K0=4,HC=8,KC=16,JC=1,eT=4,tT=8,nT=16,J0=1,rT=2,Fn=Symbol(),iT="http://www.w3.org/1999/xhtml";function sT(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function oT(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function ew(n){return n===this.v}function aT(n,e){return n!=n?e==e:n!==e||n!==null&&typeof n=="object"||typeof n=="function"}function tw(n){return!aT(n,this.v)}let lT=!1;const cT=[];function uT(n,e=!1,t=!1){return Vu(n,new Map,"",cT,null,t)}function Vu(n,e,t,r,i=null,s=!1){if(typeof n=="object"&&n!==null){var o=e.get(n);if(o!==void 0)return o;if(n instanceof Map)return new Map(n);if(n instanceof Set)return new Set(n);if(dd(n)){var a=Array(n.length);e.set(n,a),i!==null&&e.set(i,a);for(var l=0;l<n.length;l+=1){var c=n[l];l in n&&(a[l]=Vu(c,e,t,r,null,s))}return a}if(Pg(n)===Y0){a={},e.set(n,a),i!==null&&e.set(i,a);for(var u in n)a[u]=Vu(n[u],e,t,r,null,s);return a}if(n instanceof Date)return structuredClone(n);if(typeof n.toJSON=="function"&&!s)return Vu(n.toJSON(),e,t,r,n)}if(n instanceof EventTarget)return n;try{return structuredClone(n)}catch{return n}}let zr=null;function Qa(n){zr=n}function Ot(n,e=!1,t){zr={p:zr,i:!1,c:null,e:null,s:n,x:null,l:null}}function vt(n){var e=zr,t=e.e;if(t!==null){e.e=null;for(var r of t)yw(r)}return e.i=!0,zr=e.p,{}}function nw(){return!0}let vo=[];function rw(){var n=vo;vo=[],LC(n)}function Zi(n){if(vo.length===0&&!Bl){var e=vo;queueMicrotask(()=>{e===vo&&rw()})}vo.push(n)}function fT(){for(;vo.length>0;)rw()}function iw(n){var e=Wt;if(e===null)return Mt.f|=js,n;if((e.f&$g)===0){if((e.f&Eg)===0)throw n;e.b.error(n)}else La(n,e)}function La(n,e){for(;e!==null;){if((e.f&Eg)!==0)try{e.b.error(n);return}catch(t){n=t}e=e.parent}throw n}const dT=-7169;function Sn(n,e){n.f=n.f&dT|e}function Lg(n){(n.f&ei)!==0||n.deps===null?Sn(n,Xn):Sn(n,_i)}function sw(n){if(n!==null)for(const e of n)(e.f&Yn)===0||(e.f&$o)===0||(e.f^=$o,sw(e.deps))}function ow(n,e,t){(n.f&Un)!==0?e.add(n):(n.f&_i)!==0&&t.add(n),sw(n.deps),Sn(n,Xn)}const Jc=new Set;let Bt=null,mf=null,pi=null,Or=[],md=null,Ep=!1,Bl=!1;class zs{committed=!1;current=new Map;previous=new Map;#e=new Set;#r=new Set;#t=0;#i=0;#a=null;#s=new Set;#n=new Set;#o=new Map;is_fork=!1;#l=!1;is_deferred(){return this.is_fork||this.#i>0}skip_effect(e){this.#o.has(e)||this.#o.set(e,{d:[],m:[]})}unskip_effect(e){var t=this.#o.get(e);if(t){this.#o.delete(e);for(var r of t.d)Sn(r,Un),Oi(r);for(r of t.m)Sn(r,_i),Oi(r)}}process(e){Or=[],this.apply();var t=[],r=[];for(const i of e)this.#c(i,t,r);if(this.is_deferred()){this.#u(r),this.#u(t);for(const[i,s]of this.#o)uw(i,s)}else{for(const i of this.#e)i();this.#e.clear(),this.#t===0&&this.#f(),mf=this,Bt=null,Fv(r),Fv(t),mf=null,this.#a?.resolve()}pi=null}#c(e,t,r){e.f^=Xn;for(var i=e.first,s=null;i!==null;){var o=i.f,a=(o&(Si|Zo))!==0,l=a&&(o&Xn)!==0,c=l||(o&jr)!==0||this.#o.has(i);if(!c&&i.fn!==null){a?i.f^=Xn:s!==null&&(o&(pf|pd|G0))!==0?s.b.defer_effect(i):(o&pf)!==0?t.push(i):Rc(i)&&((o&ys)!==0&&this.#n.add(i),tc(i));var u=i.first;if(u!==null){i=u;continue}}var f=i.parent;for(i=i.next;i===null&&f!==null;)f===s&&(s=null),i=f.next,f=f.parent}}#u(e){for(var t=0;t<e.length;t+=1)ow(e[t],this.#s,this.#n)}capture(e,t){t!==Fn&&!this.previous.has(e)&&this.previous.set(e,t),(e.f&js)===0&&(this.current.set(e,e.v),pi?.set(e,e.v))}activate(){Bt=this,this.apply()}deactivate(){Bt===this&&(Bt=null,pi=null)}flush(){if(this.activate(),Or.length>0){if(aw(),Bt!==null&&Bt!==this)return}else this.#t===0&&this.process([]);this.deactivate()}discard(){for(const e of this.#r)e(this);this.#r.clear()}#f(){if(Jc.size>1){this.previous.clear();var e=pi,t=!0;for(const i of Jc){if(i===this){t=!1;continue}const s=[];for(const[a,l]of this.current){if(i.current.has(a))if(t&&l!==i.current.get(a))i.current.set(a,l);else continue;s.push(a)}if(s.length===0)continue;const o=[...i.current.keys()].filter(a=>!this.current.has(a));if(o.length>0){var r=Or;Or=[];const a=new Set,l=new Map;for(const c of s)lw(c,o,a,l);if(Or.length>0){Bt=i,i.apply();for(const c of Or)i.#c(c,[],[]);i.deactivate()}Or=r}}Bt=null,pi=e}this.committed=!0,Jc.delete(this)}increment(e){this.#t+=1,e&&(this.#i+=1)}decrement(e){this.#t-=1,e&&(this.#i-=1),!this.#l&&(this.#l=!0,Zi(()=>{this.#l=!1,this.is_deferred()?Or.length>0&&this.flush():this.revive()}))}revive(){for(const e of this.#s)this.#n.delete(e),Sn(e,Un),Oi(e);for(const e of this.#n)Sn(e,_i),Oi(e);this.flush()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#r.add(e)}settled(){return(this.#a??=U0()).promise}static ensure(){if(Bt===null){const e=Bt=new zs;Jc.add(Bt),Bl||Zi(()=>{Bt===e&&e.flush()})}return Bt}apply(){}}function hT(n){var e=Bl;Bl=!0;try{for(var t;;){if(fT(),Or.length===0&&(Bt?.flush(),Or.length===0))return md=null,t;aw()}}finally{Bl=e}}function aw(){Ep=!0;var n=null;try{for(var e=0;Or.length>0;){var t=zs.ensure();if(e++>1e3){var r,i;pT()}t.process(Or),Zs.clear()}}finally{Or=[],Ep=!1,md=null}}function pT(){try{ZC()}catch(n){La(n,md)}}let is=null;function Fv(n){var e=n.length;if(e!==0){for(var t=0;t<e;){var r=n[t++];if((r.f&(ds|jr))===0&&Rc(r)&&(is=new Set,tc(r),r.deps===null&&r.first===null&&r.nodes===null&&(r.teardown===null&&r.ac===null?xw(r):r.fn=null),is?.size>0)){Zs.clear();for(const i of is){if((i.f&(ds|jr))!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)is.has(o)&&(is.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){const l=s[a];(l.f&(ds|jr))===0&&tc(l)}}is.clear()}}is=null}}function lw(n,e,t,r){if(!t.has(n)&&(t.add(n),n.reactions!==null))for(const i of n.reactions){const s=i.f;(s&Yn)!==0?lw(i,e,t,r):(s&(Qg|ys))!==0&&(s&Un)===0&&cw(i,e,r)&&(Sn(i,Un),Oi(i))}}function cw(n,e,t){const r=t.get(n);if(r!==void 0)return r;if(n.deps!==null)for(const i of n.deps){if($a.call(e,i))return!0;if((i.f&Yn)!==0&&cw(i,e,t))return t.set(i,!0),!0}return t.set(n,!1),!1}function Oi(n){for(var e=md=n;e.parent!==null;){e=e.parent;var t=e.f;if(Ep&&e===Wt&&(t&ys)!==0&&(t&H0)===0)return;if((t&(Zo|Si))!==0){if((t&Xn)===0)return;e.f^=Xn}}Or.push(e)}function uw(n,e){if(!((n.f&Si)!==0&&(n.f&Xn)!==0)){(n.f&Un)!==0?e.d.push(n):(n.f&_i)!==0&&e.m.push(n),Sn(n,Xn);for(var t=n.first;t!==null;)uw(t,e),t=t.next}}function mT(n){let e=0,t=Qo(0),r;return()=>{qg()&&(m(t),bd(()=>(e===0&&(r=Sr(()=>n(()=>jl(t)))),e+=1,()=>{Zi(()=>{e-=1,e===0&&(r?.(),r=void 0,jl(t))})})))}}var gT=Eo|Ja|Eg;function OT(n,e,t){new vT(n,e,t)}class vT{parent;is_pending=!1;#e;#r=null;#t;#i;#a;#s=null;#n=null;#o=null;#l=null;#c=null;#u=0;#f=0;#p=!1;#h=!1;#m=new Set;#g=new Set;#d=null;#w=mT(()=>(this.#d=Qo(this.#u),()=>{this.#d=null}));constructor(e,t,r){this.#e=e,this.#t=t,this.#i=r,this.parent=Wt.b,this.is_pending=!!this.#t.pending,this.#a=qc(()=>{Wt.b=this;{var i=this.#b();try{this.#s=Yr(()=>r(i))}catch(s){this.error(s)}this.#f>0?this.#v():this.is_pending=!1}return()=>{this.#c?.remove()}},gT)}#_(){try{this.#s=Yr(()=>this.#i(this.#e))}catch(e){this.error(e)}}#k(){const e=this.#t.pending;e&&(this.#n=Yr(()=>e(this.#e)),Zi(()=>{var t=this.#b();this.#s=this.#O(()=>(zs.ensure(),Yr(()=>this.#i(t)))),this.#f>0?this.#v():(Ao(this.#n,()=>{this.#n=null}),this.is_pending=!1)}))}#b(){var e=this.#e;return this.is_pending&&(this.#c=hs(),this.#e.before(this.#c),e=this.#c),e}defer_effect(e){ow(e,this.#m,this.#g)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#t.pending}#O(e){var t=Wt,r=Mt,i=zr;Yi(this.#a),si(this.#a),Qa(this.#a.ctx);try{return e()}catch(s){return iw(s),null}finally{Yi(t),si(r),Qa(i)}}#v(){const e=this.#t.pending;this.#s!==null&&(this.#l=document.createDocumentFragment(),this.#l.append(this.#c),Cw(this.#s,this.#l)),this.#n===null&&(this.#n=Yr(()=>e(this.#e)))}#y(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#y(e);return}if(this.#f+=e,this.#f===0){this.is_pending=!1;for(const t of this.#m)Sn(t,Un),Oi(t);for(const t of this.#g)Sn(t,_i),Oi(t);this.#m.clear(),this.#g.clear(),this.#n&&Ao(this.#n,()=>{this.#n=null}),this.#l&&(this.#e.before(this.#l),this.#l=null)}}update_pending_count(e){this.#y(e),this.#u+=e,!(!this.#d||this.#p)&&(this.#p=!0,Zi(()=>{this.#p=!1,this.#d&&Ma(this.#d,this.#u)}))}get_effect_pending(){return this.#w(),m(this.#d)}error(e){var t=this.#t.onerror;let r=this.#t.failed;if(this.#h||!t&&!r)throw e;this.#s&&(xr(this.#s),this.#s=null),this.#n&&(xr(this.#n),this.#n=null),this.#o&&(xr(this.#o),this.#o=null);var i=!1,s=!1;const o=()=>{if(i){oT();return}i=!0,s&&YC(),zs.ensure(),this.#u=0,this.#o!==null&&Ao(this.#o,()=>{this.#o=null}),this.is_pending=this.has_pending_snippet(),this.#s=this.#O(()=>(this.#h=!1,Yr(()=>this.#i(this.#e)))),this.#f>0?this.#v():this.is_pending=!1};Zi(()=>{try{s=!0,t?.(e,o),s=!1}catch(a){La(a,this.#a&&this.#a.parent)}r&&(this.#o=this.#O(()=>{zs.ensure(),this.#h=!0;try{return Yr(()=>{r(this.#e,()=>e,()=>o)})}catch(a){return La(a,this.#a.parent),null}finally{this.#h=!1}}))})}}function bT(n,e,t,r){const i=gd;var s=n.filter(d=>!d.settled);if(t.length===0&&s.length===0){r(e.map(i));return}var o=Bt,a=Wt,l=yT(),c=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(d=>d.promise)):null;function u(d){l();try{r(d)}catch(h){(a.f&ds)===0&&La(h,a)}o?.deactivate(),$p()}if(t.length===0){c.then(()=>u(e.map(i)));return}function f(){l(),Promise.all(t.map(d=>wT(d))).then(d=>u([...e.map(i),...d])).catch(d=>La(d,a))}c?c.then(f):f()}function yT(){var n=Wt,e=Mt,t=zr,r=Bt;return function(s=!0){Yi(n),si(e),Qa(t),s&&r?.activate()}}function $p(){Yi(null),si(null),Qa(null)}function gd(n){var e=Yn|Un,t=Mt!==null&&(Mt.f&Yn)!==0?Mt:null;return Wt!==null&&(Wt.f|=Ja),{ctx:zr,deps:null,effects:null,equals:ew,f:e,fn:n,reactions:null,rv:0,v:Fn,wv:0,parent:t??Wt,ac:null}}function wT(n,e,t){let r=Wt;r===null&&IC();var i=r.b,s=void 0,o=Qo(Fn),a=!Mt,l=new Map;return QT(()=>{var c=U0();s=c.promise;try{Promise.resolve(n()).then(c.resolve,c.reject).then(()=>{u===Bt&&u.committed&&u.deactivate(),$p()})}catch(h){c.reject(h),$p()}var u=Bt;if(a){var f=i.is_rendered();i.update_pending_count(1),u.increment(f),l.get(u)?.reject(la),l.delete(u),l.set(u,c)}const d=(h,g=void 0)=>{if(u.activate(),g)g!==la&&(o.f|=js,Ma(o,g));else{(o.f&js)!==0&&(o.f^=js),Ma(o,h);for(const[p,O]of l){if(l.delete(p),p===u)break;O.reject(la)}}a&&(i.update_pending_count(-1),u.decrement(f))};c.promise.then(d,h=>d(null,h||"unknown"))}),Rg(()=>{for(const c of l.values())c.reject(la)}),new Promise(c=>{function u(f){function d(){f===s?c(o):u(s)}f.then(d,d)}u(s)})}function me(n){const e=gd(n);return Tw(e),e}function fw(n){const e=gd(n);return e.equals=tw,e}function dw(n){var e=n.effects;if(e!==null){n.effects=null;for(var t=0;t<e.length;t+=1)xr(e[t])}}function _T(n){for(var e=n.parent;e!==null;){if((e.f&Yn)===0)return(e.f&ds)===0?e:null;e=e.parent}return null}function Mg(n){var e,t=Wt;Yi(_T(n));try{n.f&=~$o,dw(n),e=Qw(n)}finally{Yi(t)}return e}function hw(n){var e=Mg(n);if(!n.equals(e)&&(n.wv=Ew(),(!Bt?.is_fork||n.deps===null)&&(n.v=e,n.deps===null))){Sn(n,Xn);return}Ws||(pi!==null?(qg()||Bt?.is_fork)&&pi.set(n,e):Lg(n))}let Qp=new Set;const Zs=new Map;let pw=!1;function Qo(n,e){var t={f:0,v:n,reactions:null,equals:ew,rv:0,wv:0};return t}function ee(n,e){const t=Qo(n);return Tw(t),t}function kT(n,e=!1,t=!0){const r=Qo(n);return e||(r.equals=tw),r}function L(n,e,t=!1){Mt!==null&&(!vi||(Mt.f&Xv)!==0)&&nw()&&(Mt.f&(Yn|ys|Qg|Xv))!==0&&(ti===null||!$a.call(ti,n))&&WC();let r=t?Jt(e):e;return Ma(n,r)}function Ma(n,e){if(!n.equals(e)){var t=n.v;Ws?Zs.set(n,e):Zs.set(n,t),n.v=e;var r=zs.ensure();if(r.capture(n,t),(n.f&Yn)!==0){const i=n;(n.f&Un)!==0&&Mg(i),Lg(i)}n.wv=Ew(),mw(n,Un),Wt!==null&&(Wt.f&Xn)!==0&&(Wt.f&(Si|Zo))===0&&(Vr===null?MT([n]):Vr.push(n)),!r.is_fork&&Qp.size>0&&!pw&&xT()}return e}function xT(){pw=!1;for(const n of Qp)(n.f&Xn)!==0&&Sn(n,_i),Rc(n)&&tc(n);Qp.clear()}function th(n,e=1){var t=m(n),r=e===1?t++:t--;return L(n,t),r}function jl(n){L(n,n.v+1)}function mw(n,e){var t=n.reactions;if(t!==null)for(var r=t.length,i=0;i<r;i++){var s=t[i],o=s.f,a=(o&Un)===0;if(a&&Sn(s,e),(o&Yn)!==0){var l=s;pi?.delete(l),(o&$o)===0&&(o&ei&&(s.f|=$o),mw(l,_i))}else a&&((o&ys)!==0&&is!==null&&is.add(s),Oi(s))}}function Jt(n){if(typeof n!="object"||n===null||So in n)return n;const e=Pg(n);if(e!==Y0&&e!==QC)return n;var t=new Map,r=dd(n),i=ee(0),s=Co,o=a=>{if(Co===s)return a();var l=Mt,c=Co;si(null),Uv(s);var u=a();return si(l),Uv(c),u};return r&&t.set("length",ee(n.length)),new Proxy(n,{defineProperty(a,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&FC();var u=t.get(l);return u===void 0?o(()=>{var f=ee(c.value);return t.set(l,f),f}):L(u,c.value,!0),!0},deleteProperty(a,l){var c=t.get(l);if(c===void 0){if(l in a){const u=o(()=>ee(Fn));t.set(l,u),jl(i)}}else L(c,Fn),jl(i);return!0},get(a,l,c){if(l===So)return n;var u=t.get(l),f=l in a;if(u===void 0&&(!f||ya(a,l)?.writable)&&(u=o(()=>{var h=Jt(f?a[l]:Fn),g=ee(h);return g}),t.set(l,u)),u!==void 0){var d=m(u);return d===Fn?void 0:d}return Reflect.get(a,l,c)},getOwnPropertyDescriptor(a,l){var c=Reflect.getOwnPropertyDescriptor(a,l);if(c&&"value"in c){var u=t.get(l);u&&(c.value=m(u))}else if(c===void 0){var f=t.get(l),d=f?.v;if(f!==void 0&&d!==Fn)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return c},has(a,l){if(l===So)return!0;var c=t.get(l),u=c!==void 0&&c.v!==Fn||Reflect.has(a,l);if(c!==void 0||Wt!==null&&(!u||ya(a,l)?.writable)){c===void 0&&(c=o(()=>{var d=u?Jt(a[l]):Fn,h=ee(d);return h}),t.set(l,c));var f=m(c);if(f===Fn)return!1}return u},set(a,l,c,u){var f=t.get(l),d=l in a;if(r&&l==="length")for(var h=c;h<f.v;h+=1){var g=t.get(h+"");g!==void 0?L(g,Fn):h in a&&(g=o(()=>ee(Fn)),t.set(h+"",g))}if(f===void 0)(!d||ya(a,l)?.writable)&&(f=o(()=>ee(void 0)),L(f,Jt(c)),t.set(l,f));else{d=f.v!==Fn;var p=o(()=>Jt(c));L(f,p)}var O=Reflect.getOwnPropertyDescriptor(a,l);if(O?.set&&O.set.call(u,c),!d){if(r&&typeof l=="string"){var v=t.get("length"),b=Number(l);Number.isInteger(b)&&b>=v.v&&L(v,b+1)}jl(i)}return!0},ownKeys(a){m(i);var l=Reflect.ownKeys(a).filter(f=>{var d=t.get(f);return d===void 0||d.v!==Fn});for(var[c,u]of t)u.v!==Fn&&!(c in a)&&l.push(c);return l},setPrototypeOf(){VC()}})}function Vv(n){try{if(n!==null&&typeof n=="object"&&So in n)return n[So]}catch{}return n}function ST(n,e){return Object.is(Vv(n),Vv(e))}var Lo,gw,Ow,vw;function AT(){if(Lo===void 0){Lo=window,gw=/Firefox/.test(navigator.userAgent);var n=Element.prototype,e=Node.prototype,t=Text.prototype;Ow=ya(e,"firstChild").get,vw=ya(e,"nextSibling").get,Zv(n)&&(n.__click=void 0,n.__className=void 0,n.__attributes=null,n.__style=void 0,n.__e=void 0),Zv(t)&&(t.__t=void 0)}}function hs(n=""){return document.createTextNode(n)}function qr(n){return Ow.call(n)}function Dc(n){return vw.call(n)}function q(n,e){return qr(n)}function ot(n,e=!1){{var t=qr(n);return t instanceof Comment&&t.data===""?Dc(t):t}}function R(n,e=1,t=!1){let r=n;for(;e--;)r=Dc(r);return r}function CT(n){n.textContent=""}function bw(){return!1}function Os(n,e){{const t=document.body;n.autofocus=!0,Zi(()=>{document.activeElement===t&&n.focus()})}}let Wv=!1;function TT(){Wv||(Wv=!0,document.addEventListener("reset",n=>{Promise.resolve().then(()=>{if(!n.defaultPrevented)for(const e of n.target.elements)e.__on_r?.()})},{capture:!0}))}function Od(n){var e=Mt,t=Wt;si(null),Yi(null);try{return n()}finally{si(e),Yi(t)}}function Dg(n,e,t,r=t){n.addEventListener(e,()=>Od(t));const i=n.__on_r;i?n.__on_r=()=>{i(),r(!0)}:n.__on_r=()=>r(!0),TT()}function PT(n){Wt===null&&(Mt===null&&zC(),jC()),Ws&&BC()}function ET(n,e){var t=e.last;t===null?e.last=e.first=n:(t.next=n,n.prev=t,e.last=n)}function ws(n,e,t){var r=Wt;r!==null&&(r.f&jr)!==0&&(n|=jr);var i={ctx:zr,deps:null,nodes:null,f:n|Un|ei,first:null,fn:e,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(t)try{tc(i),i.f|=$g}catch(a){throw xr(i),a}else e!==null&&Oi(i);var s=i;if(t&&s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&Ja)===0&&(s=s.first,(n&ys)!==0&&(n&Eo)!==0&&s!==null&&(s.f|=Eo)),s!==null&&(s.parent=r,r!==null&&ET(s,r),Mt!==null&&(Mt.f&Yn)!==0&&(n&Zo)===0)){var o=Mt;(o.effects??=[]).push(s)}return i}function qg(){return Mt!==null&&!vi}function Rg(n){const e=ws(pd,null,!1);return Sn(e,Xn),e.teardown=n,e}function hn(n){PT();var e=Wt.f,t=!Mt&&(e&Si)!==0&&(e&$g)===0;if(t){var r=zr;(r.e??=[]).push(n)}else return yw(n)}function yw(n){return ws(pf|MC,n,!1)}function $T(n){zs.ensure();const e=ws(Zo|Ja,n,!0);return(t={})=>new Promise(r=>{t.outro?Ao(e,()=>{xr(e),r(void 0)}):(xr(e),r(void 0))})}function vd(n){return ws(pf,n,!1)}function QT(n){return ws(Qg|Ja,n,!0)}function bd(n,e=0){return ws(pd|e,n,!0)}function fe(n,e=[],t=[],r=[]){bT(r,e,t,i=>{ws(pd,()=>n(...i.map(m)),!0)})}function qc(n,e=0){var t=ws(ys|e,n,!0);return t}function Yr(n){return ws(Si|Ja,n,!0)}function ww(n){var e=n.teardown;if(e!==null){const t=Ws,r=Mt;Yv(!0),si(null);try{e.call(null)}finally{Yv(t),si(r)}}}function _w(n,e=!1){var t=n.first;for(n.first=n.last=null;t!==null;){const i=t.ac;i!==null&&Od(()=>{i.abort(la)});var r=t.next;(t.f&Zo)!==0?t.parent=null:xr(t,e),t=r}}function LT(n){for(var e=n.first;e!==null;){var t=e.next;(e.f&Si)===0&&xr(e),e=t}}function xr(n,e=!0){var t=!1;(e||(n.f&H0)!==0)&&n.nodes!==null&&n.nodes.end!==null&&(kw(n.nodes.start,n.nodes.end),t=!0),_w(n,e&&!t),gf(n,0),Sn(n,ds);var r=n.nodes&&n.nodes.t;if(r!==null)for(const s of r)s.stop();ww(n);var i=n.parent;i!==null&&i.first!==null&&xw(n),n.next=n.prev=n.teardown=n.ctx=n.deps=n.fn=n.nodes=n.ac=null}function kw(n,e){for(;n!==null;){var t=n===e?null:Dc(n);n.remove(),n=t}}function xw(n){var e=n.parent,t=n.prev,r=n.next;t!==null&&(t.next=r),r!==null&&(r.prev=t),e!==null&&(e.first===n&&(e.first=r),e.last===n&&(e.last=t))}function Ao(n,e,t=!0){var r=[];Sw(n,r,!0);var i=()=>{t&&xr(n),e&&e()},s=r.length;if(s>0){var o=()=>--s||i();for(var a of r)a.out(o)}else i()}function Sw(n,e,t){if((n.f&jr)===0){n.f^=jr;var r=n.nodes&&n.nodes.t;if(r!==null)for(const a of r)(a.is_global||t)&&e.push(a);for(var i=n.first;i!==null;){var s=i.next,o=(i.f&Eo)!==0||(i.f&Si)!==0&&(n.f&ys)!==0;Sw(i,e,o?t:!1),i=s}}}function Ig(n){Aw(n,!0)}function Aw(n,e){if((n.f&jr)!==0){n.f^=jr,(n.f&Xn)===0&&(Sn(n,Un),Oi(n));for(var t=n.first;t!==null;){var r=t.next,i=(t.f&Eo)!==0||(t.f&Si)!==0;Aw(t,i?e:!1),t=r}var s=n.nodes&&n.nodes.t;if(s!==null)for(const o of s)(o.is_global||e)&&o.in()}}function Cw(n,e){if(n.nodes)for(var t=n.nodes.start,r=n.nodes.end;t!==null;){var i=t===r?null:Dc(t);e.append(t),t=i}}let Wu=!1,Ws=!1;function Yv(n){Ws=n}let Mt=null,vi=!1;function si(n){Mt=n}let Wt=null;function Yi(n){Wt=n}let ti=null;function Tw(n){Mt!==null&&(ti===null?ti=[n]:ti.push(n))}let vr=null,Lr=0,Vr=null;function MT(n){Vr=n}let Pw=1,bo=0,Co=bo;function Uv(n){Co=n}function Ew(){return++Pw}function Rc(n){var e=n.f;if((e&Un)!==0)return!0;if(e&Yn&&(n.f&=~$o),(e&_i)!==0){for(var t=n.deps,r=t.length,i=0;i<r;i++){var s=t[i];if(Rc(s)&&hw(s),s.wv>n.wv)return!0}(e&ei)!==0&&pi===null&&Sn(n,Xn)}return!1}function $w(n,e,t=!0){var r=n.reactions;if(r!==null&&!(ti!==null&&$a.call(ti,n)))for(var i=0;i<r.length;i++){var s=r[i];(s.f&Yn)!==0?$w(s,e,!1):e===s&&(t?Sn(s,Un):(s.f&Xn)!==0&&Sn(s,_i),Oi(s))}}function Qw(n){var e=vr,t=Lr,r=Vr,i=Mt,s=ti,o=zr,a=vi,l=Co,c=n.f;vr=null,Lr=0,Vr=null,Mt=(c&(Si|Zo))===0?n:null,ti=null,Qa(n.ctx),vi=!1,Co=++bo,n.ac!==null&&(Od(()=>{n.ac.abort(la)}),n.ac=null);try{n.f|=Pp;var u=n.fn,f=u(),d=n.deps,h=Bt?.is_fork;if(vr!==null){var g;if(h||gf(n,Lr),d!==null&&Lr>0)for(d.length=Lr+vr.length,g=0;g<vr.length;g++)d[Lr+g]=vr[g];else n.deps=d=vr;if(qg()&&(n.f&ei)!==0)for(g=Lr;g<d.length;g++)(d[g].reactions??=[]).push(n)}else!h&&d!==null&&Lr<d.length&&(gf(n,Lr),d.length=Lr);if(nw()&&Vr!==null&&!vi&&d!==null&&(n.f&(Yn|_i|Un))===0)for(g=0;g<Vr.length;g++)$w(Vr[g],n);if(i!==null&&i!==n){if(bo++,i.deps!==null)for(let p=0;p<t;p+=1)i.deps[p].rv=bo;if(e!==null)for(const p of e)p.rv=bo;Vr!==null&&(r===null?r=Vr:r.push(...Vr))}return(n.f&js)!==0&&(n.f^=js),f}catch(p){return iw(p)}finally{n.f^=Pp,vr=e,Lr=t,Vr=r,Mt=i,ti=s,Qa(o),vi=a,Co=l}}function DT(n,e){let t=e.reactions;if(t!==null){var r=PC.call(t,n);if(r!==-1){var i=t.length-1;i===0?t=e.reactions=null:(t[r]=t[i],t.pop())}}if(t===null&&(e.f&Yn)!==0&&(vr===null||!$a.call(vr,e))){var s=e;(s.f&ei)!==0&&(s.f^=ei,s.f&=~$o),Lg(s),dw(s),gf(s,0)}}function gf(n,e){var t=n.deps;if(t!==null)for(var r=e;r<t.length;r++)DT(n,t[r])}function tc(n){var e=n.f;if((e&ds)===0){Sn(n,Xn);var t=Wt,r=Wu;Wt=n,Wu=!0;try{(e&(ys|G0))!==0?LT(n):_w(n),ww(n);var i=Qw(n);n.teardown=typeof i=="function"?i:null,n.wv=Pw;var s;Tp&&lT&&(n.f&Un)!==0&&n.deps}finally{Wu=r,Wt=t}}}async function qT(){await Promise.resolve(),hT()}function m(n){var e=n.f,t=(e&Yn)!==0;if(Mt!==null&&!vi){var r=Wt!==null&&(Wt.f&ds)!==0;if(!r&&(ti===null||!$a.call(ti,n))){var i=Mt.deps;if((Mt.f&Pp)!==0)n.rv<bo&&(n.rv=bo,vr===null&&i!==null&&i[Lr]===n?Lr++:vr===null?vr=[n]:vr.push(n));else{(Mt.deps??=[]).push(n);var s=n.reactions;s===null?n.reactions=[Mt]:$a.call(s,Mt)||s.push(Mt)}}}if(Ws&&Zs.has(n))return Zs.get(n);if(t){var o=n;if(Ws){var a=o.v;return((o.f&Xn)===0&&o.reactions!==null||Mw(o))&&(a=Mg(o)),Zs.set(o,a),a}var l=(o.f&ei)===0&&!vi&&Mt!==null&&(Wu||(Mt.f&ei)!==0),c=o.deps===null;Rc(o)&&(l&&(o.f|=ei),hw(o)),l&&!c&&Lw(o)}if(pi?.has(n))return pi.get(n);if((n.f&js)!==0)throw n.v;return n.v}function Lw(n){if(n.deps!==null){n.f|=ei;for(const e of n.deps)(e.reactions??=[]).push(n),(e.f&Yn)!==0&&(e.f&ei)===0&&Lw(e)}}function Mw(n){if(n.v===Fn)return!0;if(n.deps===null)return!1;for(const e of n.deps)if(Zs.has(e)||(e.f&Yn)!==0&&Mw(e))return!0;return!1}function Sr(n){var e=vi;try{return vi=!0,n()}finally{vi=e}}const RT=["touchstart","touchmove"];function IT(n){return RT.includes(n)}const Dw=new Set,Lp=new Set;function NT(n,e,t,r={}){function i(s){if(r.capture||$l.call(e,s),!s.cancelBubble)return Od(()=>t?.call(this,s))}return n.startsWith("pointer")||n.startsWith("touch")||n==="wheel"?Zi(()=>{e.addEventListener(n,i,r)}):e.addEventListener(n,i,r),i}function ct(n,e,t,r,i){var s={capture:r,passive:i},o=NT(n,e,t,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Rg(()=>{e.removeEventListener(n,o,s)})}function Ut(n){for(var e=0;e<n.length;e++)Dw.add(n[e]);for(var t of Lp)t(n)}let Gv=null;function $l(n){var e=this,t=e.ownerDocument,r=n.type,i=n.composedPath?.()||[],s=i[0]||n.target;Gv=n;var o=0,a=Gv===n&&n.__root;if(a){var l=i.indexOf(a);if(l!==-1&&(e===document||e===window)){n.__root=e;return}var c=i.indexOf(e);if(c===-1)return;l<=c&&(o=l)}if(s=i[o]||n.target,s!==e){EC(n,"currentTarget",{configurable:!0,get(){return s||t}});var u=Mt,f=Wt;si(null),Yi(null);try{for(var d,h=[];s!==null;){var g=s.assignedSlot||s.parentNode||s.host||null;try{var p=s["__"+r];p!=null&&(!s.disabled||n.target===s)&&p.call(s,n)}catch(O){d?h.push(O):d=O}if(n.cancelBubble||g===e||g===null)break;s=g}if(d){for(let O of h)queueMicrotask(()=>{throw O});throw d}}finally{n.__root=e,delete n.currentTarget,si(u),Yi(f)}}}function Ng(n){var e=document.createElement("template");return e.innerHTML=n.replaceAll("<!>","<!---->"),e.content}function Mo(n,e){var t=Wt;t.nodes===null&&(t.nodes={start:n,end:e,a:null,t:null})}function V(n,e){var t=(e&J0)!==0,r=(e&rT)!==0,i,s=!n.startsWith("<!>");return()=>{i===void 0&&(i=Ng(s?n:"<!>"+n),t||(i=qr(i)));var o=r||gw?document.importNode(i,!0):i.cloneNode(!0);if(t){var a=qr(o),l=o.lastChild;Mo(a,l)}else Mo(o,o);return o}}function BT(n,e,t="svg"){var r=!n.startsWith("<!>"),i=(e&J0)!==0,s=`<${t}>${r?n:"<!>"+n}</${t}>`,o;return()=>{if(!o){var a=Ng(s),l=qr(a);if(i)for(o=document.createDocumentFragment();qr(l);)o.appendChild(qr(l));else o=qr(l)}var c=o.cloneNode(!0);if(i){var u=qr(c),f=c.lastChild;Mo(u,f)}else Mo(c,c);return c}}function _s(n,e){return BT(n,e,"svg")}function Hv(n=""){{var e=hs(n+"");return Mo(e,e),e}}function ln(){var n=document.createDocumentFragment(),e=document.createComment(""),t=hs();return n.append(e,t),Mo(e,t),n}function j(n,e){n!==null&&n.before(e)}function Ee(n,e){var t=e==null?"":typeof e=="object"?e+"":e;t!==(n.__t??=n.nodeValue)&&(n.__t=t,n.nodeValue=t+"")}function jT(n,e){return zT(n,e)}const Go=new Map;function zT(n,{target:e,anchor:t,props:r={},events:i,context:s,intro:o=!0}){AT();var a=new Set,l=f=>{for(var d=0;d<f.length;d++){var h=f[d];if(!a.has(h)){a.add(h);var g=IT(h);e.addEventListener(h,$l,{passive:g});var p=Go.get(h);p===void 0?(document.addEventListener(h,$l,{passive:g}),Go.set(h,1)):Go.set(h,p+1)}}};l(hd(Dw)),Lp.add(l);var c=void 0,u=$T(()=>{var f=t??e.appendChild(hs());return OT(f,{pending:()=>{}},d=>{Ot({});var h=zr;s&&(h.c=s),i&&(r.$$events=i),c=n(d,r)||{},vt()}),()=>{for(var d of a){e.removeEventListener(d,$l);var h=Go.get(d);--h===0?(document.removeEventListener(d,$l),Go.delete(d)):Go.set(d,h)}Lp.delete(l),f!==t&&f.parentNode?.removeChild(f)}});return ZT.set(c,u),c}let ZT=new WeakMap;class Bg{anchor;#e=new Map;#r=new Map;#t=new Map;#i=new Set;#a=!0;constructor(e,t=!0){this.anchor=e,this.#a=t}#s=()=>{var e=Bt;if(this.#e.has(e)){var t=this.#e.get(e),r=this.#r.get(t);if(r)Ig(r),this.#i.delete(t);else{var i=this.#t.get(t);i&&(this.#r.set(t,i.effect),this.#t.delete(t),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[s,o]of this.#e){if(this.#e.delete(s),s===e)break;const a=this.#t.get(o);a&&(xr(a.effect),this.#t.delete(o))}for(const[s,o]of this.#r){if(s===t||this.#i.has(s))continue;const a=()=>{if(Array.from(this.#e.values()).includes(s)){var c=document.createDocumentFragment();Cw(o,c),c.append(hs()),this.#t.set(s,{effect:o,fragment:c})}else xr(o);this.#i.delete(s),this.#r.delete(s)};this.#a||!r?(this.#i.add(s),Ao(o,a,!1)):a()}}};#n=e=>{this.#e.delete(e);const t=Array.from(this.#e.values());for(const[r,i]of this.#t)t.includes(r)||(xr(i.effect),this.#t.delete(r))};ensure(e,t){var r=Bt,i=bw();if(t&&!this.#r.has(e)&&!this.#t.has(e))if(i){var s=document.createDocumentFragment(),o=hs();s.append(o),this.#t.set(e,{effect:Yr(()=>t(o)),fragment:s})}else this.#r.set(e,Yr(()=>t(this.anchor)));if(this.#e.set(r,e),i){for(const[a,l]of this.#r)a===e?r.unskip_effect(l):r.skip_effect(l);for(const[a,l]of this.#t)a===e?r.unskip_effect(l.effect):r.skip_effect(l.effect);r.oncommit(this.#s),r.ondiscard(this.#n)}else this.#s()}}function ue(n,e,t=!1){var r=new Bg(n),i=t?Eo:0;function s(o,a){r.ensure(o,a)}qc(()=>{var o=!1;e((a,l=0)=>{o=!0,s(l,a)}),o||s(!1,null)},i)}const XT=Symbol("NaN");function Kv(n,e,t){var r=new Bg(n);qc(()=>{var i=e();i!==i&&(i=XT),r.ensure(i,t)})}function Gt(n,e){return e}function FT(n,e,t){for(var r=[],i=e.length,s,o=e.length,a=0;a<i;a++){let f=e[a];Ao(f,()=>{if(s){if(s.pending.delete(f),s.done.add(f),s.pending.size===0){var d=n.outrogroups;Mp(hd(s.done)),d.delete(s),d.size===0&&(n.outrogroups=null)}}else o-=1},!1)}if(o===0){var l=r.length===0&&t!==null;if(l){var c=t,u=c.parentNode;CT(u),u.append(c),n.items.clear()}Mp(e,!l)}else s={pending:new Set(e),done:new Set},(n.outrogroups??=new Set).add(s)}function Mp(n,e=!0){for(var t=0;t<n.length;t++)xr(n[t],e)}var Jv;function $t(n,e,t,r,i,s=null){var o=n,a=new Map,l=(e&K0)!==0;if(l){var c=n;o=c.appendChild(hs())}var u=null,f=fw(()=>{var v=t();return dd(v)?v:v==null?[]:hd(v)}),d,h=!0;function g(){O.fallback=u,VT(O,d,o,e,r),u!==null&&(d.length===0?(u.f&cs)===0?Ig(u):(u.f^=cs,Ql(u,null,o)):Ao(u,()=>{u=null}))}var p=qc(()=>{d=m(f);for(var v=d.length,b=new Set,_=Bt,A=bw(),y=0;y<v;y+=1){var w=d[y],S=r(w,y),C=h?null:a.get(S);C?(C.v&&Ma(C.v,w),C.i&&Ma(C.i,y),A&&_.unskip_effect(C.e)):(C=WT(a,h?o:Jv??=hs(),w,S,y,i,e,t),h||(C.e.f|=cs),a.set(S,C)),b.add(S)}if(v===0&&s&&!u&&(h?u=Yr(()=>s(o)):(u=Yr(()=>s(Jv??=hs())),u.f|=cs)),v>b.size&&NC(),!h)if(A){for(const[x,k]of a)b.has(x)||_.skip_effect(k.e);_.oncommit(g),_.ondiscard(()=>{})}else g();m(f)}),O={effect:p,items:a,outrogroups:null,fallback:u};h=!1}function hl(n){for(;n!==null&&(n.f&Si)===0;)n=n.next;return n}function VT(n,e,t,r,i){var s=(r&HC)!==0,o=e.length,a=n.items,l=hl(n.effect.first),c,u=null,f,d=[],h=[],g,p,O,v;if(s)for(v=0;v<o;v+=1)g=e[v],p=i(g,v),O=a.get(p).e,(O.f&cs)===0&&(O.nodes?.a?.measure(),(f??=new Set).add(O));for(v=0;v<o;v+=1){if(g=e[v],p=i(g,v),O=a.get(p).e,n.outrogroups!==null)for(const k of n.outrogroups)k.pending.delete(O),k.done.delete(O);if((O.f&cs)!==0)if(O.f^=cs,O===l)Ql(O,null,t);else{var b=u?u.next:l;O===n.effect.last&&(n.effect.last=O.prev),O.prev&&(O.prev.next=O.next),O.next&&(O.next.prev=O.prev),As(n,u,O),As(n,O,b),Ql(O,b,t),u=O,d=[],h=[],l=hl(u.next);continue}if((O.f&jr)!==0&&(Ig(O),s&&(O.nodes?.a?.unfix(),(f??=new Set).delete(O))),O!==l){if(c!==void 0&&c.has(O)){if(d.length<h.length){var _=h[0],A;u=_.prev;var y=d[0],w=d[d.length-1];for(A=0;A<d.length;A+=1)Ql(d[A],_,t);for(A=0;A<h.length;A+=1)c.delete(h[A]);As(n,y.prev,w.next),As(n,u,y),As(n,w,_),l=_,u=w,v-=1,d=[],h=[]}else c.delete(O),Ql(O,l,t),As(n,O.prev,O.next),As(n,O,u===null?n.effect.first:u.next),As(n,u,O),u=O;continue}for(d=[],h=[];l!==null&&l!==O;)(c??=new Set).add(l),h.push(l),l=hl(l.next);if(l===null)continue}(O.f&cs)===0&&d.push(O),u=O,l=hl(O.next)}if(n.outrogroups!==null){for(const k of n.outrogroups)k.pending.size===0&&(Mp(hd(k.done)),n.outrogroups?.delete(k));n.outrogroups.size===0&&(n.outrogroups=null)}if(l!==null||c!==void 0){var S=[];if(c!==void 0)for(O of c)(O.f&jr)===0&&S.push(O);for(;l!==null;)(l.f&jr)===0&&l!==n.fallback&&S.push(l),l=hl(l.next);var C=S.length;if(C>0){var x=(r&K0)!==0&&o===0?t:null;if(s){for(v=0;v<C;v+=1)S[v].nodes?.a?.measure();for(v=0;v<C;v+=1)S[v].nodes?.a?.fix()}FT(n,S,x)}}s&&Zi(()=>{if(f!==void 0)for(O of f)O.nodes?.a?.apply()})}function WT(n,e,t,r,i,s,o,a){var l=(o&UC)!==0?(o&KC)===0?kT(t,!1,!1):Qo(t):null,c=(o&GC)!==0?Qo(i):null;return{v:l,i:c,e:Yr(()=>(s(e,l??t,c??i,a),()=>{n.delete(r)}))}}function Ql(n,e,t){if(n.nodes)for(var r=n.nodes.start,i=n.nodes.end,s=e&&(e.f&cs)===0?e.nodes.start:t;r!==null;){var o=Dc(r);if(s.before(r),r===i)return;r=o}}function As(n,e,t){e===null?n.effect.first=t:e.next=t,t===null?n.effect.last=e:t.prev=e}function qw(n,e,t=!1,r=!1,i=!1){var s=n,o="";fe(()=>{var a=Wt;if(o!==(o=e()??"")&&(a.nodes!==null&&(kw(a.nodes.start,a.nodes.end),a.nodes=null),o!=="")){var l=o+"";t?l=`<svg>${l}</svg>`:r&&(l=`<math>${l}</math>`);var c=Ng(l);if((t||r)&&(c=qr(c)),Mo(qr(c),c.lastChild),t||r)for(;qr(c);)s.before(qr(c));else s.before(c)}})}function ca(n,e,...t){var r=new Bg(n);qc(()=>{const i=e()??null;r.ensure(i,i&&(s=>i(s,...t)))},Eo)}function YT(n,e,t){vd(()=>{var r=Sr(()=>e(n,t?.())||{});if(r?.destroy)return()=>r.destroy()})}const eb=[...`
3
- \r\f \v\uFEFF`];function UT(n,e,t){var r=n==null?"":""+n;if(t){for(var i in t)if(t[i])r=r?r+" "+i:i;else if(r.length)for(var s=i.length,o=0;(o=r.indexOf(i,o))>=0;){var a=o+s;(o===0||eb.includes(r[o-1]))&&(a===r.length||eb.includes(r[a]))?r=(o===0?"":r.substring(0,o))+r.substring(a+1):o=a}}return r===""?null:r}function GT(n,e){return n==null?null:String(n)}function Ze(n,e,t,r,i,s){var o=n.__className;if(o!==t||o===void 0){var a=UT(t,r,s);a==null?n.removeAttribute("class"):e?n.className=a:n.setAttribute("class",a),n.__className=t}else if(s&&i!==s)for(var l in s){var c=!!s[l];(i==null||c!==!!i[l])&&n.classList.toggle(l,c)}return s}function Ar(n,e,t,r){var i=n.__style;if(i!==e){var s=GT(e);s==null?n.removeAttribute("style"):n.style.cssText=s,n.__style=e}return r}function nc(n,e,t=!1){if(n.multiple){if(e==null)return;if(!dd(e))return sT();for(var r of n.options)r.selected=e.includes(zl(r));return}for(r of n.options){var i=zl(r);if(ST(i,e)){r.selected=!0;return}}(!t||e!==void 0)&&(n.selectedIndex=-1)}function Of(n){var e=new MutationObserver(()=>{nc(n,n.__value)});e.observe(n,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Rg(()=>{e.disconnect()})}function Rw(n,e,t=e){var r=new WeakSet,i=!0;Dg(n,"change",s=>{var o=s?"[selected]":":checked",a;if(n.multiple)a=[].map.call(n.querySelectorAll(o),zl);else{var l=n.querySelector(o)??n.querySelector("option:not([disabled])");a=l&&zl(l)}t(a),Bt!==null&&r.add(Bt)}),vd(()=>{var s=e();if(n===document.activeElement){var o=mf??Bt;if(r.has(o))return}if(nc(n,s,i),i&&s===void 0){var a=n.querySelector(":checked");a!==null&&(s=zl(a),t(s))}n.__value=s,i=!1}),Of(n)}function zl(n){return"__value"in n?n.__value:n.value}const HT=Symbol("is custom element"),KT=Symbol("is html");function on(n,e){var t=Iw(n);t.value===(t.value=e??void 0)||n.value===e&&(e!==0||n.nodeName!=="PROGRESS")||(n.value=e??"")}function Et(n,e,t,r){var i=Iw(n);i[e]!==(i[e]=t)&&(e==="loading"&&(n[qC]=t),t==null?n.removeAttribute(e):typeof t!="string"&&JT(n).includes(e)?n[e]=t:n.setAttribute(e,t))}function Iw(n){return n.__attributes??={[HT]:n.nodeName.includes("-"),[KT]:n.namespaceURI===iT}}var tb=new Map;function JT(n){var e=n.getAttribute("is")||n.nodeName,t=tb.get(e);if(t)return t;tb.set(e,t=[]);for(var r,i=n,s=Element.prototype;s!==i;){r=$C(i);for(var o in r)r[o].set&&t.push(o);i=Pg(i)}return t}function $n(n,e,t=e){var r=new WeakSet;Dg(n,"input",async i=>{var s=i?n.defaultValue:n.value;if(s=nh(n)?rh(s):s,t(s),Bt!==null&&r.add(Bt),await qT(),s!==(s=e())){var o=n.selectionStart,a=n.selectionEnd,l=n.value.length;if(n.value=s??"",a!==null){var c=n.value.length;o===a&&a===l&&c>l?(n.selectionStart=c,n.selectionEnd=c):(n.selectionStart=o,n.selectionEnd=Math.min(a,c))}}}),Sr(e)==null&&n.value&&(t(nh(n)?rh(n.value):n.value),Bt!==null&&r.add(Bt)),bd(()=>{var i=e();if(n===document.activeElement){var s=mf??Bt;if(r.has(s))return}nh(n)&&i===rh(n.value)||n.type==="date"&&!i&&!n.value||i!==n.value&&(n.value=i??"")})}function Dp(n,e,t=e){Dg(n,"change",r=>{var i=r?n.defaultChecked:n.checked;t(i)}),Sr(e)==null&&t(n.checked),bd(()=>{var r=e();n.checked=!!r})}function nh(n){var e=n.type;return e==="number"||e==="range"}function rh(n){return n===""?null:+n}class jg{#e=new WeakMap;#r;#t;static entries=new WeakMap;constructor(e){this.#t=e}observe(e,t){var r=this.#e.get(e)||new Set;return r.add(t),this.#e.set(e,r),this.#i().observe(e,this.#t),()=>{var i=this.#e.get(e);i.delete(t),i.size===0&&(this.#e.delete(e),this.#r.unobserve(e))}}#i(){return this.#r??(this.#r=new ResizeObserver(e=>{for(var t of e){jg.entries.set(t.target,t);for(var r of this.#e.get(t.target)||[])r(t)}}))}}var eP=new jg({box:"border-box"});function tP(n,e,t){var r=eP.observe(n,()=>t(n[e]));vd(()=>(Sr(()=>t(n[e])),r))}function nb(n,e){return n===e||n?.[So]===e}function cn(n={},e,t,r){return vd(()=>{var i,s;return bd(()=>{i=s,s=[],Sr(()=>{n!==t(...s)&&(e(n,...s),i&&nb(t(...i),n)&&e(null,...i))})}),()=>{Zi(()=>{s&&nb(t(...s),n)&&e(null,...s)})}}),n}let eu=!1;function nP(n){var e=eu;try{return eu=!1,[n(),eu]}finally{eu=e}}function Pt(n,e,t,r){var i=(t&tT)!==0,s=(t&nT)!==0,o=r,a=!0,l=()=>(a&&(a=!1,o=s?Sr(r):r),o),c;if(i){var u=So in n||DC in n;c=ya(n,e)?.set??(u&&e in n?b=>n[e]=b:void 0)}var f,d=!1;i?[f,d]=nP(()=>n[e]):f=n[e],f===void 0&&r!==void 0&&(f=l(),c&&(XC(),c(f)));var h;if(h=()=>{var b=n[e];return b===void 0?l():(a=!0,b)},(t&eT)===0)return h;if(c){var g=n.$$legacy;return(function(b,_){return arguments.length>0?((!_||g||d)&&c(_?h():b),b):h()})}var p=!1,O=((t&JC)!==0?gd:fw)(()=>(p=!1,h()));i&&m(O);var v=Wt;return(function(b,_){if(arguments.length>0){const A=_?m(O):i?Jt(b):b;return L(O,A),p=!0,o!==void 0&&(o=A),b}return Ws&&p||(v.f&ds)!==0?O.v:m(O)})}function no(n){zr===null&&RC(),hn(()=>{const e=Sr(n);if(typeof e=="function")return e})}const rP="modulepreload",iP=function(n){return"/"+n},rb={},re=function(e,t,r){let i=Promise.resolve();if(t&&t.length>0){let l=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=o?.nonce||o?.getAttribute("nonce");i=l(t.map(c=>{if(c=iP(c),c in rb)return;rb[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":rP,u||(d.as="script"),d.crossOrigin="",d.href=c,a&&d.setAttribute("nonce",a),document.head.appendChild(d),u)return new Promise((h,g)=>{d.addEventListener("load",h),d.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})},sP="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(sP);const zg=Symbol.for("yaml.alias"),qp=Symbol.for("yaml.document"),Xs=Symbol.for("yaml.map"),Nw=Symbol.for("yaml.pair"),Ui=Symbol.for("yaml.scalar"),el=Symbol.for("yaml.seq"),oi=Symbol.for("yaml.node.type"),ro=n=>!!n&&typeof n=="object"&&n[oi]===zg,Xo=n=>!!n&&typeof n=="object"&&n[oi]===qp,tl=n=>!!n&&typeof n=="object"&&n[oi]===Xs,pn=n=>!!n&&typeof n=="object"&&n[oi]===Nw,rn=n=>!!n&&typeof n=="object"&&n[oi]===Ui,nl=n=>!!n&&typeof n=="object"&&n[oi]===el;function gn(n){if(n&&typeof n=="object")switch(n[oi]){case Xs:case el:return!0}return!1}function vn(n){if(n&&typeof n=="object")switch(n[oi]){case zg:case Xs:case Ui:case el:return!0}return!1}const Bw=n=>(rn(n)||gn(n))&&!!n.anchor,yr=Symbol("break visit"),jw=Symbol("skip children"),Xi=Symbol("remove node");function Fo(n,e){const t=zw(e);Xo(n)?ua(null,n.contents,t,Object.freeze([n]))===Xi&&(n.contents=null):ua(null,n,t,Object.freeze([]))}Fo.BREAK=yr;Fo.SKIP=jw;Fo.REMOVE=Xi;function ua(n,e,t,r){const i=Zw(n,e,t,r);if(vn(i)||pn(i))return Xw(n,r,i),ua(n,i,t,r);if(typeof i!="symbol"){if(gn(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){const o=ua(s,e.items[s],t,r);if(typeof o=="number")s=o-1;else{if(o===yr)return yr;o===Xi&&(e.items.splice(s,1),s-=1)}}}else if(pn(e)){r=Object.freeze(r.concat(e));const s=ua("key",e.key,t,r);if(s===yr)return yr;s===Xi&&(e.key=null);const o=ua("value",e.value,t,r);if(o===yr)return yr;o===Xi&&(e.value=null)}}return i}async function yd(n,e){const t=zw(e);Xo(n)?await fa(null,n.contents,t,Object.freeze([n]))===Xi&&(n.contents=null):await fa(null,n,t,Object.freeze([]))}yd.BREAK=yr;yd.SKIP=jw;yd.REMOVE=Xi;async function fa(n,e,t,r){const i=await Zw(n,e,t,r);if(vn(i)||pn(i))return Xw(n,r,i),fa(n,i,t,r);if(typeof i!="symbol"){if(gn(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){const o=await fa(s,e.items[s],t,r);if(typeof o=="number")s=o-1;else{if(o===yr)return yr;o===Xi&&(e.items.splice(s,1),s-=1)}}}else if(pn(e)){r=Object.freeze(r.concat(e));const s=await fa("key",e.key,t,r);if(s===yr)return yr;s===Xi&&(e.key=null);const o=await fa("value",e.value,t,r);if(o===yr)return yr;o===Xi&&(e.value=null)}}return i}function zw(n){return typeof n=="object"&&(n.Collection||n.Node||n.Value)?Object.assign({Alias:n.Node,Map:n.Node,Scalar:n.Node,Seq:n.Node},n.Value&&{Map:n.Value,Scalar:n.Value,Seq:n.Value},n.Collection&&{Map:n.Collection,Seq:n.Collection},n):n}function Zw(n,e,t,r){if(typeof t=="function")return t(n,e,r);if(tl(e))return t.Map?.(n,e,r);if(nl(e))return t.Seq?.(n,e,r);if(pn(e))return t.Pair?.(n,e,r);if(rn(e))return t.Scalar?.(n,e,r);if(ro(e))return t.Alias?.(n,e,r)}function Xw(n,e,t){const r=e[e.length-1];if(gn(r))r.items[n]=t;else if(pn(r))n==="key"?r.key=t:r.value=t;else if(Xo(r))r.contents=t;else{const i=ro(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}const oP={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},aP=n=>n.replace(/[!,[\]{}]/g,e=>oP[e]);class ir{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},ir.defaultYaml,e),this.tags=Object.assign({},ir.defaultTags,t)}clone(){const e=new ir(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new ir(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:ir.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},ir.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:ir.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},ir.defaultTags),this.atNextDocument=!1);const r=e.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;const[s,o]=r;return this.tags[s]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;const[s]=r;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{const o=/^\d+\.\d+$/.test(s);return t(6,`Unsupported YAML version ${s}`,o),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}const[,r,i]=e.match(/^(.*!)([^!]*)$/s);i||t(`The ${e} tag has no suffix`);const s=this.tags[r];if(s)try{return s+decodeURIComponent(i)}catch(o){return t(String(o)),null}return r==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,r]of Object.entries(this.tags))if(e.startsWith(r))return t+aP(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let i;if(e&&r.length>0&&vn(e.contents)){const s={};Fo(e.contents,(o,a)=>{vn(a)&&a.tag&&(s[a.tag]=!0)}),i=Object.keys(s)}else i=[];for(const[s,o]of r)s==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(a=>a.startsWith(o)))&&t.push(`%TAG ${s} ${o}`);return t.join(`
4
- `)}}ir.defaultYaml={explicit:!1,version:"1.2"};ir.defaultTags={"!!":"tag:yaml.org,2002:"};function Fw(n){if(/[\x00-\x19\s,[\]{}]/.test(n)){const t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(n)}`;throw new Error(t)}return!0}function Vw(n){const e=new Set;return Fo(n,{Value(t,r){r.anchor&&e.add(r.anchor)}}),e}function Ww(n,e){for(let t=1;;++t){const r=`${n}${t}`;if(!e.has(r))return r}}function lP(n,e){const t=[],r=new Map;let i=null;return{onAnchor:s=>{t.push(s),i??(i=Vw(n));const o=Ww(e,i);return i.add(o),o},setAnchors:()=>{for(const s of t){const o=r.get(s);if(typeof o=="object"&&o.anchor&&(rn(o.node)||gn(o.node)))o.node.anchor=o.anchor;else{const a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=s,a}}},sourceObjects:r}}function da(n,e,t,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,s=r.length;i<s;++i){const o=r[i],a=da(n,r,String(i),o);a===void 0?delete r[i]:a!==o&&(r[i]=a)}else if(r instanceof Map)for(const i of Array.from(r.keys())){const s=r.get(i),o=da(n,r,i,s);o===void 0?r.delete(i):o!==s&&r.set(i,o)}else if(r instanceof Set)for(const i of Array.from(r)){const s=da(n,r,i,i);s===void 0?r.delete(i):s!==i&&(r.delete(i),r.add(s))}else for(const[i,s]of Object.entries(r)){const o=da(n,r,i,s);o===void 0?delete r[i]:o!==s&&(r[i]=o)}return n.call(e,t,r)}function ni(n,e,t){if(Array.isArray(n))return n.map((r,i)=>ni(r,String(i),t));if(n&&typeof n.toJSON=="function"){if(!t||!Bw(n))return n.toJSON(e,t);const r={aliasCount:0,count:1,res:void 0};t.anchors.set(n,r),t.onCreate=s=>{r.res=s,delete t.onCreate};const i=n.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof n=="bigint"&&!t?.keep?Number(n):n}class Zg{constructor(e){Object.defineProperty(this,oi,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:r,onAnchor:i,reviver:s}={}){if(!Xo(e))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=ni(this,"",o);if(typeof i=="function")for(const{count:l,res:c}of o.anchors.values())i(c,l);return typeof s=="function"?da(s,{"":a},"",a):a}}class wd extends Zg{constructor(e){super(zg),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){let r;t?.aliasResolveCache?r=t.aliasResolveCache:(r=[],Fo(e,{Node:(s,o)=>{(ro(o)||Bw(o))&&r.push(o)}}),t&&(t.aliasResolveCache=r));let i;for(const s of r){if(s===this)break;s.anchor===this.source&&(i=s)}return i}toJSON(e,t){if(!t)return{source:this.source};const{anchors:r,doc:i,maxAliasCount:s}=t,o=this.resolve(i,t);if(!o){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=r.get(o);if(a||(ni(o,null,t),a=r.get(o)),a?.res===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=Yu(i,o,r)),a.count*a.aliasCount>s)){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,t,r){const i=`*${this.source}`;if(e){if(Fw(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${i} `}return i}}function Yu(n,e,t){if(ro(e)){const r=e.resolve(n),i=t&&r&&t.get(r);return i?i.count*i.aliasCount:0}else if(gn(e)){let r=0;for(const i of e.items){const s=Yu(n,i,t);s>r&&(r=s)}return r}else if(pn(e)){const r=Yu(n,e.key,t),i=Yu(n,e.value,t);return Math.max(r,i)}return 1}const Yw=n=>!n||typeof n!="function"&&typeof n!="object";class ut extends Zg{constructor(e){super(Ui),this.value=e}toJSON(e,t){return t?.keep?this.value:ni(this.value,e,t)}toString(){return String(this.value)}}ut.BLOCK_FOLDED="BLOCK_FOLDED";ut.BLOCK_LITERAL="BLOCK_LITERAL";ut.PLAIN="PLAIN";ut.QUOTE_DOUBLE="QUOTE_DOUBLE";ut.QUOTE_SINGLE="QUOTE_SINGLE";const cP="tag:yaml.org,2002:";function uP(n,e,t){if(e){const r=t.filter(s=>s.tag===e),i=r.find(s=>!s.format)??r[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return t.find(r=>r.identify?.(n)&&!r.format)}function rc(n,e,t){if(Xo(n)&&(n=n.contents),vn(n))return n;if(pn(n)){const f=t.schema[Xs].createNode?.(t.schema,null,t);return f.items.push(n),f}(n instanceof String||n instanceof Number||n instanceof Boolean||typeof BigInt<"u"&&n instanceof BigInt)&&(n=n.valueOf());const{aliasDuplicateObjects:r,onAnchor:i,onTagObj:s,schema:o,sourceObjects:a}=t;let l;if(r&&n&&typeof n=="object"){if(l=a.get(n),l)return l.anchor??(l.anchor=i(n)),new wd(l.anchor);l={anchor:null,node:null},a.set(n,l)}e?.startsWith("!!")&&(e=cP+e.slice(2));let c=uP(n,e,o.tags);if(!c){if(n&&typeof n.toJSON=="function"&&(n=n.toJSON()),!n||typeof n!="object"){const f=new ut(n);return l&&(l.node=f),f}c=n instanceof Map?o[Xs]:Symbol.iterator in Object(n)?o[el]:o[Xs]}s&&(s(c),delete t.onTagObj);const u=c?.createNode?c.createNode(t.schema,n,t):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(t.schema,n,t):new ut(n);return e?u.tag=e:c.default||(u.tag=c.tag),l&&(l.node=u),u}function vf(n,e,t){let r=t;for(let i=e.length-1;i>=0;--i){const s=e[i];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){const o=[];o[s]=r,r=o}else r=new Map([[s,r]])}return rc(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:n,sourceObjects:new Map})}const Ll=n=>n==null||typeof n=="object"&&!!n[Symbol.iterator]().next().done;class Uw extends Zg{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(r=>vn(r)||pn(r)?r.clone(e):r),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Ll(e))this.add(t);else{const[r,...i]=e,s=this.get(r,!0);if(gn(s))s.addIn(i,t);else if(s===void 0&&this.schema)this.set(r,vf(this.schema,i,t));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(e){const[t,...r]=e;if(r.length===0)return this.delete(t);const i=this.get(t,!0);if(gn(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){const[r,...i]=e,s=this.get(r,!0);return i.length===0?!t&&rn(s)?s.value:s:gn(s)?s.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!pn(t))return!1;const r=t.value;return r==null||e&&rn(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[t,...r]=e;if(r.length===0)return this.has(t);const i=this.get(t,!0);return gn(i)?i.hasIn(r):!1}setIn(e,t){const[r,...i]=e;if(i.length===0)this.set(r,t);else{const s=this.get(r,!0);if(gn(s))s.setIn(i,t);else if(s===void 0&&this.schema)this.set(r,vf(this.schema,i,t));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}}const fP=n=>n.replace(/^(?!$)(?: $)?/gm,"#");function us(n,e){return/^\n+$/.test(n)?n.substring(1):e?n.replace(/^(?! *$)/gm,e):n}const yo=(n,e,t)=>n.endsWith(`
5
- `)?us(t,e):t.includes(`
6
- `)?`
7
- `+us(t,e):(n.endsWith(" ")?"":" ")+t,Gw="flow",Rp="block",Uu="quoted";function _d(n,e,t="flow",{indentAtStart:r,lineWidth:i=80,minContentWidth:s=20,onFold:o,onOverflow:a}={}){if(!i||i<0)return n;i<s&&(s=0);const l=Math.max(1+s,1+i-e.length);if(n.length<=l)return n;const c=[],u={};let f=i-e.length;typeof r=="number"&&(r>i-Math.max(2,s)?c.push(0):f=i-r);let d,h,g=!1,p=-1,O=-1,v=-1;t===Rp&&(p=ib(n,p,e.length),p!==-1&&(f=p+l));for(let _;_=n[p+=1];){if(t===Uu&&_==="\\"){switch(O=p,n[p+1]){case"x":p+=3;break;case"u":p+=5;break;case"U":p+=9;break;default:p+=1}v=p}if(_===`
8
- `)t===Rp&&(p=ib(n,p,e.length)),f=p+e.length+l,d=void 0;else{if(_===" "&&h&&h!==" "&&h!==`
9
- `&&h!==" "){const A=n[p+1];A&&A!==" "&&A!==`
10
- `&&A!==" "&&(d=p)}if(p>=f)if(d)c.push(d),f=d+l,d=void 0;else if(t===Uu){for(;h===" "||h===" ";)h=_,_=n[p+=1],g=!0;const A=p>v+1?p-2:O-1;if(u[A])return n;c.push(A),u[A]=!0,f=A+l,d=void 0}else g=!0}h=_}if(g&&a&&a(),c.length===0)return n;o&&o();let b=n.slice(0,c[0]);for(let _=0;_<c.length;++_){const A=c[_],y=c[_+1]||n.length;A===0?b=`
11
- ${e}${n.slice(0,y)}`:(t===Uu&&u[A]&&(b+=`${n[A]}\\`),b+=`
12
- ${e}${n.slice(A+1,y)}`)}return b}function ib(n,e,t){let r=e,i=e+1,s=n[i];for(;s===" "||s===" ";)if(e<i+t)s=n[++e];else{do s=n[++e];while(s&&s!==`
13
- `);r=e,i=e+1,s=n[i]}return r}const kd=(n,e)=>({indentAtStart:e?n.indent.length:n.indentAtStart,lineWidth:n.options.lineWidth,minContentWidth:n.options.minContentWidth}),xd=n=>/^(%|---|\.\.\.)/m.test(n);function dP(n,e,t){if(!e||e<0)return!1;const r=e-t,i=n.length;if(i<=r)return!1;for(let s=0,o=0;s<i;++s)if(n[s]===`
14
- `){if(s-o>r)return!0;if(o=s+1,i-o<=r)return!1}return!0}function Zl(n,e){const t=JSON.stringify(n);if(e.options.doubleQuotedAsJSON)return t;const{implicitKey:r}=e,i=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(xd(n)?" ":"");let o="",a=0;for(let l=0,c=t[l];c;c=t[++l])if(c===" "&&t[l+1]==="\\"&&t[l+2]==="n"&&(o+=t.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(t[l+1]){case"u":{o+=t.slice(a,l);const u=t.substr(l+2,4);switch(u){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:u.substr(0,2)==="00"?o+="\\x"+u.substr(2):o+=t.substr(l,6)}l+=5,a=l+1}break;case"n":if(r||t[l+2]==='"'||t.length<i)l+=1;else{for(o+=t.slice(a,l)+`
15
-
16
- `;t[l+2]==="\\"&&t[l+3]==="n"&&t[l+4]!=='"';)o+=`
17
- `,l+=2;o+=s,t[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+t.slice(a):t,r?o:_d(o,s,Uu,kd(e,!1))}function Ip(n,e){if(e.options.singleQuote===!1||e.implicitKey&&n.includes(`
18
- `)||/[ \t]\n|\n[ \t]/.test(n))return Zl(n,e);const t=e.indent||(xd(n)?" ":""),r="'"+n.replace(/'/g,"''").replace(/\n+/g,`$&
19
- ${t}`)+"'";return e.implicitKey?r:_d(r,t,Gw,kd(e,!1))}function ha(n,e){const{singleQuote:t}=e.options;let r;if(t===!1)r=Zl;else{const i=n.includes('"'),s=n.includes("'");i&&!s?r=Ip:s&&!i?r=Zl:r=t?Ip:Zl}return r(n,e)}let Np;try{Np=new RegExp(`(^|(?<!
20
- ))
21
- +(?!
22
- |$)`,"g")}catch{Np=/\n+(?!\n|$)/g}function Gu({comment:n,type:e,value:t},r,i,s){const{blockQuote:o,commentString:a,lineWidth:l}=r.options;if(!o||/\n[\t ]+$/.test(t))return ha(t,r);const c=r.indent||(r.forceBlockIndent||xd(t)?" ":""),u=o==="literal"?!0:o==="folded"||e===ut.BLOCK_FOLDED?!1:e===ut.BLOCK_LITERAL?!0:!dP(t,l,c.length);if(!t)return u?`|
23
- `:`>
24
- `;let f,d;for(d=t.length;d>0;--d){const y=t[d-1];if(y!==`
25
- `&&y!==" "&&y!==" ")break}let h=t.substring(d);const g=h.indexOf(`
26
- `);g===-1?f="-":t===h||g!==h.length-1?(f="+",s&&s()):f="",h&&(t=t.slice(0,-h.length),h[h.length-1]===`
27
- `&&(h=h.slice(0,-1)),h=h.replace(Np,`$&${c}`));let p=!1,O,v=-1;for(O=0;O<t.length;++O){const y=t[O];if(y===" ")p=!0;else if(y===`
28
- `)v=O;else break}let b=t.substring(0,v<O?v+1:O);b&&(t=t.substring(b.length),b=b.replace(/\n+/g,`$&${c}`));let A=(p?c?"2":"1":"")+f;if(n&&(A+=" "+a(n.replace(/ ?[\r\n]+/g," ")),i&&i()),!u){const y=t.replace(/\n+/g,`
29
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);let w=!1;const S=kd(r,!0);o!=="folded"&&e!==ut.BLOCK_FOLDED&&(S.onOverflow=()=>{w=!0});const C=_d(`${b}${y}${h}`,c,Rp,S);if(!w)return`>${A}
30
- ${c}${C}`}return t=t.replace(/\n+/g,`$&${c}`),`|${A}
31
- ${c}${b}${t}${h}`}function hP(n,e,t,r){const{type:i,value:s}=n,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:u}=e;if(a&&s.includes(`
32
- `)||u&&/[[\]{},]/.test(s))return ha(s,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return a||u||!s.includes(`
33
- `)?ha(s,e):Gu(n,e,t,r);if(!a&&!u&&i!==ut.PLAIN&&s.includes(`
34
- `))return Gu(n,e,t,r);if(xd(s)){if(l==="")return e.forceBlockIndent=!0,Gu(n,e,t,r);if(a&&l===c)return ha(s,e)}const f=s.replace(/\n+/g,`$&
35
- ${l}`);if(o){const d=p=>p.default&&p.tag!=="tag:yaml.org,2002:str"&&p.test?.test(f),{compat:h,tags:g}=e.doc.schema;if(g.some(d)||h?.some(d))return ha(s,e)}return a?f:_d(f,l,Gw,kd(e,!1))}function Ic(n,e,t,r){const{implicitKey:i,inFlow:s}=e,o=typeof n.value=="string"?n:Object.assign({},n,{value:String(n.value)});let{type:a}=n;a!==ut.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=ut.QUOTE_DOUBLE);const l=u=>{switch(u){case ut.BLOCK_FOLDED:case ut.BLOCK_LITERAL:return i||s?ha(o.value,e):Gu(o,e,t,r);case ut.QUOTE_DOUBLE:return Zl(o.value,e);case ut.QUOTE_SINGLE:return Ip(o.value,e);case ut.PLAIN:return hP(o,e,t,r);default:return null}};let c=l(a);if(c===null){const{defaultKeyType:u,defaultStringType:f}=e.options,d=i&&u||f;if(c=l(d),c===null)throw new Error(`Unsupported default string type ${d}`)}return c}function Hw(n,e){const t=Object.assign({blockQuote:!0,commentString:fP,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,trueStr:"true",verifyAliasOrder:!0},n.schema.toStringOptions,e);let r;switch(t.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:n,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:r,options:t}}function pP(n,e){if(e.tag){const i=n.filter(s=>s.tag===e.tag);if(i.length>0)return i.find(s=>s.format===e.format)??i[0]}let t,r;if(rn(e)){r=e.value;let i=n.filter(s=>s.identify?.(r));if(i.length>1){const s=i.filter(o=>o.test);s.length>0&&(i=s)}t=i.find(s=>s.format===e.format)??i.find(s=>!s.format)}else r=e,t=n.find(i=>i.nodeClass&&r instanceof i.nodeClass);if(!t){const i=r?.constructor?.name??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${i} value`)}return t}function mP(n,e,{anchors:t,doc:r}){if(!r.directives)return"";const i=[],s=(rn(n)||gn(n))&&n.anchor;s&&Fw(s)&&(t.add(s),i.push(`&${s}`));const o=n.tag??(e.default?null:e.tag);return o&&i.push(r.directives.tagString(o)),i.join(" ")}function Da(n,e,t,r){if(pn(n))return n.toString(e,t,r);if(ro(n)){if(e.doc.directives)return n.toString(e);if(e.resolvedAliases?.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(n):e.resolvedAliases=new Set([n]),n=n.resolve(e.doc)}let i;const s=vn(n)?n:e.doc.createNode(n,{onTagObj:l=>i=l});i??(i=pP(e.doc.schema.tags,s));const o=mP(s,i,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);const a=typeof i.stringify=="function"?i.stringify(s,e,t,r):rn(s)?Ic(s,e,t,r):s.toString(e,t,r);return o?rn(s)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
36
- ${e.indent}${a}`:a}function gP({key:n,value:e},t,r,i){const{allNullValues:s,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:f}}=t;let d=vn(n)&&n.comment||null;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(gn(n)||!vn(n)&&typeof n=="object"){const S="With simple keys, collection cannot be used as a key value";throw new Error(S)}}let h=!f&&(!n||d&&e==null&&!t.inFlow||gn(n)||(rn(n)?n.type===ut.BLOCK_FOLDED||n.type===ut.BLOCK_LITERAL:typeof n=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!h&&(f||!s),indent:a+l});let g=!1,p=!1,O=Da(n,t,()=>g=!0,()=>p=!0);if(!h&&!t.inFlow&&O.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(t.inFlow){if(s||e==null)return g&&r&&r(),O===""?"?":h?`? ${O}`:O}else if(s&&!f||e==null&&h)return O=`? ${O}`,d&&!g?O+=yo(O,t.indent,c(d)):p&&i&&i(),O;g&&(d=null),h?(d&&(O+=yo(O,t.indent,c(d))),O=`? ${O}
37
- ${a}:`):(O=`${O}:`,d&&(O+=yo(O,t.indent,c(d))));let v,b,_;vn(e)?(v=!!e.spaceBefore,b=e.commentBefore,_=e.comment):(v=!1,b=null,_=null,e&&typeof e=="object"&&(e=o.createNode(e))),t.implicitKey=!1,!h&&!d&&rn(e)&&(t.indentAtStart=O.length+1),p=!1,!u&&l.length>=2&&!t.inFlow&&!h&&nl(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let A=!1;const y=Da(e,t,()=>A=!0,()=>p=!0);let w=" ";if(d||v||b){if(w=v?`
38
- `:"",b){const S=c(b);w+=`
39
- ${us(S,t.indent)}`}y===""&&!t.inFlow?w===`
40
- `&&_&&(w=`
41
-
42
- `):w+=`
43
- ${t.indent}`}else if(!h&&gn(e)){const S=y[0],C=y.indexOf(`
44
- `),x=C!==-1,k=t.inFlow??e.flow??e.items.length===0;if(x||!k){let E=!1;if(x&&(S==="&"||S==="!")){let T=y.indexOf(" ");S==="&"&&T!==-1&&T<C&&y[T+1]==="!"&&(T=y.indexOf(" ",T+1)),(T===-1||C<T)&&(E=!0)}E||(w=`
45
- ${t.indent}`)}}else(y===""||y[0]===`
46
- `)&&(w="");return O+=w+y,t.inFlow?A&&r&&r():_&&!A?O+=yo(O,t.indent,c(_)):p&&i&&i(),O}function Kw(n,e){(n==="debug"||n==="warn")&&console.warn(e)}const tu="<<",ps={identify:n=>n===tu||typeof n=="symbol"&&n.description===tu,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ut(Symbol(tu)),{addToJSMap:Jw}),stringify:()=>tu},OP=(n,e)=>(ps.identify(e)||rn(e)&&(!e.type||e.type===ut.PLAIN)&&ps.identify(e.value))&&n?.doc.schema.tags.some(t=>t.tag===ps.tag&&t.default);function Jw(n,e,t){if(t=n&&ro(t)?t.resolve(n.doc):t,nl(t))for(const r of t.items)ih(n,e,r);else if(Array.isArray(t))for(const r of t)ih(n,e,r);else ih(n,e,t)}function ih(n,e,t){const r=n&&ro(t)?t.resolve(n.doc):t;if(!tl(r))throw new Error("Merge sources must be maps or map aliases");const i=r.toJSON(null,n,Map);for(const[s,o]of i)e instanceof Map?e.has(s)||e.set(s,o):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function e_(n,e,{key:t,value:r}){if(vn(t)&&t.addToJSMap)t.addToJSMap(n,e,r);else if(OP(n,t))Jw(n,e,r);else{const i=ni(t,"",n);if(e instanceof Map)e.set(i,ni(r,i,n));else if(e instanceof Set)e.add(i);else{const s=vP(t,i,n),o=ni(r,s,n);s in e?Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[s]=o}}return e}function vP(n,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(vn(n)&&t?.doc){const r=Hw(t.doc,{});r.anchors=new Set;for(const s of t.anchors.keys())r.anchors.add(s.anchor);r.inFlow=!0,r.inStringifyKey=!0;const i=n.toString(r);if(!t.mapKeyWarned){let s=JSON.stringify(i);s.length>40&&(s=s.substring(0,36)+'..."'),Kw(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return i}return JSON.stringify(e)}function Xg(n,e,t){const r=rc(n,void 0,t),i=rc(e,void 0,t);return new er(r,i)}class er{constructor(e,t=null){Object.defineProperty(this,oi,{value:Nw}),this.key=e,this.value=t}clone(e){let{key:t,value:r}=this;return vn(t)&&(t=t.clone(e)),vn(r)&&(r=r.clone(e)),new er(t,r)}toJSON(e,t){const r=t?.mapAsMap?new Map:{};return e_(t,r,this)}toString(e,t,r){return e?.doc?gP(this,e,t,r):JSON.stringify(this)}}function t_(n,e,t){return(e.inFlow??n.flow?yP:bP)(n,e,t)}function bP({comment:n,items:e},t,{blockItemPrefix:r,flowChars:i,itemIndent:s,onChompKeep:o,onComment:a}){const{indent:l,options:{commentString:c}}=t,u=Object.assign({},t,{indent:s,type:null});let f=!1;const d=[];for(let g=0;g<e.length;++g){const p=e[g];let O=null;if(vn(p))!f&&p.spaceBefore&&d.push(""),bf(t,d,p.commentBefore,f),p.comment&&(O=p.comment);else if(pn(p)){const b=vn(p.key)?p.key:null;b&&(!f&&b.spaceBefore&&d.push(""),bf(t,d,b.commentBefore,f))}f=!1;let v=Da(p,u,()=>O=null,()=>f=!0);O&&(v+=yo(v,s,c(O))),f&&O&&(f=!1),d.push(r+v)}let h;if(d.length===0)h=i.start+i.end;else{h=d[0];for(let g=1;g<d.length;++g){const p=d[g];h+=p?`
47
- ${l}${p}`:`
48
- `}}return n?(h+=`
49
- `+us(c(n),l),a&&a()):f&&o&&o(),h}function yP({items:n},e,{flowChars:t,itemIndent:r}){const{indent:i,indentStep:s,flowCollectionPadding:o,options:{commentString:a}}=e;r+=s;const l=Object.assign({},e,{indent:r,inFlow:!0,type:null});let c=!1,u=0;const f=[];for(let g=0;g<n.length;++g){const p=n[g];let O=null;if(vn(p))p.spaceBefore&&f.push(""),bf(e,f,p.commentBefore,!1),p.comment&&(O=p.comment);else if(pn(p)){const b=vn(p.key)?p.key:null;b&&(b.spaceBefore&&f.push(""),bf(e,f,b.commentBefore,!1),b.comment&&(c=!0));const _=vn(p.value)?p.value:null;_?(_.comment&&(O=_.comment),_.commentBefore&&(c=!0)):p.value==null&&b?.comment&&(O=b.comment)}O&&(c=!0);let v=Da(p,l,()=>O=null);g<n.length-1&&(v+=","),O&&(v+=yo(v,r,a(O))),!c&&(f.length>u||v.includes(`
50
- `))&&(c=!0),f.push(v),u=f.length}const{start:d,end:h}=t;if(f.length===0)return d+h;if(!c){const g=f.reduce((p,O)=>p+O.length+2,2);c=e.options.lineWidth>0&&g>e.options.lineWidth}if(c){let g=d;for(const p of f)g+=p?`
51
- ${s}${i}${p}`:`
52
- `;return`${g}
53
- ${i}${h}`}else return`${d}${o}${f.join(" ")}${o}${h}`}function bf({indent:n,options:{commentString:e}},t,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){const s=us(e(r),n);t.push(s.trimStart())}}function wo(n,e){const t=rn(e)?e.value:e;for(const r of n)if(pn(r)&&(r.key===e||r.key===t||rn(r.key)&&r.key.value===t))return r}class Rr extends Uw{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Xs,e),this.items=[]}static from(e,t,r){const{keepUndefined:i,replacer:s}=r,o=new this(e),a=(l,c)=>{if(typeof s=="function")c=s.call(t,l,c);else if(Array.isArray(s)&&!s.includes(l))return;(c!==void 0||i)&&o.items.push(Xg(l,c,r))};if(t instanceof Map)for(const[l,c]of t)a(l,c);else if(t&&typeof t=="object")for(const l of Object.keys(t))a(l,t[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){let r;pn(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new er(e,e?.value):r=new er(e.key,e.value);const i=wo(this.items,r.key),s=this.schema?.sortMapEntries;if(i){if(!t)throw new Error(`Key ${r.key} already set`);rn(i.value)&&Yw(r.value)?i.value.value=r.value:i.value=r.value}else if(s){const o=this.items.findIndex(a=>s(r,a)<0);o===-1?this.items.push(r):this.items.splice(o,0,r)}else this.items.push(r)}delete(e){const t=wo(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){const i=wo(this.items,e)?.value;return(!t&&rn(i)?i.value:i)??void 0}has(e){return!!wo(this.items,e)}set(e,t){this.add(new er(e,t),!0)}toJSON(e,t,r){const i=r?new r:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(i);for(const s of this.items)e_(t,i,s);return i}toString(e,t,r){if(!e)return JSON.stringify(this);for(const i of this.items)if(!pn(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),t_(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}}const rl={collection:"map",default:!0,nodeClass:Rr,tag:"tag:yaml.org,2002:map",resolve(n,e){return tl(n)||e("Expected a mapping for this tag"),n},createNode:(n,e,t)=>Rr.from(n,e,t)};class Ys extends Uw{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(el,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=nu(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){const r=nu(e);if(typeof r!="number")return;const i=this.items[r];return!t&&rn(i)?i.value:i}has(e){const t=nu(e);return typeof t=="number"&&t<this.items.length}set(e,t){const r=nu(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);const i=this.items[r];rn(i)&&Yw(t)?i.value=t:this.items[r]=t}toJSON(e,t){const r=[];t?.onCreate&&t.onCreate(r);let i=0;for(const s of this.items)r.push(ni(s,String(i++),t));return r}toString(e,t,r){return e?t_(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:t}):JSON.stringify(this)}static from(e,t,r){const{replacer:i}=r,s=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let a of t){if(typeof i=="function"){const l=t instanceof Set?a:String(o++);a=i.call(t,l,a)}s.items.push(rc(a,void 0,r))}}return s}}function nu(n){let e=rn(n)?n.value:n;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const il={collection:"seq",default:!0,nodeClass:Ys,tag:"tag:yaml.org,2002:seq",resolve(n,e){return nl(n)||e("Expected a sequence for this tag"),n},createNode:(n,e,t)=>Ys.from(n,e,t)},Sd={identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify(n,e,t,r){return e=Object.assign({actualString:!0},e),Ic(n,e,t,r)}},Ad={identify:n=>n==null,createNode:()=>new ut(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ut(null),stringify:({source:n},e)=>typeof n=="string"&&Ad.test.test(n)?n:e.options.nullStr},Fg={identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:n=>new ut(n[0]==="t"||n[0]==="T"),stringify({source:n,value:e},t){if(n&&Fg.test.test(n)){const r=n[0]==="t"||n[0]==="T";if(e===r)return n}return e?t.options.trueStr:t.options.falseStr}};function Ai({format:n,minFractionDigits:e,tag:t,value:r}){if(typeof r=="bigint")return String(r);const i=typeof r=="number"?r:Number(r);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let s=Object.is(r,-0)?"-0":JSON.stringify(r);if(!n&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let o=s.indexOf(".");o<0&&(o=s.length,s+=".");let a=e-(s.length-o-1);for(;a-- >0;)s+="0"}return s}const n_={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Ai},r_={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n),stringify(n){const e=Number(n.value);return isFinite(e)?e.toExponential():Ai(n)}},i_={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(n){const e=new ut(parseFloat(n)),t=n.indexOf(".");return t!==-1&&n[n.length-1]==="0"&&(e.minFractionDigits=n.length-t-1),e},stringify:Ai},Cd=n=>typeof n=="bigint"||Number.isInteger(n),Vg=(n,e,t,{intAsBigInt:r})=>r?BigInt(n):parseInt(n.substring(e),t);function s_(n,e,t){const{value:r}=n;return Cd(r)&&r>=0?t+r.toString(e):Ai(n)}const o_={identify:n=>Cd(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(n,e,t)=>Vg(n,2,8,t),stringify:n=>s_(n,8,"0o")},a_={identify:Cd,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(n,e,t)=>Vg(n,0,10,t),stringify:Ai},l_={identify:n=>Cd(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(n,e,t)=>Vg(n,2,16,t),stringify:n=>s_(n,16,"0x")},wP=[rl,il,Sd,Ad,Fg,o_,a_,l_,n_,r_,i_];function sb(n){return typeof n=="bigint"||Number.isInteger(n)}const ru=({value:n})=>JSON.stringify(n),_P=[{identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify:ru},{identify:n=>n==null,createNode:()=>new ut(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:ru},{identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:n=>n==="true",stringify:ru},{identify:sb,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(n,e,{intAsBigInt:t})=>t?BigInt(n):parseInt(n,10),stringify:({value:n})=>sb(n)?n.toString():JSON.stringify(n)},{identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:n=>parseFloat(n),stringify:ru}],kP={default:!0,tag:"",test:/^/,resolve(n,e){return e(`Unresolved plain scalar ${JSON.stringify(n)}`),n}},xP=[rl,il].concat(_P,kP),Wg={identify:n=>n instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(n,e){if(typeof atob=="function"){const t=atob(n.replace(/[\n\r]/g,"")),r=new Uint8Array(t.length);for(let i=0;i<t.length;++i)r[i]=t.charCodeAt(i);return r}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),n},stringify({comment:n,type:e,value:t},r,i,s){if(!t)return"";const o=t;let a;if(typeof btoa=="function"){let l="";for(let c=0;c<o.length;++c)l+=String.fromCharCode(o[c]);a=btoa(l)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=ut.BLOCK_LITERAL),e!==ut.QUOTE_DOUBLE){const l=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),c=Math.ceil(a.length/l),u=new Array(c);for(let f=0,d=0;f<c;++f,d+=l)u[f]=a.substr(d,l);a=u.join(e===ut.BLOCK_LITERAL?`
54
- `:" ")}return Ic({comment:n,type:e,value:a},r,i,s)}};function c_(n,e){if(nl(n))for(let t=0;t<n.items.length;++t){let r=n.items[t];if(!pn(r)){if(tl(r)){r.items.length>1&&e("Each pair must have its own sequence indicator");const i=r.items[0]||new er(new ut(null));if(r.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${r.commentBefore}
55
- ${i.key.commentBefore}`:r.commentBefore),r.comment){const s=i.value??i.key;s.comment=s.comment?`${r.comment}
56
- ${s.comment}`:r.comment}r=i}n.items[t]=pn(r)?r:new er(r)}}else e("Expected a sequence for this tag");return n}function u_(n,e,t){const{replacer:r}=t,i=new Ys(n);i.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof r=="function"&&(o=r.call(e,String(s++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;i.items.push(Xg(a,l,t))}return i}const Yg={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:c_,createNode:u_};class wa extends Ys{constructor(){super(),this.add=Rr.prototype.add.bind(this),this.delete=Rr.prototype.delete.bind(this),this.get=Rr.prototype.get.bind(this),this.has=Rr.prototype.has.bind(this),this.set=Rr.prototype.set.bind(this),this.tag=wa.tag}toJSON(e,t){if(!t)return super.toJSON(e);const r=new Map;t?.onCreate&&t.onCreate(r);for(const i of this.items){let s,o;if(pn(i)?(s=ni(i.key,"",t),o=ni(i.value,s,t)):s=ni(i,"",t),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,o)}return r}static from(e,t,r){const i=u_(e,t,r),s=new this;return s.items=i.items,s}}wa.tag="tag:yaml.org,2002:omap";const Ug={collection:"seq",identify:n=>n instanceof Map,nodeClass:wa,default:!1,tag:"tag:yaml.org,2002:omap",resolve(n,e){const t=c_(n,e),r=[];for(const{key:i}of t.items)rn(i)&&(r.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):r.push(i.value));return Object.assign(new wa,t)},createNode:(n,e,t)=>wa.from(n,e,t)};function f_({value:n,source:e},t){return e&&(n?d_:h_).test.test(e)?e:n?t.options.trueStr:t.options.falseStr}const d_={identify:n=>n===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ut(!0),stringify:f_},h_={identify:n=>n===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ut(!1),stringify:f_},SP={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Ai},AP={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n.replace(/_/g,"")),stringify(n){const e=Number(n.value);return isFinite(e)?e.toExponential():Ai(n)}},CP={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(n){const e=new ut(parseFloat(n.replace(/_/g,""))),t=n.indexOf(".");if(t!==-1){const r=n.substring(t+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:Ai},Nc=n=>typeof n=="bigint"||Number.isInteger(n);function Td(n,e,t,{intAsBigInt:r}){const i=n[0];if((i==="-"||i==="+")&&(e+=1),n=n.substring(e).replace(/_/g,""),r){switch(t){case 2:n=`0b${n}`;break;case 8:n=`0o${n}`;break;case 16:n=`0x${n}`;break}const o=BigInt(n);return i==="-"?BigInt(-1)*o:o}const s=parseInt(n,t);return i==="-"?-1*s:s}function Gg(n,e,t){const{value:r}=n;if(Nc(r)){const i=r.toString(e);return r<0?"-"+t+i.substr(1):t+i}return Ai(n)}const TP={identify:Nc,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(n,e,t)=>Td(n,2,2,t),stringify:n=>Gg(n,2,"0b")},PP={identify:Nc,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(n,e,t)=>Td(n,1,8,t),stringify:n=>Gg(n,8,"0")},EP={identify:Nc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(n,e,t)=>Td(n,0,10,t),stringify:Ai},$P={identify:Nc,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(n,e,t)=>Td(n,2,16,t),stringify:n=>Gg(n,16,"0x")};class _a extends Rr{constructor(e){super(e),this.tag=_a.tag}add(e){let t;pn(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new er(e.key,null):t=new er(e,null),wo(this.items,t.key)||this.items.push(t)}get(e,t){const r=wo(this.items,e);return!t&&pn(r)?rn(r.key)?r.key.value:r.key:r}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const r=wo(this.items,e);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new er(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);throw new Error("Set items must all have null values")}static from(e,t,r){const{replacer:i}=r,s=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof i=="function"&&(o=i.call(t,o,o)),s.items.push(Xg(o,null,r));return s}}_a.tag="tag:yaml.org,2002:set";const Hg={collection:"map",identify:n=>n instanceof Set,nodeClass:_a,default:!1,tag:"tag:yaml.org,2002:set",createNode:(n,e,t)=>_a.from(n,e,t),resolve(n,e){if(tl(n)){if(n.hasAllNullValues(!0))return Object.assign(new _a,n);e("Set items must all have null values")}else e("Expected a mapping for this tag");return n}};function Kg(n,e){const t=n[0],r=t==="-"||t==="+"?n.substring(1):n,i=o=>e?BigInt(o):Number(o),s=r.replace(/_/g,"").split(":").reduce((o,a)=>o*i(60)+i(a),i(0));return t==="-"?i(-1)*s:s}function p_(n){let{value:e}=n,t=o=>o;if(typeof e=="bigint")t=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return Ai(n);let r="";e<0&&(r="-",e*=t(-1));const i=t(60),s=[e%i];return e<60?s.unshift(0):(e=(e-s[0])/i,s.unshift(e%i),e>=60&&(e=(e-s[0])/i,s.unshift(e))),r+s.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const m_={identify:n=>typeof n=="bigint"||Number.isInteger(n),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(n,e,{intAsBigInt:t})=>Kg(n,t),stringify:p_},g_={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:n=>Kg(n,!1),stringify:p_},Pd={identify:n=>n 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(n){const e=n.match(Pd.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,t,r,i,s,o,a]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0;let c=Date.UTC(t,r-1,i,s||0,o||0,a||0,l);const u=e[8];if(u&&u!=="Z"){let f=Kg(u,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:n})=>n?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},ob=[rl,il,Sd,Ad,d_,h_,TP,PP,EP,$P,SP,AP,CP,Wg,ps,Ug,Yg,Hg,m_,g_,Pd],ab=new Map([["core",wP],["failsafe",[rl,il,Sd]],["json",xP],["yaml11",ob],["yaml-1.1",ob]]),lb={binary:Wg,bool:Fg,float:i_,floatExp:r_,floatNaN:n_,floatTime:g_,int:a_,intHex:l_,intOct:o_,intTime:m_,map:rl,merge:ps,null:Ad,omap:Ug,pairs:Yg,seq:il,set:Hg,timestamp:Pd},QP={"tag:yaml.org,2002:binary":Wg,"tag:yaml.org,2002:merge":ps,"tag:yaml.org,2002:omap":Ug,"tag:yaml.org,2002:pairs":Yg,"tag:yaml.org,2002:set":Hg,"tag:yaml.org,2002:timestamp":Pd};function sh(n,e,t){const r=ab.get(e);if(r&&!n)return t&&!r.includes(ps)?r.concat(ps):r.slice();let i=r;if(!i)if(Array.isArray(n))i=[];else{const s=Array.from(ab.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(n))for(const s of n)i=i.concat(s);else typeof n=="function"&&(i=n(i.slice()));return t&&(i=i.concat(ps)),i.reduce((s,o)=>{const a=typeof o=="string"?lb[o]:o;if(!a){const l=JSON.stringify(o),c=Object.keys(lb).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return s.includes(a)||s.push(a),s},[])}const LP=(n,e)=>n.key<e.key?-1:n.key>e.key?1:0;let O_=class v_{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:i,schema:s,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?sh(e,"compat"):e?sh(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=i?QP:{},this.tags=sh(t,this.name,r),this.toStringOptions=a??null,Object.defineProperty(this,Xs,{value:rl}),Object.defineProperty(this,Ui,{value:Sd}),Object.defineProperty(this,el,{value:il}),this.sortMapEntries=typeof o=="function"?o:o===!0?LP:null}clone(){const e=Object.create(v_.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};function MP(n,e){const t=[];let r=e.directives===!0;if(e.directives!==!1&&n.directives){const l=n.directives.toString(n);l?(t.push(l),r=!0):n.directives.docStart&&(r=!0)}r&&t.push("---");const i=Hw(n,e),{commentString:s}=i.options;if(n.commentBefore){t.length!==1&&t.unshift("");const l=s(n.commentBefore);t.unshift(us(l,""))}let o=!1,a=null;if(n.contents){if(vn(n.contents)){if(n.contents.spaceBefore&&r&&t.push(""),n.contents.commentBefore){const u=s(n.contents.commentBefore);t.push(us(u,""))}i.forceBlockIndent=!!n.comment,a=n.contents.comment}const l=a?void 0:()=>o=!0;let c=Da(n.contents,i,()=>a=null,l);a&&(c+=yo(c,"",s(a))),(c[0]==="|"||c[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${c}`:t.push(c)}else t.push(Da(n.contents,i));if(n.directives?.docEnd)if(n.comment){const l=s(n.comment);l.includes(`
57
- `)?(t.push("..."),t.push(us(l,""))):t.push(`... ${l}`)}else t.push("...");else{let l=n.comment;l&&o&&(l=l.replace(/^\n+/,"")),l&&((!o||a)&&t[t.length-1]!==""&&t.push(""),t.push(us(s(l),"")))}return t.join(`
58
- `)+`
59
- `}class sl{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,oi,{value:qp});let i=null;typeof t=="function"||Array.isArray(t)?i=t:r===void 0&&t&&(r=t,t=void 0);const s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=s;let{version:o}=s;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new ir({version:o}),this.setSchema(o,r),this.contents=e===void 0?null:this.createNode(e,i,r)}clone(){const e=Object.create(sl.prototype,{[oi]:{value:qp}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=vn(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){Ho(this.contents)&&this.contents.add(e)}addIn(e,t){Ho(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const r=Vw(this);e.anchor=!t||r.has(t)?Ww(t||"a",r):t}return new wd(e.anchor)}createNode(e,t,r){let i;if(typeof t=="function")e=t.call({"":e},"",e),i=t;else if(Array.isArray(t)){const O=b=>typeof b=="number"||b instanceof String||b instanceof Number,v=t.filter(O).map(String);v.length>0&&(t=t.concat(v)),i=t}else r===void 0&&t&&(r=t,t=void 0);const{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:u}=r??{},{onAnchor:f,setAnchors:d,sourceObjects:h}=lP(this,o||"a"),g={aliasDuplicateObjects:s??!0,keepUndefined:l??!1,onAnchor:f,onTagObj:c,replacer:i,schema:this.schema,sourceObjects:h},p=rc(e,u,g);return a&&gn(p)&&(p.flow=!0),d(),p}createPair(e,t,r={}){const i=this.createNode(e,null,r),s=this.createNode(t,null,r);return new er(i,s)}delete(e){return Ho(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ll(e)?this.contents==null?!1:(this.contents=null,!0):Ho(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return gn(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Ll(e)?!t&&rn(this.contents)?this.contents.value:this.contents:gn(this.contents)?this.contents.getIn(e,t):void 0}has(e){return gn(this.contents)?this.contents.has(e):!1}hasIn(e){return Ll(e)?this.contents!==void 0:gn(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=vf(this.schema,[e],t):Ho(this.contents)&&this.contents.set(e,t)}setIn(e,t){Ll(e)?this.contents=t:this.contents==null?this.contents=vf(this.schema,Array.from(e),t):Ho(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new ir({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new ir({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(r)this.schema=new O_(Object.assign(r,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:i,onAnchor:s,reviver:o}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},l=ni(this.contents,t??"",a);if(typeof s=="function")for(const{count:c,res:u}of a.anchors.values())s(u,c);return typeof o=="function"?da(o,{"":l},"",l):l}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return MP(this,e)}}function Ho(n){if(gn(n))return!0;throw new Error("Expected a YAML collection as document contents")}class Jg extends Error{constructor(e,t,r,i){super(),this.name=e,this.code=r,this.message=i,this.pos=t}}class _o extends Jg{constructor(e,t,r){super("YAMLParseError",e,t,r)}}class b_ extends Jg{constructor(e,t,r){super("YAMLWarning",e,t,r)}}const yf=(n,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(a=>e.linePos(a));const{line:r,col:i}=t.linePos[0];t.message+=` at line ${r}, column ${i}`;let s=i-1,o=n.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(s>=60&&o.length>80){const a=Math.min(s-39,o.length-79);o="…"+o.substring(a),s-=a-1}if(o.length>80&&(o=o.substring(0,79)+"…"),r>1&&/^ *$/.test(o.substring(0,s))){let a=n.substring(e.lineStarts[r-2],e.lineStarts[r-1]);a.length>80&&(a=a.substring(0,79)+`…
60
- `),o=a+o}if(/[^ ]/.test(o)){let a=1;const l=t.linePos[1];l?.line===r&&l.col>i&&(a=Math.max(1,Math.min(l.col-i,80-s)));const c=" ".repeat(s)+"^".repeat(a);t.message+=`:
61
-
62
- ${o}
63
- ${c}
64
- `}};function qa(n,{flow:e,indicator:t,next:r,offset:i,onError:s,parentIndent:o,startOnNewline:a}){let l=!1,c=a,u=a,f="",d="",h=!1,g=!1,p=null,O=null,v=null,b=null,_=null,A=null,y=null;for(const C of n)switch(g&&(C.type!=="space"&&C.type!=="newline"&&C.type!=="comma"&&s(C.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),p&&(c&&C.type!=="comment"&&C.type!=="newline"&&s(p,"TAB_AS_INDENT","Tabs are not allowed as indentation"),p=null),C.type){case"space":!e&&(t!=="doc-start"||r?.type!=="flow-collection")&&C.source.includes(" ")&&(p=C),u=!0;break;case"comment":{u||s(C,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const x=C.source.substring(1)||" ";f?f+=d+x:f=x,d="",c=!1;break}case"newline":c?f?f+=C.source:(!A||t!=="seq-item-ind")&&(l=!0):d+=C.source,c=!0,h=!0,(O||v)&&(b=C),u=!0;break;case"anchor":O&&s(C,"MULTIPLE_ANCHORS","A node can have at most one anchor"),C.source.endsWith(":")&&s(C.offset+C.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),O=C,y??(y=C.offset),c=!1,u=!1,g=!0;break;case"tag":{v&&s(C,"MULTIPLE_TAGS","A node can have at most one tag"),v=C,y??(y=C.offset),c=!1,u=!1,g=!0;break}case t:(O||v)&&s(C,"BAD_PROP_ORDER",`Anchors and tags must be after the ${C.source} indicator`),A&&s(C,"UNEXPECTED_TOKEN",`Unexpected ${C.source} in ${e??"collection"}`),A=C,c=t==="seq-item-ind"||t==="explicit-key-ind",u=!1;break;case"comma":if(e){_&&s(C,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),_=C,c=!1,u=!1;break}default:s(C,"UNEXPECTED_TOKEN",`Unexpected ${C.type} token`),c=!1,u=!1}const w=n[n.length-1],S=w?w.offset+w.source.length:i;return g&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&s(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),p&&(c&&p.indent<=o||r?.type==="block-map"||r?.type==="block-seq")&&s(p,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:_,found:A,spaceBefore:l,comment:f,hasNewline:h,anchor:O,tag:v,newlineAfterProp:b,end:S,start:y??S}}function ic(n){if(!n)return null;switch(n.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(n.source.includes(`
65
- `))return!0;if(n.end){for(const e of n.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of n.items){for(const t of e.start)if(t.type==="newline")return!0;if(e.sep){for(const t of e.sep)if(t.type==="newline")return!0}if(ic(e.key)||ic(e.value))return!0}return!1;default:return!0}}function Bp(n,e,t){if(e?.type==="flow-collection"){const r=e.end[0];r.indent===n&&(r.source==="]"||r.source==="}")&&ic(e)&&t(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function y_(n,e,t){const{uniqueKeys:r}=n.options;if(r===!1)return!1;const i=typeof r=="function"?r:(s,o)=>s===o||rn(s)&&rn(o)&&s.value===o.value;return e.some(s=>i(s.key,t))}const cb="All mapping items must start at the same column";function DP({composeNode:n,composeEmptyNode:e},t,r,i,s){const o=s?.nodeClass??Rr,a=new o(t.schema);t.atRoot&&(t.atRoot=!1);let l=r.offset,c=null;for(const u of r.items){const{start:f,key:d,sep:h,value:g}=u,p=qa(f,{indicator:"explicit-key-ind",next:d??h?.[0],offset:l,onError:i,parentIndent:r.indent,startOnNewline:!0}),O=!p.found;if(O){if(d&&(d.type==="block-seq"?i(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==r.indent&&i(l,"BAD_INDENT",cb)),!p.anchor&&!p.tag&&!h){c=p.end,p.comment&&(a.comment?a.comment+=`
66
- `+p.comment:a.comment=p.comment);continue}(p.newlineAfterProp||ic(d))&&i(d??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else p.found?.indent!==r.indent&&i(l,"BAD_INDENT",cb);t.atKey=!0;const v=p.end,b=d?n(t,d,p,i):e(t,v,f,null,p,i);t.schema.compat&&Bp(r.indent,d,i),t.atKey=!1,y_(t,a.items,b)&&i(v,"DUPLICATE_KEY","Map keys must be unique");const _=qa(h??[],{indicator:"map-value-ind",next:g,offset:b.range[2],onError:i,parentIndent:r.indent,startOnNewline:!d||d.type==="block-scalar"});if(l=_.end,_.found){O&&(g?.type==="block-map"&&!_.hasNewline&&i(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&p.start<_.found.offset-1024&&i(b.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const A=g?n(t,g,_,i):e(t,l,h,null,_,i);t.schema.compat&&Bp(r.indent,g,i),l=A.range[2];const y=new er(b,A);t.options.keepSourceTokens&&(y.srcToken=u),a.items.push(y)}else{O&&i(b.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),_.comment&&(b.comment?b.comment+=`
67
- `+_.comment:b.comment=_.comment);const A=new er(b);t.options.keepSourceTokens&&(A.srcToken=u),a.items.push(A)}}return c&&c<l&&i(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[r.offset,l,c??l],a}function qP({composeNode:n,composeEmptyNode:e},t,r,i,s){const o=s?.nodeClass??Ys,a=new o(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let l=r.offset,c=null;for(const{start:u,value:f}of r.items){const d=qa(u,{indicator:"seq-item-ind",next:f,offset:l,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||f)f?.type==="block-seq"?i(d.end,"BAD_INDENT","All sequence items must start at the same column"):i(l,"MISSING_CHAR","Sequence item without - indicator");else{c=d.end,d.comment&&(a.comment=d.comment);continue}const h=f?n(t,f,d,i):e(t,d.end,u,null,d,i);t.schema.compat&&Bp(r.indent,f,i),l=h.range[2],a.items.push(h)}return a.range=[r.offset,l,c??l],a}function Bc(n,e,t,r){let i="";if(n){let s=!1,o="";for(const a of n){const{source:l,type:c}=a;switch(c){case"space":s=!0;break;case"comment":{t&&!s&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const u=l.substring(1)||" ";i?i+=o+u:i=u,o="";break}case"newline":i&&(o+=l),s=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:i,offset:e}}const oh="Block collections are not allowed within flow collections",ah=n=>n&&(n.type==="block-map"||n.type==="block-seq");function RP({composeNode:n,composeEmptyNode:e},t,r,i,s){const o=r.start.source==="{",a=o?"flow map":"flow sequence",l=s?.nodeClass??(o?Rr:Ys),c=new l(t.schema);c.flow=!0;const u=t.atRoot;u&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let f=r.offset+r.start.source.length;for(let O=0;O<r.items.length;++O){const v=r.items[O],{start:b,key:_,sep:A,value:y}=v,w=qa(b,{flow:a,indicator:"explicit-key-ind",next:_??A?.[0],offset:f,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!w.found){if(!w.anchor&&!w.tag&&!A&&!y){O===0&&w.comma?i(w.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):O<r.items.length-1&&i(w.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),w.comment&&(c.comment?c.comment+=`
68
- `+w.comment:c.comment=w.comment),f=w.end;continue}!o&&t.options.strict&&ic(_)&&i(_,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(O===0)w.comma&&i(w.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(w.comma||i(w.start,"MISSING_CHAR",`Missing , between ${a} items`),w.comment){let S="";e:for(const C of b)switch(C.type){case"comma":case"space":break;case"comment":S=C.source.substring(1);break e;default:break e}if(S){let C=c.items[c.items.length-1];pn(C)&&(C=C.value??C.key),C.comment?C.comment+=`
69
- `+S:C.comment=S,w.comment=w.comment.substring(S.length+1)}}if(!o&&!A&&!w.found){const S=y?n(t,y,w,i):e(t,w.end,A,null,w,i);c.items.push(S),f=S.range[2],ah(y)&&i(S.range,"BLOCK_IN_FLOW",oh)}else{t.atKey=!0;const S=w.end,C=_?n(t,_,w,i):e(t,S,b,null,w,i);ah(_)&&i(C.range,"BLOCK_IN_FLOW",oh),t.atKey=!1;const x=qa(A??[],{flow:a,indicator:"map-value-ind",next:y,offset:C.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(x.found){if(!o&&!w.found&&t.options.strict){if(A)for(const T of A){if(T===x.found)break;if(T.type==="newline"){i(T,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}w.start<x.found.offset-1024&&i(x.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else y&&("source"in y&&y.source?.[0]===":"?i(y,"MISSING_CHAR",`Missing space after : in ${a}`):i(x.start,"MISSING_CHAR",`Missing , or : between ${a} items`));const k=y?n(t,y,x,i):x.found?e(t,x.end,A,null,x,i):null;k?ah(y)&&i(k.range,"BLOCK_IN_FLOW",oh):x.comment&&(C.comment?C.comment+=`
70
- `+x.comment:C.comment=x.comment);const E=new er(C,k);if(t.options.keepSourceTokens&&(E.srcToken=v),o){const T=c;y_(t,T.items,C)&&i(S,"DUPLICATE_KEY","Map keys must be unique"),T.items.push(E)}else{const T=new Rr(t.schema);T.flow=!0,T.items.push(E);const $=(k??C).range;T.range=[C.range[0],$[1],$[2]],c.items.push(T)}f=k?k.range[2]:x.end}}const d=o?"}":"]",[h,...g]=r.end;let p=f;if(h?.source===d)p=h.offset+h.source.length;else{const O=a[0].toUpperCase()+a.substring(1),v=u?`${O} must end with a ${d}`:`${O} in block collection must be sufficiently indented and end with a ${d}`;i(f,u?"MISSING_CHAR":"BAD_INDENT",v),h&&h.source.length!==1&&g.unshift(h)}if(g.length>0){const O=Bc(g,p,t.options.strict,i);O.comment&&(c.comment?c.comment+=`
71
- `+O.comment:c.comment=O.comment),c.range=[r.offset,p,O.offset]}else c.range=[r.offset,p,p];return c}function lh(n,e,t,r,i,s){const o=t.type==="block-map"?DP(n,e,t,r,s):t.type==="block-seq"?qP(n,e,t,r,s):RP(n,e,t,r,s),a=o.constructor;return i==="!"||i===a.tagName?(o.tag=a.tagName,o):(i&&(o.tag=i),o)}function IP(n,e,t,r,i){const s=r.tag,o=s?e.directives.tagName(s.source,d=>i(s,"TAG_RESOLVE_FAILED",d)):null;if(t.type==="block-seq"){const{anchor:d,newlineAfterProp:h}=r,g=d&&s?d.offset>s.offset?d:s:d??s;g&&(!h||h.offset<g.offset)&&i(g,"MISSING_CHAR","Missing newline after block sequence props")}const a=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!s||!o||o==="!"||o===Rr.tagName&&a==="map"||o===Ys.tagName&&a==="seq")return lh(n,e,t,i,o);let l=e.schema.tags.find(d=>d.tag===o&&d.collection===a);if(!l){const d=e.schema.knownTags[o];if(d?.collection===a)e.schema.tags.push(Object.assign({},d,{default:!1})),l=d;else return d?i(s,"BAD_COLLECTION_TYPE",`${d.tag} used for ${a} collection, but expects ${d.collection??"scalar"}`,!0):i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),lh(n,e,t,i,o)}const c=lh(n,e,t,i,o,l),u=l.resolve?.(c,d=>i(s,"TAG_RESOLVE_FAILED",d),e.options)??c,f=vn(u)?u:new ut(u);return f.range=c.range,f.tag=o,l?.format&&(f.format=l.format),f}function w_(n,e,t){const r=e.offset,i=NP(e,n.options.strict,t);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};const s=i.mode===">"?ut.BLOCK_FOLDED:ut.BLOCK_LITERAL,o=e.source?BP(e.source):[];let a=o.length;for(let p=o.length-1;p>=0;--p){const O=o[p][1];if(O===""||O==="\r")a=p;else break}if(a===0){const p=i.chomp==="+"&&o.length>0?`
72
- `.repeat(Math.max(1,o.length-1)):"";let O=r+i.length;return e.source&&(O+=e.source.length),{value:p,type:s,comment:i.comment,range:[r,O,O]}}let l=e.indent+i.indent,c=e.offset+i.length,u=0;for(let p=0;p<a;++p){const[O,v]=o[p];if(v===""||v==="\r")i.indent===0&&O.length>l&&(l=O.length);else{O.length<l&&t(c+O.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(l=O.length),u=p,l===0&&!n.atRoot&&t(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=O.length+v.length+1}for(let p=o.length-1;p>=a;--p)o[p][0].length>l&&(a=p+1);let f="",d="",h=!1;for(let p=0;p<u;++p)f+=o[p][0].slice(l)+`
73
- `;for(let p=u;p<a;++p){let[O,v]=o[p];c+=O.length+v.length+1;const b=v[v.length-1]==="\r";if(b&&(v=v.slice(0,-1)),v&&O.length<l){const A=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;t(c-v.length-(b?2:1),"BAD_INDENT",A),O=""}s===ut.BLOCK_LITERAL?(f+=d+O.slice(l)+v,d=`
74
- `):O.length>l||v[0]===" "?(d===" "?d=`
75
- `:!h&&d===`
76
- `&&(d=`
77
-
78
- `),f+=d+O.slice(l)+v,d=`
79
- `,h=!0):v===""?d===`
80
- `?f+=`
81
- `:d=`
82
- `:(f+=d+v,d=" ",h=!1)}switch(i.chomp){case"-":break;case"+":for(let p=a;p<o.length;++p)f+=`
83
- `+o[p][0].slice(l);f[f.length-1]!==`
84
- `&&(f+=`
85
- `);break;default:f+=`
86
- `}const g=r+i.length+e.source.length;return{value:f,type:s,comment:i.comment,range:[r,g,g]}}function NP({offset:n,props:e},t,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:i}=e[0],s=i[0];let o=0,a="",l=-1;for(let d=1;d<i.length;++d){const h=i[d];if(!a&&(h==="-"||h==="+"))a=h;else{const g=Number(h);!o&&g?o=g:l===-1&&(l=n+d)}}l!==-1&&r(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,u="",f=i.length;for(let d=1;d<e.length;++d){const h=e[d];switch(h.type){case"space":c=!0;case"newline":f+=h.source.length;break;case"comment":t&&!c&&r(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=h.source.length,u=h.source.substring(1);break;case"error":r(h,"UNEXPECTED_TOKEN",h.message),f+=h.source.length;break;default:{const g=`Unexpected token in block scalar header: ${h.type}`;r(h,"UNEXPECTED_TOKEN",g);const p=h.source;p&&typeof p=="string"&&(f+=p.length)}}}return{mode:s,indent:o,chomp:a,comment:u,length:f}}function BP(n){const e=n.split(/\n( *)/),t=e[0],r=t.match(/^( *)/),s=[r?.[1]?[r[1],t.slice(r[1].length)]:["",t]];for(let o=1;o<e.length;o+=2)s.push([e[o],e[o+1]]);return s}function __(n,e,t){const{offset:r,type:i,source:s,end:o}=n;let a,l;const c=(d,h,g)=>t(r+d,h,g);switch(i){case"scalar":a=ut.PLAIN,l=jP(s,c);break;case"single-quoted-scalar":a=ut.QUOTE_SINGLE,l=zP(s,c);break;case"double-quoted-scalar":a=ut.QUOTE_DOUBLE,l=ZP(s,c);break;default:return t(n,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[r,r+s.length,r+s.length]}}const u=r+s.length,f=Bc(o,u,e,t);return{value:l,type:a,comment:f.comment,range:[r,u,f.offset]}}function jP(n,e){let t="";switch(n[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${n[0]}`;break}case"@":case"`":{t=`reserved character ${n[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),k_(n)}function zP(n,e){return(n[n.length-1]!=="'"||n.length===1)&&e(n.length,"MISSING_CHAR","Missing closing 'quote"),k_(n.slice(1,-1)).replace(/''/g,"'")}function k_(n){let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
87
- `,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
88
- `,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=e.exec(n);if(!r)return n;let i=r[1],s=" ",o=e.lastIndex;for(t.lastIndex=o;r=t.exec(n);)r[1]===""?s===`
89
- `?i+=s:s=`
90
- `:(i+=s+r[1],s=" "),o=t.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=o,r=a.exec(n),i+s+(r?.[1]??"")}function ZP(n,e){let t="";for(let r=1;r<n.length-1;++r){const i=n[r];if(!(i==="\r"&&n[r+1]===`
91
- `))if(i===`
92
- `){const{fold:s,offset:o}=XP(n,r);t+=s,r=o}else if(i==="\\"){let s=n[++r];const o=FP[s];if(o)t+=o;else if(s===`
93
- `)for(s=n[r+1];s===" "||s===" ";)s=n[++r+1];else if(s==="\r"&&n[r+1]===`
94
- `)for(s=n[++r+1];s===" "||s===" ";)s=n[++r+1];else if(s==="x"||s==="u"||s==="U"){const a={x:2,u:4,U:8}[s];t+=VP(n,r+1,a,e),r+=a}else{const a=n.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),t+=a}}else if(i===" "||i===" "){const s=r;let o=n[r+1];for(;o===" "||o===" ";)o=n[++r+1];o!==`
95
- `&&!(o==="\r"&&n[r+2]===`
96
- `)&&(t+=r>s?n.slice(s,r+1):i)}else t+=i}return(n[n.length-1]!=='"'||n.length===1)&&e(n.length,"MISSING_CHAR",'Missing closing "quote'),t}function XP(n,e){let t="",r=n[e+1];for(;(r===" "||r===" "||r===`
97
- `||r==="\r")&&!(r==="\r"&&n[e+2]!==`
98
- `);)r===`
99
- `&&(t+=`
100
- `),e+=1,r=n[e+1];return t||(t=" "),{fold:t,offset:e}}const FP={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
101
- `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function VP(n,e,t,r){const i=n.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){const a=n.substr(e-2,t+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}function x_(n,e,t,r){const{value:i,type:s,comment:o,range:a}=e.type==="block-scalar"?w_(n,e,r):__(e,n.options.strict,r),l=t?n.directives.tagName(t.source,f=>r(t,"TAG_RESOLVE_FAILED",f)):null;let c;n.options.stringKeys&&n.atKey?c=n.schema[Ui]:l?c=WP(n.schema,i,l,t,r):e.type==="scalar"?c=YP(n,i,e,r):c=n.schema[Ui];let u;try{const f=c.resolve(i,d=>r(t??e,"TAG_RESOLVE_FAILED",d),n.options);u=rn(f)?f:new ut(f)}catch(f){const d=f instanceof Error?f.message:String(f);r(t??e,"TAG_RESOLVE_FAILED",d),u=new ut(i)}return u.range=a,u.source=i,s&&(u.type=s),l&&(u.tag=l),c.format&&(u.format=c.format),o&&(u.comment=o),u}function WP(n,e,t,r,i){if(t==="!")return n[Ui];const s=[];for(const a of n.tags)if(!a.collection&&a.tag===t)if(a.default&&a.test)s.push(a);else return a;for(const a of s)if(a.test?.test(e))return a;const o=n.knownTags[t];return o&&!o.collection?(n.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),n[Ui])}function YP({atKey:n,directives:e,schema:t},r,i,s){const o=t.tags.find(a=>(a.default===!0||n&&a.default==="key")&&a.test?.test(r))||t[Ui];if(t.compat){const a=t.compat.find(l=>l.default&&l.test?.test(r))??t[Ui];if(o.tag!==a.tag){const l=e.tagString(o.tag),c=e.tagString(a.tag),u=`Value may be parsed as either ${l} or ${c}`;s(i,"TAG_RESOLVE_FAILED",u,!0)}}return o}function UP(n,e,t){if(e){t??(t=e.length);for(let r=t-1;r>=0;--r){let i=e[r];switch(i.type){case"space":case"comment":case"newline":n-=i.source.length;continue}for(i=e[++r];i?.type==="space";)n+=i.source.length,i=e[++r];break}}return n}const GP={composeNode:S_,composeEmptyNode:eO};function S_(n,e,t,r){const i=n.atKey,{spaceBefore:s,comment:o,anchor:a,tag:l}=t;let c,u=!0;switch(e.type){case"alias":c=HP(n,e,r),(a||l)&&r(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=x_(n,e,l,r),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=IP(GP,n,e,t,r),a&&(c.anchor=a.source.substring(1));break;default:{const f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",f),c=eO(n,e.offset,void 0,null,t,r),u=!1}}return a&&c.anchor===""&&r(a,"BAD_ALIAS","Anchor cannot be an empty string"),i&&n.options.stringKeys&&(!rn(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&r(l??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),n.options.keepSourceTokens&&u&&(c.srcToken=e),c}function eO(n,e,t,r,{spaceBefore:i,comment:s,anchor:o,tag:a,end:l},c){const u={type:"scalar",offset:UP(e,t,r),indent:-1,source:""},f=x_(n,u,a,c);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(f.spaceBefore=!0),s&&(f.comment=s,f.range[2]=l),f}function HP({options:n},{offset:e,source:t,end:r},i){const s=new wd(t.substring(1));s.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&i(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const o=e+t.length,a=Bc(r,o,n.strict,i);return s.range=[e,o,a.offset],a.comment&&(s.comment=a.comment),s}function KP(n,e,{offset:t,start:r,value:i,end:s},o){const a=Object.assign({_directives:e},n),l=new sl(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=qa(r,{indicator:"doc-start",next:i??s?.[0],offset:t,onError:o,parentIndent:0,startOnNewline:!0});u.found&&(l.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!u.hasNewline&&o(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=i?S_(c,i,u,o):eO(c,u.end,r,null,u,o);const f=l.contents.range[2],d=Bc(s,f,!1,o);return d.comment&&(l.comment=d.comment),l.range=[t,f,d.offset],l}function pl(n){if(typeof n=="number")return[n,n+1];if(Array.isArray(n))return n.length===2?n:[n[0],n[1]];const{offset:e,source:t}=n;return[e,e+(typeof t=="string"?t.length:1)]}function ub(n){let e="",t=!1,r=!1;for(let i=0;i<n.length;++i){const s=n[i];switch(s[0]){case"#":e+=(e===""?"":r?`
102
-
103
- `:`
104
- `)+(s.substring(1)||" "),t=!0,r=!1;break;case"%":n[i+1]?.[0]!=="#"&&(i+=1),t=!1;break;default:t||(r=!0),t=!1}}return{comment:e,afterEmptyLine:r}}class tO{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,r,i,s)=>{const o=pl(t);s?this.warnings.push(new b_(o,r,i)):this.errors.push(new _o(o,r,i))},this.directives=new ir({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:r,afterEmptyLine:i}=ub(this.prelude);if(r){const s=e.contents;if(t)e.comment=e.comment?`${e.comment}
105
- ${r}`:r;else if(i||e.directives.docStart||!s)e.commentBefore=r;else if(gn(s)&&!s.flow&&s.items.length>0){let o=s.items[0];pn(o)&&(o=o.key);const a=o.commentBefore;o.commentBefore=a?`${r}
106
- ${a}`:r}else{const o=s.commentBefore;s.commentBefore=o?`${r}
107
- ${o}`:r}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:ub(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,r=-1){for(const i of e)yield*this.next(i);yield*this.end(t,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,r,i)=>{const s=pl(e);s[0]+=t,this.onError(s,"BAD_DIRECTIVE",r,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=KP(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new _o(pl(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new _o(pl(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const t=Bc(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
108
- ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new _o(pl(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const r=Object.assign({_directives:this.directives},this.options),i=new sl(void 0,r);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,t,t],this.decorate(i,!1),yield i}}}function JP(n,e=!0,t){if(n){const r=(i,s,o)=>{const a=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(t)t(a,s,o);else throw new _o([a,a+1],s,o)};switch(n.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return __(n,e,r);case"block-scalar":return w_({options:{strict:e}},n,r)}}return null}function eE(n,e){const{implicitKey:t=!1,indent:r,inFlow:i=!1,offset:s=-1,type:o="PLAIN"}=e,a=Ic({type:o,value:n},{implicitKey:t,indent:r>0?" ".repeat(r):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),l=e.end??[{type:"newline",offset:-1,indent:r,source:`
109
- `}];switch(a[0]){case"|":case">":{const c=a.indexOf(`
110
- `),u=a.substring(0,c),f=a.substring(c+1)+`
111
- `,d=[{type:"block-scalar-header",offset:s,indent:r,source:u}];return A_(d,l)||d.push({type:"newline",offset:-1,indent:r,source:`
112
- `}),{type:"block-scalar",offset:s,indent:r,props:d,source:f}}case'"':return{type:"double-quoted-scalar",offset:s,indent:r,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:s,indent:r,source:a,end:l};default:return{type:"scalar",offset:s,indent:r,source:a,end:l}}}function tE(n,e,t={}){let{afterKey:r=!1,implicitKey:i=!1,inFlow:s=!1,type:o}=t,a="indent"in n?n.indent:null;if(r&&typeof a=="number"&&(a+=2),!o)switch(n.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{const c=n.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}const l=Ic({type:o,value:e},{implicitKey:i||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":nE(n,l);break;case'"':ch(n,l,"double-quoted-scalar");break;case"'":ch(n,l,"single-quoted-scalar");break;default:ch(n,l,"scalar")}}function nE(n,e){const t=e.indexOf(`
113
- `),r=e.substring(0,t),i=e.substring(t+1)+`
114
- `;if(n.type==="block-scalar"){const s=n.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=r,n.source=i}else{const{offset:s}=n,o="indent"in n?n.indent:-1,a=[{type:"block-scalar-header",offset:s,indent:o,source:r}];A_(a,"end"in n?n.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
115
- `});for(const l of Object.keys(n))l!=="type"&&l!=="offset"&&delete n[l];Object.assign(n,{type:"block-scalar",indent:o,props:a,source:i})}}function A_(n,e){if(e)for(const t of e)switch(t.type){case"space":case"comment":n.push(t);break;case"newline":return n.push(t),!0}return!1}function ch(n,e,t){switch(n.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":n.type=t,n.source=e;break;case"block-scalar":{const r=n.props.slice(1);let i=e.length;n.props[0].type==="block-scalar-header"&&(i-=n.props[0].source.length);for(const s of r)s.offset+=i;delete n.props,Object.assign(n,{type:t,source:e,end:r});break}case"block-map":case"block-seq":{const i={type:"newline",offset:n.offset+e.length,indent:n.indent,source:`
116
- `};delete n.items,Object.assign(n,{type:t,source:e,end:[i]});break}default:{const r="indent"in n?n.indent:-1,i="end"in n&&Array.isArray(n.end)?n.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(const s of Object.keys(n))s!=="type"&&s!=="offset"&&delete n[s];Object.assign(n,{type:t,indent:r,source:e,end:i})}}}const rE=n=>"type"in n?wf(n):Hu(n);function wf(n){switch(n.type){case"block-scalar":{let e="";for(const t of n.props)e+=wf(t);return e+n.source}case"block-map":case"block-seq":{let e="";for(const t of n.items)e+=Hu(t);return e}case"flow-collection":{let e=n.start.source;for(const t of n.items)e+=Hu(t);for(const t of n.end)e+=t.source;return e}case"document":{let e=Hu(n);if(n.end)for(const t of n.end)e+=t.source;return e}default:{let e=n.source;if("end"in n&&n.end)for(const t of n.end)e+=t.source;return e}}}function Hu({start:n,key:e,sep:t,value:r}){let i="";for(const s of n)i+=s.source;if(e&&(i+=wf(e)),t)for(const s of t)i+=s.source;return r&&(i+=wf(r)),i}const jp=Symbol("break visit"),iE=Symbol("skip children"),C_=Symbol("remove item");function Do(n,e){"type"in n&&n.type==="document"&&(n={start:n.start,value:n.value}),T_(Object.freeze([]),n,e)}Do.BREAK=jp;Do.SKIP=iE;Do.REMOVE=C_;Do.itemAtPath=(n,e)=>{let t=n;for(const[r,i]of e){const s=t?.[r];if(s&&"items"in s)t=s.items[i];else return}return t};Do.parentCollection=(n,e)=>{const t=Do.itemAtPath(n,e.slice(0,-1)),r=e[e.length-1][0],i=t?.[r];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function T_(n,e,t){let r=t(e,n);if(typeof r=="symbol")return r;for(const i of["key","value"]){const s=e[i];if(s&&"items"in s){for(let o=0;o<s.items.length;++o){const a=T_(Object.freeze(n.concat([[i,o]])),s.items[o],t);if(typeof a=="number")o=a-1;else{if(a===jp)return jp;a===C_&&(s.items.splice(o,1),o-=1)}}typeof r=="function"&&i==="key"&&(r=r(e,n))}}return typeof r=="function"?r(e,n):r}const Ed="\uFEFF",$d="",Qd="",sc="",sE=n=>!!n&&"items"in n,oE=n=>!!n&&(n.type==="scalar"||n.type==="single-quoted-scalar"||n.type==="double-quoted-scalar"||n.type==="block-scalar");function aE(n){switch(n){case Ed:return"<BOM>";case $d:return"<DOC>";case Qd:return"<FLOW_END>";case sc:return"<SCALAR>";default:return JSON.stringify(n)}}function P_(n){switch(n){case Ed:return"byte-order-mark";case $d:return"doc-mode";case Qd:return"flow-error-end";case sc:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
117
- `:case`\r
118
- `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(n[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const lE=Object.freeze(Object.defineProperty({__proto__:null,BOM:Ed,DOCUMENT:$d,FLOW_END:Qd,SCALAR:sc,createScalarToken:eE,isCollection:sE,isScalar:oE,prettyToken:aE,resolveAsScalar:JP,setScalarValue:tE,stringify:rE,tokenType:P_,visit:Do},Symbol.toStringTag,{value:"Module"}));function fi(n){switch(n){case void 0:case" ":case`
119
- `:case"\r":case" ":return!0;default:return!1}}const fb=new Set("0123456789ABCDEFabcdef"),cE=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),iu=new Set(",[]{}"),uE=new Set(` ,[]{}
120
- \r `),uh=n=>!n||uE.has(n);class E_{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let r=this.next??"stream";for(;r&&(t||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
121
- `?!0:t==="\r"?this.buffer[e+1]===`
122
- `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;for(;t===" ";)t=this.buffer[++r+e];if(t==="\r"){const i=this.buffer[r+e+1];if(i===`
123
- `||!i&&!this.atEnd)return e+r+1}return t===`
124
- `||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if(t==="-"||t==="."){const r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&fi(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
125
- `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Ed&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,r=e.indexOf("#");for(;r!==-1;){const s=e[r-1];if(s===" "||s===" "){t=r-1;break}else r=e.indexOf("#",r+1)}for(;;){const s=e[t-1];if(s===" "||s===" ")t-=1;else break}const i=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield $d,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const t=this.peek(3);if((t==="---"||t==="...")&&fi(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!fi(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&fi(t)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(uh),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,r=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=r=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);const i=this.getLine();if(i===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&i[0]!=="#"||r===0&&(i.startsWith("---")||i.startsWith("..."))&&fi(i[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield Qd,yield*this.parseLineStart();let s=0;for(;i[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),i[s]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(uh),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const o=this.charAt(1);if(this.flowKey||fi(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let s=0;for(;this.buffer[t-1-s]==="\\";)s+=1;if(s%2===0)break;t=this.buffer.indexOf('"',t+1)}const r=this.buffer.substring(0,t);let i=r.indexOf(`
126
- `,this.pos);if(i!==-1){for(;i!==-1;){const s=this.continueScalar(i+1);if(s===-1)break;i=r.indexOf(`
127
- `,s)}i!==-1&&(t=i-(r[i-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>fi(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,r;e:for(let s=this.pos;r=this.buffer[s];++s)switch(r){case" ":t+=1;break;case`
128
- `:e=s,t=0;break;case"\r":{const o=this.buffer[s+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
129
- `)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const s=this.continueScalar(e+1);if(s===-1)break;e=this.buffer.indexOf(`
130
- `,s)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let i=e+1;for(r=this.buffer[i];r===" ";)r=this.buffer[++i];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
131
- `;)r=this.buffer[++i];e=i-1}else if(!this.blockScalarKeep)do{let s=e-1,o=this.buffer[s];o==="\r"&&(o=this.buffer[--s]);const a=s;for(;o===" ";)o=this.buffer[--s];if(o===`
132
- `&&s>=this.pos&&s+1+t>a)e=s;else break}while(!0);return yield sc,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t=this.pos-1,r=this.pos-1,i;for(;i=this.buffer[++r];)if(i===":"){const s=this.buffer[r+1];if(fi(s)||e&&iu.has(s))break;t=r}else if(fi(i)){let s=this.buffer[r+1];if(i==="\r"&&(s===`
133
- `?(r+=1,i=`
134
- `,s=this.buffer[r+1]):t=r),s==="#"||e&&iu.has(s))break;if(i===`
135
- `){const o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&iu.has(i))break;t=r}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield sc,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(uh))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(fi(t)||e&&iu.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!fi(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(cE.has(t))t=this.buffer[++e];else if(t==="%"&&fb.has(this.buffer[e+1])&&fb.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
136
- `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
137
- `?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,r;do r=this.buffer[++t];while(r===" "||e&&r===" ");const i=t-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=t),i}*pushUntil(e){let t=this.pos,r=this.buffer[t];for(;!e(r);)r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class $_{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,r=this.lineStarts.length;for(;t<r;){const s=t+r>>1;this.lineStarts[s]<e?t=s+1:r=s}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};const i=this.lineStarts[t-1];return{line:t,col:e-i+1}}}}function Ls(n,e){for(let t=0;t<n.length;++t)if(n[t].type===e)return!0;return!1}function db(n){for(let e=0;e<n.length;++e)switch(n[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function Q_(n){switch(n?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function su(n){switch(n.type){case"document":return n.start;case"block-map":{const e=n.items[n.items.length-1];return e.sep??e.start}case"block-seq":return n.items[n.items.length-1].start;default:return[]}}function Ko(n){if(n.length===0)return[];let e=n.length;e:for(;--e>=0;)switch(n[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;n[++e]?.type==="space";);return n.splice(e,n.length)}function hb(n){if(n.start.type==="flow-seq-start")for(const e of n.items)e.sep&&!e.value&&!Ls(e.start,"explicit-key-ind")&&!Ls(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Q_(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}let nO=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new E_,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(e,t))yield*this.next(r);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const t=P_(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{const r=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in r?r.indent:0:t.type==="flow-collection"&&r.type==="document"&&(t.indent=0),t.type==="flow-collection"&&hb(t),r.type){case"document":r.value=t;break;case"block-scalar":r.props.push(t);break;case"block-map":{const i=r.items[r.items.length-1];if(i.value){r.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=t;else{Object.assign(i,{key:t,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{const i=r.items[r.items.length-1];i.value?r.items.push({start:[],value:t}):i.value=t;break}case"flow-collection":{const i=r.items[r.items.length-1];!i||i.value?r.items.push({start:[],key:t,sep:[]}):i.sep?i.value=t:Object.assign(i,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){const i=t.items[t.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&db(i.start)===-1&&(t.indent===0||i.start.every(s=>s.type!=="comment"||s.indent<t.indent))&&(r.type==="document"?r.end=i.start:r.items.push({start:i.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{db(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){const t=su(this.peek(2)),r=Ko(t);let i;e.end?(i=e.end,i.push(this.sourceToken),delete e.end):i=[this.sourceToken];const s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
138
- `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
139
- `,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const r="end"in t.value?t.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){const i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const r=!this.onKeyLine&&this.indent===e.indent,i=r&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind";let s=[];if(i&&t.sep&&!t.value){const o=[];for(let a=0;a<t.sep.length;++a){const l=t.sep[a];switch(l.type){case"newline":o.push(a);break;case"space":break;case"comment":l.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(s=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||t.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):i||t.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Ls(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(Q_(t.key)&&!Ls(t.sep,"newline")){const o=Ko(t.start),a=t.key,l=t.sep;l.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:l}]})}else s.length>0?t.sep=t.sep.concat(s,this.sourceToken):t.sep.push(this.sourceToken);else if(Ls(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const o=Ko(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||i?e.items.push({start:s,key:null,sep:[this.sourceToken]}):Ls(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);i||t.value?(e.items.push({start:s,key:o,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(o):(Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{const o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!t.explicitKey&&t.sep&&!Ls(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else r&&e.items.push({start:s});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const r="end"in t.value?t.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||Ls(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){const r=this.startBlockValue(e);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const i=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:i,sep:[]}):t.sep?this.stack.push(i):Object.assign(t,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const i=su(r),s=Ko(i);hb(e);const o=e.end.splice(1,e.end.length);o.push(this.sourceToken);const a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
140
- `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
141
- `,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=su(e),r=Ko(t);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=su(e),r=Ko(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function L_(n){const e=n.prettyErrors!==!1;return{lineCounter:n.lineCounter||e&&new $_||null,prettyErrors:e}}function fE(n,e={}){const{lineCounter:t,prettyErrors:r}=L_(e),i=new nO(t?.addNewLine),s=new tO(e),o=Array.from(s.compose(i.parse(n)));if(r&&t)for(const a of o)a.errors.forEach(yf(n,t)),a.warnings.forEach(yf(n,t));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function M_(n,e={}){const{lineCounter:t,prettyErrors:r}=L_(e),i=new nO(t?.addNewLine),s=new tO(e);let o=null;for(const a of s.compose(i.parse(n),!0,n.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new _o(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&t&&(o.errors.forEach(yf(n,t)),o.warnings.forEach(yf(n,t))),o}function dE(n,e,t){let r;typeof e=="function"?r=e:t===void 0&&e&&typeof e=="object"&&(t=e);const i=M_(n,t);if(!i)return null;if(i.warnings.forEach(s=>Kw(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},t))}function hE(n,e,t){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){const i=Math.round(t);t=i<1?void 0:i>8?{indent:8}:{indent:i}}if(n===void 0){const{keepUndefined:i}=t??e??{};if(!i)return}return Xo(n)&&!r?n.toString(t):new sl(n,r,t).toString(t)}const _f=Object.freeze(Object.defineProperty({__proto__:null,Alias:wd,CST:lE,Composer:tO,Document:sl,Lexer:E_,LineCounter:$_,Pair:er,Parser:nO,Scalar:ut,Schema:O_,YAMLError:Jg,YAMLMap:Rr,YAMLParseError:_o,YAMLSeq:Ys,YAMLWarning:b_,isAlias:ro,isCollection:gn,isDocument:Xo,isMap:tl,isNode:vn,isPair:pn,isScalar:rn,isSeq:nl,parse:dE,parseAllDocuments:fE,parseDocument:M_,stringify:hE,visit:Fo,visitAsync:yd},Symbol.toStringTag,{value:"Module"}));function pE(n){const e=n.match(/^---\r?\n([\s\S]*?\r?\n)?---\r?\n?([\s\S]*)$/);if(!e)return{frontmatter:{},body:n};const t=_f.parse(e[1]??"")??{},r=e[2];return{frontmatter:t,body:r}}function fh(n,e){return Object.keys(n).length===0?e:`---
142
- ${_f.stringify(n,{lineWidth:0}).trimEnd()}
143
- ---
144
- ${e}`}let mE=class{#e=ee(null);get tree(){return m(this.#e)}set tree(e){L(this.#e,e,!0)}#r=ee(null);get currentPath(){return m(this.#r)}set currentPath(e){L(this.#r,e,!0)}#t=ee("");get savedContent(){return m(this.#t)}set savedContent(e){L(this.#t,e,!0)}#i=ee("");get editorContent(){return m(this.#i)}set editorContent(e){L(this.#i,e,!0)}#a=ee(Jt({}));get frontmatter(){return m(this.#a)}set frontmatter(e){L(this.#a,e,!0)}#s=ee("");get bodyContent(){return m(this.#s)}set bodyContent(e){L(this.#s,e,!0)}#n=ee(!1);get frontmatterOpen(){return m(this.#n)}set frontmatterOpen(e){L(this.#n,e,!0)}#o=ee(!1);get frontmatterRawMode(){return m(this.#o)}set frontmatterRawMode(e){L(this.#o,e,!0)}#l=ee("blocks");get editorMode(){return m(this.#l)}set editorMode(e){L(this.#l,e,!0)}#c=ee(!1);get treeLoading(){return m(this.#c)}set treeLoading(e){L(this.#c,e,!0)}#u=ee(!1);get fileLoading(){return m(this.#u)}set fileLoading(e){L(this.#u,e,!0)}#f=ee(!1);get saving(){return m(this.#f)}set saving(e){L(this.#f,e,!0)}#p=ee(!1);get saveJustCompleted(){return m(this.#p)}set saveJustCompleted(e){L(this.#p,e,!0)}#h=ee(null);get error(){return m(this.#h)}set error(e){L(this.#h,e,!0)}#m=ee(Jt([]));get runes(){return m(this.#m)}set runes(e){L(this.#m,e,!0)}#g=ee(Jt([]));get routeRules(){return m(this.#g)}set routeRules(e){L(this.#g,e,!0)}#d=ee("desktop");get viewport(){return m(this.#d)}set viewport(e){L(this.#d,e,!0)}#w=ee("light");get previewTheme(){return m(this.#w)}set previewTheme(e){L(this.#w,e,!0)}#_=ee("");get themeCss(){return m(this.#_)}set themeCss(e){L(this.#_,e,!0)}#k=ee(null);get themeConfig(){return m(this.#k)}set themeConfig(e){L(this.#k,e,!0)}#b=ee(null);get highlightTransform(){return m(this.#b)}set highlightTransform(e){L(this.#b,e,!0)}#O=ee("");get highlightCss(){return m(this.#O)}set highlightCss(e){L(this.#O,e,!0)}#v=ee(!1);get previewRuntimeAvailable(){return m(this.#v)}set previewRuntimeAvailable(e){L(this.#v,e,!0)}#y=ee(!1);get previewRuntimeReady(){return m(this.#y)}set previewRuntimeReady(e){L(this.#y,e,!0)}#x=ee(Jt(new Set));get expandedDirs(){return m(this.#x)}set expandedDirs(e){L(this.#x,e,!0)}#S=ee(null);get externalChange(){return m(this.#S)}set externalChange(e){L(this.#S,e,!0)}#A=ee(null);get communityTags(){return m(this.#A)}set communityTags(e){L(this.#A,e,!0)}#C=ee(null);get communityPostTransforms(){return m(this.#C)}set communityPostTransforms(e){L(this.#C,e,!0)}#T=ee(null);get communityStyles(){return m(this.#T)}set communityStyles(e){L(this.#T,e,!0)}#P=ee(Jt({}));get aggregated(){return m(this.#P)}set aggregated(e){L(this.#P,e,!0)}#E=ee(!0);get sidenavOpen(){return m(this.#E)}set sidenavOpen(e){L(this.#E,e,!0)}#$=me(()=>this.editorContent!==this.savedContent);get dirty(){return m(this.#$)}set dirty(e){L(this.#$,e)}#Q=me(()=>this.currentPath?.endsWith("_layout.md")?"layout":"page");get currentFileType(){return m(this.#Q)}set currentFileType(e){L(this.#Q,e)}loadFile(e,t){const{frontmatter:r,body:i}=pE(t);this.currentPath=e,this.savedContent=t,this.editorContent=t,this.frontmatter=r,this.bodyContent=i,this.frontmatterRawMode=!1}updateBody(e){this.bodyContent=e,this.editorContent=fh(this.frontmatter,e)}updateFrontmatterField(e,t){if(t===void 0||t===""||Array.isArray(t)&&t.length===0){const{[e]:r,...i}=this.frontmatter;this.frontmatter=i}else this.frontmatter={...this.frontmatter,[e]:t};this.editorContent=fh(this.frontmatter,this.bodyContent)}replaceFrontmatter(e){this.frontmatter=e,this.editorContent=fh(e,this.bodyContent)}toggleDir(e){const t=new Set(this.expandedDirs);t.has(e)?t.delete(e):t.add(e),this.expandedDirs=t}isDirExpanded(e){return this.expandedDirs.has(e)}};const X=new mE;var gE=V('<div class="header__group svelte-1q0qpei"><button>Edit</button> <button>Preview</button></div>'),OE=V('<span class="header__sep svelte-1q0qpei">/</span>'),vE=V('<span class="header__crumb header__crumb--current svelte-1q0qpei"><svg class="header__doc-icon svelte-1q0qpei" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M9 1.5H4a1.5 1.5 0 0 0-1.5 1.5v10A1.5 1.5 0 0 0 4 14.5h8A1.5 1.5 0 0 0 13.5 13V6L9 1.5Z" class="svelte-1q0qpei"></path><polyline points="9 1.5 9 6 13.5 6" class="svelte-1q0qpei"></polyline></svg> </span>'),bE=V('<span class="header__crumb svelte-1q0qpei"> </span>'),yE=V("<!> <!>",1),wE=V('<span class="header__dot svelte-1q0qpei" title="Unsaved changes"></span>'),_E=V('<nav class="header__breadcrumbs svelte-1q0qpei" aria-label="File path"><!> <!></nav>'),kE=V('<span class="header__error svelte-1q0qpei"> </span>'),xE=V('<div class="header__group svelte-1q0qpei"><button title="Desktop"><svg width="15" height="15" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1q0qpei"><rect x="1.5" y="2" width="13" height="9" rx="1" class="svelte-1q0qpei"></rect><line x1="5.5" y1="14" x2="10.5" y2="14" class="svelte-1q0qpei"></line><line x1="8" y1="11" x2="8" y2="14" class="svelte-1q0qpei"></line></svg></button> <button title="Tablet"><svg width="15" height="15" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1q0qpei"><rect x="3" y="1.5" width="10" height="13" rx="1.5" class="svelte-1q0qpei"></rect><line x1="7" y1="12.5" x2="9" y2="12.5" class="svelte-1q0qpei"></line></svg></button> <button title="Mobile"><svg width="15" height="15" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1q0qpei"><rect x="4" y="1.5" width="8" height="13" rx="2" class="svelte-1q0qpei"></rect><line x1="7" y1="12.5" x2="9" y2="12.5" class="svelte-1q0qpei"></line></svg></button></div> <span class="header__divider svelte-1q0qpei"></span> <div class="header__group svelte-1q0qpei"><button title="Light mode"><svg width="15" height="15" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1q0qpei"><circle cx="8" cy="8" r="3" class="svelte-1q0qpei"></circle><line x1="8" y1="1.5" x2="8" y2="3" class="svelte-1q0qpei"></line><line x1="8" y1="13" x2="8" y2="14.5" class="svelte-1q0qpei"></line><line x1="2.4" y1="2.4" x2="3.5" y2="3.5" class="svelte-1q0qpei"></line><line x1="12.5" y1="12.5" x2="13.6" y2="13.6" class="svelte-1q0qpei"></line><line x1="1.5" y1="8" x2="3" y2="8" class="svelte-1q0qpei"></line><line x1="13" y1="8" x2="14.5" y2="8" class="svelte-1q0qpei"></line><line x1="2.4" y1="13.6" x2="3.5" y2="12.5" class="svelte-1q0qpei"></line><line x1="12.5" y1="3.5" x2="13.6" y2="2.4" class="svelte-1q0qpei"></line></svg></button> <button title="Dark mode"><svg width="15" height="15" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1q0qpei"><path d="M13.5 8.5a5.5 5.5 0 0 1-7-7 5.5 5.5 0 1 0 7 7Z" class="svelte-1q0qpei"></path></svg></button></div>',1),SE=V('<div class="header__group svelte-1q0qpei"><button>Code</button> <button>Blocks</button></div>'),AE=_s('<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1q0qpei"><polyline points="3.5 8.5 6.5 11.5 12.5 4.5" class="svelte-1q0qpei"></polyline></svg> Saved',1),CE=V('<button><!> <kbd class="header__kbd svelte-1q0qpei"></kbd></button>'),TE=V('<header class="header svelte-1q0qpei"><button class="header__sidebar-toggle svelte-1q0qpei"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1q0qpei"><rect x="1.5" y="2.5" width="13" height="11" rx="1.5" class="svelte-1q0qpei"></rect><line x1="5.5" y1="2.5" x2="5.5" y2="13.5" class="svelte-1q0qpei"></line></svg></button> <!> <!> <!> <div class="header__spacer svelte-1q0qpei"></div> <!> <!></header>');function PE(n,e){Ot(e,!0);let t=me(()=>X.currentPath?X.currentPath.split("/"):[]);const r=me(()=>X.currentPath&&X.currentFileType!=="layout"),i=me(()=>X.editorMode==="preview"),s=me(()=>X.editorMode==="blocks"||X.editorMode==="code");var o=TE(),a=q(o);a.__click=()=>{X.sidenavOpen=!X.sidenavOpen};var l=R(a,2);{var c=b=>{var _=gE(),A=q(_);let y;A.__click=()=>{X.editorMode="blocks"};var w=R(A,2);let S;w.__click=()=>{X.editorMode="preview"},fe(()=>{y=Ze(A,1,"header__btn svelte-1q0qpei",null,y,{"header__btn--active":m(s)}),S=Ze(w,1,"header__btn svelte-1q0qpei",null,S,{"header__btn--active":m(i)})}),j(b,_)};ue(l,b=>{m(r)&&b(c)})}var u=R(l,2);{var f=b=>{var _=_E(),A=q(_);$t(A,17,()=>m(t),Gt,(S,C,x)=>{var k=yE(),E=ot(k);{var T=D=>{var I=OE();j(D,I)};ue(E,D=>{x>0&&D(T)})}var $=R(E,2);{var M=D=>{var I=vE(),W=R(q(I));fe(()=>Ee(W,` ${m(C)??""}`)),j(D,I)},P=D=>{var I=bE(),W=q(I);fe(()=>Ee(W,m(C))),j(D,I)};ue($,D=>{x===m(t).length-1?D(M):D(P,!1)})}j(S,k)});var y=R(A,2);{var w=S=>{var C=wE();j(S,C)};ue(y,S=>{X.dirty&&S(w)})}j(b,_)};ue(u,b=>{X.currentPath&&b(f)})}var d=R(u,2);{var h=b=>{var _=kE(),A=q(_);fe(()=>Ee(A,X.error)),j(b,_)};ue(d,b=>{X.error&&b(h)})}var g=R(d,4);{var p=b=>{var _=ln(),A=ot(_);{var y=S=>{var C=xE(),x=ot(C),k=q(x);let E;k.__click=()=>X.viewport="desktop";var T=R(k,2);let $;T.__click=()=>X.viewport="tablet";var M=R(T,2);let P;M.__click=()=>X.viewport="mobile";var D=R(x,4),I=q(D);let W;I.__click=()=>X.previewTheme="light";var U=R(I,2);let ae;U.__click=()=>X.previewTheme="dark",fe(()=>{E=Ze(k,1,"header__btn header__btn--icon svelte-1q0qpei",null,E,{"header__btn--active":X.viewport==="desktop"}),$=Ze(T,1,"header__btn header__btn--icon svelte-1q0qpei",null,$,{"header__btn--active":X.viewport==="tablet"}),P=Ze(M,1,"header__btn header__btn--icon svelte-1q0qpei",null,P,{"header__btn--active":X.viewport==="mobile"}),W=Ze(I,1,"header__btn header__btn--icon svelte-1q0qpei",null,W,{"header__btn--active":X.previewTheme==="light"}),ae=Ze(U,1,"header__btn header__btn--icon svelte-1q0qpei",null,ae,{"header__btn--active":X.previewTheme==="dark"})}),j(S,C)},w=S=>{var C=SE(),x=q(C);let k;x.__click=()=>{X.editorMode="code"};var E=R(x,2);let T;E.__click=()=>{X.editorMode="blocks"},fe(()=>{k=Ze(x,1,"header__btn svelte-1q0qpei",null,k,{"header__btn--active":X.editorMode==="code"}),T=Ze(E,1,"header__btn svelte-1q0qpei",null,T,{"header__btn--active":X.editorMode==="blocks"})}),j(S,C)};ue(A,S=>{m(i)?S(y):m(s)&&S(w,1)})}j(b,_)};ue(g,b=>{m(r)&&b(p)})}var O=R(g,2);{var v=b=>{var _=CE();let A;_.__click=function(...k){e.onsave?.apply(this,k)};var y=q(_);{var w=k=>{var E=AE();j(k,E)},S=k=>{var E=Hv("Saving...");j(k,E)},C=k=>{var E=Hv("Save");j(k,E)};ue(y,k=>{X.saveJustCompleted?k(w):X.saving?k(S,1):k(C,!1)})}var x=R(y,2);x.textContent=`${navigator.platform.includes("Mac")?"⌘":"Ctrl"}S`,fe(()=>{A=Ze(_,1,"header__btn header__btn--active svelte-1q0qpei",null,A,{"header__btn--success":X.saveJustCompleted}),_.disabled=!X.dirty||X.saving}),j(b,_)};ue(O,b=>{X.currentPath&&b(v)})}fe(()=>Et(a,"title",X.sidenavOpen?"Hide sidebar":"Show sidebar")),j(n,o),vt()}Ut(["click"]);var EE=V('<div><div class="layout__left svelte-c9ce7p"><!></div> <div class="layout__main svelte-c9ce7p"><div class="layout__header svelte-c9ce7p"><!></div> <div class="layout__content svelte-c9ce7p"><div class="layout__panel layout__panel--center svelte-c9ce7p"><div><!></div></div> <div class="layout__panel layout__panel--right svelte-c9ce7p"><!></div></div></div></div>');function $E(n,e){Ot(e,!0);let t=ee(0),r=me(()=>X.editorMode==="code"?"1fr 1fr":"0px 1fr");const i=me(()=>Math.floor(Math.max(0,m(t))/2));var s=EE();let o;var a=q(s);Ar(a,"width: 360px");var l=q(a);ca(l,()=>e.left);var c=R(a,2),u=q(c),f=q(u);ca(f,()=>e.header);var d=R(u,2),h=q(d),g=q(h);let p;var O=q(g);ca(O,()=>e.center);var v=R(h,2),b=q(v);ca(b,()=>e.right),fe(()=>{o=Ze(s,1,"layout svelte-c9ce7p",null,o,{"layout--sidenav-closed":!X.sidenavOpen}),Ar(d,`grid-template-columns: ${m(r)??""}`),p=Ze(g,1,"layout__center-inner svelte-c9ce7p",null,p,{"slide-out":X.editorMode!=="code"}),Ar(g,`min-width: ${m(i)??""}px`)}),tP(c,"clientWidth",_=>L(t,_)),j(n,s),vt()}var QE=_s('<svg class="tree-dir__icon svelte-150vzea" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"><path d="M1.5 4h4.5l1.5 1.5H14.5v8.5h-13z"></path><path d="M1.5 4v-1.5h4.5l1.5 1.5"></path></svg>'),LE=_s('<svg class="tree-dir__icon svelte-150vzea" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"><path d="M1.5 4h4.5l1.5 1.5H14.5v8.5h-13V2.5h4.5l1.5 1.5"></path></svg>'),ME=V('<button class="tree-dir__add svelte-150vzea"><svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="8" y1="3" x2="8" y2="13"></line><line x1="3" y1="8" x2="13" y2="8"></line></svg></button>'),DE=V('<div class="tree-dir svelte-150vzea" role="treeitem" tabindex="0"><svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 4 10 8 6 12"></polyline></svg> <!> <span class="tree-dir__name svelte-150vzea"> </span> <!></div>'),qE=V('<button><svg class="tree-item__icon svelte-150vzea" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"><rect x="1.5" y="1.5" width="13" height="13" rx="1.5"></rect><line x1="1.5" y1="5.5" x2="14.5" y2="5.5"></line><line x1="6" y1="5.5" x2="6" y2="14.5"></line></svg> <span class="tree-item__name svelte-150vzea">_layout.md</span></button>'),RE=V('<span class="tree-item__badge svelte-150vzea">Draft</span>'),IE=V('<button><svg class="tree-item__icon svelte-150vzea" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"><path d="M9 1.5H4a1.5 1.5 0 0 0-1.5 1.5v10A1.5 1.5 0 0 0 4 14.5h8A1.5 1.5 0 0 0 13.5 13V6L9 1.5Z"></path><polyline points="9 1.5 9 6 13.5 6"></polyline></svg> <span class="tree-item__name svelte-150vzea"> </span> <!></button>'),NE=V("<!> <!>",1),BE=V("<!> <!>",1);function zp(n,e){Ot(e,!0);function t(c,u){e.oncontextmenu&&(c.preventDefault(),e.oncontextmenu(c,u))}function r(c){e.onselectfile(c)}function i(){X.toggleDir(e.node.path||e.node.name)}let s=me(()=>X.isDirExpanded(e.node.path||e.node.name));var o=ln(),a=ot(o);{var l=c=>{var u=BE(),f=ot(u);{var d=p=>{var O=DE();O.__click=i,O.__keydown=k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),i())},O.__contextmenu=k=>t(k,e.node);var v=q(O);let b;var _=R(v,2);{var A=k=>{var E=QE();j(k,E)},y=k=>{var E=LE();j(k,E)};ue(_,k=>{m(s)?k(A):k(y,!1)})}var w=R(_,2),S=q(w),C=R(w,2);{var x=k=>{var E=ME();E.__click=T=>{T.stopPropagation(),e.onnewpage(e.node.path,T.currentTarget.getBoundingClientRect())},fe(()=>Et(E,"title",`New page in ${e.node.name??""}`)),j(k,E)};ue(C,k=>{e.onnewpage&&k(x)})}fe(()=>{Ar(O,`--depth: ${e.depth-1}`),b=Ze(v,0,"tree-dir__chevron svelte-150vzea",null,b,{collapsed:!m(s)}),Ee(S,e.node.name)}),j(p,O)};ue(f,p=>{e.depth>0&&p(d)})}var h=R(f,2);{var g=p=>{var O=NE(),v=ot(O);{var b=A=>{var y=qE();let w;y.__click=()=>r(e.node.layout.path),y.__contextmenu=S=>t(S,e.node.layout),fe(()=>{w=Ze(y,1,"tree-item tree-item--layout svelte-150vzea",null,w,{active:X.currentPath===e.node.layout.path}),Ar(y,`--depth: ${e.depth??""}`)}),j(A,y)};ue(v,A=>{e.node.layout&&A(b)})}var _=R(v,2);$t(_,17,()=>e.node.children??[],Gt,(A,y)=>{var w=ln(),S=ot(w);{var C=k=>{{let E=me(()=>e.depth+1);zp(k,{get node(){return m(y)},get depth(){return m(E)},get onselectfile(){return e.onselectfile},get oncontextmenu(){return e.oncontextmenu},get onnewpage(){return e.onnewpage}})}},x=k=>{var E=IE();let T;E.__click=()=>r(m(y).path),E.__contextmenu=I=>t(I,m(y));var $=R(q(E),2),M=q($),P=R($,2);{var D=I=>{var W=RE();j(I,W)};ue(P,I=>{m(y).draft&&I(D)})}fe(()=>{T=Ze(E,1,"tree-item svelte-150vzea",null,T,{active:X.currentPath===m(y).path}),Ar(E,`--depth: ${e.depth??""}`),Ee(M,m(y).name)}),j(k,E)};ue(S,k=>{m(y).type==="directory"?k(C):k(x,!1)})}j(A,w)}),j(p,O)};ue(h,p=>{(e.depth===0||m(s))&&p(g)})}j(c,u)};ue(a,c=>{e.node.type==="directory"&&c(l)})}j(n,o),vt()}Ut(["click","keydown","contextmenu"]);var jE=V('<div class="cat-nav__skeleton svelte-z46wvt"><div class="skeleton-bar svelte-z46wvt" style="width: 70%"></div> <div class="skeleton-bar svelte-z46wvt" style="width: 55%"></div> <div class="skeleton-bar svelte-z46wvt" style="width: 85%"></div> <div class="skeleton-bar svelte-z46wvt" style="width: 60%; margin-left: 1rem"></div> <div class="skeleton-bar svelte-z46wvt" style="width: 50%; margin-left: 1rem"></div></div>'),zE=V('<span class="tree-item__badge svelte-z46wvt">Draft</span>'),ZE=V('<button style="--depth: 0"><svg class="tree-item__icon svelte-z46wvt" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"><path d="M9 1.5H4a1.5 1.5 0 0 0-1.5 1.5v10A1.5 1.5 0 0 0 4 14.5h8A1.5 1.5 0 0 0 13.5 13V6L9 1.5Z" class="svelte-z46wvt"></path><polyline points="9 1.5 9 6 13.5 6" class="svelte-z46wvt"></polyline></svg> <span class="tree-item__name svelte-z46wvt"> </span> <!></button>'),XE=V('<div class="cat-nav__empty svelte-z46wvt">No content yet</div>'),FE=V('<div class="cat-nav__section svelte-z46wvt"><div class="cat-nav__section-header svelte-z46wvt"><span class="cat-nav__section-name svelte-z46wvt"> </span> <button class="cat-nav__icon-btn svelte-z46wvt"><svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" class="svelte-z46wvt"><line x1="8" y1="3" x2="8" y2="13" class="svelte-z46wvt"></line><line x1="3" y1="8" x2="13" y2="8" class="svelte-z46wvt"></line></svg></button></div> <!></div>'),VE=V('<div class="cat-nav__list svelte-z46wvt"></div>'),WE=V('<nav class="cat-nav svelte-z46wvt"><div class="cat-nav__header svelte-z46wvt"><span class="cat-nav__title svelte-z46wvt">Content</span> <div class="cat-nav__actions svelte-z46wvt"><button class="cat-nav__icon-btn svelte-z46wvt" title="New category"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" class="svelte-z46wvt"><path d="M1 3h5l1.5 1.5H15v10H1V3z" stroke="currentColor" stroke-width="1.2" class="svelte-z46wvt"></path><path d="M8 7.5v3M6.5 9h3" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" class="svelte-z46wvt"></path></svg></button></div></div> <!></nav>');function YE(n,e){Ot(e,!0);function t(d){return d.replace(/\/?\*+$/,"")}function r(d){if(!d)return"Pages";const h=d.split("/").pop();return h.charAt(0).toUpperCase()+h.slice(1)}let i=me(()=>{const d=X.tree,h=X.routeRules;if(!d)return[];const g=[],p=new Set;for(const v of h){const b=t(v.pattern);if(!b)continue;const _=d.children?.find(A=>A.type==="directory"&&A.name===b)??null;p.add(b),g.push({name:r(b),pattern:v.pattern,layout:v.layout,dirPrefix:b,treeNode:_,rootPages:[]})}const O=(d.children??[]).filter(v=>v.type!=="directory"||!p.has(v.name));return g.unshift({name:"Pages",pattern:"**",layout:"default",dirPrefix:"",treeNode:null,rootPages:O}),g});var s=WE(),o=q(s),a=R(q(o),2),l=q(a);l.__click=d=>e.onnewcategory(d.currentTarget.getBoundingClientRect());var c=R(o,2);{var u=d=>{var h=jE();j(d,h)},f=d=>{var h=VE();$t(h,21,()=>m(i),Gt,(g,p)=>{var O=FE(),v=q(O),b=q(v),_=q(b),A=R(b,2);A.__click=x=>{const k=x.currentTarget.getBoundingClientRect();e.onnewpage(m(p).dirPrefix||void 0,k)};var y=R(v,2);{var w=x=>{zp(x,{get node(){return m(p).treeNode},depth:0,get onselectfile(){return e.onselectfile},get oncontextmenu(){return e.oncontextmenu},get onnewpage(){return e.onnewpage}})},S=x=>{var k=ln(),E=ot(k);$t(E,17,()=>m(p).rootPages,Gt,(T,$)=>{var M=ln(),P=ot(M);{var D=W=>{zp(W,{get node(){return m($)},depth:1,get onselectfile(){return e.onselectfile},get oncontextmenu(){return e.oncontextmenu},get onnewpage(){return e.onnewpage}})},I=W=>{var U=ZE();let ae;U.__click=()=>e.onselectfile(m($).path),U.__contextmenu=ie=>{e.oncontextmenu&&(ie.preventDefault(),e.oncontextmenu(ie,m($)))};var ce=R(q(U),2),K=q(ce),H=R(ce,2);{var se=ie=>{var B=zE();j(ie,B)};ue(H,ie=>{m($).draft&&ie(se)})}fe(()=>{ae=Ze(U,1,"tree-item svelte-z46wvt",null,ae,{active:X.currentPath===m($).path}),Ee(K,m($).name)}),j(W,U)};ue(P,W=>{m($).type==="directory"?W(D):W(I,!1)})}j(T,M)}),j(x,k)},C=x=>{var k=XE();j(x,k)};ue(y,x=>{m(p).dirPrefix&&m(p).treeNode?x(w):m(p).dirPrefix?x(C,!1):x(S,1)})}fe(()=>{Ee(_,m(p).name),Et(A,"title",`Add to ${m(p).name??""}`)}),j(g,O)}),j(d,h)};ue(c,d=>{X.treeLoading?d(u):d(f,!1)})}j(n,s),vt()}Ut(["click","contextmenu"]);var UE=V('<span class="tags-input__tag svelte-14skhb7"> <button class="tags-input__remove svelte-14skhb7">&times;</button></span>'),GE=V('<div class="tags-input svelte-14skhb7"><!> <input class="tags-input__field svelte-14skhb7" type="text"/></div>');function D_(n,e){Ot(e,!0);let t=ee("");function r(c){const u=c.trim();u&&!e.tags.includes(u)&&e.onchange([...e.tags,u]),L(t,"")}function i(c){e.onchange(e.tags.filter((u,f)=>f!==c))}function s(c){c.key==="Enter"||c.key===","?(c.preventDefault(),r(m(t))):c.key==="Backspace"&&m(t)===""&&e.tags.length>0&&i(e.tags.length-1)}var o=GE(),a=q(o);$t(a,17,()=>e.tags,Gt,(c,u,f)=>{var d=UE(),h=q(d),g=R(h);g.__click=()=>i(f),fe(()=>{Ee(h,`${m(u)??""} `),Et(g,"aria-label",`Remove ${m(u)??""}`)}),j(c,d)});var l=R(a,2);l.__keydown=s,fe(()=>Et(l,"placeholder",e.tags.length===0?"Add tags...":"")),ct("blur",l,()=>{m(t).trim()&&r(m(t))}),$n(l,()=>m(t),c=>L(t,c)),j(n,o),vt()}Ut(["click","keydown"]);var HE=V('<div class="raw-yaml__error svelte-30mbeg"> </div>'),KE=V('<div class="raw-yaml svelte-30mbeg"><textarea></textarea> <!></div>');function JE(n,e){Ot(e,!0);let t=ee(""),r=ee(null);hn(()=>{if(X.frontmatterRawMode){const u=Object.keys(X.frontmatter);L(t,u.length>0?_f.stringify(X.frontmatter,{lineWidth:0}).trimEnd():"",!0)}});function i(u){const f=u.target.value;if(L(t,f,!0),L(r,null),f.trim()===""){X.replaceFrontmatter({});return}try{const d=_f.parse(f);d&&typeof d=="object"?X.replaceFrontmatter(d):L(r,"YAML must be an object")}catch(d){L(r,d instanceof Error?d.message:"Invalid YAML",!0)}}var s=KE(),o=q(s);let a;o.__input=i,Et(o,"spellcheck",!1);var l=R(o,2);{var c=u=>{var f=HE(),d=q(f);fe(()=>Ee(d,m(r))),j(u,f)};ue(l,u=>{m(r)&&u(c)})}fe(()=>{a=Ze(o,1,"raw-yaml__editor svelte-30mbeg",null,a,{error:m(r)!==null}),on(o,m(t))}),j(n,s),vt()}Ut(["input"]);var e$=V('<span class="fm-editor__summary-desc svelte-7izpdj"> </span>'),t$=V('<span class="fm-editor__summary svelte-7izpdj"> <!></span>'),n$=V('<div class="fm-editor__mode-track svelte-7izpdj"><button>Form</button> <button>YAML</button></div>'),r$=V('<div class="fm-field fm-field--custom svelte-7izpdj"><span class="fm-field__label svelte-7izpdj"> </span> <div class="fm-field__custom-row svelte-7izpdj"><input class="fm-field__input svelte-7izpdj" type="text"/> <button class="fm-field__remove svelte-7izpdj">&times;</button></div></div>'),i$=V('<div class="fm-editor__custom-section svelte-7izpdj"><span class="fm-editor__section-label svelte-7izpdj">Custom fields</span> <!></div>'),s$=V('<div class="fm-editor__fields svelte-7izpdj"><label class="fm-field svelte-7izpdj"><span class="fm-field__label svelte-7izpdj">Title</span> <input class="fm-field__input svelte-7izpdj" type="text"/></label> <label class="fm-field svelte-7izpdj"><span class="fm-field__label svelte-7izpdj">Description</span> <textarea class="fm-field__textarea svelte-7izpdj"></textarea></label> <label class="fm-field svelte-7izpdj"><span class="fm-field__label svelte-7izpdj">Slug</span> <input class="fm-field__input svelte-7izpdj" type="text" placeholder="auto-derived from filename"/></label> <div class="fm-editor__row svelte-7izpdj"><label class="fm-field svelte-7izpdj"><span class="fm-field__label svelte-7izpdj">Author</span> <input class="fm-field__input svelte-7izpdj" type="text"/></label> <label class="fm-field svelte-7izpdj"><span class="fm-field__label svelte-7izpdj">Date</span> <input class="fm-field__input svelte-7izpdj" type="date"/></label></div> <div class="fm-editor__row svelte-7izpdj"><label class="fm-field svelte-7izpdj"><span class="fm-field__label svelte-7izpdj">Order</span> <input class="fm-field__input svelte-7izpdj" type="number"/></label> <div class="fm-field svelte-7izpdj"><span class="fm-field__label svelte-7izpdj">Draft</span> <div role="switch" tabindex="0"><div class="fm-toggle__track svelte-7izpdj"><div class="fm-toggle__thumb svelte-7izpdj"></div></div> <span class="fm-toggle__label svelte-7izpdj"> </span></div></div></div> <div class="fm-field svelte-7izpdj"><span class="fm-field__label svelte-7izpdj">Tags</span> <!></div> <!> <div class="fm-editor__add-field svelte-7izpdj"><input class="fm-field__input svelte-7izpdj" type="text" placeholder="Field name"/> <button class="fm-editor__add-btn svelte-7izpdj">+ Add field</button></div></div>'),o$=V('<div><div class="fm-editor__header svelte-7izpdj" role="button" tabindex="0"><svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 4 10 8 6 12"></polyline></svg> <span class="fm-editor__label svelte-7izpdj">Frontmatter <!></span> <!></div> <div><div class="fm-editor__collapse-inner svelte-7izpdj"><div class="fm-editor__body svelte-7izpdj"><!></div></div></div></div>');function a$(n,e){Ot(e,!0);let t=Pt(e,"forceRawMode",3,!1);hn(()=>{t()&&(X.frontmatterRawMode=!0)});const r=new Set(["title","description","tags","draft","order","date","author","slug"]);let i=ee(""),s=me(()=>Object.entries(X.frontmatter).filter(([p])=>!r.has(p))),o=me(()=>X.currentFileType==="layout"),a=me(()=>X.frontmatter.title||""),l=me(()=>()=>{const p=X.frontmatter.description||"";return p.length>60?p.slice(0,60)+"...":p});function c(p,O){X.updateFrontmatterField(p,O)}function u(){const p=m(i).trim();!p||p in X.frontmatter||(X.updateFrontmatterField(p,""),L(i,""))}function f(p){X.updateFrontmatterField(p,void 0)}var d=ln(),h=ot(d);{var g=p=>{var O=o$();let v;var b=q(O);b.__click=()=>{X.frontmatterOpen=!X.frontmatterOpen},b.__keydown=I=>{(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),X.frontmatterOpen=!X.frontmatterOpen)};var _=q(b);let A;var y=R(_,2),w=R(q(y));{var S=I=>{var W=t$(),U=q(W),ae=R(U);{var ce=H=>{var se=e$(),ie=q(se);fe(B=>Ee(ie,`— ${B??""}`),[()=>m(l)()]),j(H,se)},K=me(()=>m(l)());ue(ae,H=>{m(K)&&H(ce)})}fe(()=>Ee(U,`${m(a)??""} `)),j(I,W)};ue(w,I=>{!X.frontmatterOpen&&m(a)&&I(S)})}var C=R(y,2);{var x=I=>{var W=n$();W.__click=H=>H.stopPropagation(),W.__keydown=H=>H.stopPropagation();var U=q(W);let ae;U.__click=()=>{X.frontmatterRawMode=!1};var ce=R(U,2);let K;ce.__click=()=>{X.frontmatterRawMode=!0},fe(()=>{ae=Ze(U,1,"fm-editor__mode-btn svelte-7izpdj",null,ae,{active:!X.frontmatterRawMode}),K=Ze(ce,1,"fm-editor__mode-btn svelte-7izpdj",null,K,{active:X.frontmatterRawMode})}),j(I,W)};ue(C,I=>{X.frontmatterOpen&&!t()&&I(x)})}var k=R(b,2);let E;var T=q(k),$=q(T),M=q($);{var P=I=>{JE(I,{})},D=I=>{var W=s$(),U=q(W),ae=R(q(U),2);ae.__input=xe=>c("title",xe.target.value);var ce=R(U,2),K=R(q(ce),2);K.__input=xe=>c("description",xe.target.value),Et(K,"rows",2);var H=R(ce,2),se=R(q(H),2);se.__input=xe=>c("slug",xe.target.value);var ie=R(H,2),B=q(ie),J=R(q(B),2);J.__input=xe=>c("author",xe.target.value);var Ae=R(B,2),Qe=R(q(Ae),2);Qe.__input=xe=>c("date",xe.target.value);var Ne=R(ie,2),ge=q(Ne),Pe=R(q(ge),2);Pe.__input=xe=>{const mn=xe.target.value;c("order",mn===""?void 0:Number(mn))};var Ke=R(ge,2),Je=R(q(Ke),2);let We;Je.__click=()=>c("draft",X.frontmatter.draft===!0?void 0:!0),Je.__keydown=xe=>{(xe.key==="Enter"||xe.key===" ")&&(xe.preventDefault(),c("draft",X.frontmatter.draft===!0?void 0:!0))};var be=R(q(Je),2),Oe=q(be),Me=R(Ne,2),xt=R(q(Me),2);{let xe=me(()=>X.frontmatter.tags??[]);D_(xt,{get tags(){return m(xe)},onchange:mn=>c("tags",mn)})}var at=R(Me,2);{var st=xe=>{var mn=i$(),et=R(q(mn),2);$t(et,17,()=>m(s),Gt,(jt,In)=>{var le=me(()=>Mc(m(In),2));let ve=()=>m(le)[0],ke=()=>m(le)[1];var Ce=r$(),De=q(Ce),St=q(De),pt=R(De,2),Ue=q(pt);Ue.__input=bt=>c(ve(),bt.target.value);var At=R(Ue,2);At.__click=()=>f(ve()),fe(bt=>{Ee(St,ve()),on(Ue,bt),Et(At,"aria-label",`Remove ${ve()??""}`)},[()=>String(ke()??"")]),j(jt,Ce)}),j(xe,mn)};ue(at,xe=>{m(s).length>0&&xe(st)})}var kt=R(at,2),yn=q(kt);yn.__keydown=xe=>{xe.key==="Enter"&&(xe.preventDefault(),u())};var en=R(yn,2);en.__click=u,fe(xe=>{on(ae,X.frontmatter.title??""),on(K,X.frontmatter.description??""),on(se,X.frontmatter.slug??""),on(J,X.frontmatter.author??""),on(Qe,X.frontmatter.date??""),on(Pe,X.frontmatter.order??""),We=Ze(Je,1,"fm-toggle svelte-7izpdj",null,We,{active:X.frontmatter.draft===!0}),Et(Je,"aria-checked",X.frontmatter.draft===!0),Ee(Oe,X.frontmatter.draft===!0?"Draft":"Published"),en.disabled=xe},[()=>!m(i).trim()]),$n(yn,()=>m(i),xe=>L(i,xe)),j(I,W)};ue(M,I=>{X.frontmatterRawMode?I(P):I(D,!1)})}fe(()=>{v=Ze(O,1,"fm-editor svelte-7izpdj",null,v,{"fm-editor--layout":m(o)}),A=Ze(_,0,"fm-editor__chevron svelte-7izpdj",null,A,{collapsed:!X.frontmatterOpen}),E=Ze(k,1,"fm-editor__collapse svelte-7izpdj",null,E,{open:X.frontmatterOpen})}),j(p,O)};ue(h,p=>{X.currentPath&&p(g)})}j(n,d),vt()}Ut(["click","keydown","input"]);let Zp=[],q_=[];(()=>{let n="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?q_:Zp).push(t=t+n[e])})();function l$(n){if(n<768)return!1;for(let e=0,t=Zp.length;;){let r=e+t>>1;if(n<Zp[r])t=r;else if(n>=q_[r])e=r+1;else return!0;if(e==t)return!1}}function pb(n){return n>=127462&&n<=127487}const mb=8205;function c$(n,e,t=!0,r=!0){return(t?R_:u$)(n,e,r)}function R_(n,e,t){if(e==n.length)return e;e&&I_(n.charCodeAt(e))&&N_(n.charCodeAt(e-1))&&e--;let r=dh(n,e);for(e+=gb(r);e<n.length;){let i=dh(n,e);if(r==mb||i==mb||t&&l$(i))e+=gb(i),r=i;else if(pb(i)){let s=0,o=e-2;for(;o>=0&&pb(dh(n,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function u$(n,e,t){for(;e>0;){let r=R_(n,e-2,t);if(r<e)return r;e--}return 0}function dh(n,e){let t=n.charCodeAt(e);if(!N_(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return I_(r)?(t-55296<<10)+(r-56320)+65536:t}function I_(n){return n>=56320&&n<57344}function N_(n){return n>=55296&&n<56320}function gb(n){return n<65536?1:2}let Xt=class B_{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,r){[e,t]=Ra(this,e,t);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(t,this.length,i,1),Ii.from(i,this.length-(t-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Ra(this,e,t);let r=[];return this.decompose(e,t,r,0),Ii.from(r,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Xl(this),s=new Xl(e);for(let o=t,a=t;;){if(i.next(o),s.next(o),o=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(a+=i.value.length,i.done||a>=r)return!0}}iter(e=1){return new Xl(this,e)}iterRange(e,t=this.length){return new j_(this,e,t)}iterLines(e,t){let r;if(e==null)r=this.iter();else{t==null&&(t=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new z_(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?B_.empty:e.length<=32?new xn(e):Ii.from(xn.split(e,[]))}};class xn extends Xt{constructor(e,t=f$(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,r,i){for(let s=0;;s++){let o=this.text[s],a=i+o.length;if((t?r:a)>=e)return new d$(i,a,r,o);i=a+1,r++}}decompose(e,t,r,i){let s=e<=0&&t>=this.length?this:new xn(Ob(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(i&1){let o=r.pop(),a=Ku(s.text,o.text.slice(),0,s.length);if(a.length<=32)r.push(new xn(a,o.length+s.length));else{let l=a.length>>1;r.push(new xn(a.slice(0,l)),new xn(a.slice(l)))}}else r.push(s)}replace(e,t,r){if(!(r instanceof xn))return super.replace(e,t,r);[e,t]=Ra(this,e,t);let i=Ku(this.text,Ku(r.text,Ob(this.text,0,e)),t),s=this.length+r.length-(t-e);return i.length<=32?new xn(i,s):Ii.from(xn.split(i,[]),s)}sliceString(e,t=this.length,r=`
145
- `){[e,t]=Ra(this,e,t);let i="";for(let s=0,o=0;s<=t&&o<this.text.length;o++){let a=this.text[o],l=s+a.length;s>e&&o&&(i+=r),e<l&&t>s&&(i+=a.slice(Math.max(0,e-s),t-s)),s=l+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let r=[],i=-1;for(let s of e)r.push(s),i+=s.length+1,r.length==32&&(t.push(new xn(r,i)),r=[],i=-1);return i>-1&&t.push(new xn(r,i)),t}}class Ii extends Xt{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,t,r,i){for(let s=0;;s++){let o=this.children[s],a=i+o.length,l=r+o.lines-1;if((t?l:a)>=e)return o.lineInner(e,t,r,i);i=a+1,r=l+1}}decompose(e,t,r,i){for(let s=0,o=0;o<=t&&s<this.children.length;s++){let a=this.children[s],l=o+a.length;if(e<=l&&t>=o){let c=i&((o<=e?1:0)|(l>=t?2:0));o>=e&&l<=t&&!c?r.push(a):a.decompose(e-o,t-o,r,c)}o=l+1}}replace(e,t,r){if([e,t]=Ra(this,e,t),r.lines<this.lines)for(let i=0,s=0;i<this.children.length;i++){let o=this.children[i],a=s+o.length;if(e>=s&&t<=a){let l=o.replace(e-s,t-s,r),c=this.lines-o.lines+l.lines;if(l.lines<c>>4&&l.lines>c>>6){let u=this.children.slice();return u[i]=l,new Ii(u,this.length-(t-e)+r.length)}return super.replace(s,a,l)}s=a+1}return super.replace(e,t,r)}sliceString(e,t=this.length,r=`
146
- `){[e,t]=Ra(this,e,t);let i="";for(let s=0,o=0;s<this.children.length&&o<=t;s++){let a=this.children[s],l=o+a.length;o>e&&s&&(i+=r),e<l&&t>o&&(i+=a.sliceString(e-o,t-o,r)),o=l+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Ii))return 0;let r=0,[i,s,o,a]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,s+=t){if(i==o||s==a)return r;let l=this.children[i],c=e.children[s];if(l!=c)return r+l.scanIdentical(c,t);r+=l.length+1}}static from(e,t=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let h of e)r+=h.lines;if(r<32){let h=[];for(let g of e)g.flatten(h);return new xn(h,t)}let i=Math.max(32,r>>5),s=i<<1,o=i>>1,a=[],l=0,c=-1,u=[];function f(h){let g;if(h.lines>s&&h instanceof Ii)for(let p of h.children)f(p);else h.lines>o&&(l>o||!l)?(d(),a.push(h)):h instanceof xn&&l&&(g=u[u.length-1])instanceof xn&&h.lines+g.lines<=32?(l+=h.lines,c+=h.length+1,u[u.length-1]=new xn(g.text.concat(h.text),g.length+1+h.length)):(l+h.lines>i&&d(),l+=h.lines,c+=h.length+1,u.push(h))}function d(){l!=0&&(a.push(u.length==1?u[0]:Ii.from(u,c)),c=-1,l=u.length=0)}for(let h of e)f(h);return d(),a.length==1?a[0]:new Ii(a,t)}}Xt.empty=new xn([""],0);function f$(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Ku(n,e,t=0,r=1e9){for(let i=0,s=0,o=!0;s<n.length&&i<=r;s++){let a=n[s],l=i+a.length;l>=t&&(l>r&&(a=a.slice(0,r-i)),i<t&&(a=a.slice(t-i)),o?(e[e.length-1]+=a,o=!1):e.push(a)),i=l+1}return e}function Ob(n,e,t){return Ku(n,[""],e,t)}class Xl{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof xn?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],s=this.offsets[r],o=s>>1,a=i instanceof xn?i.text.length:i.children.length;if(o==(t>0?a:0)){if(r==0)return this.done=!0,this.value="",this;t>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[r]+=t,e==0)return this.lineBreak=!0,this.value=`
147
- `,this;e--}else if(i instanceof xn){let l=i.text[o+(t<0?-1:0)];if(this.offsets[r]+=t,l.length>Math.max(0,e))return this.value=e==0?l:t>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=i.children[o+(t<0?-1:0)];e>l.length?(e-=l.length,this.offsets[r]+=t):(t<0&&this.offsets[r]--,this.nodes.push(l),this.offsets.push(t>0?1:(l instanceof xn?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class j_{constructor(e,t,r){this.value="",this.done=!1,this.cursor=new Xl(e,t>r?-1:1),this.pos=t>r?e.length:0,this.from=Math.min(t,r),this.to=Math.max(t,r)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let r=t<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=r?i:t<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class z_{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:r,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Xt.prototype[Symbol.iterator]=function(){return this.iter()},Xl.prototype[Symbol.iterator]=j_.prototype[Symbol.iterator]=z_.prototype[Symbol.iterator]=function(){return this});let d$=class{constructor(e,t,r,i){this.from=e,this.to=t,this.number=r,this.text=i}get length(){return this.to-this.from}};function Ra(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}function Zn(n,e,t=!0,r=!0){return c$(n,e,t,r)}function h$(n){return n>=56320&&n<57344}function p$(n){return n>=55296&&n<56320}function Ms(n,e){let t=n.charCodeAt(e);if(!p$(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return h$(r)?(t-55296<<10)+(r-56320)+65536:t}function Z_(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function mo(n){return n<65536?1:2}const Xp=/\r\n?|\n/;var or=(function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n})(or||(or={}));class Fi{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let r=this.sections[t+1];e+=r<0?this.sections[t]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,r=0,i=0;t<this.sections.length;){let s=this.sections[t++],o=this.sections[t++];o<0?(e(r,i,s),i+=s):i+=o,r+=s}}iterChangedRanges(e,t=!1){Fp(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let r=this.sections[t++],i=this.sections[t++];i<0?e.push(r,i):e.push(i,r)}return new Fi(e)}composeDesc(e){return this.empty?e:e.empty?this:X_(this,e)}mapDesc(e,t=!1){return e.empty?this:Vp(this,e,t)}mapPos(e,t=-1,r=or.Simple){let i=0,s=0;for(let o=0;o<this.sections.length;){let a=this.sections[o++],l=this.sections[o++],c=i+a;if(l<0){if(c>e)return s+(e-i);s+=a}else{if(r!=or.Simple&&c>=e&&(r==or.TrackDel&&i<e&&c>e||r==or.TrackBefore&&i<e||r==or.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!a)return e==i||t<0?s:s+l;s+=l}i=c}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return s}touchesRange(e,t=e){for(let r=0,i=0;r<this.sections.length&&i<=t;){let s=this.sections[r++],o=this.sections[r++],a=i+s;if(o>=0&&i<=t&&a>=e)return i<e&&a>t?"cover":!0;i=a}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let r=this.sections[t++],i=this.sections[t++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Fi(e)}static create(e){return new Fi(e)}}class qn extends Fi{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Fp(this,(t,r,i,s,o)=>e=e.replace(i,i+(r-t),o),!1),e}mapDesc(e,t=!1){return Vp(this,e,t,!0)}invert(e){let t=this.sections.slice(),r=[];for(let i=0,s=0;i<t.length;i+=2){let o=t[i],a=t[i+1];if(a>=0){t[i]=a,t[i+1]=o;let l=i>>1;for(;r.length<l;)r.push(Xt.empty);r.push(o?e.slice(s,s+o):Xt.empty)}s+=o}return new qn(t,r)}compose(e){return this.empty?e:e.empty?this:X_(this,e,!0)}map(e,t=!1){return e.empty?this:Vp(this,e,t,!0)}iterChanges(e,t=!1){Fp(this,e,t)}get desc(){return Fi.create(this.sections)}filter(e){let t=[],r=[],i=[],s=new oc(this);e:for(let o=0,a=0;;){let l=o==e.length?1e9:e[o++];for(;a<l||a==l&&s.len==0;){if(s.done)break e;let u=Math.min(s.len,l-a);Kn(i,u,-1);let f=s.ins==-1?-1:s.off==0?s.ins:0;Kn(t,u,f),f>0&&Ns(r,t,s.text),s.forward(u),a+=u}let c=e[o++];for(;a<c;){if(s.done)break e;let u=Math.min(s.len,c-a);Kn(t,u,-1),Kn(i,u,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(u),a+=u}}return{changes:new qn(t,r),filtered:Fi.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let r=this.sections[t],i=this.sections[t+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,r){let i=[],s=[],o=0,a=null;function l(u=!1){if(!u&&!i.length)return;o<t&&Kn(i,t-o,-1);let f=new qn(i,s);a=a?a.compose(f.map(a)):f,i=[],s=[],o=0}function c(u){if(Array.isArray(u))for(let f of u)c(f);else if(u instanceof qn){if(u.length!=t)throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${t})`);l(),a=a?a.compose(u.map(a)):u}else{let{from:f,to:d=f,insert:h}=u;if(f>d||f<0||d>t)throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${t})`);let g=h?typeof h=="string"?Xt.of(h.split(r||Xp)):h:Xt.empty,p=g.length;if(f==d&&p==0)return;f<o&&l(),f>o&&Kn(i,f-o,-1),Kn(i,d-f,p),Ns(s,i,g),o=d}}return c(e),l(!a),a}static empty(e){return new qn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],r=[];for(let i=0;i<e.length;i++){let s=e[i];if(typeof s=="number")t.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,a)=>a&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;r.length<i;)r.push(Xt.empty);r[i]=Xt.of(s.slice(1)),t.push(s[0],r[i].length)}}}return new qn(t,r)}static createSet(e,t){return new qn(e,t)}}function Kn(n,e,t,r=!1){if(e==0&&t<=0)return;let i=n.length-2;i>=0&&t<=0&&t==n[i+1]?n[i]+=e:i>=0&&e==0&&n[i]==0?n[i+1]+=t:r?(n[i]+=e,n[i+1]+=t):n.push(e,t)}function Ns(n,e,t){if(t.length==0)return;let r=e.length-2>>1;if(r<n.length)n[n.length-1]=n[n.length-1].append(t);else{for(;n.length<r;)n.push(Xt.empty);n.push(t)}}function Fp(n,e,t){let r=n.inserted;for(let i=0,s=0,o=0;o<n.sections.length;){let a=n.sections[o++],l=n.sections[o++];if(l<0)i+=a,s+=a;else{let c=i,u=s,f=Xt.empty;for(;c+=a,u+=l,l&&r&&(f=f.append(r[o-2>>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)a=n.sections[o++],l=n.sections[o++];e(i,c,s,u,f),i=c,s=u}}}function Vp(n,e,t,r=!1){let i=[],s=r?[]:null,o=new oc(n),a=new oc(e);for(let l=-1;;){if(o.done&&a.len||a.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&a.ins==-1){let c=Math.min(o.len,a.len);Kn(i,c,-1),o.forward(c),a.forward(c)}else if(a.ins>=0&&(o.ins<0||l==o.i||o.off==0&&(a.len<o.len||a.len==o.len&&!t))){let c=a.len;for(Kn(i,a.ins,-1);c;){let u=Math.min(o.len,c);o.ins>=0&&l<o.i&&o.len<=u&&(Kn(i,0,o.ins),s&&Ns(s,i,o.text),l=o.i),o.forward(u),c-=u}a.next()}else if(o.ins>=0){let c=0,u=o.len;for(;u;)if(a.ins==-1){let f=Math.min(u,a.len);c+=f,u-=f,a.forward(f)}else if(a.ins==0&&a.len<u)u-=a.len,a.next();else break;Kn(i,c,l<o.i?o.ins:0),s&&l<o.i&&Ns(s,i,o.text),l=o.i,o.forward(o.len-u)}else{if(o.done&&a.done)return s?qn.createSet(i,s):Fi.create(i);throw new Error("Mismatched change set lengths")}}}function X_(n,e,t=!1){let r=[],i=t?[]:null,s=new oc(n),o=new oc(e);for(let a=!1;;){if(s.done&&o.done)return i?qn.createSet(r,i):Fi.create(r);if(s.ins==0)Kn(r,s.len,0,a),s.next();else if(o.len==0&&!o.done)Kn(r,0,o.ins,a),i&&Ns(i,r,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let l=Math.min(s.len2,o.len),c=r.length;if(s.ins==-1){let u=o.ins==-1?-1:o.off?0:o.ins;Kn(r,l,u,a),i&&u&&Ns(i,r,o.text)}else o.ins==-1?(Kn(r,s.off?0:s.len,l,a),i&&Ns(i,r,s.textBit(l))):(Kn(r,s.off?0:s.len,o.off?0:o.ins,a),i&&!o.off&&Ns(i,r,o.text));a=(s.ins>l||o.ins>=0&&o.len>l)&&(a||r.length>c),s.forward2(l),o.forward(l)}}}}class oc{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?Xt.empty:e[t]}textBit(e){let{inserted:t}=this.set,r=this.i-2>>1;return r>=t.length&&!e?Xt.empty:t[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ko{constructor(e,t,r){this.from=e,this.to=t,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,t):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new ko(r,i,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return pe.range(e,t);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return pe.range(this.anchor,r)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return pe.range(e.anchor,e.head)}static create(e,t,r){return new ko(e,t,r)}}class pe{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:pe.create(this.ranges.map(r=>r.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new pe([this.main],0)}addRange(e,t=!0){return pe.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let r=this.ranges.slice();return r[t]=e,pe.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new pe(e.ranges.map(t=>ko.fromJSON(t)),e.main)}static single(e,t=e){return new pe([pe.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let s=e[i];if(s.empty?s.from<=r:s.from<r)return pe.normalized(e.slice(),t);r=s.to}return new pe(e,t)}static cursor(e,t=0,r,i){return ko.create(e,e,(t==0?0:t<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,t,r,i){let s=(r??16777215)<<6|(i==null?7:Math.min(6,i));return t<e?ko.create(t,e,48|s):ko.create(e,t,(t>e?8:0)|s)}static normalized(e,t=0){let r=e[t];e.sort((i,s)=>i.from-s.from),t=e.indexOf(r);for(let i=1;i<e.length;i++){let s=e[i],o=e[i-1];if(s.empty?s.from<=o.to:s.from<o.to){let a=o.from,l=Math.max(s.to,o.to);i<=t&&t--,e.splice(--i,2,s.anchor>s.head?pe.range(l,a):pe.range(a,l))}}return new pe(e,t)}}function F_(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let rO=0;class Be{constructor(e,t,r,i,s){this.combine=e,this.compareInput=t,this.compare=r,this.isStatic=i,this.id=rO++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new Be(e.combine||(t=>t),e.compareInput||((t,r)=>t===r),e.compare||(e.combine?(t,r)=>t===r:iO),!!e.static,e.enables)}of(e){return new Ju([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ju(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ju(e,this,2,t)}from(e,t){return t||(t=r=>r),this.compute([e],r=>t(r.field(e)))}}function iO(n,e){return n==e||n.length==e.length&&n.every((t,r)=>t===e[r])}class Ju{constructor(e,t,r,i){this.dependencies=e,this.facet=t,this.type=r,this.value=i,this.id=rO++}dynamicSlot(e){var t;let r=this.value,i=this.facet.compareInput,s=this.id,o=e[s]>>1,a=this.type==2,l=!1,c=!1,u=[];for(let f of this.dependencies)f=="doc"?l=!0:f=="selection"?c=!0:(((t=e[f.id])!==null&&t!==void 0?t:1)&1)==0&&u.push(e[f.id]);return{create(f){return f.values[o]=r(f),1},update(f,d){if(l&&d.docChanged||c&&(d.docChanged||d.selection)||Wp(f,u)){let h=r(f);if(a?!vb(h,f.values[o],i):!i(h,f.values[o]))return f.values[o]=h,1}return 0},reconfigure:(f,d)=>{let h,g=d.config.address[s];if(g!=null){let p=xf(d,g);if(this.dependencies.every(O=>O instanceof Be?d.facet(O)===f.facet(O):O instanceof li?d.field(O,!1)==f.field(O,!1):!0)||(a?vb(h=r(f),p,i):i(h=r(f),p)))return f.values[o]=p,0}else h=r(f);return f.values[o]=h,1}}}}function vb(n,e,t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!t(n[r],e[r]))return!1;return!0}function Wp(n,e){let t=!1;for(let r of e)Fl(n,r)&1&&(t=!0);return t}function m$(n,e,t){let r=t.map(l=>n[l.id]),i=t.map(l=>l.type),s=r.filter(l=>!(l&1)),o=n[e.id]>>1;function a(l){let c=[];for(let u=0;u<r.length;u++){let f=xf(l,r[u]);if(i[u]==2)for(let d of f)c.push(d);else c.push(f)}return e.combine(c)}return{create(l){for(let c of r)Fl(l,c);return l.values[o]=a(l),1},update(l,c){if(!Wp(l,s))return 0;let u=a(l);return e.compare(u,l.values[o])?0:(l.values[o]=u,1)},reconfigure(l,c){let u=Wp(l,r),f=c.config.facets[e.id],d=c.facet(e);if(f&&!u&&iO(t,f))return l.values[o]=d,0;let h=a(l);return e.compare(h,d)?(l.values[o]=d,0):(l.values[o]=h,1)}}}const ou=Be.define({static:!0});class li{constructor(e,t,r,i,s){this.id=e,this.createF=t,this.updateF=r,this.compareF=i,this.spec=s,this.provides=void 0}static define(e){let t=new li(rO++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(ou).find(r=>r.field==this);return(t?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:r=>(r.values[t]=this.create(r),1),update:(r,i)=>{let s=r.values[t],o=this.updateF(s,i);return this.compareF(s,o)?0:(r.values[t]=o,1)},reconfigure:(r,i)=>{let s=r.facet(ou),o=i.facet(ou),a;return(a=s.find(l=>l.field==this))&&a!=o.find(l=>l.field==this)?(r.values[t]=a.create(r),1):i.config.address[this.id]!=null?(r.values[t]=i.field(this),0):(r.values[t]=this.create(r),1)}}}init(e){return[this,ou.of({field:this,create:e})]}get extension(){return this}}const go={lowest:4,low:3,default:2,high:1,highest:0};function ml(n){return e=>new V_(e,n)}const io={highest:ml(go.highest),high:ml(go.high),default:ml(go.default),low:ml(go.low),lowest:ml(go.lowest)};class V_{constructor(e,t){this.inner=e,this.prec=t}}class ms{of(e){return new Yp(this,e)}reconfigure(e){return ms.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Yp{constructor(e,t){this.compartment=e,this.inner=t}}class kf{constructor(e,t,r,i,s,o){for(this.base=e,this.compartments=t,this.dynamicSlots=r,this.address=i,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,r){let i=[],s=Object.create(null),o=new Map;for(let d of g$(e,t,o))d instanceof li?i.push(d):(s[d.facet.id]||(s[d.facet.id]=[])).push(d);let a=Object.create(null),l=[],c=[];for(let d of i)a[d.id]=c.length<<1,c.push(h=>d.slot(h));let u=r?.config.facets;for(let d in s){let h=s[d],g=h[0].facet,p=u&&u[d]||[];if(h.every(O=>O.type==0))if(a[g.id]=l.length<<1|1,iO(p,h))l.push(r.facet(g));else{let O=g.combine(h.map(v=>v.value));l.push(r&&g.compare(O,r.facet(g))?r.facet(g):O)}else{for(let O of h)O.type==0?(a[O.id]=l.length<<1|1,l.push(O.value)):(a[O.id]=c.length<<1,c.push(v=>O.dynamicSlot(v)));a[g.id]=c.length<<1,c.push(O=>m$(O,g,h))}}let f=c.map(d=>d(a));return new kf(e,o,f,a,l,s)}}function g$(n,e,t){let r=[[],[],[],[],[]],i=new Map;function s(o,a){let l=i.get(o);if(l!=null){if(l<=a)return;let c=r[l].indexOf(o);c>-1&&r[l].splice(c,1),o instanceof Yp&&t.delete(o.compartment)}if(i.set(o,a),Array.isArray(o))for(let c of o)s(c,a);else if(o instanceof Yp){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(o.compartment)||o.inner;t.set(o.compartment,c),s(c,a)}else if(o instanceof V_)s(o.inner,o.prec);else if(o instanceof li)r[a].push(o),o.provides&&s(o.provides,a);else if(o instanceof Ju)r[a].push(o),o.facet.extensions&&s(o.facet.extensions,go.default);else{let c=o.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(c,a)}}return s(n,go.default),r.reduce((o,a)=>o.concat(a))}function Fl(n,e){if(e&1)return 2;let t=e>>1,r=n.status[t];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;n.status[t]=4;let i=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|i}function xf(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const W_=Be.define(),Up=Be.define({combine:n=>n.some(e=>e),static:!0}),Y_=Be.define({combine:n=>n.length?n[0]:void 0,static:!0}),U_=Be.define(),G_=Be.define(),H_=Be.define(),K_=Be.define({combine:n=>n.length?n[0]:!1});class ks{constructor(e,t){this.type=e,this.value=t}static define(){return new O$}}class O${of(e){return new ks(this,e)}}class v${constructor(e){this.map=e}of(e){return new qt(this,e)}}class qt{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new qt(this.type,t)}is(e){return this.type==e}static define(e={}){return new v$(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let r=[];for(let i of e){let s=i.map(t);s&&r.push(s)}return r}}qt.reconfigure=qt.define();qt.appendConfig=qt.define();class Tn{constructor(e,t,r,i,s,o){this.startState=e,this.changes=t,this.selection=r,this.effects=i,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,r&&F_(r,t.newLength),s.some(a=>a.type==Tn.time)||(this.annotations=s.concat(Tn.time.of(Date.now())))}static create(e,t,r,i,s,o){return new Tn(e,t,r,i,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Tn.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}Tn.time=ks.define();Tn.userEvent=ks.define();Tn.addToHistory=ks.define();Tn.remote=ks.define();function b$(n,e){let t=[];for(let r=0,i=0;;){let s,o;if(r<n.length&&(i==e.length||e[i]>=n[r]))s=n[r++],o=n[r++];else if(i<e.length)s=e[i++],o=e[i++];else return t;!t.length||t[t.length-1]<s?t.push(s,o):t[t.length-1]<o&&(t[t.length-1]=o)}}function J_(n,e,t){var r;let i,s,o;return t?(i=e.changes,s=qn.empty(e.changes.length),o=n.changes.compose(e.changes)):(i=e.changes.map(n.changes),s=n.changes.mapDesc(e.changes,!0),o=n.changes.compose(i)),{changes:o,selection:e.selection?e.selection.map(s):(r=n.selection)===null||r===void 0?void 0:r.map(i),effects:qt.mapEffects(n.effects,i).concat(qt.mapEffects(e.effects,s)),annotations:n.annotations.length?n.annotations.concat(e.annotations):e.annotations,scrollIntoView:n.scrollIntoView||e.scrollIntoView}}function Gp(n,e,t){let r=e.selection,i=ka(e.annotations);return e.userEvent&&(i=i.concat(Tn.userEvent.of(e.userEvent))),{changes:e.changes instanceof qn?e.changes:qn.of(e.changes||[],t,n.facet(Y_)),selection:r&&(r instanceof pe?r:pe.single(r.anchor,r.head)),effects:ka(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function ek(n,e,t){let r=Gp(n,e.length?e[0]:{},n.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(t=!1);let o=!!e[s].sequential;r=J_(r,Gp(n,e[s],o?r.changes.newLength:n.doc.length),o)}let i=Tn.create(n,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return w$(t?y$(i):i)}function y$(n){let e=n.startState,t=!0;for(let i of e.facet(U_)){let s=i(n);if(s===!1){t=!1;break}Array.isArray(s)&&(t=t===!0?s:b$(t,s))}if(t!==!0){let i,s;if(t===!1)s=n.changes.invertedDesc,i=qn.empty(e.doc.length);else{let o=n.changes.filter(t);i=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}n=Tn.create(e,i,n.selection&&n.selection.map(s),qt.mapEffects(n.effects,s),n.annotations,n.scrollIntoView)}let r=e.facet(G_);for(let i=r.length-1;i>=0;i--){let s=r[i](n);s instanceof Tn?n=s:Array.isArray(s)&&s.length==1&&s[0]instanceof Tn?n=s[0]:n=ek(e,ka(s),!1)}return n}function w$(n){let e=n.startState,t=e.facet(H_),r=n;for(let i=t.length-1;i>=0;i--){let s=t[i](n);s&&Object.keys(s).length&&(r=J_(r,Gp(e,s,n.changes.newLength),!0))}return r==n?n:Tn.create(e,n.changes,n.selection,r.effects,r.annotations,r.scrollIntoView)}const _$=[];function ka(n){return n==null?_$:Array.isArray(n)?n:[n]}var An=(function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n})(An||(An={}));const k$=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Hp;try{Hp=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function x$(n){if(Hp)return Hp.test(n);for(let e=0;e<n.length;e++){let t=n[e];if(/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||k$.test(t)))return!0}return!1}function S$(n){return e=>{if(!/\S/.test(e))return An.Space;if(x$(e))return An.Word;for(let t=0;t<n.length;t++)if(e.indexOf(n[t])>-1)return An.Word;return An.Other}}class Lt{constructor(e,t,r,i,s,o){this.config=e,this.doc=t,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)Fl(this,a<<1);this.computeSlot=null}field(e,t=!0){let r=this.config.address[e.id];if(r==null){if(t)throw new RangeError("Field is not present in this state");return}return Fl(this,r),xf(this,r)}update(...e){return ek(this,e,!0)}applyTransaction(e){let t=this.config,{base:r,compartments:i}=t;for(let a of e.effects)a.is(ms.reconfigure)?(t&&(i=new Map,t.compartments.forEach((l,c)=>i.set(c,l)),t=null),i.set(a.value.compartment,a.value.extension)):a.is(qt.reconfigure)?(t=null,r=a.value):a.is(qt.appendConfig)&&(t=null,r=ka(r).concat(a.value));let s;t?s=e.startState.values.slice():(t=kf.resolve(r,i,this),s=new Lt(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(l,c)=>c.reconfigure(l,this),null).values);let o=e.startState.facet(Up)?e.newSelection:e.newSelection.asSingle();new Lt(t,e.newDoc,o,s,(a,l)=>l.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:pe.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,r=e(t.ranges[0]),i=this.changes(r.changes),s=[r.range],o=ka(r.effects);for(let a=1;a<t.ranges.length;a++){let l=e(t.ranges[a]),c=this.changes(l.changes),u=c.map(i);for(let d=0;d<a;d++)s[d]=s[d].map(u);let f=i.mapDesc(c,!0);s.push(l.range.map(f)),i=i.compose(u),o=qt.mapEffects(o,u).concat(qt.mapEffects(ka(l.effects),f))}return{changes:i,selection:pe.create(s,t.mainIndex),effects:o}}changes(e=[]){return e instanceof qn?e:qn.of(e,this.doc.length,this.facet(Lt.lineSeparator))}toText(e){return Xt.of(e.split(this.facet(Lt.lineSeparator)||Xp))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(Fl(this,t),xf(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof li&&this.config.address[i.id]!=null&&(t[r]=i.spec.toJSON(this.field(e[r]),this))}return t}static fromJSON(e,t={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let s in r)if(Object.prototype.hasOwnProperty.call(e,s)){let o=r[s],a=e[s];i.push(o.init(l=>o.spec.fromJSON(a,l)))}}return Lt.create({doc:e.doc,selection:pe.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=kf.resolve(e.extensions||[],new Map),r=e.doc instanceof Xt?e.doc:Xt.of((e.doc||"").split(t.staticFacet(Lt.lineSeparator)||Xp)),i=e.selection?e.selection instanceof pe?e.selection:pe.single(e.selection.anchor,e.selection.head):pe.single(0);return F_(i,r.length),t.staticFacet(Up)||(i=i.asSingle()),new Lt(t,r,i,t.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(Lt.tabSize)}get lineBreak(){return this.facet(Lt.lineSeparator)||`
148
- `}get readOnly(){return this.facet(K_)}phrase(e,...t){for(let r of this.facet(Lt.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let s=+(i||1);return!s||s>t.length?r:t[s-1]})),e}languageDataAt(e,t,r=-1){let i=[];for(let s of this.facet(W_))for(let o of s(this,t,r))Object.prototype.hasOwnProperty.call(o,e)&&i.push(o[e]);return i}charCategorizer(e){let t=this.languageDataAt("wordChars",e);return S$(t.length?t[0]:"")}wordAt(e){let{text:t,from:r,length:i}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-r,a=e-r;for(;o>0;){let l=Zn(t,o,!1);if(s(t.slice(l,o))!=An.Word)break;o=l}for(;a<i;){let l=Zn(t,a);if(s(t.slice(a,l))!=An.Word)break;a=l}return o==a?null:pe.range(o+r,a+r)}}Lt.allowMultipleSelections=Up;Lt.tabSize=Be.define({combine:n=>n.length?n[0]:4});Lt.lineSeparator=Y_;Lt.readOnly=K_;Lt.phrases=Be.define({compare(n,e){let t=Object.keys(n),r=Object.keys(e);return t.length==r.length&&t.every(i=>n[i]==e[i])}});Lt.languageData=W_;Lt.changeFilter=U_;Lt.transactionFilter=G_;Lt.transactionExtender=H_;ms.reconfigure=qt.define();function jc(n,e,t={}){let r={};for(let i of n)for(let s of Object.keys(i)){let o=i[s],a=r[s];if(a===void 0)r[s]=o;else if(!(a===o||o===void 0))if(Object.hasOwnProperty.call(t,s))r[s]=t[s](a,o);else throw new Error("Config merge conflict for field "+s)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class Us{eq(e){return this==e}range(e,t=e){return Kp.create(e,t,this)}}Us.prototype.startSide=Us.prototype.endSide=0;Us.prototype.point=!1;Us.prototype.mapMode=or.TrackDel;function sO(n,e){return n==e||n.constructor==e.constructor&&n.eq(e)}let Kp=class tk{constructor(e,t,r){this.from=e,this.to=t,this.value=r}static create(e,t,r){return new tk(e,t,r)}};function Jp(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class oO{constructor(e,t,r,i){this.from=e,this.to=t,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,r,i=0){let s=r?this.to:this.from;for(let o=i,a=s.length;;){if(o==a)return o;let l=o+a>>1,c=s[l]-e||(r?this.value[l].endSide:this.value[l].startSide)-t;if(l==o)return c>=0?o:a;c>=0?a=l:o=l+1}}between(e,t,r,i){for(let s=this.findIndex(t,-1e9,!0),o=this.findIndex(r,1e9,!1,s);s<o;s++)if(i(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,t){let r=[],i=[],s=[],o=-1,a=-1;for(let l=0;l<this.value.length;l++){let c=this.value[l],u=this.from[l]+e,f=this.to[l]+e,d,h;if(u==f){let g=t.mapPos(u,c.startSide,c.mapMode);if(g==null||(d=h=g,c.startSide!=c.endSide&&(h=t.mapPos(u,c.endSide),h<d)))continue}else if(d=t.mapPos(u,c.startSide),h=t.mapPos(f,c.endSide),d>h||d==h&&c.startSide>0&&c.endSide<=0)continue;(h-d||c.endSide-c.startSide)<0||(o<0&&(o=d),c.point&&(a=Math.max(a,h-d)),r.push(c),i.push(d-o),s.push(h-o))}return{mapped:r.length?new oO(i,s,r,a):null,pos:o}}}class Dt{constructor(e,t,r,i){this.chunkPos=e,this.chunk=t,this.nextLayer=r,this.maxPoint=i}static create(e,t,r,i){return new Dt(e,t,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:r=!1,filterFrom:i=0,filterTo:s=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(r&&(t=t.slice().sort(Jp)),this.isEmpty)return t.length?Dt.of(t):this;let a=new nk(this,null,-1).goto(0),l=0,c=[],u=new qo;for(;a.value||l<t.length;)if(l<t.length&&(a.from-t[l].from||a.startSide-t[l].value.startSide)>=0){let f=t[l++];u.addInner(f.from,f.to,f.value)||c.push(f)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(l==t.length||this.chunkEnd(a.chunkIndex)<t[l].from)&&(!o||i>this.chunkEnd(a.chunkIndex)||s<this.chunkPos[a.chunkIndex])&&u.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!o||i>a.to||s<a.from||o(a.from,a.to,a.value))&&(u.addInner(a.from,a.to,a.value)||c.push(Kp.create(a.from,a.to,a.value))),a.next());return u.finishInner(this.nextLayer.isEmpty&&!c.length?Dt.empty:this.nextLayer.update({add:c,filter:o,filterFrom:i,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],r=[],i=-1;for(let o=0;o<this.chunk.length;o++){let a=this.chunkPos[o],l=this.chunk[o],c=e.touchesRange(a,a+l.length);if(c===!1)i=Math.max(i,l.maxPoint),t.push(l),r.push(e.mapPos(a));else if(c===!0){let{mapped:u,pos:f}=l.map(a,e);u&&(i=Math.max(i,u.maxPoint),t.push(u),r.push(f))}}let s=this.nextLayer.map(e);return t.length==0?s:new Dt(r,t,s||Dt.empty,i)}between(e,t,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],o=this.chunk[i];if(t>=s&&e<=s+o.length&&o.between(s,e-s,t-s,r)===!1)return}this.nextLayer.between(e,t,r)}}iter(e=0){return ac.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return ac.from(e).goto(t)}static compare(e,t,r,i,s=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),a=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),l=bb(o,a,r),c=new gl(o,l,s),u=new gl(a,l,s);r.iterGaps((f,d,h)=>yb(c,f,u,d,h,i)),r.empty&&r.length==0&&yb(c,0,u,0,0,i)}static eq(e,t,r=0,i){i==null&&(i=999999999);let s=e.filter(u=>!u.isEmpty&&t.indexOf(u)<0),o=t.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let a=bb(s,o),l=new gl(s,a,0).goto(r),c=new gl(o,a,0).goto(r);for(;;){if(l.to!=c.to||!em(l.active,c.active)||l.point&&(!c.point||!sO(l.point,c.point)))return!1;if(l.to>i)return!0;l.next(),c.next()}}static spans(e,t,r,i,s=-1){let o=new gl(e,null,s).goto(t),a=t,l=o.openStart;for(;;){let c=Math.min(o.to,r);if(o.point){let u=o.activeForPoint(o.to),f=o.pointFrom<t?u.length+1:o.point.startSide<0?u.length:Math.min(u.length,l);i.point(a,c,o.point,u,f,o.pointRank),l=Math.min(o.openEnd(c),u.length)}else c>a&&(i.span(a,c,o.active,l),l=o.openEnd(c));if(o.to>r)return l+(o.point&&o.to>r?1:0);a=o.to,o.next()}}static of(e,t=!1){let r=new qo;for(let i of e instanceof Kp?[e]:t?A$(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return Dt.empty;let t=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=Dt.empty;i=i.nextLayer)t=new Dt(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}}Dt.empty=new Dt([],[],null,-1);function A$(n){if(n.length>1)for(let e=n[0],t=1;t<n.length;t++){let r=n[t];if(Jp(e,r)>0)return n.slice().sort(Jp);e=r}return n}Dt.empty.nextLayer=Dt.empty;class qo{finishChunk(e){this.chunks.push(new oO(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,r){this.addInner(e,t,r)||(this.nextLayer||(this.nextLayer=new qo)).add(e,t,r)}addInner(e,t,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=t,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let r=t.value.length-1;return this.last=t.value[r],this.lastFrom=t.from[r]+e,this.lastTo=t.to[r]+e,!0}finish(){return this.finishInner(Dt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=Dt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function bb(n,e,t){let r=new Map;for(let s of n)for(let o=0;o<s.chunk.length;o++)s.chunk[o].maxPoint<=0&&r.set(s.chunk[o],s.chunkPos[o]);let i=new Set;for(let s of e)for(let o=0;o<s.chunk.length;o++){let a=r.get(s.chunk[o]);a!=null&&(t?t.mapPos(a):a)==s.chunkPos[o]&&!t?.touchesRange(a,a+s.chunk[o].length)&&i.add(s.chunk[o])}return i}class nk{constructor(e,t,r,i=0){this.layer=e,this.skip=t,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],r=e+t.from[this.rangeIndex];if(this.from=r,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class ac{constructor(e){this.heap=e}static from(e,t=null,r=-1){let i=[];for(let s=0;s<e.length;s++)for(let o=e[s];!o.isEmpty;o=o.nextLayer)o.maxPoint>=r&&i.push(new nk(o,t,r,s));return i.length==1?i[0]:new ac(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let r of this.heap)r.goto(e,t);for(let r=this.heap.length>>1;r>=0;r--)hh(this.heap,r);return this.next(),this}forward(e,t){for(let r of this.heap)r.forward(e,t);for(let r=this.heap.length>>1;r>=0;r--)hh(this.heap,r);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),hh(this.heap,0)}}}function hh(n,e){for(let t=n[e];;){let r=(e<<1)+1;if(r>=n.length)break;let i=n[r];if(r+1<n.length&&i.compare(n[r+1])>=0&&(i=n[r+1],r++),t.compare(i)<0)break;n[r]=t,n[e]=i,e=r}}class gl{constructor(e,t,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=ac.from(e,t,r)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){au(this.active,e),au(this.activeTo,e),au(this.activeRank,e),this.minActive=wb(this.active,this.activeTo)}addActive(e){let t=0,{value:r,to:i,rank:s}=this.cursor;for(;t<this.activeRank.length&&(s-this.activeRank[t]||i-this.activeTo[t])>0;)t++;lu(this.active,t,r),lu(this.activeTo,t,i),lu(this.activeRank,t,s),e&&lu(e,t,this.cursor.from),this.minActive=wb(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&au(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(r),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&t.push(this.active[r]);return t.reverse()}openEnd(e){let t=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)t++;return t}}function yb(n,e,t,r,i,s){n.goto(e),t.goto(r);let o=r+i,a=r,l=r-e,c=!!s.boundChange;for(let u=!1;;){let f=n.to+l-t.to,d=f||n.endSide-t.endSide,h=d<0?n.to+l:t.to,g=Math.min(h,o);if(n.point||t.point?(n.point&&t.point&&sO(n.point,t.point)&&em(n.activeForPoint(n.to),t.activeForPoint(t.to))||s.comparePoint(a,g,n.point,t.point),u=!1):(u&&s.boundChange(a),g>a&&!em(n.active,t.active)&&s.compareRange(a,g,n.active,t.active),c&&g<o&&(f||n.openEnd(h)!=t.openEnd(h))&&(u=!0)),h>o)break;a=h,d<=0&&n.next(),d>=0&&t.next()}}function em(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t]&&!sO(n[t],e[t]))return!1;return!0}function au(n,e){for(let t=e,r=n.length-1;t<r;t++)n[t]=n[t+1];n.pop()}function lu(n,e,t){for(let r=n.length-1;r>=e;r--)n[r+1]=n[r];n[e]=t}function wb(n,e){let t=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||n[i].endSide-n[t].endSide)<0&&(t=i,r=e[i]);return t}function vs(n,e,t=n.length){let r=0;for(let i=0;i<t&&i<n.length;)n.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=Zn(n,i));return r}function C$(n,e,t,r){for(let i=0,s=0;;){if(s>=e)return i;if(i==n.length)break;s+=n.charCodeAt(i)==9?t-s%t:1,i=Zn(n,i)}return n.length}const tm="ͼ",_b=typeof Symbol>"u"?"__"+tm:Symbol.for(tm),nm=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),kb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Gs{constructor(e,t){this.rules=[];let{finish:r}=t||{};function i(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function s(o,a,l,c){let u=[],f=/^@(\w+)\b/.exec(o[0]),d=f&&f[1]=="keyframes";if(f&&a==null)return l.push(o[0]+";");for(let h in a){let g=a[h];if(/&/.test(h))s(h.split(/,\s*/).map(p=>o.map(O=>p.replace(/&/,O))).reduce((p,O)=>p.concat(O)),g,l);else if(g&&typeof g=="object"){if(!f)throw new RangeError("The value of a property ("+h+") should be a primitive value.");s(i(h),g,u,d)}else g!=null&&u.push(h.replace(/_.*/,"").replace(/[A-Z]/g,p=>"-"+p.toLowerCase())+": "+g+";")}(u.length||d)&&l.push((r&&!f&&!c?o.map(r):o).join(", ")+" {"+u.join(" ")+"}")}for(let o in e)s(i(o),e[o],this.rules)}getRules(){return this.rules.join(`
149
- `)}static newName(){let e=kb[_b]||1;return kb[_b]=e+1,tm+e.toString(36)}static mount(e,t,r){let i=e[nm],s=r&&r.nonce;i?s&&i.setNonce(s):i=new T$(e,s),i.mount(Array.isArray(t)?t:[t],e)}}let xb=new Map;class T${constructor(e,t){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let s=xb.get(r);if(s)return e[nm]=s;this.sheet=new i.CSSStyleSheet,xb.set(r,this)}else this.styleTag=r.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[nm]=this}mount(e,t){let r=this.sheet,i=0,s=0;for(let o=0;o<e.length;o++){let a=e[o],l=this.modules.indexOf(a);if(l<s&&l>-1&&(this.modules.splice(l,1),s--,l=-1),l==-1){if(this.modules.splice(s++,0,a),r)for(let c=0;c<a.rules.length;c++)r.insertRule(a.rules[c],i++)}else{for(;s<l;)i+=this.modules[s++].rules.length;i+=a.rules.length,s++}}if(r)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let o="";for(let l=0;l<this.modules.length;l++)o+=this.modules[l].getRules()+`
150
- `;this.styleTag.textContent=o;let a=t.head||t;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var Hs={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},lc={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},P$=typeof navigator<"u"&&/Mac/.test(navigator.platform),E$=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Wn=0;Wn<10;Wn++)Hs[48+Wn]=Hs[96+Wn]=String(Wn);for(var Wn=1;Wn<=24;Wn++)Hs[Wn+111]="F"+Wn;for(var Wn=65;Wn<=90;Wn++)Hs[Wn]=String.fromCharCode(Wn+32),lc[Wn]=String.fromCharCode(Wn);for(var ph in Hs)lc.hasOwnProperty(ph)||(lc[ph]=Hs[ph]);function $$(n){var e=P$&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||E$&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?lc:Hs)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function jn(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=t[r];typeof i=="string"?n.setAttribute(r,i):i!=null&&(n[r]=i)}e++}for(;e<arguments.length;e++)rk(n,arguments[e]);return n}function rk(n,e){if(typeof e=="string")n.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)n.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)rk(n,e[t]);else throw new RangeError("Unsupported child node: "+e)}let sr=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},rm=typeof document<"u"?document:{documentElement:{style:{}}};const im=/Edge\/(\d+)/.exec(sr.userAgent),ik=/MSIE \d/.test(sr.userAgent),sm=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(sr.userAgent),Ld=!!(ik||sm||im),Sb=!Ld&&/gecko\/(\d+)/i.test(sr.userAgent),mh=!Ld&&/Chrome\/(\d+)/.exec(sr.userAgent),Q$="webkitFontSmoothing"in rm.documentElement.style,om=!Ld&&/Apple Computer/.test(sr.vendor),Ab=om&&(/Mobile\/\w+/.test(sr.userAgent)||sr.maxTouchPoints>2);var qe={mac:Ab||/Mac/.test(sr.platform),windows:/Win/.test(sr.platform),linux:/Linux|X11/.test(sr.platform),ie:Ld,ie_version:ik?rm.documentMode||6:sm?+sm[1]:im?+im[1]:0,gecko:Sb,gecko_version:Sb?+(/Firefox\/(\d+)/.exec(sr.userAgent)||[0,0])[1]:0,chrome:!!mh,chrome_version:mh?+mh[1]:0,ios:Ab,android:/Android\b/.test(sr.userAgent),webkit_version:Q$?+(/\bAppleWebKit\/(\d+)/.exec(sr.userAgent)||[0,0])[1]:0,safari:om,safari_version:om?+(/\bVersion\/(\d+(\.\d+)?)/.exec(sr.userAgent)||[0,0])[1]:0,tabSize:rm.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function aO(n,e){for(let t in n)t=="class"&&e.class?e.class+=" "+n.class:t=="style"&&e.style?e.style+=";"+n.style:e[t]=n[t];return e}const Sf=Object.create(null);function lO(n,e,t){if(n==e)return!0;n||(n=Sf),e||(e=Sf);let r=Object.keys(n),i=Object.keys(e);if(r.length-0!=i.length-0)return!1;for(let s of r)if(s!=t&&(i.indexOf(s)==-1||n[s]!==e[s]))return!1;return!0}function L$(n,e){for(let t=n.attributes.length-1;t>=0;t--){let r=n.attributes[t].name;e[r]==null&&n.removeAttribute(r)}for(let t in e){let r=e[t];t=="style"?n.style.cssText=r:n.getAttribute(t)!=r&&n.setAttribute(t,r)}}function Cb(n,e,t){let r=!1;if(e)for(let i in e)t&&i in t||(r=!0,i=="style"?n.style.cssText="":n.removeAttribute(i));if(t)for(let i in t)e&&e[i]==t[i]||(r=!0,i=="style"?n.style.cssText=t[i]:n.setAttribute(i,t[i]));return r}function M$(n){let e=Object.create(null);for(let t=0;t<n.attributes.length;t++){let r=n.attributes[t];e[r.name]=r.value}return e}class zc{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Cr=(function(n){return n[n.Text=0]="Text",n[n.WidgetBefore=1]="WidgetBefore",n[n.WidgetAfter=2]="WidgetAfter",n[n.WidgetRange=3]="WidgetRange",n})(Cr||(Cr={}));class gt extends Us{constructor(e,t,r,i){super(),this.startSide=e,this.endSide=t,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new Zc(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return t+=r&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new Ro(e,t,t,r,e.widget||null,!1)}static replace(e){let t=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:s,end:o}=sk(e,t);r=(s?t?-3e8:-1:5e8)-1,i=(o?t?2e8:1:-6e8)+1}return new Ro(e,r,i,t,e.widget||null,!0)}static line(e){return new Xc(e)}static set(e,t=!1){return Dt.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}gt.none=Dt.empty;class Zc extends gt{constructor(e){let{start:t,end:r}=sk(e);super(t?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?aO(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||Sf}eq(e){return this==e||e instanceof Zc&&this.tagName==e.tagName&&lO(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}Zc.prototype.point=!1;class Xc extends gt{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Xc&&this.spec.class==e.spec.class&&lO(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Xc.prototype.mapMode=or.TrackBefore;Xc.prototype.point=!0;class Ro extends gt{constructor(e,t,r,i,s,o){super(t,r,s,e),this.block=i,this.isReplace=o,this.mapMode=i?t<=0?or.TrackBefore:or.TrackAfter:or.TrackDel}get type(){return this.startSide!=this.endSide?Cr.WidgetRange:this.startSide<=0?Cr.WidgetBefore:Cr.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Ro&&D$(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}Ro.prototype.point=!0;function sk(n,e=!1){let{inclusiveStart:t,inclusiveEnd:r}=n;return t==null&&(t=n.inclusive),r==null&&(r=n.inclusive),{start:t??e,end:r??e}}function D$(n,e){return n==e||!!(n&&e&&n.compare(e))}function xa(n,e,t,r=0){let i=t.length-1;i>=0&&t[i]+r>=n?t[i]=Math.max(t[i],e):t.push(n,e)}class cc extends Us{constructor(e,t){super(),this.tagName=e,this.attributes=t}eq(e){return e==this||e instanceof cc&&this.tagName==e.tagName&&lO(this.attributes,e.attributes)}static create(e){return new cc(e.tagName,e.attributes||Sf)}static set(e,t=!1){return Dt.of(e,t)}}cc.prototype.startSide=cc.prototype.endSide=-1;function uc(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function am(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function Vl(n,e){if(!e.anchorNode)return!1;try{return am(n,e.anchorNode)}catch{return!1}}function ef(n){return n.nodeType==3?fc(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function Wl(n,e,t,r){return t?Tb(n,e,t,r,-1)||Tb(n,e,t,r,1):!1}function Ks(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function Af(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function Tb(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:bs(n))){if(n.nodeName=="DIV")return!1;let s=n.parentNode;if(!s||s.nodeType!=1)return!1;e=Ks(n)+(i<0?0:1),n=s}else if(n.nodeType==1){if(n=n.childNodes[e+(i<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=i<0?bs(n):0}else return!1}}function bs(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Cf(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function q$(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function ok(n,e){let t=e.width/n.offsetWidth,r=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-n.offsetHeight)<1)&&(r=1),{scaleX:t,scaleY:r}}function R$(n,e,t,r,i,s,o,a){let l=n.ownerDocument,c=l.defaultView||window;for(let u=n,f=!1;u&&!f;)if(u.nodeType==1){let d,h=u==l.body,g=1,p=1;if(h)d=q$(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(f=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let b=u.getBoundingClientRect();({scaleX:g,scaleY:p}=ok(u,b)),d={left:b.left,right:b.left+u.clientWidth*g,top:b.top,bottom:b.top+u.clientHeight*p}}let O=0,v=0;if(i=="nearest")e.top<d.top?(v=e.top-(d.top+o),t>0&&e.bottom>d.bottom+v&&(v=e.bottom-d.bottom+o)):e.bottom>d.bottom&&(v=e.bottom-d.bottom+o,t<0&&e.top-v<d.top&&(v=e.top-(d.top+o)));else{let b=e.bottom-e.top,_=d.bottom-d.top;v=(i=="center"&&b<=_?e.top+b/2-_/2:i=="start"||i=="center"&&t<0?e.top-o:e.bottom-_+o)-d.top}if(r=="nearest"?e.left<d.left?(O=e.left-(d.left+s),t>0&&e.right>d.right+O&&(O=e.right-d.right+s)):e.right>d.right&&(O=e.right-d.right+s,t<0&&e.left<d.left+O&&(O=e.left-(d.left+s))):O=(r=="center"?e.left+(e.right-e.left)/2-(d.right-d.left)/2:r=="start"==a?e.left-s:e.right-(d.right-d.left)+s)-d.left,O||v)if(h)c.scrollBy(O,v);else{let b=0,_=0;if(v){let A=u.scrollTop;u.scrollTop+=v/p,_=(u.scrollTop-A)*p}if(O){let A=u.scrollLeft;u.scrollLeft+=O/g,b=(u.scrollLeft-A)*g}e={left:e.left-b,top:e.top-_,right:e.right-b,bottom:e.bottom-_},b&&Math.abs(b-O)<1&&(r="nearest"),_&&Math.abs(_-v)<1&&(i="nearest")}if(h)break;(e.top<d.top||e.bottom>d.bottom||e.left<d.left||e.right>d.right)&&(e={left:Math.max(e.left,d.left),right:Math.min(e.right,d.right),top:Math.max(e.top,d.top),bottom:Math.min(e.bottom,d.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function I$(n){let e=n.ownerDocument,t,r;for(let i=n.parentNode;i&&!(i==e.body||t&&r);)if(i.nodeType==1)!r&&i.scrollHeight>i.clientHeight&&(r=i),!t&&i.scrollWidth>i.clientWidth&&(t=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:t,y:r}}class N${constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:r}=e;this.set(t,Math.min(e.anchorOffset,t?bs(t):0),r,Math.min(e.focusOffset,r?bs(r):0))}set(e,t,r,i){this.anchorNode=e,this.anchorOffset=t,this.focusNode=r,this.focusOffset=i}}let fo=null;qe.safari&&qe.safari_version>=26&&(fo=!1);function ak(n){if(n.setActive)return n.setActive();if(fo)return n.focus(fo);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(fo==null?{get preventScroll(){return fo={preventScroll:!0},!0}}:void 0),!fo){fo=!1;for(let t=0;t<e.length;){let r=e[t++],i=e[t++],s=e[t++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=s&&(r.scrollLeft=s)}}}let Pb;function fc(n,e,t=e){let r=Pb||(Pb=document.createRange());return r.setEnd(n,t),r.setStart(n,e),r}function Sa(n,e,t,r){let i={key:e,code:e,keyCode:t,which:t,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let s=new KeyboardEvent("keydown",i);s.synthetic=!0,n.dispatchEvent(s);let o=new KeyboardEvent("keyup",i);return o.synthetic=!0,n.dispatchEvent(o),s.defaultPrevented||o.defaultPrevented}function B$(n){for(;n;){if(n&&(n.nodeType==9||n.nodeType==11&&n.host))return n;n=n.assignedSlot||n.parentNode}return null}function j$(n,e){let t=e.focusNode,r=e.focusOffset;if(!t||e.anchorNode!=t||e.anchorOffset!=r)return!1;for(r=Math.min(r,bs(t));;)if(r){if(t.nodeType!=1)return!1;let i=t.childNodes[r-1];i.contentEditable=="false"?r--:(t=i,r=bs(t))}else{if(t==n)return!0;r=Ks(t),t=t.parentNode}}function lk(n){return n.scrollTop>Math.max(1,n.scrollHeight-n.clientHeight-4)}function ck(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&r>0)return{node:t,offset:r};if(t.nodeType==1&&r>0){if(t.contentEditable=="false")return null;t=t.childNodes[r-1],r=bs(t)}else if(t.parentNode&&!Af(t))r=Ks(t),t=t.parentNode;else return null}}function uk(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&r<t.nodeValue.length)return{node:t,offset:r};if(t.nodeType==1&&r<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[r],r=0}else if(t.parentNode&&!Af(t))r=Ks(t)+1,t=t.parentNode;else return null}}class bi{constructor(e,t,r=!0){this.node=e,this.offset=t,this.precise=r}static before(e,t){return new bi(e.parentNode,Ks(e),t)}static after(e,t){return new bi(e.parentNode,Ks(e)+1,t)}}var On=(function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n})(On||(On={}));const Io=On.LTR,cO=On.RTL;function fk(n){let e=[];for(let t=0;t<n.length;t++)e.push(1<<+n[t]);return e}const z$=fk("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),Z$=fk("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),lm=Object.create(null),Ei=[];for(let n of["()","[]","{}"]){let e=n.charCodeAt(0),t=n.charCodeAt(1);lm[e]=t,lm[t]=-e}function dk(n){return n<=247?z$[n]:1424<=n&&n<=1524?2:1536<=n&&n<=1785?Z$[n-1536]:1774<=n&&n<=2220?4:8192<=n&&n<=8204?256:64336<=n&&n<=65023?4:1}const X$=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Bi{get dir(){return this.level%2?cO:Io}constructor(e,t,r){this.from=e,this.to=t,this.level=r}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,r,i){let s=-1;for(let o=0;o<e.length;o++){let a=e[o];if(a.from<=t&&a.to>=t){if(a.level==r)return o;(s<0||(i!=0?i<0?a.from<t:a.to>t:e[s].level>a.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}}function hk(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++){let r=n[t],i=e[t];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!hk(r.inner,i.inner))return!1}return!0}const nn=[];function F$(n,e,t,r,i){for(let s=0;s<=r.length;s++){let o=s?r[s-1].to:e,a=s<r.length?r[s].from:t,l=s?256:i;for(let c=o,u=l,f=l;c<a;c++){let d=dk(n.charCodeAt(c));d==512?d=u:d==8&&f==4&&(d=16),nn[c]=d==4?2:d,d&7&&(f=d),u=d}for(let c=o,u=l,f=l;c<a;c++){let d=nn[c];if(d==128)c<a-1&&u==nn[c+1]&&u&24?d=nn[c]=u:nn[c]=256;else if(d==64){let h=c+1;for(;h<a&&nn[h]==64;)h++;let g=c&&u==8||h<t&&nn[h]==8?f==1?1:8:256;for(let p=c;p<h;p++)nn[p]=g;c=h-1}else d==8&&f==1&&(nn[c]=1);u=d,d&7&&(f=d)}}}function V$(n,e,t,r,i){let s=i==1?2:1;for(let o=0,a=0,l=0;o<=r.length;o++){let c=o?r[o-1].to:e,u=o<r.length?r[o].from:t;for(let f=c,d,h,g;f<u;f++)if(h=lm[d=n.charCodeAt(f)])if(h<0){for(let p=a-3;p>=0;p-=3)if(Ei[p+1]==-h){let O=Ei[p+2],v=O&2?i:O&4?O&1?s:i:0;v&&(nn[f]=nn[Ei[p]]=v),a=p;break}}else{if(Ei.length==189)break;Ei[a++]=f,Ei[a++]=d,Ei[a++]=l}else if((g=nn[f])==2||g==1){let p=g==i;l=p?0:1;for(let O=a-3;O>=0;O-=3){let v=Ei[O+2];if(v&2)break;if(p)Ei[O+2]|=2;else{if(v&4)break;Ei[O+2]|=4}}}}}function W$(n,e,t,r){for(let i=0,s=r;i<=t.length;i++){let o=i?t[i-1].to:n,a=i<t.length?t[i].from:e;for(let l=o;l<a;){let c=nn[l];if(c==256){let u=l+1;for(;;)if(u==a){if(i==t.length)break;u=t[i++].to,a=i<t.length?t[i].from:e}else if(nn[u]==256)u++;else break;let f=s==1,d=(u<e?nn[u]:r)==1,h=f==d?f?1:2:r;for(let g=u,p=i,O=p?t[p-1].to:n;g>l;)g==O&&(g=t[--p].from,O=p?t[p-1].to:n),nn[--g]=h;l=u}else s=c,l++}}}function cm(n,e,t,r,i,s,o){let a=r%2?2:1;if(r%2==i%2)for(let l=e,c=0;l<t;){let u=!0,f=!1;if(c==s.length||l<s[c].from){let p=nn[l];p!=a&&(u=!1,f=p==16)}let d=!u&&a==1?[]:null,h=u?r:r+1,g=l;e:for(;;)if(c<s.length&&g==s[c].from){if(f)break e;let p=s[c];if(!u)for(let O=p.to,v=c+1;;){if(O==t)break e;if(v<s.length&&s[v].from==O)O=s[v++].to;else{if(nn[O]==a)break e;break}}if(c++,d)d.push(p);else{p.from>l&&o.push(new Bi(l,p.from,h));let O=p.direction==Io!=!(h%2);um(n,O?r+1:r,i,p.inner,p.from,p.to,o),l=p.to}g=p.to}else{if(g==t||(u?nn[g]!=a:nn[g]==a))break;g++}d?cm(n,l,g,r+1,i,d,o):l<g&&o.push(new Bi(l,g,h)),l=g}else for(let l=t,c=s.length;l>e;){let u=!0,f=!1;if(!c||l>s[c-1].to){let p=nn[l-1];p!=a&&(u=!1,f=p==16)}let d=!u&&a==1?[]:null,h=u?r:r+1,g=l;e:for(;;)if(c&&g==s[c-1].to){if(f)break e;let p=s[--c];if(!u)for(let O=p.from,v=c;;){if(O==e)break e;if(v&&s[v-1].to==O)O=s[--v].from;else{if(nn[O-1]==a)break e;break}}if(d)d.push(p);else{p.to<l&&o.push(new Bi(p.to,l,h));let O=p.direction==Io!=!(h%2);um(n,O?r+1:r,i,p.inner,p.from,p.to,o),l=p.from}g=p.from}else{if(g==e||(u?nn[g-1]!=a:nn[g-1]==a))break;g--}d?cm(n,g,l,r+1,i,d,o):g<l&&o.push(new Bi(g,l,h)),l=g}}function um(n,e,t,r,i,s,o){let a=e%2?2:1;F$(n,i,s,r,a),V$(n,i,s,r,a),W$(i,s,r,a),cm(n,i,s,e,t,r,o)}function Y$(n,e,t){if(!n)return[new Bi(0,0,e==cO?1:0)];if(e==Io&&!t.length&&!X$.test(n))return pk(n.length);if(t.length)for(;n.length>nn.length;)nn[nn.length]=256;let r=[],i=e==Io?0:1;return um(n,i,i,t,0,n.length,r),r}function pk(n){return[new Bi(0,n,0)]}let mk="";function U$(n,e,t,r,i){var s;let o=r.head-n.from,a=Bi.find(e,o,(s=r.bidiLevel)!==null&&s!==void 0?s:-1,r.assoc),l=e[a],c=l.side(i,t);if(o==c){let d=a+=i?1:-1;if(d<0||d>=e.length)return null;l=e[a=d],o=l.side(!i,t),c=l.side(i,t)}let u=Zn(n.text,o,l.forward(i,t));(u<l.from||u>l.to)&&(u=c),mk=n.text.slice(Math.min(o,u),Math.max(o,u));let f=a==(i?e.length-1:0)?null:e[a+(i?1:-1)];return f&&u==c&&f.level+(i?0:1)<l.level?pe.cursor(f.side(!i,t)+n.from,f.forward(i,t)?1:-1,f.level):pe.cursor(u+n.from,l.forward(i,t)?-1:1,l.level)}function G$(n,e,t){for(let r=e;r<t;r++){let i=dk(n.charCodeAt(r));if(i==1)return Io;if(i==2||i==4)return cO}return Io}const gk=Be.define(),Ok=Be.define(),vk=Be.define(),bk=Be.define(),fm=Be.define(),yk=Be.define(),wk=Be.define(),uO=Be.define(),fO=Be.define(),_k=Be.define({combine:n=>n.some(e=>e)}),H$=Be.define({combine:n=>n.some(e=>e)}),kk=Be.define();class Aa{constructor(e,t="nearest",r="nearest",i=5,s=5,o=!1){this.range=e,this.y=t,this.x=r,this.yMargin=i,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new Aa(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Aa(pe.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const cu=qt.define({map:(n,e)=>n.map(e)}),xk=qt.define();function Ir(n,e,t){let r=n.facet(bk);r.length?r[0](e):window.onerror&&window.onerror(String(e),t,void 0,void 0,e)||(t?console.error(t+":",e):console.error(e))}const ls=Be.define({combine:n=>n.length?n[0]:!0});let K$=0;const pa=Be.define({combine(n){return n.filter((e,t)=>{for(let r=0;r<t;r++)if(n[r].plugin==e.plugin)return!1;return!0})}});class cr{constructor(e,t,r,i,s){this.id=e,this.create=t,this.domEventHandlers=r,this.domEventObservers=i,this.baseExtensions=s(this),this.extension=this.baseExtensions.concat(pa.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(pa.of({plugin:this,arg:e}))}static define(e,t){const{eventHandlers:r,eventObservers:i,provide:s,decorations:o}=t||{};return new cr(K$++,e,r,i,a=>{let l=[];return o&&l.push(Md.of(c=>{let u=c.plugin(a);return u?o(u):gt.none})),s&&l.push(s(a)),l})}static fromClass(e,t){return cr.define((r,i)=>new e(r,i),t)}}class gh{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(r){if(Ir(t.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){Ir(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(r){Ir(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Sk=Be.define(),dO=Be.define(),Md=Be.define(),Ak=Be.define(),hO=Be.define(),Fc=Be.define(),Ck=Be.define();function Eb(n,e){let t=n.state.facet(Ck);if(!t.length)return t;let r=t.map(s=>s instanceof Function?s(n):s),i=[];return Dt.spans(r,e.from,e.to,{point(){},span(s,o,a,l){let c=s-e.from,u=o-e.from,f=i;for(let d=a.length-1;d>=0;d--,l--){let h=a[d].spec.bidiIsolate,g;if(h==null&&(h=G$(e.text,c,u)),l>0&&f.length&&(g=f[f.length-1]).to==c&&g.direction==h)g.to=u,f=g.inner;else{let p={from:c,to:u,direction:h,inner:[]};f.push(p),f=p.inner}}}}),i}const Tk=Be.define();function pO(n){let e=0,t=0,r=0,i=0;for(let s of n.state.facet(Tk)){let o=s(n);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:e,right:t,top:r,bottom:i}}const Ml=Be.define();class Gr{constructor(e,t,r,i){this.fromA=e,this.toA=t,this.fromB=r,this.toB=i}join(e){return new Gr(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,r=this;for(;t>0;t--){let i=e[t-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(t-1,1)}}return e.splice(t,0,r),e}static extendWithRanges(e,t){if(t.length==0)return e;let r=[];for(let i=0,s=0,o=0;;){let a=i<e.length?e[i].fromB:1e9,l=s<t.length?t[s]:1e9,c=Math.min(a,l);if(c==1e9)break;let u=c+o,f=c,d=u;for(;;)if(s<t.length&&t[s]<=f){let h=t[s+1];s+=2,f=Math.max(f,h);for(let g=i;g<e.length&&e[g].fromB<=f;g++)o=e[g].toA-e[g].toB;d=Math.max(d,h+o)}else if(i<e.length&&e[i].fromB<=f){let h=e[i++];f=Math.max(f,h.toB),d=Math.max(d,h.toA),o=h.toA-h.toB}else break;r.push(new Gr(u,d,c,f))}return r}}class Tf{constructor(e,t,r){this.view=e,this.state=t,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=qn.empty(this.startState.doc.length);for(let s of r)this.changes=this.changes.compose(s.changes);let i=[];this.changes.iterChangedRanges((s,o,a,l)=>i.push(new Gr(s,o,a,l))),this.changedRanges=i}static create(e,t,r){return new Tf(e,t,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}const J$=[];class En{constructor(e,t,r=0){this.dom=e,this.length=t,this.flags=r,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return J$}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let t=this.domAttrs;t&&L$(this.dom,t)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let r=t;for(let i of this.children){if(i==e)return r;r+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t){return null}domPosFor(e,t){let r=Ks(this.dom),i=this.length?e>0:t>0;return new bi(this.parent.dom,r+(i?1:0),e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof qd)return e;return null}static get(e){return e.cmTile}}class Dd extends En{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,r=null,i,s=e?.node==t?e:null,o=0;for(let a of this.children){if(a.sync(e),o+=a.length+a.breakAfter,i=r?r.nextSibling:t.firstChild,s&&i!=a.dom&&(s.written=!0),a.dom.parentNode==t)for(;i&&i!=a.dom;)i=$b(i);else t.insertBefore(a.dom,i);r=a.dom}for(i=r?r.nextSibling:t.firstChild,s&&i&&(s.written=!0);i;)i=$b(i);this.length=o}}function $b(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class qd extends Dd{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=En.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],r=this,i=0,s=0;;)if(i==r.children.length){if(!t.length)return;r=r.parent,r.breakAfter&&s++,i=t.pop()}else{let o=r.children[i++];if(o instanceof Fs)t.push(i),r=o,i=0;else{let a=s+o.length,l=e(o,s);if(l!==void 0)return l;s=a+o.breakAfter}}}resolveBlock(e,t){let r,i=-1,s,o=-1;if(this.blockTiles((a,l)=>{let c=l+a.length;if(e>=l&&e<=c){if(a.isWidget()&&t>=-1&&t<=1){if(a.flags&32)return!0;a.flags&16&&(r=void 0)}(l<e||e==c&&(t<-1?a.length:a.covers(1)))&&(!r||!a.isWidget()&&r.isWidget())&&(r=a,i=e-l),(c>e||e==l&&(t>1?a.length:a.covers(-1)))&&(!s||!a.isWidget()&&s.isWidget())&&(s=a,o=e-l)}}),!r&&!s)throw new Error("No tile at position "+e);return r&&t<0||!s?{tile:r,offset:i}:{tile:s,offset:o}}}class Fs extends Dd{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(e,t){let r=new Fs(t||document.createElement(e.tagName),e);return t||(r.flags|=4),r}}class Ia extends Dd{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(e,t,r){let i=new Ia(t||document.createElement("div"),e);return(!t||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,t,r){let i=null,s=-1,o=null,a=-1;function l(u,f){for(let d=0,h=0;d<u.children.length&&h<=f;d++){let g=u.children[d],p=h+g.length;p>=f&&(g.isComposite()?l(g,f-h):(!o||o.isHidden&&(t>0||r&&tQ(o,g)))&&(p>f||g.flags&32)?(o=g,a=f-h):(h<f||g.flags&16&&!g.isHidden)&&(i=g,s=f-h)),h=p}}l(this,e);let c=(t<0?i:o)||i||o;return c?{tile:c,offset:c==i?s:a}:null}coordsIn(e,t){let r=this.resolveInline(e,t,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),t):eQ(this)}domIn(e,t){let r=this.resolveInline(e,t);if(r){let{tile:i,offset:s}=r;if(this.dom.contains(i.dom))return i.isText()?new bi(i.dom,Math.min(i.dom.nodeValue.length,s)):i.domPosFor(s,i.flags&16?1:i.flags&32?-1:t);let o=r.tile.parent,a=!1;for(let l of o.children){if(a)return new bi(l.dom,0);l==r.tile&&(a=!0)}}return new bi(this.dom,0)}}function eQ(n){let e=n.dom.lastChild;if(!e)return n.dom.getBoundingClientRect();let t=ef(e);return t[t.length-1]||null}function tQ(n,e){let t=n.coordsIn(0,1),r=e.coordsIn(0,1);return t&&r&&r.top<t.bottom}class _r extends Dd{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(e,t){let r=new _r(t||document.createElement(e.tagName),e);return t||(r.flags|=4),r}}class xo extends En{constructor(e,t){super(e,t.length),this.text=t}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,s=e,o=0;e==0&&t<0||e==r&&t>=0?qe.chrome||qe.gecko||(e?(i--,o=1):s<r&&(s++,o=-1)):t<0?i--:s<r&&s++;let a=fc(this.dom,i,s).getClientRects();if(!a.length)return null;let l=a[(o?o<0:t>=0)?0:a.length-1];return qe.safari&&!o&&l.width==0&&(l=Array.prototype.find.call(a,c=>c.width)||l),o?Cf(l,o<0):l||null}static of(e,t){let r=new xo(t||document.createTextNode(e),e);return t||(r.flags|=2),r}}class No extends En{constructor(e,t,r,i){super(e,t,i),this.widget=r}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,r){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;if(r)return Cf(this.dom.getBoundingClientRect(),this.length?e==0:t<=0);{let s=this.dom.getClientRects(),o=null;if(!s.length)return null;let a=this.flags&16?!0:this.flags&32?!1:e>0;for(let l=a?s.length-1:0;o=s[l],!(e>0?l==0:l==s.length-1||o.top<o.bottom);l+=a?-1:1);return Cf(o,!a)}}get overrideDOMText(){if(!this.length)return Xt.empty;let{root:e}=this;if(!e)return Xt.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,t,r,i,s){return s||(s=e.toDOM(t),e.editable||(s.contentEditable="false")),new No(s,r,e,i)}}class Pf extends En{constructor(e){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return Xt.empty}coordsIn(e){return this.dom.getBoundingClientRect()}}class nQ{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,r){let{tile:i,index:s,beforeBreak:o,parents:a}=this;for(;e||t>0;)if(i.isComposite())if(o){if(!e)break;r&&r.break(),e--,o=!1}else if(s==i.children.length){if(!e&&!a.length)break;r&&r.leave(i),o=!!i.breakAfter,{tile:i,index:s}=a.pop(),s++}else{let l=i.children[s],c=l.breakAfter;(t>0?l.length<=e:l.length<e)&&(!r||r.skip(l,0,l.length)!==!1||!l.isComposite)?(o=!!c,s++,e-=l.length):(a.push({tile:i,index:s}),i=l,s=0,r&&l.isComposite()&&r.enter(l))}else if(s==i.length)o=!!i.breakAfter,{tile:i,index:s}=a.pop(),s++;else if(e){let l=Math.min(e,i.length-s);r&&r.skip(i,s,s+l),e-=l,s+=l}else break;return this.tile=i,this.index=s,this.beforeBreak=o,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class rQ{constructor(e,t,r,i){this.from=e,this.to=t,this.wrapper=r,this.rank=i}}class iQ{constructor(e,t,r){this.cache=e,this.root=t,this.blockWrappers=r,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,r,i){var s;this.flushBuffer();let o=this.ensureMarks(t,r),a=o.lastChild;if(a&&a.isText()&&!(a.flags&8)&&a.length+e.length<512){this.cache.reused.set(a,2);let l=o.children[o.children.length-1]=new xo(a.dom,a.text+e);l.parent=o}else o.append(i||xo.of(e,(s=this.cache.find(xo))===null||s===void 0?void 0:s.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let r=this.curLine;r.dom!=t.line.dom&&(r.setDOM(this.cache.reused.has(t.line)?Oh(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let i=r;for(let a=t.marks.length-1;a>=0;a--){let l=t.marks[a],c=i.lastChild;if(c instanceof _r&&c.mark.eq(l.mark))c.dom!=l.dom&&c.setDOM(Oh(l.dom)),i=c;else{if(this.cache.reused.get(l)){let f=En.get(l.dom);f&&f.setDOM(Oh(l.dom))}let u=_r.of(l.mark,l.dom);i.append(u),i=u}this.cache.reused.set(l,2)}let s=En.get(e.text);s&&this.cache.reused.set(s,2);let o=new xo(e.text,e.text.nodeValue);o.flags|=8,i.append(o)}addInlineWidget(e,t,r){let i=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);i||this.flushBuffer();let s=this.ensureMarks(t,r);!i&&!(e.flags&16)&&s.append(this.getBuffer(1)),s.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,r){this.flushBuffer(),this.ensureMarks(t,r).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){var r;e||(e=Pk);let i=Ia.start(e,t||((r=this.cache.find(Ia))===null||r===void 0?void 0:r.dom),!!t);this.getBlockPos().append(this.lastBlock=this.curLine=i)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){var r;let i=this.curLine;for(let s=e.length-1;s>=0;s--){let o=e[s],a;if(t>0&&(a=i.lastChild)&&a instanceof _r&&a.mark.eq(o))i=a,t--;else{let l=_r.of(o,(r=this.cache.find(_r,c=>c.mark.eq(o)))===null||r===void 0?void 0:r.dom);i.append(l),i=l,t=0}}return i}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!Qb(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(qe.ios&&Qb(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(vh,0,32)||new No(vh.toDOM(),0,vh,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=new rQ(e.from,e.to,e.value,e.rank),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-t.rank||this.wrappers[r-1].to-t.to)<0;)r--;this.wrappers.splice(r,0,t)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let t=this.root;for(let r of this.wrappers){let i=t.lastChild;if(r.from<this.pos&&i instanceof Fs&&i.wrapper.eq(r.wrapper))t=i;else{let s=Fs.of(r.wrapper,(e=this.cache.find(Fs,o=>o.wrapper.eq(r.wrapper)))===null||e===void 0?void 0:e.dom);t.append(s),t=s}}return t}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),r=this.cache.find(Pf,void 0,1);return r&&(r.flags=t),r||new Pf(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class sQ{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:i,lineBreak:s,done:o}=this.cursor.next(this.skipCount);if(this.skipCount=0,o)throw new Error("Ran out of text content when drawing inline views");this.text=i;let a=this.textOff=Math.min(e,i.length);return s?null:i.slice(0,a)}let t=Math.min(this.text.length,this.textOff+e),r=this.text.slice(this.textOff,t);return this.textOff=t,r}}const Ef=[No,Ia,xo,_r,Pf,Fs,qd];for(let n=0;n<Ef.length;n++)Ef[n].bucket=n;class oQ{constructor(e){this.view=e,this.buckets=Ef.map(()=>[]),this.index=Ef.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,r=this.buckets[t];r.length<6?r.push(e):r[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,r=2){let i=e.bucket,s=this.buckets[i],o=this.index[i];for(let a=s.length-1;a>=0;a--){let l=(a+o)%s.length,c=s[l];if((!t||t(c))&&!this.reused.has(c))return s.splice(l,1),l<o&&this.index[i]--,this.reused.set(c,r),c}return null}findWidget(e,t,r){let i=this.buckets[0];if(i.length)for(let s=0,o=0;;s++){if(s==i.length){if(o)return null;o=1,s=0}let a=i[s];if(!this.reused.has(a)&&(o==0?a.widget.compare(e):a.widget.constructor==e.constructor&&e.updateDOM(a.dom,this.view)))return i.splice(s,1),s<this.index[0]&&this.index[0]--,a.widget==e&&a.length==t&&(a.flags&497)==r?(this.reused.set(a,1),a):(this.reused.set(a,2),new No(a.dom,t,e,a.flags&-498|r))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class aQ{constructor(e,t,r,i,s){this.view=e,this.decorations=i,this.disallowBlockEffectsFor=s,this.openWidget=!1,this.openMarks=0,this.cache=new oQ(e),this.text=new sQ(e.state.doc),this.builder=new iQ(this.cache,new qd(e,e.contentDOM),Dt.iter(r)),this.cache.reused.set(t,2),this.old=new nQ(t),this.reuseWalker={skip:(o,a,l)=>{if(this.cache.add(o),o.isComposite())return!1},enter:o=>this.cache.add(o),leave:()=>{},break:()=>{}}}run(e,t){let r=t&&this.getCompositionContext(t.text);for(let i=0,s=0,o=0;;){let a=o<e.length?e[o++]:null,l=a?a.fromA:this.old.root.length;if(l>i){let c=l-i;this.preserve(c,!o,!a),i=l,s+=c}if(!a)break;t&&a.fromA<=t.range.fromA&&a.toA>=t.range.toA?(this.forward(a.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(s,t.range.fromB),this.cache.clear(),this.builder.addComposition(t,r),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,a.toA),this.emit(t.range.toB,a.toB)):(this.forward(a.fromA,a.toA),this.emit(s,a.toB)),s=a.toB,i=a.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,r){let i=uQ(this.old),s=this.openMarks;this.old.advance(e,r?1:-1,{skip:(o,a,l)=>{if(o.isWidget())if(this.openWidget)this.builder.continueWidget(l-a);else{let c=l>0||a<o.length?No.of(o.widget,this.view,l-a,o.flags&496,this.cache.maybeReuse(o)):this.cache.reuse(o);c.flags&256?(c.flags&=-2,this.builder.addBlockWidget(c)):(this.builder.ensureLine(null),this.builder.addInlineWidget(c,i,s),s=i.length)}else if(o.isText())this.builder.ensureLine(null),!a&&l==o.length?this.builder.addText(o.text,i,s,this.cache.reuse(o)):(this.cache.add(o),this.builder.addText(o.text.slice(a,l),i,s)),s=i.length;else if(o.isLine())o.flags&=-2,this.cache.reused.set(o,1),this.builder.addLine(o);else if(o instanceof Pf)this.cache.add(o);else if(o instanceof _r)this.builder.ensureLine(null),this.builder.addMark(o,i,s),this.cache.reused.set(o,1),s=i.length;else return!1;this.openWidget=!1},enter:o=>{o.isLine()?this.builder.addLineStart(o.attrs,this.cache.maybeReuse(o)):(this.cache.add(o),o instanceof _r&&i.unshift(o.mark)),this.openWidget=!1},leave:o=>{o.isLine()?i.length&&(i.length=s=0):o instanceof _r&&(i.shift(),s=Math.min(s,i.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let r=null,i=this.builder,s=0,o=Dt.spans(this.decorations,e,t,{point:(a,l,c,u,f,d)=>{if(c instanceof Ro){if(this.disallowBlockEffectsFor[d]){if(c.block)throw new RangeError("Block decorations may not be specified via plugins");if(l>this.view.state.doc.lineAt(a).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(s=u.length,f>u.length)i.continueWidget(l-a);else{let h=c.widget||(c.block?Na.block:Na.inline),g=lQ(c),p=this.cache.findWidget(h,l-a,g)||No.of(h,this.view,l-a,g);c.block?(c.startSide>0&&i.addLineStartIfNotCovered(r),i.addBlockWidget(p)):(i.ensureLine(r),i.addInlineWidget(p,u,f))}r=null}else r=cQ(r,c);l>a&&this.text.skip(l-a)},span:(a,l,c,u)=>{for(let f=a;f<l;){let d=this.text.next(Math.min(512,l-f));d==null?(i.addLineStartIfNotCovered(r),i.addBreak(),f++):(i.ensureLine(r),i.addText(d,c,f==a?u:c.length),f+=d.length),r=null}}});i.addLineStartIfNotCovered(r),this.openWidget=o>s,this.openMarks=o}forward(e,t,r=1){t-e<=10?this.old.advance(t-e,r,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,r,this.reuseWalker))}getCompositionContext(e){let t=[],r=null;for(let i=e.parentNode;;i=i.parentNode){let s=En.get(i);if(i==this.view.contentDOM)break;s instanceof _r?t.push(s):s?.isLine()?r=s:i.nodeName=="DIV"&&!r&&i!=this.view.contentDOM?r=new Ia(i,Pk):t.push(_r.of(new Zc({tagName:i.nodeName.toLowerCase(),attributes:M$(i)}),i))}return{line:r,marks:t}}}function Qb(n,e){let t=r=>{for(let i of r.children)if((e?i.isText():i.length)||t(i))return!0;return!1};return t(n)}function lQ(n){let e=n.isReplace?(n.startSide<0?64:0)|(n.endSide>0?128:0):n.startSide>0?32:16;return n.block&&(e|=256),e}const Pk={class:"cm-line"};function cQ(n,e){let t=e.spec.attributes,r=e.spec.class;return!t&&!r||(n||(n={class:"cm-line"}),t&&aO(t,n),r&&(n.class+=" "+r)),n}function uQ(n){let e=[];for(let t=n.parents.length;t>1;t--){let r=t==n.parents.length?n.tile:n.parents[t].tile;r instanceof _r&&e.push(r.mark)}return e}function Oh(n){let e=En.get(n);return e&&e.setDOM(n.cloneNode()),n}class Na extends zc{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Na.inline=new Na("span");Na.block=new Na("div");const vh=new class extends zc{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class Lb{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=gt.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new qd(e,e.contentDOM),this.updateInner([new Gr(0,0,0,e.state.doc.length)],null)}update(e){var t;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:u,toA:f})=>f<this.minWidthFrom||u>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?i=this.domChanged.newSel.head:!bQ(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let s=i>-1?dQ(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){let{from:u,to:f}=this.hasComposition;r=new Gr(u,f,e.changes.mapPos(u,-1),e.changes.mapPos(f,1)).addToSet(r.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(qe.ie||qe.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,a=this.blockWrappers;this.updateDeco();let l=mQ(o,this.decorations,e.changes);l.length&&(r=Gr.extendWithRanges(r,l));let c=OQ(a,this.blockWrappers,e.changes);return c.length&&(r=Gr.extendWithRanges(r,c)),s&&!r.some(u=>u.fromA<=s.range.fromA&&u.toA>=s.range.toA)&&(r=s.range.addToSet(r.slice())),this.tile.flags&2&&r.length==0?!1:(this.updateInner(r,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:r}=this.view;r.ignore(()=>{if(t||e.length){let o=this.tile,a=new aQ(this.view,o,this.blockWrappers,this.decorations,this.dynamicDecorationMap);this.tile=a.run(e,t),dm(o,a.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=qe.chrome||qe.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(s),s&&(s.written||r.selectionRange.focusNode!=s.node||!this.tile.dom.contains(s.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let i=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.tile.children)s.isWidget()&&s.widget instanceof bh&&i.push(s.dom);r.updateGaps(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let r of t.effects)r.is(xk)&&(this.editContextFormatting=r.value)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:r}=this.tile,i=this.view.root.activeElement,s=i==r,o=!s&&!(this.view.state.facet(ls)||r.tabIndex>-1)&&Vl(r,this.view.observer.selectionRange)&&!(i&&r.contains(i));if(!(s||t||o))return;let a=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,c,u;if(l.empty?u=c=this.inlineDOMNearPos(l.anchor,l.assoc||1):(u=this.inlineDOMNearPos(l.head,l.head==l.from?1:-1),c=this.inlineDOMNearPos(l.anchor,l.anchor==l.from?1:-1)),qe.gecko&&l.empty&&!this.hasComposition&&fQ(c)){let d=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(d,c.node.childNodes[c.offset]||null)),c=u=new bi(d,0),a=!0}let f=this.view.observer.selectionRange;(a||!f.focusNode||(!Wl(c.node,c.offset,f.anchorNode,f.anchorOffset)||!Wl(u.node,u.offset,f.focusNode,f.focusOffset))&&!this.suppressWidgetCursorChange(f,l))&&(this.view.observer.ignore(()=>{qe.android&&qe.chrome&&r.contains(f.focusNode)&&vQ(f.focusNode,r)&&(r.blur(),r.focus({preventScroll:!0}));let d=uc(this.view.root);if(d)if(l.empty){if(qe.gecko){let h=hQ(c.node,c.offset);if(h&&h!=3){let g=(h==1?ck:uk)(c.node,c.offset);g&&(c=new bi(g.node,g.offset))}}d.collapse(c.node,c.offset),l.bidiLevel!=null&&d.caretBidiLevel!==void 0&&(d.caretBidiLevel=l.bidiLevel)}else if(d.extend){d.collapse(c.node,c.offset);try{d.extend(u.node,u.offset)}catch{}}else{let h=document.createRange();l.anchor>l.head&&([c,u]=[u,c]),h.setEnd(u.node,u.offset),h.setStart(c.node,c.offset),d.removeAllRanges(),d.addRange(h)}o&&this.view.root.activeElement==r&&(r.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(c,u)),this.impreciseAnchor=c.precise?null:new bi(f.anchorNode,f.anchorOffset),this.impreciseHead=u.precise?null:new bi(f.focusNode,f.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Wl(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,r=uc(e.root),{anchorNode:i,anchorOffset:s}=e.observer.selectionRange;if(!r||!t.empty||!t.assoc||!r.modify)return;let o=this.lineAt(t.head,t.assoc);if(!o)return;let a=o.posAtStart;if(t.head==a||t.head==a+o.length)return;let l=this.coordsAt(t.head,-1),c=this.coordsAt(t.head,1);if(!l||!c||l.bottom>c.top)return;let u=this.domAtPos(t.head+t.assoc,t.assoc);r.collapse(u.node,u.offset),r.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&r.collapse(i,s)}posFromDOM(e,t){let r=this.tile.nearest(e);if(!r)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let i=r.posAtStart;if(r.isComposite()){let s;if(e==r.dom)s=r.dom.childNodes[t];else{let o=bs(e)==0?0:t==0?-1:1;for(;;){let a=e.parentNode;if(a==r.dom)break;o==0&&a.firstChild!=a.lastChild&&(e==a.firstChild?o=-1:o=1),e=a}o<0?s=e:s=e.nextSibling}if(s==r.dom.firstChild)return i;for(;s&&!En.get(s);)s=s.nextSibling;if(!s)return i+r.length;for(let o=0,a=i;;o++){let l=r.children[o];if(l.dom==s)return a;a+=l.length+l.breakAfter}}else return r.isText()?e==r.dom?i+t:i+(t?r.length:0):i}domAtPos(e,t){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.domPosFor(e,t):r.domIn(i,t)}inlineDOMNearPos(e,t){let r,i=-1,s=!1,o,a=-1,l=!1;return this.tile.blockTiles((c,u)=>{if(c.isWidget()){if(c.flags&32&&u>=e)return!0;c.flags&16&&(s=!0)}else{let f=u+c.length;if(u<=e&&(r=c,i=e-u,s=f<e),f>=e&&!o&&(o=c,a=e-u,l=u>e),u>e&&o)return!0}}),!r&&!o?this.domAtPos(e,t):(s&&o?r=null:l&&r&&(o=null),r&&t<0||!o?r.domIn(i,t):o.domIn(a,t))}coordsAt(e,t){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.widget instanceof bh?null:r.coordsInWidget(i,t,!0):r.coordsIn(i,t)}lineAt(e,t){let{tile:r}=this.tile.resolveBlock(e,t);return r.isLine()?r:null}coordsForChar(e){let{tile:t,offset:r}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function i(s,o){if(s.isComposite())for(let a of s.children){if(a.length>=o){let l=i(a,o);if(l)return l}if(o-=a.length,o<0)break}else if(s.isText()&&o<s.length){let a=Zn(s.text,o);if(a==o)return null;let l=fc(s.dom,o,a).getClientRects();for(let c=0;c<l.length;c++){let u=l[c];if(c==l.length-1||u.top<u.bottom&&u.left<u.right)return u}}return null}return i(t,r)}measureVisibleLineHeights(e){let t=[],{from:r,to:i}=e,s=this.view.contentDOM.clientWidth,o=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==On.LTR,c=0,u=(f,d,h)=>{for(let g=0;g<f.children.length&&!(d>i);g++){let p=f.children[g],O=d+p.length,v=p.dom.getBoundingClientRect(),{height:b}=v;if(h&&!g&&(c+=v.top-h.top),p instanceof Fs)O>r&&u(p,d,v);else if(d>=r&&(c>0&&t.push(-c),t.push(b+c),c=0,o)){let _=p.dom.lastChild,A=_?ef(_):[];if(A.length){let y=A[A.length-1],w=l?y.right-v.left:v.right-y.left;w>a&&(a=w,this.minWidth=s,this.minWidthFrom=d,this.minWidthTo=O)}}h&&g==f.children.length-1&&(c+=h.bottom-v.bottom),d=O+p.breakAfter}};return u(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction=="rtl"?On.RTL:On.LTR}measureTextSize(){let e=this.tile.blockTiles(o=>{if(o.isLine()&&o.children.length&&o.length<=20){let a=0,l;for(let c of o.children){if(!c.isText()||/[^ -~]/.test(c.text))return;let u=ef(c.dom);if(u.length!=1)return;a+=u[0].width,l=u[0].height}if(a)return{lineHeight:o.dom.getBoundingClientRect().height,charWidth:a/o.length,textHeight:l}}});if(e)return e;let t=document.createElement("div"),r,i,s;return t.className="cm-line",t.style.width="99999px",t.style.position="absolute",t.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let o=ef(t.firstChild)[0];r=t.getBoundingClientRect().height,i=o&&o.width?o.width/27:7,s=o&&o.height?o.height:r,t.remove()}),{lineHeight:r,charWidth:i,textHeight:s}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let r=0,i=0;;i++){let s=i==t.viewports.length?null:t.viewports[i],o=s?s.from-1:this.view.state.doc.length;if(o>r){let a=(t.lineBlockAt(o).bottom-t.lineBlockAt(r).top)/this.view.scaleY;e.push(gt.replace({widget:new bh(a),block:!0,inclusive:!0,isBlockGap:!0}).range(r,o))}if(!s)break;r=s.to+1}return gt.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Md).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),r=!1,i=this.view.state.facet(hO).map((s,o)=>{let a=typeof s=="function";return a&&(r=!0),a?s(this.view):s});for(i.length&&(this.dynamicDecorationMap[e++]=r,t.push(Dt.join(i))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(Ak).map(s=>typeof s=="function"?s(this.view):s)}scrollIntoView(e){if(e.isSnapshot){let c=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=c.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let c of this.view.state.facet(kk))try{if(c(this.view,e.range,e))return!0}catch(u){Ir(this.view.state,u,"scroll handler")}let{range:t}=e,r=this.coordsAt(t.head,t.empty?t.assoc:t.head>t.anchor?-1:1),i;if(!r)return;!t.empty&&(i=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let s=pO(this.view),o={left:r.left-s.left,top:r.top-s.top,right:r.right+s.right,bottom:r.bottom+s.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;R$(this.view.scrollDOM,o,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,l),-l),this.view.textDirection==On.LTR)}lineHasWidget(e){let t=r=>r.isWidget()||r.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){dm(this.tile)}}function dm(n,e){let t=e?.get(n);if(t!=1){t==null&&n.destroy();for(let r of n.children)dm(r,e)}}function fQ(n){return n.node.nodeType==1&&n.node.firstChild&&(n.offset==0||n.node.childNodes[n.offset-1].contentEditable=="false")&&(n.offset==n.node.childNodes.length||n.node.childNodes[n.offset].contentEditable=="false")}function Ek(n,e){let t=n.observer.selectionRange;if(!t.focusNode)return null;let r=ck(t.focusNode,t.focusOffset),i=uk(t.focusNode,t.focusOffset),s=r||i;if(i&&r&&i.node!=r.node){let a=En.get(i.node);if(!a||a.isText()&&a.text!=i.node.nodeValue)s=i;else if(n.docView.lastCompositionAfterCursor){let l=En.get(r.node);!l||l.isText()&&l.text!=r.node.nodeValue||(s=i)}}if(n.docView.lastCompositionAfterCursor=s!=r,!s)return null;let o=e-s.offset;return{from:o,to:o+s.node.nodeValue.length,node:s.node}}function dQ(n,e,t){let r=Ek(n,t);if(!r)return null;let{node:i,from:s,to:o}=r,a=i.nodeValue;if(/[\n\r]/.test(a)||n.state.doc.sliceString(r.from,r.to)!=a)return null;let l=e.invertedDesc;return{range:new Gr(l.mapPos(s),l.mapPos(o),s,o),text:i}}function hQ(n,e){return n.nodeType!=1?0:(e&&n.childNodes[e-1].contentEditable=="false"?1:0)|(e<n.childNodes.length&&n.childNodes[e].contentEditable=="false"?2:0)}let pQ=class{constructor(){this.changes=[]}compareRange(e,t){xa(e,t,this.changes)}comparePoint(e,t){xa(e,t,this.changes)}boundChange(e){xa(e,e,this.changes)}};function mQ(n,e,t){let r=new pQ;return Dt.compare(n,e,t,r),r.changes}class gQ{constructor(){this.changes=[]}compareRange(e,t){xa(e,t,this.changes)}comparePoint(){}boundChange(e){xa(e,e,this.changes)}}function OQ(n,e,t){let r=new gQ;return Dt.compare(n,e,t,r),r.changes}function vQ(n,e){for(let t=n;t&&t!=e;t=t.assignedSlot||t.parentNode)if(t.nodeType==1&&t.contentEditable=="false")return!0;return!1}function bQ(n,e){let t=!1;return e&&n.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(t=!0)}),t}class bh extends zc{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function yQ(n,e,t=1){let r=n.charCategorizer(e),i=n.doc.lineAt(e),s=e-i.from;if(i.length==0)return pe.cursor(e);s==0?t=1:s==i.length&&(t=-1);let o=s,a=s;t<0?o=Zn(i.text,s,!1):a=Zn(i.text,s);let l=r(i.text.slice(o,a));for(;o>0;){let c=Zn(i.text,o,!1);if(r(i.text.slice(c,o))!=l)break;o=c}for(;a<i.length;){let c=Zn(i.text,a);if(r(i.text.slice(a,c))!=l)break;a=c}return pe.range(o+i.from,a+i.from)}function wQ(n,e,t,r,i){let s=Math.round((r-e.left)*n.defaultCharacterWidth);if(n.lineWrapping&&t.height>n.defaultLineHeight*1.5){let a=n.viewState.heightOracle.textHeight,l=Math.floor((i-t.top-(n.defaultLineHeight-a)*.5)/a);s+=l*n.viewState.heightOracle.lineLength}let o=n.state.sliceDoc(t.from,t.to);return t.from+C$(o,s,n.state.tabSize)}function _Q(n,e,t){let r=n.lineBlockAt(e);if(Array.isArray(r.type)){let i;for(let s of r.type){if(s.from>e)break;if(!(s.to<e)){if(s.from<e&&s.to>e)return s;(!i||s.type==Cr.Text&&(i.type!=s.type||(t<0?s.from<e:s.to>e)))&&(i=s)}}return i||r}return r}function kQ(n,e,t,r){let i=_Q(n,e.head,e.assoc||-1),s=!r||i.type!=Cr.Text||!(n.lineWrapping||i.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(s){let o=n.dom.getBoundingClientRect(),a=n.textDirectionAt(i.from),l=n.posAtCoords({x:t==(a==On.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(l!=null)return pe.cursor(l,t?-1:1)}return pe.cursor(t?i.to:i.from,t?-1:1)}function Mb(n,e,t,r){let i=n.state.doc.lineAt(e.head),s=n.bidiSpans(i),o=n.textDirectionAt(i.from);for(let a=e,l=null;;){let c=U$(i,s,o,a,t),u=mk;if(!c){if(i.number==(t?n.state.doc.lines:1))return a;u=`
151
- `,i=n.state.doc.line(i.number+(t?1:-1)),s=n.bidiSpans(i),c=n.visualLineSide(i,!t)}if(l){if(!l(u))return a}else{if(!r)return c;l=r(u)}a=c}}function xQ(n,e,t){let r=n.state.charCategorizer(e),i=r(t);return s=>{let o=r(s);return i==An.Space&&(i=o),i==o}}function SQ(n,e,t,r){let i=e.head,s=t?1:-1;if(i==(t?n.state.doc.length:0))return pe.cursor(i,e.assoc);let o=e.goalColumn,a,l=n.contentDOM.getBoundingClientRect(),c=n.coordsAtPos(i,(e.empty?e.assoc:0)||(t?1:-1)),u=n.documentTop;if(c)o==null&&(o=c.left-l.left),a=s<0?c.top:c.bottom;else{let g=n.viewState.lineBlockAt(i);o==null&&(o=Math.min(l.right-l.left,n.defaultCharacterWidth*(i-g.from))),a=(s<0?g.top:g.bottom)+u}let f=l.left+o,d=r??n.viewState.heightOracle.textHeight>>1,h=hm(n,{x:f,y:a+d*s},!1,s);return pe.cursor(h.pos,h.assoc,void 0,o)}function Yl(n,e,t){for(;;){let r=0;for(let i of n)i.between(e-1,e+1,(s,o,a)=>{if(e>s&&e<o){let l=r||t||(e-s<o-e?-1:1);e=l<0?s:o,r=l}});if(!r)return e}}function $k(n,e){let t=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],s=null;if(i.empty){let o=Yl(n,i.from,0);o!=i.from&&(s=pe.cursor(o,-1))}else{let o=Yl(n,i.from,-1),a=Yl(n,i.to,1);(o!=i.from||a!=i.to)&&(s=pe.range(i.from==i.anchor?o:a,i.from==i.head?o:a))}s&&(t||(t=e.ranges.slice()),t[r]=s)}return t?pe.create(t,e.mainIndex):e}function yh(n,e,t){let r=Yl(n.state.facet(Fc).map(i=>i(n)),t.from,e.head>t.from?-1:1);return r==t.from?t:pe.cursor(r,r<t.from?1:-1)}class Ni{constructor(e,t){this.pos=e,this.assoc=t}}function hm(n,e,t,r){let i=n.contentDOM.getBoundingClientRect(),s=i.top+n.viewState.paddingTop,{x:o,y:a}=e,l=a-s,c;for(;;){if(l<0)return new Ni(0,1);if(l>n.viewState.docHeight)return new Ni(n.state.doc.length,-1);if(c=n.elementAtHeight(l),r==null)break;if(c.type==Cr.Text){if(r<0?c.to<n.viewport.from:c.from>n.viewport.to)break;let d=n.docView.coordsAt(r<0?c.from:c.to,r>0?-1:1);if(d&&(r<0?d.top<=l+s:d.bottom>=l+s))break}let f=n.viewState.heightOracle.textHeight/2;l=r>0?c.bottom+f:c.top-f}if(n.viewport.from>=c.to||n.viewport.to<=c.from){if(t)return null;if(c.type==Cr.Text){let f=wQ(n,i,c,o,a);return new Ni(f,f==c.from?1:-1)}}if(c.type!=Cr.Text)return l<(c.top+c.bottom)/2?new Ni(c.from,1):new Ni(c.to,-1);let u=n.docView.lineAt(c.from,2);return(!u||u.length!=c.length)&&(u=n.docView.lineAt(c.from,-2)),new AQ(n,o,a,n.textDirectionAt(c.from)).scanTile(u,c.from)}class AQ{constructor(e,t,r,i){this.view=e,this.x=t,this.y=r,this.baseDir=i,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:r,spans:i}=this.bidiSpansAt(e);return i[Bi.find(i,e-r.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:r,spans:i}=this.bidiSpansAt(e);return i[Bi.find(i,e-r.from,-1,t)].dir}bidiIn(e,t){let{spans:r,line:i}=this.bidiSpansAt(e);return r.length>1||r.length&&(r[0].level!=this.baseDir||r[0].to+i.from<t)}scan(e,t){let r=0,i=e.length-1,s=new Set,o=this.bidiIn(e[0],e[i]),a,l,c=-1,u=1e9,f;e:for(;r<i;){let h=i-r,g=r+i>>1;t:if(s.has(g)){let O=r+Math.floor(Math.random()*h);for(let v=0;v<h;v++){if(!s.has(O)){g=O;break t}O++,O==i&&(O=r)}break e}s.add(g);let p=t(g);if(p)for(let O=0;O<p.length;O++){let v=p[O],b=0;if(v.bottom<this.y)(!a||a.bottom<v.bottom)&&(a=v),b=1;else if(v.top>this.y)(!l||l.top>v.top)&&(l=v),b=-1;else{let _=v.left>this.x?this.x-v.left:v.right<this.x?this.x-v.right:0,A=Math.abs(_);A<u&&(c=g,u=A,f=v),_&&(b=_<0==(this.baseDir==On.LTR)?-1:1)}b==-1&&(!o||this.baseDirAt(e[g],1))?i=g:b==1&&(!o||this.baseDirAt(e[g+1],-1))&&(r=g+1)}}if(!f){let h=a&&(!l||this.y-a.bottom<l.top-this.y)?a:l;return this.y=(h.top+h.bottom)/2,this.scan(e,t)}let d=(o?this.dirAt(e[c],1):this.baseDir)==On.LTR;return{i:c,after:this.x>(f.left+f.right)/2==d}}scanText(e,t){let r=[];for(let s=0;s<e.length;s=Zn(e.text,s))r.push(t+s);r.push(t+e.length);let i=this.scan(r,s=>{let o=r[s]-t,a=r[s+1]-t;return fc(e.dom,o,a).getClientRects()});return i.after?new Ni(r[i.i+1],-1):new Ni(r[i.i],1)}scanTile(e,t){if(!e.length)return new Ni(t,1);if(e.children.length==1){let a=e.children[0];if(a.isText())return this.scanText(a,t);if(a.isComposite())return this.scanTile(a,t)}let r=[t];for(let a=0,l=t;a<e.children.length;a++)r.push(l+=e.children[a].length);let i=this.scan(r,a=>{let l=e.children[a];return l.flags&48?null:(l.dom.nodeType==1?l.dom:fc(l.dom,0,l.length)).getClientRects()}),s=e.children[i.i],o=r[i.i];return s.isText()?this.scanText(s,o):s.isComposite()?this.scanTile(s,o):i.after?new Ni(r[i.i+1],-1):new Ni(o,1)}}const Dl="￿";class CQ{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(Lt.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Dl}readRange(e,t){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let s=this.text.length;this.readNode(i);let o=En.get(i),a=i.nextSibling;if(a==t){o?.breakAfter&&!a&&r!=this.view.contentDOM&&this.lineBreak();break}let l=En.get(a);(o&&l?o.breakAfter:(o?o.breakAfter:Af(i))||Af(a)&&(i.nodeName!="BR"||o?.isWidget())&&this.text.length>s)&&!PQ(a,t)&&this.lineBreak(),i=a}return this.findPointBefore(r,t),this}readTextNode(e){let t=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,t.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,a;if(this.lineSeparator?(s=t.indexOf(this.lineSeparator,r),o=this.lineSeparator.length):(a=i.exec(t))&&(s=a.index,o=a[0].length),this.append(t.slice(r,s<0?t.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=o-1);r=s+o}}readNode(e){let t=En.get(e),r=t&&t.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==t&&(r.pos=this.text.length)}findPointInside(e,t){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(TQ(e,r.node,r.offset)?t:0))}}function TQ(n,e,t){for(;;){if(!e||t<bs(e))return!1;if(e==n)return!0;t=Ks(e)+1,e=e.parentNode}}function PQ(n,e){let t;for(;!(n==e||!n);n=n.nextSibling){let r=En.get(n);if(!r?.isWidget())return!1;r&&(t||(t=[])).push(r)}if(t)for(let r of t){let i=r.overrideDOMText;if(i?.length)return!1}return!0}class Db{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class EQ{constructor(e,t,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:s,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=Qk(e.docView.tile,t,r,0))){let a=s||o?[]:QQ(e),l=new CQ(a,e);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=LQ(a,this.bounds.from)}else{let a=e.observer.selectionRange,l=s&&s.node==a.focusNode&&s.offset==a.focusOffset||!am(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),c=o&&o.node==a.anchorNode&&o.offset==a.anchorOffset||!am(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),u=e.viewport;if((qe.ios||qe.chrome)&&e.state.selection.main.empty&&l!=c&&(u.from>0||u.to<e.state.doc.length)){let f=Math.min(l,c),d=Math.max(l,c),h=u.from-f,g=u.to-d;(h==0||h==1||f==0)&&(g==0||g==-1||d==e.state.doc.length)&&(l=0,c=e.state.doc.length)}e.inputState.composing>-1&&e.state.selection.ranges.length>1?this.newSel=e.state.selection.replaceRange(pe.range(c,l)):this.newSel=pe.single(c,l)}}}function Qk(n,e,t,r){if(n.isComposite()){let i=-1,s=-1,o=-1,a=-1;for(let l=0,c=r,u=r;l<n.children.length;l++){let f=n.children[l],d=c+f.length;if(c<e&&d>t)return Qk(f,e,t,c);if(d>=e&&i==-1&&(i=l,s=c),c>t&&f.dom.parentNode==n.dom){o=l,a=u;break}u=d,c=d+f.breakAfter}return{from:s,to:a<0?r+n.length:a,startDOM:(i?n.children[i-1].dom.nextSibling:null)||n.dom.firstChild,endDOM:o<n.children.length&&o>=0?n.children[o].dom:null}}else return n.isText()?{from:r,to:r+n.length,startDOM:n.dom,endDOM:n.dom.nextSibling}:null}function Lk(n,e){let t,{newSel:r}=e,i=n.state.selection.main,s=n.inputState.lastKeyTime>Date.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:a}=e.bounds,l=i.from,c=null;(s===8||qe.android&&e.text.length<a-o)&&(l=i.to,c="end");let u=Mk(n.state.doc.sliceString(o,a,Dl),e.text,l-o,c);u&&(qe.chrome&&s==13&&u.toB==u.from+2&&e.text.slice(u.from,u.toB)==Dl+Dl&&u.toB--,t={from:o+u.from,to:o+u.toA,insert:Xt.of(e.text.slice(u.from,u.toB).split(Dl))})}else r&&(!n.hasFocus&&n.state.facet(ls)||$f(r,i))&&(r=null);if(!t&&!r)return!1;if(!t&&e.typeOver&&!i.empty&&r&&r.main.empty?t={from:i.from,to:i.to,insert:n.state.doc.slice(i.from,i.to)}:(qe.mac||qe.android)&&t&&t.from==t.to&&t.from==i.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(r&&t.insert.length==2&&(r=pe.single(r.main.anchor-1,r.main.head-1)),t={from:t.from,to:t.to,insert:Xt.of([t.insert.toString().replace("."," ")])}):t&&t.from>=i.from&&t.to<=i.to&&(t.from!=i.from||t.to!=i.to)&&i.to-i.from-(t.to-t.from)<=4?t={from:i.from,to:i.to,insert:n.state.doc.slice(i.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,i.to))}:n.state.doc.lineAt(i.from).to<i.to&&n.docView.lineHasWidget(i.to)&&n.inputState.insertingTextAt>Date.now()-50?t={from:i.from,to:i.to,insert:n.state.toText(n.inputState.insertingText)}:qe.chrome&&t&&t.from==t.to&&t.from==i.head&&t.insert.toString()==`
152
- `&&n.lineWrapping&&(r&&(r=pe.single(r.main.anchor-1,r.main.head-1)),t={from:i.from,to:i.to,insert:Xt.of([" "])}),t)return mO(n,t,r,s);if(r&&!$f(r,i)){let o=!1,a="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(o=!0),a=n.inputState.lastSelectionOrigin,a=="select.pointer"&&(r=$k(n.state.facet(Fc).map(l=>l(n)),r))),n.dispatch({selection:r,scrollIntoView:o,userEvent:a}),!0}else return!1}function mO(n,e,t,r=-1){if(qe.ios&&n.inputState.flushIOSKey(e))return!0;let i=n.state.selection.main;if(qe.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&n.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Sa(n.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.length<e.to-e.from&&e.to>i.head)&&Sa(n.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Sa(n.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let o,a=()=>o||(o=$Q(n,e,t));return n.state.facet(yk).some(l=>l(n,e.from,e.to,s,a))||n.dispatch(a()),!0}function $Q(n,e,t){let r,i=n.state,s=i.selection.main,o=-1;if(e.from==e.to&&e.from<s.from||e.from>s.to){let l=e.from<s.from?-1:1,c=l<0?s.from:s.to,u=Yl(i.facet(Fc).map(f=>f(n)),c,l);e.from==u&&(o=u)}if(o>-1)r={changes:e,selection:pe.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let l=s.from<e.from?i.sliceDoc(s.from,e.from):"",c=s.to>e.to?i.sliceDoc(e.to,s.to):"";r=i.replaceSelection(n.state.toText(l+e.insert.sliceString(0,void 0,n.state.lineBreak)+c))}else{let l=i.changes(e),c=t&&t.main.to<=l.newLength?t.main:void 0;if(i.selection.ranges.length>1&&(n.inputState.composing>=0||n.inputState.compositionPendingChange)&&e.to<=s.to+10&&e.to>=s.to-10){let u=n.state.sliceDoc(e.from,e.to),f,d=t&&Ek(n,t.main.head);if(d){let g=e.insert.length-(e.to-e.from);f={from:d.from,to:d.to-g}}else f=n.state.doc.lineAt(s.head);let h=s.to-e.to;r=i.changeByRange(g=>{if(g.from==s.from&&g.to==s.to)return{changes:l,range:c||g.map(l)};let p=g.to-h,O=p-u.length;if(n.state.sliceDoc(O,p)!=u||p>=f.from&&O<=f.to)return{range:g};let v=i.changes({from:O,to:p,insert:e.insert}),b=g.to-s.to;return{changes:v,range:c?pe.range(Math.max(0,c.anchor+b),Math.max(0,c.head+b)):g.map(v)}})}else r={changes:l,selection:c&&i.selection.replaceRange(c)}}let a="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,a+=".compose",n.inputState.compositionFirstChange&&(a+=".start",n.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:a,scrollIntoView:!0})}function Mk(n,e,t,r){let i=Math.min(n.length,e.length),s=0;for(;s<i&&n.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==i&&n.length==e.length)return null;let o=n.length,a=e.length;for(;o>0&&a>0&&n.charCodeAt(o-1)==e.charCodeAt(a-1);)o--,a--;if(r=="end"){let l=Math.max(0,s-Math.min(o,a));t-=o+l-s}if(o<s&&n.length<e.length){let l=t<=s&&t>=o?s-t:0;s-=l,a=s+(a-o),o=s}else if(a<s){let l=t<=s&&t>=a?s-t:0;s-=l,o=s+(o-a),a=s}return{from:s,toA:o,toB:a}}function QQ(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:s}=n.observer.selectionRange;return t&&(e.push(new Db(t,r)),(i!=t||s!=r)&&e.push(new Db(i,s))),e}function LQ(n,e){if(n.length==0)return null;let t=n[0].pos,r=n.length==2?n[1].pos:t;return t>-1&&r>-1?pe.single(t+e,r+e):null}function $f(n,e){return e.head==n.main.head&&e.anchor==n.main.anchor}class MQ{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,qe.safari&&e.contentDOM.addEventListener("input",()=>null),qe.gecko&&UQ(e.contentDOM.ownerDocument)}handleEvent(e){!zQ(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,t);for(let i of r.handlers){if(t.defaultPrevented)break;if(i(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=DQ(e),r=this.handlers,i=this.view.contentDOM;for(let s in t)if(s!="scroll"){let o=!t[s].handlers.length,a=r[s];a&&o!=!a.handlers.length&&(i.removeEventListener(s,this.handleEvent),a=null),a||i.addEventListener(s,this.handleEvent,{passive:o})}for(let s in r)s!="scroll"&&!t[s]&&i.removeEventListener(s,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&qk.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),qe.android&&qe.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return qe.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=Dk.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||qQ.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Sa(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:qe.safari&&!qe.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function qb(n,e){return(t,r)=>{try{return e.call(n,r,t)}catch(i){Ir(t.state,i)}}}function DQ(n){let e=Object.create(null);function t(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of n){let i=r.spec,s=i&&i.plugin.domEventHandlers,o=i&&i.plugin.domEventObservers;if(s)for(let a in s){let l=s[a];l&&t(a).handlers.push(qb(r.value,l))}if(o)for(let a in o){let l=o[a];l&&t(a).observers.push(qb(r.value,l))}}for(let r in ki)t(r).handlers.push(ki[r]);for(let r in ai)t(r).observers.push(ai[r]);return e}const Dk=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],qQ="dthko",qk=[16,17,18,20,91,92,224,225],uu=6;function fu(n){return Math.max(0,n)*.7+8}function RQ(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class IQ{constructor(e,t,r,i){this.view=e,this.startEvent=t,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=I$(e.contentDOM),this.atoms=e.state.facet(Fc).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Lt.allowMultipleSelections)&&NQ(e,t),this.dragging=jQ(e,t)&&Nk(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&RQ(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,r=0,i=0,s=0,o=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:a}=this.scrollParents.y.getBoundingClientRect());let l=pO(this.view);e.clientX-l.left<=i+uu?t=-fu(i-e.clientX):e.clientX+l.right>=o-uu&&(t=fu(e.clientX-o)),e.clientY-l.top<=s+uu?r=-fu(s-e.clientY):e.clientY+l.bottom>=a-uu&&(r=fu(e.clientY-a)),this.setScrollSpeed(t,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,r=$k(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function NQ(n,e){let t=n.state.facet(gk);return t.length?t[0](e):qe.mac?e.metaKey:e.ctrlKey}function BQ(n,e){let t=n.state.facet(Ok);return t.length?t[0](e):qe.mac?!e.altKey:!e.ctrlKey}function jQ(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let r=uc(n.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let s=0;s<i.length;s++){let o=i[s];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function zQ(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,r;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(r=En.get(t))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(e))return!1;return!0}const ki=Object.create(null),ai=Object.create(null),Rk=qe.ie&&qe.ie_version<15||qe.ios&&qe.webkit_version<604;function ZQ(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),Ik(n,t.value)},50)}function Rd(n,e,t){for(let r of n.facet(e))t=r(t,n);return t}function Ik(n,e){e=Rd(n.state,uO,e);let{state:t}=n,r,i=1,s=t.toText(e),o=s.lines==t.selection.ranges.length;if(pm!=null&&t.selection.ranges.every(l=>l.empty)&&pm==s.toString()){let l=-1;r=t.changeByRange(c=>{let u=t.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;let f=t.toText((o?s.line(i++).text:e)+t.lineBreak);return{changes:{from:u.from,insert:f},range:pe.cursor(c.from+f.length)}})}else o?r=t.changeByRange(l=>{let c=s.line(i++);return{changes:{from:l.from,to:l.to,insert:c.text},range:pe.cursor(l.from+c.length)}}):r=t.replaceSelection(s);n.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}ai.scroll=n=>{n.inputState.lastScrollTop=n.scrollDOM.scrollTop,n.inputState.lastScrollLeft=n.scrollDOM.scrollLeft};ki.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1);ai.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")};ai.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};ki.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let r of n.state.facet(vk))if(t=r(n,e),t)break;if(!t&&e.button==0&&(t=FQ(n,e)),t){let r=!n.hasFocus;n.inputState.startMouseSelection(new IQ(n,e,t,r)),r&&n.observer.ignore(()=>{ak(n.contentDOM);let s=n.root.activeElement;s&&!s.contains(n.contentDOM)&&s.blur()});let i=n.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}else n.inputState.setSelectionOrigin("select.pointer");return!1};function Rb(n,e,t,r){if(r==1)return pe.cursor(e,t);if(r==2)return yQ(n.state,e,t);{let i=n.docView.lineAt(e,t),s=n.state.doc.lineAt(i?i.posAtEnd:e),o=i?i.posAtStart:s.from,a=i?i.posAtEnd:s.to;return a<n.state.doc.length&&a==s.to&&a++,pe.range(o,a)}}const XQ=qe.ie&&qe.ie_version<=11;let Ib=null,Nb=0,Bb=0;function Nk(n){if(!XQ)return n.detail;let e=Ib,t=Bb;return Ib=n,Bb=Date.now(),Nb=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(Nb+1)%3:1}function FQ(n,e){let t=n.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),r=Nk(e),i=n.state.selection;return{update(s){s.docChanged&&(t.pos=s.changes.mapPos(t.pos),i=i.map(s.changes))},get(s,o,a){let l=n.posAndSideAtCoords({x:s.clientX,y:s.clientY},!1),c,u=Rb(n,l.pos,l.assoc,r);if(t.pos!=l.pos&&!o){let f=Rb(n,t.pos,t.assoc,r),d=Math.min(f.from,u.from),h=Math.max(f.to,u.to);u=d<u.from?pe.range(d,h):pe.range(h,d)}return o?i.replaceRange(i.main.extend(u.from,u.to)):a&&r==1&&i.ranges.length>1&&(c=VQ(i,l.pos))?c:a?i.addRange(u):pe.create([u])}}}function VQ(n,e){for(let t=0;t<n.ranges.length;t++){let{from:r,to:i}=n.ranges[t];if(r<=e&&i>=e)return pe.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}ki.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let i=n.docView.tile.nearest(e.target);if(i&&i.isWidget()){let s=i.posAtStart,o=s+i.length;(s>=t.to||o<=t.from)&&(t=pe.range(s,o))}}let{inputState:r}=n;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",Rd(n.state,fO,n.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};ki.dragend=n=>(n.inputState.draggedContent=null,!1);function jb(n,e,t,r){if(t=Rd(n.state,uO,t),!t)return;let i=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=n.inputState,o=r&&s&&BQ(n,e)?{from:s.from,to:s.to}:null,a={from:i,insert:t},l=n.state.changes(o?[o,a]:a);n.focus(),n.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:o?"move.drop":"input.drop"}),n.inputState.draggedContent=null}ki.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let r=Array(t.length),i=0,s=()=>{++i==t.length&&jb(n,e,r.filter(o=>o!=null).join(n.state.lineBreak),!1)};for(let o=0;o<t.length;o++){let a=new FileReader;a.onerror=s,a.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(r[o]=a.result),s()},a.readAsText(t[o])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return jb(n,e,r,!0),!0}return!1};ki.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=Rk?null:e.clipboardData;return t?(Ik(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(ZQ(n),!1)};function WQ(n,e){let t=n.dom.parentNode;if(!t)return;let r=t.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),n.focus()},50)}function YQ(n){let e=[],t=[],r=!1;for(let i of n.selection.ranges)i.empty||(e.push(n.sliceDoc(i.from,i.to)),t.push(i));if(!e.length){let i=-1;for(let{from:s}of n.selection.ranges){let o=n.doc.lineAt(s);o.number>i&&(e.push(o.text),t.push({from:o.from,to:Math.min(n.doc.length,o.to+1)})),i=o.number}r=!0}return{text:Rd(n,fO,e.join(n.lineBreak)),ranges:t,linewise:r}}let pm=null;ki.copy=ki.cut=(n,e)=>{if(!Vl(n.contentDOM,n.observer.selectionRange))return!1;let{text:t,ranges:r,linewise:i}=YQ(n.state);if(!t&&!i)return!1;pm=i?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let s=Rk?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",t),!0):(WQ(n,t),!1)};const Bk=ks.define();function jk(n,e){let t=[];for(let r of n.facet(wk)){let i=r(n,e);i&&t.push(i)}return t.length?n.update({effects:t,annotations:Bk.of(!0)}):null}function zk(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=jk(n.state,e);t?n.dispatch(t):n.update([])}},10)}ai.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),zk(n)};ai.blur=n=>{n.observer.clearSelectionRange(),zk(n)};ai.compositionstart=ai.compositionupdate=n=>{n.observer.editContext||(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0))};ai.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,qe.chrome&&qe.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))};ai.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};ki.beforeinput=(n,e)=>{var t,r;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(n.inputState.insertingText=e.data,n.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&n.observer.editContext){let s=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),o=e.getTargetRanges();if(s&&o.length){let a=o[0],l=n.posAtDOM(a.startContainer,a.startOffset),c=n.posAtDOM(a.endContainer,a.endOffset);return mO(n,{from:l,to:c,insert:n.state.toText(s)},null),!0}}let i;if(qe.chrome&&qe.android&&(i=Dk.find(s=>s.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let s=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>s+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return qe.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),qe.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>ai.compositionend(n,e),20),!1};const zb=new Set;function UQ(n){zb.has(n)||(zb.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const Zb=["pre-wrap","normal","pre-line","break-spaces"];let Ba=!1;function Xb(){Ba=!1}class GQ{constructor(e){this.lineWrapping=e,this.doc=Xt.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let r=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((t-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Zb.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(t=!0,this.heightSamples[Math.floor(i*10)]=!0)}return t}refresh(e,t,r,i,s,o){let a=Zb.indexOf(e)>-1,l=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=a||Math.abs(r-this.charWidth)>.1;if(this.lineWrapping=a,this.lineHeight=t,this.charWidth=r,this.textHeight=i,this.lineLength=s,l){this.heightSamples={};for(let c=0;c<o.length;c++){let u=o[c];u<0?c++:this.heightSamples[Math.floor(u*10)]=!0}}return l}}class HQ{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class mi{constructor(e,t,r,i,s){this.from=e,this.length=t,this.top=r,this.height=i,this._content=s}get type(){return typeof this._content=="number"?Cr.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Ro?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new mi(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var sn=(function(n){return n[n.ByPos=0]="ByPos",n[n.ByHeight=1]="ByHeight",n[n.ByPosNoHeight=2]="ByPosNoHeight",n})(sn||(sn={}));const tf=.001;class ar{constructor(e,t,r=2){this.length=e,this.height=t,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>tf&&(Ba=!0),this.height=e)}replace(e,t,r){return ar.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,r,i){let s=this,o=r.doc;for(let a=i.length-1;a>=0;a--){let{fromA:l,toA:c,fromB:u,toB:f}=i[a],d=s.lineAt(l,sn.ByPosNoHeight,r.setDoc(t),0,0),h=d.to>=c?d:s.lineAt(c,sn.ByPosNoHeight,r,0,0);for(f+=h.to-c,c=h.to;a>0&&d.from<=i[a-1].toA;)l=i[a-1].fromA,u=i[a-1].fromB,a--,l<d.from&&(d=s.lineAt(l,sn.ByPosNoHeight,r,0,0));u+=d.from-l,l=d.from;let g=gO.build(r.setDoc(o),e,u,f);s=Qf(s,s.replace(l,c,g))}return s.updateHeight(r,0)}static empty(){return new Mr(0,0,0)}static of(e){if(e.length==1)return e[0];let t=0,r=e.length,i=0,s=0;for(;;)if(t==r)if(i>s*2){let a=e[t-1];a.break?e.splice(--t,1,a.left,null,a.right):e.splice(--t,1,a.left,a.right),r+=1+a.break,i-=a.size}else if(s>i*2){let a=e[r];a.break?e.splice(r,1,a.left,null,a.right):e.splice(r,1,a.left,a.right),r+=2+a.break,s-=a.size}else break;else if(i<s){let a=e[t++];a&&(i+=a.size)}else{let a=e[--r];a&&(s+=a.size)}let o=0;return e[t-1]==null?(o=1,t--):e[t]==null&&(o=1,r++),new JQ(ar.of(e.slice(0,t)),o,ar.of(e.slice(r)))}}function Qf(n,e){return n==e?n:(n.constructor!=e.constructor&&(Ba=!0),e)}ar.prototype.size=1;const KQ=gt.replace({});class Zk extends ar{constructor(e,t,r){super(e,t),this.deco=r,this.spaceAbove=0}mainBlock(e,t){return new mi(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,r,i){return this.spaceAbove&&e<r+this.spaceAbove?new mi(i,0,r,this.spaceAbove,KQ):this.mainBlock(r,i)}lineAt(e,t,r,i,s){let o=this.mainBlock(i,s);return this.spaceAbove?this.blockAt(0,r,i,s).join(o):o}forEachLine(e,t,r,i,s,o){e<=s+this.length&&t>=s&&o(this.lineAt(0,sn.ByPos,r,i,s))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more&&this.setMeasuredHeight(i),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Mr extends Zk{constructor(e,t,r){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=r}mainBlock(e,t){return new mi(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,t,r){let i=r[0];return r.length==1&&(i instanceof Mr||i instanceof Vn&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Vn?i=new Mr(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):ar.of(r)}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more?this.setMeasuredHeight(i):(r||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Vn extends ar{constructor(e){super(e,0)}heightMetrics(e,t){let r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,s=i-r+1,o,a=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*s);o=l/s,this.length>s+1&&(a=(this.height-l)/(this.length-s-1))}else o=this.height/s;return{firstLine:r,lastLine:i,perLine:o,perChar:a}}blockAt(e,t,r,i){let{firstLine:s,lastLine:o,perLine:a,perChar:l}=this.heightMetrics(t,i);if(t.lineWrapping){let c=i+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),u=t.doc.lineAt(c),f=a+u.length*l,d=Math.max(r,e-f/2);return new mi(u.from,u.length,d,f,0)}else{let c=Math.max(0,Math.min(o-s,Math.floor((e-r)/a))),{from:u,length:f}=t.doc.line(s+c);return new mi(u,f,r+a*c,a,0)}}lineAt(e,t,r,i,s){if(t==sn.ByHeight)return this.blockAt(e,r,i,s);if(t==sn.ByPosNoHeight){let{from:h,to:g}=r.doc.lineAt(e);return new mi(h,g-h,0,0,0)}let{firstLine:o,perLine:a,perChar:l}=this.heightMetrics(r,s),c=r.doc.lineAt(e),u=a+c.length*l,f=c.number-o,d=i+a*f+l*(c.from-s-f);return new mi(c.from,c.length,Math.max(i,Math.min(d,i+this.height-u)),u,0)}forEachLine(e,t,r,i,s,o){e=Math.max(e,s),t=Math.min(t,s+this.length);let{firstLine:a,perLine:l,perChar:c}=this.heightMetrics(r,s);for(let u=e,f=i;u<=t;){let d=r.doc.lineAt(u);if(u==e){let g=d.number-a;f+=l*g+c*(e-s-g)}let h=l+c*d.length;o(new mi(d.from,d.length,f,h,0)),f+=h,u=d.to+1}}replace(e,t,r){let i=this.length-t;if(i>0){let s=r[r.length-1];s instanceof Vn?r[r.length-1]=new Vn(s.length+i):r.push(null,new Vn(i-1))}if(e>0){let s=r[0];s instanceof Vn?r[0]=new Vn(e+s.length):r.unshift(new Vn(e-1),null)}return ar.of(r)}decomposeLeft(e,t){t.push(new Vn(e-1),null)}decomposeRight(e,t){t.push(null,new Vn(this.length-e-1))}updateHeight(e,t=0,r=!1,i){let s=t+this.length;if(i&&i.from<=t+this.length&&i.more){let o=[],a=Math.max(t,i.from),l=-1;for(i.from>t&&o.push(new Vn(i.from-t-1).updateHeight(e,t));a<=s&&i.more;){let u=e.doc.lineAt(a).length;o.length&&o.push(null);let f=i.heights[i.index++],d=0;f<0&&(d=-f,f=i.heights[i.index++]),l==-1?l=f:Math.abs(f-l)>=tf&&(l=-2);let h=new Mr(u,f,d);h.outdated=!1,o.push(h),a+=u+1}a<=s&&o.push(null,new Vn(s-a).updateHeight(e,a));let c=ar.of(o);return(l<0||Math.abs(c.height-this.height)>=tf||Math.abs(l-this.heightMetrics(e,t).perLine)>=tf)&&(Ba=!0),Qf(this,c)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class JQ extends ar{constructor(e,t,r){super(e.length+t+r.length,e.height+r.height,t|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,t,r,i){let s=r+this.left.height;return e<s?this.left.blockAt(e,t,r,i):this.right.blockAt(e,t,s,i+this.left.length+this.break)}lineAt(e,t,r,i,s){let o=i+this.left.height,a=s+this.left.length+this.break,l=t==sn.ByHeight?e<o:e<a,c=l?this.left.lineAt(e,t,r,i,s):this.right.lineAt(e,t,r,o,a);if(this.break||(l?c.to<a:c.from>a))return c;let u=t==sn.ByPosNoHeight?sn.ByPosNoHeight:sn.ByPos;return l?c.join(this.right.lineAt(a,u,r,o,a)):this.left.lineAt(a,u,r,i,s).join(c)}forEachLine(e,t,r,i,s,o){let a=i+this.left.height,l=s+this.left.length+this.break;if(this.break)e<l&&this.left.forEachLine(e,t,r,i,s,o),t>=l&&this.right.forEachLine(e,t,r,a,l,o);else{let c=this.lineAt(l,sn.ByPos,r,i,s);e<c.from&&this.left.forEachLine(e,c.from-1,r,i,s,o),c.to>=e&&c.from<=t&&o(c),t>c.to&&this.right.forEachLine(c.to+1,t,r,a,l,o)}}replace(e,t,r){let i=this.left.length+this.break;if(t<i)return this.balanced(this.left.replace(e,t,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,t-i,r));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let a of r)s.push(a);if(e>0&&Fb(s,o-1),t<this.length){let a=s.length;this.decomposeRight(t,s),Fb(s,a)}return ar.of(s)}decomposeLeft(e,t){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(r++,e>=r&&t.push(null)),e>r&&this.right.decomposeLeft(e-r,t)}decomposeRight(e,t){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,t);e<r&&this.left.decomposeRight(e,t),this.break&&e<i&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?ar.of(this.break?[e,null,t]:[e,t]):(this.left=Qf(this.left,e),this.right=Qf(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,r=!1,i){let{left:s,right:o}=this,a=t+s.length+this.break,l=null;return i&&i.from<=t+s.length&&i.more?l=s=s.updateHeight(e,t,r,i):s.updateHeight(e,t,r),i&&i.from<=a+o.length&&i.more?l=o=o.updateHeight(e,a,r,i):o.updateHeight(e,a,r),l?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Fb(n,e){let t,r;n[e]==null&&(t=n[e-1])instanceof Vn&&(r=n[e+1])instanceof Vn&&n.splice(e-1,3,new Vn(t.length+1+r.length))}const e5=5;class gO{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let r=Math.min(t,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Mr?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Mr(r-this.pos,-1,0)),this.writtenTo=r,t>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,r){if(e<t||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,s=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let o=t-e;r.block?this.addBlock(new Zk(o,i,r)):(o||s||i>=e5)&&this.addLineDeco(i,s,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Mr(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let r=new Vn(t-e);return this.oracle.doc.lineAt(e).to==t&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Mr)return e;let t=new Mr(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=t,this.writtenTo=this.pos=this.pos+r}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Mr)&&!this.isCovered?this.nodes.push(new Mr(0,-1,0)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof Mr&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,t,r,i){let s=new gO(r,e);return Dt.spans(t,r,i,s,0),s.finish(r)}}function t5(n,e,t){let r=new n5;return Dt.compare(n,e,t,r,0),r.changes}class n5{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,r,i){(e<t||r&&r.heightRelevant||i&&i.heightRelevant)&&xa(e,t,this.changes,5)}}function r5(n,e){let t=n.getBoundingClientRect(),r=n.ownerDocument,i=r.defaultView||window,s=Math.max(0,t.left),o=Math.min(i.innerWidth,t.right),a=Math.max(0,t.top),l=Math.min(i.innerHeight,t.bottom);for(let c=n.parentNode;c&&c!=r.body;)if(c.nodeType==1){let u=c,f=window.getComputedStyle(u);if((u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth)&&f.overflow!="visible"){let d=u.getBoundingClientRect();s=Math.max(s,d.left),o=Math.min(o,d.right),a=Math.max(a,d.top),l=Math.min(c==n.parentNode?i.innerHeight:l,d.bottom)}c=f.position=="absolute"||f.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:s-t.left,right:Math.max(s,o)-t.left,top:a-(t.top+e),bottom:Math.max(a,l)-(t.top+e)}}function i5(n){let e=n.getBoundingClientRect(),t=n.ownerDocument.defaultView||window;return e.left<t.innerWidth&&e.right>0&&e.top<t.innerHeight&&e.bottom>0}function s5(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class wh{constructor(e,t,r,i){this.from=e,this.to=t,this.size=r,this.displaySize=i}static same(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],s=t[r];if(i.from!=s.from||i.to!=s.to||i.size!=s.size)return!1}return!0}draw(e,t){return gt.replace({widget:new o5(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class o5 extends zc{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class Vb{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=Wb,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=On.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(dO).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new GQ(t),this.stateDeco=Yb(e),this.heightMap=ar.empty().applyChanges(this.stateDeco,Xt.empty,this.heightOracle.setDoc(e.doc),[new Gr(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=gt.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let r=0;r<=1;r++){let i=r?t.head:t.anchor;if(!e.some(({from:s,to:o})=>i>=s&&i<=o)){let{from:s,to:o}=this.lineBlockAt(i);e.push(new du(s,o))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Wb:new OO(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(ql(e,this.scaler))})}update(e,t=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=Yb(this.state);let i=e.changedRanges,s=Gr.extendWithRanges(i,t5(r,this.stateDeco,e?e.changes:qn.empty(this.state.doc.length))),o=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);Xb(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||Ba)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let l=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<l.from||t.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,t));let c=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(H$)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,r=window.getComputedStyle(t),i=this.heightOracle,s=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?On.RTL:On.LTR;let o=this.heightOracle.mustRefreshForWrapping(s)||this.mustMeasureContent,a=t.getBoundingClientRect(),l=o||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let c=0,u=0;if(a.width&&a.height){let{scaleX:A,scaleY:y}=ok(t,a);(A>.005&&Math.abs(this.scaleX-A)>.005||y>.005&&Math.abs(this.scaleY-y)>.005)&&(this.scaleX=A,this.scaleY=y,c|=16,o=l=!0)}let f=(parseInt(r.paddingTop)||0)*this.scaleY,d=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=d)&&(this.paddingTop=f,this.paddingBottom=d,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=lk(e.scrollDOM);let g=(this.printing?s5:r5)(t,this.paddingTop),p=g.top-this.pixelViewport.top,O=g.bottom-this.pixelViewport.bottom;this.pixelViewport=g;let v=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(v!=this.inView&&(this.inView=v,v&&(l=!0)),!this.inView&&!this.scrollTarget&&!i5(e.dom))return 0;let b=a.width;if((this.contentDOMWidth!=b||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),l){let A=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(A)&&(o=!0),o||i.lineWrapping&&Math.abs(b-this.contentDOMWidth)>i.charWidth){let{lineHeight:y,charWidth:w,textHeight:S}=e.docView.measureTextSize();o=y>0&&i.refresh(s,y,w,S,Math.max(5,b/w),A),o&&(e.docView.minWidth=0,c|=16)}p>0&&O>0?u=Math.max(p,O):p<0&&O<0&&(u=Math.min(p,O)),Xb();for(let y of this.viewports){let w=y.from==this.viewport.from?A:e.docView.measureVisibleLineHeights(y);this.heightMap=(o?ar.empty().applyChanges(this.stateDeco,Xt.empty,this.heightOracle,[new Gr(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,o,new HQ(y.from,w))}Ba&&(c|=2)}let _=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return _&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),c|=this.updateForViewport()),(c&2||_)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:a}=this,l=new du(i.lineAt(o-r*1e3,sn.ByHeight,s,0,0).from,i.lineAt(a+(1-r)*1e3,sn.ByHeight,s,0,0).to);if(t){let{head:c}=t.range;if(c<l.from||c>l.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=i.lineAt(c,sn.ByPos,s,0,0),d;t.y=="center"?d=(f.top+f.bottom)/2-u/2:t.y=="start"||t.y=="nearest"&&c<l.from?d=f.top:d=f.bottom-u,l=new du(i.lineAt(d-1e3/2,sn.ByHeight,s,0,0).from,i.lineAt(d+u+1e3/2,sn.ByHeight,s,0,0).to)}}return l}mapViewport(e,t){let r=t.mapPos(e.from,-1),i=t.mapPos(e.to,1);return new du(this.heightMap.lineAt(r,sn.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,sn.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,sn.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(t,sn.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:a}=this;return(e==0||i<=o-Math.max(10,Math.min(-r,250)))&&(t==this.state.doc.length||s>=a+Math.max(10,Math.min(r,250)))&&i>o-2*1e3&&s<a+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let r=[];for(let i of e)t.touchesRange(i.from,i.to)||r.push(new wh(t.mapPos(i.from),t.mapPos(i.to),i.size,i.displaySize));return r}ensureLineGaps(e,t){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,s=i>>1,o=i<<1;if(this.defaultTextDirection!=On.LTR&&!r)return[];let a=[],l=(u,f,d,h)=>{if(f-u<s)return;let g=this.state.selection.main,p=[g.from];g.empty||p.push(g.to);for(let v of p)if(v>u&&v<f){l(u,v-10,d,h),l(v+10,f,d,h);return}let O=l5(e,v=>v.from>=d.from&&v.to<=d.to&&Math.abs(v.from-u)<s&&Math.abs(v.to-f)<s&&!p.some(b=>v.from<b&&v.to>b));if(!O){if(f<d.to&&t&&r&&t.visibleRanges.some(_=>_.from<=f&&_.to>=f)){let _=t.moveToLineBoundary(pe.cursor(f),!1,!0).head;_>u&&(f=_)}let v=this.gapSize(d,u,f,h),b=r||v<2e6?v:2e6;O=new wh(u,f,v,b)}a.push(O)},c=u=>{if(u.length<o||u.type!=Cr.Text)return;let f=a5(u.from,u.to,this.stateDeco);if(f.total<o)return;let d=this.scrollTarget?this.scrollTarget.range.head:null,h,g;if(r){let p=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,O,v;if(d!=null){let b=pu(f,d),_=((this.visibleBottom-this.visibleTop)/2+p)/u.height;O=b-_,v=b+_}else O=(this.visibleTop-u.top-p)/u.height,v=(this.visibleBottom-u.top+p)/u.height;h=hu(f,O),g=hu(f,v)}else{let p=f.total*this.heightOracle.charWidth,O=i*this.heightOracle.charWidth,v=0;if(p>2e6)for(let w of e)w.from>=u.from&&w.from<u.to&&w.size!=w.displaySize&&w.from*this.heightOracle.charWidth+v<this.pixelViewport.left&&(v=w.size-w.displaySize);let b=this.pixelViewport.left+v,_=this.pixelViewport.right+v,A,y;if(d!=null){let w=pu(f,d),S=((_-b)/2+O)/p;A=w-S,y=w+S}else A=(b-O)/p,y=(_+O)/p;h=hu(f,A),g=hu(f,y)}h>u.from&&l(u.from,h,u,f),g<u.to&&l(g,u.to,u,f)};for(let u of this.viewportLines)Array.isArray(u.type)?u.type.forEach(c):c(u);return a}gapSize(e,t,r,i){let s=pu(i,r)-pu(i,t);return this.heightOracle.lineWrapping?e.height*s:i.total*this.heightOracle.charWidth*s}updateLineGaps(e){wh.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=gt.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let r=[];Dt.spans(t,this.viewport.from,this.viewport.to,{span(s,o){r.push({from:s,to:o})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let s=0;s<r.length&&!(i&8);s++){let o=this.visibleRanges[s],a=r[s];(o.from!=a.from||o.to!=a.to)&&(i|=4,e&&e.mapPos(o.from,-1)==a.from&&e.mapPos(o.to,1)==a.to||(i|=8))}return this.visibleRanges=r,i}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||ql(this.heightMap.lineAt(e,sn.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||ql(this.heightMap.lineAt(this.scaler.fromDOM(e),sn.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return ql(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class du{constructor(e,t){this.from=e,this.to=t}}function a5(n,e,t){let r=[],i=n,s=0;return Dt.spans(t,n,e,{span(){},point(o,a){o>i&&(r.push({from:i,to:o}),s+=o-i),i=a}},20),i<e&&(r.push({from:i,to:e}),s+=e-i),{total:s,ranges:r}}function hu({total:n,ranges:e},t){if(t<=0)return e[0].from;if(t>=1)return e[e.length-1].to;let r=Math.floor(n*t);for(let i=0;;i++){let{from:s,to:o}=e[i],a=o-s;if(r<=a)return s+r;r-=a}}function pu(n,e){let t=0;for(let{from:r,to:i}of n.ranges){if(e<=i){t+=e-r;break}t+=i-r}return t/n.total}function l5(n,e){for(let t of n)if(e(t))return t}const Wb={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};function Yb(n){let e=n.facet(Md).filter(r=>typeof r!="function"),t=n.facet(hO).filter(r=>typeof r!="function");return t.length&&e.push(Dt.join(t)),e}class OO{constructor(e,t,r){let i=0,s=0,o=0;this.viewports=r.map(({from:a,to:l})=>{let c=t.lineAt(a,sn.ByPos,e,0,0).top,u=t.lineAt(l,sn.ByPos,e,0,0).bottom;return i+=u-c,{from:a,to:l,top:c,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(t.height-i);for(let a of this.viewports)a.domTop=o+(a.top-s)*this.scale,o=a.domBottom=a.domTop+(a.bottom-a.top),s=a.bottom}toDOM(e){for(let t=0,r=0,i=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.top)return i+(e-r)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);r=s.bottom,i=s.domBottom}}fromDOM(e){for(let t=0,r=0,i=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.domTop)return r+(e-i)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);r=s.bottom,i=s.domBottom}}eq(e){return e instanceof OO?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,r)=>t.from==e.viewports[r].from&&t.to==e.viewports[r].to):!1}}function ql(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),r=e.toDOM(n.bottom);return new mi(n.from,n.length,t,r-t,Array.isArray(n._content)?n._content.map(i=>ql(i,e)):n._content)}const mu=Be.define({combine:n=>n.join(" ")}),mm=Be.define({combine:n=>n.indexOf(!0)>-1}),gm=Gs.newName(),Xk=Gs.newName(),Fk=Gs.newName(),Vk={"&light":"."+Xk,"&dark":"."+Fk};function Om(n,e,t){return new Gs(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return n;if(!t||!t[i])throw new RangeError(`Unsupported selector: ${i}`);return t[i]}):n+" "+r}})}const c5=Om("."+gm,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Vk),u5={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},_h=qe.ie&&qe.ie_version<=11;class f5{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new N$,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let r of t)this.queue.push(r);(qe.ie&&qe.ie_version<=11||qe.ios&&e.composing)&&t.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&qe.android&&e.constructor.EDIT_CONTEXT!==!1&&!(qe.chrome&&qe.chrome_version<126)&&(this.editContext=new h5(e),e.state.facet(ls)&&(e.contentDOM.editContext=this.editContext.editContext)),_h&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,r)=>t!=e[r]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(ls)?r.root.activeElement!=this.dom:!Vl(this.dom,i))return;let s=i.anchorNode&&r.docView.tile.nearest(i.anchorNode);if(s&&s.isWidget()&&s.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(qe.ie&&qe.ie_version<=11||qe.android&&qe.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Wl(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=uc(e.root);if(!t)return!1;let r=qe.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&d5(this.view,t)||t;if(!r||this.selectionRange.eq(r))return!1;let i=Vl(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&j$(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let r=this.dom;r;)if(r.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=t)r.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,u5),_h&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),_h&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var r;if(!this.delayedAndroidKey){let i=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&Sa(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,r=-1,i=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(i=!0),t==-1?{from:t,to:r}=o:(t=Math.min(o.from,t),r=Math.max(o.to,r)))}return{from:t,to:r,typeOver:i}}readChange(){let{from:e,to:t,typeOver:r}=this.processRecords(),i=this.selectionChanged&&Vl(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new EQ(this.view,e,t,r);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let r=this.view.state,i=Lk(this.view,t);return this.view.state==r&&(t.domChanged||t.newSel&&!$f(this.view.state.selection,t.newSel.main))&&this.view.update([]),i}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type=="attributes"),e.type=="childList"){let r=Ub(t,e.previousSibling||e.target.previousSibling,-1),i=Ub(t,e.nextSibling||e.target.nextSibling,1);return{from:r?t.posAfter(r):t.posAtStart,to:i?t.posBefore(i):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(ls)!=e.state.facet(ls)&&(e.view.contentDOM.editContext=e.state.facet(ls)?this.editContext.editContext:null))}destroy(){var e,t,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function Ub(n,e,t){for(;e;){let r=En.get(e);if(r&&r.parent==n)return r;let i=e.parentNode;e=i!=n.dom?i:t>0?e.nextSibling:e.previousSibling}return null}function Gb(n,e){let t=e.startContainer,r=e.startOffset,i=e.endContainer,s=e.endOffset,o=n.docView.domAtPos(n.state.selection.main.anchor,1);return Wl(o.node,o.offset,i,s)&&([t,r,i,s]=[i,s,t,r]),{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:s}}function d5(n,e){if(e.getComposedRanges){let i=e.getComposedRanges(n.root)[0];if(i)return Gb(n,i)}let t=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),t=i.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",r,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",r,!0),t?Gb(n,t):null}class h5{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let i=e.state.selection.main,{anchor:s,head:o}=i,a=this.toEditorPos(r.updateRangeStart),l=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:a,drifted:!1});let c=l-a>r.text.length;a==this.from&&s<this.from?a=s:l==this.to&&s>this.to&&(l=s);let u=Mk(e.state.sliceDoc(a,l),r.text,(c?i.from:i.to)-a,c?"end":null);if(!u){let d=pe.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));$f(d,i)||e.dispatch({selection:d,userEvent:"select"});return}let f={from:u.from+a,to:u.toA+a,insert:Xt.of(r.text.slice(u.from,u.toB).split(`
153
- `))};if((qe.mac||qe.android)&&f.from==o-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(f={from:a,to:l,insert:Xt.of([r.text.replace("."," ")])}),this.pendingContextChange=f,!e.state.readOnly){let d=this.to-this.from+(f.to-f.from+f.insert.length);mO(e,f,pe.single(this.toEditorPos(r.selectionStart,d),this.toEditorPos(r.selectionEnd,d)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),f.from<f.to&&!f.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,r.updateRangeStart-1),Math.min(t.text.length,r.updateRangeStart+1)))&&this.handlers.compositionend(r)},this.handlers.characterboundsupdate=r=>{let i=[],s=null;for(let o=this.toEditorPos(r.rangeStart),a=this.toEditorPos(r.rangeEnd);o<a;o++){let l=e.coordsForChar(o);s=l&&new DOMRect(l.left,l.top,l.right-l.left,l.bottom-l.top)||s||new DOMRect,i.push(s)}t.updateCharacterBounds(r.rangeStart,i)},this.handlers.textformatupdate=r=>{let i=[];for(let s of r.getTextFormats()){let o=s.underlineStyle,a=s.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(a)){let l=this.toEditorPos(s.rangeStart),c=this.toEditorPos(s.rangeEnd);if(l<c){let u=`text-decoration: underline ${/^[a-z]/.test(o)?o+" ":o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${/thin/i.test(a)?1:2}px`;i.push(gt.mark({attributes:{style:u}}).range(l,c))}}}e.dispatch({effects:xk.of(gt.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)t.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=uc(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((s,o,a,l,c)=>{if(r)return;let u=c.length-(o-s);if(i&&o>=i.to)if(i.from==s&&i.to==o&&i.insert.eq(c)){i=this.pendingContextChange=null,t+=u,this.to+=u;return}else i=null,this.revertPending(e.state);if(s+=t,o+=t,o<=this.from)this.from+=u,this.to+=u;else if(s<this.to){if(s<this.from||o>this.to||this.to-this.from+c.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),c.toString()),this.to+=u}t+=u}),i&&!r&&this.revertPending(e.state),!r}update(e){let t=this.pendingContextChange,r=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(r.from,r.to)&&e.transactions.some(i=>!i.isUserEvent("input.type")&&i.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),i=this.toContextPos(t.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class $e{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(s=>r(s,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||B$(e.parent)||document,this.viewState=new Vb(e.state||Lt.create(e)),e.scrollTo&&e.scrollTo.is(cu)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(pa).map(i=>new gh(i));for(let i of this.plugins)i.update(this);this.observer=new f5(this),this.inputState=new MQ(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Lb(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent=!0,this.requestMeasure()})}dispatch(...e){let t=e.length==1&&e[0]instanceof Tn?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,r=!1,i,s=this.state;for(let d of e){if(d.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=d.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,a=0,l=null;e.some(d=>d.annotation(Bk))?(this.inputState.notifiedFocused=o,a=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,l=jk(s,o),l||(a=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(u=null)):this.observer.clear(),s.facet(Lt.phrases)!=this.state.facet(Lt.phrases))return this.setState(s);i=Tf.create(this,s,e),i.flags|=a;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let d of e){if(f&&(f=f.map(d.changes)),d.scrollIntoView){let{main:h}=d.state.selection;f=new Aa(h.empty?h:pe.cursor(h.head,h.head>h.anchor?-1:1))}for(let h of d.effects)h.is(cu)&&(f=h.value.clip(this.state))}this.viewState.update(i,f),this.bidiCache=Lf.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),t=this.docView.update(i),this.state.facet(Ml)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(d=>d.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(mu)!=i.state.facet(mu)&&(this.viewState.mustMeasureContent=!0),(t||r||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!i.empty)for(let d of this.state.facet(fm))try{d(i)}catch(h){Ir(this.state,h,"update listener")}(l||u)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),u&&!Lk(this,u)&&c.force&&Sa(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new Vb(e),this.plugins=e.facet(pa).map(r=>new gh(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new Lb(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(pa),r=e.state.facet(pa);if(t!=r){let i=[];for(let s of r){let o=t.indexOf(s);if(o<0)i.push(new gh(s));else{let a=this.plugins[o];a.mustUpdate=e,i.push(a)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);t!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(r){Ir(this.state,r,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(o<0)if(lk(r))s=-1,o=this.viewState.heightMap.height;else{let h=this.viewState.scrollAnchorAt(i);s=h.from,o=h.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];l&4||([this.measureRequests,c]=[c,this.measureRequests]);let u=c.map(h=>{try{return h.read(this)}catch(g){return Ir(this.state,g),Hb}}),f=Tf.create(this,this.state,[]),d=!1;f.flags|=l,t?t.flags|=l:t=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),d=this.docView.update(f),d&&this.docViewUpdate());for(let h=0;h<c.length;h++)if(u[h]!=Hb)try{let g=c[h];g.write&&g.write(u[h],this)}catch(g){Ir(this.state,g)}if(d&&this.docView.updateSelection(!0),!f.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}else{let g=(s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-o;if(g>1||g<-1){i=i+g,r.scrollTop=i/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let a of this.state.facet(fm))a(t)}get themeClasses(){return gm+" "+(this.state.facet(mm)?Fk:Xk)+" "+this.state.facet(mu)}updateAttrs(){let e=Kb(this,Sk,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(ls)?"true":"false",class:"cm-content",style:`${qe.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),Kb(this,dO,t);let r=this.observer.ignore(()=>{let i=Cb(this.contentDOM,this.contentAttrs,t),s=Cb(this.dom,this.editorAttrs,e);return i||s});return this.editorAttrs=e,this.contentAttrs=t,r}showAnnouncements(e){let t=!0;for(let r of e)for(let i of r.effects)if(i.is($e.announce)){t&&(this.announceDOM.textContent=""),t=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(Ml);let e=this.state.facet($e.cspNonce);Gs.mount(this.root,this.styleModules.concat(c5).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(r=>r.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,r){return yh(this,e,Mb(this,e,t,r))}moveByGroup(e,t){return yh(this,e,Mb(this,e,t,r=>xQ(this,e.head,r)))}visualLineSide(e,t){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),s=r[t?r.length-1:0];return pe.cursor(s.side(t,i)+e.from,s.forward(!t,i)?1:-1)}moveToLineBoundary(e,t,r=!0){return kQ(this,e,t,r)}moveVertically(e,t,r){return yh(this,e,SQ(this,e,t,r))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let r=hm(this,e,t);return r&&r.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),hm(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let r=this.docView.coordsAt(e,t);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),s=this.bidiSpans(i),o=s[Bi.find(s,e-i.from,-1,t)];return Cf(r,o.dir==On.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(_k)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>p5)return pk(e.length);let t=this.textDirectionAt(e.from),r;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==t&&(s.fresh||hk(s.isolates,r=Eb(this,e))))return s.order;r||(r=Eb(this,e));let i=Y$(e.text,t,r);return this.bidiCache.push(new Lf(e.from,e.to,t,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||qe.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{ak(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return cu.of(new Aa(typeof e=="number"?pe.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return cu.of(new Aa(pe.cursor(r.from),"start","start",r.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return cr.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return cr.define(()=>({}),{eventObservers:e})}static theme(e,t){let r=Gs.newName(),i=[mu.of(r),Ml.of(Om(`.${r}`,e))];return t&&t.dark&&i.push(mm.of(!0)),i}static baseTheme(e){return io.lowest(Ml.of(Om("."+gm,e,Vk)))}static findFromDOM(e){var t;let r=e.querySelector(".cm-content"),i=r&&En.get(r)||En.get(e);return((t=i?.root)===null||t===void 0?void 0:t.view)||null}}$e.styleModule=Ml;$e.inputHandler=yk;$e.clipboardInputFilter=uO;$e.clipboardOutputFilter=fO;$e.scrollHandler=kk;$e.focusChangeEffect=wk;$e.perLineTextDirection=_k;$e.exceptionSink=bk;$e.updateListener=fm;$e.editable=ls;$e.mouseSelectionStyle=vk;$e.dragMovesSelection=Ok;$e.clickAddsSelectionRange=gk;$e.decorations=Md;$e.blockWrappers=Ak;$e.outerDecorations=hO;$e.atomicRanges=Fc;$e.bidiIsolatedRanges=Ck;$e.scrollMargins=Tk;$e.darkTheme=mm;$e.cspNonce=Be.define({combine:n=>n.length?n[0]:""});$e.contentAttributes=dO;$e.editorAttributes=Sk;$e.lineWrapping=$e.contentAttributes.of({class:"cm-lineWrapping"});$e.announce=qt.define();const p5=4096,Hb={};class Lf{constructor(e,t,r,i,s,o){this.from=e,this.to=t,this.dir=r,this.isolates=i,this.fresh=s,this.order=o}static update(e,t){if(t.empty&&!e.some(s=>s.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:On.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let o=e[s];o.dir==i&&!t.touchesRange(o.from,o.to)&&r.push(new Lf(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}}function Kb(n,e,t){for(let r=n.state.facet(e),i=r.length-1;i>=0;i--){let s=r[i],o=typeof s=="function"?s(n):s;o&&aO(o,t)}return t}const m5=qe.mac?"mac":qe.windows?"win":qe.linux?"linux":"key";function g5(n,e){const t=n.split(/-(?!$)/);let r=t[t.length-1];r=="Space"&&(r=" ");let i,s,o,a;for(let l=0;l<t.length-1;++l){const c=t[l];if(/^(cmd|meta|m)$/i.test(c))a=!0;else if(/^a(lt)?$/i.test(c))i=!0;else if(/^(c|ctrl|control)$/i.test(c))s=!0;else if(/^s(hift)?$/i.test(c))o=!0;else if(/^mod$/i.test(c))e=="mac"?a=!0:s=!0;else throw new Error("Unrecognized modifier name: "+c)}return i&&(r="Alt-"+r),s&&(r="Ctrl-"+r),a&&(r="Meta-"+r),o&&(r="Shift-"+r),r}function gu(n,e,t){return e.altKey&&(n="Alt-"+n),e.ctrlKey&&(n="Ctrl-"+n),e.metaKey&&(n="Meta-"+n),t!==!1&&e.shiftKey&&(n="Shift-"+n),n}const O5=io.default($e.domEventHandlers({keydown(n,e){return Yk(Wk(e.state),n,e,"editor")}})),Vo=Be.define({enables:O5}),Jb=new WeakMap;function Wk(n){let e=n.facet(Vo),t=Jb.get(e);return t||Jb.set(e,t=y5(e.reduce((r,i)=>r.concat(i),[]))),t}function v5(n,e,t){return Yk(Wk(n.state),e,n,t)}let Is=null;const b5=4e3;function y5(n,e=m5){let t=Object.create(null),r=Object.create(null),i=(o,a)=>{let l=r[o];if(l==null)r[o]=a;else if(l!=a)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},s=(o,a,l,c,u)=>{var f,d;let h=t[o]||(t[o]=Object.create(null)),g=a.split(/ (?!$)/).map(v=>g5(v,e));for(let v=1;v<g.length;v++){let b=g.slice(0,v).join(" ");i(b,!0),h[b]||(h[b]={preventDefault:!0,stopPropagation:!1,run:[_=>{let A=Is={view:_,prefix:b,scope:o};return setTimeout(()=>{Is==A&&(Is=null)},b5),!0}]})}let p=g.join(" ");i(p,!1);let O=h[p]||(h[p]={preventDefault:!1,stopPropagation:!1,run:((d=(f=h._any)===null||f===void 0?void 0:f.run)===null||d===void 0?void 0:d.slice())||[]});l&&O.run.push(l),c&&(O.preventDefault=!0),u&&(O.stopPropagation=!0)};for(let o of n){let a=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let c of a){let u=t[c]||(t[c]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:f}=o;for(let d in u)u[d].run.push(h=>f(h,vm))}let l=o[e]||o.key;if(l)for(let c of a)s(c,l,o.run,o.preventDefault,o.stopPropagation),o.shift&&s(c,"Shift-"+l,o.shift,o.preventDefault,o.stopPropagation)}return t}let vm=null;function Yk(n,e,t,r){vm=e;let i=$$(e),s=Ms(i,0),o=mo(s)==i.length&&i!=" ",a="",l=!1,c=!1,u=!1;Is&&Is.view==t&&Is.scope==r&&(a=Is.prefix+" ",qk.indexOf(e.keyCode)<0&&(c=!0,Is=null));let f=new Set,d=O=>{if(O){for(let v of O.run)if(!f.has(v)&&(f.add(v),v(t)))return O.stopPropagation&&(u=!0),!0;O.preventDefault&&(O.stopPropagation&&(u=!0),c=!0)}return!1},h=n[r],g,p;return h&&(d(h[a+gu(i,e,!o)])?l=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(qe.windows&&e.ctrlKey&&e.altKey)&&!(qe.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(g=Hs[e.keyCode])&&g!=i?(d(h[a+gu(g,e,!0)])||e.shiftKey&&(p=lc[e.keyCode])!=i&&p!=g&&d(h[a+gu(p,e,!1)]))&&(l=!0):o&&e.shiftKey&&d(h[a+gu(i,e,!0)])&&(l=!0),!l&&d(h._any)&&(l=!0)),c&&(l=!0),l&&u&&e.stopPropagation(),vm=null,l}function w5(){return k5}const _5=gt.line({class:"cm-activeLine"}),k5=cr.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let r of n.state.selection.ranges){let i=n.lineBlockAt(r.head);i.from>e&&(t.push(_5.range(i.from)),e=i.from)}return gt.set(t)}},{decorations:n=>n.decorations}),Ou="-10000px";class x5{constructor(e,t,r,i){this.facet=t,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(o=>o);let s=null;this.tooltipViews=this.tooltips.map(o=>s=r(o,s))}update(e,t){var r;let i=e.state.facet(this.facet),s=i.filter(l=>l);if(i===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let o=[],a=t?[]:null;for(let l=0;l<s.length;l++){let c=s[l],u=-1;if(c){for(let f=0;f<this.tooltips.length;f++){let d=this.tooltips[f];d&&d.create==c.create&&(u=f)}if(u<0)o[l]=this.createTooltipView(c,l?o[l-1]:null),a&&(a[l]=!!c.above);else{let f=o[l]=this.tooltipViews[u];a&&(a[l]=t[u]),f.update&&f.update(e)}}}for(let l of this.tooltipViews)o.indexOf(l)<0&&(this.removeTooltipView(l),(r=l.destroy)===null||r===void 0||r.call(l));return t&&(a.forEach((l,c)=>t[c]=l),t.length=a.length),this.input=i,this.tooltips=s,this.tooltipViews=o,!0}}function S5(n){let e=n.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const kh=Be.define({combine:n=>{var e,t,r;return{position:qe.ios?"absolute":((e=n.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(i=>i.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((r=n.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||S5}}}),ey=new WeakMap,Uk=cr.fromClass(class{constructor(n){this.view=n,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet(kh);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new x5(n,Gk,(t,r)=>this.createTooltip(t,r),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n,this.above);e&&this.observeIntersection();let t=e||n.geometryChanged,r=n.state.facet(kh);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;t=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n,e){let t=n.create(this.view),r=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),n.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",t.dom.appendChild(i)}return t.dom.style.position=this.position,t.dom.style.top=Ou,t.dom.style.left="0px",this.container.insertBefore(t.dom,r),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var n,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(n=r.destroy)===null||n===void 0||n.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=1,e=1,t=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if(qe.safari){let o=s.getBoundingClientRect();t=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}else t=!!s.offsetParent&&s.offsetParent!=this.container.ownerDocument.body}if(t||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(n=s.width/this.parent.offsetWidth,e=s.height/this.parent.offsetHeight)}else({scaleX:n,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=pO(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((s,o)=>{let a=this.manager.tooltipViews[o];return a.getCoords?a.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet(kh).tooltipSpace(this.view),scaleX:n,scaleY:e,makeAbsolute:t}}writeMeasure(n){var e;if(n.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{visible:t,space:r,scaleX:i,scaleY:s}=n,o=[];for(let a=0;a<this.manager.tooltips.length;a++){let l=this.manager.tooltips[a],c=this.manager.tooltipViews[a],{dom:u}=c,f=n.pos[a],d=n.size[a];if(!f||l.clip!==!1&&(f.bottom<=Math.max(t.top,r.top)||f.top>=Math.min(t.bottom,r.bottom)||f.right<Math.max(t.left,r.left)-.1||f.left>Math.min(t.right,r.right)+.1)){u.style.top=Ou;continue}let h=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,g=h?7:0,p=d.right-d.left,O=(e=ey.get(c))!==null&&e!==void 0?e:d.bottom-d.top,v=c.offset||C5,b=this.view.textDirection==On.LTR,_=d.width>r.right-r.left?b?r.left:r.right-d.width:b?Math.max(r.left,Math.min(f.left-(h?14:0)+v.x,r.right-p)):Math.min(Math.max(r.left,f.left-p+(h?14:0)-v.x),r.right-p),A=this.above[a];!l.strictSide&&(A?f.top-O-g-v.y<r.top:f.bottom+O+g+v.y>r.bottom)&&A==r.bottom-f.bottom>f.top-r.top&&(A=this.above[a]=!A);let y=(A?f.top-r.top:r.bottom-f.bottom)-g;if(y<O&&c.resize!==!1){if(y<this.view.defaultLineHeight){u.style.top=Ou;continue}ey.set(c,O),u.style.height=(O=y)/s+"px"}else u.style.height&&(u.style.height="");let w=A?f.top-O-g-v.y:f.bottom+g+v.y,S=_+p;if(c.overlap!==!0)for(let C of o)C.left<S&&C.right>_&&C.top<w+O&&C.bottom>w&&(w=A?C.top-O-2-g:C.bottom+g+2);if(this.position=="absolute"?(u.style.top=(w-n.parent.top)/s+"px",ty(u,(_-n.parent.left)/i)):(u.style.top=w/s+"px",ty(u,_/i)),h){let C=f.left+(b?v.x:-v.x)-(_+14-7);h.style.left=C/i+"px"}c.overlap!==!0&&o.push({left:_,top:w,right:S,bottom:w+O}),u.classList.toggle("cm-tooltip-above",A),u.classList.toggle("cm-tooltip-below",!A),c.positioned&&c.positioned(n.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=Ou}},{eventObservers:{scroll(){this.maybeMeasure()}}});function ty(n,e){let t=parseInt(n.style.left,10);(isNaN(t)||Math.abs(e-t)>1)&&(n.style.left=e+"px")}const A5=$e.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),C5={x:0,y:0},Gk=Be.define({enables:[Uk,A5]});function Hk(n,e){let t=n.plugin(Uk);if(!t)return null;let r=t.manager.tooltips.indexOf(e);return r<0?null:t.manager.tooltipViews[r]}const ny=Be.define({combine(n){let e,t;for(let r of n)e=e||r.topContainer,t=t||r.bottomContainer;return{topContainer:e,bottomContainer:t}}});function Kk(n,e){let t=n.plugin(Jk),r=t?t.specs.indexOf(e):-1;return r>-1?t.panels[r]:null}const Jk=cr.fromClass(class{constructor(n){this.input=n.state.facet(Mf),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(ny);this.top=new vu(n,!0,e.topContainer),this.bottom=new vu(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(ny);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new vu(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new vu(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(Mf);if(t!=this.input){let r=t.filter(l=>l),i=[],s=[],o=[],a=[];for(let l of r){let c=this.specs.indexOf(l),u;c<0?(u=l(n.view),a.push(u)):(u=this.panels[c],u.update&&u.update(n)),i.push(u),(u.top?s:o).push(u)}this.specs=r,this.panels=i,this.top.sync(s),this.bottom.sync(o);for(let l of a)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let r of this.panels)r.update&&r.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>$e.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class vu{constructor(e,t,r){this.view=e,this.top=t,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=ry(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=ry(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function ry(n){let e=n.nextSibling;return n.remove(),e}const Mf=Be.define({enables:Jk});function T5(n,e){let t,r=new Promise(o=>t=o),i=o=>P5(o,e,t);n.state.field(xh,!1)?n.dispatch({effects:e2.of(i)}):n.dispatch({effects:qt.appendConfig.of(xh.init(()=>[i]))});let s=t2.of(i);return{close:s,result:r.then(o=>((n.win.queueMicrotask||(l=>n.win.setTimeout(l,10)))(()=>{n.state.field(xh).indexOf(i)>-1&&n.dispatch({effects:s})}),o))}}const xh=li.define({create(){return[]},update(n,e){for(let t of e.effects)t.is(e2)?n=[t.value].concat(n):t.is(t2)&&(n=n.filter(r=>r!=t.value));return n},provide:n=>Mf.computeN([n],e=>e.field(n))}),e2=qt.define(),t2=qt.define();function P5(n,e,t){let r=e.content?e.content(n,()=>o(null)):null;if(!r){if(r=jn("form"),e.input){let a=jn("input",e.input);/^(text|password|number|email|tel|url)$/.test(a.type)&&a.classList.add("cm-textfield"),a.name||(a.name="input"),r.appendChild(jn("label",(e.label||"")+": ",a))}else r.appendChild(document.createTextNode(e.label||""));r.appendChild(document.createTextNode(" ")),r.appendChild(jn("button",{class:"cm-button",type:"submit"},e.submitLabel||"OK"))}let i=r.nodeName=="FORM"?[r]:r.querySelectorAll("form");for(let a=0;a<i.length;a++){let l=i[a];l.addEventListener("keydown",c=>{c.keyCode==27?(c.preventDefault(),o(null)):c.keyCode==13&&(c.preventDefault(),o(l))}),l.addEventListener("submit",c=>{c.preventDefault(),o(l)})}let s=jn("div",r,jn("button",{onclick:()=>o(null),"aria-label":n.state.phrase("close"),class:"cm-dialog-close",type:"button"},["×"]));e.class&&(s.className=e.class),s.classList.add("cm-dialog");function o(a){s.contains(s.ownerDocument.activeElement)&&n.focus(),t(a)}return{dom:s,top:e.top,mount:()=>{if(e.focus){let a;typeof e.focus=="string"?a=r.querySelector(e.focus):a=r.querySelector("input")||r.querySelector("button"),a&&"select"in a?a.select():a&&"focus"in a&&a.focus()}}}}class Js extends Us{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Js.prototype.elementClass="";Js.prototype.toDOM=void 0;Js.prototype.mapMode=or.TrackBefore;Js.prototype.startSide=Js.prototype.endSide=-1;Js.prototype.point=!0;const nf=Be.define(),E5=Be.define(),rf=Be.define(),iy=Be.define({combine:n=>n.some(e=>e)});function $5(n){return[Q5]}const Q5=cr.fromClass(class{constructor(n){this.view=n,this.domAfter=null,this.prevViewport=n.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=n.state.facet(rf).map(e=>new oy(n,e)),this.fixed=!n.state.facet(iy);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,r=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(r<(t.to-t.from)*.8)}if(n.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(iy)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let t=Dt.iter(this.view.state.facet(nf),this.view.viewport.from),r=[],i=this.gutters.map(s=>new L5(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(s.type)){let o=!0;for(let a of s.type)if(a.type==Cr.Text&&o){bm(t,r,a.from);for(let l of i)l.line(this.view,a,r);o=!1}else if(a.widget)for(let l of i)l.widget(this.view,a)}else if(s.type==Cr.Text){bm(t,r,s.from);for(let o of i)o.line(this.view,s,r)}else if(s.widget)for(let o of i)o.widget(this.view,s);for(let s of i)s.finish();n&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(n){let e=n.startState.facet(rf),t=n.state.facet(rf),r=n.docChanged||n.heightChanged||n.viewportChanged||!Dt.eq(n.startState.facet(nf),n.state.facet(nf),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let i of this.gutters)i.update(n)&&(r=!0);else{r=!0;let i=[];for(let s of t){let o=e.indexOf(s);o<0?i.push(new oy(this.view,s)):(this.gutters[o].update(n),i.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),i.indexOf(s)<0&&s.destroy();for(let s of i)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=i}return r}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:n=>$e.scrollMargins.of(e=>{let t=e.plugin(n);if(!t||t.gutters.length==0||!t.fixed)return null;let r=t.dom.offsetWidth*e.scaleX,i=t.domAfter?t.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==On.LTR?{left:r,right:i}:{right:r,left:i}})});function sy(n){return Array.isArray(n)?n:[n]}function bm(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class L5{constructor(e,t,r){this.gutter=e,this.height=r,this.i=0,this.cursor=Dt.iter(e.markers,t.from)}addElement(e,t,r){let{gutter:i}=this,s=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==i.elements.length){let a=new n2(e,o,s,r);i.elements.push(a),i.dom.appendChild(a.dom)}else i.elements[this.i].update(e,o,s,r);this.height=t.bottom,this.i++}line(e,t,r){let i=[];bm(this.cursor,i,t.from),r.length&&(i=i.concat(r));let s=this.gutter.config.lineMarker(e,t,i);s&&i.unshift(s);let o=this.gutter;i.length==0&&!o.config.renderEmptyElements||this.addElement(e,t,i)}widget(e,t){let r=this.gutter.config.widgetMarker(e,t.widget,t),i=r?[r]:null;for(let s of e.state.facet(E5)){let o=s(e,t.widget,t);o&&(i||(i=[])).push(o)}i&&this.addElement(e,t,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class oy{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in t.domEventHandlers)this.dom.addEventListener(r,i=>{let s=i.target,o;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let l=s.getBoundingClientRect();o=(l.top+l.bottom)/2}else o=i.clientY;let a=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[r](e,a,i)&&i.preventDefault()});this.markers=sy(t.markers(e)),t.initialSpacer&&(this.spacer=new n2(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=sy(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!Dt.eq(this.markers,t,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class n2{constructor(e,t,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,r,i)}update(e,t,r,i){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),M5(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,t){let r="cm-gutterElement",i=this.dom.firstChild;for(let s=0,o=0;;){let a=o,l=s<t.length?t[s++]:null,c=!1;if(l){let u=l.elementClass;u&&(r+=" "+u);for(let f=o;f<this.markers.length;f++)if(this.markers[f].compare(l)){a=f,c=!0;break}}else a=this.markers.length;for(;o<a;){let u=this.markers[o++];if(u.toDOM){u.destroy(i);let f=i.nextSibling;i.remove(),i=f}}if(!l)break;l.toDOM&&(c?i=i.nextSibling:this.dom.insertBefore(l.toDOM(e),i)),c&&o++}this.dom.className=r,this.markers=t}destroy(){this.setMarkers(null,[])}}function M5(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(!n[t].compare(e[t]))return!1;return!0}const D5=Be.define(),q5=Be.define(),ma=Be.define({combine(n){return jc(n,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let r=Object.assign({},e);for(let i in t){let s=r[i],o=t[i];r[i]=s?(a,l,c)=>s(a,l,c)||o(a,l,c):o}return r}})}});class Sh extends Js{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Ah(n,e){return n.state.facet(ma).formatNumber(e,n.state)}const R5=rf.compute([ma],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(D5)},lineMarker(e,t,r){return r.some(i=>i.toDOM)?null:new Sh(Ah(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,r)=>{for(let i of e.state.facet(q5)){let s=i(e,t,r);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(ma)!=e.state.facet(ma),initialSpacer(e){return new Sh(Ah(e,ay(e.state.doc.lines)))},updateSpacer(e,t){let r=Ah(t.view,ay(t.view.state.doc.lines));return r==e.number?e:new Sh(r)},domEventHandlers:n.facet(ma).domEventHandlers,side:"before"}));function I5(n={}){return[ma.of(n),$5(),R5]}function ay(n){let e=9;for(;e<n;)e=e*10+9;return e}const N5=new class extends Js{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},B5=nf.compute(["selection"],n=>{let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.head).from;i>t&&(t=i,e.push(N5.range(i)))}return Dt.of(e)});function j5(){return B5}const r2=1024;let z5=0;class Hr{constructor(e,t){this.from=e,this.to=t}}class it{constructor(e={}){this.id=z5++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Qn.match(e)),t=>{let r=e(t);return r===void 0?null:[this,r]}}}it.closedBy=new it({deserialize:n=>n.split(" ")});it.openedBy=new it({deserialize:n=>n.split(" ")});it.group=new it({deserialize:n=>n.split(" ")});it.isolate=new it({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});it.contextHash=new it({perNode:!0});it.lookAhead=new it({perNode:!0});it.mounted=new it({perNode:!0});class Ca{constructor(e,t,r,i=!1){this.tree=e,this.overlay=t,this.parser=r,this.bracketed=i}static get(e){return e&&e.props&&e.props[it.mounted.id]}}const Z5=Object.create(null);class Qn{constructor(e,t,r,i=0){this.name=e,this.props=t,this.id=r,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):Z5,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new Qn(e.name||"",t,e.id,r);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(i)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(it.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let i of r.split(" "))t[i]=e[r];return r=>{for(let i=r.prop(it.group),s=-1;s<(i?i.length:0);s++){let o=t[s<0?r.name:i[s]];if(o)return o}}}}Qn.none=new Qn("",Object.create(null),0,8);class ol{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let r of this.types){let i=null;for(let s of e){let o=s(r);if(o){i||(i=Object.assign({},r.props));let a=o[1],l=o[0];l.combine&&l.id in i&&(a=l.combine(i[l.id],a)),i[l.id]=a}}t.push(i?new Qn(r.name,i,r.id,r.flags):r)}return new ol(t)}}const bu=new WeakMap,ly=new WeakMap;var Vt;(function(n){n[n.ExcludeBuffers=1]="ExcludeBuffers",n[n.IncludeAnonymous=2]="IncludeAnonymous",n[n.IgnoreMounts=4]="IgnoreMounts",n[n.IgnoreOverlays=8]="IgnoreOverlays",n[n.EnterBracketed=16]="EnterBracketed"})(Vt||(Vt={}));class yt{constructor(e,t,r,i,s){if(this.type=e,this.children=t,this.positions=r,this.length=i,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,a]of s)this.props[typeof o=="number"?o:o.id]=a}}toString(){let e=Ca.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let r of this.children){let i=r.toString();i&&(t&&(t+=","),t+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new Df(this.topNode,e)}cursorAt(e,t=0,r=0){let i=bu.get(this)||this.topNode,s=new Df(i);return s.moveTo(e,t),bu.set(this,s._tree),s}get topNode(){return new tr(this,0,0,null)}resolve(e,t=0){let r=dc(bu.get(this)||this.topNode,e,t,!1);return bu.set(this,r),r}resolveInner(e,t=0){let r=dc(ly.get(this)||this.topNode,e,t,!0);return ly.set(this,r),r}resolveStack(e,t=0){return V5(this,e,t)}iterate(e){let{enter:t,leave:r,from:i=0,to:s=this.length}=e,o=e.mode||0,a=(o&Vt.IncludeAnonymous)>0;for(let l=this.cursor(o|Vt.IncludeAnonymous);;){let c=!1;if(l.from<=s&&l.to>=i&&(!a&&l.type.isAnonymous||t(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&r&&(a||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:yO(Qn.none,this.children,this.positions,0,this.children.length,0,this.length,(t,r,i)=>new yt(this.type,t,r,i,this.propValues),e.makeTree||((t,r,i)=>new yt(Qn.none,t,r,i)))}static build(e){return W5(e)}}yt.empty=new yt(Qn.none,[],[],0);class vO{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new vO(this.buffer,this.index)}}class eo{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return Qn.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],r=this.buffer[e+3],i=this.set.types[t],s=i.name;if(/\W/.test(s)&&!i.isError&&(s=JSON.stringify(s)),e+=4,r==e)return s;let o=[];for(;e<r;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,t,r,i,s){let{buffer:o}=this,a=-1;for(let l=e;l!=t&&!(i2(s,i,o[l+1],o[l+2])&&(a=l,r>0));l=o[l+3]);return a}slice(e,t,r){let i=this.buffer,s=new Uint16Array(t-e),o=0;for(let a=e,l=0;a<t;){s[l++]=i[a++],s[l++]=i[a++]-r;let c=s[l++]=i[a++]-r;s[l++]=i[a++]-e,o=Math.max(o,c)}return new eo(s,o,this.set)}}function i2(n,e,t,r){switch(n){case-2:return t<e;case-1:return r>=e&&t<e;case 0:return t<e&&r>e;case 1:return t<=e&&r>e;case 2:return r>e;case 4:return!0}}function dc(n,e,t,r){for(var i;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to<e);){let o=!r&&n instanceof tr&&n.index<0?null:n.parent;if(!o)return n;n=o}let s=r?0:Vt.IgnoreOverlays;if(r)for(let o=n,a=o.parent;a;o=a,a=o.parent)o instanceof tr&&o.index<0&&((i=a.enter(e,t,s))===null||i===void 0?void 0:i.from)!=o.from&&(n=a);for(;;){let o=n.enter(e,t,s);if(!o)return n;n=o}}class s2{cursor(e=0){return new Df(this,e)}getChild(e,t=null,r=null){let i=cy(this,e,t,r);return i.length?i[0]:null}getChildren(e,t=null,r=null){return cy(this,e,t,r)}resolve(e,t=0){return dc(this,e,t,!1)}resolveInner(e,t=0){return dc(this,e,t,!0)}matchContext(e){return ym(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),r=this;for(;t;){let i=t.lastChild;if(!i||i.to!=t.to)break;i.type.isError&&i.from==i.to?(r=t,t=i.prevSibling):t=i}return r}get node(){return this}get next(){return this.parent}}class tr extends s2{constructor(e,t,r,i){super(),this._tree=e,this.from=t,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,r,i,s=0){for(let o=this;;){for(let{children:a,positions:l}=o._tree,c=t>0?a.length:-1;e!=c;e+=t){let u=a[e],f=l[e]+o.from,d;if(!(!(s&Vt.EnterBracketed&&u instanceof yt&&(d=Ca.get(u))&&!d.overlay&&d.bracketed&&r>=f&&r<=f+u.length)&&!i2(i,r,f,f+u.length))){if(u instanceof eo){if(s&Vt.ExcludeBuffers)continue;let h=u.findChild(0,u.buffer.length,t,r-f,i);if(h>-1)return new ji(new X5(o,u,e,f),null,h)}else if(s&Vt.IncludeAnonymous||!u.type.isAnonymous||bO(u)){let h;if(!(s&Vt.IgnoreMounts)&&(h=Ca.get(u))&&!h.overlay)return new tr(h.tree,f,e,o);let g=new tr(u,f,e,o);return s&Vt.IncludeAnonymous||!g.type.isAnonymous?g:g.nextChild(t<0?u.children.length-1:0,t,r,i,s)}}}if(s&Vt.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,t,r=0){let i;if(!(r&Vt.IgnoreOverlays)&&(i=Ca.get(this._tree))&&i.overlay){let s=e-this.from,o=r&Vt.EnterBracketed&&i.bracketed;for(let{from:a,to:l}of i.overlay)if((t>0||o?a<=s:a<s)&&(t<0||o?l>=s:l>s))return new tr(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function cy(n,e,t,r){let i=n.cursor(),s=[];if(!i.firstChild())return s;if(t!=null){for(let o=!1;!o;)if(o=i.type.is(t),!i.nextSibling())return s}for(;;){if(r!=null&&i.type.is(r))return s;if(i.type.is(e)&&s.push(i.node),!i.nextSibling())return r==null?s:[]}}function ym(n,e,t=e.length-1){for(let r=n;t>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[t]&&e[t]!=r.name)return!1;t--}}return!0}class X5{constructor(e,t,r,i){this.parent=e,this.buffer=t,this.index=r,this.start=i}}class ji extends s2{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,r);return s<0?null:new ji(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,t,r=0){if(r&Vt.ExcludeBuffers)return null;let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new ji(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new ji(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new ji(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,i=this.index+4,s=r.buffer[this.index+3];if(s>i){let o=r.buffer[this.index+1];e.push(r.slice(i,s,o)),t.push(0)}return new yt(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function o2(n){if(!n.length)return null;let e=0,t=n[0];for(let s=1;s<n.length;s++){let o=n[s];(o.from>t.from||o.to<t.to)&&(t=o,e=s)}let r=t instanceof tr&&t.index<0?null:t.parent,i=n.slice();return r?i[e]=r:i.splice(e,1),new F5(i,t)}class F5{constructor(e,t){this.heads=e,this.node=t}get next(){return o2(this.heads)}}function V5(n,e,t){let r=n.resolveInner(e,t),i=null;for(let s=r instanceof tr?r:r.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(i||(i=[r])).push(o.resolve(e,t)),s=o}else{let o=Ca.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let a=new tr(o.tree,o.overlay[0].from+s.from,-1,s);(i||(i=[r])).push(dc(a,e,t,!1))}}return i?o2(i):r}class Df{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~Vt.EnterBracketed,e instanceof tr)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof tr?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:i}=this.buffer,s=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,r);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){return this.buffer?r&Vt.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Vt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Vt.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(t.findChild(i,this.index,-1,0,4))}else{let i=t.buffer[this.index+3];if(i<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(i.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:r}=i)}else({index:t,_parent:r}=this._tree);for(;r;{index:t,_parent:r}=r)if(t>-1)for(let s=t+e,o=e<0?-1:r._tree.children.length;s!=o;s+=e){let a=r._tree.children[s];if(this.mode&Vt.IncludeAnonymous||a instanceof eo||!a.type.isAnonymous||bO(a))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==i){if(i==this.index)return o;t=o,r=s+1;break e}i=this.stack[--s]}for(let i=r;i<this.stack.length;i++)t=new ji(this.buffer,t,this.stack[i]);return this.bufferNode=new ji(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&t&&t(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return ym(this.node.parent,e);let{buffer:t}=this.buffer,{types:r}=t.set;for(let i=e.length-1,s=this.stack.length-1;i>=0;s--){if(s<0)return ym(this._tree,e,i);let o=r[t.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[i]&&e[i]!=o.name)return!1;i--}}return!0}}function bO(n){return n.children.some(e=>e instanceof eo||!e.type.isAnonymous||bO(e))}function W5(n){var e;let{buffer:t,nodeSet:r,maxBufferLength:i=r2,reused:s=[],minRepeatType:o=r.types.length}=n,a=Array.isArray(t)?new vO(t,t.length):t,l=r.types,c=0,u=0;function f(y,w,S,C,x,k){let{id:E,start:T,end:$,size:M}=a,P=u,D=c;if(M<0)if(a.next(),M==-1){let ce=s[E];S.push(ce),C.push(T-y);return}else if(M==-3){c=E;return}else if(M==-4){u=E;return}else throw new RangeError(`Unrecognized record size: ${M}`);let I=l[E],W,U,ae=T-y;if($-T<=i&&(U=O(a.pos-w,x))){let ce=new Uint16Array(U.size-U.skip),K=a.pos-U.size,H=ce.length;for(;a.pos>K;)H=v(U.start,ce,H);W=new eo(ce,$-U.start,r),ae=U.start-y}else{let ce=a.pos-M;a.next();let K=[],H=[],se=E>=o?E:-1,ie=0,B=$;for(;a.pos>ce;)se>=0&&a.id==se&&a.size>=0?(a.end<=B-i&&(g(K,H,T,ie,a.end,B,se,P,D),ie=K.length,B=a.end),a.next()):k>2500?d(T,ce,K,H):f(T,ce,K,H,se,k+1);if(se>=0&&ie>0&&ie<K.length&&g(K,H,T,ie,T,B,se,P,D),K.reverse(),H.reverse(),se>-1&&ie>0){let J=h(I,D);W=yO(I,K,H,0,K.length,0,$-T,J,J)}else W=p(I,K,H,$-T,P-$,D)}S.push(W),C.push(ae)}function d(y,w,S,C){let x=[],k=0,E=-1;for(;a.pos>w;){let{id:T,start:$,end:M,size:P}=a;if(P>4)a.next();else{if(E>-1&&$<E)break;E<0&&(E=M-i),x.push(T,$,M),k++,a.next()}}if(k){let T=new Uint16Array(k*4),$=x[x.length-2];for(let M=x.length-3,P=0;M>=0;M-=3)T[P++]=x[M],T[P++]=x[M+1]-$,T[P++]=x[M+2]-$,T[P++]=P;S.push(new eo(T,x[2]-$,r)),C.push($-y)}}function h(y,w){return(S,C,x)=>{let k=0,E=S.length-1,T,$;if(E>=0&&(T=S[E])instanceof yt){if(!E&&T.type==y&&T.length==x)return T;($=T.prop(it.lookAhead))&&(k=C[E]+T.length+$)}return p(y,S,C,x,k,w)}}function g(y,w,S,C,x,k,E,T,$){let M=[],P=[];for(;y.length>C;)M.push(y.pop()),P.push(w.pop()+S-x);y.push(p(r.types[E],M,P,k-x,T-k,$)),w.push(x-S)}function p(y,w,S,C,x,k,E){if(k){let T=[it.contextHash,k];E=E?[T].concat(E):[T]}if(x>25){let T=[it.lookAhead,x];E=E?[T].concat(E):[T]}return new yt(y,w,S,C,E)}function O(y,w){let S=a.fork(),C=0,x=0,k=0,E=S.end-i,T={size:0,start:0,skip:0};e:for(let $=S.pos-y;S.pos>$;){let M=S.size;if(S.id==w&&M>=0){T.size=C,T.start=x,T.skip=k,k+=4,C+=4,S.next();continue}let P=S.pos-M;if(M<0||P<$||S.start<E)break;let D=S.id>=o?4:0,I=S.start;for(S.next();S.pos>P;){if(S.size<0)if(S.size==-3||S.size==-4)D+=4;else break e;else S.id>=o&&(D+=4);S.next()}x=I,C+=M,k+=D}return(w<0||C==y)&&(T.size=C,T.start=x,T.skip=k),T.size>4?T:void 0}function v(y,w,S){let{id:C,start:x,end:k,size:E}=a;if(a.next(),E>=0&&C<o){let T=S;if(E>4){let $=a.pos-(E-4);for(;a.pos>$;)S=v(y,w,S)}w[--S]=T,w[--S]=k-y,w[--S]=x-y,w[--S]=C}else E==-3?c=C:E==-4&&(u=C);return S}let b=[],_=[];for(;a.pos>0;)f(n.start||0,n.bufferStart||0,b,_,-1,0);let A=(e=n.length)!==null&&e!==void 0?e:b.length?_[0]+b[0].length:0;return new yt(l[n.topID],b.reverse(),_.reverse(),A)}const uy=new WeakMap;function sf(n,e){if(!n.isAnonymous||e instanceof eo||e.type!=n)return 1;let t=uy.get(e);if(t==null){t=1;for(let r of e.children){if(r.type!=n||!(r instanceof yt)){t=1;break}t+=sf(n,r)}uy.set(e,t)}return t}function yO(n,e,t,r,i,s,o,a,l){let c=0;for(let g=r;g<i;g++)c+=sf(n,e[g]);let u=Math.ceil(c*1.5/8),f=[],d=[];function h(g,p,O,v,b){for(let _=O;_<v;){let A=_,y=p[_],w=sf(n,g[_]);for(_++;_<v;_++){let S=sf(n,g[_]);if(w+S>=u)break;w+=S}if(_==A+1){if(w>u){let S=g[A];h(S.children,S.positions,0,S.children.length,p[A]+b);continue}f.push(g[A])}else{let S=p[_-1]+g[_-1].length-y;f.push(yO(n,g,p,A,_,y,S,null,l))}d.push(y+b-s)}}return h(e,t,r,i,0),(a||l)(f,d,o)}class a2{constructor(){this.map=new WeakMap}setBuffer(e,t,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(t,r)}getBuffer(e,t){let r=this.map.get(e);return r&&r.get(t)}set(e,t){e instanceof ji?this.setBuffer(e.context.buffer,e.index,t):e instanceof tr&&this.map.set(e.tree,t)}get(e){return e instanceof ji?this.getBuffer(e.context.buffer,e.index):e instanceof tr?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class gs{constructor(e,t,r,i,s=!1,o=!1){this.from=e,this.to=t,this.tree=r,this.offset=i,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],r=!1){let i=[new gs(0,e.length,e,0,!1,r)];for(let s of t)s.to>e.length&&i.push(s);return i}static applyChanges(e,t,r=128){if(!t.length)return e;let i=[],s=1,o=e.length?e[0]:null;for(let a=0,l=0,c=0;;a++){let u=a<t.length?t[a]:null,f=u?u.fromA:1e9;if(f-l>=r)for(;o&&o.from<f;){let d=o;if(l>=d.from||f<=d.to||c){let h=Math.max(d.from,l)-c,g=Math.min(d.to,f)-c;d=h>=g?null:new gs(h,g,d.tree,d.offset+c,a>0,!!u)}if(d&&i.push(d),o.to>f)break;o=s<e.length?e[s++]:null}if(!u)break;l=u.toA,c=u.toA-u.toB}return i}}class Id{startParse(e,t,r){return typeof e=="string"&&(e=new Y5(e)),r=r?r.length?r.map(i=>new Hr(i.from,i.to)):[new Hr(0,0)]:[new Hr(0,e.length)],this.createParse(e,t||[],r)}parse(e,t,r){let i=this.startParse(e,t,r);for(;;){let s=i.advance();if(s)return s}}}class Y5{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function l2(n){return(e,t,r,i)=>new G5(e,n,t,r,i)}class fy{constructor(e,t,r,i,s,o){this.parser=e,this.parse=t,this.overlay=r,this.bracketed=i,this.target=s,this.from=o}}function dy(n){if(!n.length||n.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(n))}class U5{constructor(e,t,r,i,s,o,a,l){this.parser=e,this.predicate=t,this.mounts=r,this.index=i,this.start=s,this.bracketed=o,this.target=a,this.prev=l,this.depth=0,this.ranges=[]}}const wm=new it({perNode:!0});class G5{constructor(e,t,r,i,s){this.nest=t,this.input=r,this.fragments=i,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let r=this.baseParse.advance();if(!r)return null;if(this.baseParse=null,this.baseTree=r,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let r=this.baseTree;return this.stoppedAt!=null&&(r=new yt(r.type,r.children,r.positions,r.length,r.propValues.concat([[wm,this.stoppedAt]]))),r}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[it.mounted.id]=new Ca(t,e.overlay,e.parser,e.bracketed),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new J5(this.fragments),t=null,r=null,i=new Df(new tr(this.baseTree,this.ranges[0].from,0,null),Vt.IncludeAnonymous|Vt.IgnoreMounts);e:for(let s,o;;){let a=!0,l;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)a=!1;else if(e.hasNode(i)){if(t){let c=t.mounts.find(u=>u.frag.from<=i.from&&u.frag.to>=i.to&&u.mount.overlay);if(c)for(let u of c.mount.overlay){let f=u.from+c.pos,d=u.to+c.pos;f>=i.from&&d<=i.to&&!t.ranges.some(h=>h.from<d&&h.to>f)&&t.ranges.push({from:f,to:d})}}a=!1}else if(r&&(o=H5(r.ranges,i.from,i.to)))a=o!=2;else if(!i.type.isAnonymous&&(s=this.nest(i,this.input))&&(i.from<i.to||!s.overlay)){i.tree||(K5(i),t&&t.depth++,r&&r.depth++);let c=e.findMounts(i.from,s.parser);if(typeof s.overlay=="function")t=new U5(s.parser,s.overlay,c,this.inner.length,i.from,!!s.bracketed,i.tree,t);else{let u=my(this.ranges,s.overlay||(i.from<i.to?[new Hr(i.from,i.to)]:[]));u.length&&dy(u),(u.length||!s.overlay)&&this.inner.push(new fy(s.parser,u.length?s.parser.startParse(this.input,gy(c,u),u):s.parser.startParse(""),s.overlay?s.overlay.map(f=>new Hr(f.from-i.from,f.to-i.from)):null,!!s.bracketed,i.tree,u.length?u[0].from:i.from)),s.overlay?u.length&&(r={ranges:u,depth:0,prev:r}):a=!1}}else if(t&&(l=t.predicate(i))&&(l===!0&&(l=new Hr(i.from,i.to)),l.from<l.to)){let c=t.ranges.length-1;c>=0&&t.ranges[c].to==l.from?t.ranges[c]={from:t.ranges[c].from,to:l.to}:t.ranges.push(l)}if(a&&i.firstChild())t&&t.depth++,r&&r.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(t&&!--t.depth){let c=my(this.ranges,t.ranges);c.length&&(dy(c),this.inner.splice(t.index,0,new fy(t.parser,t.parser.startParse(this.input,gy(t.mounts,c),c),t.ranges.map(u=>new Hr(u.from-t.start,u.to-t.start)),t.bracketed,t.target,c[0].from))),t=t.prev}r&&!--r.depth&&(r=r.prev)}}}}function H5(n,e,t){for(let r of n){if(r.from>=t)break;if(r.to>e)return r.from<=e&&r.to>=t?2:1}return 0}function hy(n,e,t,r,i,s){if(e<t){let o=n.buffer[e+1];r.push(n.slice(e,t,o)),i.push(o-s)}}function K5(n){let{node:e}=n,t=[],r=e.context.buffer;do t.push(n.index),n.parent();while(!n.tree);let i=n.tree,s=i.children.indexOf(r),o=i.children[s],a=o.buffer,l=[s];function c(u,f,d,h,g,p){let O=t[p],v=[],b=[];hy(o,u,O,v,b,h);let _=a[O+1],A=a[O+2];l.push(v.length);let y=p?c(O+4,a[O+3],o.set.types[a[O]],_,A-_,p-1):e.toTree();return v.push(y),b.push(_-h),hy(o,a[O+3],f,v,b,h),new yt(d,v,b,g)}i.children[s]=c(0,a.length,Qn.none,0,o.length,t.length-1);for(let u of l){let f=n.tree.children[u],d=n.tree.positions[u];n.yield(new tr(f,d+n.from,u,n._tree))}}class py{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(Vt.IncludeAnonymous|Vt.IgnoreMounts)}moveTo(e){let{cursor:t}=this,r=e-this.offset;for(;!this.done&&t.from<r;)t.to>=e&&t.enter(r,1,Vt.IgnoreOverlays|Vt.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof yt)t=t.children[0];else break}return!1}}let J5=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=(t=r.tree.prop(wm))!==null&&t!==void 0?t:r.to,this.inner=new py(r.tree,-r.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(wm))!==null&&e!==void 0?e:t.to,this.inner=new py(t.tree,-t.offset)}}findMounts(e,t){var r;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let o=(r=s.tree)===null||r===void 0?void 0:r.prop(it.mounted);if(o&&o.parser==t)for(let a=this.fragI;a<this.fragments.length;a++){let l=this.fragments[a];if(l.from>=s.to)break;l.tree==this.curFrag.tree&&i.push({frag:l,pos:s.from-l.offset,mount:o})}}}return i}};function my(n,e){let t=null,r=e;for(let i=1,s=0;i<n.length;i++){let o=n[i-1].to,a=n[i].from;for(;s<r.length;s++){let l=r[s];if(l.from>=a)break;l.to<=o||(t||(r=t=e.slice()),l.from<o?(t[s]=new Hr(l.from,o),l.to>a&&t.splice(s+1,0,new Hr(a,l.to))):l.to>a?t[s--]=new Hr(a,l.to):t.splice(s--,1))}}return r}function eL(n,e,t,r){let i=0,s=0,o=!1,a=!1,l=-1e9,c=[];for(;;){let u=i==n.length?1e9:o?n[i].to:n[i].from,f=s==e.length?1e9:a?e[s].to:e[s].from;if(o!=a){let d=Math.max(l,t),h=Math.min(u,f,r);d<h&&c.push(new Hr(d,h))}if(l=Math.min(u,f),l==1e9)break;u==l&&(o?(o=!1,i++):o=!0),f==l&&(a?(a=!1,s++):a=!0)}return c}function gy(n,e){let t=[];for(let{pos:r,mount:i,frag:s}of n){let o=r+(i.overlay?i.overlay[0].from:0),a=o+i.tree.length,l=Math.max(s.from,o),c=Math.min(s.to,a);if(i.overlay){let u=i.overlay.map(d=>new Hr(d.from+r,d.to+r)),f=eL(e,u,l,c);for(let d=0,h=l;;d++){let g=d==f.length,p=g?c:f[d].from;if(p>h&&t.push(new gs(h,p,i.tree,-o,s.from>=h||s.openStart,s.to<=p||s.openEnd)),g)break;h=f[d].to}}else t.push(new gs(l,c,i.tree,-o,s.from>=o||s.openStart,s.to<=a||s.openEnd))}return t}let tL=0,Ri=class _m{constructor(e,t,r,i){this.name=e,this.set=t,this.base=r,this.modified=i,this.id=tL++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let r=typeof e=="string"?e:"?";if(e instanceof _m&&(t=e),t?.base)throw new Error("Can not derive from a modified tag");let i=new _m(r,[],null,[]);if(i.set.push(i),t)for(let s of t.set)i.set.push(s);return i}static defineModifier(e){let t=new qf(e);return r=>r.modified.indexOf(t)>-1?r:qf.get(r.base||r,r.modified.concat(t).sort((i,s)=>i.id-s.id))}},nL=0;class qf{constructor(e){this.name=e,this.instances=[],this.id=nL++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find(a=>a.base==e&&rL(t,a.modified));if(r)return r;let i=[],s=new Ri(e.name,i,e,t);for(let a of t)a.instances.push(s);let o=iL(t);for(let a of e.set)if(!a.modified.length)for(let l of o)i.push(qf.get(a,l));return s}}function rL(n,e){return n.length==e.length&&n.every((t,r)=>t==e[r])}function iL(n){let e=[[]];for(let t=0;t<n.length;t++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(n[t]));return e.sort((t,r)=>r.length-t.length)}function al(n){let e=Object.create(null);for(let t in n){let r=n[t];Array.isArray(r)||(r=[r]);for(let i of t.split(" "))if(i){let s=[],o=2,a=i;for(let f=0;;){if(a=="..."&&f>0&&f+3==i.length){o=1;break}let d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!d)throw new RangeError("Invalid path: "+i);if(s.push(d[0]=="*"?"":d[0][0]=='"'?JSON.parse(d[0]):d[0]),f+=d[0].length,f==i.length)break;let h=i[f++];if(f==i.length&&h=="!"){o=0;break}if(h!="/")throw new RangeError("Invalid path: "+i);a=i.slice(f)}let l=s.length-1,c=s[l];if(!c)throw new RangeError("Invalid path: "+i);let u=new hc(r,o,l>0?s.slice(0,l):null);e[c]=u.sort(e[c])}}return c2.add(e)}const c2=new it({combine(n,e){let t,r,i;for(;n||e;){if(!n||e&&n.depth>=e.depth?(i=e,e=e.next):(i=n,n=n.next),t&&t.mode==i.mode&&!i.context&&!t.context)continue;let s=new hc(i.tags,i.mode,i.context);t?t.next=s:r=s,t=s}return r}});class hc{constructor(e,t,r,i){this.tags=e,this.mode=t,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}hc.empty=new hc([],2,null);function u2(n,e){let t=Object.create(null);for(let s of n)if(!Array.isArray(s.tag))t[s.tag.id]=s.class;else for(let o of s.tag)t[o.id]=s.class;let{scope:r,all:i=null}=e||{};return{style:s=>{let o=i;for(let a of s)for(let l of a.set){let c=t[l.id];if(c){o=o?o+" "+c:c;break}}return o},scope:r}}function sL(n,e){let t=null;for(let r of n){let i=r.style(e);i&&(t=t?t+" "+i:i)}return t}function oL(n,e,t,r=0,i=n.length){let s=new aL(r,Array.isArray(e)?e:[e],t);s.highlightRange(n.cursor(),r,i,"",s.highlighters),s.flush(i)}class aL{constructor(e,t,r){this.at=e,this.highlighters=t,this.span=r,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,r,i,s){let{type:o,from:a,to:l}=e;if(a>=r||l<=t)return;o.isTop&&(s=this.highlighters.filter(h=>!h.scope||h.scope(o)));let c=i,u=lL(e)||hc.empty,f=sL(s,u.tags);if(f&&(c&&(c+=" "),c+=f,u.mode==1&&(i+=(i?" ":"")+f)),this.startSpan(Math.max(t,a),c),u.opaque)return;let d=e.tree&&e.tree.prop(it.mounted);if(d&&d.overlay){let h=e.node.enter(d.overlay[0].from+a,1),g=this.highlighters.filter(O=>!O.scope||O.scope(d.tree.type)),p=e.firstChild();for(let O=0,v=a;;O++){let b=O<d.overlay.length?d.overlay[O]:null,_=b?b.from+a:l,A=Math.max(t,v),y=Math.min(r,_);if(A<y&&p)for(;e.from<y&&(this.highlightRange(e,A,y,i,s),this.startSpan(Math.min(y,e.to),c),!(e.to>=_||!e.nextSibling())););if(!b||_>r)break;v=b.to+a,v>t&&(this.highlightRange(h.cursor(),Math.max(t,b.from+a),Math.min(r,v),"",g),this.startSpan(Math.min(r,v),c))}p&&e.parent()}else if(e.firstChild()){d&&(i="");do if(!(e.to<=t)){if(e.from>=r)break;this.highlightRange(e,t,r,i,s),this.startSpan(Math.min(r,e.to),c)}while(e.nextSibling());e.parent()}}}function lL(n){let e=n.type.prop(c2);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const Se=Ri.define,yu=Se(),Ds=Se(),Oy=Se(Ds),vy=Se(Ds),qs=Se(),wu=Se(qs),Ch=Se(qs),qi=Se(),ao=Se(qi),$i=Se(),Qi=Se(),km=Se(),Ol=Se(km),_u=Se(),N={comment:yu,lineComment:Se(yu),blockComment:Se(yu),docComment:Se(yu),name:Ds,variableName:Se(Ds),typeName:Oy,tagName:Se(Oy),propertyName:vy,attributeName:Se(vy),className:Se(Ds),labelName:Se(Ds),namespace:Se(Ds),macroName:Se(Ds),literal:qs,string:wu,docString:Se(wu),character:Se(wu),attributeValue:Se(wu),number:Ch,integer:Se(Ch),float:Se(Ch),bool:Se(qs),regexp:Se(qs),escape:Se(qs),color:Se(qs),url:Se(qs),keyword:$i,self:Se($i),null:Se($i),atom:Se($i),unit:Se($i),modifier:Se($i),operatorKeyword:Se($i),controlKeyword:Se($i),definitionKeyword:Se($i),moduleKeyword:Se($i),operator:Qi,derefOperator:Se(Qi),arithmeticOperator:Se(Qi),logicOperator:Se(Qi),bitwiseOperator:Se(Qi),compareOperator:Se(Qi),updateOperator:Se(Qi),definitionOperator:Se(Qi),typeOperator:Se(Qi),controlOperator:Se(Qi),punctuation:km,separator:Se(km),bracket:Ol,angleBracket:Se(Ol),squareBracket:Se(Ol),paren:Se(Ol),brace:Se(Ol),content:qi,heading:ao,heading1:Se(ao),heading2:Se(ao),heading3:Se(ao),heading4:Se(ao),heading5:Se(ao),heading6:Se(ao),contentSeparator:Se(qi),list:Se(qi),quote:Se(qi),emphasis:Se(qi),strong:Se(qi),link:Se(qi),monospace:Se(qi),strikethrough:Se(qi),inserted:Se(),deleted:Se(),changed:Se(),invalid:Se(),meta:_u,documentMeta:Se(_u),annotation:Se(_u),processingInstruction:Se(_u),definition:Ri.defineModifier("definition"),constant:Ri.defineModifier("constant"),function:Ri.defineModifier("function"),standard:Ri.defineModifier("standard"),local:Ri.defineModifier("local"),special:Ri.defineModifier("special")};for(let n in N){let e=N[n];e instanceof Ri&&(e.name=n)}u2([{tag:N.link,class:"tok-link"},{tag:N.heading,class:"tok-heading"},{tag:N.emphasis,class:"tok-emphasis"},{tag:N.strong,class:"tok-strong"},{tag:N.keyword,class:"tok-keyword"},{tag:N.atom,class:"tok-atom"},{tag:N.bool,class:"tok-bool"},{tag:N.url,class:"tok-url"},{tag:N.labelName,class:"tok-labelName"},{tag:N.inserted,class:"tok-inserted"},{tag:N.deleted,class:"tok-deleted"},{tag:N.literal,class:"tok-literal"},{tag:N.string,class:"tok-string"},{tag:N.number,class:"tok-number"},{tag:[N.regexp,N.escape,N.special(N.string)],class:"tok-string2"},{tag:N.variableName,class:"tok-variableName"},{tag:N.local(N.variableName),class:"tok-variableName tok-local"},{tag:N.definition(N.variableName),class:"tok-variableName tok-definition"},{tag:N.special(N.variableName),class:"tok-variableName2"},{tag:N.definition(N.propertyName),class:"tok-propertyName tok-definition"},{tag:N.typeName,class:"tok-typeName"},{tag:N.namespace,class:"tok-namespace"},{tag:N.className,class:"tok-className"},{tag:N.macroName,class:"tok-macroName"},{tag:N.propertyName,class:"tok-propertyName"},{tag:N.operator,class:"tok-operator"},{tag:N.comment,class:"tok-comment"},{tag:N.meta,class:"tok-meta"},{tag:N.invalid,class:"tok-invalid"},{tag:N.punctuation,class:"tok-punctuation"}]);var Th;const Bs=new it;function Nd(n){return Be.define({combine:n?e=>e.concat(n):void 0})}const wO=new it;class Nr{constructor(e,t,r=[],i=""){this.data=e,this.name=i,Lt.prototype.hasOwnProperty("tree")||Object.defineProperty(Lt.prototype,"tree",{get(){return bn(this)}}),this.parser=t,this.extension=[Za.of(this),Lt.languageData.of((s,o,a)=>{let l=by(s,o,a),c=l.type.prop(Bs);if(!c)return[];let u=s.facet(c),f=l.type.prop(wO);if(f){let d=l.resolve(o-l.from,a);for(let h of f)if(h.test(d,s)){let g=s.facet(h.facet);return h.type=="replace"?g:g.concat(u)}}return u})].concat(r)}isActiveAt(e,t,r=-1){return by(e,t,r).type.prop(Bs)==this.data}findRegions(e){let t=e.facet(Za);if(t?.data==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let r=[],i=(s,o)=>{if(s.prop(Bs)==this.data){r.push({from:o,to:o+s.length});return}let a=s.prop(it.mounted);if(a){if(a.tree.prop(Bs)==this.data){if(a.overlay)for(let l of a.overlay)r.push({from:l.from+o,to:l.to+o});else r.push({from:o,to:o+s.length});return}else if(a.overlay){let l=r.length;if(i(a.tree,a.overlay[0].from+o),r.length>l)return}}for(let l=0;l<s.children.length;l++){let c=s.children[l];c instanceof yt&&i(c,s.positions[l]+o)}};return i(bn(e),0),r}get allowsNesting(){return!0}}Nr.setState=qt.define();function by(n,e,t){let r=n.facet(Za),i=bn(n).topNode;if(!r||r.allowsNesting)for(let s=i;s;s=s.enter(e,t,Vt.ExcludeBuffers|Vt.EnterBracketed))s.type.isTop&&(i=s);return i}class ja extends Nr{constructor(e,t,r){super(e,t,[],r),this.parser=t}static define(e){let t=Nd(e.languageData);return new ja(t,e.parser.configure({props:[Bs.add(r=>r.isTop?t:void 0)]}),e.name)}configure(e,t){return new ja(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function bn(n){let e=n.field(Nr.state,!1);return e?e.tree:yt.empty}class cL{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let r=this.cursorPos-this.string.length;return e<r||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-r,t-r)}}let vl=null;class Bo{constructor(e,t,r=[],i,s,o,a,l){this.parser=e,this.state=t,this.fragments=r,this.tree=i,this.treeLen=s,this.viewport=o,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,t,r){return new Bo(e,t,[],yt.empty,0,r,[],null)}startParse(){return this.parser.startParse(new cL(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=yt.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(gs.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(gs.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=vl;vl=this;try{return e()}finally{vl=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=yy(e,t.from,t.to);return e}changes(e,t){let{fragments:r,tree:i,treeLen:s,viewport:o,skipped:a}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((c,u,f,d)=>l.push({fromA:c,toA:u,fromB:f,toB:d})),r=gs.applyChanges(r,l),i=yt.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){a=[];for(let c of this.skipped){let u=e.mapPos(c.from,1),f=e.mapPos(c.to,-1);u<f&&a.push({from:u,to:f})}}}return new Bo(this.parser,t,r,i,s,o,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:s}=this.skipped[r];i<e.to&&s>e.from&&(this.fragments=yy(this.fragments,i,s),this.skipped.splice(r--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends Id{createParse(t,r,i){let s=i[0].from,o=i[i.length-1].to;return{parsedPos:s,advance(){let l=vl;if(l){for(let c of i)l.tempSkipped.push(c);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=o,new yt(Qn.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return vl}}function yy(n,e,t){return gs.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class za{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,r)||t.takeTree(),new za(t)}static init(e){let t=Math.min(3e3,e.doc.length),r=Bo.create(e.facet(Za).parser,e,{from:0,to:t});return r.work(20,t)||r.takeTree(),new za(r)}}Nr.state=li.define({create:za.init,update(n,e){for(let t of e.effects)if(t.is(Nr.setState))return t.value;return e.startState.facet(Za)!=e.state.facet(Za)?za.init(e.state):n.apply(e)}});let f2=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(f2=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const Ph=typeof navigator<"u"&&(!((Th=navigator.scheduling)===null||Th===void 0)&&Th.isInputPending)?()=>navigator.scheduling.isInputPending():null,uL=cr.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Nr.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Nr.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=f2(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,s=r.field(Nr.state);if(s.tree==s.context.tree&&s.context.isDone(i+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!Ph?Math.max(25,e.timeRemaining()-5):1e9),a=s.context.treeLen<i&&r.doc.length>i+1e3,l=s.context.work(()=>Ph&&Ph()||Date.now()>o,i+(a?0:1e5));this.chunkBudget-=Date.now()-t,(l||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Nr.setState.of(new za(s.context))})),this.chunkBudget>0&&!(l&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Ir(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Za=Be.define({combine(n){return n.length?n[0]:null},enables:n=>[Nr.state,uL,$e.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class Xa{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}class te{constructor(e,t,r,i,s,o=void 0){this.name=e,this.alias=t,this.extensions=r,this.filename=i,this.loadFunc=s,this.support=o,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:t,support:r}=e;if(!t){if(!r)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");t=()=>Promise.resolve(r)}return new te(e.name,(e.alias||[]).concat(e.name).map(i=>i.toLowerCase()),e.extensions||[],e.filename,t,r)}static matchFilename(e,t){for(let i of e)if(i.filename&&i.filename.test(t))return i;let r=/\.([^.]+)$/.exec(t);if(r){for(let i of e)if(i.extensions.indexOf(r[1])>-1)return i}return null}static matchLanguageName(e,t,r=!0){t=t.toLowerCase();for(let i of e)if(i.alias.some(s=>s==t))return i;if(r)for(let i of e)for(let s of i.alias){let o=t.indexOf(s);if(o>-1&&(s.length>2||!/\w/.test(t[o-1])&&!/\w/.test(t[o+s.length])))return i}return null}}const fL=Be.define(),Vc=Be.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function jo(n){let e=n.facet(Vc);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function Rf(n,e){let t="",r=n.tabSize,i=n.facet(Vc)[0];if(i==" "){for(;e>=r;)t+=" ",e-=r;i=" "}for(let s=0;s<e;s++)t+=i;return t}function d2(n,e){n instanceof Lt&&(n=new Bd(n));for(let r of n.state.facet(fL)){let i=r(n,e);if(i!==void 0)return i}let t=bn(n.state);return t.length>=e?dL(n,t,e):null}class Bd{constructor(e,t={}){this.state=e,this.options=t,this.unit=jo(e)}lineAt(e,t=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:s}=this.options;return i!=null&&i>=r.from&&i<=r.to?s&&i==e?{text:"",from:e}:(t<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,t);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,t=1){let{text:r,from:i}=this.lineAt(e,t),s=this.countColumn(r,e-i),o=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return o>-1&&(s+=o-this.countColumn(r,r.search(/\S|$/))),s}countColumn(e,t=e.length){return vs(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:r,from:i}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let o=s(i);if(o>-1)return o}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const ll=new it;function dL(n,e,t){let r=e.resolveStack(t),i=e.resolveInner(t,-1).resolve(t,0).enterUnfinishedNodesBefore(t);if(i!=r.node){let s=[];for(let o=i;o&&!(o.from<r.node.from||o.to>r.node.to||o.from==r.node.from&&o.type==r.node.type);o=o.parent)s.push(o);for(let o=s.length-1;o>=0;o--)r={node:s[o],next:r}}return h2(r,n,t)}function h2(n,e,t){for(let r=n;r;r=r.next){let i=pL(r.node);if(i)return i(_O.create(e,t,r))}return 0}function hL(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function pL(n){let e=n.type.prop(ll);if(e)return e;let t=n.firstChild,r;if(t&&(r=t.type.prop(it.closedBy))){let i=n.lastChild,s=i&&r.indexOf(i.name)>-1;return o=>p2(o,!0,1,void 0,s&&!hL(o)?i.from:void 0)}return n.parent==null?mL:null}function mL(){return 0}class _O extends Bd{constructor(e,t,r){super(e.state,e.options),this.base=e,this.pos=t,this.context=r}get node(){return this.context.node}static create(e,t,r){return new _O(e,t,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(t.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(gL(r,e))break;t=this.state.doc.lineAt(r.from)}return this.lineIndent(t.from)}continue(){return h2(this.context.next,this.base,this.pos)}}function gL(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function OL(n){let e=n.node,t=e.childAfter(e.from),r=e.lastChild;if(!t)return null;let i=n.options.simulateBreak,s=n.state.doc.lineAt(t.from),o=i==null||i<=s.from?s.to:Math.min(s.to,i);for(let a=t.to;;){let l=e.childAfter(a);if(!l||l==r)return null;if(!l.type.isSkipped){if(l.from>=o)return null;let c=/^ */.exec(s.text.slice(t.to-s.from))[0].length;return{from:t.from,to:t.to+c}}a=l.to}}function vL({closing:n,align:e=!0,units:t=1}){return r=>p2(r,e,t,n)}function p2(n,e,t,r,i){let s=n.textAfter,o=s.match(/^\s*/)[0].length,a=r&&s.slice(o,o+r.length)==r||i==n.pos+o,l=e?OL(n):null;return l?a?n.column(l.from):n.column(l.to):n.baseIndent+(a?0:n.unit*t)}const bL=n=>n.baseIndent;function of({except:n,units:e=1}={}){return t=>{let r=n&&n.test(t.textAfter);return t.baseIndent+(r?0:e*t.unit)}}const yL=Be.define(),Wc=new it;function m2(n){let e=n.firstChild,t=n.lastChild;return e&&e.to<t.from?{from:e.to,to:t.type.isError?n.to:t.from}:null}class cl{constructor(e,t){this.specs=e;let r;function i(a){let l=Gs.newName();return(r||(r=Object.create(null)))["."+l]=a,l}const s=typeof t.all=="string"?t.all:t.all?i(t.all):void 0,o=t.scope;this.scope=o instanceof Nr?a=>a.prop(Bs)==o.data:o?a=>a==o:void 0,this.style=u2(e.map(a=>({tag:a.tag,class:a.class||i(Object.assign({},a,{tag:null}))})),{all:s}).style,this.module=r?new Gs(r):null,this.themeType=t.themeType}static define(e,t){return new cl(e,t||{})}}const xm=Be.define(),g2=Be.define({combine(n){return n.length?[n[0]]:null}});function Eh(n){let e=n.facet(xm);return e.length?e:n.facet(g2)}function pc(n,e){let t=[_L],r;return n instanceof cl&&(n.module&&t.push($e.styleModule.of(n.module)),r=n.themeType),e?.fallback?t.push(g2.of(n)):r?t.push(xm.computeN([$e.darkTheme],i=>i.facet($e.darkTheme)==(r=="dark")?[n]:[])):t.push(xm.of(n)),t}class wL{constructor(e){this.markCache=Object.create(null),this.tree=bn(e.state),this.decorations=this.buildDeco(e,Eh(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=bn(e.state),r=Eh(e.state),i=r!=Eh(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length<s.to&&!i&&t.type==this.tree.type&&o>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||i)&&(this.tree=t,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=s.to)}buildDeco(e,t){if(!t||!this.tree.length)return gt.none;let r=new qo;for(let{from:i,to:s}of e.visibleRanges)oL(this.tree,t,(o,a,l)=>{r.add(o,a,this.markCache[l]||(this.markCache[l]=gt.mark({class:l})))},i,s);return r.finish()}}const _L=io.high(cr.fromClass(wL,{decorations:n=>n.decorations})),O2=cl.define([{tag:N.meta,color:"#404740"},{tag:N.link,textDecoration:"underline"},{tag:N.heading,textDecoration:"underline",fontWeight:"bold"},{tag:N.emphasis,fontStyle:"italic"},{tag:N.strong,fontWeight:"bold"},{tag:N.strikethrough,textDecoration:"line-through"},{tag:N.keyword,color:"#708"},{tag:[N.atom,N.bool,N.url,N.contentSeparator,N.labelName],color:"#219"},{tag:[N.literal,N.inserted],color:"#164"},{tag:[N.string,N.deleted],color:"#a11"},{tag:[N.regexp,N.escape,N.special(N.string)],color:"#e40"},{tag:N.definition(N.variableName),color:"#00f"},{tag:N.local(N.variableName),color:"#30a"},{tag:[N.typeName,N.namespace],color:"#085"},{tag:N.className,color:"#167"},{tag:[N.special(N.variableName),N.macroName],color:"#256"},{tag:N.definition(N.propertyName),color:"#00c"},{tag:N.comment,color:"#940"},{tag:N.invalid,color:"#f00"}]),kL=1e4,xL="()[]{}",v2=new it;function Sm(n,e,t){let r=n.prop(e<0?it.openedBy:it.closedBy);if(r)return r;if(n.name.length==1){let i=t.indexOf(n.name);if(i>-1&&i%2==(e<0?1:0))return[t[i+e]]}return null}function Am(n){let e=n.type.prop(v2);return e?e(n.node):n}function ga(n,e,t,r={}){let i=r.maxScanDistance||kL,s=r.brackets||xL,o=bn(n),a=o.resolveInner(e,t);for(let l=a;l;l=l.parent){let c=Sm(l.type,t,s);if(c&&l.from<l.to){let u=Am(l);if(u&&(t>0?e>=u.from&&e<u.to:e>u.from&&e<=u.to))return SL(n,e,t,l,u,c,s)}}return AL(n,e,t,o,a.type,i,s)}function SL(n,e,t,r,i,s,o){let a=r.parent,l={from:i.from,to:i.to},c=0,u=a?.cursor();if(u&&(t<0?u.childBefore(r.from):u.childAfter(r.to)))do if(t<0?u.to<=r.from:u.from>=r.to){if(c==0&&s.indexOf(u.type.name)>-1&&u.from<u.to){let f=Am(u);return{start:l,end:f?{from:f.from,to:f.to}:void 0,matched:!0}}else if(Sm(u.type,t,o))c++;else if(Sm(u.type,-t,o)){if(c==0){let f=Am(u);return{start:l,end:f&&f.from<f.to?{from:f.from,to:f.to}:void 0,matched:!1}}c--}}while(t<0?u.prevSibling():u.nextSibling());return{start:l,matched:!1}}function AL(n,e,t,r,i,s,o){let a=t<0?n.sliceDoc(e-1,e):n.sliceDoc(e,e+1),l=o.indexOf(a);if(l<0||l%2==0!=t>0)return null;let c={from:t<0?e-1:e,to:t>0?e+1:e},u=n.doc.iterRange(e,t>0?n.doc.length:0),f=0;for(let d=0;!u.next().done&&d<=s;){let h=u.value;t<0&&(d+=h.length);let g=e+d*t;for(let p=t>0?0:h.length-1,O=t>0?h.length:-1;p!=O;p+=t){let v=o.indexOf(h[p]);if(!(v<0||r.resolveInner(g+p,1).type!=i))if(v%2==0==t>0)f++;else{if(f==1)return{start:c,end:{from:g+p,to:g+p+1},matched:v>>1==l>>1};f--}}t>0&&(d+=h.length)}return u.done?{start:c,matched:!1}:null}function wy(n,e,t,r=0,i=0){e==null&&(e=n.search(/[^\s\u00a0]/),e==-1&&(e=n.length));let s=i;for(let o=r;o<e;o++)n.charCodeAt(o)==9?s+=t-s%t:s++;return s}class b2{constructor(e,t,r,i){this.string=e,this.tabSize=t,this.indentUnit=r,this.overrideIndent=i,this.pos=0,this.start=0,this.lastColumnPos=0,this.lastColumnValue=0}eol(){return this.pos>=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)}eat(e){let t=this.string.charAt(this.pos),r;if(typeof e=="string"?r=t==e:r=t&&(e instanceof RegExp?e.test(t):e(t)),r)return++this.pos,t}eatWhile(e){let t=this.pos;for(;this.eat(e););return this.pos>t}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPos<this.start&&(this.lastColumnValue=wy(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue}indentation(){var e;return(e=this.overrideIndent)!==null&&e!==void 0?e:wy(this.string,null,this.tabSize)}match(e,t,r){if(typeof e=="string"){let i=o=>r?o.toLowerCase():o,s=this.string.substr(this.pos,e.length);return i(s)==i(e)?(t!==!1&&(this.pos+=e.length),!0):null}else{let i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&t!==!1&&(this.pos+=i[0].length),i)}}current(){return this.string.slice(this.start,this.pos)}}function CL(n){return{name:n.name||"",token:n.token,blankLine:n.blankLine||(()=>{}),startState:n.startState||(()=>!0),copyState:n.copyState||TL,indent:n.indent||(()=>null),languageData:n.languageData||{},tokenTable:n.tokenTable||SO,mergeTokens:n.mergeTokens!==!1}}function TL(n){if(typeof n!="object")return n;let e={};for(let t in n){let r=n[t];e[t]=r instanceof Array?r.slice():r}return e}const _y=new WeakMap;class kO extends Nr{constructor(e){let t=Nd(e.languageData),r=CL(e),i,s=new class extends Id{createParse(o,a,l){return new EL(i,o,a,l)}};super(t,s,[],e.name),this.topNode=LL(t,this),i=this,this.streamParser=r,this.stateAfter=new it({perNode:!0}),this.tokenTable=e.tokenTable?new k2(r.tokenTable):QL}static define(e){return new kO(e)}getIndent(e){let t,{overrideIndentation:r}=e.options;r&&(t=_y.get(e.state),t!=null&&t<e.pos-1e4&&(t=void 0));let i=xO(this,e.node.tree,e.node.from,e.node.from,t??e.pos),s,o;if(i?(o=i.state,s=i.pos+1):(o=this.streamParser.startState(e.unit),s=e.node.from),e.pos-s>1e4)return null;for(;s<e.pos;){let l=e.state.doc.lineAt(s),c=Math.min(e.pos,l.to);if(l.length){let u=r?r(l.from):-1,f=new b2(l.text,e.state.tabSize,e.unit,u<0?void 0:u);for(;f.pos<c-l.from;)w2(this.streamParser.token,f,o)}else this.streamParser.blankLine(o,e.unit);if(c==e.pos)break;s=l.to+1}let a=e.lineAt(e.pos);return r&&t==null&&_y.set(e.state,a.from),this.streamParser.indent(o,/^\s*(.*)/.exec(a.text)[1],e)}get allowsNesting(){return!1}}function xO(n,e,t,r,i){let s=t>=r&&t+e.length<=i&&e.prop(n.stateAfter);if(s)return{state:n.streamParser.copyState(s),pos:t+e.length};for(let o=e.children.length-1;o>=0;o--){let a=e.children[o],l=t+e.positions[o],c=a instanceof yt&&l<i&&xO(n,a,l,r,i);if(c)return c}return null}function y2(n,e,t,r,i){if(i&&t<=0&&r>=e.length)return e;!i&&t==0&&e.type==n.topNode&&(i=!0);for(let s=e.children.length-1;s>=0;s--){let o=e.positions[s],a=e.children[s],l;if(o<r&&a instanceof yt){if(!(l=y2(n,a,t-o,r-o,i)))break;return i?new yt(e.type,e.children.slice(0,s).concat(l),e.positions.slice(0,s+1),o+l.length):l}}return null}function PL(n,e,t,r,i){for(let s of e){let o=s.from+(s.openStart?25:0),a=s.to-(s.openEnd?25:0),l=o<=t&&a>t&&xO(n,s.tree,0-s.offset,t,a),c;if(l&&l.pos<=r&&(c=y2(n,s.tree,t+s.offset,l.pos+s.offset,!1)))return{state:l.state,tree:c}}return{state:n.streamParser.startState(i?jo(i):4),tree:yt.empty}}let EL=class{constructor(e,t,r,i){this.lang=e,this.input=t,this.fragments=r,this.ranges=i,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=i[i.length-1].to;let s=Bo.get(),o=i[0].from,{state:a,tree:l}=PL(e,r,o,this.to,s?.state);this.state=a,this.parsedPos=this.chunkStart=o+l.length;for(let c=0;c<l.children.length;c++)this.chunks.push(l.children[c]),this.chunkPos.push(l.positions[c]);s&&this.parsedPos<s.viewport.from-1e5&&i.some(c=>c.from<=s.viewport.from&&c.to>=s.viewport.from)&&(this.state=this.lang.streamParser.startState(jo(s.state)),s.skipUntilInView(this.parsedPos,s.viewport.from),this.parsedPos=s.viewport.from),this.moveRangeIndex()}advance(){let e=Bo.get(),t=this.stoppedAt==null?this.to:Math.min(this.to,this.stoppedAt),r=Math.min(t,this.chunkStart+512);for(e&&(r=Math.min(r,e.viewport.to));this.parsedPos<r;)this.parseLine(e);return this.chunkStart<this.parsedPos&&this.finishChunk(),this.parsedPos>=t?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,t),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let t=this.input.chunk(e);if(this.input.lineChunks)t==`
154
- `&&(t="");else{let r=t.indexOf(`
155
- `);r>-1&&(t=t.slice(0,r))}return e+t.length<=this.to?t:t.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,t=this.lineAfter(e),r=e+t.length;for(let i=this.rangeIndex;;){let s=this.ranges[i].to;if(s>=r||(t=t.slice(0,s-(r-t.length)),i++,i==this.ranges.length))break;let o=this.ranges[i].from,a=this.lineAfter(o);t+=a,r=o+a.length}return{line:t,end:r}}skipGapsTo(e,t,r){for(;;){let i=this.ranges[this.rangeIndex].to,s=e+t;if(r>0?i>s:i>=s)break;let o=this.ranges[++this.rangeIndex].from;t+=o-i}return t}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(e,t,r,i){let s=4;if(this.ranges.length>1){i=this.skipGapsTo(t,i,1),t+=i;let a=this.chunk.length;i=this.skipGapsTo(r,i,-1),r+=i,s+=this.chunk.length-a}let o=this.chunk.length-4;return this.lang.streamParser.mergeTokens&&s==4&&o>=0&&this.chunk[o]==e&&this.chunk[o+2]==t?this.chunk[o+2]=r:this.chunk.push(e,t,r,s),i}parseLine(e){let{line:t,end:r}=this.nextLine(),i=0,{streamParser:s}=this.lang,o=new b2(t,e?e.state.tabSize:4,e?jo(e.state):2);if(o.eol())s.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let a=w2(s.token,o,this.state);if(a&&(i=this.emitToken(this.lang.tokenTable.resolve(a),this.parsedPos+o.start,this.parsedPos+o.pos,i)),o.start>1e4)break}this.parsedPos=r,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let e=yt.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:$L,topID:0,maxBufferLength:512,reused:this.chunkReused});e=new yt(e.type,e.children,e.positions,e.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(e),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new yt(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}};function w2(n,e,t){e.start=e.pos;for(let r=0;r<10;r++){let i=n(e,t);if(e.pos>e.start)return i}throw new Error("Stream parser failed to advance stream.")}const SO=Object.create(null),mc=[Qn.none],$L=new ol(mc),ky=[],xy=Object.create(null),_2=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])_2[n]=x2(SO,e);class k2{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),_2)}resolve(e){return e?this.table[e]||(this.table[e]=x2(this.extra,e)):0}}const QL=new k2(SO);function $h(n,e){ky.indexOf(n)>-1||(ky.push(n),console.warn(e))}function x2(n,e){let t=[];for(let a of e.split(" ")){let l=[];for(let c of a.split(".")){let u=n[c]||N[c];u?typeof u=="function"?l.length?l=l.map(u):$h(c,`Modifier ${c} used at start of tag`):l.length?$h(c,`Tag ${c} used as modifier`):l=Array.isArray(u)?u:[u]:$h(c,`Unknown highlighting tag ${c}`)}for(let c of l)t.push(c)}if(!t.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+t.map(a=>a.id),s=xy[i];if(s)return s.id;let o=xy[i]=Qn.define({id:mc.length,name:r,props:[al({[r]:t})]});return mc.push(o),o.id}function LL(n,e){let t=Qn.define({id:mc.length,name:"Document",props:[Bs.add(()=>n),ll.add(()=>r=>e.getIndent(r))],top:!0});return mc.push(t),t}On.RTL,On.LTR;const ML=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),r=CO(n.state,t.from);return r.line?DL(n):r.block?RL(n):!1};function AO(n,e){return({state:t,dispatch:r})=>{if(t.readOnly)return!1;let i=n(e,t);return i?(r(t.update(i)),!0):!1}}const DL=AO(BL,0),qL=AO(S2,0),RL=AO((n,e)=>S2(n,e,NL(e)),0);function CO(n,e){let t=n.languageDataAt("commentTokens",e,1);return t.length?t[0]:{}}const bl=50;function IL(n,{open:e,close:t},r,i){let s=n.sliceDoc(r-bl,r),o=n.sliceDoc(i,i+bl),a=/\s*$/.exec(s)[0].length,l=/^\s*/.exec(o)[0].length,c=s.length-a;if(s.slice(c-e.length,c)==e&&o.slice(l,l+t.length)==t)return{open:{pos:r-a,margin:a&&1},close:{pos:i+l,margin:l&&1}};let u,f;i-r<=2*bl?u=f=n.sliceDoc(r,i):(u=n.sliceDoc(r,r+bl),f=n.sliceDoc(i-bl,i));let d=/^\s*/.exec(u)[0].length,h=/\s*$/.exec(f)[0].length,g=f.length-h-t.length;return u.slice(d,d+e.length)==e&&f.slice(g,g+t.length)==t?{open:{pos:r+d+e.length,margin:/\s/.test(u.charAt(d+e.length))?1:0},close:{pos:i-h-t.length,margin:/\s/.test(f.charAt(g-1))?1:0}}:null}function NL(n){let e=[];for(let t of n.selection.ranges){let r=n.doc.lineAt(t.from),i=t.to<=r.to?r:n.doc.lineAt(t.to);i.from>r.from&&i.from==t.to&&(i=t.to==r.to+1?r:n.doc.lineAt(t.to-1));let s=e.length-1;s>=0&&e[s].to>r.from?e[s].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function S2(n,e,t=e.selection.ranges){let r=t.map(s=>CO(e,s.from).block);if(!r.every(s=>s))return null;let i=t.map((s,o)=>IL(e,r[o],s.from,s.to));if(n!=2&&!i.every(s=>s))return{changes:e.changes(t.map((s,o)=>i[o]?[]:[{from:s.from,insert:r[o].open+" "},{from:s.to,insert:" "+r[o].close}]))};if(n!=1&&i.some(s=>s)){let s=[];for(let o=0,a;o<i.length;o++)if(a=i[o]){let l=r[o],{open:c,close:u}=a;s.push({from:c.pos-l.open.length,to:c.pos+c.margin},{from:u.pos-u.margin,to:u.pos+l.close.length})}return{changes:s}}return null}function BL(n,e,t=e.selection.ranges){let r=[],i=-1;e:for(let{from:s,to:o}of t){let a=r.length,l=1e9,c;for(let u=s;u<=o;){let f=e.doc.lineAt(u);if(c==null&&(c=CO(e,f.from).line,!c))continue e;if(f.from>i&&(s==o||o>f.from)){i=f.from;let d=/^\s*/.exec(f.text)[0].length,h=d==f.length,g=f.text.slice(d,d+c.length)==c?d:-1;d<f.text.length&&d<l&&(l=d),r.push({line:f,comment:g,token:c,indent:d,empty:h,single:!1})}u=f.to+1}if(l<1e9)for(let u=a;u<r.length;u++)r[u].indent<r[u].line.text.length&&(r[u].indent=l);r.length==a+1&&(r[a].single=!0)}if(n!=2&&r.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:a,token:l,indent:c,empty:u,single:f}of r)(f||!u)&&s.push({from:a.from+c,insert:l+" "});let o=e.changes(s);return{changes:o,selection:e.selection.map(o,1)}}else if(n!=1&&r.some(s=>s.comment>=0)){let s=[];for(let{line:o,comment:a,token:l}of r)if(a>=0){let c=o.from+a,u=c+l.length;o.text[u-o.from]==" "&&u++,s.push({from:c,to:u})}return{changes:s}}return null}const Cm=ks.define(),jL=ks.define(),zL=Be.define(),A2=Be.define({combine(n){return jc(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(r,i)=>e(r,i)||t(r,i)})}}),C2=li.define({create(){return zi.empty},update(n,e){let t=e.state.facet(A2),r=e.annotation(Cm);if(r){let l=kr.fromTransaction(e,r.selection),c=r.side,u=c==0?n.undone:n.done;return l?u=If(u,u.length,t.minDepth,l):u=E2(u,e.startState.selection),new zi(c==0?r.rest:u,c==0?u:r.rest)}let i=e.annotation(jL);if((i=="full"||i=="before")&&(n=n.isolate()),e.annotation(Tn.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let s=kr.fromTransaction(e),o=e.annotation(Tn.time),a=e.annotation(Tn.userEvent);return s?n=n.addChanges(s,o,a,t,e):e.selection&&(n=n.addSelection(e.startState.selection,o,a,t.newGroupDelay)),(i=="full"||i=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new zi(n.done.map(kr.fromJSON),n.undone.map(kr.fromJSON))}});function TO(n={}){return[C2,A2.of(n),$e.domEventHandlers({beforeinput(e,t){let r=e.inputType=="historyUndo"?T2:e.inputType=="historyRedo"?Tm:null;return r?(e.preventDefault(),r(t)):!1}})]}function jd(n,e){return function({state:t,dispatch:r}){if(!e&&t.readOnly)return!1;let i=t.field(C2,!1);if(!i)return!1;let s=i.pop(n,t,e);return s?(r(s),!0):!1}}const T2=jd(0,!1),Tm=jd(1,!1),ZL=jd(0,!0),XL=jd(1,!0);class kr{constructor(e,t,r,i,s){this.changes=e,this.effects=t,this.mapped=r,this.startSelection=i,this.selectionsAfter=s}setSelAfter(e){return new kr(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new kr(e.changes&&qn.fromJSON(e.changes),[],e.mapped&&Fi.fromJSON(e.mapped),e.startSelection&&pe.fromJSON(e.startSelection),e.selectionsAfter.map(pe.fromJSON))}static fromTransaction(e,t){let r=Kr;for(let i of e.startState.facet(zL)){let s=i(e);s.length&&(r=r.concat(s))}return!r.length&&e.changes.empty?null:new kr(e.changes.invert(e.startState.doc),r,void 0,t||e.startState.selection,Kr)}static selection(e){return new kr(void 0,Kr,void 0,void 0,e)}}function If(n,e,t,r){let i=e+1>t+20?e-t-1:0,s=n.slice(i,e);return s.push(r),s}function FL(n,e){let t=[],r=!1;return n.iterChangedRanges((i,s)=>t.push(i,s)),e.iterChangedRanges((i,s,o,a)=>{for(let l=0;l<t.length;){let c=t[l++],u=t[l++];a>=c&&o<=u&&(r=!0)}}),r}function VL(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,r)=>t.empty!=e.ranges[r].empty).length===0}function P2(n,e){return n.length?e.length?n.concat(e):n:e}const Kr=[],WL=200;function E2(n,e){if(n.length){let t=n[n.length-1],r=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-WL));return r.length&&r[r.length-1].eq(e)?n:(r.push(e),If(n,n.length-1,1e9,t.setSelAfter(r)))}else return[kr.selection([e])]}function YL(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function Qh(n,e){if(!n.length)return n;let t=n.length,r=Kr;for(;t;){let i=UL(n[t-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let s=n.slice(0,t);return s[t-1]=i,s}else e=i.mapped,t--,r=i.selectionsAfter}return r.length?[kr.selection(r)]:Kr}function UL(n,e,t){let r=P2(n.selectionsAfter.length?n.selectionsAfter.map(a=>a.map(e)):Kr,t);if(!n.changes)return kr.selection(r);let i=n.changes.map(e),s=e.mapDesc(n.changes,!0),o=n.mapped?n.mapped.composeDesc(s):s;return new kr(i,qt.mapEffects(n.effects,e),o,n.startSelection.map(s),r)}const GL=/^(input\.type|delete)($|\.)/;class zi{constructor(e,t,r=0,i=void 0){this.done=e,this.undone=t,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new zi(this.done,this.undone):this}addChanges(e,t,r,i,s){let o=this.done,a=o[o.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!r||GL.test(r))&&(!a.selectionsAfter.length&&t-this.prevTime<i.newGroupDelay&&i.joinToEvent(s,FL(a.changes,e.changes))||r=="input.type.compose")?o=If(o,o.length-1,i.minDepth,new kr(e.changes.compose(a.changes),P2(qt.mapEffects(e.effects,a.changes),a.effects),a.mapped,a.startSelection,Kr)):o=If(o,o.length,i.minDepth,e),new zi(o,Kr,t,r)}addSelection(e,t,r,i){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:Kr;return s.length>0&&t-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&VL(s[s.length-1],e)?this:new zi(E2(this.done,e),this.undone,t,r)}addMapping(e){return new zi(Qh(this.done,e),Qh(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let s=i[i.length-1],o=s.selectionsAfter[0]||(s.startSelection?s.startSelection.map(s.changes.invertedDesc,1):t.selection);if(r&&s.selectionsAfter.length)return t.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:Cm.of({side:e,rest:YL(i),selection:o}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let a=i.length==1?Kr:i.slice(0,i.length-1);return s.mapped&&(a=Qh(a,s.mapped)),t.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:Cm.of({side:e,rest:a,selection:o}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}zi.empty=new zi(Kr,Kr);const PO=[{key:"Mod-z",run:T2,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Tm,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Tm,preventDefault:!0},{key:"Mod-u",run:ZL,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:XL,preventDefault:!0}];function ul(n,e){return pe.create(n.ranges.map(e),n.mainIndex)}function Ci(n,e){return n.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Ti({state:n,dispatch:e},t){let r=ul(n.selection,t);return r.eq(n.selection,!0)?!1:(e(Ci(n,r)),!0)}function zd(n,e){return pe.cursor(e?n.to:n.from)}function $2(n,e){return Ti(n,t=>t.empty?n.moveByChar(t,e):zd(t,e))}function nr(n){return n.textDirectionAt(n.state.selection.main.head)==On.LTR}const Q2=n=>$2(n,!nr(n)),L2=n=>$2(n,nr(n));function M2(n,e){return Ti(n,t=>t.empty?n.moveByGroup(t,e):zd(t,e))}const HL=n=>M2(n,!nr(n)),KL=n=>M2(n,nr(n));function JL(n,e,t){if(e.type.prop(t))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function Zd(n,e,t){let r=bn(n).resolveInner(e.head),i=t?it.closedBy:it.openedBy;for(let l=e.head;;){let c=t?r.childAfter(l):r.childBefore(l);if(!c)break;JL(n,c,i)?r=c:l=t?c.to:c.from}let s=r.type.prop(i),o,a;return s&&(o=t?ga(n,r.from,1):ga(n,r.to,-1))&&o.matched?a=t?o.end.to:o.end.from:a=t?r.to:r.from,pe.cursor(a,t?-1:1)}const eM=n=>Ti(n,e=>Zd(n.state,e,!nr(n))),tM=n=>Ti(n,e=>Zd(n.state,e,nr(n)));function D2(n,e){return Ti(n,t=>{if(!t.empty)return zd(t,e);let r=n.moveVertically(t,e);return r.head!=t.head?r:n.moveToLineBoundary(t,e)})}const q2=n=>D2(n,!1),R2=n=>D2(n,!0);function I2(n){let e=n.scrollDOM.clientHeight<n.scrollDOM.scrollHeight-2,t=0,r=0,i;if(e){for(let s of n.state.facet($e.scrollMargins)){let o=s(n);o?.top&&(t=Math.max(o?.top,t)),o?.bottom&&(r=Math.max(o?.bottom,r))}i=n.scrollDOM.clientHeight-t-r}else i=(n.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:t,marginBottom:r,selfScroll:e,height:Math.max(n.defaultLineHeight,i-5)}}function N2(n,e){let t=I2(n),{state:r}=n,i=ul(r.selection,o=>o.empty?n.moveVertically(o,e,t.height):zd(o,e));if(i.eq(r.selection))return!1;let s;if(t.selfScroll){let o=n.coordsAtPos(r.selection.main.head),a=n.scrollDOM.getBoundingClientRect(),l=a.top+t.marginTop,c=a.bottom-t.marginBottom;o&&o.top>l&&o.bottom<c&&(s=$e.scrollIntoView(i.main.head,{y:"start",yMargin:o.top-l}))}return n.dispatch(Ci(r,i),{effects:s}),!0}const Sy=n=>N2(n,!1),Pm=n=>N2(n,!0);function so(n,e,t){let r=n.lineBlockAt(e.head),i=n.moveToLineBoundary(e,t);if(i.head==e.head&&i.head!=(t?r.to:r.from)&&(i=n.moveToLineBoundary(e,t,!1)),!t&&i.head==r.from&&r.length){let s=/^\s*/.exec(n.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;s&&e.head!=r.from+s&&(i=pe.cursor(r.from+s))}return i}const nM=n=>Ti(n,e=>so(n,e,!0)),rM=n=>Ti(n,e=>so(n,e,!1)),iM=n=>Ti(n,e=>so(n,e,!nr(n))),sM=n=>Ti(n,e=>so(n,e,nr(n))),oM=n=>Ti(n,e=>pe.cursor(n.lineBlockAt(e.head).from,1)),aM=n=>Ti(n,e=>pe.cursor(n.lineBlockAt(e.head).to,-1));function lM(n,e,t){let r=!1,i=ul(n.selection,s=>{let o=ga(n,s.head,-1)||ga(n,s.head,1)||s.head>0&&ga(n,s.head-1,1)||s.head<n.doc.length&&ga(n,s.head+1,-1);if(!o||!o.end)return s;r=!0;let a=o.start.from==s.head?o.end.to:o.end.from;return pe.cursor(a)});return r?(e(Ci(n,i)),!0):!1}const cM=({state:n,dispatch:e})=>lM(n,e);function ci(n,e){let t=ul(n.state.selection,r=>{let i=e(r);return pe.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(Ci(n.state,t)),!0)}function B2(n,e){return ci(n,t=>n.moveByChar(t,e))}const j2=n=>B2(n,!nr(n)),z2=n=>B2(n,nr(n));function Z2(n,e){return ci(n,t=>n.moveByGroup(t,e))}const uM=n=>Z2(n,!nr(n)),fM=n=>Z2(n,nr(n)),dM=n=>ci(n,e=>Zd(n.state,e,!nr(n))),hM=n=>ci(n,e=>Zd(n.state,e,nr(n)));function X2(n,e){return ci(n,t=>n.moveVertically(t,e))}const F2=n=>X2(n,!1),V2=n=>X2(n,!0);function W2(n,e){return ci(n,t=>n.moveVertically(t,e,I2(n).height))}const Ay=n=>W2(n,!1),Cy=n=>W2(n,!0),pM=n=>ci(n,e=>so(n,e,!0)),mM=n=>ci(n,e=>so(n,e,!1)),gM=n=>ci(n,e=>so(n,e,!nr(n))),OM=n=>ci(n,e=>so(n,e,nr(n))),vM=n=>ci(n,e=>pe.cursor(n.lineBlockAt(e.head).from)),bM=n=>ci(n,e=>pe.cursor(n.lineBlockAt(e.head).to)),Ty=({state:n,dispatch:e})=>(e(Ci(n,{anchor:0})),!0),Py=({state:n,dispatch:e})=>(e(Ci(n,{anchor:n.doc.length})),!0),Ey=({state:n,dispatch:e})=>(e(Ci(n,{anchor:n.selection.main.anchor,head:0})),!0),$y=({state:n,dispatch:e})=>(e(Ci(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),yM=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),wM=({state:n,dispatch:e})=>{let t=Xd(n).map(({from:r,to:i})=>pe.range(r,Math.min(i+1,n.doc.length)));return e(n.update({selection:pe.create(t),userEvent:"select"})),!0},_M=({state:n,dispatch:e})=>{let t=ul(n.selection,r=>{let i=bn(n),s=i.resolveStack(r.from,1);if(r.empty){let o=i.resolveStack(r.from,-1);o.node.from>=s.node.from&&o.node.to<=s.node.to&&(s=o)}for(let o=s;o;o=o.next){let{node:a}=o;if((a.from<r.from&&a.to>=r.to||a.to>r.to&&a.from<=r.from)&&o.next)return pe.range(a.to,a.from)}return r});return t.eq(n.selection)?!1:(e(Ci(n,t)),!0)};function Y2(n,e){let{state:t}=n,r=t.selection,i=t.selection.ranges.slice();for(let s of t.selection.ranges){let o=t.doc.lineAt(s.head);if(e?o.to<n.state.doc.length:o.from>0)for(let a=s;;){let l=n.moveVertically(a,e);if(l.head<o.from||l.head>o.to){i.some(c=>c.head==l.head)||i.push(l);break}else{if(l.head==a.head)break;a=l}}}return i.length==r.ranges.length?!1:(n.dispatch(Ci(t,pe.create(i,i.length-1))),!0)}const kM=n=>Y2(n,!1),xM=n=>Y2(n,!0),SM=({state:n,dispatch:e})=>{let t=n.selection,r=null;return t.ranges.length>1?r=pe.create([t.main]):t.main.empty||(r=pe.create([pe.cursor(t.main.head)])),r?(e(Ci(n,r)),!0):!1};function Yc(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:r}=n,i=r.changeByRange(s=>{let{from:o,to:a}=s;if(o==a){let l=e(s);l<o?(t="delete.backward",l=ku(n,l,!1)):l>o&&(t="delete.forward",l=ku(n,l,!0)),o=Math.min(o,l),a=Math.max(a,l)}else o=ku(n,o,!1),a=ku(n,a,!0);return o==a?{range:s}:{changes:{from:o,to:a},range:pe.cursor(o,o<s.head?-1:1)}});return i.changes.empty?!1:(n.dispatch(r.update(i,{scrollIntoView:!0,userEvent:t,effects:t=="delete.selection"?$e.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function ku(n,e,t){if(n instanceof $e)for(let r of n.state.facet($e.atomicRanges).map(i=>i(n)))r.between(e,e,(i,s)=>{i<e&&s>e&&(e=t?s:i)});return e}const U2=(n,e,t)=>Yc(n,r=>{let i=r.from,{state:s}=n,o=s.doc.lineAt(i),a,l;if(t&&!e&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(a=o.text.slice(0,i-o.from))){if(a[a.length-1]==" ")return i-1;let c=vs(a,s.tabSize),u=c%jo(s)||jo(s);for(let f=0;f<u&&a[a.length-1-f]==" ";f++)i--;l=i}else l=Zn(o.text,i-o.from,e,e)+o.from,l==i&&o.number!=(e?s.doc.lines:1)?l+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(o.text.slice(l-o.from,i-o.from))&&(l=Zn(o.text,l-o.from,!1,!1)+o.from);return l}),Em=n=>U2(n,!1,!0),G2=n=>U2(n,!0,!1),H2=(n,e)=>Yc(n,t=>{let r=t.head,{state:i}=n,s=i.doc.lineAt(r),o=i.charCategorizer(r);for(let a=null;;){if(r==(e?s.to:s.from)){r==t.head&&s.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let l=Zn(s.text,r-s.from,e)+s.from,c=s.text.slice(Math.min(r,l)-s.from,Math.max(r,l)-s.from),u=o(c);if(a!=null&&u!=a)break;(c!=" "||r!=t.head)&&(a=u),r=l}return r}),K2=n=>H2(n,!1),AM=n=>H2(n,!0),CM=n=>Yc(n,e=>{let t=n.lineBlockAt(e.head).to;return e.head<t?t:Math.min(n.state.doc.length,e.head+1)}),TM=n=>Yc(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),PM=n=>Yc(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head<t?t:Math.min(n.state.doc.length,e.head+1)}),EM=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Xt.of(["",""])},range:pe.cursor(r.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},$M=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>{if(!r.empty||r.from==0||r.from==n.doc.length)return{range:r};let i=r.from,s=n.doc.lineAt(i),o=i==s.from?i-1:Zn(s.text,i-s.from,!1)+s.from,a=i==s.to?i+1:Zn(s.text,i-s.from,!0)+s.from;return{changes:{from:o,to:a,insert:n.doc.slice(i,a).append(n.doc.slice(o,i))},range:pe.cursor(a)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Xd(n){let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.from),s=n.doc.lineAt(r.to);if(!r.empty&&r.to==s.from&&(s=n.doc.lineAt(r.to-1)),t>=i.number){let o=e[e.length-1];o.to=s.to,o.ranges.push(r)}else e.push({from:i.from,to:s.to,ranges:[r]});t=s.number+1}return e}function J2(n,e,t){if(n.readOnly)return!1;let r=[],i=[];for(let s of Xd(n)){if(t?s.to==n.doc.length:s.from==0)continue;let o=n.doc.lineAt(t?s.to+1:s.from-1),a=o.length+1;if(t){r.push({from:s.to,to:o.to},{from:s.from,insert:o.text+n.lineBreak});for(let l of s.ranges)i.push(pe.range(Math.min(n.doc.length,l.anchor+a),Math.min(n.doc.length,l.head+a)))}else{r.push({from:o.from,to:s.from},{from:s.to,insert:n.lineBreak+o.text});for(let l of s.ranges)i.push(pe.range(l.anchor-a,l.head-a))}}return r.length?(e(n.update({changes:r,scrollIntoView:!0,selection:pe.create(i,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const QM=({state:n,dispatch:e})=>J2(n,e,!1),LM=({state:n,dispatch:e})=>J2(n,e,!0);function ex(n,e,t){if(n.readOnly)return!1;let r=[];for(let s of Xd(n))t?r.push({from:s.from,insert:n.doc.slice(s.from,s.to)+n.lineBreak}):r.push({from:s.to,insert:n.lineBreak+n.doc.slice(s.from,s.to)});let i=n.changes(r);return e(n.update({changes:i,selection:n.selection.map(i,t?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const MM=({state:n,dispatch:e})=>ex(n,e,!1),DM=({state:n,dispatch:e})=>ex(n,e,!0),qM=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(Xd(e).map(({from:i,to:s})=>(i>0?i--:s<e.doc.length&&s++,{from:i,to:s}))),r=ul(e.selection,i=>{let s;if(n.lineWrapping){let o=n.lineBlockAt(i.head),a=n.coordsAtPos(i.head,i.assoc||1);a&&(s=o.bottom+n.documentTop-a.bottom+n.defaultLineHeight/2)}return n.moveVertically(i,!0,s)}).map(t);return n.dispatch({changes:t,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function RM(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=bn(n).resolveInner(e),r=t.childBefore(e),i=t.childAfter(e),s;return r&&i&&r.to<=e&&i.from>=e&&(s=r.type.prop(it.closedBy))&&s.indexOf(i.name)>-1&&n.doc.lineAt(r.to).from==n.doc.lineAt(i.from).from&&!/\S/.test(n.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const Qy=tx(!1),IM=tx(!0);function tx(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:s,to:o}=i,a=e.doc.lineAt(s),l=!n&&s==o&&RM(e,s);n&&(s=o=(o<=a.to?a:e.doc.lineAt(o)).to);let c=new Bd(e,{simulateBreak:s,simulateDoubleBreak:!!l}),u=d2(c,s);for(u==null&&(u=vs(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));o<a.to&&/\s/.test(a.text[o-a.from]);)o++;l?{from:s,to:o}=l:s>a.from&&s<a.from+100&&!/\S/.test(a.text.slice(0,s))&&(s=a.from);let f=["",Rf(e,u)];return l&&f.push(Rf(e,c.lineIndent(a.from,-1))),{changes:{from:s,to:o,insert:Xt.of(f)},range:pe.cursor(s+1+f[1].length)}});return t(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function EO(n,e){let t=-1;return n.changeByRange(r=>{let i=[];for(let o=r.from;o<=r.to;){let a=n.doc.lineAt(o);a.number>t&&(r.empty||r.to>a.from)&&(e(a,i,r),t=a.number),o=a.to+1}let s=n.changes(i);return{changes:i,range:pe.range(s.mapPos(r.anchor,1),s.mapPos(r.head,1))}})}const NM=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),r=new Bd(n,{overrideIndentation:s=>{let o=t[s];return o??-1}}),i=EO(n,(s,o,a)=>{let l=d2(r,s.from);if(l==null)return;/\S/.test(s.text)||(l=0);let c=/^\s*/.exec(s.text)[0],u=Rf(n,l);(c!=u||a.from<s.from+c.length)&&(t[s.from]=l,o.push({from:s.from,to:s.from+c.length,insert:u}))});return i.changes.empty||e(n.update(i,{userEvent:"indent"})),!0},nx=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(EO(n,(t,r)=>{r.push({from:t.from,insert:n.facet(Vc)})}),{userEvent:"input.indent"})),!0),rx=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(EO(n,(t,r)=>{let i=/^\s*/.exec(t.text)[0];if(!i)return;let s=vs(i,n.tabSize),o=0,a=Rf(n,Math.max(0,s-jo(n)));for(;o<i.length&&o<a.length&&i.charCodeAt(o)==a.charCodeAt(o);)o++;r.push({from:t.from+o,to:t.from+i.length,insert:a.slice(o)})}),{userEvent:"delete.dedent"})),!0),BM=n=>(n.setTabFocusMode(),!0),jM=[{key:"Ctrl-b",run:Q2,shift:j2,preventDefault:!0},{key:"Ctrl-f",run:L2,shift:z2},{key:"Ctrl-p",run:q2,shift:F2},{key:"Ctrl-n",run:R2,shift:V2},{key:"Ctrl-a",run:oM,shift:vM},{key:"Ctrl-e",run:aM,shift:bM},{key:"Ctrl-d",run:G2},{key:"Ctrl-h",run:Em},{key:"Ctrl-k",run:CM},{key:"Ctrl-Alt-h",run:K2},{key:"Ctrl-o",run:EM},{key:"Ctrl-t",run:$M},{key:"Ctrl-v",run:Pm}],zM=[{key:"ArrowLeft",run:Q2,shift:j2,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:HL,shift:uM,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:iM,shift:gM,preventDefault:!0},{key:"ArrowRight",run:L2,shift:z2,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:KL,shift:fM,preventDefault:!0},{mac:"Cmd-ArrowRight",run:sM,shift:OM,preventDefault:!0},{key:"ArrowUp",run:q2,shift:F2,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Ty,shift:Ey},{mac:"Ctrl-ArrowUp",run:Sy,shift:Ay},{key:"ArrowDown",run:R2,shift:V2,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Py,shift:$y},{mac:"Ctrl-ArrowDown",run:Pm,shift:Cy},{key:"PageUp",run:Sy,shift:Ay},{key:"PageDown",run:Pm,shift:Cy},{key:"Home",run:rM,shift:mM,preventDefault:!0},{key:"Mod-Home",run:Ty,shift:Ey},{key:"End",run:nM,shift:pM,preventDefault:!0},{key:"Mod-End",run:Py,shift:$y},{key:"Enter",run:Qy,shift:Qy},{key:"Mod-a",run:yM},{key:"Backspace",run:Em,shift:Em,preventDefault:!0},{key:"Delete",run:G2,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:K2,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:AM,preventDefault:!0},{mac:"Mod-Backspace",run:TM,preventDefault:!0},{mac:"Mod-Delete",run:PM,preventDefault:!0}].concat(jM.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),$O=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:eM,shift:dM},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:tM,shift:hM},{key:"Alt-ArrowUp",run:QM},{key:"Shift-Alt-ArrowUp",run:MM},{key:"Alt-ArrowDown",run:LM},{key:"Shift-Alt-ArrowDown",run:DM},{key:"Mod-Alt-ArrowUp",run:kM},{key:"Mod-Alt-ArrowDown",run:xM},{key:"Escape",run:SM},{key:"Mod-Enter",run:IM},{key:"Alt-l",mac:"Ctrl-l",run:wM},{key:"Mod-i",run:_M,preventDefault:!0},{key:"Mod-[",run:rx},{key:"Mod-]",run:nx},{key:"Mod-Alt-\\",run:NM},{key:"Shift-Mod-k",run:qM},{key:"Shift-Mod-\\",run:cM},{key:"Mod-/",run:ML},{key:"Alt-A",run:qL},{key:"Ctrl-m",mac:"Shift-Alt-m",run:BM}].concat(zM),ZM={key:"Tab",run:nx,shift:rx};class QO{constructor(e,t,r,i){this.state=e,this.pos=t,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=bn(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),r=Math.max(t.from,this.pos-250),i=t.text.slice(r-t.from,this.pos-t.from),s=i.search(sx(e,!1));return s<0?null:{from:r+s,to:this.pos,text:i.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function Ly(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function XM(n){let e=Object.create(null),t=Object.create(null);for(let{label:i}of n){e[i[0]]=!0;for(let s=1;s<i.length;s++)t[i[s]]=!0}let r=Ly(e)+Ly(t)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function ix(n){let e=n.map(i=>typeof i=="string"?{label:i}:i),[t,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:XM(e);return i=>{let s=i.matchBefore(r);return s||i.explicit?{from:s?s.from:i.pos,options:e,validFor:t}:null}}function FM(n,e){return t=>{for(let r=bn(t.state).resolveInner(t.pos,-1);r;r=r.parent){if(n.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(t)}}class My{constructor(e,t,r,i){this.completion=e,this.source=t,this.match=r,this.score=i}}function To(n){return n.selection.main.from}function sx(n,e){var t;let{source:r}=n,i=e&&r[0]!="^",s=r[r.length-1]!="$";return!i&&!s?n:new RegExp(`${i?"^":""}(?:${r})${s?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const LO=ks.define();function VM(n,e,t,r){let{main:i}=n.selection,s=t-i.from,o=r-i.from;return{...n.changeByRange(a=>{if(a!=i&&t!=r&&n.sliceDoc(a.from+s,a.from+o)!=n.sliceDoc(t,r))return{range:a};let l=n.toText(e);return{changes:{from:a.from+s,to:r==i.from?a.to:a.from+o,insert:l},range:pe.cursor(a.from+s+l.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const Dy=new WeakMap;function WM(n){if(!Array.isArray(n))return n;let e=Dy.get(n);return e||Dy.set(n,e=ix(n)),e}const Nf=qt.define(),gc=qt.define();class YM{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let r=Ms(e,t),i=mo(r);this.chars.push(r);let s=e.slice(t,t+i),o=s.toUpperCase();this.folded.push(Ms(o==s?s.toLowerCase():o,0)),t+=i}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:r,any:i,precise:s,byWord:o}=this;if(t.length==1){let b=Ms(e,0),_=mo(b),A=_==e.length?0:-100;if(b!=t[0])if(b==r[0])A+=-200;else return null;return this.ret(A,[0,_])}let a=e.indexOf(this.pattern);if(a==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let l=t.length,c=0;if(a<0){for(let b=0,_=Math.min(e.length,200);b<_&&c<l;){let A=Ms(e,b);(A==t[c]||A==r[c])&&(i[c++]=b),b+=mo(A)}if(c<l)return null}let u=0,f=0,d=!1,h=0,g=-1,p=-1,O=/[a-z]/.test(e),v=!0;for(let b=0,_=Math.min(e.length,200),A=0;b<_&&f<l;){let y=Ms(e,b);a<0&&(u<l&&y==t[u]&&(s[u++]=b),h<l&&(y==t[h]||y==r[h]?(h==0&&(g=b),p=b+1,h++):h=0));let w,S=y<255?y>=48&&y<=57||y>=97&&y<=122?2:y>=65&&y<=90?1:0:(w=Z_(y))!=w.toLowerCase()?1:w!=w.toUpperCase()?2:0;(!b||S==1&&O||A==0&&S!=0)&&(t[f]==y||r[f]==y&&(d=!0)?o[f++]=b:o.length&&(v=!1)),A=S,b+=mo(y)}return f==l&&o[0]==0&&v?this.result(-100+(d?-200:0),o,e):h==l&&g==0?this.ret(-200-e.length+(p==e.length?0:-100),[0,p]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):h==l?this.ret(-900-e.length,[g,p]):f==l?this.result(-100+(d?-200:0)+-700+(v?0:-1100),o,e):t.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,t,r){let i=[],s=0;for(let o of t){let a=o+(this.astral?mo(Ms(r,o)):1);s&&i[s-1]==o?i[s-1]=a:(i[s++]=o,i[s++]=a)}return this.ret(e-r.length,i)}}class UM{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),r=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return r==null?null:(this.matched=[0,t.length],this.score=r+(e.length==this.pattern.length?0:-100),this)}}const zn=Be.define({combine(n){return jc(n,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:GM,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>r=>qy(e(r),t(r)),optionClass:(e,t)=>r=>qy(e(r),t(r)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function qy(n,e){return n?e?n+" "+e:n:e}function GM(n,e,t,r,i,s){let o=n.textDirection==On.RTL,a=o,l=!1,c="top",u,f,d=e.left-i.left,h=i.right-e.right,g=r.right-r.left,p=r.bottom-r.top;if(a&&d<Math.min(g,h)?a=!1:!a&&h<Math.min(g,d)&&(a=!0),g<=(a?d:h))u=Math.max(i.top,Math.min(t.top,i.bottom-p))-e.top,f=Math.min(400,a?d:h);else{l=!0,f=Math.min(400,(o?e.right:i.right-e.left)-30);let b=i.bottom-e.bottom;b>=p||b>e.top?u=t.bottom-e.top:(c="bottom",u=e.bottom-t.top)}let O=(e.bottom-e.top)/s.offsetHeight,v=(e.right-e.left)/s.offsetWidth;return{style:`${c}: ${u/O}px; max-width: ${f/v}px`,class:"cm-completionInfo-"+(l?o?"left-narrow":"right-narrow":a?"left":"right")}}function HM(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),t.type&&r.classList.add(...t.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(t,r,i,s){let o=document.createElement("span");o.className="cm-completionLabel";let a=t.displayLabel||t.label,l=0;for(let c=0;c<s.length;){let u=s[c++],f=s[c++];u>l&&o.appendChild(document.createTextNode(a.slice(l,u)));let d=o.appendChild(document.createElement("span"));d.appendChild(document.createTextNode(a.slice(u,f))),d.className="cm-completionMatchedText",l=f}return l<a.length&&o.appendChild(document.createTextNode(a.slice(l))),o},position:50},{render(t){if(!t.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=t.detail,r},position:80}),e.sort((t,r)=>t.position-r.position).map(t=>t.render)}function Lh(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let i=Math.floor(e/t);return{from:i*t,to:(i+1)*t}}let r=Math.floor((n-e)/t);return{from:n-(r+1)*t,to:n-r*t}}class KM{constructor(e,t,r){this.view=e,this.stateField=t,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:s,selected:o}=i.open,a=e.state.facet(zn);this.optionContent=HM(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=Lh(s.length,o,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:c}=e.state.field(t).open;for(let u=l.target,f;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(f=/-(\d+)$/.exec(u.id))&&+f[1]<c.length){this.applyCompletion(e,c[+f[1]]),l.preventDefault();return}}),this.dom.addEventListener("focusout",l=>{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(zn).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:gc.of(null)})}),this.showOptions(s,i.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:s,selected:o,disabled:a}=r.open;(!i.open||i.open.options!=s)&&(this.range=Lh(s.length,o,e.state.facet(zn).maxRenderedOptions),this.showOptions(s,r.id)),this.updateSel(),a!=((t=i.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of t.split(" "))r&&this.dom.classList.add(r);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=Lh(t.options.length,t.selected,this.view.state.facet(zn).maxRenderedOptions),this.showOptions(t.options,e.id));let r=this.updateSelectedOption(t.selected);if(r){this.destroyInfo();let{completion:i}=t.options[t.selected],{info:s}=i;if(!s)return;let o=typeof s=="string"?document.createTextNode(s):s(i);if(!o)return;"then"in o?o.then(a=>{a&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(a,i)}).catch(a=>Ir(this.view.state,a,"completion info")):(this.addInfoPane(o,i),r.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,t){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",r.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:s}=e;r.appendChild(i),this.infoDestroy=s||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),t=r):r.hasAttribute("aria-selected")&&(r.removeAttribute("aria-selected"),r.removeAttribute("aria-describedby"));return t&&e3(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),s=this.space;if(!s){let o=this.dom.ownerDocument.documentElement;s={left:0,top:0,right:o.clientWidth,bottom:o.clientHeight}}return i.top>Math.min(s.bottom,t.bottom)-10||i.bottom<Math.max(s.top,t.top)+10?null:this.view.state.facet(zn).positionInfo(this.view,t,i,r,s,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,r){const i=document.createElement("ul");i.id=t,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions")),i.addEventListener("mousedown",o=>{o.target==i&&o.preventDefault()});let s=null;for(let o=r.from;o<r.to;o++){let{completion:a,match:l}=e[o],{section:c}=a;if(c){let d=typeof c=="string"?c:c.name;if(d!=s&&(o>r.from||r.from==0))if(s=d,typeof c!="string"&&c.header)i.appendChild(c.header(c));else{let h=i.appendChild(document.createElement("completion-section"));h.textContent=d}}const u=i.appendChild(document.createElement("li"));u.id=t+"-"+o,u.setAttribute("role","option");let f=this.optionClass(a);f&&(u.className=f);for(let d of this.optionContent){let h=d(a,this.view.state,this.view,l);h&&u.appendChild(h)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function JM(n,e){return t=>new KM(t,n,e)}function e3(n,e){let t=n.getBoundingClientRect(),r=e.getBoundingClientRect(),i=t.height/n.offsetHeight;r.top<t.top?n.scrollTop-=(t.top-r.top)/i:r.bottom>t.bottom&&(n.scrollTop+=(r.bottom-t.bottom)/i)}function Ry(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function t3(n,e){let t=[],r=null,i=null,s=u=>{t.push(u);let{section:f}=u.completion;if(f){r||(r=[]);let d=typeof f=="string"?f:f.name;r.some(h=>h.name==d)||r.push(typeof f=="string"?{name:d}:f)}},o=e.facet(zn);for(let u of n)if(u.hasResult()){let f=u.result.getMatch;if(u.result.filter===!1)for(let d of u.result.options)s(new My(d,u.source,f?f(d):[],1e9-t.length));else{let d=e.sliceDoc(u.from,u.to),h,g=o.filterStrict?new UM(d):new YM(d);for(let p of u.result.options)if(h=g.match(p.label)){let O=p.displayLabel?f?f(p,h.matched):[]:h.matched,v=h.score+(p.boost||0);if(s(new My(p,u.source,O,v)),typeof p.section=="object"&&p.section.rank==="dynamic"){let{name:b}=p.section;i||(i=Object.create(null)),i[b]=Math.max(v,i[b]||-1e9)}}}}if(r){let u=Object.create(null),f=0,d=(h,g)=>(h.rank==="dynamic"&&g.rank==="dynamic"?i[g.name]-i[h.name]:0)||(typeof h.rank=="number"?h.rank:1e9)-(typeof g.rank=="number"?g.rank:1e9)||(h.name<g.name?-1:1);for(let h of r.sort(d))f-=1e5,u[h.name]=f;for(let h of t){let{section:g}=h.completion;g&&(h.score+=u[typeof g=="string"?g:g.name])}}let a=[],l=null,c=o.compareCompletions;for(let u of t.sort((f,d)=>d.score-f.score||c(f.completion,d.completion))){let f=u.completion;!l||l.label!=f.label||l.detail!=f.detail||l.type!=null&&f.type!=null&&l.type!=f.type||l.apply!=f.apply||l.boost!=f.boost?a.push(u):Ry(u.completion)>Ry(l)&&(a[a.length-1]=u),l=u.completion}return a}class Oa{constructor(e,t,r,i,s,o){this.options=e,this.attrs=t,this.tooltip=r,this.timestamp=i,this.selected=s,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Oa(this.options,Iy(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,r,i,s,o){if(i&&!o&&e.some(c=>c.isPending))return i.setDisabled();let a=t3(e,t);if(!a.length)return i&&e.some(c=>c.isPending)?i.setDisabled():null;let l=t.facet(zn).selectOnOpen?0:-1;if(i&&i.selected!=l&&i.selected!=-1){let c=i.options[i.selected].completion;for(let u=0;u<a.length;u++)if(a[u].completion==c){l=u;break}}return new Oa(a,Iy(r,l),{pos:e.reduce((c,u)=>u.hasResult()?Math.min(c,u.from):c,1e8),create:a3,above:s.aboveCursor},i?i.timestamp:Date.now(),l,!1)}map(e){return new Oa(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new Oa(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class Bf{constructor(e,t,r){this.active=e,this.id=t,this.open=r}static start(){return new Bf(s3,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,r=t.facet(zn),s=(r.override||t.languageDataAt("autocomplete",To(t)).map(WM)).map(l=>(this.active.find(u=>u.source==l)||new Jr(l,this.active.some(u=>u.state!=0)?1:0)).update(e,r));s.length==this.active.length&&s.every((l,c)=>l==this.active[c])&&(s=this.active);let o=this.open,a=e.effects.some(l=>l.is(MO));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||s.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!n3(s,this.active)||a?o=Oa.build(s,t,this.id,o,r,a):o&&o.disabled&&!s.some(l=>l.isPending)&&(o=null),!o&&s.every(l=>!l.isPending)&&s.some(l=>l.hasResult())&&(s=s.map(l=>l.hasResult()?new Jr(l.source,0):l));for(let l of e.effects)l.is(ax)&&(o=o&&o.setSelected(l.value,this.id));return s==this.active&&o==this.open?this:new Bf(s,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?r3:i3}}function n3(n,e){if(n==e)return!0;for(let t=0,r=0;;){for(;t<n.length&&!n[t].hasResult();)t++;for(;r<e.length&&!e[r].hasResult();)r++;let i=t==n.length,s=r==e.length;if(i||s)return i==s;if(n[t++].result!=e[r++].result)return!1}}const r3={"aria-autocomplete":"list"},i3={};function Iy(n,e){let t={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":n};return e>-1&&(t["aria-activedescendant"]=n+"-"+e),t}const s3=[];function ox(n,e){if(n.isUserEvent("input.complete")){let r=n.annotation(LO);if(r&&e.activateOnCompletion(r))return 12}let t=n.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:n.isUserEvent("delete.backward")?2:n.selection?8:n.docChanged?16:0}class Jr{constructor(e,t,r=!1){this.source=e,this.state=t,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(e,t){let r=ox(e,t),i=this;(r&8||r&16&&this.touches(e))&&(i=new Jr(i.source,0)),r&4&&i.state==0&&(i=new Jr(this.source,1)),i=i.updateFor(e,r);for(let s of e.effects)if(s.is(Nf))i=new Jr(i.source,1,s.value);else if(s.is(gc))i=new Jr(i.source,0);else if(s.is(MO))for(let o of s.value)o.source==i.source&&(i=o);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(To(e.state))}}class Ta extends Jr{constructor(e,t,r,i,s,o){super(e,3,t),this.limit=r,this.result=i,this.from=s,this.to=o}hasResult(){return!0}updateFor(e,t){var r;if(!(t&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let s=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),a=To(e.state);if(a>o||!i||t&2&&(To(e.startState)==this.from||a<this.limit))return new Jr(this.source,t&4?1:0);let l=e.changes.mapPos(this.limit);return o3(i.validFor,e.state,s,o)?new Ta(this.source,this.explicit,l,i,s,o):i.update&&(i=i.update(i,s,o,new QO(e.state,a,!1)))?new Ta(this.source,this.explicit,l,i,i.from,(r=i.to)!==null&&r!==void 0?r:To(e.state)):new Jr(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Ta(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Jr(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function o3(n,e,t,r){if(!n)return!1;let i=e.sliceDoc(t,r);return typeof n=="function"?n(i,t,r,e):sx(n,!0).test(i)}const MO=qt.define({map(n,e){return n.map(t=>t.map(e))}}),ax=qt.define(),wr=li.define({create(){return Bf.start()},update(n,e){return n.update(e)},provide:n=>[Gk.from(n,e=>e.tooltip),$e.contentAttributes.from(n,e=>e.attrs)]});function DO(n,e){const t=e.completion.apply||e.completion.label;let r=n.state.field(wr).active.find(i=>i.source==e.source);return r instanceof Ta?(typeof t=="string"?n.dispatch({...VM(n.state,t,r.from,r.to),annotations:LO.of(e.completion)}):t(n,e.completion,r.from,r.to),!0):!1}const a3=JM(wr,DO);function xu(n,e="option"){return t=>{let r=t.state.field(wr,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<t.state.facet(zn).interactionDelay)return!1;let i=1,s;e=="page"&&(s=Hk(t,r.open.tooltip))&&(i=Math.max(2,Math.floor(s.dom.offsetHeight/s.dom.querySelector("li").offsetHeight)-1));let{length:o}=r.open.options,a=r.open.selected>-1?r.open.selected+i*(n?1:-1):n?0:o-1;return a<0?a=e=="page"?0:o-1:a>=o&&(a=e=="page"?o-1:0),t.dispatch({effects:ax.of(a)}),!0}}const l3=n=>{let e=n.state.field(wr,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<n.state.facet(zn).interactionDelay?!1:DO(n,e.open.options[e.open.selected])},Ul=n=>n.state.field(wr,!1)?(n.dispatch({effects:Nf.of(!0)}),!0):!1,c3=n=>{let e=n.state.field(wr,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:gc.of(null)}),!0)};class u3{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const f3=50,d3=1e3,h3=cr.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of n.state.field(wr).active)e.isPending&&this.startQuery(e)}update(n){let e=n.state.field(wr),t=n.state.facet(zn);if(!n.selectionSet&&!n.docChanged&&n.startState.field(wr)==e)return;let r=n.transactions.some(s=>{let o=ox(s,t);return o&8||(s.selection||s.docChanged)&&!(o&3)});for(let s=0;s<this.running.length;s++){let o=this.running[s];if(r||o.context.abortOnDocChange&&n.docChanged||o.updates.length+n.transactions.length>f3&&Date.now()-o.time>d3){for(let a of o.context.abortListeners)try{a()}catch(l){Ir(this.view.state,l)}o.context.abortListeners=null,this.running.splice(s--,1)}else o.updates.push(...n.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),n.transactions.some(s=>s.effects.some(o=>o.is(Nf)))&&(this.pendingStart=!0);let i=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.isPending&&!this.running.some(o=>o.active.source==s.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let s of n.transactions)s.isUserEvent("input.type")?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:n}=this.view,e=n.field(wr);for(let t of e.active)t.isPending&&!this.running.some(r=>r.active.source==t.source)&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(zn).updateSyncTime))}startQuery(n){let{state:e}=this.view,t=To(e),r=new QO(e,t,n.explicit,this.view),i=new u3(n,r);this.running.push(i),Promise.resolve(n.source(r)).then(s=>{i.context.aborted||(i.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:gc.of(null)}),Ir(this.view.state,s)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(zn).updateSyncTime))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(zn),r=this.view.state.field(wr);for(let i=0;i<this.running.length;i++){let s=this.running[i];if(s.done===void 0)continue;if(this.running.splice(i--,1),s.done){let a=To(s.updates.length?s.updates[0].startState:this.view.state),l=Math.min(a,s.done.from+(s.active.explicit?0:1)),c=new Ta(s.active.source,s.active.explicit,l,s.done,s.done.from,(n=s.done.to)!==null&&n!==void 0?n:a);for(let u of s.updates)c=c.update(u,t);if(c.hasResult()){e.push(c);continue}}let o=r.active.find(a=>a.source==s.active.source);if(o&&o.isPending)if(s.done==null){let a=new Jr(s.active.source,0);for(let l of s.updates)a=a.update(l,t);a.isPending||e.push(a)}else this.startQuery(o)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:MO.of(e)})}},{eventHandlers:{blur(n){let e=this.view.state.field(wr,!1);if(e&&e.tooltip&&this.view.state.facet(zn).closeOnBlur){let t=e.open&&Hk(this.view,e.open.tooltip);(!t||!t.dom.contains(n.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:gc.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Nf.of(!1)}),20),this.composing=0}}}),p3=typeof navigator=="object"&&/Win/.test(navigator.platform),m3=io.highest($e.domEventHandlers({keydown(n,e){let t=e.state.field(wr,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||n.key.length>1||n.ctrlKey&&!(p3&&n.altKey)||n.metaKey)return!1;let r=t.open.options[t.open.selected],i=t.active.find(o=>o.source==r.source),s=r.completion.commitCharacters||i.result.commitCharacters;return s&&s.indexOf(n.key)>-1&&DO(e,r),!1}})),lx=$e.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class g3{constructor(e,t,r,i){this.field=e,this.line=t,this.from=r,this.to=i}}class qO{constructor(e,t,r){this.field=e,this.from=t,this.to=r}map(e){let t=e.mapPos(this.from,-1,or.TrackDel),r=e.mapPos(this.to,1,or.TrackDel);return t==null||r==null?null:new qO(this.field,t,r)}}class RO{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let r=[],i=[t],s=e.doc.lineAt(t),o=/^\s*/.exec(s.text)[0];for(let l of this.lines){if(r.length){let c=o,u=/^\t*/.exec(l)[0].length;for(let f=0;f<u;f++)c+=e.facet(Vc);i.push(t+c.length-u),l=c+l.slice(u)}r.push(l),t+=l.length+1}let a=this.fieldPositions.map(l=>new qO(l.field,i[l.line]+l.from,i[l.line]+l.to));return{text:r,ranges:a}}static parse(e){let t=[],r=[],i=[],s;for(let o of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(o);){let a=s[1]?+s[1]:null,l=s[2]||s[3]||"",c=-1,u=l.replace(/\\[{}]/g,f=>f[1]);for(let f=0;f<t.length;f++)(a!=null?t[f].seq==a:u&&t[f].name==u)&&(c=f);if(c<0){let f=0;for(;f<t.length&&(a==null||t[f].seq!=null&&t[f].seq<a);)f++;t.splice(f,0,{seq:a,name:u}),c=f;for(let d of i)d.field>=c&&d.field++}for(let f of i)if(f.line==r.length&&f.from>s.index){let d=s[2]?3+(s[1]||"").length:2;f.from-=d,f.to-=d}i.push(new g3(c,r.length,s.index,s.index+u.length)),o=o.slice(0,s.index)+l+o.slice(s.index+s[0].length)}o=o.replace(/\\([{}])/g,(a,l,c)=>{for(let u of i)u.line==r.length&&u.from>c&&(u.from--,u.to--);return l}),r.push(o)}return new RO(r,i)}}let O3=gt.widget({widget:new class extends zc{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),v3=gt.mark({class:"cm-snippetField"});class fl{constructor(e,t){this.ranges=e,this.active=t,this.deco=gt.set(e.map(r=>(r.from==r.to?O3:v3).range(r.from,r.to)),!0)}map(e){let t=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;t.push(i)}return new fl(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(r=>r.field==this.active&&r.from<=t.from&&r.to>=t.to))}}const Uc=qt.define({map(n,e){return n&&n.map(e)}}),b3=qt.define(),Oc=li.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(Uc))return t.value;if(t.is(b3)&&n)return new fl(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>$e.decorations.from(n,e=>e?e.deco:gt.none)});function IO(n,e){return pe.create(n.filter(t=>t.field==e).map(t=>pe.range(t.from,t.to)))}function y3(n){let e=RO.parse(n);return(t,r,i,s)=>{let{text:o,ranges:a}=e.instantiate(t.state,i),{main:l}=t.state.selection,c={changes:{from:i,to:s==l.from?l.to:s,insert:Xt.of(o)},scrollIntoView:!0,annotations:r?[LO.of(r),Tn.userEvent.of("input.complete")]:void 0};if(a.length&&(c.selection=IO(a,0)),a.some(u=>u.field>0)){let u=new fl(a,0),f=c.effects=[Uc.of(u)];t.state.field(Oc,!1)===void 0&&f.push(qt.appendConfig.of([Oc,S3,A3,lx]))}t.dispatch(t.state.update(c))}}function cx(n){return({state:e,dispatch:t})=>{let r=e.field(Oc,!1);if(!r||n<0&&r.active==0)return!1;let i=r.active+n,s=n>0&&!r.ranges.some(o=>o.field==i+n);return t(e.update({selection:IO(r.ranges,i),effects:Uc.of(s?null:new fl(r.ranges,i)),scrollIntoView:!0})),!0}}const w3=({state:n,dispatch:e})=>n.field(Oc,!1)?(e(n.update({effects:Uc.of(null)})),!0):!1,_3=cx(1),k3=cx(-1),x3=[{key:"Tab",run:_3,shift:k3},{key:"Escape",run:w3}],Ny=Be.define({combine(n){return n.length?n[0]:x3}}),S3=io.highest(Vo.compute([Ny],n=>n.facet(Ny)));function gr(n,e){return{...e,apply:y3(n)}}const A3=$e.domEventHandlers({mousedown(n,e){let t=e.state.field(Oc,!1),r;if(!t||(r=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let i=t.ranges.find(s=>s.from<=r&&s.to>=r);return!i||i.field==t.active?!1:(e.dispatch({selection:IO(t.ranges,i.field),effects:Uc.of(t.ranges.some(s=>s.field>i.field)?new fl(t.ranges,i.field):null),scrollIntoView:!0}),!0)}}),ux=new class extends Us{};ux.startSide=1;ux.endSide=-1;function $m(n={}){return[m3,wr,zn.of(n),h3,T3,lx]}const C3=[{key:"Ctrl-Space",run:Ul},{mac:"Alt-`",run:Ul},{mac:"Alt-i",run:Ul},{key:"Escape",run:c3},{key:"ArrowDown",run:xu(!0)},{key:"ArrowUp",run:xu(!1)},{key:"PageDown",run:xu(!0,"page")},{key:"PageUp",run:xu(!1,"page")},{key:"Enter",run:l3}],T3=io.highest(Vo.computeN([zn],n=>n.facet(zn).defaultKeymap?[C3]:[]));class jf{static create(e,t,r,i,s){let o=i+(i<<8)+e+(t<<4)|0;return new jf(e,t,r,o,s,[],[])}constructor(e,t,r,i,s,o,a){this.type=e,this.value=t,this.from=r,this.hash=i,this.end=s,this.children=o,this.positions=a,this.hashProp=[[it.contextHash,i]]}addChild(e,t){e.prop(it.contextHash)!=this.hash&&(e=new yt(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let r=this.children.length-1;return r>=0&&(t=Math.max(t,this.positions[r]+this.children[r].length+this.from)),new yt(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(i,s,o)=>new yt(Qn.none,i,s,o,this.hashProp)})}}var _e;(function(n){n[n.Document=1]="Document",n[n.CodeBlock=2]="CodeBlock",n[n.FencedCode=3]="FencedCode",n[n.Blockquote=4]="Blockquote",n[n.HorizontalRule=5]="HorizontalRule",n[n.BulletList=6]="BulletList",n[n.OrderedList=7]="OrderedList",n[n.ListItem=8]="ListItem",n[n.ATXHeading1=9]="ATXHeading1",n[n.ATXHeading2=10]="ATXHeading2",n[n.ATXHeading3=11]="ATXHeading3",n[n.ATXHeading4=12]="ATXHeading4",n[n.ATXHeading5=13]="ATXHeading5",n[n.ATXHeading6=14]="ATXHeading6",n[n.SetextHeading1=15]="SetextHeading1",n[n.SetextHeading2=16]="SetextHeading2",n[n.HTMLBlock=17]="HTMLBlock",n[n.LinkReference=18]="LinkReference",n[n.Paragraph=19]="Paragraph",n[n.CommentBlock=20]="CommentBlock",n[n.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",n[n.Escape=22]="Escape",n[n.Entity=23]="Entity",n[n.HardBreak=24]="HardBreak",n[n.Emphasis=25]="Emphasis",n[n.StrongEmphasis=26]="StrongEmphasis",n[n.Link=27]="Link",n[n.Image=28]="Image",n[n.InlineCode=29]="InlineCode",n[n.HTMLTag=30]="HTMLTag",n[n.Comment=31]="Comment",n[n.ProcessingInstruction=32]="ProcessingInstruction",n[n.Autolink=33]="Autolink",n[n.HeaderMark=34]="HeaderMark",n[n.QuoteMark=35]="QuoteMark",n[n.ListMark=36]="ListMark",n[n.LinkMark=37]="LinkMark",n[n.EmphasisMark=38]="EmphasisMark",n[n.CodeMark=39]="CodeMark",n[n.CodeText=40]="CodeText",n[n.CodeInfo=41]="CodeInfo",n[n.LinkTitle=42]="LinkTitle",n[n.LinkLabel=43]="LinkLabel",n[n.URL=44]="URL"})(_e||(_e={}));class P3{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}}class E3{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return Gl(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,r=0){for(let i=t;i<e;i++)r+=this.text.charCodeAt(i)==9?4-r%4:1;return r}findColumn(e){let t=0;for(let r=0;t<this.text.length&&r<e;t++)r+=this.text.charCodeAt(t)==9?4-r%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e="";for(let t=0;t<this.basePos;t++)e+=" ";return e+this.text.slice(this.basePos)}}function By(n,e,t){if(t.pos==t.text.length||n!=e.block&&t.indent>=e.stack[t.depth+1].value+t.baseIndent)return!0;if(t.indent>=t.baseIndent+4)return!1;let r=(n.type==_e.OrderedList?jO:BO)(t,e,!1);return r>0&&(n.type!=_e.BulletList||NO(t,e,!1)<0)&&t.text.charCodeAt(t.pos+r-1)==n.value}const fx={[_e.Blockquote](n,e,t){return t.next!=62?!1:(t.markers.push(Qt(_e.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1)),t.moveBase(t.pos+(ui(t.text.charCodeAt(t.pos+1))?2:1)),n.end=e.lineStart+t.text.length,!0)},[_e.ListItem](n,e,t){return t.indent<t.baseIndent+n.value&&t.next>-1?!1:(t.moveBaseColumn(t.baseIndent+n.value),!0)},[_e.OrderedList]:By,[_e.BulletList]:By,[_e.Document](){return!0}};function ui(n){return n==32||n==9||n==10||n==13}function Gl(n,e=0){for(;e<n.length&&ui(n.charCodeAt(e));)e++;return e}function jy(n,e,t){for(;e>t&&ui(n.charCodeAt(e-1));)e--;return e}function dx(n){if(n.next!=96&&n.next!=126)return-1;let e=n.pos+1;for(;e<n.text.length&&n.text.charCodeAt(e)==n.next;)e++;if(e<n.pos+3)return-1;if(n.next==96){for(let t=e;t<n.text.length;t++)if(n.text.charCodeAt(t)==96)return-1}return e}function hx(n){return n.next!=62?-1:n.text.charCodeAt(n.pos+1)==32?2:1}function NO(n,e,t){if(n.next!=42&&n.next!=45&&n.next!=95)return-1;let r=1;for(let i=n.pos+1;i<n.text.length;i++){let s=n.text.charCodeAt(i);if(s==n.next)r++;else if(!ui(s))return-1}return t&&n.next==45&&gx(n)>-1&&n.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(yx.SetextHeading)>-1||r<3?-1:1}function px(n,e){for(let t=n.stack.length-1;t>=0;t--)if(n.stack[t].type==e)return!0;return!1}function BO(n,e,t){return(n.next==45||n.next==43||n.next==42)&&(n.pos==n.text.length-1||ui(n.text.charCodeAt(n.pos+1)))&&(!t||px(e,_e.BulletList)||n.skipSpace(n.pos+2)<n.text.length)?1:-1}function jO(n,e,t){let r=n.pos,i=n.next;for(;i>=48&&i<=57;){r++;if(r==n.text.length)return-1;i=n.text.charCodeAt(r)}return r==n.pos||r>n.pos+9||i!=46&&i!=41||r<n.text.length-1&&!ui(n.text.charCodeAt(r+1))||t&&!px(e,_e.OrderedList)&&(n.skipSpace(r+1)==n.text.length||r>n.pos+1||n.next!=49)?-1:r+1-n.pos}function mx(n){if(n.next!=35)return-1;let e=n.pos+1;for(;e<n.text.length&&n.text.charCodeAt(e)==35;)e++;if(e<n.text.length&&n.text.charCodeAt(e)!=32)return-1;let t=e-n.pos;return t>6?-1:t}function gx(n){if(n.next!=45&&n.next!=61||n.indent>=n.baseIndent+4)return-1;let e=n.pos+1;for(;e<n.text.length&&n.text.charCodeAt(e)==n.next;)e++;let t=e;for(;e<n.text.length&&ui(n.text.charCodeAt(e));)e++;return e==n.text.length?t:-1}const Qm=/^[ \t]*$/,Ox=/-->/,vx=/\?>/,Lm=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,Ox],[/^\s*<\?/,vx],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,Qm],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,Qm]];function bx(n,e,t){if(n.next!=60)return-1;let r=n.text.slice(n.pos);for(let i=0,s=Lm.length-(t?1:0);i<s;i++)if(Lm[i][0].test(r))return i;return-1}function zy(n,e){let t=n.countIndent(e,n.pos,n.indent),r=n.countIndent(n.skipSpace(e),e,t);return r>=t+5?t+1:r}function Cs(n,e,t){let r=n.length-1;r>=0&&n[r].to==e&&n[r].type==_e.CodeText?n[r].to=t:n.push(Qt(_e.CodeText,e,t))}const Su={LinkReference:void 0,IndentedCode(n,e){let t=e.baseIndent+4;if(e.indent<t)return!1;let r=e.findColumn(t),i=n.lineStart+r,s=n.lineStart+e.text.length,o=[],a=[];for(Cs(o,i,s);n.nextLine()&&e.depth>=n.stack.length;)if(e.pos==e.text.length){Cs(a,n.lineStart-1,n.lineStart);for(let l of e.markers)a.push(l)}else{if(e.indent<t)break;{if(a.length){for(let c of a)c.type==_e.CodeText?Cs(o,c.from,c.to):o.push(c);a=[]}Cs(o,n.lineStart-1,n.lineStart);for(let c of e.markers)o.push(c);s=n.lineStart+e.text.length;let l=n.lineStart+e.findColumn(e.baseIndent+4);l<s&&Cs(o,l,s)}}return a.length&&(a=a.filter(l=>l.type!=_e.CodeText),a.length&&(e.markers=a.concat(e.markers))),n.addNode(n.buffer.writeElements(o,-i).finish(_e.CodeBlock,s-i),i),!0},FencedCode(n,e){let t=dx(e);if(t<0)return!1;let r=n.lineStart+e.pos,i=e.next,s=t-e.pos,o=e.skipSpace(t),a=jy(e.text,e.text.length,o),l=[Qt(_e.CodeMark,r,r+s)];o<a&&l.push(Qt(_e.CodeInfo,n.lineStart+o,n.lineStart+a));for(let c=!0,u=!0,f=!1;n.nextLine()&&e.depth>=n.stack.length;c=!1){let d=e.pos;if(e.indent-e.baseIndent<4)for(;d<e.text.length&&e.text.charCodeAt(d)==i;)d++;if(d-e.pos>=s&&e.skipSpace(d)==e.text.length){for(let h of e.markers)l.push(h);u&&f&&Cs(l,n.lineStart-1,n.lineStart),l.push(Qt(_e.CodeMark,n.lineStart+e.pos,n.lineStart+d)),n.nextLine();break}else{f=!0,c||(Cs(l,n.lineStart-1,n.lineStart),u=!1);for(let p of e.markers)l.push(p);let h=n.lineStart+e.basePos,g=n.lineStart+e.text.length;h<g&&(Cs(l,h,g),u=!1)}}return n.addNode(n.buffer.writeElements(l,-r).finish(_e.FencedCode,n.prevLineEnd()-r),r),!0},Blockquote(n,e){let t=hx(e);return t<0?!1:(n.startContext(_e.Blockquote,e.pos),n.addNode(_e.QuoteMark,n.lineStart+e.pos,n.lineStart+e.pos+1),e.moveBase(e.pos+t),null)},HorizontalRule(n,e){if(NO(e,n,!1)<0)return!1;let t=n.lineStart+e.pos;return n.nextLine(),n.addNode(_e.HorizontalRule,t),!0},BulletList(n,e){let t=BO(e,n,!1);if(t<0)return!1;n.block.type!=_e.BulletList&&n.startContext(_e.BulletList,e.basePos,e.next);let r=zy(e,e.pos+1);return n.startContext(_e.ListItem,e.basePos,r-e.baseIndent),n.addNode(_e.ListMark,n.lineStart+e.pos,n.lineStart+e.pos+t),e.moveBaseColumn(r),null},OrderedList(n,e){let t=jO(e,n,!1);if(t<0)return!1;n.block.type!=_e.OrderedList&&n.startContext(_e.OrderedList,e.basePos,e.text.charCodeAt(e.pos+t-1));let r=zy(e,e.pos+t);return n.startContext(_e.ListItem,e.basePos,r-e.baseIndent),n.addNode(_e.ListMark,n.lineStart+e.pos,n.lineStart+e.pos+t),e.moveBaseColumn(r),null},ATXHeading(n,e){let t=mx(e);if(t<0)return!1;let r=e.pos,i=n.lineStart+r,s=jy(e.text,e.text.length,r),o=s;for(;o>r&&e.text.charCodeAt(o-1)==e.next;)o--;(o==s||o==r||!ui(e.text.charCodeAt(o-1)))&&(o=e.text.length);let a=n.buffer.write(_e.HeaderMark,0,t).writeElements(n.parser.parseInline(e.text.slice(r+t+1,o),i+t+1),-i);o<e.text.length&&a.write(_e.HeaderMark,o-r,s-r);let l=a.finish(_e.ATXHeading1-1+t,e.text.length-r);return n.nextLine(),n.addNode(l,i),!0},HTMLBlock(n,e){let t=bx(e,n,!1);if(t<0)return!1;let r=n.lineStart+e.pos,i=Lm[t][1],s=[],o=i!=Qm;for(;!i.test(e.text)&&n.nextLine();){if(e.depth<n.stack.length){o=!1;break}for(let c of e.markers)s.push(c)}o&&n.nextLine();let a=i==Ox?_e.CommentBlock:i==vx?_e.ProcessingInstructionBlock:_e.HTMLBlock,l=n.prevLineEnd();return n.addNode(n.buffer.writeElements(s,-r).finish(a,l-r),r),!0},SetextHeading:void 0};class $3{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,r){if(this.stage==-1)return!1;let i=r.content+`
156
- `+t.scrub(),s=this.advance(i);return s>-1&&s<i.length?this.complete(e,r,s):!1}finish(e,t){return(this.stage==2||this.stage==3)&&Gl(t.content,this.pos)==t.content.length?this.complete(e,t,t.content.length):!1}complete(e,t,r){return e.addLeafElement(t,Qt(_e.LinkReference,this.start,this.start+r,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(Px(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(Qt(_e.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(Cx(e,Gl(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=Gl(e,this.pos),r=0;if(t>this.pos){let i=Tx(e,t,this.start);if(i){let s=Mh(e,i.to-this.start);s>0&&(this.nextStage(i),r=s)}}return r||(r=Mh(e,this.pos)),r>0&&r<e.length?r:-1}else return Mh(e,this.pos)}}}function Mh(n,e){for(;e<n.length;e++){let t=n.charCodeAt(e);if(t==10)break;if(!ui(t))return-1}return e}class Q3{nextLine(e,t,r){let i=t.depth<e.stack.length?-1:gx(t),s=t.next;if(i<0)return!1;let o=Qt(_e.HeaderMark,e.lineStart+t.pos,e.lineStart+i);return e.nextLine(),e.addLeafElement(r,Qt(s==61?_e.SetextHeading1:_e.SetextHeading2,r.start,e.prevLineEnd(),[...e.parser.parseInline(r.content,r.start),o])),!0}finish(){return!1}}const yx={LinkReference(n,e){return e.content.charCodeAt(0)==91?new $3(e):null},SetextHeading(){return new Q3}},L3=[(n,e)=>mx(e)>=0,(n,e)=>dx(e)>=0,(n,e)=>hx(e)>=0,(n,e)=>BO(e,n,!0)>=0,(n,e)=>jO(e,n,!0)>=0,(n,e)=>NO(e,n,!0)>=0,(n,e)=>bx(e,n,!0)>=0],M3={text:"",end:0};class D3{constructor(e,t,r,i){this.parser=e,this.input=t,this.ranges=i,this.line=new E3,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=i[i.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=i[0].from,this.block=jf.create(_e.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=r.length?new I3(r,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let r=0;;){let i=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;r<e.markers.length&&(!i||e.markers[r].from<i.end);){let s=e.markers[r++];this.addNode(s.type,s.from,s.to)}if(!i)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let r of this.parser.blockParsers)if(r){let i=r(this,e);if(i!=!1){if(i==!0)return null;e.forward();continue e}}break}let t=new P3(this.lineStart+e.pos,e.text.slice(e.pos));for(let r of this.parser.leafBlockParsers)if(r){let i=r(this,t);i&&t.parsers.push(i)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let r of this.parser.endLeafBlock)if(r(this,e,t))break e}for(let r of t.parsers)if(r.nextLine(this,e,t))return null;t.content+=`
157
- `+e.scrub();for(let r of e.markers)t.marks.push(r)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=Ex(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=M3;if(t.end=e,e>=this.to)t.text="";else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let r=this.absoluteLineStart,i=this.rangeI;for(;this.ranges[i].to<t.end;){i++;let s=this.ranges[i].from,o=this.lineChunkAt(s);t.end=s+o.length,t.text=t.text.slice(0,this.ranges[i-1].to-r)+o,r=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:r}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=r,e.reset(t);e.depth<this.stack.length;e.depth++){let i=this.stack[e.depth],s=this.parser.skipContextMarkup[i.type];if(!s)throw new Error("Unhandled block context "+_e[i.type]);let o=this.line.markers.length;if(!s(i,this,e)){this.line.markers.length>o&&(i.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),r;if(this.input.lineChunks)r=t==`
158
- `?"":t;else{let i=t.indexOf(`
159
- `);r=i<0?t:t.slice(0,i)}return e+r.length>this.to?r.slice(0,this.to-e):r}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,r=0){this.block=jf.create(e,r,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,r=0){this.startContext(this.parser.getNodeType(e),t,r)}addNode(e,t,r){typeof e=="number"&&(e=new yt(this.parser.nodeSet.types[e],Fa,Fa,(r??this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(Dm(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?wx(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let r of e.parsers)if(r.finish(this,e))return;let t=Dm(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(_e.Paragraph,e.content.length),e.start)}elt(e,t,r,i){return typeof e=="string"?Qt(this.parser.getNodeType(e),t,r,i):new xx(e,t)}get buffer(){return new kx(this.parser.nodeSet)}}function wx(n,e,t,r,i){let s=n[e].to,o=[],a=[],l=t.from+r;function c(u,f){for(;f?u>=s:u>s;){let d=n[e+1].from-s;r+=d,u+=d,e++,s=n[e].to}}for(let u=t.firstChild;u;u=u.nextSibling){c(u.from+r,!0);let f=u.from+r,d,h=i.get(u.tree);h?d=h:u.to+r>s?(d=wx(n,e,u,r,i),c(u.to+r,!1)):d=u.toTree(),o.push(d),a.push(f-l)}return c(t.to+r,!1),new yt(t.type,o,a,t.to+r-l,t.tree?t.tree.propValues:void 0)}class Fd extends Id{constructor(e,t,r,i,s,o,a,l,c){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=r,this.blockNames=i,this.endLeafBlock=s,this.skipContextMarkup=o,this.inlineParsers=a,this.inlineNames=l,this.wrappers=c,this.nodeTypes=Object.create(null);for(let u of e.types)this.nodeTypes[u.name]=u.id}createParse(e,t,r){let i=new D3(this,e,t,r);for(let s of this.wrappers)i=s(i,e,t,r);return i}configure(e){let t=Mm(e);if(!t)return this;let{nodeSet:r,skipContextMarkup:i}=this,s=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),a=this.blockNames.slice(),l=this.inlineParsers.slice(),c=this.inlineNames.slice(),u=this.endLeafBlock.slice(),f=this.wrappers;if(yl(t.defineNodes)){i=Object.assign({},i);let d=r.types.slice(),h;for(let g of t.defineNodes){let{name:p,block:O,composite:v,style:b}=typeof g=="string"?{name:g}:g;if(d.some(y=>y.name==p))continue;v&&(i[d.length]=(y,w,S)=>v(w,S,y.value));let _=d.length,A=v?["Block","BlockContext"]:O?_>=_e.ATXHeading1&&_<=_e.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;d.push(Qn.define({id:_,name:p,props:A&&[[it.group,A]]})),b&&(h||(h={}),Array.isArray(b)||b instanceof Ri?h[p]=b:Object.assign(h,b))}r=new ol(d),h&&(r=r.extend(al(h)))}if(yl(t.props)&&(r=r.extend(...t.props)),yl(t.remove))for(let d of t.remove){let h=this.blockNames.indexOf(d),g=this.inlineNames.indexOf(d);h>-1&&(s[h]=o[h]=void 0),g>-1&&(l[g]=void 0)}if(yl(t.parseBlock))for(let d of t.parseBlock){let h=a.indexOf(d.name);if(h>-1)s[h]=d.parse,o[h]=d.leaf;else{let g=d.before?Au(a,d.before):d.after?Au(a,d.after)+1:a.length-1;s.splice(g,0,d.parse),o.splice(g,0,d.leaf),a.splice(g,0,d.name)}d.endLeaf&&u.push(d.endLeaf)}if(yl(t.parseInline))for(let d of t.parseInline){let h=c.indexOf(d.name);if(h>-1)l[h]=d.parse;else{let g=d.before?Au(c,d.before):d.after?Au(c,d.after)+1:c.length-1;l.splice(g,0,d.parse),c.splice(g,0,d.name)}}return t.wrap&&(f=f.concat(t.wrap)),new Fd(r,s,o,a,u,i,l,c,f)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw new RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let r=new zO(this,e,t);e:for(let i=t;i<r.end;){let s=r.char(i);for(let o of this.inlineParsers)if(o){let a=o(r,s,i);if(a>=0){i=a;continue e}}i++}return r.resolveMarkers(0)}}function yl(n){return n!=null&&n.length>0}function Mm(n){if(!Array.isArray(n))return n;if(n.length==0)return null;let e=Mm(n[0]);if(n.length==1)return e;let t=Mm(n.slice(1));if(!t||!e)return e||t;let r=(o,a)=>(o||Fa).concat(a||Fa),i=e.wrap,s=t.wrap;return{props:r(e.props,t.props),defineNodes:r(e.defineNodes,t.defineNodes),parseBlock:r(e.parseBlock,t.parseBlock),parseInline:r(e.parseInline,t.parseInline),remove:r(e.remove,t.remove),wrap:i?s?(o,a,l,c)=>i(s(o,a,l,c),a,l,c):i:s}}function Au(n,e){let t=n.indexOf(e);if(t<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return t}let _x=[Qn.none];for(let n=1,e;e=_e[n];n++)_x[n]=Qn.define({id:n,name:e,props:n>=_e.Escape?[]:[[it.group,n in fx?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});const Fa=[];class kx{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,r,i=0){return this.content.push(e,t,r,4+i*4),this}writeElements(e,t=0){for(let r of e)r.writeTo(this,t);return this}finish(e,t){return yt.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}}let vc=class{constructor(e,t,r,i=Fa){this.type=e,this.from=t,this.to=r,this.children=i}writeTo(e,t){let r=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-r)}toTree(e){return new kx(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class xx{constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return Fa}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}}function Qt(n,e,t,r){return new vc(n,e,t,r)}const Sx={resolve:"Emphasis",mark:"EmphasisMark"},Ax={resolve:"Emphasis",mark:"EmphasisMark"},Oo={},zf={};class Dr{constructor(e,t,r,i){this.type=e,this.from=t,this.to=r,this.side=i}}const Zy="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let bc=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{bc=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}const Dh={Escape(n,e,t){if(e!=92||t==n.end-1)return-1;let r=n.char(t+1);for(let i=0;i<Zy.length;i++)if(Zy.charCodeAt(i)==r)return n.append(Qt(_e.Escape,t,t+2));return-1},Entity(n,e,t){if(e!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(n.slice(t+1,t+31));return r?n.append(Qt(_e.Entity,t,t+1+r[0].length)):-1},InlineCode(n,e,t){if(e!=96||t&&n.char(t-1)==96)return-1;let r=t+1;for(;r<n.end&&n.char(r)==96;)r++;let i=r-t,s=0;for(;r<n.end;r++)if(n.char(r)==96){if(s++,s==i&&n.char(r+1)!=96)return n.append(Qt(_e.InlineCode,t,r+1,[Qt(_e.CodeMark,t,t+i),Qt(_e.CodeMark,r+1-i,r+1)]))}else s=0;return-1},HTMLTag(n,e,t){if(e!=60||t==n.end-1)return-1;let r=n.slice(t+1,n.end),i=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(r);if(i)return n.append(Qt(_e.Autolink,t,t+1+i[0].length,[Qt(_e.LinkMark,t,t+1),Qt(_e.URL,t+1,t+i[0].length),Qt(_e.LinkMark,t+i[0].length,t+1+i[0].length)]));let s=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(s)return n.append(Qt(_e.Comment,t,t+1+s[0].length));let o=/^\?[^]*?\?>/.exec(r);if(o)return n.append(Qt(_e.ProcessingInstruction,t,t+1+o[0].length));let a=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);return a?n.append(Qt(_e.HTMLTag,t,t+1+a[0].length)):-1},Emphasis(n,e,t){if(e!=95&&e!=42)return-1;let r=t+1;for(;n.char(r)==e;)r++;let i=n.slice(t-1,t),s=n.slice(r,r+1),o=bc.test(i),a=bc.test(s),l=/\s|^$/.test(i),c=/\s|^$/.test(s),u=!c&&(!a||l||o),f=!l&&(!o||c||a),d=u&&(e==42||!f||o),h=f&&(e==42||!u||a);return n.append(new Dr(e==95?Sx:Ax,t,r,(d?1:0)|(h?2:0)))},HardBreak(n,e,t){if(e==92&&n.char(t+1)==10)return n.append(Qt(_e.HardBreak,t,t+2));if(e==32){let r=t+1;for(;n.char(r)==32;)r++;if(n.char(r)==10&&r>=t+2)return n.append(Qt(_e.HardBreak,t,r+1))}return-1},Link(n,e,t){return e==91?n.append(new Dr(Oo,t,t+1,1)):-1},Image(n,e,t){return e==33&&n.char(t+1)==91?n.append(new Dr(zf,t,t+2,1)):-1},LinkEnd(n,e,t){if(e!=93)return-1;for(let r=n.parts.length-1;r>=0;r--){let i=n.parts[r];if(i instanceof Dr&&(i.type==Oo||i.type==zf)){if(!i.side||n.skipSpace(i.to)==t&&!/[(\[]/.test(n.slice(t+1,t+2)))return n.parts[r]=null,-1;let s=n.takeContent(r),o=n.parts[r]=q3(n,s,i.type==Oo?_e.Link:_e.Image,i.from,t+1);if(i.type==Oo)for(let a=0;a<r;a++){let l=n.parts[a];l instanceof Dr&&l.type==Oo&&(l.side=0)}return o.to}}return-1}};function q3(n,e,t,r,i){let{text:s}=n,o=n.char(i),a=i;if(e.unshift(Qt(_e.LinkMark,r,r+(t==_e.Image?2:1))),e.push(Qt(_e.LinkMark,i-1,i)),o==40){let l=n.skipSpace(i+1),c=Cx(s,l-n.offset,n.offset),u;c&&(l=n.skipSpace(c.to),l!=c.to&&(u=Tx(s,l-n.offset,n.offset),u&&(l=n.skipSpace(u.to)))),n.char(l)==41&&(e.push(Qt(_e.LinkMark,i,i+1)),a=l+1,c&&e.push(c),u&&e.push(u),e.push(Qt(_e.LinkMark,l,a)))}else if(o==91){let l=Px(s,i-n.offset,n.offset,!1);l&&(e.push(l),a=l.to)}return Qt(t,r,a,e)}function Cx(n,e,t){if(n.charCodeAt(e)==60){for(let i=e+1;i<n.length;i++){let s=n.charCodeAt(i);if(s==62)return Qt(_e.URL,e+t,i+1+t);if(s==60||s==10)return!1}return null}else{let i=0,s=e;for(let o=!1;s<n.length;s++){let a=n.charCodeAt(s);if(ui(a))break;if(o)o=!1;else if(a==40)i++;else if(a==41){if(!i)break;i--}else a==92&&(o=!0)}return s>e?Qt(_e.URL,e+t,s+t):s==n.length?null:!1}}function Tx(n,e,t){let r=n.charCodeAt(e);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let s=e+1,o=!1;s<n.length;s++){let a=n.charCodeAt(s);if(o)o=!1;else{if(a==i)return Qt(_e.LinkTitle,e+t,s+1+t);a==92&&(o=!0)}}return null}function Px(n,e,t,r){for(let i=!1,s=e+1,o=Math.min(n.length,s+999);s<o;s++){let a=n.charCodeAt(s);if(i)i=!1;else{if(a==93)return r?!1:Qt(_e.LinkLabel,e+t,s+1+t);if(r&&!ui(a)&&(r=!1),a==91)return!1;a==92&&(i=!0)}}return null}class zO{constructor(e,t,r){this.parser=e,this.text=t,this.offset=r,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,r,i,s){return this.append(new Dr(e,t,r,(i?1:0)|(s?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof Dr&&(t.type==Oo||t.type==zf))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let r=e;r<this.parts.length;r++){let i=this.parts[r];if(!(i instanceof Dr&&i.type.resolve&&i.side&2))continue;let s=i.type==Sx||i.type==Ax,o=i.to-i.from,a,l=r-1;for(;l>=e;l--){let p=this.parts[l];if(p instanceof Dr&&p.side&1&&p.type==i.type&&!(s&&(i.side&1||p.side&2)&&(p.to-p.from+o)%3==0&&((p.to-p.from)%3||o%3))){a=p;break}}if(!a)continue;let c=i.type.resolve,u=[],f=a.from,d=i.to;if(s){let p=Math.min(2,a.to-a.from,o);f=a.to-p,d=i.from+p,c=p==1?"Emphasis":"StrongEmphasis"}a.type.mark&&u.push(this.elt(a.type.mark,f,a.to));for(let p=l+1;p<r;p++)this.parts[p]instanceof vc&&u.push(this.parts[p]),this.parts[p]=null;i.type.mark&&u.push(this.elt(i.type.mark,i.from,d));let h=this.elt(c,f,d,u);this.parts[l]=s&&a.from!=f?new Dr(a.type,a.from,f,a.side):null,(this.parts[r]=s&&i.to!=d?new Dr(i.type,d,i.to,i.side):null)?this.parts.splice(r,0,h):this.parts[r]=h}let t=[];for(let r=e;r<this.parts.length;r++){let i=this.parts[r];i instanceof vc&&t.push(i)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=0;t--){let r=this.parts[t];if(r instanceof Dr&&r.type==e&&r.side&1)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}getDelimiterAt(e){let t=this.parts[e];return t instanceof Dr?t:null}skipSpace(e){return Gl(this.text,e-this.offset)+this.offset}elt(e,t,r,i){return typeof e=="string"?Qt(this.parser.getNodeType(e),t,r,i):new xx(e,t)}}zO.linkStart=Oo;zO.imageStart=zf;function Dm(n,e){if(!e.length)return n;if(!n.length)return e;let t=n.slice(),r=0;for(let i of e){for(;r<t.length&&t[r].to<i.to;)r++;if(r<t.length&&t[r].from<i.from){let s=t[r];s instanceof vc&&(t[r]=new vc(s.type,s.from,s.to,Dm(s.children,[i])))}else t.splice(r++,0,i)}return t}const R3=[_e.CodeBlock,_e.ListItem,_e.OrderedList,_e.BulletList];let I3=class{constructor(e,t){this.fragments=e,this.input=t,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,t){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=`
160
- `;)s--;this.fragmentEnd=s?s-1:0}let r=this.cursor;r||(r=this.cursor=this.fragment.tree.cursor(),r.firstChild());let i=e+this.fragment.offset;for(;r.to<=i;)if(!r.parent())return!1;for(;;){if(r.from>=i)return this.fragment.from<=t;if(!r.childAfter(i))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(it.contextHash)==e}takeNodes(e){let t=this.cursor,r=this.fragment.offset,i=this.fragmentEnd-(this.fragment.openEnd?1:0),s=e.absoluteLineStart,o=s,a=e.block.children.length,l=o,c=a;for(;;){if(t.to-r>i){if(t.type.isAnonymous&&t.firstChild())continue;break}let u=Ex(t.from-r,e.ranges);if(t.to-r<=e.ranges[e.rangeI].to)e.addNode(t.tree,u);else{let f=new yt(e.parser.nodeSet.types[_e.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(f,t.tree),e.addNode(f,u)}if(t.type.is("Block")&&(R3.indexOf(t.type.id)<0?(o=t.to-r,a=e.block.children.length):(o=l,a=c),l=t.to-r,c=e.block.children.length),!t.nextSibling())break}for(;e.block.children.length>a;)e.block.children.pop(),e.block.positions.pop();return o-s}};function Ex(n,e){let t=n;for(let r=1;r<e.length;r++){let i=e[r-1].to,s=e[r].from;i<n&&(t-=s-i)}return t}const N3=al({"Blockquote/...":N.quote,HorizontalRule:N.contentSeparator,"ATXHeading1/... SetextHeading1/...":N.heading1,"ATXHeading2/... SetextHeading2/...":N.heading2,"ATXHeading3/...":N.heading3,"ATXHeading4/...":N.heading4,"ATXHeading5/...":N.heading5,"ATXHeading6/...":N.heading6,"Comment CommentBlock":N.comment,Escape:N.escape,Entity:N.character,"Emphasis/...":N.emphasis,"StrongEmphasis/...":N.strong,"Link/... Image/...":N.link,"OrderedList/... BulletList/...":N.list,"BlockQuote/...":N.quote,"InlineCode CodeText":N.monospace,"URL Autolink":N.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":N.processingInstruction,"CodeInfo LinkLabel":N.labelName,LinkTitle:N.string,Paragraph:N.content}),B3=new Fd(new ol(_x).extend(N3),Object.keys(Su).map(n=>Su[n]),Object.keys(Su).map(n=>yx[n]),Object.keys(Su),L3,fx,Object.keys(Dh).map(n=>Dh[n]),Object.keys(Dh),[]);function j3(n,e,t){let r=[];for(let i=n.firstChild,s=e;;i=i.nextSibling){let o=i?i.from:t;if(o>s&&r.push({from:s,to:o}),!i)break;s=i.to}return r}function z3(n){let{codeParser:e,htmlParser:t}=n;return{wrap:l2((i,s)=>{let o=i.type.id;if(e&&(o==_e.CodeBlock||o==_e.FencedCode)){let a="";if(o==_e.FencedCode){let c=i.node.getChild(_e.CodeInfo);c&&(a=s.read(c.from,c.to))}let l=e(a);if(l)return{parser:l,overlay:c=>c.type.id==_e.CodeText,bracketed:o==_e.FencedCode}}else if(t&&(o==_e.HTMLBlock||o==_e.HTMLTag||o==_e.CommentBlock))return{parser:t,overlay:j3(i.node,i.from,i.to)};return null})}}const Z3={resolve:"Strikethrough",mark:"StrikethroughMark"},X3={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":N.strikethrough}},{name:"StrikethroughMark",style:N.processingInstruction}],parseInline:[{name:"Strikethrough",parse(n,e,t){if(e!=126||n.char(t+1)!=126||n.char(t+2)==126)return-1;let r=n.slice(t-1,t),i=n.slice(t+2,t+3),s=/\s|^$/.test(r),o=/\s|^$/.test(i),a=bc.test(r),l=bc.test(i);return n.addDelimiter(Z3,t,t+2,!o&&(!l||s||a),!s&&(!a||o||l))},after:"Emphasis"}]};function Hl(n,e,t=0,r,i=0){let s=0,o=!0,a=-1,l=-1,c=!1,u=()=>{r.push(n.elt("TableCell",i+a,i+l,n.parser.parseInline(e.slice(a,l),i+a)))};for(let f=t;f<e.length;f++){let d=e.charCodeAt(f);d==124&&!c?((!o||a>-1)&&s++,o=!1,r&&(a>-1&&u(),r.push(n.elt("TableDelimiter",f+i,f+i+1))),a=l=-1):(c||d!=32&&d!=9)&&(a<0&&(a=f),l=f+1),c=!c&&d==92}return a>-1&&(s++,r&&u()),s}function Xy(n,e){for(let t=e;t<n.length;t++){let r=n.charCodeAt(t);if(r==124)return!0;r==92&&t++}return!1}const $x=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class Fy{constructor(){this.rows=null}nextLine(e,t,r){if(this.rows==null){this.rows=!1;let i;if((t.next==45||t.next==58||t.next==124)&&$x.test(i=t.text.slice(t.pos))){let s=[];Hl(e,r.content,0,s,r.start)==Hl(e,i,t.pos)&&(this.rows=[e.elt("TableHeader",r.start,r.start+r.content.length,s),e.elt("TableDelimiter",e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let i=[];Hl(e,t.text,t.pos,i,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+t.pos,e.lineStart+t.text.length,i))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt("Table",t.start,t.start+t.content.length,this.rows)),!0):!1}}const F3={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":N.heading}},"TableRow",{name:"TableCell",style:N.content},{name:"TableDelimiter",style:N.processingInstruction}],parseBlock:[{name:"Table",leaf(n,e){return Xy(e.content,0)?new Fy:null},endLeaf(n,e,t){if(t.parsers.some(i=>i instanceof Fy)||!Xy(e.text,e.basePos))return!1;let r=n.peekLine();return $x.test(r)&&Hl(n,e.text,e.basePos)==Hl(n,r,e.basePos)},before:"SetextHeading"}]};class V3{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}}const W3={defineNodes:[{name:"Task",block:!0,style:N.list},{name:"TaskMarker",style:N.atom}],parseBlock:[{name:"TaskList",leaf(n,e){return/^\[[ xX]\][ \t]/.test(e.content)&&n.parentType().name=="ListItem"?new V3:null},after:"SetextHeading"}]},Vy=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,Wy=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,Y3=/[\w-]+\.[\w-]+($|\/)/,Yy=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Uy=/\/[a-zA-Z\d@.]+/gy;function Gy(n,e,t,r){let i=0;for(let s=e;s<t;s++)n[s]==r&&i++;return i}function U3(n,e){Wy.lastIndex=e;let t=Wy.exec(n);if(!t||Y3.exec(t[0])[0].indexOf("_")>-1)return-1;let r=e+t[0].length;for(;;){let i=n[r-1],s;if(/[?!.,:*_~]/.test(i)||i==")"&&Gy(n,e,r,")")>Gy(n,e,r,"("))r--;else if(i==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(n.slice(e,r))))r=e+s.index;else break}return r}function Hy(n,e){Yy.lastIndex=e;let t=Yy.exec(n);if(!t)return-1;let r=t[0][t[0].length-1];return r=="_"||r=="-"?-1:e+t[0].length-(r=="."?1:0)}const G3={parseInline:[{name:"Autolink",parse(n,e,t){let r=t-n.offset;if(r&&/\w/.test(n.text[r-1]))return-1;Vy.lastIndex=r;let i=Vy.exec(n.text),s=-1;if(!i)return-1;if(i[1]||i[2]){if(s=U3(n.text,r+i[0].length),s>-1&&n.hasOpenLink){let o=/([^\[\]]|\[[^\]]*\])*/.exec(n.text.slice(r,s));s=r+o[0].length}}else i[3]?s=Hy(n.text,r):(s=Hy(n.text,r+i[0].length),s>-1&&i[0]=="xmpp:"&&(Uy.lastIndex=s,i=Uy.exec(n.text),i&&(s=i.index+i[0].length)));return s<0?-1:(n.addElement(n.elt("URL",t,s+n.offset)),s+n.offset)}}]},H3=[F3,W3,X3,G3];function Qx(n,e,t){return(r,i,s)=>{if(i!=n||r.char(s+1)==n)return-1;let o=[r.elt(t,s,s+1)];for(let a=s+1;a<r.end;a++){let l=r.char(a);if(l==n)return r.addElement(r.elt(e,s,a+1,o.concat(r.elt(t,a,a+1))));if(l==92&&o.push(r.elt("Escape",a,a+++2)),ui(l))break}return-1}}const K3={defineNodes:[{name:"Superscript",style:N.special(N.content)},{name:"SuperscriptMark",style:N.processingInstruction}],parseInline:[{name:"Superscript",parse:Qx(94,"Superscript","SuperscriptMark")}]},J3={defineNodes:[{name:"Subscript",style:N.special(N.content)},{name:"SubscriptMark",style:N.processingInstruction}],parseInline:[{name:"Subscript",parse:Qx(126,"Subscript","SubscriptMark")}]},eD={defineNodes:[{name:"Emoji",style:N.character}],parseInline:[{name:"Emoji",parse(n,e,t){let r;return e!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(n.slice(t+1,n.end)))?-1:n.addElement(n.elt("Emoji",t,t+1+r[0].length))}}]};var Ky={};class Zf{constructor(e,t,r,i,s,o,a,l,c,u=0,f){this.p=e,this.stack=t,this.state=r,this.reducePos=i,this.pos=s,this.score=o,this.buffer=a,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=f}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,r=0){let i=e.parser.context;return new Zf(e,[],t,r,r,0,[],0,i?new Jy(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let r=e>>19,i=e&65535,{parser:s}=this.p,o=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),a=s.dynamicPrecedence(i);if(a&&(this.score+=a),r==0){this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i<s.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(i,this.reducePos);return}let l=this.stack.length-(r-1)*3-(e&262144?6:0),c=l?this.stack[l-2]:this.p.ranges[0].from,u=this.reducePos-c;u>=2e3&&!(!((t=this.p.parser.nodeSet.types[i])===null||t===void 0)&&t.isAnonymous)&&(c==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=c,this.p.lastBigReductionSize=u));let f=l?this.stack[l-1]:0,d=this.bufferBase+this.buffer.length-f;if(i<s.minRepeatTerm||e&131072){let h=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,c,h,d+4,!0)}if(e&262144)this.state=this.stack[l];else{let h=this.stack[l-3];this.state=s.getGoto(h,i,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(i,c)}storeNode(e,t,r,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,a=this.buffer.length;if(a==0&&o.parent&&(a=o.bufferBase-o.parent.bufferBase,o=o.parent),a>0&&o.buffer[a-4]==0&&o.buffer[a-1]>-1){if(t==r)return;if(o.buffer[a-2]>=t){o.buffer[a-2]=r;return}}}if(!s||this.pos==r)this.buffer.push(e,t,r,i);else{let o=this.buffer.length;if(o>0&&(this.buffer[o-4]!=0||this.buffer[o-1]<0)){let a=!1;for(let l=o;l>0&&this.buffer[l-2]>r;l-=4)if(this.buffer[l-1]>=0){a=!0;break}if(a)for(;o>0&&this.buffer[o-2]>r;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,i>4&&(i-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=r,this.buffer[o+3]=i}}shift(e,t,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:o}=this.p;this.pos=i;let a=o.stateFlag(s,1);!a&&(i>r||t<=o.maxNode)&&(this.reducePos=i),this.pushState(s,a?r:Math.min(r,this.reducePos)),this.shiftContext(t,r),t<=o.maxNode&&this.buffer.push(t,r,i,4)}else this.pos=i,this.shiftContext(t,r),t<=this.p.parser.maxNode&&this.buffer.push(t,r,i,4)}apply(e,t,r,i){e&65536?this.reduce(e):this.shift(e,t,r,i)}useNode(e,t){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(t,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let r=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new Zf(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,r?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new tD(this);;){let r=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(r==0)return!1;if((r&65536)==0)return!0;t.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let i=[];for(let s=0,o;s<t.length;s+=2)(o=t[s+1])!=this.state&&this.p.parser.hasAction(o,e)&&i.push(t[s],o);if(this.stack.length<120)for(let s=0;i.length<8&&s<t.length;s+=2){let o=t[s+1];i.some((a,l)=>l&1&&a==o)||i.push(t[s],o)}t=i}let r=[];for(let i=0;i<t.length&&r.length<4;i+=2){let s=t[i+1];if(s==this.state)continue;let o=this.split();o.pushState(s,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(t[i],this.pos),o.reducePos=this.pos,o.score-=200,r.push(o)}return r}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if((t&65536)==0)return!1;if(!e.validAction(this.state,t)){let r=t>>19,i=t&65535,s=this.stack.length-r*3;if(s<0||e.getGoto(this.stack[s],i,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],r=(i,s)=>{if(!t.includes(i))return t.push(i),e.allActions(i,o=>{if(!(o&393216))if(o&65536){let a=(o>>19)-s;if(a>1){let l=o&65535,c=this.stack.length-a*3;if(c>=0&&e.getGoto(this.stack[c],l,!1)>=0)return a<<19|65536|l}}else{let a=r(o,s+1);if(a!=null)return a}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new Jy(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Jy{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class tD{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class Xf{constructor(e,t,r){this.stack=e,this.pos=t,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new Xf(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Xf(this.stack,this.pos,this.index)}}function Rl(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let r=0,i=0;r<n.length;){let s=0;for(;;){let o=n.charCodeAt(r++),a=!1;if(o==126){s=65535;break}o>=92&&o--,o>=34&&o--;let l=o-32;if(l>=46&&(l-=46,a=!0),s+=l,a)break;s*=46}t?t[i++]=s:t=new e(s)}return t}class af{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const e1=new af;class nD{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=e1,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let r=this.range,i=this.rangeIndex,s=this.pos+e;for(;s<r.from;){if(!i)return null;let o=this.ranges[--i];s-=r.from-o.to,r=o}for(;t<0?s>r.to:s>=r.to;){if(i==this.ranges.length-1)return null;let o=this.ranges[++i];s+=o.from-r.to,r=o}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,r,i;if(t>=0&&t<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(t);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(r=s,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let o=this.rangeIndex,a=this.range;for(;a.to<=r;)a=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,t=0){let r=t?this.resolveOffset(t,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=e1,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let r="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return r}}class Pa{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:r}=t.p;Lx(this.data,e,t,this.id,r.data,r.tokenPrecTable)}}Pa.prototype.contextual=Pa.prototype.fallback=Pa.prototype.extend=!1;class Ff{constructor(e,t,r){this.precTable=t,this.elseToken=r,this.data=typeof e=="string"?Rl(e):e}token(e,t){let r=e.pos,i=0;for(;;){let s=e.next<0,o=e.resolveOffset(1,1);if(Lx(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||i++,o==null)break;e.reset(o,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}Ff.prototype.contextual=Pa.prototype.fallback=Pa.prototype.extend=!1;class Zr{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function Lx(n,e,t,r,i,s){let o=0,a=1<<r,{dialect:l}=t.p.parser;e:for(;(a&n[o])!=0;){let c=n[o+1];for(let h=o+3;h<c;h+=2)if((n[h+1]&a)>0){let g=n[h];if(l.allows(g)&&(e.token.value==-1||e.token.value==g||rD(g,e.token.value,i,s))){e.acceptToken(g);break}}let u=e.next,f=0,d=n[o+2];if(e.next<0&&d>f&&n[c+d*3-3]==65535){o=n[c+d*3-1];continue e}for(;f<d;){let h=f+d>>1,g=c+h+(h<<1),p=n[g],O=n[g+1]||65536;if(u<p)d=h;else if(u>=O)f=h+1;else{o=n[g+2],e.advance();continue e}}break}}function t1(n,e,t){for(let r=e,i;(i=n[r])!=65535;r++)if(i==t)return r-e;return-1}function rD(n,e,t,r){let i=t1(t,r,e);return i<0||t1(t,r,n)<i}const Er=typeof process<"u"&&Ky&&/\bparse\b/.test(Ky.LOG);let qh=null;function n1(n,e,t){let r=n.cursor(Vt.IncludeAnonymous);for(r.moveTo(e);;)if(!(t<0?r.childBefore(e):r.childAfter(e)))for(;;){if((t<0?r.to<e:r.from>e)&&!r.type.isError)return t<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(n.length,Math.max(r.from+1,e+25));if(t<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return t<0?0:n.length}}class iD{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?n1(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?n1(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let r=this.trees[t],i=this.index[t];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=r.children[i],o=this.start[t]+r.positions[i];if(o>e)return this.nextStart=o,null;if(s instanceof yt){if(o==e){if(o<this.safeFrom)return null;let a=o+s.length;if(a<=this.safeTo){let l=s.prop(it.lookAhead);if(!l||a+l<this.fragment.to)return s}}this.index[t]++,o+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+s.length}}}class sD{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new af)}getActions(e){let t=0,r=null,{parser:i}=e.p,{tokenizers:s}=i,o=i.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,l=0;for(let c=0;c<s.length;c++){if((1<<c&o)==0)continue;let u=s[c],f=this.tokens[c];if(!(r&&!u.fallback)&&((u.contextual||f.start!=e.pos||f.mask!=o||f.context!=a)&&(this.updateCachedToken(f,u,e),f.mask=o,f.context=a),f.lookAhead>f.end+25&&(l=Math.max(f.lookAhead,l)),f.value!=0)){let d=t;if(f.extended>-1&&(t=this.addActions(e,f.extended,f.end,t)),t=this.addActions(e,f.value,f.end,t),!u.extend&&(r=f,t>d))break}}for(;this.actions.length>t;)this.actions.pop();return l&&e.setLookAhead(l),!r&&e.pos==this.stream.end&&(r=new af,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,t=this.addActions(e,r.value,r.end,t)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new af,{pos:r,p:i}=e;return t.start=r,t.end=Math.min(r+1,i.stream.end),t.value=r==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,r){let i=this.stream.clipPos(r.pos);if(t.token(this.stream.reset(i,e),r),e.value>-1){let{parser:s}=r.p;for(let o=0;o<s.specialized.length;o++)if(s.specialized[o]==e.value){let a=s.specializers[o](this.stream.read(e.start,e.end),r);if(a>=0&&r.p.parser.dialect.allows(a>>1)){(a&1)==0?e.value=a>>1:e.extended=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,t,r,i){for(let s=0;s<i;s+=3)if(this.actions[s]==e)return i;return this.actions[i++]=e,this.actions[i++]=t,this.actions[i++]=r,i}addActions(e,t,r,i){let{state:s}=e,{parser:o}=e.p,{data:a}=o;for(let l=0;l<2;l++)for(let c=o.stateSlot(s,l?2:1);;c+=3){if(a[c]==65535)if(a[c+1]==1)c=ss(a,c+2);else{i==0&&a[c+1]==2&&(i=this.putAction(ss(a,c+2),t,r,i));break}a[c]==t&&(i=this.putAction(ss(a,c+1),t,r,i))}return i}}class oD{constructor(e,t,r,i){this.parser=e,this.input=t,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new nD(t,i),this.tokens=new sD(e,this.stream),this.topTerm=e.top[1];let{from:s}=i[0];this.stacks=[Zf.start(this,e.top[0],s)],this.fragments=r.length&&this.stream.end-s>e.bufferLength*4?new iD(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,r=this.stacks=[],i,s;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let a=e[o];for(;;){if(this.tokens.mainToken=null,a.pos>t)r.push(a);else{if(this.advanceStack(a,r,e))continue;{i||(i=[],s=[]),i.push(a);let l=this.tokens.getMainToken(a);s.push(l.value,l.end)}}break}}if(!r.length){let o=i&&lD(i);if(o)return Er&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw Er&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let o=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,r);if(o)return Er&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(r.length>o)for(r.sort((a,l)=>l.score-a.score);r.length>o;)r.pop();r.some(a=>a.reducePos>t)&&this.recovering--}else if(r.length>1){e:for(let o=0;o<r.length-1;o++){let a=r[o];for(let l=o+1;l<r.length;l++){let c=r[l];if(a.sameState(c)||a.buffer.length>500&&c.buffer.length>500)if((a.score-c.score||a.buffer.length-c.buffer.length)>0)r.splice(l--,1);else{r.splice(o--,1);continue e}}}r.length>12&&(r.sort((o,a)=>a.score-o.score),r.splice(12,r.length-12))}this.minStackPos=r[0].pos;for(let o=1;o<r.length;o++)r[o].pos<this.minStackPos&&(this.minStackPos=r[o].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,r){let i=e.pos,{parser:s}=this,o=Er?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,u=c?e.curContext.hash:0;for(let f=this.fragments.nodeAt(i);f;){let d=this.parser.nodeSet.types[f.type.id]==f.type?s.getGoto(e.state,f.type.id):-1;if(d>-1&&f.length&&(!c||(f.prop(it.contextHash)||0)==u))return e.useNode(f,d),Er&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(f.type.id)})`),!0;if(!(f instanceof yt)||f.children.length==0||f.positions[0]>0)break;let h=f.children[0];if(h instanceof yt&&f.positions[0]==0)f=h;else break}}let a=s.stateSlot(e.state,4);if(a>0)return e.reduce(a),Er&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let c=0;c<l.length;){let u=l[c++],f=l[c++],d=l[c++],h=c==l.length||!r,g=h?e:e.split(),p=this.tokens.mainToken;if(g.apply(u,f,p?p.start:g.pos,d),Er&&console.log(o+this.stackID(g)+` (via ${(u&65536)==0?"shift":`reduce of ${s.getName(u&65535)}`} for ${s.getName(f)} @ ${i}${g==e?"":", split"})`),h)return!0;g.pos>i?t.push(g):r.push(g)}return!1}advanceFully(e,t){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return r1(e,t),!0}}runRecovery(e,t,r){let i=null,s=!1;for(let o=0;o<e.length;o++){let a=e[o],l=t[o<<1],c=t[(o<<1)+1],u=Er?this.stackID(a)+" -> ":"";if(a.deadEnd&&(s||(s=!0,a.restart(),Er&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,r))))continue;let f=a.split(),d=u;for(let h=0;h<10&&f.forceReduce()&&(Er&&console.log(d+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,r));h++)Er&&(d=this.stackID(f)+" -> ");for(let h of a.recoverByInsert(l))Er&&console.log(u+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,r);this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),Er&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),r1(a,r)):(!i||i.score<f.score)&&(i=f)}return i}stackToTree(e){return e.close(),yt.build({buffer:Xf.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(qh||(qh=new WeakMap)).get(e);return t||qh.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function r1(n,e){for(let t=0;t<e.length;t++){let r=e[t];if(r.pos==n.pos&&r.sameState(n)){e[t].score<n.score&&(e[t]=n);return}}e.push(n)}class aD{constructor(e,t,r){this.source=e,this.flags=t,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}const Rh=n=>n;class Mx{constructor(e){this.start=e.start,this.shift=e.shift||Rh,this.reduce=e.reduce||Rh,this.reuse=e.reuse||Rh,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Va extends Id{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let a=0;a<e.repeatNodeCount;a++)t.push("");let r=Object.keys(e.topRules).map(a=>e.topRules[a][1]),i=[];for(let a=0;a<t.length;a++)i.push([]);function s(a,l,c){i[a].push([l,l.deserialize(String(c))])}if(e.nodeProps)for(let a of e.nodeProps){let l=a[0];typeof l=="string"&&(l=it[l]);for(let c=1;c<a.length;){let u=a[c++];if(u>=0)s(u,l,a[c++]);else{let f=a[c+-u];for(let d=-u;d>0;d--)s(a[c++],l,f);c++}}}this.nodeSet=new ol(t.map((a,l)=>Qn.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:i[l],top:r.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=r2;let o=Rl(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map(i1),this.states=Rl(e.states,Uint32Array),this.data=Rl(e.stateData),this.goto=Rl(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(a=>typeof a=="number"?new Pa(o,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,r){let i=new oD(this,e,t,r);for(let s of this.wrappers)i=s(i,e,t,r);return i}getGoto(e,t,r=!1){let i=this.goto;if(t>=i[0])return-1;for(let s=i[t+1];;){let o=i[s++],a=o&1,l=i[s++];if(a&&r)return l;for(let c=s+(o>>1);s<c;s++)if(i[s]==e)return l;if(a)return-1}}hasAction(e,t){let r=this.data;for(let i=0;i<2;i++)for(let s=this.stateSlot(e,i?2:1),o;;s+=3){if((o=r[s])==65535)if(r[s+1]==1)o=r[s=ss(r,s+2)];else{if(r[s+1]==2)return ss(r,s+2);break}if(o==t||o==0)return ss(r,s+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,r=>r==t?!0:null)}allActions(e,t){let r=this.stateSlot(e,4),i=r?t(r):void 0;for(let s=this.stateSlot(e,1);i==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=ss(this.data,s+2);else break;i=t(ss(this.data,s+1))}return i}nextStates(e){let t=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=ss(this.data,r+2);else break;if((this.data[r+2]&1)==0){let i=this.data[r+1];t.some((s,o)=>o&1&&s==i)||t.push(this.data[r],i)}}return t}configure(e){let t=Object.assign(Object.create(Va.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=r}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(s=>s.from==r);return i?i.to:r})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((r,i)=>{let s=e.specializers.find(a=>a.from==r.external);if(!s)return r;let o=Object.assign(Object.assign({},r),{external:s.to});return t.specializers[i]=i1(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),r=t.map(()=>!1);if(e)for(let s of e.split(" ")){let o=t.indexOf(s);o>=0&&(r[o]=!0)}let i=null;for(let s=0;s<t.length;s++)if(!r[s])for(let o=this.dialects[t[s]],a;(a=this.data[o++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[a]=1;return new aD(e,r,i)}static deserialize(e){return new Va(e)}}function ss(n,e){return n[e]|n[e+1]<<16}function lD(n){let e=null;for(let t of n){let r=t.p.stoppedAt;(t.pos==t.p.stream.end||r!=null&&t.pos>r)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.score<t.score)&&(e=t)}return e}function i1(n){if(n.external){let e=n.extend?1:0;return(t,r)=>n.external(t,r)<<1|e}return n.get}const cD=55,uD=1,fD=56,dD=2,hD=57,pD=3,s1=4,mD=5,ZO=6,Dx=7,qx=8,Rx=9,Ix=10,gD=11,OD=12,vD=13,Ih=58,bD=14,yD=15,o1=59,Nx=21,wD=23,Bx=24,_D=25,qm=27,jx=28,kD=29,xD=32,SD=35,AD=37,CD=38,TD=0,PD=1,ED={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},$D={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},a1={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function QD(n){return n==45||n==46||n==58||n>=65&&n<=90||n==95||n>=97&&n<=122||n>=161}let l1=null,c1=null,u1=0;function Rm(n,e){let t=n.pos+e;if(u1==t&&c1==n)return l1;let r=n.peek(e),i="";for(;QD(r);)i+=String.fromCharCode(r),r=n.peek(++e);return c1=n,u1=t,l1=i?i.toLowerCase():r==LD||r==MD?void 0:null}const zx=60,Vf=62,XO=47,LD=63,MD=33,DD=45;function f1(n,e){this.name=n,this.parent=e}const qD=[ZO,Ix,Dx,qx,Rx],RD=new Mx({start:null,shift(n,e,t,r){return qD.indexOf(e)>-1?new f1(Rm(r,1)||"",n):n},reduce(n,e){return e==Nx&&n?n.parent:n},reuse(n,e,t,r){let i=e.type.id;return i==ZO||i==AD?new f1(Rm(r,1)||"",n):n},strict:!1}),ID=new Zr((n,e)=>{if(n.next!=zx){n.next<0&&e.context&&n.acceptToken(Ih);return}n.advance();let t=n.next==XO;t&&n.advance();let r=Rm(n,0);if(r===void 0)return;if(!r)return n.acceptToken(t?yD:bD);let i=e.context?e.context.name:null;if(t){if(r==i)return n.acceptToken(gD);if(i&&$D[i])return n.acceptToken(Ih,-2);if(e.dialectEnabled(TD))return n.acceptToken(OD);for(let s=e.context;s;s=s.parent)if(s.name==r)return;n.acceptToken(vD)}else{if(r=="script")return n.acceptToken(Dx);if(r=="style")return n.acceptToken(qx);if(r=="textarea")return n.acceptToken(Rx);if(ED.hasOwnProperty(r))return n.acceptToken(Ix);i&&a1[i]&&a1[i][r]?n.acceptToken(Ih,-1):n.acceptToken(ZO)}},{contextual:!0}),ND=new Zr(n=>{for(let e=0,t=0;;t++){if(n.next<0){t&&n.acceptToken(o1);break}if(n.next==DD)e++;else if(n.next==Vf&&e>=2){t>=3&&n.acceptToken(o1,-2);break}else e=0;n.advance()}});function BD(n){for(;n;n=n.parent)if(n.name=="svg"||n.name=="math")return!0;return!1}const jD=new Zr((n,e)=>{if(n.next==XO&&n.peek(1)==Vf){let t=e.dialectEnabled(PD)||BD(e.context);n.acceptToken(t?mD:s1,2)}else n.next==Vf&&n.acceptToken(s1,1)});function FO(n,e,t){let r=2+n.length;return new Zr(i=>{for(let s=0,o=0,a=0;;a++){if(i.next<0){a&&i.acceptToken(e);break}if(s==0&&i.next==zx||s==1&&i.next==XO||s>=2&&s<r&&i.next==n.charCodeAt(s-2))s++,o++;else if(s==r&&i.next==Vf){a>o?i.acceptToken(e,-o):i.acceptToken(t,-(o-2));break}else if((i.next==10||i.next==13)&&a){i.acceptToken(e,1);break}else s=o=0;i.advance()}})}const zD=FO("script",cD,uD),ZD=FO("style",fD,dD),XD=FO("textarea",hD,pD),FD=al({"Text RawText IncompleteTag IncompleteCloseTag":N.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":N.angleBracket,TagName:N.tagName,"MismatchedCloseTag/TagName":[N.tagName,N.invalid],AttributeName:N.attributeName,"AttributeValue UnquotedAttributeValue":N.attributeValue,Is:N.definitionOperator,"EntityReference CharacterReference":N.character,Comment:N.blockComment,ProcessingInst:N.processingInstruction,DoctypeDecl:N.documentMeta}),VD=Va.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1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~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:RD,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[FD],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P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%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[zD,ZD,XD,jD,ID,ND,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function Zx(n,e){let t=Object.create(null);for(let r of n.getChildren(Bx)){let i=r.getChild(_D),s=r.getChild(qm)||r.getChild(jx);i&&(t[e.read(i.from,i.to)]=s?s.type.id==qm?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}return t}function d1(n,e){let t=n.getChild(wD);return t?e.read(t.from,t.to):" "}function Nh(n,e,t){let r;for(let i of t)if(!i.attrs||i.attrs(r||(r=Zx(n.node.parent.firstChild,e))))return{parser:i.parser,bracketed:!0};return null}function Xx(n=[],e=[]){let t=[],r=[],i=[],s=[];for(let a of n)(a.tag=="script"?t:a.tag=="style"?r:a.tag=="textarea"?i:s).push(a);let o=e.length?Object.create(null):null;for(let a of e)(o[a.name]||(o[a.name]=[])).push(a);return l2((a,l)=>{let c=a.type.id;if(c==kD)return Nh(a,l,t);if(c==xD)return Nh(a,l,r);if(c==SD)return Nh(a,l,i);if(c==Nx&&s.length){let u=a.node,f=u.firstChild,d=f&&d1(f,l),h;if(d){for(let g of s)if(g.tag==d&&(!g.attrs||g.attrs(h||(h=Zx(f,l))))){let p=u.lastChild,O=p.type.id==CD?p.from:u.to;if(O>f.to)return{parser:g.parser,overlay:[{from:f.to,to:O}]}}}}if(o&&c==Bx){let u=a.node,f;if(f=u.firstChild){let d=o[l.read(f.from,f.to)];if(d)for(let h of d){if(h.tagName&&h.tagName!=d1(u.parent,l))continue;let g=u.lastChild;if(g.type.id==qm){let p=g.from+1,O=g.lastChild,v=g.to-(O&&O.isError?0:1);if(v>p)return{parser:h.parser,overlay:[{from:p,to:v}],bracketed:!0}}else if(g.type.id==jx)return{parser:h.parser,overlay:[{from:g.from,to:g.to}]}}}}return null})}const WD=122,h1=1,YD=123,UD=124,Fx=2,GD=125,HD=3,KD=4,Vx=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],JD=58,eq=40,Wx=95,tq=91,lf=45,nq=46,rq=35,iq=37,sq=38,oq=92,aq=10,lq=42;function yc(n){return n>=65&&n<=90||n>=97&&n<=122||n>=161}function VO(n){return n>=48&&n<=57}function p1(n){return VO(n)||n>=97&&n<=102||n>=65&&n<=70}const Yx=(n,e,t)=>(r,i)=>{for(let s=!1,o=0,a=0;;a++){let{next:l}=r;if(yc(l)||l==lf||l==Wx||s&&VO(l))!s&&(l!=lf||a>0)&&(s=!0),o===a&&l==lf&&o++,r.advance();else if(l==oq&&r.peek(1)!=aq){if(r.advance(),p1(r.next)){do r.advance();while(p1(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();s=!0}else{s&&r.acceptToken(o==2&&i.canShift(Fx)?e:l==eq?t:n);break}}},cq=new Zr(Yx(YD,Fx,UD)),uq=new Zr(Yx(GD,HD,KD)),fq=new Zr(n=>{if(Vx.includes(n.peek(-1))){let{next:e}=n;(yc(e)||e==Wx||e==rq||e==nq||e==lq||e==tq||e==JD&&yc(n.peek(1))||e==lf||e==sq)&&n.acceptToken(WD)}}),dq=new Zr(n=>{if(!Vx.includes(n.peek(-1))){let{next:e}=n;if(e==iq&&(n.advance(),n.acceptToken(h1)),yc(e)){do n.advance();while(yc(n.next)||VO(n.next));n.acceptToken(h1)}}}),hq=al({"AtKeyword import charset namespace keyframes media supports":N.definitionKeyword,"from to selector":N.keyword,NamespaceName:N.namespace,KeyframeName:N.labelName,KeyframeRangeName:N.operatorKeyword,TagName:N.tagName,ClassName:N.className,PseudoClassName:N.constant(N.className),IdName:N.labelName,"FeatureName PropertyName":N.propertyName,AttributeName:N.attributeName,NumberLiteral:N.number,KeywordQuery:N.keyword,UnaryQueryOp:N.operatorKeyword,"CallTag ValueName":N.atom,VariableName:N.variableName,Callee:N.operatorKeyword,Unit:N.unit,"UniversalSelector NestingSelector":N.definitionOperator,"MatchOp CompareOp":N.compareOperator,"ChildOp SiblingOp, LogicOp":N.logicOperator,BinOp:N.arithmeticOperator,Important:N.modifier,Comment:N.blockComment,ColorLiteral:N.color,"ParenthesizedContent StringLiteral":N.string,":":N.punctuation,"PseudoOp #":N.derefOperator,"; ,":N.separator,"( )":N.paren,"[ ]":N.squareBracket,"{ }":N.brace}),pq={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},mq={__proto__:null,or:98,and:98,not:106,only:106,layer:170},gq={__proto__:null,selector:112,layer:166},Oq={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},vq={__proto__:null,to:207},bq=Va.deserialize({version:14,states:"EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO'#DxOOQP'#FV'#FVO&eQhO'#EhOOQS'#FU'#FUOOQS'#Ek'#EkQYQdOOO&lQdO'#EOO&PQhO'#EUO&lQdO'#EWO'aQdO'#EYO'lQdO'#E]O'tQhO'#EcO(VQdO'#EeO(bQaO'#CfO)VQ`O'#D{O)[Q`O'#F`O)gQdO'#F`QOQ`OOP)qO&jO'#CaPOOO)C@t)C@tOOQP'#Cj'#CjOOQP,59S,59SO#}QdO,59SO)|QdO,59VO%TQdO,5:[O%YQdO,5:^O%_Q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U!nQ$[!uQ$_!yQ%e$^Q&Y%aQ&]%fR&v&XSjPzQ!}kQ$c!{R%k$dZiPkz!{$dR$P!gQ%}%SR&z&mR!rdR!teR$Z!tS%a$Y%bR&t&WV%_$Y%b&WQ#PmR$g#PQ`OSkPzU!a`k$dR$d!{Q$p#aY%p$p%u&d&l'QQ%u$sQ&d%qQ&l%zR'Q&xQ#t!cQ#v!dQ#x!eV$}#t#v#xQ%X$RR&T%XQ%y$zS&k%y&yR&y&lQ%r$pR&e%rQ%n$mR&c%nQyUR#]yQ%i$aR&_%iQ!|jS$e!|$fR$f!}Q&n%}R&{&nQ#k!ZR$x#kQ%b$YR&Z%bQ&X%aR&u&X__OP`kz!{$d^UOP`kz!{$dQ!VYQ!WZQ#XuQ#YvQ#ZwQ#[xQ$]!vQ$m#`R&b%mR$q#aQ!gaQ!oc[#q!c!d!e#t#v#xQ$a!zd$o#a$p$s%q%u%z&d&l&x'QQ$r#cQ%R#{S%g$a%iQ%l$kQ&^%hR&p&P]#s!c!d!e#t#v#xW!Z]b!g$PQ!ufQ#f!YQ#l![Q$v#iQ$w#jQ$z#mS%V$R%XR&i%xQ#h!YQ%w$tR&w&hR$|#mR$n#`QlPR#_zQ!_]Q!nbQ$O!gR%U$P",nodeNames:"⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to AtRule Styles",maxTerm:143,nodeProps:[["isolate",-2,5,36,""],["openedBy",20,"(",28,"[",31,"{"],["closedBy",21,")",29,"]",32,"}"]],propSources:[hq],skippedNodes:[0,5,106],repeatNodeCount:15,tokenData:"JQ~R!YOX$qX^%i^p$qpq%iqr({rs-ust/itu6Wuv$qvw7Qwx7cxy9Qyz9cz{9h{|:R|}>t}!O?V!O!P?t!P!Q@]!Q![AU![!]BP!]!^B{!^!_C^!_!`DY!`!aDm!a!b$q!b!cEn!c!}$q!}#OG{#O#P$q#P#QH^#Q#R6W#R#o$q#o#pHo#p#q6W#q#rIQ#r#sIc#s#y$q#y#z%i#z$f$q$f$g%i$g#BY$q#BY#BZ%i#BZ$IS$q$IS$I_%i$I_$I|$q$I|$JO%i$JO$JT$q$JT$JU%i$JU$KV$q$KV$KW%i$KW&FU$q&FU&FV%i&FV;'S$q;'S;=`Iz<%lO$q`$tSOy%Qz;'S%Q;'S;=`%c<%lO%Q`%VS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q`%fP;=`<%l%Q~%nh#s~OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Q~'ah#s~!a`OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&F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z!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Q`I}P;=`<%l$q",tokenizers:[fq,dq,cq,uq,1,2,3,4,new Ff("m~RRYZ[z{a~~g~aO#v~~dP!P!Qg~lO#w~~",28,129)],topRules:{StyleSheet:[0,6],Styles:[1,105]},dynamicPrecedences:{76:1},specialized:[{term:124,get:n=>pq[n]||-1},{term:125,get:n=>mq[n]||-1},{term:4,get:n=>gq[n]||-1},{term:25,get:n=>Oq[n]||-1},{term:123,get:n=>vq[n]||-1}],tokenPrec:1963});let Bh=null;function jh(){if(!Bh&&typeof document=="object"&&document.body){let{style:n}=document.body,e=[],t=new Set;for(let r in n)r!="cssText"&&r!="cssFloat"&&typeof n[r]=="string"&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),t.has(r)||(e.push(r),t.add(r)));Bh=e.sort().map(r=>({type:"property",label:r,apply:r+": "}))}return Bh||[]}const m1=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(n=>({type:"class",label:n})),g1=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(n=>({type:"keyword",label:n})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(n=>({type:"constant",label:n}))),yq=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(n=>({type:"type",label:n})),wq=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(n=>({type:"keyword",label:n})),es=/^(\w[\w-]*|-\w[\w-]*|)$/,_q=/^-(-[\w-]*)?$/;function kq(n,e){var t;if((n.name=="("||n.type.isError)&&(n=n.parent||n),n.name!="ArgList")return!1;let r=(t=n.parent)===null||t===void 0?void 0:t.firstChild;return r?.name!="Callee"?!1:e.sliceString(r.from,r.to)=="var"}const O1=new a2,xq=["Declaration"];function Sq(n){for(let e=n;;){if(e.type.isTop)return e;if(!(e=e.parent))return n}}function Ux(n,e,t){if(e.to-e.from>4096){let r=O1.get(e);if(r)return r;let i=[],s=new Set,o=e.cursor(Vt.IncludeAnonymous);if(o.firstChild())do for(let a of Ux(n,o.node,t))s.has(a.label)||(s.add(a.label),i.push(a));while(o.nextSibling());return O1.set(e,i),i}else{let r=[],i=new Set;return e.cursor().iterate(s=>{var o;if(t(s)&&s.matchContext(xq)&&((o=s.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let a=n.sliceString(s.from,s.to);i.has(a)||(i.add(a),r.push({label:a,type:"variable"}))}}),r}}const Gx=n=>e=>{let{state:t,pos:r}=e,i=bn(t).resolveInner(r,-1),s=i.type.isError&&i.from==i.to-1&&t.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(s||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:jh(),validFor:es};if(i.name=="ValueName")return{from:i.from,options:g1,validFor:es};if(i.name=="PseudoClassName")return{from:i.from,options:m1,validFor:es};if(n(i)||(e.explicit||s)&&kq(i,t.doc))return{from:n(i)||s?i.from:r,options:Ux(t.doc,Sq(i),n),validFor:_q};if(i.name=="TagName"){for(let{parent:l}=i;l;l=l.parent)if(l.name=="Block")return{from:i.from,options:jh(),validFor:es};return{from:i.from,options:yq,validFor:es}}if(i.name=="AtKeyword")return{from:i.from,options:wq,validFor:es};if(!e.explicit)return null;let o=i.resolve(r),a=o.childBefore(r);return a&&a.name==":"&&o.name=="PseudoClassSelector"?{from:r,options:m1,validFor:es}:a&&a.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:r,options:g1,validFor:es}:o.name=="Block"||o.name=="Styles"?{from:r,options:jh(),validFor:es}:null},Hx=Gx(n=>n.name=="VariableName"),wc=ja.define({name:"css",parser:bq.configure({props:[ll.add({Declaration:of()}),Wc.add({"Block KeyframeList":m2})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function Kx(){return new Xa(wc,wc.data.of({autocomplete:Hx}))}const Aq=Object.freeze(Object.defineProperty({__proto__:null,css:Kx,cssCompletionSource:Hx,cssLanguage:wc,defineCSSCompletionSource:Gx},Symbol.toStringTag,{value:"Module"})),Cq=316,Tq=317,v1=1,Pq=2,Eq=3,$q=4,Qq=318,Lq=320,Mq=321,Dq=5,qq=6,Rq=0,Im=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Jx=125,Iq=59,Nm=47,Nq=42,Bq=43,jq=45,zq=60,Zq=44,Xq=63,Fq=46,Vq=91,Wq=new Mx({start:!1,shift(n,e){return e==Dq||e==qq||e==Lq?n:e==Mq},strict:!1}),Yq=new Zr((n,e)=>{let{next:t}=n;(t==Jx||t==-1||e.context)&&n.acceptToken(Qq)},{contextual:!0,fallback:!0}),Uq=new Zr((n,e)=>{let{next:t}=n,r;Im.indexOf(t)>-1||t==Nm&&((r=n.peek(1))==Nm||r==Nq)||t!=Jx&&t!=Iq&&t!=-1&&!e.context&&n.acceptToken(Cq)},{contextual:!0}),Gq=new Zr((n,e)=>{n.next==Vq&&!e.context&&n.acceptToken(Tq)},{contextual:!0}),Hq=new Zr((n,e)=>{let{next:t}=n;if(t==Bq||t==jq){if(n.advance(),t==n.next){n.advance();let r=!e.context&&e.canShift(v1);n.acceptToken(r?v1:Pq)}}else t==Xq&&n.peek(1)==Fq&&(n.advance(),n.advance(),(n.next<48||n.next>57)&&n.acceptToken(Eq))},{contextual:!0});function zh(n,e){return n>=65&&n<=90||n>=97&&n<=122||n==95||n>=192||!e&&n>=48&&n<=57}const Kq=new Zr((n,e)=>{if(n.next!=zq||!e.dialectEnabled(Rq)||(n.advance(),n.next==Nm))return;let t=0;for(;Im.indexOf(n.next)>-1;)n.advance(),t++;if(zh(n.next,!0)){for(n.advance(),t++;zh(n.next,!1);)n.advance(),t++;for(;Im.indexOf(n.next)>-1;)n.advance(),t++;if(n.next==Zq)return;for(let r=0;;r++){if(r==7){if(!zh(n.next,!0))return;break}if(n.next!="extends".charCodeAt(r))break;n.advance(),t++}}n.acceptToken($q,-t)}),Jq=al({"get set async static":N.modifier,"for while do if else switch try catch finally return throw break continue default case defer":N.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":N.operatorKeyword,"let var const using function class extends":N.definitionKeyword,"import export from":N.moduleKeyword,"with debugger new":N.keyword,TemplateString:N.special(N.string),super:N.atom,BooleanLiteral:N.bool,this:N.self,null:N.null,Star:N.modifier,VariableName:N.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":N.function(N.variableName),VariableDefinition:N.definition(N.variableName),Label:N.labelName,PropertyName:N.propertyName,PrivatePropertyName:N.special(N.propertyName),"CallExpression/MemberExpression/PropertyName":N.function(N.propertyName),"FunctionDeclaration/VariableDefinition":N.function(N.definition(N.variableName)),"ClassDeclaration/VariableDefinition":N.definition(N.className),"NewExpression/VariableName":N.className,PropertyDefinition:N.definition(N.propertyName),PrivatePropertyDefinition:N.definition(N.special(N.propertyName)),UpdateOp:N.updateOperator,"LineComment Hashbang":N.lineComment,BlockComment:N.blockComment,Number:N.number,String:N.string,Escape:N.escape,ArithOp:N.arithmeticOperator,LogicOp:N.logicOperator,BitOp:N.bitwiseOperator,CompareOp:N.compareOperator,RegExp:N.regexp,Equals:N.definitionOperator,Arrow:N.function(N.punctuation),": Spread":N.punctuation,"( )":N.paren,"[ ]":N.squareBracket,"{ }":N.brace,"InterpolationStart InterpolationEnd":N.special(N.brace),".":N.derefOperator,", ;":N.separator,"@":N.meta,TypeName:N.typeName,TypeDefinition:N.definition(N.typeName),"type enum interface implements namespace module declare":N.definitionKeyword,"abstract global Privacy readonly override":N.modifier,"is keyof unique infer asserts":N.operatorKeyword,JSXAttributeValue:N.attributeValue,JSXText:N.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":N.angleBracket,"JSXIdentifier JSXNameSpacedName":N.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":N.attributeName,"JSXBuiltin/JSXIdentifier":N.standard(N.tagName)}),eR={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},tR={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},nR={__proto__:null,"<":193},rR=Va.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GsO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EyO;hQMhO'#FeO;xQ`O'#GsOOQO'#K`'#K`O;}Q`O'#K`O<]Q`O'#G{O<]Q`O'#G|O<]Q`O'#HOO9kQ`O'#HRO=SQ`O'#HUO>kQ`O'#CeO>{Q`O'#HcO?TQ`O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ZQ8k5wQ9X6sQ9]6|Q9g=[Q9m=eQ9n=fQ:o9_Q;W:ZQ;`:mQ<W#SR=v>SR#[WR'Z!el!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}S'V!e-]U*j$|*Z*oS-Y'W'_S0U*k*qQ0^*rQ2u-cQ4v0[R4{0_R({#xQ!fQT-d'`-e]!qQ!r'`-e1o5{Q#p]R'i<VR)f$dY!uQ'`-e1o5{Q'k!rS'u!v!yS'w!z5}S-t'l'mQ-v'nR3T-uT#kZ%eS#jZ%eS%km,oU(g#h#i#lS.Y(h(iQ.^(jQ0t+^Q3Y.ZU3Z.[.]._S7S3[3]R9`7Td#^W#W#Z%h(T(^*Y+Z.T/mr#gZm#h#i#l%e(h(i(j+^.Z.[.]._3[3]7TS*]$x*bQ/t*^Q2U,oQ2l-VQ4`/pQ6q2dQ7s4aQ9W6rT=m'X+[V#aW%h*YU#`W%h*YS(U#W(^U(Z#Z+Z/mS-['X+[T.O(T.TV'^!e%i*ZQ$lfR)x$qT)m$l)nR4V/UT*_$x*bT*h${*YQ0w+fQ1g,VQ3_.fQ5t1iQ6P1qQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:Wq,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[Jq],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&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z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[Uq,Gq,Hq,Kq,2,3,4,5,6,7,8,9,10,11,12,13,14,Yq,new Ff("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new Ff("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:n=>eR[n]||-1},{term:343,get:n=>tR[n]||-1},{term:95,get:n=>nR[n]||-1}],tokenPrec:15201}),WO=[gr("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),gr("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),gr("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),gr("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),gr("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),gr(`try {
161
- \${}
162
- } catch (\${error}) {
163
- \${}
164
- }`,{label:"try",detail:"/ catch block",type:"keyword"}),gr("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),gr(`if (\${}) {
165
- \${}
166
- } else {
167
- \${}
168
- }`,{label:"if",detail:"/ else block",type:"keyword"}),gr(`class \${name} {
169
- constructor(\${params}) {
170
- \${}
171
- }
172
- }`,{label:"class",detail:"definition",type:"keyword"}),gr('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),gr('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],eS=WO.concat([gr("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),gr("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),gr("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),b1=new a2,tS=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function wl(n){return(e,t)=>{let r=e.node.getChild("VariableDefinition");return r&&t(r,n),!0}}const iR=["FunctionDeclaration"],sR={FunctionDeclaration:wl("function"),ClassDeclaration:wl("class"),ClassExpression:()=>!0,EnumDeclaration:wl("constant"),TypeAliasDeclaration:wl("type"),NamespaceDeclaration:wl("namespace"),VariableDefinition(n,e){n.matchContext(iR)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function nS(n,e){let t=b1.get(e);if(t)return t;let r=[],i=!0;function s(o,a){let l=n.sliceString(o.from,o.to);r.push({label:l,type:a})}return e.cursor(Vt.IncludeAnonymous).iterate(o=>{if(i)i=!1;else if(o.name){let a=sR[o.name];if(a&&a(o,s)||tS.has(o.name))return!1}else if(o.to-o.from>8192){for(let a of nS(n,o.node))r.push(a);return!1}}),b1.set(e,r),r}const Wf=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,YO=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function rS(n){let e=bn(n.state).resolveInner(n.pos,-1);if(YO.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&Wf.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let r=[];for(let i=e;i;i=i.parent)tS.has(i.name)&&(r=r.concat(nS(n.state.doc,i)));return{options:r,from:t?e.from:n.pos,validFor:Wf}}function Zh(n,e,t){var r;let i=[];for(;;){let s=e.firstChild,o;if(s?.name=="VariableName")return i.push(n(s)),{path:i.reverse(),name:t};if(s?.name=="MemberExpression"&&((r=o=s.lastChild)===null||r===void 0?void 0:r.name)=="PropertyName")i.push(n(o)),e=s;else return null}}function iS(n){let e=r=>n.state.doc.sliceString(r.from,r.to),t=bn(n.state).resolveInner(n.pos,-1);return t.name=="PropertyName"?Zh(e,t.parent,e(t)):(t.name=="."||t.name=="?.")&&t.parent.name=="MemberExpression"?Zh(e,t.parent,""):YO.indexOf(t.name)>-1?null:t.name=="VariableName"||t.to-t.from<20&&Wf.test(e(t))?{path:[],name:e(t)}:t.name=="MemberExpression"?Zh(e,t,""):n.explicit?{path:[],name:""}:null}function oR(n,e){let t=[],r=new Set;for(let i=0;;i++){for(let o of(Object.getOwnPropertyNames||Object.keys)(n)){if(!/^[a-zA-Z_$\xaa-\uffdc][\w$\xaa-\uffdc]*$/.test(o)||r.has(o))continue;r.add(o);let a;try{a=n[o]}catch{continue}t.push({label:o,type:typeof a=="function"?/^[A-Z]/.test(o)?"class":e?"function":"method":e?"variable":"property",boost:-i})}let s=Object.getPrototypeOf(n);if(!s)return t;n=s}}function aR(n){let e=new Map;return t=>{let r=iS(t);if(!r)return null;let i=n;for(let o of r.path)if(i=i[o],!i)return null;let s=e.get(i);return s||e.set(i,s=oR(i,!r.path.length)),{from:t.pos-r.name.length,options:s,validFor:Wf}}}const ri=ja.define({name:"javascript",parser:rR.configure({props:[ll.add({IfStatement:of({except:/^\s*({|else\b)/}),TryStatement:of({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:bL,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:r?1:2)*n.unit},Block:vL({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":of({except:/^\s*{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),Wc.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":m2,BlockComment(n){return{from:n.from+2,to:n.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),sS={test:n=>/^JSX/.test(n.name),facet:Nd({commentTokens:{block:{open:"{/*",close:"*/}"}}})},UO=ri.configure({dialect:"ts"},"typescript"),GO=ri.configure({dialect:"jsx",props:[wO.add(n=>n.isTop?[sS]:void 0)]}),HO=ri.configure({dialect:"jsx ts",props:[wO.add(n=>n.isTop?[sS]:void 0)]},"typescript");let oS=n=>({label:n,type:"keyword"});const aS="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(oS),lR=aS.concat(["declare","implements","private","protected","public"].map(oS));function lS(n={}){let e=n.jsx?n.typescript?HO:GO:n.typescript?UO:ri,t=n.typescript?eS.concat(lR):WO.concat(aS);return new Xa(e,[ri.data.of({autocomplete:FM(YO,ix(t))}),ri.data.of({autocomplete:rS}),n.jsx?cS:[]])}function cR(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function y1(n,e,t=n.length){for(let r=e?.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return n.sliceString(r.from,Math.min(r.to,t));return""}const uR=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),cS=$e.inputHandler.of((n,e,t,r,i)=>{if((uR?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||r!=">"&&r!="/"||!ri.isActiveAt(n.state,e,-1))return!1;let s=i(),{state:o}=s,a=o.changeByRange(l=>{var c;let{head:u}=l,f=bn(o).resolveInner(u-1,-1),d;if(f.name=="JSXStartTag"&&(f=f.parent),!(o.doc.sliceString(u-1,u)!=r||f.name=="JSXAttributeValue"&&f.to>u)){if(r==">"&&f.name=="JSXFragmentTag")return{range:l,changes:{from:u,insert:"</>"}};if(r=="/"&&f.name=="JSXStartCloseTag"){let h=f.parent,g=h.parent;if(g&&h.from==u-2&&((d=y1(o.doc,g.firstChild,u))||((c=g.firstChild)===null||c===void 0?void 0:c.name)=="JSXFragmentTag")){let p=`${d}>`;return{range:pe.cursor(u+p.length,-1),changes:{from:u,insert:p}}}}else if(r==">"){let h=cR(f);if(h&&h.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(u,u+2))&&(d=y1(o.doc,h,u)))return{range:l,changes:{from:u,insert:`</${d}>`}}}}return{range:l}});return a.changes.empty?!1:(n.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function fR(n,e){return e||(e={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},n.getRules().forEach((t,r)=>{var i;!((i=t.meta.docs)===null||i===void 0)&&i.recommended&&(e.rules[r]=2)})),t=>{let{state:r}=t,i=[];for(let{from:s,to:o}of ri.findRegions(r)){let a=r.doc.lineAt(s),l={line:a.number-1,col:s-a.from,pos:s};for(let c of n.verify(r.sliceDoc(s,o),e))i.push(dR(c,r.doc,l))}return i}}function w1(n,e,t,r){return t.line(n+r.line).from+e+(n==1?r.col-1:-1)}function dR(n,e,t){let r=w1(n.line,n.column,e,t),i={from:r,to:n.endLine!=null&&n.endColumn!=1?w1(n.endLine,n.endColumn,e,t):r,message:n.message,source:n.ruleId?"eslint:"+n.ruleId:"eslint",severity:n.severity==1?"warning":"error"};if(n.fix){let{range:s,text:o}=n.fix,a=s[0]+t.pos-r,l=s[1]+t.pos-r;i.actions=[{name:"fix",apply(c,u){c.dispatch({changes:{from:u+a,to:u+l,insert:o},scrollIntoView:!0})}}]}return i}const Cu=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:cS,completionPath:iS,esLint:fR,javascript:lS,javascriptLanguage:ri,jsxLanguage:GO,localCompletionSource:rS,scopeCompletionSource:aR,snippets:WO,tsxLanguage:HO,typescriptLanguage:UO,typescriptSnippets:eS},Symbol.toStringTag,{value:"Module"})),_l=["_blank","_self","_top","_parent"],Xh=["ascii","utf-8","utf-16","latin1","latin1"],Fh=["get","post","put","delete"],Vh=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],$r=["true","false"],Fe={},hR={a:{attrs:{href:null,ping:null,type:null,media:null,target:_l,hreflang:null}},abbr:Fe,address:Fe,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Fe,aside:Fe,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Fe,base:{attrs:{href:null,target:_l}},bdi:Fe,bdo:Fe,blockquote:{attrs:{cite:null}},body:Fe,br:Fe,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Vh,formmethod:Fh,formnovalidate:["novalidate"],formtarget:_l,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Fe,center:Fe,cite:Fe,code:Fe,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:Fe,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Fe,div:Fe,dl:Fe,dt:Fe,em:Fe,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Fe,figure:Fe,footer:Fe,form:{attrs:{action:null,name:null,"accept-charset":Xh,autocomplete:["on","off"],enctype:Vh,method:Fh,novalidate:["novalidate"],target:_l}},h1:Fe,h2:Fe,h3:Fe,h4:Fe,h5:Fe,h6:Fe,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Fe,hgroup:Fe,hr:Fe,html:{attrs:{manifest:null}},i:Fe,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Vh,formmethod:Fh,formnovalidate:["novalidate"],formtarget:_l,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:Fe,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Fe,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:Fe,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Xh,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Fe,noscript:Fe,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Fe,param:{attrs:{name:null,value:null}},pre:Fe,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Fe,rt:Fe,ruby:Fe,samp:Fe,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Xh}},section:Fe,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Fe,source:{attrs:{src:null,type:null,media:null}},span:Fe,strong:Fe,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Fe,summary:Fe,sup:Fe,table:Fe,tbody:Fe,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Fe,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:Fe,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Fe,time:{attrs:{datetime:null}},title:Fe,tr:Fe,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Fe,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:Fe},uS={accesskey:null,class:null,contenteditable:$r,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:$r,autocorrect:$r,autocapitalize:$r,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":$r,"aria-autocomplete":["inline","list","both","none"],"aria-busy":$r,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":$r,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":$r,"aria-hidden":$r,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":$r,"aria-multiselectable":$r,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":$r,"aria-relevant":null,"aria-required":$r,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},fS="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(n=>"on"+n);for(let n of fS)uS[n]=null;class _c{constructor(e,t){this.tags={...hR,...e},this.globalAttrs={...uS,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}_c.default=new _c;function Wa(n,e,t=n.length){if(!e)return"";let r=e.firstChild,i=r&&r.getChild("TagName");return i?n.sliceString(i.from,Math.min(i.to,t)):""}function Ya(n,e=!1){for(;n;n=n.parent)if(n.name=="Element")if(e)e=!1;else return n;return null}function dS(n,e,t){let r=t.tags[Wa(n,Ya(e))];return r?.children||t.allTags}function KO(n,e){let t=[];for(let r=Ya(e);r&&!r.type.isTop;r=Ya(r.parent)){let i=Wa(n,r);if(i&&r.lastChild.name=="CloseTag")break;i&&t.indexOf(i)<0&&(e.name=="EndTag"||e.from>=r.firstChild.to)&&t.push(i)}return t}const hS=/^[:\-\.\w\u00b7-\uffff]*$/;function _1(n,e,t,r,i){let s=/\s*>/.test(n.sliceDoc(i,i+5))?"":">",o=Ya(t,t.name=="StartTag"||t.name=="TagName");return{from:r,to:i,options:dS(n.doc,o,e).map(a=>({label:a,type:"type"})).concat(KO(n.doc,t).map((a,l)=>({label:"/"+a,apply:"/"+a+s,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function k1(n,e,t,r){let i=/\s*>/.test(n.sliceDoc(r,r+5))?"":">";return{from:t,to:r,options:KO(n.doc,e).map((s,o)=>({label:s,apply:s+i,type:"type",boost:99-o})),validFor:hS}}function pR(n,e,t,r){let i=[],s=0;for(let o of dS(n.doc,t,e))i.push({label:"<"+o,type:"type"});for(let o of KO(n.doc,t))i.push({label:"</"+o+">",type:"type",boost:99-s++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function mR(n,e,t,r,i){let s=Ya(t),o=s?e.tags[Wa(n.doc,s)]:null,a=o&&o.attrs?Object.keys(o.attrs):[],l=o&&o.globalAttrs===!1?a:a.length?a.concat(e.globalAttrNames):e.globalAttrNames;return{from:r,to:i,options:l.map(c=>({label:c,type:"property"})),validFor:hS}}function gR(n,e,t,r,i){var s;let o=(s=t.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),a=[],l;if(o){let c=n.sliceDoc(o.from,o.to),u=e.globalAttrs[c];if(!u){let f=Ya(t),d=f?e.tags[Wa(n.doc,f)]:null;u=d?.attrs&&d.attrs[c]}if(u){let f=n.sliceDoc(r,i).toLowerCase(),d='"',h='"';/^['"]/.test(f)?(l=f[0]=='"'?/^[^"]*$/:/^[^']*$/,d="",h=n.sliceDoc(i,i+1)==f[0]?"":f[0],f=f.slice(1),r++):l=/^[^\s<>='"]*$/;for(let g of u)a.push({label:g,apply:d+g+h,type:"constant"})}}return{from:r,to:i,options:a,validFor:l}}function pS(n,e){let{state:t,pos:r}=e,i=bn(t).resolveInner(r,-1),s=i.resolve(r);for(let o=r,a;s==i&&(a=i.childBefore(o));){let l=a.lastChild;if(!l||!l.type.isError||l.from<l.to)break;s=i=a,o=l.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?k1(t,i,i.from,r):_1(t,n,i,i.from,r):i.name=="StartTag"||i.name=="IncompleteTag"?_1(t,n,i,r,r):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?k1(t,i,r,r):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?mR(t,n,i,i.name=="AttributeName"?i.from:r,r):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?gR(t,n,i,i.name=="Is"?r:i.from,r):e.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?pR(t,n,i,r):null}function mS(n){return pS(_c.default,n)}function gS(n){let{extraTags:e,extraGlobalAttributes:t}=n,r=t||e?new _c(e,t):_c.default;return i=>pS(r,i)}const OR=ri.parser.configure({top:"SingleExpression"}),OS=[{tag:"script",attrs:n=>n.type=="text/typescript"||n.lang=="ts",parser:UO.parser},{tag:"script",attrs:n=>n.type=="text/babel"||n.type=="text/jsx",parser:GO.parser},{tag:"script",attrs:n=>n.type=="text/typescript-jsx",parser:HO.parser},{tag:"script",attrs(n){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(n.type)},parser:OR},{tag:"script",attrs(n){return!n.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(n.type)},parser:ri.parser},{tag:"style",attrs(n){return(!n.lang||n.lang=="css")&&(!n.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(n.type))},parser:wc.parser}],vS=[{name:"style",parser:wc.parser.configure({top:"Styles"})}].concat(fS.map(n=>({name:n,parser:ri.parser}))),bS=ja.define({name:"html",parser:VD.configure({props:[ll.add({Element(n){let e=/^(\s*)(<\/)?/.exec(n.textAfter);return n.node.to<=n.pos+e[0].length?n.continue():n.lineIndent(n.node.from)+(e[2]?0:n.unit)},"OpenTag CloseTag SelfClosingTag"(n){return n.column(n.node.from)+n.unit},Document(n){if(n.pos+/\s*/.exec(n.textAfter)[0].length<n.node.to)return n.continue();let e=null,t;for(let r=n.node;;){let i=r.lastChild;if(!i||i.name!="Element"||i.to!=r.to)break;e=r=i}return e&&!((t=e.lastChild)&&(t.name=="CloseTag"||t.name=="SelfClosingTag"))?n.lineIndent(e.from)+n.unit:null}}),Wc.add({Element(n){let e=n.firstChild,t=n.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:t.name=="CloseTag"?t.from:n.to}}}),v2.add({"OpenTag CloseTag":n=>n.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),Kl=bS.configure({wrap:Xx(OS,vS)});function yS(n={}){let e="",t;n.matchClosingTags===!1&&(e="noMatch"),n.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(n.nestedLanguages&&n.nestedLanguages.length||n.nestedAttributes&&n.nestedAttributes.length)&&(t=Xx((n.nestedLanguages||[]).concat(OS),(n.nestedAttributes||[]).concat(vS)));let r=t?bS.configure({wrap:t,dialect:e}):e?Kl.configure({dialect:e}):Kl;return new Xa(r,[Kl.data.of({autocomplete:gS(n)}),n.autoCloseTags!==!1?wS:[],lS().support,Kx().support])}const x1=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),wS=$e.inputHandler.of((n,e,t,r,i)=>{if(n.composing||n.state.readOnly||e!=t||r!=">"&&r!="/"||!Kl.isActiveAt(n.state,e,-1))return!1;let s=i(),{state:o}=s,a=o.changeByRange(l=>{var c,u,f;let d=o.doc.sliceString(l.from-1,l.to)==r,{head:h}=l,g=bn(o).resolveInner(h,-1),p;if(d&&r==">"&&g.name=="EndTag"){let O=g.parent;if(((u=(c=O.parent)===null||c===void 0?void 0:c.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(p=Wa(o.doc,O.parent,h))&&!x1.has(p)){let v=h+(o.doc.sliceString(h,h+1)===">"?1:0),b=`</${p}>`;return{range:l,changes:{from:h,to:v,insert:b}}}}else if(d&&r=="/"&&g.name=="IncompleteCloseTag"){let O=g.parent;if(g.from==h-2&&((f=O.lastChild)===null||f===void 0?void 0:f.name)!="CloseTag"&&(p=Wa(o.doc,O,h))&&!x1.has(p)){let v=h+(o.doc.sliceString(h,h+1)===">"?1:0),b=`${p}>`;return{range:pe.cursor(h+b.length,-1),changes:{from:h,to:v,insert:b}}}}return{range:l}});return a.changes.empty?!1:(n.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),vR=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:wS,html:yS,htmlCompletionSource:mS,htmlCompletionSourceWith:gS,htmlLanguage:Kl},Symbol.toStringTag,{value:"Module"})),_S=Nd({commentTokens:{block:{open:"<!--",close:"-->"}}}),kS=new it,xS=B3.configure({props:[Wc.add(n=>!n.is("Block")||n.is("Document")||Bm(n)!=null||bR(n)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),kS.add(Bm),ll.add({Document:()=>null}),Bs.add({Document:_S})]});function Bm(n){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(n.name);return e?+e[1]:void 0}function bR(n){return n.name=="OrderedList"||n.name=="BulletList"}function yR(n,e){let t=n;for(;;){let r=t.nextSibling,i;if(!r||(i=Bm(r.type))!=null&&i<=e)break;t=r}return t.to}const wR=yL.of((n,e,t)=>{for(let r=bn(n).resolveInner(t,-1);r&&!(r.from<e);r=r.parent){let i=r.type.prop(kS);if(i==null)continue;let s=yR(r,i);if(s>t)return{from:t,to:s}}return null});function JO(n){return new Nr(_S,n,[],"markdown")}const SS=JO(xS),_R=xS.configure([H3,J3,K3,eD,{props:[Wc.add({Table:(n,e)=>({from:e.doc.lineAt(n.from).to,to:n.to})})]}]),kc=JO(_R);function kR(n,e){return t=>{if(t&&n){let r=null;if(t=/\S*/.exec(t)[0],typeof n=="function"?r=n(t):r=te.matchLanguageName(n,t,!0),r instanceof te)return r.support?r.support.language.parser:Bo.getSkippingParser(r.load());if(r)return r.parser}return e?e.parser:null}}class Wh{constructor(e,t,r,i,s,o,a){this.node=e,this.from=t,this.to=r,this.spaceBefore=i,this.spaceAfter=s,this.type=o,this.item=a}blank(e,t=!0){let r=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;r.length<e;)r+=" ";return r}else{for(let i=this.to-this.from-r.length-this.spaceAfter.length;i>0;i--)r+=" ";return r+(t?this.spaceAfter:"")}}marker(e,t){let r=this.node.name=="OrderedList"?String(+CS(this.item,e)[2]+t):"";return this.spaceBefore+r+this.type+this.spaceAfter}}function AS(n,e){let t=[],r=[];for(let i=n;i;i=i.parent){if(i.name=="FencedCode")return r;(i.name=="ListItem"||i.name=="Blockquote")&&t.push(i)}for(let i=t.length-1;i>=0;i--){let s=t[i],o,a=e.lineAt(s.from),l=s.from-a.from;if(s.name=="Blockquote"&&(o=/^ *>( ?)/.exec(a.text.slice(l))))r.push(new Wh(s,l,l+o[0].length,"",o[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(o=/^( *)\d+([.)])( *)/.exec(a.text.slice(l)))){let c=o[3],u=o[0].length;c.length>=4&&(c=c.slice(0,c.length-4),u-=4),r.push(new Wh(s.parent,l,l+u,o[1],c,o[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(o=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(a.text.slice(l)))){let c=o[4],u=o[0].length;c.length>4&&(c=c.slice(0,c.length-4),u-=4);let f=o[2];o[3]&&(f+=o[3].replace(/[xX]/," ")),r.push(new Wh(s.parent,l,l+u,o[1],c,f,s))}}return r}function CS(n,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(n.from,n.from+10))}function Yh(n,e,t,r=0){for(let i=-1,s=n;;){if(s.name=="ListItem"){let a=CS(s,e),l=+a[2];if(i>=0){if(l!=i+1)return;t.push({from:s.from+a[1].length,to:s.from+a[0].length,insert:String(i+2+r)})}i=l}let o=s.nextSibling;if(!o)break;s=o}}function ev(n,e){let t=/^[ \t]*/.exec(n)[0].length;if(!t||e.facet(Vc)!=" ")return n;let r=vs(n,4,t),i="";for(let s=r;s>0;)s>=4?(i+=" ",s-=4):(i+=" ",s--);return i+n.slice(t)}const TS=(n={})=>({state:e,dispatch:t})=>{let r=bn(e),{doc:i}=e,s=null,o=e.changeByRange(a=>{if(!a.empty||!kc.isActiveAt(e,a.from,-1)&&!kc.isActiveAt(e,a.from,1))return s={range:a};let l=a.from,c=i.lineAt(l),u=AS(r.resolveInner(l,-1),i);for(;u.length&&u[u.length-1].from>l-c.from;)u.pop();if(!u.length)return s={range:a};let f=u[u.length-1];if(f.to-f.spaceAfter.length>l-c.from)return s={range:a};let d=l>=f.to-f.spaceAfter.length&&!/\S/.test(c.text.slice(f.to));if(f.item&&d){let v=f.node.firstChild,b=f.node.getChild("ListItem","ListItem");if(v.to>=l||b&&b.to<l||c.from>0&&!/[^\s>]/.test(i.lineAt(c.from-1).text)||n.nonTightLists===!1){let _=u.length>1?u[u.length-2]:null,A,y="";_&&_.item?(A=c.from+_.from,y=_.marker(i,1)):A=c.from+(_?_.to:0);let w=[{from:A,to:l,insert:y}];return f.node.name=="OrderedList"&&Yh(f.item,i,w,-2),_&&_.node.name=="OrderedList"&&Yh(_.item,i,w),{range:pe.cursor(A+y.length),changes:w}}else{let _=A1(u,e,c);return{range:pe.cursor(l+_.length+1),changes:{from:c.from,insert:_+e.lineBreak}}}}if(f.node.name=="Blockquote"&&d&&c.from){let v=i.lineAt(c.from-1),b=/>\s*$/.exec(v.text);if(b&&b.index==f.from){let _=e.changes([{from:v.from+b.index,to:v.to},{from:c.from+f.from,to:c.to}]);return{range:a.map(_),changes:_}}}let h=[];f.node.name=="OrderedList"&&Yh(f.item,i,h);let g=f.item&&f.item.from<c.from,p="";if(!g||/^[\s\d.)\-+*>]*/.exec(c.text)[0].length>=f.to)for(let v=0,b=u.length-1;v<=b;v++)p+=v==b&&!g?u[v].marker(i,1):u[v].blank(v<b?vs(c.text,4,u[v+1].from)-p.length:null);let O=l;for(;O>c.from&&/\s/.test(c.text.charAt(O-c.from-1));)O--;return p=ev(p,e),xR(f.node,e.doc)&&(p=A1(u,e,c)+e.lineBreak+p),h.push({from:O,to:l,insert:e.lineBreak+p}),{range:pe.cursor(O+p.length+1),changes:h}});return s?!1:(t(e.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)},PS=TS();function S1(n){return n.name=="QuoteMark"||n.name=="ListMark"}function xR(n,e){if(n.name!="OrderedList"&&n.name!="BulletList")return!1;let t=n.firstChild,r=n.getChild("ListItem","ListItem");if(!r)return!1;let i=e.lineAt(t.to),s=e.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+(o?0:1)<s.number}function A1(n,e,t){let r="";for(let i=0,s=n.length-2;i<=s;i++)r+=n[i].blank(i<s?vs(t.text,4,n[i+1].from)-r.length:null,i<s);return ev(r,e)}function SR(n,e){let t=n.resolveInner(e,-1),r=e;S1(t)&&(r=t.from,t=t.parent);for(let i;i=t.childBefore(r);)if(S1(i))r=i.from;else if(i.name=="OrderedList"||i.name=="BulletList")t=i.lastChild,r=t.to;else break;return t}const ES=({state:n,dispatch:e})=>{let t=bn(n),r=null,i=n.changeByRange(s=>{let o=s.from,{doc:a}=n;if(s.empty&&kc.isActiveAt(n,s.from)){let l=a.lineAt(o),c=AS(SR(t,o),a);if(c.length){let u=c[c.length-1],f=u.to-u.spaceAfter.length+(u.spaceAfter?1:0);if(o-l.from>f&&!/\S/.test(l.text.slice(f,o-l.from)))return{range:pe.cursor(l.from+f),changes:{from:l.from+f,to:o}};if(o-l.from==f&&(!u.item||l.from<=u.item.from||!/\S/.test(l.text.slice(0,u.to)))){let d=l.from+u.from;if(u.item&&u.node.from<u.item.from&&/\S/.test(l.text.slice(u.from,u.to))){let h=u.blank(vs(l.text,4,u.to)-vs(l.text,4,u.from));return d==l.from&&(h=ev(h,n)),{range:pe.cursor(d+h.length),changes:{from:d,to:l.from+u.to,insert:h}}}if(d<o)return{range:pe.cursor(d),changes:{from:d,to:o}}}}}return r={range:s}});return r?!1:(e(n.update(i,{scrollIntoView:!0,userEvent:"delete"})),!0)},$S=[{key:"Enter",run:PS},{key:"Backspace",run:ES}],QS=yS({matchClosingTags:!1});function Ua(n={}){let{codeLanguages:e,defaultCodeLanguage:t,addKeymap:r=!0,base:{parser:i}=SS,completeHTMLTags:s=!0,pasteURLAsLink:o=!0,htmlTagLanguage:a=QS}=n;if(!(i instanceof Fd))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=n.extensions?[n.extensions]:[],c=[a.support,wR],u;o&&c.push(LS),t instanceof Xa?(c.push(t.support),u=t.language):t&&(u=t);let f=e||u?kR(e,u):void 0;l.push(z3({codeParser:f,htmlParser:a.language.parser})),r&&c.push(io.high(Vo.of($S)));let d=JO(i.configure(l));return s&&c.push(d.data.of({autocomplete:AR})),new Xa(d,c)}function AR(n){let{state:e,pos:t}=n,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(t-25,t));if(!r)return null;let i=bn(e).resolveInner(t,-1);for(;i&&!i.type.isTop;){if(i.name=="CodeBlock"||i.name=="FencedCode"||i.name=="ProcessingInstructionBlock"||i.name=="CommentBlock"||i.name=="Link"||i.name=="Image")return null;i=i.parent}return{from:t-r[0].length,to:t,options:CR(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let Uh=null;function CR(){if(Uh)return Uh;let n=mS(new QO(Lt.create({extensions:QS}),0,!0));return Uh=n?n.options:[]}const TR=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,LS=$e.domEventHandlers({paste:(n,e)=>{var t;let{main:r}=e.state.selection;if(r.empty)return!1;let i=(t=n.clipboardData)===null||t===void 0?void 0:t.getData("text/plain");if(!i||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(i)||(/^www\./.test(i)&&(i="https://"+i),!kc.isActiveAt(e.state,r.from,1)))return!1;let s=bn(e.state),o=!1;return s.iterate({from:r.from,to:r.to,enter:a=>{(a.from>r.from||TR.test(a.name))&&(o=!0)},leave:a=>{a.to<r.to&&(o=!0)}}),o?!1:(e.dispatch({changes:[{from:r.from,insert:"["},{from:r.to,insert:`](${i})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}}),PR=Object.freeze(Object.defineProperty({__proto__:null,commonmarkLanguage:SS,deleteMarkupBackward:ES,insertNewlineContinueMarkup:PS,insertNewlineContinueMarkupCommand:TS,markdown:Ua,markdownKeymap:$S,markdownLanguage:kc,pasteURLAsLink:LS},Symbol.toStringTag,{value:"Module"})),C1=typeof String.prototype.normalize=="function"?n=>n.normalize("NFKD"):n=>n;class Ga{constructor(e,t,r=0,i=e.length,s,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=s?a=>s(C1(a)):C1,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Ms(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=Z_(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=mo(e);let i=this.normalize(t);if(i.length)for(let s=0,o=r;;s++){let a=i.charCodeAt(s),l=this.match(a,o,this.bufferPos+this.bufferStart);if(s==i.length-1){if(l)return this.value=l,this;break}o==r&&s<t.length&&t.charCodeAt(s)==a&&o++}}}match(e,t,r){let i=null;for(let s=0;s<this.matches.length;s+=2){let o=this.matches[s],a=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?i={from:this.matches[s+1],to:r}:(this.matches[s]++,a=!0)),a||(this.matches.splice(s,2),s-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?i={from:t,to:r}:this.matches.push(1,t)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol<"u"&&(Ga.prototype[Symbol.iterator]=function(){return this});const MS={from:-1,to:-1,match:/.*/.exec("")},tv="gm"+(/x/.unicode==null?"":"u");class DS{constructor(e,t,r,i=0,s=e.length){if(this.text=e,this.to=s,this.curLine="",this.done=!1,this.value=MS,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new qS(e,t,r,i,s);this.re=new RegExp(t,tv+(r?.ignoreCase?"i":"")),this.test=r?.test,this.iter=e.iter();let o=e.lineAt(i);this.curLineStart=o.from,this.matchPos=Yf(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let r=this.curLineStart+t.index,i=r+t[0].length;if(this.matchPos=Yf(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const Gh=new WeakMap;class Ea{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,r){let i=Gh.get(e);if(!i||i.from>=r||i.to<=t){let a=new Ea(t,e.sliceString(t,r));return Gh.set(e,a),a}if(i.from==t&&i.to==r)return i;let{text:s,from:o}=i;return o>t&&(s=e.sliceString(t,o)+s,o=t),i.to<r&&(s+=e.sliceString(i.to,r)),Gh.set(e,new Ea(o,s)),new Ea(t,s.slice(t-o,r-o))}}class qS{constructor(e,t,r,i,s){this.text=e,this.to=s,this.done=!1,this.value=MS,this.matchPos=Yf(e,i),this.re=new RegExp(t,tv+(r?.ignoreCase?"i":"")),this.test=r?.test,this.flat=Ea.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let r=this.flat.from+t.index,i=r+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this.matchPos=Yf(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Ea.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(DS.prototype[Symbol.iterator]=qS.prototype[Symbol.iterator]=function(){return this});function ER(n){try{return new RegExp(n,tv),!0}catch{return!1}}function Yf(n,e){if(e>=n.length)return e;let t=n.lineAt(e),r;for(;e<t.to&&(r=t.text.charCodeAt(e-t.from))>=56320&&r<57344;)e++;return e}const $R=n=>{let{state:e}=n,t=String(e.doc.lineAt(n.state.selection.main.head).number),{close:r,result:i}=T5(n,{label:e.phrase("Go to line"),input:{type:"text",name:"line",value:t},focus:!0,submitLabel:e.phrase("go")});return i.then(s=>{let o=s&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(s.elements.line.value);if(!o){n.dispatch({effects:r});return}let a=e.doc.lineAt(e.selection.main.head),[,l,c,u,f]=o,d=u?+u.slice(1):0,h=c?+c:a.number;if(c&&f){let O=h/100;l&&(O=O*(l=="-"?-1:1)+a.number/e.doc.lines),h=Math.round(e.doc.lines*O)}else c&&l&&(h=h*(l=="-"?-1:1)+a.number);let g=e.doc.line(Math.max(1,Math.min(e.doc.lines,h))),p=pe.cursor(g.from+Math.max(0,Math.min(d,g.length)));n.dispatch({effects:[r,$e.scrollIntoView(p.from,{y:"center"})],selection:p})}),!0},QR={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},LR=Be.define({combine(n){return jc(n,QR,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function RS(n){return[IR,RR]}const MR=gt.mark({class:"cm-selectionMatch"}),DR=gt.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function T1(n,e,t,r){return(t==0||n(e.sliceDoc(t-1,t))!=An.Word)&&(r==e.doc.length||n(e.sliceDoc(r,r+1))!=An.Word)}function qR(n,e,t,r){return n(e.sliceDoc(t,t+1))==An.Word&&n(e.sliceDoc(r-1,r))==An.Word}const RR=cr.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(LR),{state:t}=n,r=t.selection;if(r.ranges.length>1)return gt.none;let i=r.main,s,o=null;if(i.empty){if(!e.highlightWordAroundCursor)return gt.none;let l=t.wordAt(i.head);if(!l)return gt.none;o=t.charCategorizer(i.head),s=t.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l<e.minSelectionLength||l>200)return gt.none;if(e.wholeWords){if(s=t.sliceDoc(i.from,i.to),o=t.charCategorizer(i.head),!(T1(o,t,i.from,i.to)&&qR(o,t,i.from,i.to)))return gt.none}else if(s=t.sliceDoc(i.from,i.to),!s)return gt.none}let a=[];for(let l of n.visibleRanges){let c=new Ga(t.doc,s,l.from,l.to);for(;!c.next().done;){let{from:u,to:f}=c.value;if((!o||T1(o,t,u,f))&&(i.empty&&u<=i.from&&f>=i.to?a.push(DR.range(u,f)):(u>=i.to||f<=i.from)&&a.push(MR.range(u,f)),a.length>e.maxMatches))return gt.none}}return gt.set(a)}},{decorations:n=>n.decorations}),IR=$e.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),NR=({state:n,dispatch:e})=>{let{selection:t}=n,r=pe.create(t.ranges.map(i=>n.wordAt(i.head)||pe.cursor(i.head)),t.mainIndex);return r.eq(t)?!1:(e(n.update({selection:r})),!0)};function BR(n,e){let{main:t,ranges:r}=n.selection,i=n.wordAt(t.head),s=i&&i.from==t.from&&i.to==t.to;for(let o=!1,a=new Ga(n.doc,e,r[r.length-1].to);;)if(a.next(),a.done){if(o)return null;a=new Ga(n.doc,e,0,Math.max(0,r[r.length-1].from-1)),o=!0}else{if(o&&r.some(l=>l.from==a.value.from))continue;if(s){let l=n.wordAt(a.value.from);if(!l||l.from!=a.value.from||l.to!=a.value.to)continue}return a.value}}const jR=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(s=>s.from===s.to))return NR({state:n,dispatch:e});let r=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(s=>n.sliceDoc(s.from,s.to)!=r))return!1;let i=BR(n,r);return i?(e(n.update({selection:n.selection.addRange(pe.range(i.from,i.to),!1),effects:$e.scrollIntoView(i.to)})),!0):!1},dl=Be.define({combine(n){return jc(n,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new eI(e),scrollToMatch:e=>$e.scrollIntoView(e)})}});class IS{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||ER(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,r)=>r=="n"?`
173
- `:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new WR(this):new XR(this)}getCursor(e,t=0,r){let i=e.doc?e:Lt.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?oa(this,i,t,r):sa(this,i,t,r)}}class NS{constructor(e){this.spec=e}}function zR(n,e,t){return(r,i,s,o)=>{if(t&&!t(r,i,s,o))return!1;let a=r>=o&&i<=o+s.length?s.slice(r-o,i-o):e.doc.sliceString(r,i);return n(a,e,r,i)}}function sa(n,e,t,r){let i;return n.wholeWord&&(i=ZR(e.doc,e.charCategorizer(e.selection.main.head))),n.test&&(i=zR(n.test,e,i)),new Ga(e.doc,n.unquoted,t,r,n.caseSensitive?void 0:s=>s.toLowerCase(),i)}function ZR(n,e){return(t,r,i,s)=>((s>t||s+i.length<r)&&(s=Math.max(0,t-2),i=n.sliceString(s,Math.min(n.length,r+2))),(e(Uf(i,t-s))!=An.Word||e(Gf(i,t-s))!=An.Word)&&(e(Gf(i,r-s))!=An.Word||e(Uf(i,r-s))!=An.Word))}class XR extends NS{constructor(e){super(e)}nextMatch(e,t,r){let i=sa(this.spec,e,r,e.doc.length).nextOverlapping();if(i.done){let s=Math.min(e.doc.length,t+this.spec.unquoted.length);i=sa(this.spec,e,0,s).nextOverlapping()}return i.done||i.value.from==t&&i.value.to==r?null:i.value}prevMatchInRange(e,t,r){for(let i=r;;){let s=Math.max(t,i-1e4-this.spec.unquoted.length),o=sa(this.spec,e,s,i),a=null;for(;!o.nextOverlapping().done;)a=o.value;if(a)return a;if(s==t)return null;i-=1e4}}prevMatch(e,t,r){let i=this.prevMatchInRange(e,0,t);return i||(i=this.prevMatchInRange(e,Math.max(0,r-this.spec.unquoted.length),e.doc.length)),i&&(i.from!=t||i.to!=r)?i:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let r=sa(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let s=sa(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}function FR(n,e,t){return(r,i,s)=>(!t||t(r,i,s))&&n(s[0],e,r,i)}function oa(n,e,t,r){let i;return n.wholeWord&&(i=VR(e.charCategorizer(e.selection.main.head))),n.test&&(i=FR(n.test,e,i)),new DS(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:i},t,r)}function Uf(n,e){return n.slice(Zn(n,e,!1),e)}function Gf(n,e){return n.slice(e,Zn(n,e))}function VR(n){return(e,t,r)=>!r[0].length||(n(Uf(r.input,r.index))!=An.Word||n(Gf(r.input,r.index))!=An.Word)&&(n(Gf(r.input,r.index+r[0].length))!=An.Word||n(Uf(r.input,r.index+r[0].length))!=An.Word)}class WR extends NS{nextMatch(e,t,r){let i=oa(this.spec,e,r,e.doc.length).next();return i.done&&(i=oa(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,r){for(let i=1;;i++){let s=Math.max(t,r-i*1e4),o=oa(this.spec,e,s,r),a=null;for(;!o.next().done;)a=o.value;if(a&&(s==t||a.from>s+10))return a;if(s==t)return null}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,r)=>{if(r=="&")return e.match[0];if(r=="$")return"$";for(let i=r.length;i>0;i--){let s=+r.slice(0,i);if(s>0&&s<e.match.length)return e.match[s]+r.slice(i)}return t})}matchAll(e,t){let r=oa(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let s=oa(this.spec,e,Math.max(0,t-250),Math.min(r+250,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}const xc=qt.define(),nv=qt.define(),Vs=li.define({create(n){return new Hh(jm(n).create(),null)},update(n,e){for(let t of e.effects)t.is(xc)?n=new Hh(t.value.create(),n.panel):t.is(nv)&&(n=new Hh(n.query,t.value?rv:null));return n},provide:n=>Mf.from(n,e=>e.panel)});class Hh{constructor(e,t){this.query=e,this.panel=t}}const YR=gt.mark({class:"cm-searchMatch"}),UR=gt.mark({class:"cm-searchMatch cm-searchMatch-selected"}),GR=cr.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(Vs))}update(n){let e=n.state.field(Vs);(e!=n.startState.field(Vs)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return gt.none;let{view:t}=this,r=new qo;for(let i=0,s=t.visibleRanges,o=s.length;i<o;i++){let{from:a,to:l}=s[i];for(;i<o-1&&l>s[i+1].from-500;)l=s[++i].to;n.highlight(t.state,a,l,(c,u)=>{let f=t.state.selection.ranges.some(d=>d.from==c&&d.to==u);r.add(c,u,f?UR:YR)})}return r.finish()}},{decorations:n=>n.decorations});function Gc(n){return e=>{let t=e.state.field(Vs,!1);return t&&t.query.spec.valid?n(e,t):zS(e)}}const Hf=Gc((n,{query:e})=>{let{to:t}=n.state.selection.main,r=e.nextMatch(n.state,t,t);if(!r)return!1;let i=pe.single(r.from,r.to),s=n.state.facet(dl);return n.dispatch({selection:i,effects:[iv(n,r),s.scrollToMatch(i.main,n)],userEvent:"select.search"}),jS(n),!0}),Kf=Gc((n,{query:e})=>{let{state:t}=n,{from:r}=t.selection.main,i=e.prevMatch(t,r,r);if(!i)return!1;let s=pe.single(i.from,i.to),o=n.state.facet(dl);return n.dispatch({selection:s,effects:[iv(n,i),o.scrollToMatch(s.main,n)],userEvent:"select.search"}),jS(n),!0}),HR=Gc((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:pe.create(t.map(r=>pe.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),KR=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:r,to:i}=t.main,s=[],o=0;for(let a=new Ga(n.doc,n.sliceDoc(r,i));!a.next().done;){if(s.length>1e3)return!1;a.value.from==r&&(o=s.length),s.push(pe.range(a.value.from,a.value.to))}return e(n.update({selection:pe.create(s,o),userEvent:"select.search.matches"})),!0},P1=Gc((n,{query:e})=>{let{state:t}=n,{from:r,to:i}=t.selection.main;if(t.readOnly)return!1;let s=e.nextMatch(t,r,r);if(!s)return!1;let o=s,a=[],l,c,u=[];o.from==r&&o.to==i&&(c=t.toText(e.getReplacement(o)),a.push({from:o.from,to:o.to,insert:c}),o=e.nextMatch(t,o.from,o.to),u.push($e.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(r).number)+".")));let f=n.state.changes(a);return o&&(l=pe.single(o.from,o.to).map(f),u.push(iv(n,o)),u.push(t.facet(dl).scrollToMatch(l.main,n))),n.dispatch({changes:f,selection:l,effects:u,userEvent:"input.replace"}),!0}),JR=Gc((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(i=>{let{from:s,to:o}=i;return{from:s,to:o,insert:e.getReplacement(i)}});if(!t.length)return!1;let r=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:$e.announce.of(r),userEvent:"input.replace.all"}),!0});function rv(n){return n.state.facet(dl).createPanel(n)}function jm(n,e){var t,r,i,s,o;let a=n.selection.main,l=a.empty||a.to>a.from+100?"":n.sliceDoc(a.from,a.to);if(e&&!l)return e;let c=n.facet(dl);return new IS({search:((t=e?.literal)!==null&&t!==void 0?t:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(r=e?.caseSensitive)!==null&&r!==void 0?r:c.caseSensitive,literal:(i=e?.literal)!==null&&i!==void 0?i:c.literal,regexp:(s=e?.regexp)!==null&&s!==void 0?s:c.regexp,wholeWord:(o=e?.wholeWord)!==null&&o!==void 0?o:c.wholeWord})}function BS(n){let e=Kk(n,rv);return e&&e.dom.querySelector("[main-field]")}function jS(n){let e=BS(n);e&&e==n.root.activeElement&&e.select()}const zS=n=>{let e=n.state.field(Vs,!1);if(e&&e.panel){let t=BS(n);if(t&&t!=n.root.activeElement){let r=jm(n.state,e.query.spec);r.valid&&n.dispatch({effects:xc.of(r)}),t.focus(),t.select()}}else n.dispatch({effects:[nv.of(!0),e?xc.of(jm(n.state,e.query.spec)):qt.appendConfig.of(nI)]});return!0},ZS=n=>{let e=n.state.field(Vs,!1);if(!e||!e.panel)return!1;let t=Kk(n,rv);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:nv.of(!1)}),!0},XS=[{key:"Mod-f",run:zS,scope:"editor search-panel"},{key:"F3",run:Hf,shift:Kf,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Hf,shift:Kf,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:ZS,scope:"editor search-panel"},{key:"Mod-Shift-l",run:KR},{key:"Mod-Alt-g",run:$R},{key:"Mod-d",run:jR,preventDefault:!0}];class eI{constructor(e){this.view=e;let t=this.query=e.state.field(Vs).query.spec;this.commit=this.commit.bind(this),this.searchField=jn("input",{value:t.search,placeholder:Qr(e,"Find"),"aria-label":Qr(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=jn("input",{value:t.replace,placeholder:Qr(e,"Replace"),"aria-label":Qr(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=jn("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=jn("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=jn("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function r(i,s,o){return jn("button",{class:"cm-button",name:i,onclick:s,type:"button"},o)}this.dom=jn("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>Hf(e),[Qr(e,"next")]),r("prev",()=>Kf(e),[Qr(e,"previous")]),r("select",()=>HR(e),[Qr(e,"all")]),jn("label",null,[this.caseField,Qr(e,"match case")]),jn("label",null,[this.reField,Qr(e,"regexp")]),jn("label",null,[this.wordField,Qr(e,"by word")]),...e.state.readOnly?[]:[jn("br"),this.replaceField,r("replace",()=>P1(e),[Qr(e,"replace")]),r("replaceAll",()=>JR(e),[Qr(e,"replace all")])],jn("button",{name:"close",onclick:()=>ZS(e),"aria-label":Qr(e,"close"),type:"button"},["×"])])}commit(){let e=new IS({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:xc.of(e)}))}keydown(e){v5(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Kf:Hf)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),P1(this.view))}update(e){for(let t of e.transactions)for(let r of t.effects)r.is(xc)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(dl).top}}function Qr(n,e){return n.state.phrase(e)}const Tu=30,Pu=/[\s\.,:;?!]/;function iv(n,{from:e,to:t}){let r=n.state.doc.lineAt(e),i=n.state.doc.lineAt(t).to,s=Math.max(r.from,e-Tu),o=Math.min(i,t+Tu),a=n.state.sliceDoc(s,o);if(s!=r.from){for(let l=0;l<Tu;l++)if(!Pu.test(a[l+1])&&Pu.test(a[l])){a=a.slice(l);break}}if(o!=i){for(let l=a.length-1;l>a.length-Tu;l--)if(!Pu.test(a[l-1])&&Pu.test(a[l])){a=a.slice(0,l);break}}return $e.announce.of(`${n.state.phrase("current match")}. ${a} ${n.state.phrase("on line")} ${r.number}.`)}const tI=$e.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),nI=[Vs,io.low(GR),tI];function rI(n){return n.replace(/\$\{\d+\|([^,}]+)[^}]*\}/g,"$1").replace(/\$\{\d+:([^}]*)}/g,"$1").replace(/\$\d+/g,"")}function iI(n){if(n.snippet&&n.snippet.length>0)return n.snippet.map(rI).join(`
174
- `);const e=[];for(const[r,i]of Object.entries(n.attributes))if(i.required){const s=i.values?.[0]??"";e.push(`${r}="${s}"`)}const t=e.length>0?" "+e.join(" "):"";return n.selfClosing?`{% ${n.name}${t} /%}`:`{% ${n.name}${t} %}
175
-
176
- {% /${n.name} %}`}function zm(n){return e=>{const t=e.matchBefore(/\/\w*/);if(!t||t.from>0&&e.state.doc.sliceString(t.from-1,t.from).trim()!=="")return null;const r=n();if(r.length===0)return null;const i=t.from,s=r.map(o=>({label:o.name,detail:o.category,info:o.description,section:o.category,type:"keyword",apply:(a,l,c,u)=>{const f=iI(o);a.dispatch({changes:{from:i,to:u,insert:f},selection:{anchor:o.selfClosing?i+f.indexOf("/%}"):i+f.indexOf("%}")+2+1}})}}));return{from:i+1,options:s,filter:!0}}}function sI(n,e){const t=n.slice(Math.max(0,e-500),e),r=t.lastIndexOf("%}"),i=t.lastIndexOf("{%");if(i===-1||r!==-1&&r>i)return null;const s=t.slice(i+2).trimStart();if(s.startsWith("/"))return null;const o=s.match(/^(\w[\w-]*)/);if(!o)return null;const a=o[1],c=s.slice(o[0].length).match(/(\w[\w-]*)="[^"]*$/);if(c){const u=t.lastIndexOf('="');return{tagName:a,attrName:c[1],valueStart:Math.max(0,e-500)+u+2}}return{tagName:a}}function oI(n,e,t){const r=t.design;if(!r?.contexts)return[];const i=Object.keys(r.contexts);return n==="sandbox"&&e==="context"||n==="design-context"&&e==="scope"?i:[]}function Zm(n,e){return t=>{const r=t.state.doc.toString(),i=t.pos,s=sI(r,i);if(!s)return null;const o=n(),a=new Map;for(const h of o){a.set(h.name,h);for(const g of h.aliases)a.set(g,h)}const l=a.get(s.tagName);if(!l)return null;if(s.attrName&&s.valueStart!==void 0){const h=l.attributes[s.attrName];if(h?.values?.length)return{from:s.valueStart,options:h.values.map(p=>({label:p,type:"enum"})),filter:!0};const g=e?oI(s.tagName,s.attrName,e()):[];return g.length?{from:s.valueStart,options:g.map(p=>({label:p,type:"variable"})),filter:!0}:null}const c=t.matchBefore(/\w*/);if(!c||!t.explicit&&c.from===c.to)return null;const u=r.slice(Math.max(0,i-500),i),f=new Set([...u.matchAll(/(\w[\w-]*)="/g)].map(h=>h[1])),d=Object.entries(l.attributes).filter(([h])=>!f.has(h)).map(([h,g])=>({label:h,detail:g.required?"required":void 0,type:"property",apply:`${h}="`,boost:g.required?1:0}));return d.length===0?null:{from:c.from,options:d,filter:!0}}}const aI=gt.mark({class:"cm-markdoc-tag"}),E1=gt.mark({class:"cm-markdoc-bracket"}),lI=gt.mark({class:"cm-markdoc-name"}),$1=/\{%\s*(\/?)(\w[\w-]*)((?:\s+[^%]*)?)(\/?)\s*%\}/g;function Q1(n){const e=[];for(const{from:r,to:i}of n.visibleRanges){const s=n.state.doc.sliceString(r,i);$1.lastIndex=0;let o;for(;(o=$1.exec(s))!==null;){const a=r+o.index,l=a+o[0].length;e.push({from:a,to:l,deco:aI}),e.push({from:a,to:a+2,deco:E1}),e.push({from:l-2,to:l,deco:E1});const c=o[1],u=o[2],f=o[0].indexOf(c+u,2),d=a+f+c.length;e.push({from:d,to:d+u.length,deco:lI})}}e.sort((r,i)=>r.from-i.from||r.to-i.to);const t=new qo;for(const r of e)t.add(r.from,r.to,r.deco);return t.finish()}const cI=cr.fromClass(class{decorations;constructor(n){this.decorations=Q1(n)}update(n){(n.docChanged||n.viewportChanged)&&(this.decorations=Q1(n.view))}},{decorations:n=>n.decorations});function Sc(){return cI}const uI=$e.theme({"&":{backgroundColor:"#f8fafc",color:"#1a1a2e",fontSize:"13px",height:"100%"},".cm-scroller":{overflow:"auto",fontFamily:"'SF Mono', 'Fira Code', ui-monospace, monospace",lineHeight:"1.6"},".cm-content":{padding:"1rem 0",caretColor:"#1e293b"},".cm-gutters":{backgroundColor:"#f8fafc",color:"#94a3b8",border:"none",paddingRight:"0.5rem"},".cm-activeLineGutter":{backgroundColor:"#e2e8f0",color:"#64748b"},".cm-activeLine":{backgroundColor:"rgba(0, 0, 0, 0.03)"},".cm-cursor":{borderLeftColor:"#1e293b"},"&.cm-focused .cm-selectionBackground, ::selection":{backgroundColor:"rgba(14, 165, 233, 0.2)"},".cm-selectionBackground":{backgroundColor:"rgba(14, 165, 233, 0.12)"},"&.cm-focused":{outline:"none"},".cm-tooltip.cm-tooltip-autocomplete":{border:"1px solid #e2e8f0",borderRadius:"6px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.12)",backgroundColor:"#ffffff",overflow:"hidden"},".cm-tooltip.cm-tooltip-autocomplete ul":{fontFamily:"system-ui, -apple-system, sans-serif",fontSize:"12px",maxHeight:"280px"},".cm-tooltip.cm-tooltip-autocomplete ul li":{padding:"4px 8px",borderBottom:"1px solid #f1f5f9"},".cm-tooltip.cm-tooltip-autocomplete ul li[aria-selected]":{backgroundColor:"#f0f9ff",color:"#0369a1"},".cm-tooltip.cm-completionInfo":{border:"1px solid #e2e8f0",borderRadius:"6px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.08)",backgroundColor:"#ffffff",padding:"6px 10px",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:"12px",color:"#475569",maxWidth:"300px"},".cm-completionDetail":{color:"#94a3b8",fontStyle:"normal",marginLeft:"0.5em"},".cm-markdoc-tag":{backgroundColor:"rgba(217, 119, 6, 0.06)",borderRadius:"2px"},".cm-markdoc-bracket":{color:"#94a3b8"},".cm-markdoc-name":{color:"#d97706",fontWeight:"600"}},{dark:!1}),FS=cl.define([{tag:N.heading1,color:"#0369a1",fontWeight:"bold",fontSize:"1.4em"},{tag:N.heading2,color:"#0369a1",fontWeight:"bold",fontSize:"1.2em"},{tag:N.heading3,color:"#0369a1",fontWeight:"bold",fontSize:"1.1em"},{tag:N.heading,color:"#0369a1",fontWeight:"bold"},{tag:N.emphasis,color:"#9333ea",fontStyle:"italic"},{tag:N.strong,color:"#9333ea",fontWeight:"bold"},{tag:N.link,color:"#0ea5e9",textDecoration:"underline"},{tag:N.url,color:"#0ea5e9"},{tag:N.quote,color:"#64748b"},{tag:N.monospace,color:"#16a34a"},{tag:N.processingInstruction,color:"#d97706"},{tag:N.meta,color:"#94a3b8"},{tag:N.comment,color:"#94a3b8"},{tag:N.punctuation,color:"#94a3b8"}]);var fI=V('<div class="md-editor__empty svelte-12tkyig"><span class="md-editor__empty-text svelte-12tkyig">Select a file to edit</span></div>'),dI=V("<div></div> <!>",1);function VS(n,e){Ot(e,!0);let t,r;hn(()=>{if(!t)return;const c=Lt.create({doc:Sr(()=>X.bodyContent),extensions:[I5(),j5(),w5(),TO(),Ua(),uI,pc(FS),RS(),Vo.of([...$O,...PO,...XS,{key:"Mod-/",run:u=>(Ul(u),!0)}]),$e.updateListener.of(u=>{u.docChanged&&X.updateBody(u.state.doc.toString())}),$e.lineWrapping,Sc(),$m({override:[zm(()=>X.runes),Zm(()=>X.runes,()=>X.aggregated)],icons:!1})]});return r=new $e({state:c,parent:t}),()=>{r?.destroy()}}),hn(()=>{const c=X.bodyContent;if(!r)return;const u=r.state.doc.toString();c!==u&&r.dispatch({changes:{from:0,to:r.state.doc.length,insert:c}})});var i=dI(),s=ot(i);let o;cn(s,c=>t=c,()=>t);var a=R(s,2);{var l=c=>{var u=fI();j(c,u)};ue(a,c=>{X.currentPath||c(l)})}fe(()=>o=Ze(s,1,"md-editor svelte-12tkyig",null,o,{hidden:!X.currentPath})),j(n,i),vt()}function hI(n){let e=5381;for(let t=0;t<n.length;t++)e=(e<<5)+e+n.charCodeAt(t)>>>0;return e.toString(36)}function ts(n,e){const t=hI(n),r=e.get(t)??0;return e.set(t,r+1),r===0?`blk_${t}`:`blk_${t}_${r}`}const Ac=/^\{%\s+(\w[\w-]*)((?:\s+\w[\w-]*(?:="[^"]*"|=[\w.-]+)?)*)\s*(\/?)\s*%\}/;function WS(n){return new RegExp(`^\\{%\\s+/${n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*%\\}`)}function Jf(n){const e={},t=/(\w[\w-]*)(?:="([^"]*)"|=([\w.-]+))?/g;let r;for(;(r=t.exec(n))!==null;)e[r[1]]=r[2]??r[3]??"true";return e}function pI(n){return n!==""&&!isNaN(Number(n))}function cf(n){const e=[];for(const[t,r]of Object.entries(n))r==="true"?e.push(t):r==="false"||pI(r)?e.push(`${t}=${r}`):e.push(`${t}="${r}"`);return e.length>0?" "+e.join(" "):""}function YS(n){const e=n.split(`
177
- `),t=[],r=new Map;let i=0;for(;i<e.length;){const o=e[i].trimStart();if(o===""){i++;continue}if(o.startsWith("```")||o.startsWith("~~~")){const u=o[0];let f=3;for(;f<o.length&&o[f]===u;)f++;const d=o.slice(0,f),h=o.slice(f).trim(),g=i;i++;const p=[];for(;i<e.length&&!e[i].trimStart().startsWith(d);)p.push(e[i]),i++;i<e.length&&i++;const O=e.slice(g,i).join(`
178
- `);t.push({id:ts(O,r),type:"fence",source:O,startLine:g,endLine:i,language:h,code:p.join(`
179
- `)});continue}const a=Ac.exec(o);if(a){const u=a[1],f=a[2]??"",d=a[3]==="/",h=i;if(d){i++;const g=e.slice(h,i).join(`
180
- `);t.push({id:ts(g,r),type:"rune",source:g,startLine:h,endLine:i,runeName:u,selfClosing:!0,attributes:Jf(f),innerContent:""})}else{i++;const g=WS(u),p=[];let O=1;for(;i<e.length;){const b=e[i].trimStart(),_=Ac.exec(b);if(_&&_[1]===u&&_[3]!=="/"&&O++,g.test(b)&&(O--,O===0))break;p.push(e[i]),i++}i<e.length&&i++;const v=e.slice(h,i).join(`
181
- `);t.push({id:ts(v,r),type:"rune",source:v,startLine:h,endLine:i,runeName:u,selfClosing:!1,attributes:Jf(f),innerContent:p.join(`
182
- `)})}continue}const l=o.match(/^(#{1,6})\s+(.*)/);if(l){const u=i;i++;const f=e.slice(u,i).join(`
183
- `);t.push({id:ts(f,r),type:"heading",source:f,startLine:u,endLine:i,level:l[1].length,text:l[2]});continue}if(/^(---+|___+|\*\*\*+)\s*$/.test(o)){const u=i;i++;const f=e.slice(u,i).join(`
184
- `);t.push({id:ts(f,r),type:"hr",source:f,startLine:u,endLine:i});continue}if(/^!\[.*\]\(.*\)\s*$/.test(o)){const u=i;i++;const f=e.slice(u,i).join(`
185
- `);t.push({id:ts(f,r),type:"image",source:f,startLine:u,endLine:i});continue}if(o.startsWith(">")){const u=i;for(;i<e.length&&(e[i].trimStart().startsWith(">")||e[i].trim()!==""&&!ed(e[i]));)i++;const f=e.slice(u,i).join(`
186
- `);t.push({id:ts(f,r),type:"quote",source:f,startLine:u,endLine:i});continue}const c=o.match(/^(\d+\.|[-*+])\s/);if(c){const u=/^\d+\./.test(c[1]),f=i;for(;i<e.length;){const h=e[i].trimStart();if(/^(\d+\.|[-*+])\s/.test(h)||h===""&&i+1<e.length&&/^(\s+|\d+\.|[-*+]\s)/.test(e[i+1])||h!==""&&e[i].startsWith(" "))i++;else break}const d=e.slice(f,i).join(`
187
- `);t.push({id:ts(d,r),type:"list",source:d,startLine:f,endLine:i,ordered:u});continue}{const u=i;for(;i<e.length&&e[i].trim()!==""&&!ed(e[i]);)i++;const f=e.slice(u,i).join(`
188
- `);t.push({id:ts(f,r),type:"paragraph",source:f,startLine:u,endLine:i})}}return t}function ed(n){const e=n.trimStart();return!!(e.startsWith("#")||e.startsWith("```")||e.startsWith("~~~")||Ac.test(e)||/^(---+|___+|\*\*\*+)\s*$/.test(e)||e.startsWith(">")||/^(\d+\.|[-*+])\s/.test(e)||/^!\[.*\]\(.*\)\s*$/.test(e))}function sv(n){if(!n.trim())return[];const e=n.split(`
189
- `),t=[];let r=0;for(;r<e.length;){const s=e[r].trimStart();if(s===""){r++;continue}if(s.startsWith("```")||s.startsWith("~~~")){const l=s[0];let c=3;for(;c<s.length&&s[c]===l;)c++;const u=s.slice(0,c),f=s.slice(c).trim(),d=r;r++;const h=r;for(;r<e.length&&!e[r].trimStart().startsWith(u);)r++;const g=e.slice(h,r).join(`
190
- `);r<e.length&&r++,t.push({type:"fence",label:f?`Code (${f})`:"Code",source:e.slice(d,r).join(`
191
- `),fenceLanguage:f,fenceCode:g});continue}const o=Ac.exec(s);if(o){const l=o[1],c=o[2]??"",u=o[3]==="/",f=r;if(u)r++,t.push({type:"rune",label:l,source:e.slice(f,r).join(`
192
- `),runeName:l,selfClosing:!0,attributes:Jf(c),innerContent:"",children:[]});else{r++;const d=WS(l),h=[];let g=1;for(;r<e.length;){const O=e[r].trimStart(),v=Ac.exec(O);if(v&&v[1]===l&&v[3]!=="/"&&g++,d.test(O)&&(g--,g===0))break;h.push(e[r]),r++}r<e.length&&r++;const p=h.join(`
193
- `);t.push({type:"rune",label:l,source:e.slice(f,r).join(`
194
- `),runeName:l,selfClosing:!1,attributes:Jf(c),innerContent:p,children:sv(p)})}continue}const a=s.match(/^(#{1,6})\s+(.*)/);if(a){const l=a[1].length,c=a[2];r++,t.push({type:"heading",label:`${"#".repeat(l)} ${c}`,source:e.slice(r-1,r).join(`
195
- `),headingLevel:l,headingText:c});continue}if(/^(---+|___+|\*\*\*+)\s*$/.test(s)){r++,t.push({type:"hr",label:"Divider",source:e.slice(r-1,r).join(`
196
- `)});continue}if(/^!\[.*\]\(.*\)\s*$/.test(s)){r++,t.push({type:"image",label:"Image",source:e.slice(r-1,r).join(`
197
- `)});continue}if(s.startsWith(">")){const l=r;for(;r<e.length&&(e[r].trimStart().startsWith(">")||e[r].trim()!==""&&!ed(e[r]));)r++;const c=e.slice(l,r).join(`
198
- `);t.push({type:"quote",label:"Blockquote",source:c});continue}if(/^(\d+\.|[-*+])\s/.test(s)){const l=r,c=/^\d+\./.test(s);for(;r<e.length;){const u=e[r].trimStart();if(/^(\d+\.|[-*+])\s/.test(u)){if(/^\d+\./.test(u)!==c&&r>l)break;r++}else if(u===""&&r+1<e.length&&/^(\s+|\d+\.|[-*+]\s)/.test(e[r+1])){const f=e[r+1].trimStart();if(/^(\d+\.|[-*+])\s/.test(f)&&/^\d+\./.test(f)!==c)break;r++}else if(u!==""&&e[r].startsWith(" "))r++;else break}t.push({type:"list",label:c?"Ordered list":"List",source:e.slice(l,r).join(`
199
- `),listOrdered:c});continue}{const l=r;for(;r<e.length&&e[r].trim()!==""&&!ed(e[r]);)r++;const c=e.slice(l,r).join(`
200
- `),u=c.length>40?c.slice(0,40)+"…":c;t.push({type:"paragraph",label:u,source:c})}}return t}function Eu(n,e,t){const r=n.indexOf(e);return r===-1?n:n.slice(0,r)+t+n.slice(r+e.length)}function US(n){switch(n.includes("|")?n.split("|")[0]:n){case"heading":return"## Heading";case"heading:1":return"# Heading";case"heading:2":return"## Heading";case"heading:3":return"### Heading";case"heading:4":return"#### Heading";case"heading:5":return"##### Heading";case"heading:6":return"###### Heading";case"paragraph":return"Text content";case"list":case"list:unordered":return`- Item 1
201
- - Item 2`;case"list:ordered":return`1. Item 1
202
- 2. Item 2`;case"fence":return"```\ncode\n```";case"image":return"![alt](url)";case"blockquote":case"quote":return"> Quote";case"any":return"Content";default:return"Content"}}function mI(n,e,t,r){const{field:i,fields:s}=oo(e,t,r);if(!i||i.filled)return n;const o=i.template||US(i.match);return e.type==="delimited"&&r?kI(n,e,r,t,s,o):e.type==="sequence"?GS(n,e.fields,t,o):n}function gI(n,e,t,r){const{field:i}=oo(e,t,r);if(!i||!i.filled||i.nodes.length===0)return n;let s=n;for(let o=i.nodes.length-1;o>=0;o--){const a=i.nodes[o].source;s=ov(s,a)}return s=s.replace(/\n{3,}/g,`
203
-
204
- `),s}function OI(n,e,t,r){const{field:i}=oo(e,t,r);if(!i||!i.filled||i.nodes.length===0)return n;const s=i.template||"- New item",o=i.nodes[i.nodes.length-1],a=n.indexOf(o.source);if(a===-1)return n;let l=s;if(i.match==="list:ordered"){const u=o.source.match(/^(\d+)\./),f=u?parseInt(u[1],10)+1:i.nodes.length+1;l=s.replace(/^\d+\./,`${f}.`)}const c=a+o.source.length;return n.slice(0,c)+`
205
- `+l+n.slice(c)}function vI(n,e,t,r,i){const{field:s}=oo(e,t,i);if(!s||!s.filled||s.nodes.length===0)return n;const o=s.nodes[0],a=Vd(o.source);if(r<0||r>=a.length)return n;if(a.length===1)return ov(n,o.source);const c=a.filter((f,d)=>d!==r).join(`
206
-
207
- `),u=n.indexOf(o.source);return u===-1?n:n.slice(0,u)+c+n.slice(u+o.source.length)}function bI(n,e,t,r,i,s){if(r===i)return n;const{field:o}=oo(e,t,s);if(!o||!o.filled||o.nodes.length===0)return n;const a=o.nodes[0],l=Vd(a.source);if(r<0||r>=l.length||i<0||i>=l.length)return n;const c=[...l],[u]=c.splice(r,1);if(c.splice(i,0,u),o.match==="list:ordered"||/^\d+\.\s/.test(l[0]))for(let g=0;g<c.length;g++)c[g]=c[g].replace(/^\d+\./,`${g+1}.`);const d=c.join(`
208
- `),h=n.indexOf(a.source);return h===-1?n:n.slice(0,h)+d+n.slice(h+a.source.length)}function yI(n,e,t,r){const{field:i}=oo(e,t,r);if(!i||!i.filled||i.nodes.length===0)return n;const s=i.template||US(i.match),o=i.nodes[i.nodes.length-1],a=n.indexOf(o.source);if(a===-1)return n;const l=a+o.source.length;return n.slice(0,l)+`
209
-
210
- `+s+n.slice(l)}function wI(n,e,t,r,i){const{field:s}=oo(e,t,i);if(!s||!s.filled||s.nodes.length===0||r<0||r>=s.nodes.length)return n;const o=s.nodes[r].source;let a=ov(n,o);return a=a.replace(/\n{3,}/g,`
211
-
212
- `),a}function _I(n,e,t,r,i,s){if(r===i)return n;const{field:o}=oo(e,t,s);if(!o||!o.filled||o.nodes.length===0||r<0||r>=o.nodes.length||i<0||i>=o.nodes.length)return n;const l=[...o.nodes.map(O=>O.source)],[c]=l.splice(r,1);l.splice(i,0,c);const u=o.nodes[0].source,f=o.nodes[o.nodes.length-1].source,d=n.indexOf(u),h=n.indexOf(f);if(d===-1||h===-1)return n;const g=h+f.length,p=l.join(`
213
-
214
- `);return n.slice(0,d)+p+n.slice(g)}function Vd(n){const e=n.split(`
215
- `),t=[];let r=[];for(const i of e)/^[-*+]\s|^\d+\.\s/.test(i)&&r.length>0?(t.push(r.join(`
216
- `)),r=[i]):r.push(i);return r.length>0&&t.push(r.join(`
217
- `)),t}function oo(n,e,t){if(n.type==="sequence")return{field:n.fields.find(i=>i.name===e)??null,fields:n.fields};if(n.type==="delimited"&&t){const r=n.zones.find(s=>s.name===t);return r?{field:r.fields.find(s=>s.name===e)??null,fields:r.fields}:{field:null,fields:null}}return{field:null,fields:null}}function ov(n,e){const t=n.indexOf(e);if(t===-1)return n;let r=t,i=t+e.length;for(;r>0&&n[r-1]===`
218
- `;)r--;for(r>0&&r++;i<n.length&&n[i]===`
219
- `;)i++;return n.slice(0,r)+n.slice(i)}function GS(n,e,t,r){const i=e.findIndex(a=>a.name===t);if(i===-1)return n;let s=null;for(let a=i-1;a>=0;a--)if(e[a].filled&&e[a].nodes.length>0){const l=e[a].nodes;s=l[l.length-1];break}if(s){const a=n.indexOf(s.source);if(a!==-1){const l=a+s.source.length;return n.slice(0,l)+`
220
-
221
- `+r+n.slice(l)}}for(let a=i+1;a<e.length;a++)if(e[a].filled&&e[a].nodes.length>0){const l=e[a].nodes[0],c=n.indexOf(l.source);if(c!==-1)return n.slice(0,c)+r+`
222
-
223
- `+n.slice(c)}const o=n.trimEnd();return o+(o?`
224
-
225
- `:"")+r}function kI(n,e,t,r,i,s){const o=e.zones.findIndex(p=>p.name===t);if(o===-1)return n;const a=n.split(`
226
- `),l=[];for(let p=0;p<a.length;p++)a[p].trim()==="---"&&l.push(p);if(o>0&&l.length<o){const p=n.trimEnd(),O=o-l.length;let v="";for(let b=0;b<O;b++)v+=`
227
-
228
- ---`;return p+v+`
229
-
230
- `+s}const c=o===0?0:l[o-1]+1,u=o<l.length?l[o]:a.length,f=a.slice(c,u).join(`
231
- `),d=GS(f,i,r,s),h=a.slice(0,c).join(`
232
- `),g=a.slice(u).join(`
233
- `);return[h,d,g].filter(Boolean).join(`
234
- `)}function Xm(n){return n.map(e=>e.source).join(`
235
-
236
- `)}function Hn(n){const e=cf(n.attributes);if(n.selfClosing)return`{% ${n.runeName}${e} /%}`;const t=n.innerContent.trim();return t?`{% ${n.runeName}${e} %}
237
- ${t}
238
- {% /${n.runeName} %}`:`{% ${n.runeName}${e} %}
239
-
240
- {% /${n.runeName} %}`}function Fm(n){return"#".repeat(n.level)+" "+n.text}function td(n){return"```"+n.language+`
241
- `+n.code+"\n```"}function xI(n){const e=new Map;for(const t of n){e.set(t.name,t);for(const r of t.aliases)e.set(r,t)}return e}function SI(n,e){const t=n.split(`
242
- `),r=new RegExp(`^\\{%\\s+${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b.*%\\}\\s*$`),i=new RegExp(`^\\{%\\s+/${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*%\\}\\s*$`);let s=0,o=t.length;return r.test(t[0].trim())&&(s=1),o>s&&i.test(t[o-1].trim())&&(o-=1),t.slice(s,o).join(`
243
- `).trim()}function av(n){switch(n.type){case"prose":return"Prose";case"heading":return`H${n.level}`;case"rune":return n.runeName;case"fence":{const e=n.language;return e?`Code (${e})`:"Code"}case"list":return n.ordered?"Ordered List":"List";case"quote":return"Blockquote";case"hr":return"Divider";case"image":return"Image";case"paragraph":return"Paragraph";default:return n.type}}function L1(n){const e=[];let t=[];function r(){if(t.length===0)return;const i=t.map(s=>s.source).join(`
244
-
245
- `);e.push({id:`prose_${t[0].id}`,type:"prose",children:[...t],source:i,startLine:t[0].startLine,endLine:t[t.length-1].endLine}),t=[]}for(const i of n)i.type==="rune"?(r(),e.push(i)):t.push(i);return r(),e}var AI=Object.create,Wd=Object.defineProperty,CI=Object.getOwnPropertyDescriptor,TI=Object.getOwnPropertyNames,PI=Object.getPrototypeOf,EI=Object.prototype.hasOwnProperty,HS=n=>Wd(n,"__esModule",{value:!0}),Re=(n,e)=>function(){return e||(0,n[Object.keys(n)[0]])((e={exports:{}}).exports,e),e.exports},KS=(n,e)=>{HS(n);for(var t in e)Wd(n,t,{get:e[t],enumerable:!0})},$I=(n,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of TI(e))!EI.call(n,r)&&r!=="default"&&Wd(n,r,{get:()=>e[r],enumerable:!(t=CI(e,r))||t.enumerable});return n},Yd=n=>$I(HS(Wd(n!=null?AI(PI(n)):{},"default",n&&n.__esModule&&"default"in n?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n),JS=Re({"src/grammar/tag.js"(n,e){function t(s,o){function a(){this.constructor=s}a.prototype=o.prototype,s.prototype=new a}function r(s,o,a,l){this.message=s,this.expected=o,this.found=a,this.location=l,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,r)}t(r,Error),r.buildMessage=function(s,o,a){var l={literal:function(p){return'"'+u(p.text)+'"'},class:function(p){var O=p.parts.map(function(v){return Array.isArray(v)?f(v[0])+"-"+f(v[1]):f(v)});return"["+(p.inverted?"^":"")+O+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(p){return p.description},not:function(p){return"not "+d(p.expected)}};function c(p){return p.charCodeAt(0).toString(16).toUpperCase()}function u(p){return p.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(O){return"\\x0"+c(O)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(O){return"\\x"+c(O)})}function f(p){return p.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(O){return"\\x0"+c(O)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(O){return"\\x"+c(O)})}function d(p){return l[p.type](p)}function h(p){var O=p.map(d),v,b;if(O.sort(),O.length>0){for(v=1,b=1;v<O.length;v++)O[v-1]!==O[v]&&(O[b]=O[v],b++);O.length=b}switch(O.length){case 1:return O[0];case 2:return O[0]+" or "+O[1];default:return O.slice(0,-1).join(", ")+", or "+O[O.length-1]}}function g(p){return p?'"'+u(p)+'"':"end of input"}return"Expected "+h(s)+" but "+g(o)+" found."};function i(s,o){o=o!==void 0?o:{};var a={},l={Top:Le},c=Le,u="/",f=".",d="#",h="=",g="(",p=")",O=",",v="[",b="]",_="null",A="true",y="false",w="{",S="}",C=":",x='"',k="\\",E="n",T="r",$="t",M=/^[$@]/,P=/^[0-9]/,D=/^[^\0-\x1F"\\]/,I=/^[a-zA-Z0-9_\-]/,W=/^[ \n\t]/,U=Ln("/",!1),ae=Mn("tag name"),ce=Mn("class"),K=Mn("id"),H=Ln("=",!1),se=Ln("(",!1),ie=Ln(")",!1),B=Ln(",",!1),J=Mn("variable"),Ae=Mn("null"),Qe=Mn("boolean"),Ne=Ln("[",!1),ge=Ln("]",!1),Pe=Ln("{",!1),Ke=Ln("}",!1),Je=Ln(":",!1),We=Mn("number"),be=Mn("string"),Oe=Mn("identifier"),Me=Mn("whitespace"),xt=function(Q){return{type:"variable",meta:{variable:Q}}},at=function(Q){return{type:"annotation",meta:{attributes:Q}}},st=function(Q,F){return F},kt=function(Q,F,Y,oe){F&&(Y=Y||[],Y.unshift({type:"attribute",name:"primary",value:F}));const[ye,je]=oe?["tag",0]:["tag_open",1];return{type:ye,nesting:je,meta:{tag:Q,attributes:Y}}},yn=function(Q){return{type:"tag_close",nesting:-1,meta:{tag:Q}}},en=function(Q,F){return Q?[Q,...F]:[]},xe=function(Q){return Q},mn=function(Q){return Q},et=function(Q){return Q},jt=function(Q){return Q},In=function(Q){return{type:"class",name:Q,value:!0}},le=function(Q){return{type:"attribute",name:"id",value:Q}},ve=function(Q,F){return{type:"attribute",name:Q,value:F}},ke=function(Q,F,Y){return F?[F,...Y]:[]},Ce=function(Q,F){let Y={};for(let[oe,{name:ye,value:je}]of F.entries())Y[ye||oe]=je;return new CC(Q,Y)},De=function(Q){return Q},St=function(Q,F){return{name:Q,value:F}},pt=function(Q){return Q},Ue=function(Q,F,Y){return Q==="@"?[F,...Y]:new AC([F,...Y])},At=function(){return null},bt=function(){return!0},ft=function(){return!1},Ct=function(Q,F){return[Q,...F]},_n=function(Q){return Q||[]},Ft=function(Q,F){return Object.assign(Q,...F)},tn=function(Q){return Q||{}},wt=function(Q,F){return Q==="$$mdtype"?{}:{[Q]:F}},Ht=function(){return parseFloat(Pi())},Nn=function(Q){return Q.join("")},Gn=function(){return`
246
- `},ur=function(){return"\r"},un=function(){return" "},Rt=function(Q){return Q},Z=0,Xe=0,fn=[{line:1,column:1}],kn=[],Ye=0,fr;if("startRule"in o){if(!(o.startRule in l))throw new Error(`Can't start parsing from rule "`+o.startRule+'".');c=l[o.startRule]}function Pi(){return s.substring(Xe,Z)}function Ln(Q,F){return{type:"literal",text:Q,ignoreCase:F}}function Gi(){return{type:"end"}}function Mn(Q){return{type:"other",description:Q}}function xs(Q){var F=fn[Q],Y;if(F)return F;for(Y=Q-1;!fn[Y];)Y--;for(F=fn[Y],F={line:F.line,column:F.column};Y<Q;)s.charCodeAt(Y)===10?(F.line++,F.column=1):F.column++,Y++;return fn[Q]=F,F}var Hi=typeof o.filename=="string"&&o.filename.length>0;function dr(Q,F){var Y={};Hi&&(Y.filename=o.filename);var oe=xs(Q);Y.start={offset:Q,line:oe.line,column:oe.column};var ye=xs(F);return Y.end={offset:F,line:ye.line,column:ye.column},Y}function G(){kn.push({pos:Z,variants:[]})}function ne(Q){var F=kn[kn.length-1];Z<F.pos||(Z>F.pos&&(F.pos=Z,F.variants=[]),F.variants.push(Q))}function de(Q,F,Y){return new r(r.buildMessage(Q,F,Y),Q,F,Y)}function we(){var Q=kn[0],F=Q.pos;return de(Q.variants,F<s.length?s.charAt(F):null,F<s.length?dr(F,F+1):dr(F,F))}function Le(){var Q;return Q=nt(),Q===a&&(Q=Ge(),Q===a&&(Q=tt(),Q===a&&(Q=lt()))),Q}function nt(){var Q,F;return Q=Z,F=qv(),F===a&&(F=Pr()),F!==a&&(Xe=Q,F=xt(F)),Q=F,Q}function Ge(){var Q,F,Y,oe;if(Q=Z,F=ht(),F!==a){for(Y=[],oe=Tt();oe!==a;)Y.push(oe),oe=Tt();Xe=Q,Q=at(F)}else Z=Q,Q=a;return Q}function tt(){var Q,F,Y,oe,ye,je,_t,hr=function(Ss){Ye===0&&ne(Ss)};if(Q=Z,F=It(),F!==a){for(Y=[],oe=Tt();oe!==a;)Y.push(oe),oe=Tt();for(oe=Z,ye=Uo(),ye!==a?(je=Tt(),je===a&&(je=null),Xe=oe,oe=st(F,ye)):(Z=oe,oe=a),oe===a&&(oe=null),ye=ht(),ye===a&&(ye=null),je=[],_t=Tt();_t!==a;)je.push(_t),_t=Tt();hr(U),s.charCodeAt(Z)===47?(_t=u,Z++):_t=a,_t===a&&(_t=null),Xe=Q,Q=kt(F,oe,ye,_t)}else Z=Q,Q=a;return Q}function lt(){var Q,F,Y,oe=function(ye){Ye===0&&ne(ye)};return Q=Z,oe(U),s.charCodeAt(Z)===47?(F=u,Z++):F=a,F!==a?(Y=It(),Y!==a?(Xe=Q,Q=yn(Y)):(Z=Q,Q=a)):(Z=Q,Q=a),Q}function It(){var Q,F=function(Y){Ye===0&&ne(Y)};return F(ae),Ye++,Q=Ki(),Ye--,Q}function ht(){var Q,F,Y,oe;if(Q=Z,F=dn(),F!==a){for(Y=[],oe=Cn();oe!==a;)Y.push(oe),oe=Cn();Xe=Q,Q=en(F,Y)}else Z=Q,Q=a;return Q}function Cn(){var Q,F,Y;if(Q=Z,F=[],Y=Tt(),Y!==a)for(;Y!==a;)F.push(Y),Y=Tt();else F=a;return F!==a?(Y=dn(),Y!==a?(Xe=Q,Q=xe(Y)):(Z=Q,Q=a)):(Z=Q,Q=a),Q}function dn(){var Q,F;return Q=Z,F=Bn(),F!==a&&(Xe=Q,F=mn(F)),Q=F,Q===a&&(Q=Z,F=mt(),F!==a&&(Xe=Q,F=et(F)),Q=F,Q===a&&(Q=Z,F=Xr(),F!==a&&(Xe=Q,F=jt(F)),Q=F)),Q}function mt(){var Q,F,Y,oe=function(ye){Ye===0&&ne(ye)};return oe(ce),Ye++,Q=Z,s.charCodeAt(Z)===46?(F=f,Z++):F=a,F!==a?(Y=Ki(),Y!==a?(Xe=Q,Q=In(Y)):(Z=Q,Q=a)):(Z=Q,Q=a),Ye--,Q}function Bn(){var Q,F,Y,oe=function(ye){Ye===0&&ne(ye)};return oe(K),Ye++,Q=Z,s.charCodeAt(Z)===35?(F=d,Z++):F=a,F!==a?(Y=Ki(),Y!==a?(Xe=Q,Q=le(Y)):(Z=Q,Q=a)):(Z=Q,Q=a),Ye--,Q}function Xr(){var Q,F,Y,oe,ye=function(je){Ye===0&&ne(je)};return Q=Z,F=Ki(),F!==a?(ye(H),s.charCodeAt(Z)===61?(Y=h,Z++):Y=a,Y!==a?(oe=Uo(),oe!==a?(Xe=Q,Q=ve(F,oe)):(Z=Q,Q=a)):(Z=Q,Q=a)):(Z=Q,Q=a),Q}function Pr(){var Q,F,Y,oe,ye,je,_t,hr,Ss=function(TC){Ye===0&&ne(TC)};if(Q=Z,F=Ki(),F!==a)if(Ss(se),s.charCodeAt(Z)===40?(Y=g,Z++):Y=a,Y!==a){for(oe=[],ye=Tt();ye!==a;)oe.push(ye),ye=Tt();for(ye=Z,je=Wo(),je===a&&(je=null),_t=[],hr=Yo();hr!==a;)_t.push(hr),hr=Yo();Xe=ye,ye=ke(F,je,_t),Ss(ie),s.charCodeAt(Z)===41?(je=p,Z++):je=a,je!==a?(Xe=Q,Q=Ce(F,ye)):(Z=Q,Q=a)}else Z=Q,Q=a;else Z=Q,Q=a;return Q}function Wo(){var Q,F,Y,oe,ye=function(je){Ye===0&&ne(je)};return Q=Z,F=Z,Y=Ki(),Y!==a?(ye(H),s.charCodeAt(Z)===61?(oe=h,Z++):oe=a,oe!==a?(Xe=F,F=De(Y)):(Z=F,F=a)):(Z=F,F=a),F===a&&(F=null),Y=Uo(),Y!==a?(Xe=Q,Q=St(F,Y)):(Z=Q,Q=a),Q}function Yo(){var Q,F,Y,oe,ye,je=function(_t){Ye===0&&ne(_t)};for(Q=Z,F=[],Y=Tt();Y!==a;)F.push(Y),Y=Tt();if(je(B),s.charCodeAt(Z)===44?(Y=O,Z++):Y=a,Y!==a){for(oe=[],ye=Tt();ye!==a;)oe.push(ye),ye=Tt();ye=Wo(),ye!==a?(Xe=Q,Q=pt(ye)):(Z=Q,Q=a)}else Z=Q,Q=a;return Q}function an(){var Q,F,Y,oe=function(ye){Ye===0&&ne(ye)};for(Q=Z,F=[],Y=Tt();Y!==a;)F.push(Y),Y=Tt();return oe(B),s.charCodeAt(Z)===44?(Y=O,Z++):Y=a,Y!==a?(F=[F,Y],Q=F):(Z=Q,Q=a),Q===a&&(Q=null),Q}function qv(){var Q,F,Y,oe,ye,je=function(_t){Ye===0&&ne(_t)};if(je(J),Ye++,Q=Z,M.test(s.charAt(Z))?(F=s.charAt(Z),Z++):F=a,F!==a)if(Y=Ki(),Y!==a){for(oe=[],ye=Rv();ye!==a;)oe.push(ye),ye=Rv();Xe=Q,Q=Ue(F,Y,oe)}else Z=Q,Q=a;else Z=Q,Q=a;return Ye--,Q}function Rv(){var Q,F,Y,oe;return Q=Z,s.charCodeAt(Z)===46?(F=f,Z++):F=a,F!==a?(Y=Ki(),Y!==a?(Xe=Q,Q=De(Y)):(Z=Q,Q=a)):(Z=Q,Q=a),Q===a&&(Q=Z,s.charCodeAt(Z)===91?(F=v,Z++):F=a,F!==a?(Y=jv(),Y===a&&(Y=eh()),Y!==a?(s.charCodeAt(Z)===93?(oe=b,Z++):oe=a,oe!==a?(Xe=Q,Q=pt(Y)):(Z=Q,Q=a)):(Z=Q,Q=a)):(Z=Q,Q=a)),Q}function Uo(){var Q;return Q=wC(),Q===a&&(Q=_C(),Q===a&&(Q=eh(),Q===a&&(Q=jv(),Q===a&&(Q=kC(),Q===a&&(Q=xC(),Q===a&&(Q=Pr(),Q===a&&(Q=qv()))))))),Q}function wC(){var Q,F,Y=function(oe){Ye===0&&ne(oe)};return Y(Ae),Ye++,Q=Z,s.substr(Z,4)===_?(F=_,Z+=4):F=a,F!==a&&(Xe=Q,F=At()),Q=F,Ye--,Q}function _C(){var Q,F,Y=function(oe){Ye===0&&ne(oe)};return Y(Qe),Ye++,Q=Z,s.substr(Z,4)===A?(F=A,Z+=4):F=a,F!==a&&(Xe=Q,F=bt()),Q=F,Q===a&&(Q=Z,s.substr(Z,5)===y?(F=y,Z+=5):F=a,F!==a&&(Xe=Q,F=ft()),Q=F),Ye--,Q}function kC(){var Q,F,Y,oe,ye,je,_t,hr=function(Ss){Ye===0&&ne(Ss)};if(Q=Z,hr(Ne),s.charCodeAt(Z)===91?(F=v,Z++):F=a,F!==a){for(Y=[],oe=Tt();oe!==a;)Y.push(oe),oe=Tt();if(oe=Z,ye=Uo(),ye!==a){for(je=[],_t=Iv();_t!==a;)je.push(_t),_t=Iv();_t=an(),Xe=oe,oe=Ct(ye,je)}else Z=oe,oe=a;for(oe===a&&(oe=null),ye=[],je=Tt();je!==a;)ye.push(je),je=Tt();hr(ge),s.charCodeAt(Z)===93?(je=b,Z++):je=a,je!==a?(Xe=Q,Q=_n(oe)):(Z=Q,Q=a)}else Z=Q,Q=a;return Q}function Iv(){var Q,F,Y,oe,ye,je=function(_t){Ye===0&&ne(_t)};for(Q=Z,F=[],Y=Tt();Y!==a;)F.push(Y),Y=Tt();if(je(B),s.charCodeAt(Z)===44?(Y=O,Z++):Y=a,Y!==a){for(oe=[],ye=Tt();ye!==a;)oe.push(ye),ye=Tt();ye=Uo(),ye!==a?(Xe=Q,Q=pt(ye)):(Z=Q,Q=a)}else Z=Q,Q=a;return Q}function xC(){var Q,F,Y,oe,ye,je,_t,hr=function(Ss){Ye===0&&ne(Ss)};if(Q=Z,hr(Pe),s.charCodeAt(Z)===123?(F=w,Z++):F=a,F!==a){for(Y=[],oe=Tt();oe!==a;)Y.push(oe),oe=Tt();if(oe=Z,ye=Bv(),ye!==a){for(je=[],_t=Nv();_t!==a;)je.push(_t),_t=Nv();_t=an(),Xe=oe,oe=Ft(ye,je)}else Z=oe,oe=a;for(oe===a&&(oe=null),ye=[],je=Tt();je!==a;)ye.push(je),je=Tt();hr(Ke),s.charCodeAt(Z)===125?(je=S,Z++):je=a,je!==a?(Xe=Q,Q=tn(oe)):(Z=Q,Q=a)}else Z=Q,Q=a;return Q}function Nv(){var Q,F,Y,oe,ye,je=function(_t){Ye===0&&ne(_t)};for(Q=Z,F=[],Y=Tt();Y!==a;)F.push(Y),Y=Tt();if(je(B),s.charCodeAt(Z)===44?(Y=O,Z++):Y=a,Y!==a){for(oe=[],ye=Tt();ye!==a;)oe.push(ye),ye=Tt();ye=Bv(),ye!==a?(Xe=Q,Q=xe(ye)):(Z=Q,Q=a)}else Z=Q,Q=a;return Q}function Bv(){var Q,F,Y,oe,ye,je=function(_t){Ye===0&&ne(_t)};if(Q=Z,F=Ki(),F===a&&(F=eh()),F!==a)if(je(Je),s.charCodeAt(Z)===58?(Y=C,Z++):Y=a,Y!==a){for(oe=[],ye=Tt();ye!==a;)oe.push(ye),ye=Tt();ye=Uo(),ye!==a?(Xe=Q,Q=wt(F,ye)):(Z=Q,Q=a)}else Z=Q,Q=a;else Z=Q,Q=a;return Q}function jv(){var Q,F,Y,oe,ye,je,_t=function(hr){Ye===0&&ne(hr)};if(_t(We),Ye++,Q=Z,s.charCodeAt(Z)===45&&Z++,F=[],P.test(s.charAt(Z))?(Y=s.charAt(Z),Z++):Y=a,Y!==a)for(;Y!==a;)F.push(Y),P.test(s.charAt(Z))?(Y=s.charAt(Z),Z++):Y=a;else F=a;if(F!==a){if(Y=Z,s.charCodeAt(Z)===46?(oe=f,Z++):oe=a,oe!==a){if(ye=[],P.test(s.charAt(Z))?(je=s.charAt(Z),Z++):je=a,je!==a)for(;je!==a;)ye.push(je),P.test(s.charAt(Z))?(je=s.charAt(Z),Z++):je=a;else ye=a;ye!==a?(oe=[oe,ye],Y=oe):(Z=Y,Y=a)}else Z=Y,Y=a;Y===a&&(Y=null),Xe=Q,Q=Ht()}else Z=Q,Q=a;return Ye--,Q}function eh(){var Q,F,Y,oe,ye=function(je){Ye===0&&ne(je)};if(ye(be),Ye++,Q=Z,s.charCodeAt(Z)===34?(F=x,Z++):F=a,F!==a){for(Y=[],oe=zv();oe!==a;)Y.push(oe),oe=zv();s.charCodeAt(Z)===34?(oe=x,Z++):oe=a,oe!==a?(Xe=Q,Q=Nn(Y)):(Z=Q,Q=a)}else Z=Q,Q=a;return Ye--,Q}function zv(){var Q;return D.test(s.charAt(Z))?(Q=s.charAt(Z),Z++):Q=a,Q===a&&(Q=SC()),Q}function SC(){var Q,F,Y,oe;return Q=Z,s.charCodeAt(Z)===92?(F=k,Z++):F=a,F!==a?(s.charCodeAt(Z)===34?(Y=x,Z++):Y=a,Y===a&&(s.charCodeAt(Z)===92?(Y=k,Z++):Y=a,Y===a&&(Y=Z,s.charCodeAt(Z)===110?(oe=E,Z++):oe=a,oe!==a&&(Xe=Y,oe=Gn()),Y=oe,Y===a&&(Y=Z,s.charCodeAt(Z)===114?(oe=T,Z++):oe=a,oe!==a&&(Xe=Y,oe=ur()),Y=oe,Y===a&&(Y=Z,s.charCodeAt(Z)===116?(oe=$,Z++):oe=a,oe!==a&&(Xe=Y,oe=un()),Y=oe)))),Y!==a?(Xe=Q,Q=Rt(Y)):(Z=Q,Q=a)):(Z=Q,Q=a),Q}function Ki(){var Q,F,Y,oe=function(ye){Ye===0&&ne(ye)};if(oe(Oe),Ye++,Q=Z,F=[],I.test(s.charAt(Z))?(Y=s.charAt(Z),Z++):Y=a,Y!==a)for(;Y!==a;)F.push(Y),I.test(s.charAt(Z))?(Y=s.charAt(Z),Z++):Y=a;else F=a;return F!==a?Q=s.substring(Q,Z):Q=F,Ye--,Q}function Tt(){var Q,F=function(Y){Ye===0&&ne(Y)};return F(Me),Ye++,W.test(s.charAt(Z))?(Q=s.charAt(Z),Z++):Q=a,Ye--,Q}const{Variable:AC,Function:CC}=o;if(G(),fr=c(),fr!==a&&Z===s.length)return fr;throw fr!==a&&Z<s.length&&ne(Gi()),we()}e.exports={SyntaxError:r,parse:i}}}),QI=Re({"node_modules/entities/lib/maps/entities.json"(n,e){e.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
247
- `,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}}}),eA=Re({"node_modules/markdown-it/lib/common/entities.js"(n,e){e.exports=QI()}}),lv=Re({"node_modules/uc.micro/categories/P/regex.js"(n,e){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/}}),LI=Re({"node_modules/mdurl/encode.js"(n,e){var t={};function r(s){var o,a,l=t[s];if(l)return l;for(l=t[s]=[],o=0;o<128;o++)a=String.fromCharCode(o),/^[0-9a-z]$/i.test(a)?l.push(a):l.push("%"+("0"+o.toString(16).toUpperCase()).slice(-2));for(o=0;o<s.length;o++)l[s.charCodeAt(o)]=s[o];return l}function i(s,o,a){var l,c,u,f,d,h="";for(typeof o!="string"&&(a=o,o=i.defaultChars),typeof a>"u"&&(a=!0),d=r(o),l=0,c=s.length;l<c;l++){if(u=s.charCodeAt(l),a&&u===37&&l+2<c&&/^[0-9a-f]{2}$/i.test(s.slice(l+1,l+3))){h+=s.slice(l,l+3),l+=2;continue}if(u<128){h+=d[u];continue}if(u>=55296&&u<=57343){if(u>=55296&&u<=56319&&l+1<c&&(f=s.charCodeAt(l+1),f>=56320&&f<=57343)){h+=encodeURIComponent(s[l]+s[l+1]),l++;continue}h+="%EF%BF%BD";continue}h+=encodeURIComponent(s[l])}return h}i.defaultChars=";/?:@&=+$,-_.!~*'()#",i.componentChars="-_.!~*'()",e.exports=i}}),MI=Re({"node_modules/mdurl/decode.js"(n,e){var t={};function r(s){var o,a,l=t[s];if(l)return l;for(l=t[s]=[],o=0;o<128;o++)a=String.fromCharCode(o),l.push(a);for(o=0;o<s.length;o++)a=s.charCodeAt(o),l[a]="%"+("0"+a.toString(16).toUpperCase()).slice(-2);return l}function i(s,o){var a;return typeof o!="string"&&(o=i.defaultChars),a=r(o),s.replace(/(%[a-f0-9]{2})+/gi,function(l){var c,u,f,d,h,g,p,O="";for(c=0,u=l.length;c<u;c+=3){if(f=parseInt(l.slice(c+1,c+3),16),f<128){O+=a[f];continue}if((f&224)===192&&c+3<u&&(d=parseInt(l.slice(c+4,c+6),16),(d&192)===128)){p=f<<6&1984|d&63,p<128?O+="��":O+=String.fromCharCode(p),c+=3;continue}if((f&240)===224&&c+6<u&&(d=parseInt(l.slice(c+4,c+6),16),h=parseInt(l.slice(c+7,c+9),16),(d&192)===128&&(h&192)===128)){p=f<<12&61440|d<<6&4032|h&63,p<2048||p>=55296&&p<=57343?O+="���":O+=String.fromCharCode(p),c+=6;continue}if((f&248)===240&&c+9<u&&(d=parseInt(l.slice(c+4,c+6),16),h=parseInt(l.slice(c+7,c+9),16),g=parseInt(l.slice(c+10,c+12),16),(d&192)===128&&(h&192)===128&&(g&192)===128)){p=f<<18&1835008|d<<12&258048|h<<6&4032|g&63,p<65536||p>1114111?O+="����":(p-=65536,O+=String.fromCharCode(55296+(p>>10),56320+(p&1023))),c+=9;continue}O+="�"}return O})}i.defaultChars=";/?:@&=+$,#",i.componentChars="",e.exports=i}}),DI=Re({"node_modules/mdurl/format.js"(n,e){e.exports=function(r){var i="";return i+=r.protocol||"",i+=r.slashes?"//":"",i+=r.auth?r.auth+"@":"",r.hostname&&r.hostname.indexOf(":")!==-1?i+="["+r.hostname+"]":i+=r.hostname||"",i+=r.port?":"+r.port:"",i+=r.pathname||"",i+=r.search||"",i+=r.hash||"",i}}}),qI=Re({"node_modules/mdurl/parse.js"(n,e){function t(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var r=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,o=["<",">",'"',"`"," ","\r",`
248
- `," "],a=["{","}","|","\\","^","`"].concat(o),l=["'"].concat(a),c=["%","/","?",";","#"].concat(l),u=["/","?","#"],f=255,d=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},p={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function O(v,b){if(v&&v instanceof t)return v;var _=new t;return _.parse(v,b),_}t.prototype.parse=function(v,b){var _,A,y,w,S,C=v;if(C=C.trim(),!b&&v.split("#").length===1){var x=s.exec(C);if(x)return this.pathname=x[1],x[2]&&(this.search=x[2]),this}var k=r.exec(C);if(k&&(k=k[0],y=k.toLowerCase(),this.protocol=k,C=C.substr(k.length)),(b||k||C.match(/^\/\/[^@\/]+@[^@\/]+/))&&(S=C.substr(0,2)==="//",S&&!(k&&g[k])&&(C=C.substr(2),this.slashes=!0)),!g[k]&&(S||k&&!p[k])){var E=-1;for(_=0;_<u.length;_++)w=C.indexOf(u[_]),w!==-1&&(E===-1||w<E)&&(E=w);var T,$;for(E===-1?$=C.lastIndexOf("@"):$=C.lastIndexOf("@",E),$!==-1&&(T=C.slice(0,$),C=C.slice($+1),this.auth=T),E=-1,_=0;_<c.length;_++)w=C.indexOf(c[_]),w!==-1&&(E===-1||w<E)&&(E=w);E===-1&&(E=C.length),C[E-1]===":"&&E--;var M=C.slice(0,E);C=C.slice(E),this.parseHost(M),this.hostname=this.hostname||"";var P=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!P){var D=this.hostname.split(/\./);for(_=0,A=D.length;_<A;_++){var I=D[_];if(I&&!I.match(d)){for(var W="",U=0,ae=I.length;U<ae;U++)I.charCodeAt(U)>127?W+="x":W+=I[U];if(!W.match(d)){var ce=D.slice(0,_),K=D.slice(_+1),H=I.match(h);H&&(ce.push(H[1]),K.unshift(H[2])),K.length&&(C=K.join(".")+C),this.hostname=ce.join(".");break}}}}this.hostname.length>f&&(this.hostname=""),P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var se=C.indexOf("#");se!==-1&&(this.hash=C.substr(se),C=C.slice(0,se));var ie=C.indexOf("?");return ie!==-1&&(this.search=C.substr(ie),C=C.slice(0,ie)),C&&(this.pathname=C),p[y]&&this.hostname&&!this.pathname&&(this.pathname=""),this},t.prototype.parseHost=function(v){var b=i.exec(v);b&&(b=b[0],b!==":"&&(this.port=b.substr(1)),v=v.substr(0,v.length-b.length)),v&&(this.hostname=v)},e.exports=O}}),tA=Re({"node_modules/mdurl/index.js"(n,e){e.exports.encode=LI(),e.exports.decode=MI(),e.exports.format=DI(),e.exports.parse=qI()}}),nA=Re({"node_modules/uc.micro/properties/Any/regex.js"(n,e){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/}}),rA=Re({"node_modules/uc.micro/categories/Cc/regex.js"(n,e){e.exports=/[\0-\x1F\x7F-\x9F]/}}),RI=Re({"node_modules/uc.micro/categories/Cf/regex.js"(n,e){e.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/}}),iA=Re({"node_modules/uc.micro/categories/Z/regex.js"(n,e){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/}}),II=Re({"node_modules/uc.micro/index.js"(n){n.Any=nA(),n.Cc=rA(),n.Cf=RI(),n.P=lv(),n.Z=iA()}}),Yt=Re({"node_modules/markdown-it/lib/common/utils.js"(n){function e(M){return Object.prototype.toString.call(M)}function t(M){return e(M)==="[object String]"}var r=Object.prototype.hasOwnProperty;function i(M,P){return r.call(M,P)}function s(M){var P=Array.prototype.slice.call(arguments,1);return P.forEach(function(D){if(D){if(typeof D!="object")throw new TypeError(D+"must be object");Object.keys(D).forEach(function(I){M[I]=D[I]})}}),M}function o(M,P,D){return[].concat(M.slice(0,P),D,M.slice(P+1))}function a(M){return!(M>=55296&&M<=57343||M>=64976&&M<=65007||(M&65535)===65535||(M&65535)===65534||M>=0&&M<=8||M===11||M>=14&&M<=31||M>=127&&M<=159||M>1114111)}function l(M){if(M>65535){M-=65536;var P=55296+(M>>10),D=56320+(M&1023);return String.fromCharCode(P,D)}return String.fromCharCode(M)}var c=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,u=/&([a-z#][a-z0-9]{1,31});/gi,f=new RegExp(c.source+"|"+u.source,"gi"),d=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,h=eA();function g(M,P){var D=0;return i(h,P)?h[P]:P.charCodeAt(0)===35&&d.test(P)&&(D=P[1].toLowerCase()==="x"?parseInt(P.slice(2),16):parseInt(P.slice(1),10),a(D))?l(D):M}function p(M){return M.indexOf("\\")<0?M:M.replace(c,"$1")}function O(M){return M.indexOf("\\")<0&&M.indexOf("&")<0?M:M.replace(f,function(P,D,I){return D||g(P,I)})}var v=/[&<>"]/,b=/[&<>"]/g,_={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function A(M){return _[M]}function y(M){return v.test(M)?M.replace(b,A):M}var w=/[.?*+^$[\]\\(){}|-]/g;function S(M){return M.replace(w,"\\$&")}function C(M){switch(M){case 9:case 32:return!0}return!1}function x(M){if(M>=8192&&M<=8202)return!0;switch(M){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}var k=lv();function E(M){return k.test(M)}function T(M){switch(M){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function $(M){return M=M.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(M=M.replace(/ẞ/g,"ß")),M.toLowerCase().toUpperCase()}n.lib={},n.lib.mdurl=tA(),n.lib.ucmicro=II(),n.assign=s,n.isString=t,n.has=i,n.unescapeMd=p,n.unescapeAll=O,n.isValidEntityCode=a,n.fromCodePoint=l,n.escapeHtml=y,n.arrayReplaceAt=o,n.isSpace=C,n.isWhiteSpace=x,n.isMdAsciiPunct=T,n.isPunctChar=E,n.escapeRE=S,n.normalizeReference=$}}),NI=Re({"node_modules/markdown-it/lib/helpers/parse_link_label.js"(n,e){e.exports=function(r,i,s){var o,a,l,c,u=-1,f=r.posMax,d=r.pos;for(r.pos=i+1,o=1;r.pos<f;){if(l=r.src.charCodeAt(r.pos),l===93&&(o--,o===0)){a=!0;break}if(c=r.pos,r.md.inline.skipToken(r),l===91){if(c===r.pos-1)o++;else if(s)return r.pos=d,-1}}return a&&(u=r.pos),r.pos=d,u}}}),BI=Re({"node_modules/markdown-it/lib/helpers/parse_link_destination.js"(n,e){var t=Yt().unescapeAll;e.exports=function(i,s,o){var a,l,c=0,u=s,f={ok:!1,pos:0,lines:0,str:""};if(i.charCodeAt(s)===60){for(s++;s<o;){if(a=i.charCodeAt(s),a===10||a===60)return f;if(a===62)return f.pos=s+1,f.str=t(i.slice(u+1,s)),f.ok=!0,f;if(a===92&&s+1<o){s+=2;continue}s++}return f}for(l=0;s<o&&(a=i.charCodeAt(s),!(a===32||a<32||a===127));){if(a===92&&s+1<o){if(i.charCodeAt(s+1)===32)break;s+=2;continue}if(a===40&&(l++,l>32))return f;if(a===41){if(l===0)break;l--}s++}return u===s||l!==0||(f.str=t(i.slice(u,s)),f.lines=c,f.pos=s,f.ok=!0),f}}}),jI=Re({"node_modules/markdown-it/lib/helpers/parse_link_title.js"(n,e){var t=Yt().unescapeAll;e.exports=function(i,s,o){var a,l,c=0,u=s,f={ok:!1,pos:0,lines:0,str:""};if(s>=o||(l=i.charCodeAt(s),l!==34&&l!==39&&l!==40))return f;for(s++,l===40&&(l=41);s<o;){if(a=i.charCodeAt(s),a===l)return f.pos=s+1,f.lines=c,f.str=t(i.slice(u+1,s)),f.ok=!0,f;if(a===40&&l===41)return f;a===10?c++:a===92&&s+1<o&&(s++,i.charCodeAt(s)===10&&c++),s++}return f}}}),zI=Re({"node_modules/markdown-it/lib/helpers/index.js"(n){n.parseLinkLabel=NI(),n.parseLinkDestination=BI(),n.parseLinkTitle=jI()}}),ZI=Re({"node_modules/markdown-it/lib/renderer.js"(n,e){var t=Yt().assign,r=Yt().unescapeAll,i=Yt().escapeHtml,s={};s.code_inline=function(a,l,c,u,f){var d=a[l];return"<code"+f.renderAttrs(d)+">"+i(a[l].content)+"</code>"},s.code_block=function(a,l,c,u,f){var d=a[l];return"<pre"+f.renderAttrs(d)+"><code>"+i(a[l].content)+`</code></pre>
249
- `},s.fence=function(a,l,c,u,f){var d=a[l],h=d.info?r(d.info).trim():"",g="",p="",O,v,b,_,A;return h&&(b=h.split(/(\s+)/g),g=b[0],p=b.slice(2).join("")),c.highlight?O=c.highlight(d.content,g,p)||i(d.content):O=i(d.content),O.indexOf("<pre")===0?O+`
250
- `:h?(v=d.attrIndex("class"),_=d.attrs?d.attrs.slice():[],v<0?_.push(["class",c.langPrefix+g]):(_[v]=_[v].slice(),_[v][1]+=" "+c.langPrefix+g),A={attrs:_},"<pre><code"+f.renderAttrs(A)+">"+O+`</code></pre>
251
- `):"<pre><code"+f.renderAttrs(d)+">"+O+`</code></pre>
252
- `},s.image=function(a,l,c,u,f){var d=a[l];return d.attrs[d.attrIndex("alt")][1]=f.renderInlineAsText(d.children,c,u),f.renderToken(a,l,c)},s.hardbreak=function(a,l,c){return c.xhtmlOut?`<br />
253
- `:`<br>
254
- `},s.softbreak=function(a,l,c){return c.breaks?c.xhtmlOut?`<br />
255
- `:`<br>
256
- `:`
257
- `},s.text=function(a,l){return i(a[l].content)},s.html_block=function(a,l){return a[l].content},s.html_inline=function(a,l){return a[l].content};function o(){this.rules=t({},s)}o.prototype.renderAttrs=function(l){var c,u,f;if(!l.attrs)return"";for(f="",c=0,u=l.attrs.length;c<u;c++)f+=" "+i(l.attrs[c][0])+'="'+i(l.attrs[c][1])+'"';return f},o.prototype.renderToken=function(l,c,u){var f,d="",h=!1,g=l[c];return g.hidden?"":(g.block&&g.nesting!==-1&&c&&l[c-1].hidden&&(d+=`
258
- `),d+=(g.nesting===-1?"</":"<")+g.tag,d+=this.renderAttrs(g),g.nesting===0&&u.xhtmlOut&&(d+=" /"),g.block&&(h=!0,g.nesting===1&&c+1<l.length&&(f=l[c+1],(f.type==="inline"||f.hidden||f.nesting===-1&&f.tag===g.tag)&&(h=!1))),d+=h?`>
259
- `:">",d)},o.prototype.renderInline=function(a,l,c){for(var u,f="",d=this.rules,h=0,g=a.length;h<g;h++)u=a[h].type,typeof d[u]<"u"?f+=d[u](a,h,l,c,this):f+=this.renderToken(a,h,l);return f},o.prototype.renderInlineAsText=function(a,l,c){for(var u="",f=0,d=a.length;f<d;f++)a[f].type==="text"?u+=a[f].content:a[f].type==="image"?u+=this.renderInlineAsText(a[f].children,l,c):a[f].type==="softbreak"&&(u+=`
260
- `);return u},o.prototype.render=function(a,l,c){var u,f,d,h="",g=this.rules;for(u=0,f=a.length;u<f;u++)d=a[u].type,d==="inline"?h+=this.renderInline(a[u].children,l,c):typeof g[d]<"u"?h+=g[a[u].type](a,u,l,c,this):h+=this.renderToken(a,u,l,c);return h},e.exports=o}}),cv=Re({"node_modules/markdown-it/lib/ruler.js"(n,e){function t(){this.__rules__=[],this.__cache__=null}t.prototype.__find__=function(r){for(var i=0;i<this.__rules__.length;i++)if(this.__rules__[i].name===r)return i;return-1},t.prototype.__compile__=function(){var r=this,i=[""];r.__rules__.forEach(function(s){s.enabled&&s.alt.forEach(function(o){i.indexOf(o)<0&&i.push(o)})}),r.__cache__={},i.forEach(function(s){r.__cache__[s]=[],r.__rules__.forEach(function(o){o.enabled&&(s&&o.alt.indexOf(s)<0||r.__cache__[s].push(o.fn))})})},t.prototype.at=function(r,i,s){var o=this.__find__(r),a=s||{};if(o===-1)throw new Error("Parser rule not found: "+r);this.__rules__[o].fn=i,this.__rules__[o].alt=a.alt||[],this.__cache__=null},t.prototype.before=function(r,i,s,o){var a=this.__find__(r),l=o||{};if(a===-1)throw new Error("Parser rule not found: "+r);this.__rules__.splice(a,0,{name:i,enabled:!0,fn:s,alt:l.alt||[]}),this.__cache__=null},t.prototype.after=function(r,i,s,o){var a=this.__find__(r),l=o||{};if(a===-1)throw new Error("Parser rule not found: "+r);this.__rules__.splice(a+1,0,{name:i,enabled:!0,fn:s,alt:l.alt||[]}),this.__cache__=null},t.prototype.push=function(r,i,s){var o=s||{};this.__rules__.push({name:r,enabled:!0,fn:i,alt:o.alt||[]}),this.__cache__=null},t.prototype.enable=function(r,i){Array.isArray(r)||(r=[r]);var s=[];return r.forEach(function(o){var a=this.__find__(o);if(a<0){if(i)return;throw new Error("Rules manager: invalid rule name "+o)}this.__rules__[a].enabled=!0,s.push(o)},this),this.__cache__=null,s},t.prototype.enableOnly=function(r,i){Array.isArray(r)||(r=[r]),this.__rules__.forEach(function(s){s.enabled=!1}),this.enable(r,i)},t.prototype.disable=function(r,i){Array.isArray(r)||(r=[r]);var s=[];return r.forEach(function(o){var a=this.__find__(o);if(a<0){if(i)return;throw new Error("Rules manager: invalid rule name "+o)}this.__rules__[a].enabled=!1,s.push(o)},this),this.__cache__=null,s},t.prototype.getRules=function(r){return this.__cache__===null&&this.__compile__(),this.__cache__[r]||[]},e.exports=t}}),XI=Re({"node_modules/markdown-it/lib/rules_core/normalize.js"(n,e){var t=/\r\n?|\n/g,r=/\0/g;e.exports=function(s){var o;o=s.src.replace(t,`
261
- `),o=o.replace(r,"�"),s.src=o}}}),FI=Re({"node_modules/markdown-it/lib/rules_core/block.js"(n,e){e.exports=function(r){var i;r.inlineMode?(i=new r.Token("inline","",0),i.content=r.src,i.map=[0,1],i.children=[],r.tokens.push(i)):r.md.block.parse(r.src,r.md,r.env,r.tokens)}}}),VI=Re({"node_modules/markdown-it/lib/rules_core/inline.js"(n,e){e.exports=function(r){var i=r.tokens,s,o,a;for(o=0,a=i.length;o<a;o++)s=i[o],s.type==="inline"&&r.md.inline.parse(s.content,r.md,r.env,s.children)}}}),WI=Re({"node_modules/markdown-it/lib/rules_core/linkify.js"(n,e){var t=Yt().arrayReplaceAt;function r(s){return/^<a[>\s]/i.test(s)}function i(s){return/^<\/a\s*>/i.test(s)}e.exports=function(o){var a,l,c,u,f,d,h,g,p,O,v,b,_,A,y,w,S=o.tokens,C;if(o.md.options.linkify){for(l=0,c=S.length;l<c;l++)if(!(S[l].type!=="inline"||!o.md.linkify.pretest(S[l].content)))for(u=S[l].children,_=0,a=u.length-1;a>=0;a--){if(d=u[a],d.type==="link_close"){for(a--;u[a].level!==d.level&&u[a].type!=="link_open";)a--;continue}if(d.type==="html_inline"&&(r(d.content)&&_>0&&_--,i(d.content)&&_++),!(_>0)&&d.type==="text"&&o.md.linkify.test(d.content)){for(p=d.content,C=o.md.linkify.match(p),h=[],b=d.level,v=0,g=0;g<C.length;g++)A=C[g].url,y=o.md.normalizeLink(A),o.md.validateLink(y)&&(w=C[g].text,C[g].schema?C[g].schema==="mailto:"&&!/^mailto:/i.test(w)?w=o.md.normalizeLinkText("mailto:"+w).replace(/^mailto:/,""):w=o.md.normalizeLinkText(w):w=o.md.normalizeLinkText("http://"+w).replace(/^http:\/\//,""),O=C[g].index,O>v&&(f=new o.Token("text","",0),f.content=p.slice(v,O),f.level=b,h.push(f)),f=new o.Token("link_open","a",1),f.attrs=[["href",y]],f.level=b++,f.markup="linkify",f.info="auto",h.push(f),f=new o.Token("text","",0),f.content=w,f.level=b,h.push(f),f=new o.Token("link_close","a",-1),f.level=--b,f.markup="linkify",f.info="auto",h.push(f),v=C[g].lastIndex);v<p.length&&(f=new o.Token("text","",0),f.content=p.slice(v),f.level=b,h.push(f)),S[l].children=u=t(u,a,h)}}}}}}),YI=Re({"node_modules/markdown-it/lib/rules_core/replacements.js"(n,e){var t=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,r=/\((c|tm|r|p)\)/i,i=/\((c|tm|r|p)\)/ig,s={c:"©",r:"®",p:"§",tm:"™"};function o(c,u){return s[u.toLowerCase()]}function a(c){var u,f,d=0;for(u=c.length-1;u>=0;u--)f=c[u],f.type==="text"&&!d&&(f.content=f.content.replace(i,o)),f.type==="link_open"&&f.info==="auto"&&d--,f.type==="link_close"&&f.info==="auto"&&d++}function l(c){var u,f,d=0;for(u=c.length-1;u>=0;u--)f=c[u],f.type==="text"&&!d&&t.test(f.content)&&(f.content=f.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),f.type==="link_open"&&f.info==="auto"&&d--,f.type==="link_close"&&f.info==="auto"&&d++}e.exports=function(u){var f;if(u.md.options.typographer)for(f=u.tokens.length-1;f>=0;f--)u.tokens[f].type==="inline"&&(r.test(u.tokens[f].content)&&a(u.tokens[f].children),t.test(u.tokens[f].content)&&l(u.tokens[f].children))}}}),UI=Re({"node_modules/markdown-it/lib/rules_core/smartquotes.js"(n,e){var t=Yt().isWhiteSpace,r=Yt().isPunctChar,i=Yt().isMdAsciiPunct,s=/['"]/,o=/['"]/g,a="’";function l(u,f,d){return u.substr(0,f)+d+u.substr(f+1)}function c(u,f){var d,h,g,p,O,v,b,_,A,y,w,S,C,x,k,E,T,$,M,P,D;for(M=[],d=0;d<u.length;d++){for(h=u[d],b=u[d].level,T=M.length-1;T>=0&&!(M[T].level<=b);T--);if(M.length=T+1,h.type==="text"){g=h.content,O=0,v=g.length;e:for(;O<v&&(o.lastIndex=O,p=o.exec(g),!!p);){if(k=E=!0,O=p.index+1,$=p[0]==="'",A=32,p.index-1>=0)A=g.charCodeAt(p.index-1);else for(T=d-1;T>=0&&!(u[T].type==="softbreak"||u[T].type==="hardbreak");T--)if(u[T].content){A=u[T].content.charCodeAt(u[T].content.length-1);break}if(y=32,O<v)y=g.charCodeAt(O);else for(T=d+1;T<u.length&&!(u[T].type==="softbreak"||u[T].type==="hardbreak");T++)if(u[T].content){y=u[T].content.charCodeAt(0);break}if(w=i(A)||r(String.fromCharCode(A)),S=i(y)||r(String.fromCharCode(y)),C=t(A),x=t(y),x?k=!1:S&&(C||w||(k=!1)),C?E=!1:w&&(x||S||(E=!1)),y===34&&p[0]==='"'&&A>=48&&A<=57&&(E=k=!1),k&&E&&(k=w,E=S),!k&&!E){$&&(h.content=l(h.content,p.index,a));continue}if(E){for(T=M.length-1;T>=0&&(_=M[T],!(M[T].level<b));T--)if(_.single===$&&M[T].level===b){_=M[T],$?(P=f.md.options.quotes[2],D=f.md.options.quotes[3]):(P=f.md.options.quotes[0],D=f.md.options.quotes[1]),h.content=l(h.content,p.index,D),u[_.token].content=l(u[_.token].content,_.pos,P),O+=D.length-1,_.token===d&&(O+=P.length-1),g=h.content,v=g.length,M.length=T;continue e}}k?M.push({token:d,pos:p.index,single:$,level:b}):E&&$&&(h.content=l(h.content,p.index,a))}}}}e.exports=function(f){var d;if(f.md.options.typographer)for(d=f.tokens.length-1;d>=0;d--)f.tokens[d].type!=="inline"||!s.test(f.tokens[d].content)||c(f.tokens[d].children,f)}}}),uv=Re({"node_modules/markdown-it/lib/token.js"(n,e){function t(r,i,s){this.type=r,this.tag=i,this.attrs=null,this.map=null,this.nesting=s,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}t.prototype.attrIndex=function(i){var s,o,a;if(!this.attrs)return-1;for(s=this.attrs,o=0,a=s.length;o<a;o++)if(s[o][0]===i)return o;return-1},t.prototype.attrPush=function(i){this.attrs?this.attrs.push(i):this.attrs=[i]},t.prototype.attrSet=function(i,s){var o=this.attrIndex(i),a=[i,s];o<0?this.attrPush(a):this.attrs[o]=a},t.prototype.attrGet=function(i){var s=this.attrIndex(i),o=null;return s>=0&&(o=this.attrs[s][1]),o},t.prototype.attrJoin=function(i,s){var o=this.attrIndex(i);o<0?this.attrPush([i,s]):this.attrs[o][1]=this.attrs[o][1]+" "+s},e.exports=t}}),GI=Re({"node_modules/markdown-it/lib/rules_core/state_core.js"(n,e){var t=uv();function r(i,s,o){this.src=i,this.env=o,this.tokens=[],this.inlineMode=!1,this.md=s}r.prototype.Token=t,e.exports=r}}),HI=Re({"node_modules/markdown-it/lib/parser_core.js"(n,e){var t=cv(),r=[["normalize",XI()],["block",FI()],["inline",VI()],["linkify",WI()],["replacements",YI()],["smartquotes",UI()]];function i(){this.ruler=new t;for(var s=0;s<r.length;s++)this.ruler.push(r[s][0],r[s][1])}i.prototype.process=function(s){var o,a,l;for(l=this.ruler.getRules(""),o=0,a=l.length;o<a;o++)l[o](s)},i.prototype.State=GI(),e.exports=i}}),KI=Re({"node_modules/markdown-it/lib/rules_block/table.js"(n,e){var t=Yt().isSpace;function r(s,o){var a=s.bMarks[o]+s.tShift[o],l=s.eMarks[o];return s.src.substr(a,l-a)}function i(s){var o=[],a=0,l=s.length,c,u=!1,f=0,d="";for(c=s.charCodeAt(a);a<l;)c===124&&(u?(d+=s.substring(f,a-1),f=a):(o.push(d+s.substring(f,a)),d="",f=a+1)),u=c===92,a++,c=s.charCodeAt(a);return o.push(d+s.substring(f)),o}e.exports=function(o,a,l,c){var u,f,d,h,g,p,O,v,b,_,A,y,w,S,C,x,k,E;if(a+2>l||(p=a+1,o.sCount[p]<o.blkIndent)||!o.md.options.allowIndentation&&o.sCount[p]-o.blkIndent>=4||(d=o.bMarks[p]+o.tShift[p],d>=o.eMarks[p])||(k=o.src.charCodeAt(d++),k!==124&&k!==45&&k!==58)||d>=o.eMarks[p]||(E=o.src.charCodeAt(d++),E!==124&&E!==45&&E!==58&&!t(E))||k===45&&t(E))return!1;for(;d<o.eMarks[p];){if(u=o.src.charCodeAt(d),u!==124&&u!==45&&u!==58&&!t(u))return!1;d++}for(f=r(o,a+1),O=f.split("|"),_=[],h=0;h<O.length;h++){if(A=O[h].trim(),!A){if(h===0||h===O.length-1)continue;return!1}if(!/^:?-+:?$/.test(A))return!1;A.charCodeAt(A.length-1)===58?_.push(A.charCodeAt(0)===58?"center":"right"):A.charCodeAt(0)===58?_.push("left"):_.push("")}if(f=r(o,a).trim(),f.indexOf("|")===-1||!o.md.options.allowIndentation&&o.sCount[a]-o.blkIndent>=4||(O=i(f),O.length&&O[0]===""&&O.shift(),O.length&&O[O.length-1]===""&&O.pop(),v=O.length,v===0||v!==_.length))return!1;if(c)return!0;for(S=o.parentType,o.parentType="table",x=o.md.block.ruler.getRules("blockquote"),b=o.push("table_open","table",1),b.map=y=[a,0],b=o.push("thead_open","thead",1),b.map=[a,a+1],b=o.push("tr_open","tr",1),b.map=[a,a+1],h=0;h<O.length;h++)b=o.push("th_open","th",1),_[h]&&(b.attrs=[["style","text-align:"+_[h]]]),b=o.push("inline","",0),b.content=O[h].trim(),b.children=[],b=o.push("th_close","th",-1);for(b=o.push("tr_close","tr",-1),b=o.push("thead_close","thead",-1),p=a+2;p<l&&!(o.sCount[p]<o.blkIndent);p++){for(C=!1,h=0,g=x.length;h<g;h++)if(x[h](o,p,l,!0)){C=!0;break}if(C||(f=r(o,p).trim(),!f)||!o.md.options.allowIndentation&&o.sCount[p]-o.blkIndent>=4)break;for(O=i(f),O.length&&O[0]===""&&O.shift(),O.length&&O[O.length-1]===""&&O.pop(),p===a+2&&(b=o.push("tbody_open","tbody",1),b.map=w=[a+2,0]),b=o.push("tr_open","tr",1),b.map=[p,p+1],h=0;h<v;h++)b=o.push("td_open","td",1),_[h]&&(b.attrs=[["style","text-align:"+_[h]]]),b=o.push("inline","",0),b.content=O[h]?O[h].trim():"",b.children=[],b=o.push("td_close","td",-1);b=o.push("tr_close","tr",-1)}return w&&(b=o.push("tbody_close","tbody",-1),w[1]=p),b=o.push("table_close","table",-1),y[1]=p,o.parentType=S,o.line=p,!0}}}),JI=Re({"node_modules/markdown-it/lib/rules_block/code.js"(n,e){e.exports=function(r,i,s){if(r.md.options.allowIndentation)return!1;var o,a,l;if(r.sCount[i]-r.blkIndent<4)return!1;for(a=o=i+1;o<s;){if(r.isEmpty(o)){o++;continue}if(r.sCount[o]-r.blkIndent>=4){o++,a=o;continue}break}return r.line=a,l=r.push("code_block","code",0),l.content=r.getLines(i,a,4+r.blkIndent,!1)+`
262
- `,l.map=[i,r.line],!0}}}),eN=Re({"node_modules/markdown-it/lib/rules_block/fence.js"(n,e){e.exports=function(r,i,s,o){var a,l,c,u,f,d,h,g=!1,p=r.bMarks[i]+r.tShift[i],O=r.eMarks[i];if(!r.md.options.allowIndentation&&r.sCount[i]-r.blkIndent>=4||p+3>O||(a=r.src.charCodeAt(p),a!==126&&a!==96)||(f=p,p=r.skipChars(p,a),l=p-f,l<3)||(h=r.src.slice(f,p),c=r.src.slice(p,O),a===96&&c.indexOf(String.fromCharCode(a))>=0))return!1;if(o)return!0;for(u=i;u++,!(u>=s||(p=f=r.bMarks[u]+r.tShift[u],O=r.eMarks[u],p<O&&r.sCount[u]<r.blkIndent));)if(r.src.charCodeAt(p)===a&&!(!r.md.options.allowIndentation&&r.sCount[u]-r.blkIndent>=4)&&(p=r.skipChars(p,a),!(p-f<l)&&(p=r.skipSpaces(p),!(p<O)))){g=!0;break}return l=r.sCount[i],r.line=u+(g?1:0),d=r.push("fence","code",0),d.info=c,d.content=r.getLines(i+1,u,l,!0),d.markup=h,d.map=[i,r.line],!0}}}),tN=Re({"node_modules/markdown-it/lib/rules_block/blockquote.js"(n,e){var t=Yt().isSpace;e.exports=function(i,s,o,a){var l,c,u,f,d,h,g,p,O,v,b,_,A,y,w,S,C,x,k,E,T=i.lineMax,$=i.bMarks[s]+i.tShift[s],M=i.eMarks[s];if(!i.md.options.allowIndentation&&i.sCount[s]-i.blkIndent>=4||i.src.charCodeAt($++)!==62)return!1;if(a)return!0;for(f=O=i.sCount[s]+1,i.src.charCodeAt($)===32?($++,f++,O++,l=!1,S=!0):i.src.charCodeAt($)===9?(S=!0,(i.bsCount[s]+O)%4===3?($++,f++,O++,l=!1):l=!0):S=!1,v=[i.bMarks[s]],i.bMarks[s]=$;$<M&&(c=i.src.charCodeAt($),t(c));){c===9?O+=4-(O+i.bsCount[s]+(l?1:0))%4:O++;$++}for(b=[i.bsCount[s]],i.bsCount[s]=i.sCount[s]+1+(S?1:0),h=$>=M,y=[i.sCount[s]],i.sCount[s]=O-f,w=[i.tShift[s]],i.tShift[s]=$-i.bMarks[s],x=i.md.block.ruler.getRules("blockquote"),A=i.parentType,i.parentType="blockquote",p=s+1;p<o&&(E=i.sCount[p]<i.blkIndent,$=i.bMarks[p]+i.tShift[p],M=i.eMarks[p],!($>=M));p++){if(i.src.charCodeAt($++)===62&&!E){for(f=O=i.sCount[p]+1,i.src.charCodeAt($)===32?($++,f++,O++,l=!1,S=!0):i.src.charCodeAt($)===9?(S=!0,(i.bsCount[p]+O)%4===3?($++,f++,O++,l=!1):l=!0):S=!1,v.push(i.bMarks[p]),i.bMarks[p]=$;$<M&&(c=i.src.charCodeAt($),t(c));){c===9?O+=4-(O+i.bsCount[p]+(l?1:0))%4:O++;$++}h=$>=M,b.push(i.bsCount[p]),i.bsCount[p]=i.sCount[p]+1+(S?1:0),y.push(i.sCount[p]),i.sCount[p]=O-f,w.push(i.tShift[p]),i.tShift[p]=$-i.bMarks[p];continue}if(h)break;for(C=!1,u=0,d=x.length;u<d;u++)if(x[u](i,p,o,!0)){C=!0;break}if(C){i.lineMax=p,i.blkIndent!==0&&(v.push(i.bMarks[p]),b.push(i.bsCount[p]),w.push(i.tShift[p]),y.push(i.sCount[p]),i.sCount[p]-=i.blkIndent);break}v.push(i.bMarks[p]),b.push(i.bsCount[p]),w.push(i.tShift[p]),y.push(i.sCount[p]),i.sCount[p]=-1}for(_=i.blkIndent,i.blkIndent=0,k=i.push("blockquote_open","blockquote",1),k.markup=">",k.map=g=[s,0],i.md.block.tokenize(i,s,p),k=i.push("blockquote_close","blockquote",-1),k.markup=">",i.lineMax=T,i.parentType=A,g[1]=i.line,u=0;u<w.length;u++)i.bMarks[u+s]=v[u],i.tShift[u+s]=w[u],i.sCount[u+s]=y[u],i.bsCount[u+s]=b[u];return i.blkIndent=_,!0}}}),nN=Re({"node_modules/markdown-it/lib/rules_block/hr.js"(n,e){var t=Yt().isSpace;e.exports=function(i,s,o,a){var l,c,u,f,d=i.bMarks[s]+i.tShift[s],h=i.eMarks[s];if(!i.md.options.allowIndentation&&i.sCount[s]-i.blkIndent>=4||(l=i.src.charCodeAt(d++),l!==42&&l!==45&&l!==95))return!1;for(c=1;d<h;){if(u=i.src.charCodeAt(d++),u!==l&&!t(u))return!1;u===l&&c++}return c<3?!1:(a||(i.line=s+1,f=i.push("hr","hr",0),f.map=[s,i.line],f.markup=Array(c+1).join(String.fromCharCode(l))),!0)}}}),rN=Re({"node_modules/markdown-it/lib/rules_block/list.js"(n,e){var t=Yt().isSpace;function r(o,a){var l,c,u,f;return c=o.bMarks[a]+o.tShift[a],u=o.eMarks[a],l=o.src.charCodeAt(c++),l!==42&&l!==45&&l!==43||c<u&&(f=o.src.charCodeAt(c),!t(f))?-1:c}function i(o,a){var l,c=o.bMarks[a]+o.tShift[a],u=c,f=o.eMarks[a];if(u+1>=f||(l=o.src.charCodeAt(u++),l<48||l>57))return-1;for(;;){if(u>=f)return-1;if(l=o.src.charCodeAt(u++),l>=48&&l<=57){if(u-c>=10)return-1;continue}if(l===41||l===46)break;return-1}return u<f&&(l=o.src.charCodeAt(u),!t(l))?-1:u}function s(o,a){var l,c,u=o.level+2;for(l=a+2,c=o.tokens.length-2;l<c;l++)o.tokens[l].level===u&&o.tokens[l].type==="paragraph_open"&&(o.tokens[l+2].hidden=!0,o.tokens[l].hidden=!0,l+=2)}e.exports=function(a,l,c,u){var f,d,h,g,p,O,v,b,_,A,y,w,S,C,x,k,E,T,$,M,P,D,I,W,U,ae,ce,K,H=!1,se=!0;if(!a.md.options.allowIndentation&&a.sCount[l]-a.blkIndent>=4||!a.md.options.allowIndentation&&a.listIndent>=0&&a.sCount[l]-a.listIndent>=4&&a.sCount[l]<a.blkIndent)return!1;if(u&&a.parentType==="paragraph"&&a.sCount[l]>=a.blkIndent&&(H=!0),(I=i(a,l))>=0){if(v=!0,U=a.bMarks[l]+a.tShift[l],S=Number(a.src.slice(U,I-1)),H&&S!==1)return!1}else if((I=r(a,l))>=0)v=!1;else return!1;if(H&&a.skipSpaces(I)>=a.eMarks[l])return!1;if(w=a.src.charCodeAt(I-1),u)return!0;for(y=a.tokens.length,v?(K=a.push("ordered_list_open","ol",1),S!==1&&(K.attrs=[["start",S]])):K=a.push("bullet_list_open","ul",1),K.map=A=[l,0],K.markup=String.fromCharCode(w),x=l,W=!1,ce=a.md.block.ruler.getRules("list"),T=a.parentType,a.parentType="list";x<c;){for(D=I,C=a.eMarks[x],O=k=a.sCount[x]+I-(a.bMarks[l]+a.tShift[l]);D<C;){if(f=a.src.charCodeAt(D),f===9)k+=4-(k+a.bsCount[x])%4;else if(f===32)k++;else break;D++}if(d=D,d>=C?p=1:p=k-O,!a.md.options.allowIndentation&&p>4&&(p=1),g=O+p,K=a.push("list_item_open","li",1),K.markup=String.fromCharCode(w),K.map=b=[l,0],v&&(K.info=a.src.slice(U,I-1)),P=a.tight,M=a.tShift[l],$=a.sCount[l],E=a.listIndent,a.listIndent=a.blkIndent,a.blkIndent=g,a.tight=!0,a.tShift[l]=d-a.bMarks[l],a.sCount[l]=k,d>=C&&a.isEmpty(l+1)?a.line=Math.min(a.line+2,c):a.md.block.tokenize(a,l,c,!0),(!a.tight||W)&&(se=!1),W=a.line-l>1&&a.isEmpty(a.line-1),a.blkIndent=a.listIndent,a.listIndent=E,a.tShift[l]=M,a.sCount[l]=$,a.tight=P,K=a.push("list_item_close","li",-1),K.markup=String.fromCharCode(w),x=l=a.line,b[1]=x,d=a.bMarks[l],x>=c||a.sCount[x]<a.blkIndent||!a.md.options.allowIndentation&&a.sCount[l]-a.blkIndent>=4)break;for(ae=!1,h=0,_=ce.length;h<_;h++)if(ce[h](a,x,c,!0)){ae=!0;break}if(ae)break;if(v){if(I=i(a,x),I<0)break;U=a.bMarks[x]+a.tShift[x]}else if(I=r(a,x),I<0)break;if(w!==a.src.charCodeAt(I-1))break}return v?K=a.push("ordered_list_close","ol",-1):K=a.push("bullet_list_close","ul",-1),K.markup=String.fromCharCode(w),A[1]=x,a.line=x,a.parentType=T,se&&s(a,y),!0}}}),iN=Re({"node_modules/markdown-it/lib/rules_block/reference.js"(n,e){var t=Yt().normalizeReference,r=Yt().isSpace;e.exports=function(s,o,a,l){var c,u,f,d,h,g,p,O,v,b,_,A,y,w,S,C,x=0,k=s.bMarks[o]+s.tShift[o],E=s.eMarks[o],T=o+1;if(!s.md.options.allowIndentation&&s.sCount[o]-s.blkIndent>=4||s.src.charCodeAt(k)!==91)return!1;for(;++k<E;)if(s.src.charCodeAt(k)===93&&s.src.charCodeAt(k-1)!==92){if(k+1===E||s.src.charCodeAt(k+1)!==58)return!1;break}for(d=s.lineMax,S=s.md.block.ruler.getRules("reference"),b=s.parentType,s.parentType="reference";T<d&&!s.isEmpty(T);T++)if(!(!s.md.options.allowIndentation&&s.sCount[T]-s.blkIndent>3)&&!(s.sCount[T]<0)){for(w=!1,g=0,p=S.length;g<p;g++)if(S[g](s,T,d,!0)){w=!0;break}if(w)break}for(y=s.getLines(o,T,s.blkIndent,!1).trim(),E=y.length,k=1;k<E;k++){if(c=y.charCodeAt(k),c===91)return!1;if(c===93){v=k;break}else c===10?x++:c===92&&(k++,k<E&&y.charCodeAt(k)===10&&x++)}if(v<0||y.charCodeAt(v+1)!==58)return!1;for(k=v+2;k<E;k++)if(c=y.charCodeAt(k),c===10)x++;else if(!r(c))break;if(_=s.md.helpers.parseLinkDestination(y,k,E),!_.ok||(h=s.md.normalizeLink(_.str),!s.md.validateLink(h)))return!1;for(k=_.pos,x+=_.lines,u=k,f=x,A=k;k<E;k++)if(c=y.charCodeAt(k),c===10)x++;else if(!r(c))break;for(_=s.md.helpers.parseLinkTitle(y,k,E),k<E&&A!==k&&_.ok?(C=_.str,k=_.pos,x+=_.lines):(C="",k=u,x=f);k<E&&(c=y.charCodeAt(k),!!r(c));)k++;if(k<E&&y.charCodeAt(k)!==10&&C)for(C="",k=u,x=f;k<E&&(c=y.charCodeAt(k),!!r(c));)k++;return k<E&&y.charCodeAt(k)!==10||(O=t(y.slice(1,v)),!O)?!1:(l||(typeof s.env.references>"u"&&(s.env.references={}),typeof s.env.references[O]>"u"&&(s.env.references[O]={title:C,href:h}),s.parentType=b,s.line=o+x+1),!0)}}}),sN=Re({"node_modules/markdown-it/lib/common/html_blocks.js"(n,e){e.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]}}),sA=Re({"node_modules/markdown-it/lib/common/html_re.js"(n,e){var t="[a-zA-Z_:][a-zA-Z0-9:._-]*",r="[^\"'=<>`\\x00-\\x20]+",i="'[^']*'",s='"[^"]*"',o="(?:"+r+"|"+i+"|"+s+")",a="(?:\\s+"+t+"(?:\\s*=\\s*"+o+")?)",l="<[A-Za-z][A-Za-z0-9\\-]*"+a+"*\\s*\\/?>",c="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",u="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",f="<[?][\\s\\S]*?[?]>",d="<![A-Z]+\\s+[^>]*>",h="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",g=new RegExp("^(?:"+l+"|"+c+"|"+u+"|"+f+"|"+d+"|"+h+")"),p=new RegExp("^(?:"+l+"|"+c+")");e.exports.HTML_TAG_RE=g,e.exports.HTML_OPEN_CLOSE_TAG_RE=p}}),oN=Re({"node_modules/markdown-it/lib/rules_block/html_block.js"(n,e){var t=sN(),r=sA().HTML_OPEN_CLOSE_TAG_RE,i=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+t.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(r.source+"\\s*$"),/^$/,!1]];e.exports=function(o,a,l,c){var u,f,d,h,g=o.bMarks[a]+o.tShift[a],p=o.eMarks[a];if(!o.md.options.allowIndentation&&o.sCount[a]-o.blkIndent>=4||!o.md.options.html||o.src.charCodeAt(g)!==60)return!1;for(h=o.src.slice(g,p),u=0;u<i.length&&!i[u][0].test(h);u++);if(u===i.length)return!1;if(c)return i[u][2];if(f=a+1,!i[u][1].test(h)){for(;f<l&&!(o.sCount[f]<o.blkIndent);f++)if(g=o.bMarks[f]+o.tShift[f],p=o.eMarks[f],h=o.src.slice(g,p),i[u][1].test(h)){h.length!==0&&f++;break}}return o.line=f,d=o.push("html_block","",0),d.map=[a,f],d.content=o.getLines(a,f,o.blkIndent,!0),!0}}}),aN=Re({"node_modules/markdown-it/lib/rules_block/heading.js"(n,e){var t=Yt().isSpace;e.exports=function(i,s,o,a){var l,c,u,f,d=i.bMarks[s]+i.tShift[s],h=i.eMarks[s];if(!i.md.options.allowIndentation&&i.sCount[s]-i.blkIndent>=4||(l=i.src.charCodeAt(d),l!==35||d>=h))return!1;for(c=1,l=i.src.charCodeAt(++d);l===35&&d<h&&c<=6;)c++,l=i.src.charCodeAt(++d);return c>6||d<h&&!t(l)?!1:(a||(h=i.skipSpacesBack(h,d),u=i.skipCharsBack(h,35,d),u>d&&t(i.src.charCodeAt(u-1))&&(h=u),i.line=s+1,f=i.push("heading_open","h"+String(c),1),f.markup="########".slice(0,c),f.map=[s,i.line],f=i.push("inline","",0),f.content=i.src.slice(d,h).trim(),f.map=[s,i.line],f.children=[],f=i.push("heading_close","h"+String(c),-1),f.markup="########".slice(0,c)),!0)}}}),lN=Re({"node_modules/markdown-it/lib/rules_block/lheading.js"(n,e){e.exports=function(r,i,s){var o,a,l,c,u,f,d,h,g,p=i+1,O,v=r.md.block.ruler.getRules("paragraph");if(!r.md.options.allowIndentation&&r.sCount[i]-r.blkIndent>=4)return!1;for(O=r.parentType,r.parentType="paragraph";p<s&&!r.isEmpty(p);p++)if(!(!r.md.options.allowIndentation&&r.sCount[p]-r.blkIndent>3)){if(r.sCount[p]>=r.blkIndent&&(f=r.bMarks[p]+r.tShift[p],d=r.eMarks[p],f<d&&(g=r.src.charCodeAt(f),(g===45||g===61)&&(f=r.skipChars(f,g),f=r.skipSpaces(f),f>=d)))){h=g===61?1:2;break}if(!(r.sCount[p]<0)){for(a=!1,l=0,c=v.length;l<c;l++)if(v[l](r,p,s,!0)){a=!0;break}if(a)break}}return h?(o=r.getLines(i,p,r.blkIndent,!1).trim(),r.line=p+1,u=r.push("heading_open","h"+String(h),1),u.markup=String.fromCharCode(g),u.map=[i,r.line],u=r.push("inline","",0),u.content=o,u.map=[i,r.line-1],u.children=[],u=r.push("heading_close","h"+String(h),-1),u.markup=String.fromCharCode(g),r.parentType=O,!0):!1}}}),cN=Re({"node_modules/markdown-it/lib/rules_block/paragraph.js"(n,e){e.exports=function(r,i){var s,o,a,l,c,u,f=i+1,d=r.md.block.ruler.getRules("paragraph"),h=r.lineMax;for(u=r.parentType,r.parentType="paragraph";f<h&&!r.isEmpty(f);f++)if(!(!r.md.options.allowIndentation&&r.sCount[f]-r.blkIndent>3)&&!(r.sCount[f]<0)){for(o=!1,a=0,l=d.length;a<l;a++)if(d[a](r,f,h,!0)){o=!0;break}if(o)break}return s=r.getLines(i,f,r.blkIndent,!1).trim(),r.line=f,c=r.push("paragraph_open","p",1),c.map=[i,r.line],c=r.push("inline","",0),c.content=s,c.map=[i,r.line],c.children=[],c=r.push("paragraph_close","p",-1),r.parentType=u,!0}}}),uN=Re({"node_modules/markdown-it/lib/rules_block/state_block.js"(n,e){var t=uv(),r=Yt().isSpace;function i(s,o,a,l){var c,u,f,d,h,g,p,O;for(this.src=s,this.md=o,this.env=a,this.tokens=l,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",u=this.src,O=!1,f=d=g=p=0,h=u.length;d<h;d++){if(c=u.charCodeAt(d),!O)if(r(c)){g++,c===9?p+=4-p%4:p++;continue}else O=!0;(c===10||d===h-1)&&(c!==10&&d++,this.bMarks.push(f),this.eMarks.push(d),this.tShift.push(g),this.sCount.push(p),this.bsCount.push(0),O=!1,g=0,p=0,f=d+1)}this.bMarks.push(u.length),this.eMarks.push(u.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}i.prototype.push=function(s,o,a){var l=new t(s,o,a);return l.block=!0,a<0&&this.level--,l.level=this.level,a>0&&this.level++,this.tokens.push(l),l},i.prototype.isEmpty=function(o){return this.bMarks[o]+this.tShift[o]>=this.eMarks[o]},i.prototype.skipEmptyLines=function(o){for(var a=this.lineMax;o<a&&!(this.bMarks[o]+this.tShift[o]<this.eMarks[o]);o++);return o},i.prototype.skipSpaces=function(o){for(var a,l=this.src.length;o<l&&(a=this.src.charCodeAt(o),!!r(a));o++);return o},i.prototype.skipSpacesBack=function(o,a){if(o<=a)return o;for(;o>a;)if(!r(this.src.charCodeAt(--o)))return o+1;return o},i.prototype.skipChars=function(o,a){for(var l=this.src.length;o<l&&this.src.charCodeAt(o)===a;o++);return o},i.prototype.skipCharsBack=function(o,a,l){if(o<=l)return o;for(;o>l;)if(a!==this.src.charCodeAt(--o))return o+1;return o},i.prototype.getLines=function(o,a,l,c){var u,f,d,h,g,p,O,v=o;if(o>=a)return"";for(p=new Array(a-o),u=0;v<a;v++,u++){for(f=0,O=h=this.bMarks[v],v+1<a||c?g=this.eMarks[v]+1:g=this.eMarks[v];h<g&&f<l;){if(d=this.src.charCodeAt(h),r(d))d===9?f+=4-(f+this.bsCount[v])%4:f++;else if(h-O<this.tShift[v])f++;else break;h++}f>l?p[u]=new Array(f-l+1).join(" ")+this.src.slice(h,g):p[u]=this.src.slice(h,g)}return p.join("")},i.prototype.Token=t,e.exports=i}}),fN=Re({"node_modules/markdown-it/lib/parser_block.js"(n,e){var t=cv(),r=[["table",KI(),["paragraph","reference"]],["code",JI()],["fence",eN(),["paragraph","reference","blockquote","list"]],["blockquote",tN(),["paragraph","reference","blockquote","list"]],["hr",nN(),["paragraph","reference","blockquote","list"]],["list",rN(),["paragraph","reference","blockquote"]],["reference",iN()],["html_block",oN(),["paragraph","reference","blockquote"]],["heading",aN(),["paragraph","reference","blockquote"]],["lheading",lN()],["paragraph",cN()]];function i(){this.ruler=new t;for(var s=0;s<r.length;s++)this.ruler.push(r[s][0],r[s][1],{alt:(r[s][2]||[]).slice()})}i.prototype.tokenize=function(s,o,a){for(var l,c,u=this.ruler.getRules(""),f=u.length,d=o,h=!1,g=s.md.options.maxNesting;d<a&&(s.line=d=s.skipEmptyLines(d),!(d>=a||s.sCount[d]<s.blkIndent));){if(s.level>=g){s.line=a;break}for(c=0;c<f&&(l=u[c](s,d,a,!1),!l);c++);s.tight=!h,s.isEmpty(s.line-1)&&(h=!0),d=s.line,d<a&&s.isEmpty(d)&&(h=!0,d++,s.line=d)}},i.prototype.parse=function(s,o,a,l){var c;s&&(c=new this.State(s,o,a,l),this.tokenize(c,c.line,c.lineMax))},i.prototype.State=uN(),e.exports=i}}),dN=Re({"node_modules/markdown-it/lib/rules_inline/text.js"(n,e){function t(r){switch(r){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}e.exports=function(i,s){for(var o=i.pos;o<i.posMax&&!t(i.src.charCodeAt(o));)o++;return o===i.pos?!1:(s||(i.pending+=i.src.slice(i.pos,o)),i.pos=o,!0)}}}),hN=Re({"node_modules/markdown-it/lib/rules_inline/newline.js"(n,e){var t=Yt().isSpace;e.exports=function(i,s){var o,a,l,c=i.pos;if(i.src.charCodeAt(c)!==10)return!1;if(o=i.pending.length-1,a=i.posMax,!s)if(o>=0&&i.pending.charCodeAt(o)===32)if(o>=1&&i.pending.charCodeAt(o-1)===32){for(l=o-1;l>=1&&i.pending.charCodeAt(l-1)===32;)l--;i.pending=i.pending.slice(0,l),i.push("hardbreak","br",0)}else i.pending=i.pending.slice(0,-1),i.push("softbreak","br",0);else i.push("softbreak","br",0);for(c++;c<a&&t(i.src.charCodeAt(c));)c++;return i.pos=c,!0}}}),pN=Re({"node_modules/markdown-it/lib/rules_inline/escape.js"(n,e){var t=Yt().isSpace,r=[];for(i=0;i<256;i++)r.push(0);var i;"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(s){r[s.charCodeAt(0)]=1}),e.exports=function(o,a){var l,c=o.pos,u=o.posMax;if(o.src.charCodeAt(c)!==92)return!1;if(c++,c<u){if(l=o.src.charCodeAt(c),l<256&&r[l]!==0)return a||(o.pending+=o.src[c]),o.pos+=2,!0;if(l===10){for(a||o.push("hardbreak","br",0),c++;c<u&&(l=o.src.charCodeAt(c),!!t(l));)c++;return o.pos=c,!0}}return a||(o.pending+="\\"),o.pos++,!0}}}),mN=Re({"node_modules/markdown-it/lib/rules_inline/backticks.js"(n,e){e.exports=function(r,i){var s,o,a,l,c,u,f,d,h=r.pos,g=r.src.charCodeAt(h);if(g!==96)return!1;for(s=h,h++,o=r.posMax;h<o&&r.src.charCodeAt(h)===96;)h++;if(a=r.src.slice(s,h),f=a.length,r.backticksScanned&&(r.backticks[f]||0)<=s)return i||(r.pending+=a),r.pos+=f,!0;for(c=u=h;(c=r.src.indexOf("`",u))!==-1;){for(u=c+1;u<o&&r.src.charCodeAt(u)===96;)u++;if(d=u-c,d===f)return i||(l=r.push("code_inline","code",0),l.markup=a,l.content=r.src.slice(h,c).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),r.pos=u,!0;r.backticks[d]=c}return r.backticksScanned=!0,i||(r.pending+=a),r.pos+=f,!0}}}),M1=Re({"node_modules/markdown-it/lib/rules_inline/strikethrough.js"(n,e){e.exports.tokenize=function(i,s){var o,a,l,c,u,f=i.pos,d=i.src.charCodeAt(f);if(s||d!==126||(a=i.scanDelims(i.pos,!0),c=a.length,u=String.fromCharCode(d),c<2))return!1;for(c%2&&(l=i.push("text","",0),l.content=u,c--),o=0;o<c;o+=2)l=i.push("text","",0),l.content=u+u,i.delimiters.push({marker:d,length:0,token:i.tokens.length-1,end:-1,open:a.can_open,close:a.can_close});return i.pos+=a.length,!0};function t(r,i){var s,o,a,l,c,u=[],f=i.length;for(s=0;s<f;s++)a=i[s],a.marker===126&&a.end!==-1&&(l=i[a.end],c=r.tokens[a.token],c.type="s_open",c.tag="s",c.nesting=1,c.markup="~~",c.content="",c=r.tokens[l.token],c.type="s_close",c.tag="s",c.nesting=-1,c.markup="~~",c.content="",r.tokens[l.token-1].type==="text"&&r.tokens[l.token-1].content==="~"&&u.push(l.token-1));for(;u.length;){for(s=u.pop(),o=s+1;o<r.tokens.length&&r.tokens[o].type==="s_close";)o++;o--,s!==o&&(c=r.tokens[o],r.tokens[o]=r.tokens[s],r.tokens[s]=c)}}e.exports.postProcess=function(i){var s,o=i.tokens_meta,a=i.tokens_meta.length;for(t(i,i.delimiters),s=0;s<a;s++)o[s]&&o[s].delimiters&&t(i,o[s].delimiters)}}}),D1=Re({"node_modules/markdown-it/lib/rules_inline/emphasis.js"(n,e){e.exports.tokenize=function(i,s){var o,a,l,c=i.pos,u=i.src.charCodeAt(c);if(s||u!==95&&u!==42)return!1;for(a=i.scanDelims(i.pos,u===42),o=0;o<a.length;o++)l=i.push("text","",0),l.content=String.fromCharCode(u),i.delimiters.push({marker:u,length:a.length,token:i.tokens.length-1,end:-1,open:a.can_open,close:a.can_close});return i.pos+=a.length,!0};function t(r,i){var s,o,a,l,c,u,f=i.length;for(s=f-1;s>=0;s--)o=i[s],!(o.marker!==95&&o.marker!==42)&&o.end!==-1&&(a=i[o.end],u=s>0&&i[s-1].end===o.end+1&&i[s-1].marker===o.marker&&i[s-1].token===o.token-1&&i[o.end+1].token===a.token+1,c=String.fromCharCode(o.marker),l=r.tokens[o.token],l.type=u?"strong_open":"em_open",l.tag=u?"strong":"em",l.nesting=1,l.markup=u?c+c:c,l.content="",l=r.tokens[a.token],l.type=u?"strong_close":"em_close",l.tag=u?"strong":"em",l.nesting=-1,l.markup=u?c+c:c,l.content="",u&&(r.tokens[i[s-1].token].content="",r.tokens[i[o.end+1].token].content="",s--))}e.exports.postProcess=function(i){var s,o=i.tokens_meta,a=i.tokens_meta.length;for(t(i,i.delimiters),s=0;s<a;s++)o[s]&&o[s].delimiters&&t(i,o[s].delimiters)}}}),gN=Re({"node_modules/markdown-it/lib/rules_inline/link.js"(n,e){var t=Yt().normalizeReference,r=Yt().isSpace;e.exports=function(s,o){var a,l,c,u,f,d,h,g,p,O="",v="",b=s.pos,_=s.posMax,A=s.pos,y=!0;if(s.src.charCodeAt(s.pos)!==91||(f=s.pos+1,u=s.md.helpers.parseLinkLabel(s,s.pos,!0),u<0))return!1;if(d=u+1,d<_&&s.src.charCodeAt(d)===40){for(y=!1,d++;d<_&&(l=s.src.charCodeAt(d),!(!r(l)&&l!==10));d++);if(d>=_)return!1;if(A=d,h=s.md.helpers.parseLinkDestination(s.src,d,s.posMax),h.ok){for(O=s.md.normalizeLink(h.str),s.md.validateLink(O)?d=h.pos:O="",A=d;d<_&&(l=s.src.charCodeAt(d),!(!r(l)&&l!==10));d++);if(h=s.md.helpers.parseLinkTitle(s.src,d,s.posMax),d<_&&A!==d&&h.ok)for(v=h.str,d=h.pos;d<_&&(l=s.src.charCodeAt(d),!(!r(l)&&l!==10));d++);}(d>=_||s.src.charCodeAt(d)!==41)&&(y=!0),d++}if(y){if(typeof s.env.references>"u")return!1;if(d<_&&s.src.charCodeAt(d)===91?(A=d+1,d=s.md.helpers.parseLinkLabel(s,d),d>=0?c=s.src.slice(A,d++):d=u+1):d=u+1,c||(c=s.src.slice(f,u)),g=s.env.references[t(c)],!g)return s.pos=b,!1;O=g.href,v=g.title}return o||(s.pos=f,s.posMax=u,p=s.push("link_open","a",1),p.attrs=a=[["href",O]],v&&a.push(["title",v]),s.md.inline.tokenize(s),p=s.push("link_close","a",-1)),s.pos=d,s.posMax=_,!0}}}),ON=Re({"node_modules/markdown-it/lib/rules_inline/image.js"(n,e){var t=Yt().normalizeReference,r=Yt().isSpace;e.exports=function(s,o){var a,l,c,u,f,d,h,g,p,O,v,b,_,A="",y=s.pos,w=s.posMax;if(s.src.charCodeAt(s.pos)!==33||s.src.charCodeAt(s.pos+1)!==91||(d=s.pos+2,f=s.md.helpers.parseLinkLabel(s,s.pos+1,!1),f<0))return!1;if(h=f+1,h<w&&s.src.charCodeAt(h)===40){for(h++;h<w&&(l=s.src.charCodeAt(h),!(!r(l)&&l!==10));h++);if(h>=w)return!1;for(_=h,p=s.md.helpers.parseLinkDestination(s.src,h,s.posMax),p.ok&&(A=s.md.normalizeLink(p.str),s.md.validateLink(A)?h=p.pos:A=""),_=h;h<w&&(l=s.src.charCodeAt(h),!(!r(l)&&l!==10));h++);if(p=s.md.helpers.parseLinkTitle(s.src,h,s.posMax),h<w&&_!==h&&p.ok)for(O=p.str,h=p.pos;h<w&&(l=s.src.charCodeAt(h),!(!r(l)&&l!==10));h++);else O="";if(h>=w||s.src.charCodeAt(h)!==41)return s.pos=y,!1;h++}else{if(typeof s.env.references>"u")return!1;if(h<w&&s.src.charCodeAt(h)===91?(_=h+1,h=s.md.helpers.parseLinkLabel(s,h),h>=0?u=s.src.slice(_,h++):h=f+1):h=f+1,u||(u=s.src.slice(d,f)),g=s.env.references[t(u)],!g)return s.pos=y,!1;A=g.href,O=g.title}return o||(c=s.src.slice(d,f),s.md.inline.parse(c,s.md,s.env,b=[]),v=s.push("image","img",0),v.attrs=a=[["src",A],["alt",""]],v.children=b,v.content=c,O&&a.push(["title",O])),s.pos=h,s.posMax=w,!0}}}),vN=Re({"node_modules/markdown-it/lib/rules_inline/autolink.js"(n,e){var t=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,r=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;e.exports=function(s,o){var a,l,c,u,f,d,h=s.pos;if(s.src.charCodeAt(h)!==60)return!1;for(f=s.pos,d=s.posMax;;){if(++h>=d||(u=s.src.charCodeAt(h),u===60))return!1;if(u===62)break}return a=s.src.slice(f+1,h),r.test(a)?(l=s.md.normalizeLink(a),s.md.validateLink(l)?(o||(c=s.push("link_open","a",1),c.attrs=[["href",l]],c.markup="autolink",c.info="auto",c=s.push("text","",0),c.content=s.md.normalizeLinkText(a),c=s.push("link_close","a",-1),c.markup="autolink",c.info="auto"),s.pos+=a.length+2,!0):!1):t.test(a)?(l=s.md.normalizeLink("mailto:"+a),s.md.validateLink(l)?(o||(c=s.push("link_open","a",1),c.attrs=[["href",l]],c.markup="autolink",c.info="auto",c=s.push("text","",0),c.content=s.md.normalizeLinkText(a),c=s.push("link_close","a",-1),c.markup="autolink",c.info="auto"),s.pos+=a.length+2,!0):!1):!1}}}),bN=Re({"node_modules/markdown-it/lib/rules_inline/html_inline.js"(n,e){var t=sA().HTML_TAG_RE;function r(i){var s=i|32;return s>=97&&s<=122}e.exports=function(s,o){var a,l,c,u,f=s.pos;return!s.md.options.html||(c=s.posMax,s.src.charCodeAt(f)!==60||f+2>=c)||(a=s.src.charCodeAt(f+1),a!==33&&a!==63&&a!==47&&!r(a))||(l=s.src.slice(f).match(t),!l)?!1:(o||(u=s.push("html_inline","",0),u.content=s.src.slice(f,f+l[0].length)),s.pos+=l[0].length,!0)}}}),yN=Re({"node_modules/markdown-it/lib/rules_inline/entity.js"(n,e){var t=eA(),r=Yt().has,i=Yt().isValidEntityCode,s=Yt().fromCodePoint,o=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,a=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(c,u){var f,d,h,g=c.pos,p=c.posMax;if(c.src.charCodeAt(g)!==38)return!1;if(g+1<p){if(f=c.src.charCodeAt(g+1),f===35){if(h=c.src.slice(g).match(o),h)return u||(d=h[1][0].toLowerCase()==="x"?parseInt(h[1].slice(1),16):parseInt(h[1],10),c.pending+=i(d)?s(d):s(65533)),c.pos+=h[0].length,!0}else if(h=c.src.slice(g).match(a),h&&r(t,h[1]))return u||(c.pending+=t[h[1]]),c.pos+=h[0].length,!0}return u||(c.pending+="&"),c.pos++,!0}}}),wN=Re({"node_modules/markdown-it/lib/rules_inline/balance_pairs.js"(n,e){function t(r,i){var s,o,a,l,c,u,f,d,h={},g=i.length;if(g){var p=0,O=-2,v=[];for(s=0;s<g;s++)if(a=i[s],v.push(0),(i[p].marker!==a.marker||O!==a.token-1)&&(p=s),O=a.token,a.length=a.length||0,!!a.close){for(h.hasOwnProperty(a.marker)||(h[a.marker]=[-1,-1,-1,-1,-1,-1]),c=h[a.marker][(a.open?3:0)+a.length%3],o=p-v[p]-1,u=o;o>c;o-=v[o]+1)if(l=i[o],l.marker===a.marker&&l.open&&l.end<0&&(f=!1,(l.close||a.open)&&(l.length+a.length)%3===0&&(l.length%3!==0||a.length%3!==0)&&(f=!0),!f)){d=o>0&&!i[o-1].open?v[o-1]+1:0,v[s]=s-o+d,v[o]=d,a.open=!1,l.end=s,l.close=!1,u=-1,O=-2;break}u!==-1&&(h[a.marker][(a.open?3:0)+(a.length||0)%3]=u)}}}e.exports=function(i){var s,o=i.tokens_meta,a=i.tokens_meta.length;for(t(i,i.delimiters),s=0;s<a;s++)o[s]&&o[s].delimiters&&t(i,o[s].delimiters)}}}),_N=Re({"node_modules/markdown-it/lib/rules_inline/text_collapse.js"(n,e){e.exports=function(r){var i,s,o=0,a=r.tokens,l=r.tokens.length;for(i=s=0;i<l;i++)a[i].nesting<0&&o--,a[i].level=o,a[i].nesting>0&&o++,a[i].type==="text"&&i+1<l&&a[i+1].type==="text"?a[i+1].content=a[i].content+a[i+1].content:(i!==s&&(a[s]=a[i]),s++);i!==s&&(a.length=s)}}}),kN=Re({"node_modules/markdown-it/lib/rules_inline/state_inline.js"(n,e){var t=uv(),r=Yt().isWhiteSpace,i=Yt().isPunctChar,s=Yt().isMdAsciiPunct;function o(a,l,c,u){this.src=a,this.env=c,this.md=l,this.tokens=u,this.tokens_meta=Array(u.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1}o.prototype.pushPending=function(){var a=new t("text","",0);return a.content=this.pending,a.level=this.pendingLevel,this.tokens.push(a),this.pending="",a},o.prototype.push=function(a,l,c){this.pending&&this.pushPending();var u=new t(a,l,c),f=null;return c<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),u.level=this.level,c>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],f={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(u),this.tokens_meta.push(f),u},o.prototype.scanDelims=function(a,l){var c=a,u,f,d,h,g,p,O,v,b,_=!0,A=!0,y=this.posMax,w=this.src.charCodeAt(a);for(u=a>0?this.src.charCodeAt(a-1):32;c<y&&this.src.charCodeAt(c)===w;)c++;return d=c-a,f=c<y?this.src.charCodeAt(c):32,O=s(u)||i(String.fromCharCode(u)),b=s(f)||i(String.fromCharCode(f)),p=r(u),v=r(f),v?_=!1:b&&(p||O||(_=!1)),p?A=!1:O&&(v||b||(A=!1)),l?(h=_,g=A):(h=_&&(!A||O),g=A&&(!_||b)),{can_open:h,can_close:g,length:d}},o.prototype.Token=t,e.exports=o}}),xN=Re({"node_modules/markdown-it/lib/parser_inline.js"(n,e){var t=cv(),r=[["text",dN()],["newline",hN()],["escape",pN()],["backticks",mN()],["strikethrough",M1().tokenize],["emphasis",D1().tokenize],["link",gN()],["image",ON()],["autolink",vN()],["html_inline",bN()],["entity",yN()]],i=[["balance_pairs",wN()],["strikethrough",M1().postProcess],["emphasis",D1().postProcess],["text_collapse",_N()]];function s(){var o;for(this.ruler=new t,o=0;o<r.length;o++)this.ruler.push(r[o][0],r[o][1]);for(this.ruler2=new t,o=0;o<i.length;o++)this.ruler2.push(i[o][0],i[o][1])}s.prototype.skipToken=function(o){var a,l,c=o.pos,u=this.ruler.getRules(""),f=u.length,d=o.md.options.maxNesting,h=o.cache;if(typeof h[c]<"u"){o.pos=h[c];return}if(o.level<d)for(l=0;l<f&&(o.level++,a=u[l](o,!0),o.level--,!a);l++);else o.pos=o.posMax;a||o.pos++,h[c]=o.pos},s.prototype.tokenize=function(o){for(var a,l,c=this.ruler.getRules(""),u=c.length,f=o.posMax,d=o.md.options.maxNesting;o.pos<f;){if(o.level<d)for(l=0;l<u&&(a=c[l](o,!1),!a);l++);if(a){if(o.pos>=f)break;continue}o.pending+=o.src[o.pos++]}o.pending&&o.pushPending()},s.prototype.parse=function(o,a,l,c){var u,f,d,h=new this.State(o,a,l,c);for(this.tokenize(h),f=this.ruler2.getRules(""),d=f.length,u=0;u<d;u++)f[u](h)},s.prototype.State=kN(),e.exports=s}}),SN=Re({"node_modules/linkify-it/lib/re.js"(n,e){e.exports=function(t){var r={};r.src_Any=nA().source,r.src_Cc=rA().source,r.src_Z=iA().source,r.src_P=lv().source,r.src_ZPCc=[r.src_Z,r.src_P,r.src_Cc].join("|"),r.src_ZCc=[r.src_Z,r.src_Cc].join("|");var i="[><|]";return r.src_pseudo_letter="(?:(?!"+i+"|"+r.src_ZPCc+")"+r.src_Any+")",r.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",r.src_auth="(?:(?:(?!"+r.src_ZCc+"|[@/\\[\\]()]).)+@)?",r.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",r.src_host_terminator="(?=$|"+i+"|"+r.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+r.src_ZPCc+"))",r.src_path="(?:[/?#](?:(?!"+r.src_ZCc+"|"+i+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+r.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+r.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+r.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+r.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+r.src_ZCc+"|[']).)+\\'|\\'(?="+r.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+r.src_ZCc+"|[.]).|"+(t&&t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+r.src_ZCc+").|;(?!"+r.src_ZCc+").|\\!+(?!"+r.src_ZCc+"|[!]).|\\?(?!"+r.src_ZCc+"|[?]).)+|\\/)?",r.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',r.src_xn="xn--[a-z0-9\\-]{1,59}",r.src_domain_root="(?:"+r.src_xn+"|"+r.src_pseudo_letter+"{1,63})",r.src_domain="(?:"+r.src_xn+"|(?:"+r.src_pseudo_letter+")|(?:"+r.src_pseudo_letter+"(?:-|"+r.src_pseudo_letter+"){0,61}"+r.src_pseudo_letter+"))",r.src_host="(?:(?:(?:(?:"+r.src_domain+")\\.)*"+r.src_domain+"))",r.tpl_host_fuzzy="(?:"+r.src_ip4+"|(?:(?:(?:"+r.src_domain+")\\.)+(?:%TLDS%)))",r.tpl_host_no_ip_fuzzy="(?:(?:(?:"+r.src_domain+")\\.)+(?:%TLDS%))",r.src_host_strict=r.src_host+r.src_host_terminator,r.tpl_host_fuzzy_strict=r.tpl_host_fuzzy+r.src_host_terminator,r.src_host_port_strict=r.src_host+r.src_port+r.src_host_terminator,r.tpl_host_port_fuzzy_strict=r.tpl_host_fuzzy+r.src_port+r.src_host_terminator,r.tpl_host_port_no_ip_fuzzy_strict=r.tpl_host_no_ip_fuzzy+r.src_port+r.src_host_terminator,r.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+r.src_ZPCc+"|>|$))",r.tpl_email_fuzzy="(^|"+i+'|"|\\(|'+r.src_ZCc+")("+r.src_email_name+"@"+r.tpl_host_fuzzy_strict+")",r.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+r.src_ZPCc+"))((?![$+<=>^`||])"+r.tpl_host_port_fuzzy_strict+r.src_path+")",r.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+r.src_ZPCc+"))((?![$+<=>^`||])"+r.tpl_host_port_no_ip_fuzzy_strict+r.src_path+")",r}}}),AN=Re({"node_modules/linkify-it/index.js"(n,e){function t(y){var w=Array.prototype.slice.call(arguments,1);return w.forEach(function(S){S&&Object.keys(S).forEach(function(C){y[C]=S[C]})}),y}function r(y){return Object.prototype.toString.call(y)}function i(y){return r(y)==="[object String]"}function s(y){return r(y)==="[object Object]"}function o(y){return r(y)==="[object RegExp]"}function a(y){return r(y)==="[object Function]"}function l(y){return y.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var c={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function u(y){return Object.keys(y||{}).reduce(function(w,S){return w||c.hasOwnProperty(S)},!1)}var f={"http:":{validate:function(y,w,S){var C=y.slice(w);return S.re.http||(S.re.http=new RegExp("^\\/\\/"+S.re.src_auth+S.re.src_host_port_strict+S.re.src_path,"i")),S.re.http.test(C)?C.match(S.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(y,w,S){var C=y.slice(w);return S.re.no_http||(S.re.no_http=new RegExp("^"+S.re.src_auth+"(?:localhost|(?:(?:"+S.re.src_domain+")\\.)+"+S.re.src_domain_root+")"+S.re.src_port+S.re.src_host_terminator+S.re.src_path,"i")),S.re.no_http.test(C)?w>=3&&y[w-3]===":"||w>=3&&y[w-3]==="/"?0:C.match(S.re.no_http)[0].length:0}},"mailto:":{validate:function(y,w,S){var C=y.slice(w);return S.re.mailto||(S.re.mailto=new RegExp("^"+S.re.src_email_name+"@"+S.re.src_host_strict,"i")),S.re.mailto.test(C)?C.match(S.re.mailto)[0].length:0}}},d="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",h="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function g(y){y.__index__=-1,y.__text_cache__=""}function p(y){return function(w,S){var C=w.slice(S);return y.test(C)?C.match(y)[0].length:0}}function O(){return function(y,w){w.normalize(y)}}function v(y){var w=y.re=SN()(y.__opts__),S=y.__tlds__.slice();y.onCompile(),y.__tlds_replaced__||S.push(d),S.push(w.src_xn),w.src_tlds=S.join("|");function C(T){return T.replace("%TLDS%",w.src_tlds)}w.email_fuzzy=RegExp(C(w.tpl_email_fuzzy),"i"),w.link_fuzzy=RegExp(C(w.tpl_link_fuzzy),"i"),w.link_no_ip_fuzzy=RegExp(C(w.tpl_link_no_ip_fuzzy),"i"),w.host_fuzzy_test=RegExp(C(w.tpl_host_fuzzy_test),"i");var x=[];y.__compiled__={};function k(T,$){throw new Error('(LinkifyIt) Invalid schema "'+T+'": '+$)}Object.keys(y.__schemas__).forEach(function(T){var $=y.__schemas__[T];if($!==null){var M={validate:null,link:null};if(y.__compiled__[T]=M,s($)){o($.validate)?M.validate=p($.validate):a($.validate)?M.validate=$.validate:k(T,$),a($.normalize)?M.normalize=$.normalize:$.normalize?k(T,$):M.normalize=O();return}if(i($)){x.push(T);return}k(T,$)}}),x.forEach(function(T){y.__compiled__[y.__schemas__[T]]&&(y.__compiled__[T].validate=y.__compiled__[y.__schemas__[T]].validate,y.__compiled__[T].normalize=y.__compiled__[y.__schemas__[T]].normalize)}),y.__compiled__[""]={validate:null,normalize:O()};var E=Object.keys(y.__compiled__).filter(function(T){return T.length>0&&y.__compiled__[T]}).map(l).join("|");y.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+w.src_ZPCc+"))("+E+")","i"),y.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+w.src_ZPCc+"))("+E+")","ig"),y.re.pretest=RegExp("("+y.re.schema_test.source+")|("+y.re.host_fuzzy_test.source+")|@","i"),g(y)}function b(y,w){var S=y.__index__,C=y.__last_index__,x=y.__text_cache__.slice(S,C);this.schema=y.__schema__.toLowerCase(),this.index=S+w,this.lastIndex=C+w,this.raw=x,this.text=x,this.url=x}function _(y,w){var S=new b(y,w);return y.__compiled__[S.schema].normalize(S,y),S}function A(y,w){if(!(this instanceof A))return new A(y,w);w||u(y)&&(w=y,y={}),this.__opts__=t({},c,w),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=t({},f,y),this.__compiled__={},this.__tlds__=h,this.__tlds_replaced__=!1,this.re={},v(this)}A.prototype.add=function(w,S){return this.__schemas__[w]=S,v(this),this},A.prototype.set=function(w){return this.__opts__=t(this.__opts__,w),this},A.prototype.test=function(w){if(this.__text_cache__=w,this.__index__=-1,!w.length)return!1;var S,C,x,k,E,T,$,M,P;if(this.re.schema_test.test(w)){for($=this.re.schema_search,$.lastIndex=0;(S=$.exec(w))!==null;)if(k=this.testSchemaAt(w,S[2],$.lastIndex),k){this.__schema__=S[2],this.__index__=S.index+S[1].length,this.__last_index__=S.index+S[0].length+k;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(M=w.search(this.re.host_fuzzy_test),M>=0&&(this.__index__<0||M<this.__index__)&&(C=w.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(E=C.index+C[1].length,(this.__index__<0||E<this.__index__)&&(this.__schema__="",this.__index__=E,this.__last_index__=C.index+C[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(P=w.indexOf("@"),P>=0&&(x=w.match(this.re.email_fuzzy))!==null&&(E=x.index+x[1].length,T=x.index+x[0].length,(this.__index__<0||E<this.__index__||E===this.__index__&&T>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=E,this.__last_index__=T))),this.__index__>=0},A.prototype.pretest=function(w){return this.re.pretest.test(w)},A.prototype.testSchemaAt=function(w,S,C){return this.__compiled__[S.toLowerCase()]?this.__compiled__[S.toLowerCase()].validate(w,C,this):0},A.prototype.match=function(w){var S=0,C=[];this.__index__>=0&&this.__text_cache__===w&&(C.push(_(this,S)),S=this.__last_index__);for(var x=S?w.slice(S):w;this.test(x);)C.push(_(this,S)),x=x.slice(this.__last_index__),S+=this.__last_index__;return C.length?C:null},A.prototype.tlds=function(w,S){return w=Array.isArray(w)?w:[w],S?(this.__tlds__=this.__tlds__.concat(w).sort().filter(function(C,x,k){return C!==k[x-1]}).reverse(),v(this),this):(this.__tlds__=w.slice(),this.__tlds_replaced__=!0,v(this),this)},A.prototype.normalize=function(w){w.schema||(w.url="http://"+w.url),w.schema==="mailto:"&&!/^mailto:/i.test(w.url)&&(w.url="mailto:"+w.url)},A.prototype.onCompile=function(){},e.exports=A}}),CN=Re({"node_modules/punycode/punycode.js"(n,e){var t=2147483647,r=36,i=1,s=26,o=38,a=700,l=72,c=128,u="-",f=/^xn--/,d=/[^\0-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=r-i,O=Math.floor,v=String.fromCharCode;function b(P){throw new RangeError(g[P])}function _(P,D){const I=[];let W=P.length;for(;W--;)I[W]=D(P[W]);return I}function A(P,D){const I=P.split("@");let W="";I.length>1&&(W=I[0]+"@",P=I[1]),P=P.replace(h,".");const U=P.split("."),ae=_(U,D).join(".");return W+ae}function y(P){const D=[];let I=0;const W=P.length;for(;I<W;){const U=P.charCodeAt(I++);if(U>=55296&&U<=56319&&I<W){const ae=P.charCodeAt(I++);(ae&64512)==56320?D.push(((U&1023)<<10)+(ae&1023)+65536):(D.push(U),I--)}else D.push(U)}return D}var w=P=>String.fromCodePoint(...P),S=function(P){return P-48<10?P-22:P-65<26?P-65:P-97<26?P-97:r},C=function(P,D){return P+22+75*(P<26)-((D!=0)<<5)},x=function(P,D,I){let W=0;for(P=I?O(P/a):P>>1,P+=O(P/D);P>p*s>>1;W+=r)P=O(P/p);return O(W+(p+1)*P/(P+o))},k=function(P){const D=[],I=P.length;let W=0,U=c,ae=l,ce=P.lastIndexOf(u);ce<0&&(ce=0);for(let K=0;K<ce;++K)P.charCodeAt(K)>=128&&b("not-basic"),D.push(P.charCodeAt(K));for(let K=ce>0?ce+1:0;K<I;){let H=W;for(let ie=1,B=r;;B+=r){K>=I&&b("invalid-input");const J=S(P.charCodeAt(K++));(J>=r||J>O((t-W)/ie))&&b("overflow"),W+=J*ie;const Ae=B<=ae?i:B>=ae+s?s:B-ae;if(J<Ae)break;const Qe=r-Ae;ie>O(t/Qe)&&b("overflow"),ie*=Qe}const se=D.length+1;ae=x(W-H,se,H==0),O(W/se)>t-U&&b("overflow"),U+=O(W/se),W%=se,D.splice(W++,0,U)}return String.fromCodePoint(...D)},E=function(P){const D=[];P=y(P);let I=P.length,W=c,U=0,ae=l;for(const H of P)H<128&&D.push(v(H));let ce=D.length,K=ce;for(ce&&D.push(u);K<I;){let H=t;for(const ie of P)ie>=W&&ie<H&&(H=ie);const se=K+1;H-W>O((t-U)/se)&&b("overflow"),U+=(H-W)*se,W=H;for(const ie of P)if(ie<W&&++U>t&&b("overflow"),ie==W){let B=U;for(let J=r;;J+=r){const Ae=J<=ae?i:J>=ae+s?s:J-ae;if(B<Ae)break;const Qe=B-Ae,Ne=r-Ae;D.push(v(C(Ae+Qe%Ne,0))),B=O(Qe/Ne)}D.push(v(C(B,0))),ae=x(U,se,K==ce),U=0,++K}++U,++W}return D.join("")},T=function(P){return A(P,function(D){return f.test(D)?k(D.slice(4).toLowerCase()):D})},$=function(P){return A(P,function(D){return d.test(D)?"xn--"+E(D):D})},M={version:"2.1.0",ucs2:{decode:y,encode:w},decode:k,encode:E,toASCII:$,toUnicode:T};e.exports=M}}),TN=Re({"node_modules/markdown-it/lib/presets/default.js"(n,e){e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}}}),PN=Re({"node_modules/markdown-it/lib/presets/zero.js"(n,e){e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}}}),EN=Re({"node_modules/markdown-it/lib/presets/commonmark.js"(n,e){e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}}}),oA=Re({"node_modules/markdown-it/lib/index.js"(n,e){var t=Yt(),r=zI(),i=ZI(),s=HI(),o=fN(),a=xN(),l=AN(),c=tA(),u=CN(),f={default:TN(),zero:PN(),commonmark:EN()},d=/^(vbscript|javascript|file|data):/,h=/^data:image\/(gif|png|jpeg|webp);/;function g(_){var A=_.trim().toLowerCase();return d.test(A)?!!h.test(A):!0}var p=["http:","https:","mailto:"];function O(_){var A=c.parse(_,!0);if(A.hostname&&(!A.protocol||p.indexOf(A.protocol)>=0))try{A.hostname=u.toASCII(A.hostname)}catch{}return c.encode(c.format(A))}function v(_){var A=c.parse(_,!0);if(A.hostname&&(!A.protocol||p.indexOf(A.protocol)>=0))try{A.hostname=u.toUnicode(A.hostname)}catch{}return c.decode(c.format(A),c.decode.defaultChars+"%")}function b(_,A){if(!(this instanceof b))return new b(_,A);A||t.isString(_)||(A=_||{},_="default"),this.inline=new a,this.block=new o,this.core=new s,this.renderer=new i,this.linkify=new l,this.validateLink=g,this.normalizeLink=O,this.normalizeLinkText=v,this.utils=t,this.helpers=t.assign({},r),this.options={},this.configure(_),A&&this.set(A)}b.prototype.set=function(_){return t.assign(this.options,_),this},b.prototype.configure=function(_){var A=this,y;if(t.isString(_)&&(y=_,_=f[y],!_))throw new Error('Wrong `markdown-it` preset "'+y+'", check name');if(!_)throw new Error("Wrong `markdown-it` preset, can't be empty");return _.options&&A.set(_.options),_.components&&Object.keys(_.components).forEach(function(w){_.components[w].rules&&A[w].ruler.enableOnly(_.components[w].rules),_.components[w].rules2&&A[w].ruler2.enableOnly(_.components[w].rules2)}),this},b.prototype.enable=function(_,A){var y=[];Array.isArray(_)||(_=[_]),["core","block","inline"].forEach(function(S){y=y.concat(this[S].ruler.enable(_,!0))},this),y=y.concat(this.inline.ruler2.enable(_,!0));var w=_.filter(function(S){return y.indexOf(S)<0});if(w.length&&!A)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+w);return this},b.prototype.disable=function(_,A){var y=[];Array.isArray(_)||(_=[_]),["core","block","inline"].forEach(function(S){y=y.concat(this[S].ruler.disable(_,!0))},this),y=y.concat(this.inline.ruler2.disable(_,!0));var w=_.filter(function(S){return y.indexOf(S)<0});if(w.length&&!A)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+w);return this},b.prototype.use=function(_){var A=[this].concat(Array.prototype.slice.call(arguments,1));return _.apply(_,A),this},b.prototype.parse=function(_,A){if(typeof _!="string")throw new Error("Input data should be a String");var y=new this.core.State(_,this,A);return this.core.process(y),y.tokens},b.prototype.render=function(_,A){return A=A||{},this.renderer.render(this.parse(_,A),this.options,A)},b.prototype.parseInline=function(_,A){var y=new this.core.State(_,this,A);return y.inlineMode=!0,this.core.process(y),y.tokens},b.prototype.renderInline=function(_,A){return A=A||{},this.renderer.render(this.parseInline(_,A),this.options,A)},e.exports=b}}),$N=Re({"node_modules/markdown-it/index.js"(n,e){e.exports=oA()}}),aA={};KS(aA,{getAstValues:()=>Vm,isAst:()=>fv,isFunction:()=>QN,isVariable:()=>LN,resolve:()=>Cc});function fv(n){return!!n?.$$mdtype}function QN(n){return n?.$$mdtype==="Function"}function LN(n){return n?.$$mdtype==="Variable"}function*Vm(n){if(!(n==null||typeof n!="object")){if(Array.isArray(n))for(const e of n)yield*Vm(e);if(fv(n)&&(yield n),Object.getPrototypeOf(n)===Object.prototype)for(const e of Object.values(n))yield*Vm(e)}}function Cc(n,e={}){if(n==null||typeof n!="object")return n;if(Array.isArray(n))return n.map(r=>Cc(r,e));if(fv(n)&&n?.resolve instanceof Function)return n.resolve(e);if(Object.getPrototypeOf(n)!==Object.prototype)return n;const t={};for(const[r,i]of Object.entries(n))t[r]=Cc(i,e);return t}var xi=class{constructor(e="div",t={},r=[]){this.$$mdtype="Tag",this.name=e,this.attributes=t,this.children=r}};xi.isTag=n=>n?.$$mdtype==="Tag";var MN=class{validate(n,e,t){return typeof n=="string"||typeof n=="object"?[]:[{id:"attribute-type-invalid",level:"error",message:`Attribute '${t}' must be type 'string | object'`}]}transform(n){if(!n||typeof n=="string")return n;const e=[];for(const[t,r]of Object.entries(n??{}))r&&e.push(t);return e.join(" ")}},DN=class{validate(n){return typeof n=="string"&&n.match(/^[a-zA-Z]/)?[]:[{id:"attribute-value-invalid",level:"error",message:"The 'id' attribute must start with a letter"}]}},q1=Yd(JS()),Ud=class{constructor(n=[]){this.$$mdtype="Variable",this.path=n}resolve({variables:n}={}){return n instanceof Function?n(this.path):this.path.reduce((e={},t)=>e[t],n)}},Gd=class{constructor(n,e){this.$$mdtype="Function",this.name=n,this.parameters=e}resolve(n={}){const e=n?.functions?.[this.name];if(!e)return null;const t=Cc(this.parameters,n);return e.transform?.(t,n)}},R1;(function(n){n[n.normal=0]="normal",n[n.string=1]="string",n[n.escape=2]="escape"})(R1||(R1={}));var lr="{%",Vi="%}",qN=/^[a-zA-Z0-9_-]+$/;function nd(n){return typeof n=="string"&&qN.test(n)}function Po(n){return n&&typeof n=="object"&&typeof n.then=="function"}function Hd(n,e=0){let t=0;for(let r=e;r<n.length;r++){const i=n[r];switch(t){case 1:switch(i){case'"':t=0;break;case"\\":t=2;break}break;case 2:t=1;break;case 0:if(i==='"')t=1;else if(n.startsWith(Vi,r))return r}}return null}function RN(n,e,t){try{return(0,q1.parse)(n,{Variable:Ud,Function:Gd})}catch(r){if(!(r instanceof q1.SyntaxError))throw r;const{message:i,location:{start:s,end:o}}=r,a={start:{line:e,character:s.offset+t},end:{line:e+1,character:o.offset+t}};return{type:"error",meta:{error:{message:i,location:a}}}}}function lA(n,e=0){let t=e+1;const r=[];let i=0;for(let s=0;s<n.length;s++){if(n[s]===`
263
- `){t++;continue}if(!n.startsWith(lr,s))continue;const o=Hd(n,s);if(o==null){s=s+lr.length;continue}const a=n.slice(s,o+Vi.length),l=n.slice(s+lr.length,o),c=n.lastIndexOf(`
264
- `,s),u=n.indexOf(`
265
- `,o),f=n.slice(c,u),d=RN(l.trim(),t,s-c),h=f.trim()===a?c:s,g=n.slice(i,h);r.push({type:"text",start:i,end:s-1,content:g}),r.push({map:[t,t+1],position:{start:s-c,end:s-c+a.length},start:s,end:s+a.length-1,info:a,...d}),i=o+Vi.length,s=i-1}return r.push({type:"text",start:i,end:n.length-1,content:n.slice(i)}),r}var dv={class:{type:MN,render:!0},id:{type:DN,render:!0}},Il={findSchema(n,{nodes:e={},tags:t={}}={}){return n.tag?t[n.tag]:e[n.type]},attributes(n,e={}){const t=this.findSchema(n,e)??{},r={},i={...dv,...t.attributes};for(const[s,o]of Object.entries(i)){if(o.render==!1)continue;const a=typeof o.render=="string"?o.render:s;let l=n.attributes[s];if(typeof o.type=="function"){const c=new o.type;c.transform&&(l=c.transform(l,e))}l=l===void 0?o.default:l,l!==void 0&&(r[a]=l)}if(t.slots)for(const[s,o]of Object.entries(t.slots)){if(o.render===!1)continue;const a=typeof o.render=="string"?o.render:s;n.slots[s]&&(r[a]=this.node(n.slots[s],e))}return r},children(n,e={}){const t=n.children.flatMap(r=>this.node(r,e));return t.some(Po)?Promise.all(t):t},node(n,e={}){const t=this.findSchema(n,e)??{};if(t&&t.transform instanceof Function)return t.transform(n,e);const r=this.children(n,e);if(!t||!t.render)return r;const i=this.attributes(n,e);return Po(i)||Po(r)?Promise.all([i,r]).then(s=>new xi(t.render,...s)):new xi(t.render,i,r)}},Kd=class{constructor(e="node",t={},r=[],i){this.$$mdtype="Node",this.errors=[],this.lines=[],this.inline=!1,this.attributes=t,this.children=r,this.type=e,this.tag=i,this.annotations=[],this.slots={}}*walk(){for(const e of[...Object.values(this.slots),...this.children])yield e,yield*e.walk()}push(e){this.children.push(e)}resolve(e={}){return Object.assign(new Kd,this,{children:this.children.map(t=>t.resolve(e)),attributes:Cc(this.attributes,e),slots:Object.fromEntries(Object.entries(this.slots).map(([t,r])=>[t,r.resolve(e)]))})}findSchema(e={}){return Il.findSchema(this,e)}transformAttributes(e={}){return Il.attributes(this,e)}transformChildren(e){return Il.children(this,e)}transform(e){return Il.node(this,e)}},cA={Function:Gd,Node:Kd,Variable:Ud};function IN(n,e){if(!e)return e;const t=cA[e.$$mdtype];return t?Object.assign(new t,e):e}function NN(n){return JSON.parse(n,IN)}var Tr={...cA,...aA,fromJSON:NN},Dn=" ",Wm=", ",zt=`
266
- `,BN=".",I1="-",jN=80,zN=["strong","em","s"],ZN=(n,e)=>Math.max(n,e),Kh=(n,e=2)=>({...n,indent:(n.indent||0)+e});function*pr(n,e){for(const t of n.children)yield*os(t,e)}function*$u(n){yield[...n].join("").trim()}function*Jh(n){yield`| ${n.join(" | ")} |`}function rd(n){if(n!==void 0)return Tr.isAst(n)?id(n):n===null?"null":Array.isArray(n)?"["+n.map(rd).join(Wm)+"]":typeof n=="object"?"{"+Object.entries(n).map(([e,t])=>`${nd(e)?e:`"${e}"`}: ${rd(t)}`).join(Wm)+"}":JSON.stringify(n)}function Ym(n){const e=rd(n.value);if(e!==void 0)return n.name==="primary"?e:n.name==="id"&&typeof n.value=="string"&&nd(n.value)?"#"+n.value:n.type==="class"&&nd(n.name)?"."+n.name:`${n.name}=${e}`}function*XN(n){for(const[e,t]of Object.entries(n.attributes))if(e==="class"&&typeof t=="object"&&!Tr.isAst(t))for(const r of Object.keys(t))yield Ym({type:"class",name:r,value:t});else yield Ym({type:"attribute",name:e,value:t})}function*kl(n){n.annotations.length&&(yield lr+Dn,yield n.annotations.map(Ym).join(Dn),yield Dn+Vi)}function*FN(n){yield"$",yield n.path.map((e,t)=>t===0?e:nd(e)?"."+e:typeof e=="number"?`[${e}]`:`["${e}"]`).join("")}function*VN(n){yield n.name,yield"(",yield Object.values(n.parameters).map(rd).join(Wm),yield")"}function*N1(n){let e;do{const{value:t,done:r}=n.next();if(r)return;e=t.trimStart()}while(!e.length);yield e,yield*n}function*Qu(n,e){yield n.replace(e,"\\$&").replace(new RegExp(" ","g"),"&nbsp;")}function*WN(n,e={}){const t={...e,parent:n},r=Dn.repeat(t.indent||0);switch(n.type){case"document":{n.attributes.frontmatter&&n.attributes.frontmatter.length&&(yield"---"+zt+n.attributes.frontmatter+zt+"---"+zt+zt),yield*N1(pr(n,t));break}case"heading":{yield zt,yield r,yield"#".repeat(n.attributes.level||1),yield Dn,yield*N1(pr(n,t)),yield*kl(n),yield zt;break}case"paragraph":{yield zt,yield*pr(n,t),yield*kl(n),yield zt;break}case"inline":{yield r,yield*pr(n,t);break}case"image":{yield"!",yield"[",yield*os(n.attributes.alt,t),yield"]",yield"(",yield*typeof n.attributes.src=="string"?Qu(n.attributes.src,/[()]/):os(n.attributes.src,t),n.attributes.title&&(yield Dn+`"${n.attributes.title}"`),yield")";break}case"link":{yield"[",yield*pr(n,t),yield"]",yield"(",yield*typeof n.attributes.href=="string"?Qu(n.attributes.href,/[()]/g):os(n.attributes.href,t),n.attributes.title&&(yield Dn+`"${n.attributes.title}"`),yield")";break}case"text":{const{content:i}=n.attributes;Tr.isAst(i)?(yield lr+Dn,yield*os(i,t),yield Dn+Vi):e.parent&&zN.includes(e.parent.type)?yield*Qu(i,/[*_~]/g):yield*Qu(i,/^[*>#]/);break}case"blockquote":{const i=">"+Dn;yield n.children.map(s=>id(s,t).trimStart()).map(s=>zt+r+i+s).join(r+i);break}case"hr":{yield zt,yield r,yield"---",yield zt;break}case"fence":{yield zt,yield r;const s=(n.attributes.content.match(/`{3,}/g)||[]).map(a=>a.length).reduce(ZN,0),o="`".repeat(s?s+1:3);yield o,n.attributes.language&&(yield n.attributes.language),n.annotations.length&&(yield Dn),yield*kl(n),yield zt,yield r,yield n.attributes.content.split(zt).join(zt+r),yield o,yield zt;break}case"tag":{n.inline||(yield zt,yield r);const i=lr+Dn,s=[...XN(n)].filter(c=>c!==void 0),o=[i+n.tag,...s],a=o.join(Dn),l=a.length+i.length*2>(e.maxTagOpeningWidth||jN);yield(!n.inline&&l?o.join(zt+Dn.repeat(i.length)+r):a)+Dn+(n.children.length?"":"/")+Vi,n.children.length&&(yield*pr(n,t.allowIndentation?Kh(t):t),n.inline||(yield r),yield lr+Dn+"/"+n.tag+Dn+Vi),n.inline||(yield zt);break}case"list":{const i=n.children.some(s=>s.children.some(o=>o.type==="paragraph"));for(let s=0;s<n.children.length;s++){const o=n.attributes.ordered?`${s===0?n.attributes.start??"1":"1"}${n.attributes.marker??BN}`:n.attributes.marker??I1;let a=id(n.children[s],Kh(t,o.length+1));(!i||s===n.children.length-1)&&(a=a.trim()),yield zt+r+o+" "+a}yield zt;break}case"item":{for(let i=0;i<n.children.length;i++)yield*os(n.children[i],t),i===0&&(yield*kl(n));break}case"strong":{yield n.attributes.marker??"**",yield*$u(pr(n,t)),yield n.attributes.marker??"**";break}case"em":{yield n.attributes.marker??"*",yield*$u(pr(n,t)),yield n.attributes.marker??"*";break}case"code":{yield"`",yield*$u(os(n.attributes.content,t)),yield"`";break}case"s":{yield"~~",yield*$u(pr(n,t)),yield"~~";break}case"hardbreak":{yield"\\"+zt,yield r;break}case"softbreak":{yield zt,yield r;break}case"table":{const i=[...pr(n,Kh(t))];if(e.parent&&e.parent.type==="tag"&&e.parent.tag==="table"){for(let s=0;s<i.length;s++){const o=i[s];if(typeof o=="string")o.trim().length&&(yield zt,yield o);else{s!==0&&(yield zt,yield r+"---");for(const a of o)yield zt+r+I1+" "+a}}yield zt}else{const s=[];for(const l of i)for(let c=0;c<l.length;c++)s[c]=s[c]?Math.max(s[c],l[c].length):l[c].length;const[o,...a]=i;yield zt,yield*Jh(o.map((l,c)=>l+Dn.repeat(s[c]-l.length))),yield zt,yield*Jh(o.map((l,c)=>"-".repeat(s[c]))),yield zt;for(const l of a)yield*Jh(l.map((c,u)=>c+Dn.repeat(s[u]-c.length))),yield zt}break}case"thead":{const[i]=[...pr(n,t)];yield i||[];break}case"tr":{yield[...pr(n,t)];break}case"td":case"th":{yield[...pr(n,t),...kl(n)].join("").trim();break}case"tbody":{yield*pr(n,t);break}case"comment":{yield"<!-- "+n.attributes.content+` -->
267
- `;break}}}function*os(n,e={}){switch(typeof n){case"undefined":break;case"boolean":case"number":case"string":{yield n.toString();break}case"object":{if(n===null)break;if(Array.isArray(n)){for(const t of n)yield*os(t,e);break}switch(n.$$mdtype){case"Function":{yield*VN(n);break}case"Node":yield*WN(n,e);break;case"Variable":{yield*FN(n);break}default:throw new Error(`Unimplemented: "${n.$$mdtype}"`)}break}}}function id(n,e){let t="";for(const r of os(n,e))t+=r;return t.trimStart()}function Hc(n){return n!==!1&&n!==void 0&&n!==null}function YN(n){const e=[{condition:n.attributes.primary,children:[]}];for(const t of n.children)t.type==="tag"&&t.tag==="else"?e.push({condition:"primary"in t.attributes?t.attributes.primary:!0,children:[]}):e[e.length-1].children.push(t);return e}var UN={attributes:{primary:{type:Object,render:!1}},transform(n,e){const t=YN(n);for(const{condition:r,children:i}of t)if(Hc(r)){const s=i.flatMap(o=>o.transform(e));return s.some(Po)?Promise.all(s).then(o=>o.flat()):s}return[]}},GN={selfClosing:!0,attributes:{primary:{type:Object,render:!1}}},HN={transform(n){return Object.values(n).every(e=>Hc(e))}},KN={transform(n){return Object.values(n).find(e=>Hc(e))!==void 0}},JN={parameters:{0:{required:!0}},transform(n){return!Hc(n[0])}},e4={transform(n){const e=Object.values(n);return e.every(t=>t===e[0])}},t4={transform(n){return JSON.stringify(n[0],null,2)}},n4={transform(n){return n[0]===void 0?n[1]:n[0]}},uA={and:HN,or:KN,not:JN,equals:e4,default:n4,debug:t4};function ep(n,e="td"){n.type="tr",n.attributes={};for(const t of n.children)t.type=e;return n}function r4(n){for(const e of n.walk()){if(e.type!=="tag"||e.tag!=="table")continue;const[t,...r]=e.children;if(!t||t.type==="table")continue;const i=new Tr.Node("table",e.attributes,[new Tr.Node("thead"),new Tr.Node("tbody")]),[s,o]=i.children;t.type==="list"&&s.push(ep(t,"th"));for(const a of r){if(a.type==="list")ep(a);else if(a.type==="tag"&&a.tag==="if"){const l=[];for(const c of a.children)c.type!=="hr"&&(c.type==="list"&&ep(c),l.push(c));a.children=l}else continue;o.push(a)}e.children=[i]}}var fA=[r4],B1={ordered_list:"list",bullet_list:"list",code_inline:"code",list_item:"item",variable:"text"};function j1(n,e){for(const t of e){n.annotations.push(t);const{name:r,value:i,type:s}=t;s==="attribute"?(n.attributes[r]!==void 0&&n.errors.push({id:"duplicate-attribute",level:"warning",message:`Attribute '${r}' already set`}),n.attributes[r]=i):s==="class"&&(n.attributes.class?n.attributes.class[r]=i:n.attributes.class={[r]:i})}}function i4(n,e){switch(e){case"heading":return{level:Number(n.tag.replace("h",""))};case"list":{const t=n.attrs?Object.fromEntries(n.attrs):void 0,r=n.type.startsWith("ordered");return r&&t?.start?{ordered:!0,start:t.start,marker:n.markup}:{ordered:r,marker:n.markup}}case"link":{const t=Object.fromEntries(n.attrs);return t.title?{href:t.href,title:t.title}:{href:t.href}}case"image":{const t=Object.fromEntries(n.attrs);return t.title?{alt:n.content,src:t.src,title:t.title}:{alt:n.content,src:t.src}}case"em":case"strong":return{marker:n.markup};case"text":case"code":case"comment":return{content:(n.meta||{}).variable||n.content};case"fence":{const[t]=n.info.split(" ",1);return t===""||t===lr?{content:n.content}:{content:n.content,language:t}}case"td":case"th":{if(n.attrs){const t=Object.fromEntries(n.attrs);let r;if(t.style&&(t.style.includes("left")?r="left":t.style.includes("center")?r="center":t.style.includes("right")&&(r="right")),r)return{align:r}}return{}}default:return{}}}function dA(n,e,t,r,i,s){if(n.type==="frontmatter"){e[0].attributes.frontmatter=n.content;return}if(n.hidden||n.type==="text"&&n.content==="")return;const o=n.errors||[],a=e[e.length-1],{tag:l,attributes:c,error:u}=n.meta||{};if(n.type==="annotation")return s?j1(s,c):a.errors.push({id:"no-inline-annotations",level:"error",message:`Can't apply inline annotations to '${a.type}'`});let f=n.type.replace(/_(open|close)$/,"");if(B1[f]&&(f=B1[f]),f==="error"){const{message:O,location:v}=u;o.push({id:"parse-error",level:"critical",message:O,location:v})}if(n.nesting<0){if(a.type===f&&a.tag===l)return a.lines&&n.map&&a.lines.push(...n.map),e.pop();o.push({id:"missing-opening",level:"critical",message:`Node '${f}' is missing opening`})}const d=i4(n,f),h=new Kd(f,d,void 0,l||void 0),{position:g={}}=n;if(h.errors=o,i!==!1&&(h.lines=n.map||a.lines||[],h.location={file:t,start:{line:h.lines[0],character:g.start},end:{line:h.lines[1],character:g.end}}),s&&(h.inline=!0),c&&["tag","fence","image"].includes(f)&&j1(h,c),r&&l==="slot"&&typeof h.attributes.primary=="string"?a.slots[h.attributes.primary]=h:a.push(h),n.nesting>0&&e.push(h),!Array.isArray(n.children))return;if(h.type==="inline"&&(s=a),e.push(h),!(f==="image"))for(const O of n.children)dA(O,e,t,r,i,s);e.pop()}function s4(n,e){const t=new Kd("document"),r=[t];typeof e=="string"&&(e={file:e});for(const i of n)dA(i,r,e?.file,e?.slots,e?.location);if(r.length>1)for(const i of r.slice(1))i.errors.push({id:"missing-closing",level:"critical",message:`Node '${i.tag||i.type}' is missing closing`});for(const i of fA)i(t);return t}var hv={};KS(hv,{blockquote:()=>f4,code:()=>A4,comment:()=>E4,document:()=>o4,em:()=>_4,error:()=>$4,fence:()=>u4,hardbreak:()=>T4,heading:()=>a4,hr:()=>p4,image:()=>c4,inline:()=>x4,item:()=>d4,link:()=>S4,list:()=>h4,node:()=>Q4,paragraph:()=>l4,s:()=>k4,softbreak:()=>P4,strong:()=>w4,table:()=>m4,tbody:()=>b4,td:()=>g4,text:()=>C4,th:()=>O4,thead:()=>y4,tr:()=>v4});var o4={render:"article",children:["heading","paragraph","image","table","tag","fence","blockquote","comment","list","hr"],attributes:{frontmatter:{render:!1}}},a4={children:["inline"],attributes:{level:{type:Number,render:!1,required:!0}},transform(n,e){return new xi(`h${n.attributes.level}`,n.transformAttributes(e),n.transformChildren(e))}},l4={render:"p",children:["inline"]},c4={render:"img",attributes:{src:{type:String,required:!0},alt:{type:String},title:{type:String}}},u4={render:"pre",attributes:{content:{type:String,render:!1,required:!0},language:{type:String,render:"data-language"},process:{type:Boolean,render:!1,default:!0}},transform(n,e){const t=n.transformAttributes(e),r=n.children.length?n.transformChildren(e):[n.attributes.content];return new xi("pre",t,r)}},f4={render:"blockquote",children:["heading","paragraph","image","table","tag","fence","blockquote","list","hr"]},d4={render:"li",children:["inline","heading","paragraph","image","table","tag","fence","blockquote","list","hr"]},h4={children:["item"],attributes:{ordered:{type:Boolean,render:!1,required:!0},start:{type:Number},marker:{type:String,render:!1}},transform(n,e){return new xi(n.attributes.ordered?"ol":"ul",n.transformAttributes(e),n.transformChildren(e))}},p4={render:"hr"},m4={render:"table"},g4={render:"td",children:["inline","heading","paragraph","image","table","tag","fence","blockquote","list","hr"],attributes:{align:{type:String},colspan:{type:Number,render:"colSpan"},rowspan:{type:Number,render:"rowSpan"}}},O4={render:"th",attributes:{width:{type:String},align:{type:String},colspan:{type:Number,render:"colSpan"},rowspan:{type:Number,render:"rowSpan"}}},v4={render:"tr",children:["th","td"]},b4={render:"tbody",children:["tr","tag"]},y4={render:"thead",children:["tr"]},w4={render:"strong",children:["em","s","link","code","text","tag"],attributes:{marker:{type:String,render:!1}}},_4={render:"em",children:["strong","s","link","code","text","tag"],attributes:{marker:{type:String,render:!1}}},k4={render:"s",children:["strong","em","link","code","text","tag"]},x4={children:["strong","em","s","code","text","tag","link","image","hardbreak","softbreak","comment"]},S4={render:"a",children:["strong","em","s","code","text","tag"],attributes:{href:{type:String,required:!0},title:{type:String}}},A4={render:"code",attributes:{content:{type:String,render:!1,required:!0}},transform(n,e){const t=n.transformAttributes(e);return new xi("code",t,[n.attributes.content])}},C4={attributes:{content:{type:String,required:!0}},transform(n){return n.attributes.content}},T4={render:"br"},P4={transform(){return" "}},E4={attributes:{content:{type:String,required:!0}}},$4={},Q4={},L4=Yd($N()),{escapeHtml:z1}=(0,L4.default)().utils,M4=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function uf(n){if(typeof n=="string"||typeof n=="number")return z1(String(n));if(Array.isArray(n))return n.map(uf).join("");if(n===null||typeof n!="object"||!xi.isTag(n))return"";const{name:e,attributes:t,children:r=[]}=n;if(!e)return uf(r);let i=`<${e}`;for(const[s,o]of Object.entries(t??{}))i+=` ${s.toLowerCase()}="${z1(String(o))}"`;return i+=">",M4.has(e)||(r.length&&(i+=uf(r)),i+=`</${e}>`),i}function D4(n,e){return typeof n!="string"||n[0]!==n[0].toUpperCase()?n:e instanceof Function?e(n):e[n]}function q4(n,e,{components:t={}}={}){function r(s){if(s==null||typeof s!="object")return s;if(Array.isArray(s))return s.map(a=>r(a));if(s.$$mdtype==="Tag")return i(s);if(typeof s!="object")return s;const o={};for(const[a,l]of Object.entries(s))o[a]=r(l);return o}function i(s){if(Array.isArray(s))return e.createElement(e.Fragment,null,...s.map(i));if(s===null||typeof s!="object"||!xi.isTag(s))return s;const{name:o,attributes:{class:a,...l}={},children:c=[]}=s;return a&&(l.className=a),e.createElement(D4(o,t),Object.keys(l).length==0?null:r(l),...c.map(i))}return i(n)}function R4(n,e){return typeof n!="string"?"Fragment":n[0]!==n[0].toUpperCase()?n:e instanceof Function?e(n):e[n]}function Z1(n){return n.map(pv).join(", ")}function Um(n){return n==null||typeof n!="object"?JSON.stringify(n):Array.isArray(n)?`[${n.map(t=>Um(t)).join(", ")}]`:n.$$mdtype==="Tag"?pv(n):typeof n!="object"?JSON.stringify(n):`{${Object.entries(n).map(([t,r])=>[JSON.stringify(t),Um(r)].join(": ")).join(", ")}}`}function pv(n){if(Array.isArray(n))return`React.createElement(React.Fragment, null, ${Z1(n)})`;if(n===null||typeof n!="object"||!xi.isTag(n))return JSON.stringify(n);const{name:e,attributes:{class:t,...r}={},children:i=[]}=n;return t&&(r.className=t),`React.createElement(
268
- tagName(${JSON.stringify(e)}, components),
269
- ${Object.keys(r).length==0?"null":Um(r)},
270
- ${Z1(i)})`}function I4(n){return`
271
- (({components = {}} = {}) => {
272
- ${R4}
273
- return ${pv(n)};
274
- })
275
- `}var N4={html:uf,react:q4,reactStatic:I4},B4=class{validate(n,e){const{partials:t={}}=e;return t[n]?[]:[{id:"attribute-value-invalid",level:"error",message:`Partial \`${n}\` not found. The 'file' attribute must be set in \`config.partials\``}]}},j4={inline:!1,selfClosing:!0,attributes:{file:{type:B4,render:!1,required:!0},variables:{type:Object,render:!1}},transform(n,e){const{partials:t={}}=e,{file:r,variables:i}=n.attributes,s=t[r];if(!s)return null;const o={...e,variables:{...e.variables,...i,"$$partial:filename":r}},a=l=>l.resolve(o).transformChildren(o);return Array.isArray(s)?s.flatMap(a):a(s)}},z4={children:["table"],inline:!1},Z4={attributes:{primary:{type:String,required:!0}}},hA={else:GN,if:UN,partial:j4,slot:Z4,table:z4},X4=Yd(oA()),sd=Yd(JS());function pA(n,e,t){try{const{type:r,meta:i,nesting:s=0}=(0,sd.parse)(e,{Variable:Ud,Function:Gd}),o=n.push(r,"",s);return o.info=e,o.meta=i,n.delimiters||(n.delimiters=[]),o}catch(r){if(!(r instanceof sd.SyntaxError))throw r;const{message:i,location:{start:s,end:o}}=r,a=t?{start:{offset:s.offset+t},end:{offset:o.offset+t}}:null,l=n.push("error","",0);return l.meta={error:{message:i,location:a}},l}}function F4(n,e,t,r){const i=n.bMarks[e]+n.tShift[e],s=n.eMarks[e];if(!n.src.startsWith(lr,i))return!1;const o=Hd(n.src,i),a=n.src.slice(0,s).trim().length;if(!o||o<a-Vi.length)return!1;const l=i+lr.length,c=n.src.slice(l,o).trim(),u=n.src.slice(i,o+Vi.length).split(`
276
- `).length;if(c[0]==="$")return!1;if(r)return!0;const f=pA(n,c,l);return f.map=[e,e+u],n.line+=u,!0}function V4(n,e){if(!n.src.startsWith(lr,n.pos))return!1;const t=Hd(n.src,n.pos);if(!t)return!1;const r=n.src.slice(n.pos+lr.length,t);return e||pA(n,r.trim()),n.pos=t+Vi.length,!0}function W4(n){let e;for(e of n.tokens)if(e.type==="fence"){if(e.info.includes(lr)){const t=e.info.indexOf(lr),r=Hd(e.info,t),i=e.info.slice(t+lr.length,r);try{const{meta:s}=(0,sd.parse)(i.trim(),{Variable:Ud,Function:Gd});e.meta=s}catch(s){if(!(s instanceof sd.SyntaxError))throw s;e.errors||(e.errors=[]),e.errors.push({id:"fence-tag-error",level:"error",message:`Syntax error in fence tag: ${s.message}`})}}e?.meta?.attributes?.find(t=>t.name==="process"&&!t.value)||(e.children=lA(e.content,e.map[0]))}}function Y4(n){n.block.ruler.before("paragraph","annotations",F4,{alt:["paragraph","blockquote"]}),n.inline.ruler.push("containers",V4),n.core.ruler.push("annotations",W4)}var mA="---";function gA(n,e){return n.src.slice(n.bMarks[e],n.eMarks[e]).trim()}function U4(n,e){for(let t=1;t<e;t++)if(gA(n,t)===mA)return t}function G4(n,e,t,r){if(e!=0||gA(n,0)!=mA)return!1;const i=U4(n,t);if(!i)return!1;if(r)return!0;const s=n.push("frontmatter","",0);return s.content=n.src.slice(n.eMarks[0],n.bMarks[i]).trim(),s.map=[0,i],s.hidden=!0,n.line=i+1,!0}function H4(n){n.block.ruler.before("hr","frontmatter",G4)}var od="<!--",Gm="-->";function K4(n,e,t,r){const i=n.bMarks[e]+n.tShift[e];if(!n.src.startsWith(od,i))return!1;const s=n.src.indexOf(Gm,i);if(!s)return!1;if(r)return!0;const o=n.src.slice(i+od.length,s),a=o.split(`
277
- `).length,l=n.push("comment","",0);return l.content=o.trim(),l.map=[e,e+a],n.line+=a,!0}function J4(n,e){if(!n.src.startsWith(od,n.pos))return!1;const t=n.src.indexOf(Gm,n.pos);if(!t)return!1;if(e)return!0;const r=n.src.slice(n.pos+od.length,t),i=n.push("comment","",0);return i.content=r.trim(),n.pos=t+Gm.length,!0}function eB(n){n.block.ruler.before("table","comment",K4,{alt:["paragraph"]}),n.inline.ruler.push("comment",J4)}var OA=class{constructor(n={}){this.parser=new X4.default(n),this.parser.use(Y4,"annotations",{}),this.parser.use(H4,"frontmatter",{}),this.parser.disable(["lheading","code"]),n.allowComments&&this.parser.use(eB,"comments",{})}tokenize(n){return this.parser.parse(n.toString(),{})}},tB={String,Number,Array,Object,Boolean};function mv(n,e,t,r){if(!n)return!0;if(Tr.isFunction(e)&&t.validation?.validateFunctions){const i=t.functions?.[e.name];return i?.returns?Array.isArray(i.returns)?i.returns.find(s=>s===n)!==void 0:i.returns===n:!0}if(Tr.isAst(e))return!0;if(Array.isArray(n))return n.some(i=>mv(i,e,t,r));if(typeof n=="string"&&(n=tB[n]),typeof n=="function"){const i=new n;if(i.validate)return i.validate(e,t,r)}return e!=null&&e.constructor===n}function gv(n){return typeof n=="string"?n:Array.isArray(n)?n.map(gv).join(" | "):n.name}function nB(n,e){const t=e.functions?.[n.name],r=[];if(!t)return[{id:"function-undefined",level:"critical",message:`Undefined function: '${n.name}'`}];if(t.validate&&r.push(...t.validate(n,e)),t.parameters)for(const[i,s]of Object.entries(n.parameters)){const o=t.parameters?.[i];if(!o){r.push({id:"parameter-undefined",level:"error",message:`Invalid parameter: '${i}'`});continue}if(!(Tr.isAst(s)&&!Tr.isFunction(s))&&o.type){const a=mv(o.type,s,e,i);a===!1?r.push({id:"parameter-type-invalid",level:"error",message:`Parameter '${i}' of '${n.name}' must be type of '${gv(o.type)}'`}):Array.isArray(a)&&r.push(...a)}}for(const[i,{required:s}]of Object.entries(t.parameters??{}))s&&n.parameters[i]===void 0&&r.push({id:"parameter-missing-required",level:"error",message:`Missing required parameter: '${i}'`});return r}function rB(n,e){return n.length<=e?JSON.stringify(n):`[${n.slice(0,e).map(r=>JSON.stringify(r)).join(",")}, ... ${n.length-e} more]`}function vA(n,e){const t=n.findSchema(e),r=[...n.errors||[]];if(!t)return r.push({id:n.tag?"tag-undefined":"node-undefined",level:"critical",message:n.tag?`Undefined tag: '${n.tag}'`:`Undefined node: '${n.type}'`}),r;t.inline!=null&&n.inline!==t.inline&&r.push({id:"tag-placement-invalid",level:"critical",message:`'${n.tag}' tag should be ${t.inline?"inline":"block"}`}),t.selfClosing&&n.children.length>0&&r.push({id:"tag-selfclosing-has-children",level:"critical",message:`'${n.tag}' tag should be self-closing`});const i={...dv,...t.attributes};for(const s of Object.keys(n.slots))t.slots?.[s]||r.push({id:"slot-undefined",level:"error",message:`Invalid slot: '${s}'`});for(let[s,o]of Object.entries(n.attributes)){const a=i[s];if(!a){r.push({id:"attribute-undefined",level:"error",message:`Invalid attribute: '${s}'`});continue}let{type:l,matches:c,errorLevel:u}=a;if(Tr.isAst(o))if(Tr.isFunction(o)&&e.validation?.validateFunctions)r.push(...nB(o,e));else if(Tr.isVariable(o)&&e.variables){let f=!1,d=e.variables;for(const h of o.path){if(!Object.prototype.hasOwnProperty.call(d,h)){f=!0;break}d=d[h]}f&&r.push({id:"variable-undefined",level:"error",message:`Undefined variable: '${o.path.join(".")}'`})}else continue;if(o=o,l){const f=mv(l,o,e,s);f===!1&&r.push({id:"attribute-type-invalid",level:u||"error",message:`Attribute '${s}' must be type of '${gv(l)}'`}),Array.isArray(f)&&r.push(...f)}if(typeof c=="function"&&(c=c(e)),Array.isArray(c)&&!c.includes(o)&&r.push({id:"attribute-value-invalid",level:u||"error",message:`Attribute '${s}' must match one of ${rB(c,8)}. Got '${o}' instead.`}),c instanceof RegExp&&!c.test(o)&&r.push({id:"attribute-value-invalid",level:u||"error",message:`Attribute '${s}' must match ${c}. Got '${o}' instead.`}),typeof a.validate=="function"){const f=a.validate(o,e,s);Array.isArray(f)&&r.push(...f)}}for(const[s,{required:o}]of Object.entries(i))o&&n.attributes[s]===void 0&&r.push({id:"attribute-missing-required",level:"error",message:`Missing required attribute: '${s}'`});if(t.slots)for(const[s,{required:o}]of Object.entries(t.slots))o&&n.slots[s]===void 0&&r.push({id:"slot-missing-required",level:"error",message:`Missing required slot: '${s}'`});for(const{type:s}of n.children)t.children&&s!=="error"&&!t.children.includes(s)&&r.push({id:"child-invalid",level:"warning",message:`Can't nest '${s}' in '${n.tag||n.type}'`});if(t.validate){const s=t.validate(n,e);if(Po(s))return s.then(o=>r.concat(o));r.push(...s)}return r}function*bA(n,e=[]){yield[n,e];for(const t of[...Object.values(n.slots),...n.children])yield*bA(t,[...e,n])}function iB(n,e){const t=[...bA(n)].map(([r,i])=>{const{type:s,lines:o,location:a}=r,l={...e,validation:{...e.validation,parents:i}},c=vA(r,l);return Po(c)?c.then(u=>u.map(f=>({type:s,lines:o,location:a,error:f}))):c.map(u=>({type:s,lines:o,location:a,error:u}))});return t.some(Po)?Promise.all(t).then(r=>r.flat()):t.flat()}var sB=new OA;function yA(n={}){return{...n,tags:{...hA,...n.tags},nodes:{...hv,...n.nodes},functions:{...uA,...n.functions}}}function wA(n,e){return typeof n=="string"&&(n=sB.tokenize(n)),s4(n,e)}function _A(n,e){return Array.isArray(n)?n.flatMap(t=>t.resolve(e)):n.resolve(e)}function kA(n,e){const t=yA(e),r=_A(n,t);return Array.isArray(r)?r.flatMap(i=>i.transform(t)):r.transform(t)}function xA(n,e){const t=yA(e);return iB(n,t)}function oB(n,e={},...t){return{name:n,attributes:e,children:t}}var z=class{constructor(n){this.parse=wA,this.resolve=e=>_A(e,this.config),this.transform=e=>kA(e,this.config),this.validate=e=>xA(e,this.config),this.config=n}};z.nodes=hv;z.tags=hA;z.functions=uA;z.globalAttributes=dv;z.renderers=N4;z.transforms=fA;z.Ast=Tr;z.Tag=xi;z.Tokenizer=OA;z.parseTags=lA;z.transformer=Il;z.validator=vA;z.parse=wA;z.transform=kA;z.validate=xA;z.createElement=oB;z.truthy=Hc;z.format=id;function aB(n){if(!n)return"";const t=z.parse(n);if(!t.children?.length)return ad(n);const r=t.children[0];return r?.children?.length?aa(r.children):ad(n)}function aa(n){return n.map(lB).join("")}function lB(n){switch(n.type){case"text":return ad(n.attributes.content??"");case"strong":return`<strong>${aa(n.children)}</strong>`;case"em":return`<em>${aa(n.children)}</em>`;case"s":return`<s>${aa(n.children)}</s>`;case"code":return`<code>${ad(n.attributes.content??"")}</code>`;case"link":{const e=n.attributes.href??"",t=n.attributes.title,r=t?` title="${X1(t)}"`:"";return`<a href="${X1(e)}"${r}>${aa(n.children)}</a>`}case"hardbreak":return" ";case"softbreak":return" ";default:return n.children?.length?aa(n.children):""}}function cB(n){return ho(n.childNodes)}function ho(n){const e=[];for(const t of n)e.push(dB(t));return e.join("")}const uB=3,fB=1;function dB(n){if(n.nodeType===uB)return hB(n.textContent??"");if(n.nodeType!==fB)return"";const e=n;switch(e.tagName){case"STRONG":case"B":return`**${ho(e.childNodes)}**`;case"EM":case"I":return`*${ho(e.childNodes)}*`;case"S":case"STRIKE":case"DEL":return`~~${ho(e.childNodes)}~~`;case"CODE":return`\`${e.textContent??""}\``;case"A":{const r=e.getAttribute("href")??"";return`[${ho(e.childNodes)}](${r})`}case"BR":return" ";case"DIV":case"P":case"SPAN":return ho(e.childNodes);default:return ho(e.childNodes)}}function yi(n){return n.replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\*\*(.+?)\*\*/g,"$1").replace(/__(.+?)__/g,"$1").replace(/\*(.+?)\*/g,"$1").replace(/_(.+?)_/g,"$1").replace(/~~(.+?)~~/g,"$1").replace(/`([^`]+)`/g,"$1")}function ad(n){return n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function X1(n){return n.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function hB(n){return n.replace(/([\\*_`~\[\]])/g,"\\$1")}function F1(n){for(const e of Array.from(n.querySelectorAll("b"))){const t=document.createElement("strong");t.innerHTML=e.innerHTML,e.replaceWith(t)}for(const e of Array.from(n.querySelectorAll("i"))){const t=document.createElement("em");t.innerHTML=e.innerHTML,e.replaceWith(t)}for(const e of Array.from(n.querySelectorAll("span[style]"))){const t=e.style,r=e.parentNode;if(r)if(t.fontWeight==="bold"||parseInt(t.fontWeight)>=700){const i=document.createElement("strong");i.innerHTML=e.innerHTML,e.replaceWith(i)}else if(t.fontStyle==="italic"){const i=document.createElement("em");i.innerHTML=e.innerHTML,e.replaceWith(i)}else{for(;e.firstChild;)r.insertBefore(e.firstChild,e);e.remove()}}for(const e of Array.from(n.querySelectorAll("div, p"))){const t=e.parentNode;if(!(!t||e===n)){for(e.previousSibling&&t.insertBefore(document.createTextNode(" "),e);e.firstChild;)t.insertBefore(e.firstChild,e);e.remove()}}}function pB(n){const e=n.trim(),t=e.match(/^(#{1,6}\s+)(.*)/);if(t)return{text:t[2],prefix:t[1]};const r=e.match(/^(>\s*)(.*)/);return r?{text:r[2],prefix:r[1]}:{text:e,prefix:""}}function Wi(n){return n.replace(/\s+/g," ").trim().toLowerCase()}function SA(n,e,t){const r=sv(n),i=Wi(t);for(const s of r){const{text:o,prefix:a}=pB(s.source),l=yi(o);if(Wi(l)===i)return{dataName:e,text:l,source:s.source,sourcePrefix:a,inlineSource:o};if(s.type==="paragraph"){const c=s.source.split(`
278
- `).map(f=>f.trim()).join(" "),u=yi(c);if(Wi(u)===i)return{dataName:e,text:u,source:s.source,sourcePrefix:"",inlineSource:c}}}for(const s of r){if(s.type!=="list")continue;const o=gB(s.source,e,i);if(o)return o}for(const s of r)if(s.children){const o=SA(s.innerContent??"",e,t);if(o)return o}return null}function mB(n){const e=n.split(`
279
- `),t=[];let r=[];for(const i of e)/^[-*+]\s|^\d+\.\s/.test(i)&&r.length>0?(t.push(r.join(`
280
- `)),r=[i]):r.push(i);return r.length>0&&t.push(r.join(`
281
- `)),t}function gB(n,e,t){const r=mB(n);for(const i of r){const s=i.split(`
282
- `),o=s[0],a=o.match(/^([-*+]\s+|(\d+)\.\s+)(.*)/);if(a){const[,c,,u]=a,f=yi(u);if(Wi(f)===t)return{dataName:e,text:f,source:o,sourcePrefix:c,inlineSource:u}}const l=o.match(/^([-*+]\s+.*?)\*\*(.+?)\*\*(.*)/);if(l){const[,c,u]=l;if(Wi(u)===t)return{dataName:e,text:u,source:o,sourcePrefix:c,inlineSource:`**${u}**${l[3]}`}}if(s.length>1){const c=s.slice(1).map(d=>d.replace(/^\s+/,"")).filter(Boolean),u=c.join(" "),f=yi(u);if(c.length>0&&Wi(f)===t){const d=s.slice(1).join(`
283
- `),h=s.slice(1).find(b=>b.trim().length>0),g=h?.match(/^(\s+)/),p=g?g[1]:"",O=h?d.indexOf(h):0,v=d.slice(0,O)+p;return{dataName:e,text:f,source:d,sourcePrefix:v,inlineSource:u}}}}return null}function OB(n,e,t){const r=e.sourcePrefix+t,i=n.indexOf(e.source);return i===-1?n:n.slice(0,i)+r+n.slice(i+e.source.length)}function vB(n,e,t){const r=Wi(e),i=n.split(`
284
- `);for(const s of i){const o=s.match(/^(\s*[-*+]\s+)\[([^\]]*)\]\(([^)]*)\)\s*$/);if(!o)continue;const[,a,l,c]=o;if(Wi(l)===r||c===t)return{source:s,listPrefix:a,text:l,href:c}}return null}function bB(n,e,t,r){const i=`${e.listPrefix}[${t}](${r})`,s=n.indexOf(e.source);return s===-1?n:n.slice(0,s)+i+n.slice(s+e.source.length)}function yB(n,e){const t=Wi(e),r=/^((`{3,})(\w*)[^\n]*\n)([\s\S]*?)\n\2\s*$/gm;let i;for(;(i=r.exec(n))!==null;){const[s,o,a,l,c]=i;if(Wi(c)===t)return{source:s,code:c,language:l||"",opener:o.trimEnd(),delimiter:a}}return null}function wB(n,e,t){const r=e.opener+`
285
- `+t+`
286
- `+e.delimiter,i=n.indexOf(e.source);return i===-1?n:n.slice(0,i)+r+n.slice(i+e.source.length)}function _B(n,e,t){const i=e.opener.slice(e.delimiter.length).replace(/^\w*/,"").trim(),o=e.delimiter+t+(i?" "+i:"")+`
287
- `+e.code+`
288
- `+e.delimiter,a=n.indexOf(e.source);return a===-1?n:n.slice(0,a)+o+n.slice(a+e.source.length)}function kB(n,e){const t=n.split(`
289
- `);for(const r of t){const i=r.trim().match(/^!\[([^\]]*)\]\(([^)]*)\)\s*$/);if(!i)continue;const[,s,o]=i;if(o===e)return{source:r.trim(),alt:s,src:o}}return null}function xB(n,e,t,r){const i=`![${t}](${r})`,s=n.indexOf(e.source);return s===-1?n:n.slice(0,s)+i+n.slice(s+e.source.length)}function SB(n,e){const t=/\{%\s*icon\s+[^%]*name=["']([^"']+)["'][^%]*\/%\}/g;let r;for(;(r=t.exec(n))!==null;){const[i,s]=r;if(s===e)return{source:i,name:s}}return null}function AB(n,e,t){const r=e.source.replace(/name=["'][^"']+["']/,`name="${t}"`),i=n.indexOf(e.source);return i===-1?n:n.slice(0,i)+r+n.slice(i+e.source.length)}function CB(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var tp,V1;function TB(){if(V1)return tp;V1=1;function n(i){if(typeof i!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(i))}function e(i,s){for(var o="",a=0,l=-1,c=0,u,f=0;f<=i.length;++f){if(f<i.length)u=i.charCodeAt(f);else{if(u===47)break;u=47}if(u===47){if(!(l===f-1||c===1))if(l!==f-1&&c===2){if(o.length<2||a!==2||o.charCodeAt(o.length-1)!==46||o.charCodeAt(o.length-2)!==46){if(o.length>2){var d=o.lastIndexOf("/");if(d!==o.length-1){d===-1?(o="",a=0):(o=o.slice(0,d),a=o.length-1-o.lastIndexOf("/")),l=f,c=0;continue}}else if(o.length===2||o.length===1){o="",a=0,l=f,c=0;continue}}s&&(o.length>0?o+="/..":o="..",a=2)}else o.length>0?o+="/"+i.slice(l+1,f):o=i.slice(l+1,f),a=f-l-1;l=f,c=0}else u===46&&c!==-1?++c:c=-1}return o}function t(i,s){var o=s.dir||s.root,a=s.base||(s.name||"")+(s.ext||"");return o?o===s.root?o+a:o+i+a:a}var r={resolve:function(){for(var s="",o=!1,a,l=arguments.length-1;l>=-1&&!o;l--){var c;l>=0?c=arguments[l]:(a===void 0&&(a=process.cwd()),c=a),n(c),c.length!==0&&(s=c+"/"+s,o=c.charCodeAt(0)===47)}return s=e(s,!o),o?s.length>0?"/"+s:"/":s.length>0?s:"."},normalize:function(s){if(n(s),s.length===0)return".";var o=s.charCodeAt(0)===47,a=s.charCodeAt(s.length-1)===47;return s=e(s,!o),s.length===0&&!o&&(s="."),s.length>0&&a&&(s+="/"),o?"/"+s:s},isAbsolute:function(s){return n(s),s.length>0&&s.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var s,o=0;o<arguments.length;++o){var a=arguments[o];n(a),a.length>0&&(s===void 0?s=a:s+="/"+a)}return s===void 0?".":r.normalize(s)},relative:function(s,o){if(n(s),n(o),s===o||(s=r.resolve(s),o=r.resolve(o),s===o))return"";for(var a=1;a<s.length&&s.charCodeAt(a)===47;++a);for(var l=s.length,c=l-a,u=1;u<o.length&&o.charCodeAt(u)===47;++u);for(var f=o.length,d=f-u,h=c<d?c:d,g=-1,p=0;p<=h;++p){if(p===h){if(d>h){if(o.charCodeAt(u+p)===47)return o.slice(u+p+1);if(p===0)return o.slice(u+p)}else c>h&&(s.charCodeAt(a+p)===47?g=p:p===0&&(g=0));break}var O=s.charCodeAt(a+p),v=o.charCodeAt(u+p);if(O!==v)break;O===47&&(g=p)}var b="";for(p=a+g+1;p<=l;++p)(p===l||s.charCodeAt(p)===47)&&(b.length===0?b+="..":b+="/..");return b.length>0?b+o.slice(u+g):(u+=g,o.charCodeAt(u)===47&&++u,o.slice(u))},_makeLong:function(s){return s},dirname:function(s){if(n(s),s.length===0)return".";for(var o=s.charCodeAt(0),a=o===47,l=-1,c=!0,u=s.length-1;u>=1;--u)if(o=s.charCodeAt(u),o===47){if(!c){l=u;break}}else c=!1;return l===-1?a?"/":".":a&&l===1?"//":s.slice(0,l)},basename:function(s,o){if(o!==void 0&&typeof o!="string")throw new TypeError('"ext" argument must be a string');n(s);var a=0,l=-1,c=!0,u;if(o!==void 0&&o.length>0&&o.length<=s.length){if(o.length===s.length&&o===s)return"";var f=o.length-1,d=-1;for(u=s.length-1;u>=0;--u){var h=s.charCodeAt(u);if(h===47){if(!c){a=u+1;break}}else d===-1&&(c=!1,d=u+1),f>=0&&(h===o.charCodeAt(f)?--f===-1&&(l=u):(f=-1,l=d))}return a===l?l=d:l===-1&&(l=s.length),s.slice(a,l)}else{for(u=s.length-1;u>=0;--u)if(s.charCodeAt(u)===47){if(!c){a=u+1;break}}else l===-1&&(c=!1,l=u+1);return l===-1?"":s.slice(a,l)}},extname:function(s){n(s);for(var o=-1,a=0,l=-1,c=!0,u=0,f=s.length-1;f>=0;--f){var d=s.charCodeAt(f);if(d===47){if(!c){a=f+1;break}continue}l===-1&&(c=!1,l=f+1),d===46?o===-1?o=f:u!==1&&(u=1):o!==-1&&(u=-1)}return o===-1||l===-1||u===0||u===1&&o===l-1&&o===a+1?"":s.slice(o,l)},format:function(s){if(s===null||typeof s!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof s);return t("/",s)},parse:function(s){n(s);var o={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return o;var a=s.charCodeAt(0),l=a===47,c;l?(o.root="/",c=1):c=0;for(var u=-1,f=0,d=-1,h=!0,g=s.length-1,p=0;g>=c;--g){if(a=s.charCodeAt(g),a===47){if(!h){f=g+1;break}continue}d===-1&&(h=!1,d=g+1),a===46?u===-1?u=g:p!==1&&(p=1):u!==-1&&(p=-1)}return u===-1||d===-1||p===0||p===1&&u===d-1&&u===f+1?d!==-1&&(f===0&&l?o.base=o.name=s.slice(1,d):o.base=o.name=s.slice(f,d)):(f===0&&l?(o.name=s.slice(1,u),o.base=s.slice(1,d)):(o.name=s.slice(f,u),o.base=s.slice(f,d)),o.ext=s.slice(u,d)),f>0?o.dir=s.slice(0,f-1):l&&(o.dir="/"),o},sep:"/",delimiter:":",win32:null,posix:null};return r.posix=r,tp=r,tp}var PB=TB();const EB=CB(PB);var np={},rp={},W1;function Ov(){return W1||(W1=1,(function(n){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",t=e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",r="["+e+"]["+t+"]*",i=new RegExp("^"+r+"$"),s=function(a,l){const c=[];let u=l.exec(a);for(;u;){const f=[];f.startIndex=l.lastIndex-u[0].length;const d=u.length;for(let h=0;h<d;h++)f.push(u[h]);c.push(f),u=l.exec(a)}return c},o=function(a){const l=i.exec(a);return!(l===null||typeof l>"u")};n.isExist=function(a){return typeof a<"u"},n.isEmptyObject=function(a){return Object.keys(a).length===0},n.merge=function(a,l,c){if(l){const u=Object.keys(l),f=u.length;for(let d=0;d<f;d++)c==="strict"?a[u[d]]=[l[u[d]]]:a[u[d]]=l[u[d]]}},n.getValue=function(a){return n.isExist(a)?a:""},n.isName=o,n.getAllMatches=s,n.nameRegexp=r})(rp)),rp}var Y1;function AA(){if(Y1)return np;Y1=1;const n=Ov(),e={allowBooleanAttributes:!1,unpairedTags:[]};np.validate=function(v,b){b=Object.assign({},e,b);const _=[];let A=!1,y=!1;v[0]==="\uFEFF"&&(v=v.substr(1));for(let w=0;w<v.length;w++)if(v[w]==="<"&&v[w+1]==="?"){if(w+=2,w=r(v,w),w.err)return w}else if(v[w]==="<"){let S=w;if(w++,v[w]==="!"){w=i(v,w);continue}else{let C=!1;v[w]==="/"&&(C=!0,w++);let x="";for(;w<v.length&&v[w]!==">"&&v[w]!==" "&&v[w]!==" "&&v[w]!==`
290
- `&&v[w]!=="\r";w++)x+=v[w];if(x=x.trim(),x[x.length-1]==="/"&&(x=x.substring(0,x.length-1),w--),!g(x)){let T;return x.trim().length===0?T="Invalid space after '<'.":T="Tag '"+x+"' is an invalid name.",d("InvalidTag",T,p(v,w))}const k=a(v,w);if(k===!1)return d("InvalidAttr","Attributes for '"+x+"' have open quote.",p(v,w));let E=k.value;if(w=k.index,E[E.length-1]==="/"){const T=w-E.length;E=E.substring(0,E.length-1);const $=c(E,b);if($===!0)A=!0;else return d($.err.code,$.err.msg,p(v,T+$.err.line))}else if(C)if(k.tagClosed){if(E.trim().length>0)return d("InvalidTag","Closing tag '"+x+"' can't have attributes or invalid starting.",p(v,S));if(_.length===0)return d("InvalidTag","Closing tag '"+x+"' has not been opened.",p(v,S));{const T=_.pop();if(x!==T.tagName){let $=p(v,T.tagStartPos);return d("InvalidTag","Expected closing tag '"+T.tagName+"' (opened in line "+$.line+", col "+$.col+") instead of closing tag '"+x+"'.",p(v,S))}_.length==0&&(y=!0)}}else return d("InvalidTag","Closing tag '"+x+"' doesn't have proper closing.",p(v,w));else{const T=c(E,b);if(T!==!0)return d(T.err.code,T.err.msg,p(v,w-E.length+T.err.line));if(y===!0)return d("InvalidXml","Multiple possible root nodes found.",p(v,w));b.unpairedTags.indexOf(x)!==-1||_.push({tagName:x,tagStartPos:S}),A=!0}for(w++;w<v.length;w++)if(v[w]==="<")if(v[w+1]==="!"){w++,w=i(v,w);continue}else if(v[w+1]==="?"){if(w=r(v,++w),w.err)return w}else break;else if(v[w]==="&"){const T=f(v,w);if(T==-1)return d("InvalidChar","char '&' is not expected.",p(v,w));w=T}else if(y===!0&&!t(v[w]))return d("InvalidXml","Extra text at the end",p(v,w));v[w]==="<"&&w--}}else{if(t(v[w]))continue;return d("InvalidChar","char '"+v[w]+"' is not expected.",p(v,w))}if(A){if(_.length==1)return d("InvalidTag","Unclosed tag '"+_[0].tagName+"'.",p(v,_[0].tagStartPos));if(_.length>0)return d("InvalidXml","Invalid '"+JSON.stringify(_.map(w=>w.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return d("InvalidXml","Start tag expected.",1);return!0};function t(v){return v===" "||v===" "||v===`
291
- `||v==="\r"}function r(v,b){const _=b;for(;b<v.length;b++)if(v[b]=="?"||v[b]==" "){const A=v.substr(_,b-_);if(b>5&&A==="xml")return d("InvalidXml","XML declaration allowed only at the start of the document.",p(v,b));if(v[b]=="?"&&v[b+1]==">"){b++;break}else continue}return b}function i(v,b){if(v.length>b+5&&v[b+1]==="-"&&v[b+2]==="-"){for(b+=3;b<v.length;b++)if(v[b]==="-"&&v[b+1]==="-"&&v[b+2]===">"){b+=2;break}}else if(v.length>b+8&&v[b+1]==="D"&&v[b+2]==="O"&&v[b+3]==="C"&&v[b+4]==="T"&&v[b+5]==="Y"&&v[b+6]==="P"&&v[b+7]==="E"){let _=1;for(b+=8;b<v.length;b++)if(v[b]==="<")_++;else if(v[b]===">"&&(_--,_===0))break}else if(v.length>b+9&&v[b+1]==="["&&v[b+2]==="C"&&v[b+3]==="D"&&v[b+4]==="A"&&v[b+5]==="T"&&v[b+6]==="A"&&v[b+7]==="["){for(b+=8;b<v.length;b++)if(v[b]==="]"&&v[b+1]==="]"&&v[b+2]===">"){b+=2;break}}return b}const s='"',o="'";function a(v,b){let _="",A="",y=!1;for(;b<v.length;b++){if(v[b]===s||v[b]===o)A===""?A=v[b]:A!==v[b]||(A="");else if(v[b]===">"&&A===""){y=!0;break}_+=v[b]}return A!==""?!1:{value:_,index:b,tagClosed:y}}const l=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function c(v,b){const _=n.getAllMatches(v,l),A={};for(let y=0;y<_.length;y++){if(_[y][1].length===0)return d("InvalidAttr","Attribute '"+_[y][2]+"' has no space in starting.",O(_[y]));if(_[y][3]!==void 0&&_[y][4]===void 0)return d("InvalidAttr","Attribute '"+_[y][2]+"' is without value.",O(_[y]));if(_[y][3]===void 0&&!b.allowBooleanAttributes)return d("InvalidAttr","boolean attribute '"+_[y][2]+"' is not allowed.",O(_[y]));const w=_[y][2];if(!h(w))return d("InvalidAttr","Attribute '"+w+"' is an invalid name.",O(_[y]));if(!A.hasOwnProperty(w))A[w]=1;else return d("InvalidAttr","Attribute '"+w+"' is repeated.",O(_[y]))}return!0}function u(v,b){let _=/\d/;for(v[b]==="x"&&(b++,_=/[\da-fA-F]/);b<v.length;b++){if(v[b]===";")return b;if(!v[b].match(_))break}return-1}function f(v,b){if(b++,v[b]===";")return-1;if(v[b]==="#")return b++,u(v,b);let _=0;for(;b<v.length;b++,_++)if(!(v[b].match(/\w/)&&_<20)){if(v[b]===";")break;return-1}return b}function d(v,b,_){return{err:{code:v,msg:b,line:_.line||_,col:_.col}}}function h(v){return n.isName(v)}function g(v){return n.isName(v)}function p(v,b){const _=v.substring(0,b).split(/\r?\n/);return{line:_.length,col:_[_.length-1].length+1}}function O(v){return v.startIndex+v[1].length}return np}var Lu={},U1;function $B(){if(U1)return Lu;U1=1;const n={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,r){return r},attributeValueProcessor:function(t,r){return r},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,r,i){return t}},e=function(t){return Object.assign({},n,t)};return Lu.buildOptions=e,Lu.defaultOptions=n,Lu}var ip,G1;function QB(){if(G1)return ip;G1=1;class n{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,r){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:r})}addChild(t){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}return ip=n,ip}var sp,H1;function LB(){if(H1)return sp;H1=1;const n=Ov();function e(c,u){const f={};if(c[u+3]==="O"&&c[u+4]==="C"&&c[u+5]==="T"&&c[u+6]==="Y"&&c[u+7]==="P"&&c[u+8]==="E"){u=u+9;let d=1,h=!1,g=!1,p="";for(;u<c.length;u++)if(c[u]==="<"&&!g){if(h&&i(c,u)){u+=7;let O,v;[O,v,u]=t(c,u+1),v.indexOf("&")===-1&&(f[l(O)]={regx:RegExp(`&${O};`,"g"),val:v})}else if(h&&s(c,u))u+=8;else if(h&&o(c,u))u+=8;else if(h&&a(c,u))u+=9;else if(r)g=!0;else throw new Error("Invalid DOCTYPE");d++,p=""}else if(c[u]===">"){if(g?c[u-1]==="-"&&c[u-2]==="-"&&(g=!1,d--):d--,d===0)break}else c[u]==="["?h=!0:p+=c[u];if(d!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:f,i:u}}function t(c,u){let f="";for(;u<c.length&&c[u]!=="'"&&c[u]!=='"';u++)f+=c[u];if(f=f.trim(),f.indexOf(" ")!==-1)throw new Error("External entites are not supported");const d=c[u++];let h="";for(;u<c.length&&c[u]!==d;u++)h+=c[u];return[f,h,u]}function r(c,u){return c[u+1]==="!"&&c[u+2]==="-"&&c[u+3]==="-"}function i(c,u){return c[u+1]==="!"&&c[u+2]==="E"&&c[u+3]==="N"&&c[u+4]==="T"&&c[u+5]==="I"&&c[u+6]==="T"&&c[u+7]==="Y"}function s(c,u){return c[u+1]==="!"&&c[u+2]==="E"&&c[u+3]==="L"&&c[u+4]==="E"&&c[u+5]==="M"&&c[u+6]==="E"&&c[u+7]==="N"&&c[u+8]==="T"}function o(c,u){return c[u+1]==="!"&&c[u+2]==="A"&&c[u+3]==="T"&&c[u+4]==="T"&&c[u+5]==="L"&&c[u+6]==="I"&&c[u+7]==="S"&&c[u+8]==="T"}function a(c,u){return c[u+1]==="!"&&c[u+2]==="N"&&c[u+3]==="O"&&c[u+4]==="T"&&c[u+5]==="A"&&c[u+6]==="T"&&c[u+7]==="I"&&c[u+8]==="O"&&c[u+9]==="N"}function l(c){if(n.isName(c))return c;throw new Error(`Invalid entity name ${c}`)}return sp=e,sp}var op,K1;function MB(){if(K1)return op;K1=1;const n=/^[-+]?0x[a-fA-F0-9]+$/,e=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,t={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function r(o,a={}){if(a=Object.assign({},t,a),!o||typeof o!="string")return o;let l=o.trim();if(a.skipLike!==void 0&&a.skipLike.test(l))return o;if(o==="0")return 0;if(a.hex&&n.test(l))return s(l,16);if(l.search(/[eE]/)!==-1){const c=l.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(c){if(a.leadingZeros)l=(c[1]||"")+c[3];else if(!(c[2]==="0"&&c[3][0]==="."))return o;return a.eNotation?Number(l):o}else return o}else{const c=e.exec(l);if(c){const u=c[1],f=c[2];let d=i(c[3]);if(!a.leadingZeros&&f.length>0&&u&&l[2]!==".")return o;if(!a.leadingZeros&&f.length>0&&!u&&l[1]!==".")return o;if(a.leadingZeros&&f===o)return 0;{const h=Number(l),g=""+h;return g.search(/[eE]/)!==-1?a.eNotation?h:o:l.indexOf(".")!==-1?g==="0"&&d===""||g===d||u&&g==="-"+d?h:o:f?d===g||u+d===g?h:o:l===g||l===u+g?h:o}}else return o}}function i(o){return o&&o.indexOf(".")!==-1&&(o=o.replace(/0+$/,""),o==="."?o="0":o[0]==="."?o="0"+o:o[o.length-1]==="."&&(o=o.substr(0,o.length-1))),o}function s(o,a){if(parseInt)return parseInt(o,a);if(Number.parseInt)return Number.parseInt(o,a);if(window&&window.parseInt)return window.parseInt(o,a);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}return op=r,op}var ap,J1;function CA(){if(J1)return ap;J1=1;function n(e){return typeof e=="function"?e:Array.isArray(e)?t=>{for(const r of e)if(typeof r=="string"&&t===r||r instanceof RegExp&&r.test(t))return!0}:()=>!1}return ap=n,ap}var lp,e0;function DB(){if(e0)return lp;e0=1;const n=Ov(),e=QB(),t=LB(),r=MB(),i=CA();class s{constructor(w){this.options=w,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(S,C)=>String.fromCharCode(Number.parseInt(C,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(S,C)=>String.fromCharCode(Number.parseInt(C,16))}},this.addExternalEntities=o,this.parseXml=f,this.parseTextData=a,this.resolveNameSpace=l,this.buildAttributesMap=u,this.isItStopNode=p,this.replaceEntitiesValue=h,this.readStopNodeData=_,this.saveTextToParentTag=g,this.addChild=d,this.ignoreAttributesFn=i(this.options.ignoreAttributes)}}function o(y){const w=Object.keys(y);for(let S=0;S<w.length;S++){const C=w[S];this.lastEntities[C]={regex:new RegExp("&"+C+";","g"),val:y[C]}}}function a(y,w,S,C,x,k,E){if(y!==void 0&&(this.options.trimValues&&!C&&(y=y.trim()),y.length>0)){E||(y=this.replaceEntitiesValue(y));const T=this.options.tagValueProcessor(w,y,S,x,k);return T==null?y:typeof T!=typeof y||T!==y?T:this.options.trimValues?A(y,this.options.parseTagValue,this.options.numberParseOptions):y.trim()===y?A(y,this.options.parseTagValue,this.options.numberParseOptions):y}}function l(y){if(this.options.removeNSPrefix){const w=y.split(":"),S=y.charAt(0)==="/"?"/":"";if(w[0]==="xmlns")return"";w.length===2&&(y=S+w[1])}return y}const c=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function u(y,w,S){if(this.options.ignoreAttributes!==!0&&typeof y=="string"){const C=n.getAllMatches(y,c),x=C.length,k={};for(let E=0;E<x;E++){const T=this.resolveNameSpace(C[E][1]);if(this.ignoreAttributesFn(T,w))continue;let $=C[E][4],M=this.options.attributeNamePrefix+T;if(T.length)if(this.options.transformAttributeName&&(M=this.options.transformAttributeName(M)),M==="__proto__"&&(M="#__proto__"),$!==void 0){this.options.trimValues&&($=$.trim()),$=this.replaceEntitiesValue($);const P=this.options.attributeValueProcessor(T,$,w);P==null?k[M]=$:typeof P!=typeof $||P!==$?k[M]=P:k[M]=A($,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(k[M]=!0)}if(!Object.keys(k).length)return;if(this.options.attributesGroupName){const E={};return E[this.options.attributesGroupName]=k,E}return k}}const f=function(y){y=y.replace(/\r\n?/g,`
292
- `);const w=new e("!xml");let S=w,C="",x="";for(let k=0;k<y.length;k++)if(y[k]==="<")if(y[k+1]==="/"){const T=v(y,">",k,"Closing Tag is not closed.");let $=y.substring(k+2,T).trim();if(this.options.removeNSPrefix){const D=$.indexOf(":");D!==-1&&($=$.substr(D+1))}this.options.transformTagName&&($=this.options.transformTagName($)),S&&(C=this.saveTextToParentTag(C,S,x));const M=x.substring(x.lastIndexOf(".")+1);if($&&this.options.unpairedTags.indexOf($)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${$}>`);let P=0;M&&this.options.unpairedTags.indexOf(M)!==-1?(P=x.lastIndexOf(".",x.lastIndexOf(".")-1),this.tagsNodeStack.pop()):P=x.lastIndexOf("."),x=x.substring(0,P),S=this.tagsNodeStack.pop(),C="",k=T}else if(y[k+1]==="?"){let T=b(y,k,!1,"?>");if(!T)throw new Error("Pi Tag is not closed.");if(C=this.saveTextToParentTag(C,S,x),!(this.options.ignoreDeclaration&&T.tagName==="?xml"||this.options.ignorePiTags)){const $=new e(T.tagName);$.add(this.options.textNodeName,""),T.tagName!==T.tagExp&&T.attrExpPresent&&($[":@"]=this.buildAttributesMap(T.tagExp,x,T.tagName)),this.addChild(S,$,x)}k=T.closeIndex+1}else if(y.substr(k+1,3)==="!--"){const T=v(y,"-->",k+4,"Comment is not closed.");if(this.options.commentPropName){const $=y.substring(k+4,T-2);C=this.saveTextToParentTag(C,S,x),S.add(this.options.commentPropName,[{[this.options.textNodeName]:$}])}k=T}else if(y.substr(k+1,2)==="!D"){const T=t(y,k);this.docTypeEntities=T.entities,k=T.i}else if(y.substr(k+1,2)==="!["){const T=v(y,"]]>",k,"CDATA is not closed.")-2,$=y.substring(k+9,T);C=this.saveTextToParentTag(C,S,x);let M=this.parseTextData($,S.tagname,x,!0,!1,!0,!0);M==null&&(M=""),this.options.cdataPropName?S.add(this.options.cdataPropName,[{[this.options.textNodeName]:$}]):S.add(this.options.textNodeName,M),k=T+2}else{let T=b(y,k,this.options.removeNSPrefix),$=T.tagName;const M=T.rawTagName;let P=T.tagExp,D=T.attrExpPresent,I=T.closeIndex;this.options.transformTagName&&($=this.options.transformTagName($)),S&&C&&S.tagname!=="!xml"&&(C=this.saveTextToParentTag(C,S,x,!1));const W=S;if(W&&this.options.unpairedTags.indexOf(W.tagname)!==-1&&(S=this.tagsNodeStack.pop(),x=x.substring(0,x.lastIndexOf("."))),$!==w.tagname&&(x+=x?"."+$:$),this.isItStopNode(this.options.stopNodes,x,$)){let U="";if(P.length>0&&P.lastIndexOf("/")===P.length-1)$[$.length-1]==="/"?($=$.substr(0,$.length-1),x=x.substr(0,x.length-1),P=$):P=P.substr(0,P.length-1),k=T.closeIndex;else if(this.options.unpairedTags.indexOf($)!==-1)k=T.closeIndex;else{const ce=this.readStopNodeData(y,M,I+1);if(!ce)throw new Error(`Unexpected end of ${M}`);k=ce.i,U=ce.tagContent}const ae=new e($);$!==P&&D&&(ae[":@"]=this.buildAttributesMap(P,x,$)),U&&(U=this.parseTextData(U,$,x,!0,D,!0,!0)),x=x.substr(0,x.lastIndexOf(".")),ae.add(this.options.textNodeName,U),this.addChild(S,ae,x)}else{if(P.length>0&&P.lastIndexOf("/")===P.length-1){$[$.length-1]==="/"?($=$.substr(0,$.length-1),x=x.substr(0,x.length-1),P=$):P=P.substr(0,P.length-1),this.options.transformTagName&&($=this.options.transformTagName($));const U=new e($);$!==P&&D&&(U[":@"]=this.buildAttributesMap(P,x,$)),this.addChild(S,U,x),x=x.substr(0,x.lastIndexOf("."))}else{const U=new e($);this.tagsNodeStack.push(S),$!==P&&D&&(U[":@"]=this.buildAttributesMap(P,x,$)),this.addChild(S,U,x),S=U}C="",k=I}}else C+=y[k];return w.child};function d(y,w,S){const C=this.options.updateTag(w.tagname,S,w[":@"]);C===!1||(typeof C=="string"&&(w.tagname=C),y.addChild(w))}const h=function(y){if(this.options.processEntities){for(let w in this.docTypeEntities){const S=this.docTypeEntities[w];y=y.replace(S.regx,S.val)}for(let w in this.lastEntities){const S=this.lastEntities[w];y=y.replace(S.regex,S.val)}if(this.options.htmlEntities)for(let w in this.htmlEntities){const S=this.htmlEntities[w];y=y.replace(S.regex,S.val)}y=y.replace(this.ampEntity.regex,this.ampEntity.val)}return y};function g(y,w,S,C){return y&&(C===void 0&&(C=Object.keys(w.child).length===0),y=this.parseTextData(y,w.tagname,S,!1,w[":@"]?Object.keys(w[":@"]).length!==0:!1,C),y!==void 0&&y!==""&&w.add(this.options.textNodeName,y),y=""),y}function p(y,w,S){const C="*."+S;for(const x in y){const k=y[x];if(C===k||w===k)return!0}return!1}function O(y,w,S=">"){let C,x="";for(let k=w;k<y.length;k++){let E=y[k];if(C)E===C&&(C="");else if(E==='"'||E==="'")C=E;else if(E===S[0])if(S[1]){if(y[k+1]===S[1])return{data:x,index:k}}else return{data:x,index:k};else E===" "&&(E=" ");x+=E}}function v(y,w,S,C){const x=y.indexOf(w,S);if(x===-1)throw new Error(C);return x+w.length-1}function b(y,w,S,C=">"){const x=O(y,w+1,C);if(!x)return;let k=x.data;const E=x.index,T=k.search(/\s/);let $=k,M=!0;T!==-1&&($=k.substring(0,T),k=k.substring(T+1).trimStart());const P=$;if(S){const D=$.indexOf(":");D!==-1&&($=$.substr(D+1),M=$!==x.data.substr(D+1))}return{tagName:$,tagExp:k,closeIndex:E,attrExpPresent:M,rawTagName:P}}function _(y,w,S){const C=S;let x=1;for(;S<y.length;S++)if(y[S]==="<")if(y[S+1]==="/"){const k=v(y,">",S,`${w} is not closed`);if(y.substring(S+2,k).trim()===w&&(x--,x===0))return{tagContent:y.substring(C,S),i:k};S=k}else if(y[S+1]==="?")S=v(y,"?>",S+1,"StopNode is not closed.");else if(y.substr(S+1,3)==="!--")S=v(y,"-->",S+3,"StopNode is not closed.");else if(y.substr(S+1,2)==="![")S=v(y,"]]>",S,"StopNode is not closed.")-2;else{const k=b(y,S,">");k&&((k&&k.tagName)===w&&k.tagExp[k.tagExp.length-1]!=="/"&&x++,S=k.closeIndex)}}function A(y,w,S){if(w&&typeof y=="string"){const C=y.trim();return C==="true"?!0:C==="false"?!1:r(y,S)}else return n.isExist(y)?y:""}return lp=s,lp}var cp={},t0;function qB(){if(t0)return cp;t0=1;function n(s,o){return e(s,o)}function e(s,o,a){let l;const c={};for(let u=0;u<s.length;u++){const f=s[u],d=t(f);let h="";if(a===void 0?h=d:h=a+"."+d,d===o.textNodeName)l===void 0?l=f[d]:l+=""+f[d];else{if(d===void 0)continue;if(f[d]){let g=e(f[d],o,h);const p=i(g,o);f[":@"]?r(g,f[":@"],h,o):Object.keys(g).length===1&&g[o.textNodeName]!==void 0&&!o.alwaysCreateTextNode?g=g[o.textNodeName]:Object.keys(g).length===0&&(o.alwaysCreateTextNode?g[o.textNodeName]="":g=""),c[d]!==void 0&&c.hasOwnProperty(d)?(Array.isArray(c[d])||(c[d]=[c[d]]),c[d].push(g)):o.isArray(d,h,p)?c[d]=[g]:c[d]=g}}}return typeof l=="string"?l.length>0&&(c[o.textNodeName]=l):l!==void 0&&(c[o.textNodeName]=l),c}function t(s){const o=Object.keys(s);for(let a=0;a<o.length;a++){const l=o[a];if(l!==":@")return l}}function r(s,o,a,l){if(o){const c=Object.keys(o),u=c.length;for(let f=0;f<u;f++){const d=c[f];l.isArray(d,a+"."+d,!0,!0)?s[d]=[o[d]]:s[d]=o[d]}}}function i(s,o){const{textNodeName:a}=o,l=Object.keys(s).length;return!!(l===0||l===1&&(s[a]||typeof s[a]=="boolean"||s[a]===0))}return cp.prettify=n,cp}var up,n0;function RB(){if(n0)return up;n0=1;const{buildOptions:n}=$B(),e=DB(),{prettify:t}=qB(),r=AA();class i{constructor(o){this.externalEntities={},this.options=n(o)}parse(o,a){if(typeof o!="string")if(o.toString)o=o.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(a){a===!0&&(a={});const u=r.validate(o,a);if(u!==!0)throw Error(`${u.err.msg}:${u.err.line}:${u.err.col}`)}const l=new e(this.options);l.addExternalEntities(this.externalEntities);const c=l.parseXml(o);return this.options.preserveOrder||c===void 0?c:t(c,this.options)}addEntity(o,a){if(a.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(o.indexOf("&")!==-1||o.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(a==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[o]=a}}return up=i,up}var fp,r0;function IB(){if(r0)return fp;r0=1;const n=`
293
- `;function e(a,l){let c="";return l.format&&l.indentBy.length>0&&(c=n),t(a,l,"",c)}function t(a,l,c,u){let f="",d=!1;for(let h=0;h<a.length;h++){const g=a[h],p=r(g);if(p===void 0)continue;let O="";if(c.length===0?O=p:O=`${c}.${p}`,p===l.textNodeName){let y=g[p];s(O,l)||(y=l.tagValueProcessor(p,y),y=o(y,l)),d&&(f+=u),f+=y,d=!1;continue}else if(p===l.cdataPropName){d&&(f+=u),f+=`<![CDATA[${g[p][0][l.textNodeName]}]]>`,d=!1;continue}else if(p===l.commentPropName){f+=u+`<!--${g[p][0][l.textNodeName]}-->`,d=!0;continue}else if(p[0]==="?"){const y=i(g[":@"],l),w=p==="?xml"?"":u;let S=g[p][0][l.textNodeName];S=S.length!==0?" "+S:"",f+=w+`<${p}${S}${y}?>`,d=!0;continue}let v=u;v!==""&&(v+=l.indentBy);const b=i(g[":@"],l),_=u+`<${p}${b}`,A=t(g[p],l,O,v);l.unpairedTags.indexOf(p)!==-1?l.suppressUnpairedNode?f+=_+">":f+=_+"/>":(!A||A.length===0)&&l.suppressEmptyNode?f+=_+"/>":A&&A.endsWith(">")?f+=_+`>${A}${u}</${p}>`:(f+=_+">",A&&u!==""&&(A.includes("/>")||A.includes("</"))?f+=u+l.indentBy+A+u:f+=A,f+=`</${p}>`),d=!0}return f}function r(a){const l=Object.keys(a);for(let c=0;c<l.length;c++){const u=l[c];if(a.hasOwnProperty(u)&&u!==":@")return u}}function i(a,l){let c="";if(a&&!l.ignoreAttributes)for(let u in a){if(!a.hasOwnProperty(u))continue;let f=l.attributeValueProcessor(u,a[u]);f=o(f,l),f===!0&&l.suppressBooleanAttributes?c+=` ${u.substr(l.attributeNamePrefix.length)}`:c+=` ${u.substr(l.attributeNamePrefix.length)}="${f}"`}return c}function s(a,l){a=a.substr(0,a.length-l.textNodeName.length-1);let c=a.substr(a.lastIndexOf(".")+1);for(let u in l.stopNodes)if(l.stopNodes[u]===a||l.stopNodes[u]==="*."+c)return!0;return!1}function o(a,l){if(a&&a.length>0&&l.processEntities)for(let c=0;c<l.entities.length;c++){const u=l.entities[c];a=a.replace(u.regex,u.val)}return a}return fp=e,fp}var dp,i0;function NB(){if(i0)return dp;i0=1;const n=IB(),e=CA(),t={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(a,l){return l},attributeValueProcessor:function(a,l){return l},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function r(a){this.options=Object.assign({},t,a),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=e(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=o),this.processTextOrObjNode=i,this.options.format?(this.indentate=s,this.tagEndChar=`>
294
- `,this.newLine=`
295
- `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}r.prototype.build=function(a){return this.options.preserveOrder?n(a,this.options):(Array.isArray(a)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(a={[this.options.arrayNodeName]:a}),this.j2x(a,0,[]).val)},r.prototype.j2x=function(a,l,c){let u="",f="";const d=c.join(".");for(let h in a)if(Object.prototype.hasOwnProperty.call(a,h))if(typeof a[h]>"u")this.isAttribute(h)&&(f+="");else if(a[h]===null)this.isAttribute(h)?f+="":h[0]==="?"?f+=this.indentate(l)+"<"+h+"?"+this.tagEndChar:f+=this.indentate(l)+"<"+h+"/"+this.tagEndChar;else if(a[h]instanceof Date)f+=this.buildTextValNode(a[h],h,"",l);else if(typeof a[h]!="object"){const g=this.isAttribute(h);if(g&&!this.ignoreAttributesFn(g,d))u+=this.buildAttrPairStr(g,""+a[h]);else if(!g)if(h===this.options.textNodeName){let p=this.options.tagValueProcessor(h,""+a[h]);f+=this.replaceEntitiesValue(p)}else f+=this.buildTextValNode(a[h],h,"",l)}else if(Array.isArray(a[h])){const g=a[h].length;let p="",O="";for(let v=0;v<g;v++){const b=a[h][v];if(!(typeof b>"u"))if(b===null)h[0]==="?"?f+=this.indentate(l)+"<"+h+"?"+this.tagEndChar:f+=this.indentate(l)+"<"+h+"/"+this.tagEndChar;else if(typeof b=="object")if(this.options.oneListGroup){const _=this.j2x(b,l+1,c.concat(h));p+=_.val,this.options.attributesGroupName&&b.hasOwnProperty(this.options.attributesGroupName)&&(O+=_.attrStr)}else p+=this.processTextOrObjNode(b,h,l,c);else if(this.options.oneListGroup){let _=this.options.tagValueProcessor(h,b);_=this.replaceEntitiesValue(_),p+=_}else p+=this.buildTextValNode(b,h,"",l)}this.options.oneListGroup&&(p=this.buildObjectNode(p,h,O,l)),f+=p}else if(this.options.attributesGroupName&&h===this.options.attributesGroupName){const g=Object.keys(a[h]),p=g.length;for(let O=0;O<p;O++)u+=this.buildAttrPairStr(g[O],""+a[h][g[O]])}else f+=this.processTextOrObjNode(a[h],h,l,c);return{attrStr:u,val:f}},r.prototype.buildAttrPairStr=function(a,l){return l=this.options.attributeValueProcessor(a,""+l),l=this.replaceEntitiesValue(l),this.options.suppressBooleanAttributes&&l==="true"?" "+a:" "+a+'="'+l+'"'};function i(a,l,c,u){const f=this.j2x(a,c+1,u.concat(l));return a[this.options.textNodeName]!==void 0&&Object.keys(a).length===1?this.buildTextValNode(a[this.options.textNodeName],l,f.attrStr,c):this.buildObjectNode(f.val,l,f.attrStr,c)}r.prototype.buildObjectNode=function(a,l,c,u){if(a==="")return l[0]==="?"?this.indentate(u)+"<"+l+c+"?"+this.tagEndChar:this.indentate(u)+"<"+l+c+this.closeTag(l)+this.tagEndChar;{let f="</"+l+this.tagEndChar,d="";return l[0]==="?"&&(d="?",f=""),(c||c==="")&&a.indexOf("<")===-1?this.indentate(u)+"<"+l+c+d+">"+a+f:this.options.commentPropName!==!1&&l===this.options.commentPropName&&d.length===0?this.indentate(u)+`<!--${a}-->`+this.newLine:this.indentate(u)+"<"+l+c+d+this.tagEndChar+a+this.indentate(u)+f}},r.prototype.closeTag=function(a){let l="";return this.options.unpairedTags.indexOf(a)!==-1?this.options.suppressUnpairedNode||(l="/"):this.options.suppressEmptyNode?l="/":l=`></${a}`,l},r.prototype.buildTextValNode=function(a,l,c,u){if(this.options.cdataPropName!==!1&&l===this.options.cdataPropName)return this.indentate(u)+`<![CDATA[${a}]]>`+this.newLine;if(this.options.commentPropName!==!1&&l===this.options.commentPropName)return this.indentate(u)+`<!--${a}-->`+this.newLine;if(l[0]==="?")return this.indentate(u)+"<"+l+c+"?"+this.tagEndChar;{let f=this.options.tagValueProcessor(l,a);return f=this.replaceEntitiesValue(f),f===""?this.indentate(u)+"<"+l+c+this.closeTag(l)+this.tagEndChar:this.indentate(u)+"<"+l+c+">"+f+"</"+l+this.tagEndChar}},r.prototype.replaceEntitiesValue=function(a){if(a&&a.length>0&&this.options.processEntities)for(let l=0;l<this.options.entities.length;l++){const c=this.options.entities[l];a=a.replace(c.regex,c.val)}return a};function s(a){return this.options.indentBy.repeat(a)}function o(a){return a.startsWith(this.options.attributeNamePrefix)&&a!==this.options.textNodeName?a.substr(this.attrPrefixLen):!1}return dp=r,dp}var hp,s0;function BB(){if(s0)return hp;s0=1;const n=AA(),e=RB(),t=NB();return hp={XMLParser:e,XMLValidator:n,XMLBuilder:t},hp}var jB=BB();const zB="RFTO",ZB="RFTC";function XB(n){return n.includes("")?n.replaceAll(zB,"{%").replaceAll(ZB,"%}"):n}const{dirname:TA,join:PA,isAbsolute:FB}=EB,{Tag:wi}=z,VB={children:["inline"],attributes:{level:{type:"Number",required:!0,render:!1},property:{type:String,required:!1}},transform(n,e){const t=n.transformAttributes(e),r=n.transformChildren(e);return(!t.id||typeof t.id!="string")&&(t.id=r.filter(i=>typeof i=="string").join(" ").replace(/[?{}%]/g,"").replace(/\s+/g,"-").toLowerCase()),new wi(`h${n.attributes.level}`,t,r)}},WB={children:["inline"],attributes:{property:{type:String,required:!1}},render:"p"},YB={render:"fence",attributes:{content:{type:String,render:!1},process:{type:Boolean,render:!1,default:!1},language:{type:String,render:!1,default:"shell"},source:{type:String,render:!1},lines:{type:String,render:!1},linenumbers:{type:Boolean,render:!1,default:!1},highlight:{type:String,render:!1},label:{type:String,render:!1}},transform(n,e){const t=n.attributes.language||"shell",r={"data-language":t},i={"data-language":t},s=n.attributes.source;typeof s=="string"&&s.length>0&&(r["data-source"]=s,i["data-source"]=s);const o=n.attributes.lines;if(typeof o=="string"&&o.length>0){r["data-lines"]=o,i["data-lines"]=o;const c=/^(\d+)/.exec(o.trim());if(c){const u=Number(c[1]);if(Number.isFinite(u)&&u>0){const f=typeof r.style=="string"?`${r.style}; `:"";r.style=`${f}--rf-start-line: ${u-1}`}}}n.attributes.linenumbers===!0&&(r["data-linenumbers"]="true",i["data-linenumbers"]="true");const a=n.attributes.highlight;typeof a=="string"&&a.length>0&&(r["data-highlight-lines"]=a,i["data-highlight-lines"]=a);for(const[c,u]of Object.entries(n.attributes))c.startsWith("data-")&&(r[c]=u,i[c]=u);const l=new wi("pre",r,[new wi("code",i,[XB(n.attributes.content)])]);return new wi("div",{class:"rf-codeblock"},[l])}},UB={children:["item"],attributes:{ordered:{type:Boolean,render:!1,required:!0},start:{type:Number},marker:{type:String,render:!1}},transform(n,e){return new wi(n.attributes.ordered?"ol":"ul",n.transformAttributes(e),n.transformChildren(e))}},GB={render:"li",children:["inline","heading","paragraph","image","table","tag","fence","blockquote","list","hr"],attributes:{property:{type:String,required:!1},typeof:{type:String,required:!1}}},HB={render:"em",children:["strong","s","link","code","text","tag"],attributes:{marker:{type:String,render:!0}}},KB={render:"strong",children:["em","s","link","code","text","tag"],attributes:{marker:{type:String,render:!0}}},JB={attributes:{content:{type:String,required:!0},property:{type:String,required:!1}},transform(n,e){const t=n.transformAttributes(e);return t.property?new wi("span",{"data-field":t.property},[n.attributes.content]):n.attributes.content}},EA={children:["strong","em","s","code","text","tag"],attributes:{href:{type:String,required:!0},title:{type:String}},render:"a",transform(n,e){const{urls:t,path:r}=e.variables||{},i=r?TA(r):"/";let s=n.attributes;const o=i!=="/"?PA(i,n.attributes.href):n.attributes.href;if(o in(t||{})){const a=t[o];s={...s,href:a}}return new wi(this.render,s,n.transformChildren(e))}},ej=z.nodes.hardbreak,tj={render:"img",attributes:{src:{type:String,required:!0},alt:{type:String},title:{type:String},property:{type:String}},transform(n,e){const t=n.transformAttributes(e),r=e.variables?.svg||[];let i=n.attributes.src;!FB(i)&&e.variables?.path&&(i=PA("/",TA(e.variables.path),i));const s=r.find(o=>o._id===i);if(s){let a=new jB.XMLParser({ignoreAttributes:!1}).parse(s.content);const l=Hm("svg",a.svg);return t.property&&(l.attributes["data-field"]=t.property),l.attributes.xmlns=void 0,l}return new wi(this.render,t,n.transformChildren(e))}},nj={children:["thead","tbody","tr"],attributes:{},transform(n,e){const t=new wi("table",n.transformAttributes(e),n.transformChildren(e));return new wi("div",{class:"rf-table-wrapper"},[t])}};function Hm(n,e){if(Array.isArray(e))return e.map(i=>Hm(n,i));let t=[],r={};for(const[i,s]of Object.entries(e))i.startsWith("@_")?r[i.slice(2)]=s:i==="#text"?t.push(s):t.push(Hm(i,s));return new wi(n,r,t)}const{Tag:oY}=z,{Ast:ff}=z;function rj(n){let e,t;return{filtered:n.filter(i=>i.type==="tag"&&i.tag==="tint"?(e=i,!1):i.type==="tag"&&i.tag==="bg"?(t=i,!1):!0),tintNode:e,bgNode:t}}function Tc(n,e){if(e==="any")return!0;if(e.includes("|"))return e.split("|").some(t=>Tc(n,t));if(e.startsWith("heading:")){const t=parseInt(e.slice(8),10);return n.type==="heading"&&n.attributes?.level===t}if(e==="list:ordered")return n.type==="list"&&n.attributes?.ordered===!0;if(e==="list:unordered")return n.type==="list"&&n.attributes?.ordered!==!0;if(e.startsWith("tag:")){const t=e.slice(4);return n.type==="tag"&&n.tag===t}return n.type===e}function va(n,e){const t={};let r=0;for(const i of e){if(r>=n.length)continue;const s=n[r];if(Tc(s,i.match)){if(i.greedy){const o=[];for(;r<n.length&&Tc(n[r],i.match);)o.push(n[r]),r++;t[i.name]=o}else t[i.name]=s,r++;if(i.itemModel)if(i.emitTag){const o=i.greedy?t[i.name]:[t[i.name]],a=[];for(const l of o){if(!l||l.type!=="list")continue;const c=Km(l,i.itemModel),u=l.children??[];for(let f=0;f<c.length;f++){const d={},h=i.emitAttributes;if(h)for(const[p,O]of Object.entries(h))if(O.startsWith("$")){const v=O.slice(1).split("|");d[p]=v.map(b=>c[f][b.trim()]).find(b=>b!=null&&b!=="")??""}else d[p]=O;const g=u[f]?.children?.slice(1)??[];a.push(new ff.Node("tag",d,g,i.emitTag))}}t[i.name]=a}else{const o=t[i.name];o&&typeof o=="object"&&"type"in o&&(t[`${i.name}Data`]=Km(o,i.itemModel))}}else i.optional||r++}return t}function ij(n,e){const t=[[]];for(const i of n)Tc(i,e.delimiter)?t.push([]):t[t.length-1].push(i);if(e.dynamicZones&&e.zoneModel)return{zones:t.map(i=>Pc(i,e.zoneModel))};const r={};if(e.zones)for(let i=0;i<e.zones.length;i++){const s=e.zones[i],o=i<t.length?t[i]:[];r[s.name]=va(o,s.fields)}return r}function o0(n){const e=[];for(const t of n.walk())t.type==="text"&&t.attributes?.content&&e.push(t.attributes.content);return e.join(" ")}function a0(n,e){const t={};let r=n;for(const i of e.fields)if(i.pattern==="remainder")t[i.name]=r.trim(),r="";else{const s=r.match(i.pattern);s?(t[i.name]=(s[1]||s[0]).trim(),r=r.slice(s[0].length)):i.optional||(t[i.name]=r.trim())}return t}function sj(n,e){const t=n.toLowerCase().trim();for(const[r,i]of Object.entries(e)){if(r.toLowerCase()===t)return{canonicalName:r,definition:i};if(i.alias){for(const s of i.alias)if(s.toLowerCase()===t)return{canonicalName:r,definition:i}}}}function oj(n,e){const t=e.sectionHeading;let r;if(t.includes(":"))r=parseInt(t.split(":")[1],10);else{const c=n.filter(u=>u.type==="heading");if(c.length>=2){const u=c[0].attributes?.level,f=c[1].attributes?.level;u!==void 0&&f!==void 0&&f>u?r=c.filter(h=>h.attributes?.level===f).length>=2?f:u:r=u}else r=c[0]?.attributes?.level}if(r===void 0){if(e.implicitSection&&e.emitTag){const u=e.fields?va([],e.fields):{},f=new ff.Node("tag",{...e.implicitSection.attributes??{}},n,e.emitTag);return{...u,sections:[f]}}return{...e.fields?va(n,e.fields):{},sections:[]}}const i=[],s=[];let o=null;for(const c of n)c.type==="heading"&&c.attributes?.level===r?(o&&s.push(o),o={headingNode:c,body:[]}):o?o.body.push(c):i.push(c);if(o&&s.push(o),s.length===0&&e.implicitSection&&e.emitTag){const c=e.fields?va([],e.fields):{},u=new ff.Node("tag",{...e.implicitSection.attributes??{}},n,e.emitTag);return{...c,sections:[u]}}const a=e.fields?va(i,e.fields):{};if(e.emitTag){const c=s.map(u=>{const f=o0(u.headingNode),d=e.headingExtract?a0(f,e.headingExtract):{},h={};if(e.emitAttributes)for(const[g,p]of Object.entries(e.emitAttributes))p==="$heading"?h[g]=f:p.startsWith("$")?h[g]=d[p.slice(1)]??"":h[g]=p;return new ff.Node("tag",h,u.body,e.emitTag)});return{...a,sections:c}}const l=s.map(c=>{const u=o0(c.headingNode),f=e.headingExtract?a0(u,e.headingExtract):{},d=e.knownSections?sj(u,e.knownSections):void 0,h=d?.definition.model??e.sectionModel,g=Pc(c.body,h);return{$heading:u,$headingNode:c.headingNode,...d?{$canonicalName:d.canonicalName}:{},...Object.fromEntries(Object.entries(f).map(([p,O])=>[`$${p}`,O])),...g}});return{...a,sections:l}}function aj(n,e,t){if("hasChild"in n)return e.some(r=>Tc(r,n.hasChild));if("in"in n){const r=String(t[n.attribute]??"");return n.in.includes(r)}return"exists"in n?t[n.attribute]!=null&&t[n.attribute]!=="":!1}function lj(n){return"when"in n&&Array.isArray(n.when)}function cj(n){if(n.type==="text")return n.attributes?.content??"";const e=[];for(const t of n.walk())t.type==="text"&&t.attributes?.content&&e.push(t.attributes.content);return e.join("")}function uj(n,e){if(n.type===e)return n;if(n.type==="link"&&e!=="link"){for(const t of n.children??[])if(t.type===e)return t}if((n.type==="strong"||n.type==="em")&&e!==n.type){for(const t of n.children??[])if(t.type===e)return t}return null}function Km(n,e){return(n.children??[]).map(r=>{const i={},s=[];for(const c of r.children??[])c.type==="inline"?s.push(...c.children??[]):s.push(c);const o=new Set,a=new Set;for(const c of e.fields)if(c.match!=="text"){if(c.match==="list"){const u=s.findIndex((f,d)=>!o.has(d)&&f.type==="list");u>=0&&(o.add(u),i[c.name]=c.itemModel?Km(s[u],c.itemModel):s[u]);continue}if(c.match==="paragraph"&&c.greedy){const u=[];s.forEach((f,d)=>{!o.has(d)&&f.type==="paragraph"&&(o.add(d),u.push(f))}),u.length>0&&(i[c.name]=u);continue}for(let u=0;u<s.length;u++){if(o.has(u)||a.has(u)&&c.match!==s[u].type)continue;const f=s[u],d=uj(f,c.match);if(d){if(d===f?o.add(u):a.add(u),c.extract){const h=f.attributes?.[c.extract]!=null?f:d;i[c.name]=h.attributes?.[c.extract]}else i[c.name]=cj(d);break}}}for(const c of a)o.add(c);const l=e.fields.filter(c=>c.match==="text");if(l.length>0){let u=s.filter((f,d)=>!o.has(d)).filter(f=>f.type==="text"||f.type==="softbreak").map(f=>f.attributes?.content??"").join("").trim();for(const f of l)if(f.pattern==="remainder"){const d=u.trim();(d||!f.optional)&&(i[f.name]=d)}else if(f.pattern instanceof RegExp){const d=u.match(f.pattern);d&&(i[f.name]=d[1]??d[0],u=u.replace(f.pattern,""))}}return i})}function Pc(n,e,t){if(lj(e)){for(const r of e.when)if(aj(r.condition,n,t??{}))return Pc(n,r.model,t);return Pc(n,e.default,t)}switch(e.type){case"sequence":return va(n,e.fields);case"sections":return oj(n,e);case"delimited":return ij(n,e);case"custom":return{children:e.processChildren(n,t??{})};default:return{}}}function fj(n,e,t){const{filtered:r,tintNode:i,bgNode:s}=rj(n);return{content:Pc(r,e,t),tintNode:i,bgNode:s}}const dj=new Map;function hj(n,e){dj.set(n,e)}const pj=new WeakMap;function Ha(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase()}function Pn(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)&&n.$$mdtype==="Tag"}function rt(n,e={},t=[]){return{$$mdtype:"Tag",name:n,attributes:e,children:t}}function mj(n,e){const t=Ha(e);return n.children.find(r=>Pn(r)&&r.name==="meta"&&r.attributes["data-field"]===t)}function l0(n,e){return n.children.find(t=>Pn(t)&&t.attributes["data-name"]===e)}function Nt(n,e,t){return mj(n,e)?.attributes.content??t}const gj={none:"0",tight:"var(--rf-spacing-sm)",default:"var(--rf-spacing-md)",loose:"var(--rf-spacing-xl)"};function c0(n){return gj[n]??n}function Oj(n){return n.split(/\s+/).map(e=>`${e}fr`).join(" ")}const vj={sm:"var(--rf-spacing-sm)",md:"var(--rf-spacing-md)",lg:"var(--rf-spacing-lg)"};function bj(n){return vj[n]??n}const yj={top:"start",center:"center",bottom:"end",stretch:"stretch",baseline:"baseline"};function wj(n){return yj[n]??n}const _j={left:{x:"start",y:"center"},center:{x:"center",y:"center"},right:{x:"end",y:"center"},top:{x:"center",y:"start"},bottom:{x:"center",y:"end"},"top left":{x:"start",y:"start"},"top center":{x:"center",y:"start"},"top right":{x:"end",y:"start"},"bottom left":{x:"start",y:"end"},"bottom center":{x:"center",y:"end"},"bottom right":{x:"end",y:"end"}};function kj(n){return _j[n]??{x:"center",y:"center"}}const xj=["bg","surface","text","muted","primary","border"],u0={duration(n){const e=n.match(/PT(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?/);if(!e)return n;const t=[];return e[1]&&t.push(`${e[1]}h`),e[2]&&t.push(`${e[2]}m`),e[3]&&t.push(`${e[3]}s`),t.join(" ")||n},uppercase:n=>n.toUpperCase(),capitalize:n=>n.charAt(0).toUpperCase()+n.slice(1)};function Sj(n){const{prefix:e,runes:t,icons:r={},tints:i={},backgrounds:s={}}=n,o=new Map(Object.keys(t).map(l=>[Ha(l),l]));function a(l,c){if(l==null||typeof l=="string"||typeof l=="number")return l;if(Array.isArray(l))return l.map(d=>a(d,c));if(!Pn(l))return l;const u=l.attributes?.["data-rune"],f=u?o.get(u):void 0;if(f)return Aj(l,t[f],e,r,i,s,t,o,a,c);if(l.name==="li"){const d=Cj(l);if(d)return{...d,children:d.children.map(h=>a(h,c))}}return{...l,children:l.children.map(d=>a(d,c))}}return l=>a(l)}function Aj(n,e,t,r,i,s,o,a,l,c){const u=`${t}-${e.block}`,f=n.attributes?.["data-rune"],d=[],h={},g={},p=[];if(e.modifiers)for(const[be,Oe]of Object.entries(e.modifiers)){Oe.source==="attribute"&&p.push(be);const Me=Oe.source==="meta"?Nt(n,be,Oe.default):n.attributes[be]??Oe.default;if(Me&&(h[be]=Me,Oe.noBemClass||d.push(`${u}--${Me}`),Oe.valueMap)){const xt=Oe.valueMap[Me]??Me;Oe.mapTarget?g[Oe.mapTarget]=xt:h[be]=xt}}if(e.contextModifiers&&c&&e.contextModifiers[c]&&d.push(`${u}--${e.contextModifiers[c]}`),e.staticModifiers)for(const be of e.staticModifiers)d.push(`${u}--${be}`);const O=new Set,v={},b=[],_=Nt(n,"tint"),A=Nt(n,"tint-mode");if(_||A){let be={},Oe={},Me=A;if(_&&_!=="custom"&&i[_]){const at=i[_];if(at.light)for(const[st,kt]of Object.entries(at.light))kt&&(be[st]=kt);if(at.dark)for(const[st,kt]of Object.entries(at.dark))kt&&(Oe[st]=kt);!Me&&at.lockMode&&(Me=at.lockMode)}for(const at of xj){const st=Nt(n,`tint-${at}`);st&&(be[at]=st,O.add(`tint-${at}`));const kt=Nt(n,`tint-dark-${at}`);kt&&(Oe[at]=kt,O.add(`tint-dark-${at}`))}const xt=Object.keys(be).length>0;(_||xt)&&(v["data-tint"]=_||"custom"),Me&&Me!=="auto"&&(v["data-color-scheme"]=Me),Object.keys(Oe).length>0&&(v["data-tint-dark"]="");for(const[at,st]of Object.entries(be))b.push(`--tint-${at}: ${st}`);for(const[at,st]of Object.entries(Oe))b.push(`--tint-dark-${at}: ${st}`);(xt||_&&_!=="custom"&&i[_])&&d.push(`${u}--tinted`),O.add("tint"),O.add("tint-mode")}const y=n.attributes?.density,w=c?a.get(c):void 0,C=w?o[w]?.childDensity:void 0,x=y??C??e.defaultDensity??"full",k=n.attributes?.width??e.defaultWidth;k&&k!=="content"&&(h.width=k,d.push(`${u}--${k}`));const E=n.attributes?.spacing;E&&E!=="default"&&(h.spacing=E,d.push(`${u}--spacing-${E}`));const T=n.attributes?.inset;T&&T!=="default"&&(h.inset=T,d.push(`${u}--inset-${T}`));const $=new Set,M={};let P=null;const D=Nt(n,"bg-preset"),I=Nt(n,"bg-src"),W=Nt(n,"bg-video");if(D||I||W){let be={};if(D&&s[D]){let et=s[D];if(et.extends&&s[et.extends]){const jt=s[et.extends];et={...jt,params:{...jt.params,...et.params},style:{...jt.style,...et.style}}}et.style&&(be={...et.style})}const Oe=Nt(n,"bg-overlay"),Me=Nt(n,"bg-blur"),xt=Nt(n,"bg-position"),at=Nt(n,"bg-fit"),st=Nt(n,"bg-opacity"),kt=Nt(n,"bg-fixed"),yn={sm:"4px",md:"8px",lg:"16px"},en=[];for(const[et,jt]of Object.entries(be))en.push(`${et}: ${jt}`);I&&en.push(`--bg-image: url(${I})`),xt&&en.push(`--bg-position: ${xt}`),Me&&en.push(`--bg-blur: ${yn[Me]??Me}`),at&&en.push(`--bg-fit: ${at}`),st&&en.push(`--bg-opacity: ${st}`);const xe={"data-name":"bg"};D&&(xe["data-bg-preset"]=D),en.length&&(xe.style=en.join("; ")),kt&&(xe["data-bg-fixed"]="");const mn=[];if(W&&mn.push(rt("video",{"data-name":"bg-video",autoplay:"",muted:"",loop:"",playsinline:"",src:W,...en.length?{style:en.filter(et=>!et.startsWith("--bg-image")).join("; ")}:{}})),Oe){const et={"data-name":"bg-overlay"};Oe==="dark"||Oe==="light"?et["data-bg-overlay"]=Oe:et.style=`background: ${Oe}`,mn.push(rt("div",et))}P=rt("div",xe,mn),d.push(`${u}--has-bg`),M["data-bg"]="",$.add("bg-preset"),$.add("bg-src"),$.add("bg-video"),$.add("bg-overlay"),$.add("bg-blur"),$.add("bg-position"),$.add("bg-fit"),$.add("bg-opacity"),$.add("bg-fixed")}const U={};for(const[be,Oe]of Object.entries(h)){const Me=be.replace(/([A-Z])/g,"-$1").toLowerCase();U[`data-${Me}`]=Oe}for(const[be,Oe]of Object.entries(g)){const Me=be.startsWith("data-")?be:`data-${be}`;U[Me]=Oe}const ae=n.attributes.class||"",ce=[u,...d,ae].filter(Boolean).join(" ");let K=n.children;if(e.autoLabel&&(K=$A(K,e.autoLabel)),e.structure)if(e.slots)K=Tj(e.slots,e.structure,K,e.contentWrapper,h);else{const be=[],Oe=[];for(const[Me,xt]of Object.entries(e.structure)){const at=Jl(xt,Me,h);at&&(xt.before?be.push(at):Oe.push(at))}if(e.contentWrapper){const Me=rt(e.contentWrapper.tag,{"data-name":e.contentWrapper.ref},K);K=[...be,Me,...Oe]}else(be.length||Oe.length)&&(K=[...be,...K,...Oe])}else e.contentWrapper&&(K=[rt(e.contentWrapper.tag,{"data-name":e.contentWrapper.ref},K)]);P&&(K=[P,...K]);let H=K.map(be=>Pn(be)?l(vv(be,u,e.sections,e.mediaSlots),f):l(be,f));e.projection&&(H=Ej(H,e.projection,u,e.sections,e.mediaSlots));const se=e.modifiers?new Set(Object.keys(e.modifiers).map(be=>Ha(be))):void 0,ie=H.filter(be=>{if(!Pn(be))return!0;const Oe=be;if(Oe.name!=="meta"||!Oe.attributes["data-field"])return!0;const Me=Oe.attributes["data-field"];return!(se?.has(Me)||O.has(Me)||$.has(Me))});if(e.sequence){const be=e.sequenceDirection?h[e.sequenceDirection.fromModifier]??e.sequenceDirection.default:void 0;QA(ie,e.sequence,be)}let B=n.attributes.style||"";const J=[];if(e.styles)for(const[be,Oe]of Object.entries(e.styles)){const Me=h[be];Me&&(typeof Oe=="string"?J.push(`${Oe}: ${Me}`):Oe.transform?J.push(`${Oe.prop}: ${Oe.transform(Me)}`):Oe.template?J.push(`${Oe.prop}: ${Oe.template.replace("{}",Me)}`):J.push(`${Oe.prop}: ${Me}`))}J.push(...b),J.length&&(B=B?`${B}; ${J.join("; ")}`:J.join("; "));const{width:Ae,spacing:Qe,inset:Ne,density:ge,"data-rune":Pe,...Ke}=n.attributes,Je=p.length>0?Object.fromEntries(Object.entries(Ke).filter(([be])=>!p.includes(be))):Ke,We={...n,attributes:{...Je,...U,...v,...M,class:ce,"data-rune":f,"data-density":x,...e.rootAttributes||{},...B?{style:B}:{}},children:ie};return e.postTransform?e.postTransform(We,{modifiers:h,parentType:c}):We}function $A(n,e){return n.map(t=>{if(!Pn(t))return t;const r=e[t.name]??e[t.attributes?.["data-field"]],i=r&&!t.attributes["data-name"]?{...t,attributes:{...t.attributes,"data-name":r}}:t;return i.children.length===0?i:{...i,children:$A(i.children,e)}})}function vv(n,e,t,r){const i=n.attributes["data-name"];if(i){const s=`${e}__${i}`,o=n.attributes.class||"",a=n.children.map(u=>Pn(u)?vv(u,e,t,r):u),l=t?.[i],c=r?.[i];return{...n,attributes:{...n.attributes,class:[s,o].filter(Boolean).join(" "),...l?{"data-section":l}:{},...c?{"data-media":c}:{}},children:a}}return n}const f0=/^\[(x|X|>|\s|-)\]\s*/,d0={x:"checked",X:"checked"," ":"unchecked",">":"active","-":"skipped"};function Cj(n){const e=n.children;if(e.length===0)return null;const t=e[0];if(typeof t=="string"){const r=t.match(f0);if(!r)return null;const i=d0[r[1]]??"unchecked",s=t.slice(r[0].length);return{...n,attributes:{...n.attributes,"data-checked":i},children:[s,...e.slice(1)]}}if(Pn(t)&&t.name==="p"&&t.children.length>0){const r=t.children[0];if(typeof r=="string"){const i=r.match(f0);if(!i)return null;const s=d0[i[1]]??"unchecked",o=r.slice(i[0].length),a={...t,children:[o,...t.children.slice(1)]};return{...n,attributes:{...n.attributes,"data-checked":s},children:[a,...e.slice(1)]}}}return null}function QA(n,e,t){for(let r=0;r<n.length;r++){const i=n[r];if(Pn(i))if(i.name==="ol"){const s={...i.attributes,"data-sequence":e};t&&(s["data-sequence-direction"]=t),n[r]={...i,attributes:s}}else i.children.length>0&&QA(i.children,e,t)}}function Tj(n,e,t,r,i,s){const o=n.filter(f=>f!=="content"),a=o[0],l=o[o.length-1],c=new Map;for(const f of n)c.set(f,[]);for(const[f,d]of Object.entries(e)){const h=Jl(d,f,i);if(!h)continue;let g;d.slot?g=d.slot:d.before&&a?g=a:l?g=l:g=d.before?a??n[0]:l??n[n.length-1];const p=c.get(g);p&&p.push({element:h,order:d.order??0})}for(const f of c.values())f.sort((d,h)=>d.order-h.order);const u=[];for(const f of n)if(f==="content")r?u.push(rt(r.tag,{"data-name":r.ref},t)):u.push(...t);else{const d=c.get(f)??[];for(const{element:h}of d)u.push(h)}return u}function Pj(n,e){const t=n.findIndex(s=>Pn(s)&&s.attributes?.["data-name"]===e);if(t===-1)return null;const r=n[t],i=[...n.slice(0,t),...n.slice(t+1)];return{element:r,rest:i}}function LA(n,e){for(const t of n){if(!Pn(t))continue;const r=t;if(r.attributes?.["data-name"]===e)return r;const i=LA(r.children,e);if(i)return i}return null}function MA(n,e,t,r){return n.map(i=>{if(!Pn(i))return i;const s=i;if(s.attributes?.["data-name"]===e){const a=r==="prepend"?[t,...s.children]:[...s.children,t];return{...s,children:a}}const o=MA(s.children,e,t,r);return o!==s.children?{...s,children:o}:i})}function Ej(n,e,t,r,i){let s=[...n];if(e.hide){const o=new Set(e.hide);s=s.filter(a=>{if(!Pn(a))return!0;const l=a.attributes?.["data-name"];return!l||!o.has(l)})}if(e.group)for(const[o,a]of Object.entries(e.group)){const l=new Set(a.members),c=[];let u=-1;for(let f=s.length-1;f>=0;f--){const d=s[f];if(!Pn(d))continue;const h=d.attributes?.["data-name"];h&&l.has(h)&&(c.unshift(d),(u===-1||f<u)&&(u=f),s.splice(f,1))}if(c.length>0){let f=rt(a.tag,{"data-name":o},c);f=vv(f,t,r,i),s.splice(u,0,f)}}if(e.relocate)for(const[o,a]of Object.entries(e.relocate)){const l=Pj(s,o);if(!l)continue;s=l.rest,LA(s,a.into)&&(s=MA(s,a.into,l.element,a.position??"append"))}return s}function Jl(n,e,t,r){if(n.condition&&!t[n.condition]||n.conditionAny&&!n.conditionAny.some(l=>t[l]))return null;const i=n.ref??e;if(n.repeat){const l=parseInt(t[n.repeat.count]??"",10);if(!l||l<0||isNaN(l))return rt(n.tag,{"data-name":i},[]);const c=n.repeat.max??10,u=Math.min(l,c),f=n.repeat.filled?parseInt(t[n.repeat.filled]??"0",10):0,d=Math.max(0,Math.min(f,u)),h=[];for(let g=0;g<u;g++){const p=g<d;if(p&&n.repeat.filledElement){const O=Jl(n.repeat.filledElement,n.repeat.filledElement.ref??"",t);O&&h.push(O)}else{const O=Jl(n.repeat.element,n.repeat.element.ref??"",t);O&&(n.repeat.filled?h.push({...O,attributes:{...O.attributes,"data-filled":p?"true":"false"}}):h.push(O))}}return rt(n.tag,{"data-name":i},h)}const s={};if(n.attrs)for(const[l,c]of Object.entries(n.attrs))typeof c=="string"?s[l]=c:"fromModifier"in c&&(s[l]=t[c.fromModifier]??"");const o={"data-name":i,...s};if(n.metaType&&(o["data-meta-type"]=n.metaType),n.metaRank&&(o["data-meta-rank"]=n.metaRank),n.sentimentMap&&n.metaText){const l=t[n.metaText];if(l){const c=n.sentimentMap[l];c&&(o["data-meta-sentiment"]=c)}}if(n.icon)return rt(n.tag,o,[]);if(n.metaText){let l=t[n.metaText]??"";if(n.transform&&u0[n.transform]&&(l=u0[n.transform](l)),n.label){const c={"data-meta-label":""};n.labelHidden&&(c["data-meta-label-hidden"]="");const u=rt("span",c,[n.label]);let f=l;n.textPrefix&&(f=n.textPrefix+f),n.textSuffix&&(f=f+n.textSuffix);const d=rt("span",{"data-meta-value":""},[f]);return rt(n.tag,o,[u,d])}return n.textPrefix&&(l=n.textPrefix+l),n.textSuffix&&(l=l+n.textSuffix),rt(n.tag,o,[l])}const a=[];if(n.children)for(const l of n.children)if(typeof l=="string")a.push(l);else{const c=Jl(l,l.ref??"",t);c&&a.push(c)}return rt(n.tag,o,a)}const $j=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Qj=new Set(["$$mdtype"]);function DA(n){return n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function Lj(n){const e=[];for(const[t,r]of Object.entries(n))if(!Qj.has(t)&&!(r==null||r===!1)){if(r===!0){e.push(t);continue}e.push(`${t}="${DA(String(r))}"`)}return e.length?" "+e.join(" "):""}function Mj(n,e){return Nl(n)}function Nl(n){if(n==null)return"";if(typeof n=="string")return DA(n);if(typeof n=="number")return String(n);if(Array.isArray(n))return n.map(Nl).join("");if(!Pn(n))return"";const e=n.name;if(!e)return n.children.map(Nl).join("");const t=Lj(n.attributes);if($j.has(e))return`<${e}${t} />`;const i=n.attributes?.["data-codeblock"]||n.attributes?.["data-raw-html"]?n.children.map(s=>typeof s=="string"?s:Nl(s)).join(""):n.children.map(Nl).join("");return`<${e}${t}>${i}</${e}>`}function Dj(n,e,t,r){if(!n)return null;const i=n.endsWith("/")?n.slice(0,-1):n,s=e&&e.length>0?e:"main",o=t.split("/").map(l=>encodeURIComponent(l)).join("/"),a=r?`#${qj(r)}`:"";return`${i}/blob/${s}/${o}${a}`}function qj(n){const e=n.trim(),t=e.indexOf("-");if(t<0)return`L${e}`;const r=e.slice(0,t).trim(),i=e.slice(t+1).trim();return i?`L${r}-L${i}`:`L${r}`}const{Tag:aY}=z;function Rj(n,e){if(typeof e=="function")return e(n);const t=typeof e=="string"?{node:e}:e;return!(t.node&&n.type!==t.node||t.descendant&&!Array.from(n.walk()).some(r=>r.type===t.descendant)||t.descendantTag&&!Array.from(n.walk()).some(r=>r.type==="tag"&&r.tag===t.descendantTag))}const{Ast:h0}=z;function*ld(n){yield n;for(const e of n.children)z.Tag.isTag(e)?yield*ld(e):yield e}function bv(n){const e=n?.level,t=n?.include;return r=>{const i=e??r.find(c=>c.type==="heading")?.attributes.level;if(!i)return r;let s;const o=new h0.Node("list"),a=[];let l=[];for(let c=0;c<r.length;c++){const u=r[c];if(u.type==="heading"&&u.attributes.level===i)o.children.push(new h0.Node("item",{},[u])),s=c;else if(s===void 0)a.push(u);else if(!t||t.some(f=>Rj(u,f))){const f=o.children.at(-1);f&&f.children.push(u)}else{l=r.slice(c);break}}return o.children.length===0?r:[...a,o,...l]}}class ze{constructor(e){this.nodes=e,this.offset=0}static fromData(e,t){return new ze([new z.Tag(t,{},[e])])}wrap(e,t={}){return new ze([new z.Tag(e,t,this.nodes)])}tag(e){const t=this.nodes.filter(r=>z.Tag.isTag(r)&&r.name===e);return new ze(t)}tags(...e){const t=this.nodes.filter(r=>z.Tag.isTag(r)&&e.includes(r.name));return new ze(t)}headings(){return this.tags("h1","h2","h3","h4","h5","h6")}typeof(e){return new ze(this.nodes.filter(t=>z.Tag.isTag(t)&&t.attributes["data-rune"]===Ha(e)))}concat(...e){const t=e.map(r=>r instanceof ze?r.nodes:r).flat();return new ze([...this.nodes,...t])}flatten(){const e=this.nodes.map(t=>z.Tag.isTag(t)?Array.from(ld(t)):t).flat();return new ze(e)}limit(e){return new ze(this.nodes.slice(0,e))}slice(e,t){return new ze(this.nodes.slice(e,t))}toArray(){return this.nodes}count(){return this.nodes.length}next(){return this.nodes[this.offset++]}}function Ie(n){const e=n.rune,t=n.typeof??n.schemaOrgType;if(n.properties&&n.refs){const i=new Set(Object.keys(n.properties)),s=Object.keys(n.refs).filter(o=>i.has(o));if(s.length>0)throw new Error(`Rune "${e}" has naming collisions between properties and refs: ${s.join(", ")}. Properties and refs share a flat namespace (ADR-008) and must have unique names.`)}for(const[i,s]of Object.entries(n.properties??{})){if(s===void 0)continue;(s instanceof ze?s.nodes:Array.isArray(s)?s:[s]).forEach(a=>{z.Tag.isTag(a)&&(a.attributes["data-field"]=Ha(i))})}for(const[i,s]of Object.entries(n.refs||{})){if(s===void 0)continue;(s instanceof ze?s.nodes:Array.isArray(s)?s:[s]).forEach(a=>{z.Tag.isTag(a)&&(a.attributes["data-name"]=i)})}for(const[i,s]of Object.entries(n.schema??{})){if(s===void 0)continue;(s instanceof ze?s.nodes:Array.isArray(s)?s:[s]).forEach(a=>{z.Tag.isTag(a)&&(a.attributes.property=i)})}return new z.Tag(n.tag,{id:n.id,"data-field":n.property?Ha(n.property):n.property,"data-rune":e,typeof:t,class:n.class},Array.isArray(n.children)?n.children:[n.children])}function Ij(n){return n.replace(/<script\b[^>]*>[\s\S]*?<\/script\s*>/gi,"")}function Nj(n){let e=n.replace(/\s+on[a-z]+\s*=\s*"[^"]*"/gi,"");return e=e.replace(/\s+on[a-z]+\s*=\s*'[^']*'/gi,""),e=e.replace(/\s+on[a-z]+\s*=\s*[^\s>]+/gi,""),e}function Bj(n){return n.replace(/(\s(?:href|src|action|formaction|xlink:href)\s*=\s*)(["'])\s*javascript:[^"']*\2/gi,"$1$2$2")}function jj(n){let e=n.replace(/<iframe\b[^>]*>[\s\S]*?<\/iframe\s*>/gi,"");return e=e.replace(/<object\b[^>]*>[\s\S]*?<\/object\s*>/gi,""),e=e.replace(/<embed\b[^>]*\/?>/gi,""),e=e.replace(/<iframe\b[^>]*\/>/gi,""),e=e.replace(/<object\b[^>]*\/>/gi,""),e}function zj(n,e){if(e.trust==="trusted"||e.allowJs)return n;let t=Ij(n);return t=Nj(t),t=Bj(t),t=jj(t),t}const Zj=new WeakMap;function dt(n){return Array.isArray(n)?n:n!=null?[n]:[]}const Xj={tint:{type:String,required:!1,description:"Color tint preset applied to this block"},"tint-mode":{type:String,required:!1,matches:["auto","dark","light"],description:"Whether the tint adapts to auto, dark, or light mode"},bg:{type:String,required:!1,description:"Background preset applied to this block"},width:{type:String,required:!1,matches:["compact","narrow","content","wide","full"],description:"Maximum width constraint for this block"},spacing:{type:String,required:!1,matches:["flush","tight","default","loose","breathe"],description:"Vertical spacing above and below this block"},inset:{type:String,required:!1,matches:["flush","tight","default","loose","breathe"],description:"Inner padding of this block"}};function Fj(n,e){if(!z.Tag.isTag(n))return n;const t=[];if(e.tintNode){const i=z.transform(e.tintNode,e.config);if(z.Tag.isTag(i))for(const s of i.children)z.Tag.isTag(s)&&s.name==="meta"&&t.push(s)}const r=i=>t.some(s=>z.Tag.isTag(s)&&s.attributes["data-field"]===i);return e.tint&&!r("tint")&&t.push(new z.Tag("meta",{"data-field":"tint",content:e.tint})),e["tint-mode"]&&e["tint-mode"]!=="auto"&&!r("tint-mode")&&t.push(new z.Tag("meta",{"data-field":"tint-mode",content:e["tint-mode"]})),t.length===0||(n.children=[...n.children,...t]),n}function Vj(n,e){if(!z.Tag.isTag(n))return n;const t=[];if(e.bgNode){const i=z.transform(e.bgNode,e.config);if(z.Tag.isTag(i))for(const s of i.children)z.Tag.isTag(s)&&s.name==="meta"&&t.push(s)}const r=t.some(i=>z.Tag.isTag(i)&&i.attributes["data-field"]==="bg-preset");return e.bg&&!r&&t.push(new z.Tag("meta",{"data-field":"bg-preset",content:e.bg})),t.length===0||(n.children=[...n.children,...t]),n}function He(n){const e={};n.base&&Object.assign(e,n.base),n.attributes&&Object.assign(e,n.attributes),Object.assign(e,Xj),n.deferBody&&(e["__deferred-body"]={type:String,required:!1});const t=n.deprecations;if(t){for(const[i,s]of Object.entries(t))if(!e[i]){const o=e[s.newName];e[i]={type:o?.type??String,required:!1,deprecated:!0}}}const r={attributes:e,...n.selfClosing!=null&&{selfClosing:n.selfClosing},transform:(i,s)=>{if(t){for(const[g,p]of Object.entries(t))if(i.attributes[g]!==void 0&&i.attributes[p.newName]===void 0){const O=p.transform?p.transform(i.attributes[g],i.attributes):i.attributes[g];O!==void 0&&(i.attributes[p.newName]=O)}}const o=i.transformAttributes(s),a=typeof n.contentModel=="function"?n.contentModel(o):n.contentModel,{content:l,tintNode:c,bgNode:u}=fj(i.children,a,o),f=n.transform(l,o,s,i),d={tintNode:c,bgNode:u,tint:o.tint,"tint-mode":o["tint-mode"],bg:o.bg,config:s},h=Vj(Fj(f,d),d);return z.Tag.isTag(h)&&(o.width&&(h.attributes.width=o.width),o.spacing&&(h.attributes.spacing=o.spacing),o.inset&&(h.attributes.inset=o.inset)),h}};return t&&(r.validate=i=>{const s=[];for(const[o,a]of Object.entries(t))i.attributes[o]!==void 0&&s.push({id:"deprecated-attribute",level:"warning",message:`Attribute "${o}" is deprecated. Use "${a.newName}" instead.`});return s}),n.deferBody&&(r.deferBody=!0),Zj.set(r,n.contentModel),n.base&&pj.set(r,n.base),r}const{Tag:Mu}=z,Wj=He({attributes:{type:{type:String},tag:{type:String},lines:{type:Array},error:{type:Object}},contentModel:{type:"sequence",fields:[]},transform(n,e){const t=e.error,r=new Mu("td",{},[t.id]),i=new Mu("td",{},[e.tag]),s=new Mu("td",{},[t.level]),o=new Mu("td",{},[t.message]);return Ie({rune:"error",tag:"tr",property:"error",properties:{code:r,tag:i,level:s,message:o},children:[i,r,s,o]})}});class Yj{validate(e,t,r){return typeof e!="string"?[{id:"attribute-type-invalid",level:"critical",message:`Attribute '${r}' is not a string`}]:[]}}class Uj extends Yj{transform(e){return e?e.split(" ").map(t=>t.trim()):[]}}const{Tag:Gj}=z,Hj=["row","column","dense","row dense","column dense"];function Kj(n,e){return!n||n.length===0?e.map(t=>({colspan:1,rowspan:void 0,children:t})):n.map((t,r)=>{const[i,s]=t.split(":");return{colspan:parseInt(i),rowspan:s?parseInt(s):void 0,children:e[r]}}).filter(t=>t.children!==void 0)}function Jj(n){const e=n.items.map(({children:r,colspan:i,rowspan:s})=>r.wrap("div",{"data-colspan":i,"data-rowspan":s}).toArray()).flat(),t={"data-layout":"grid","data-columns":n.columns,"data-rows":n.rows,"data-flow":n.flow};return new Gj("div",t,e)}const{Tag:Ts}=z,e6=["columns","auto","masonry"],t6=He({attributes:{columns:{type:Number,required:!1,description:"Number of grid columns"},rows:{type:Number,required:!1,description:"Number of grid rows"},flow:{type:String,required:!1,matches:Hj.slice(),description:"Direction items fill the grid"},spans:{type:Uj,required:!1,description:"Column span widths for each cell (space-separated)"},ratio:{type:String,required:!1,description:'Column width ratio (e.g. "2 1 1")'},gap:{type:String,required:!1,matches:["none","tight","default","loose"],description:"Space between grid cells"},valign:{type:String,required:!1,matches:["top","center","bottom","stretch","baseline"],description:"Vertical alignment of cell content"},collapse:{type:String,required:!1,matches:["sm","md","lg","never"],description:"Breakpoint at which grid collapses to a single column"},mode:{type:String,required:!1,matches:["columns","auto","masonry"],default:"columns",description:"Grid sizing: fixed columns, auto-fit, or masonry"},min:{type:String,required:!1,description:"Minimum cell width for auto-fit mode"},aspect:{type:String,required:!1,description:"Aspect ratio for grid cells"},stack:{type:String,required:!1,matches:["natural","reverse"],description:"Stacking order when collapsed"}},contentModel:{type:"delimited",delimiter:"hr",dynamicZones:!0,zoneModel:{type:"sequence",fields:[{name:"content",match:"any",greedy:!0,optional:!0}]}},deprecations:{layout:{newName:"spans",transform:(n,e)=>{if(typeof n=="string"&&e6.includes(n)){e.mode=n;return}return n}}},transform(n,e,t){const i=(n.zones??[]).map(p=>new ze(z.transform(dt(p.content),t))),s=Jj({items:Kj(e.spans,i),rows:e.rows,columns:e.columns,flow:e.flow}),o=e.ratio?new Ts("meta",{content:e.ratio}):void 0,a=e.gap&&e.gap!=="default"?new Ts("meta",{content:e.gap}):void 0,l=e.valign?new Ts("meta",{content:e.valign}):void 0,c=e.collapse?new Ts("meta",{content:e.collapse}):void 0,u=e.mode&&e.mode!=="columns"?new Ts("meta",{content:e.mode}):void 0,f=e.min?new Ts("meta",{content:e.min}):void 0,d=e.aspect?new Ts("meta",{content:e.aspect}):void 0,h=e.stack?new Ts("meta",{content:e.stack}):void 0,g=[o,a,l,c,u,f,d,h].filter(Boolean);return Ie({rune:"grid",tag:"section",children:[...g,s],properties:{...u?{mode:u}:{},ratio:o,gap:a,valign:l,collapse:c,...f?{min:f}:{},...d?{aspect:d}:{},...h?{stack:h}:{}},refs:{cell:new ze(s.children).tag("div")}})}}),{Tag:xl}=z,n6={js:"JavaScript",ts:"TypeScript",py:"Python",rb:"Ruby",rs:"Rust",go:"Go",sh:"Shell",bash:"Bash",zsh:"Zsh",shell:"Shell",html:"HTML",css:"CSS",json:"JSON",yaml:"YAML",sql:"SQL",swift:"Swift",kt:"Kotlin",java:"Java",cpp:"C++",c:"C",cs:"C#",php:"PHP"};function r6(n){return n6[n]||n.charAt(0).toUpperCase()+n.slice(1)}function i6(n){if(!n)return"";const e=n.endsWith("/")?n.slice(0,-1):n,t=e.lastIndexOf("/");return t>=0?e.slice(t+1):e}function s6(n,e){if(!n)return"";const t=i6(n);return t?e?`${t}:${e}`:t:""}const o6=["scroll","wrap","hide"],a6=He({attributes:{title:{type:String,required:!1,description:"Title displayed above the code group"},labels:{type:String,required:!1,description:"Comma-separated custom tab labels"},overflow:{type:String,required:!1,matches:o6.slice(),description:"How overflowing code is handled"}},contentModel:{type:"sequence",fields:[{name:"panels",match:"fence",greedy:!0}]},transform(n,e,t){const r=e.labels?.split(",").map(p=>p.trim())??[],i={},s=[];if(e.title){const p=new xl("meta",{content:e.title});i.title=p,s.push(p)}const o=e.overflow;if(o&&o!=="scroll"){const p=new xl("meta",{content:o});i.overflow=p,s.push(p)}const a=dt(n.panels);if(a.length===1&&r.length===0){const p=z.transform(a[0],t);return s.push(p),Ie({rune:"code-group",tag:"section",properties:i,refs:{},children:s})}const c=[],u=[];for(const p of a){const O=p.attributes.language||"shell",v=typeof p.attributes.label=="string"?p.attributes.label:"",b=s6(typeof p.attributes.source=="string"?p.attributes.source:void 0,typeof p.attributes.lines=="string"?p.attributes.lines:void 0),_=r[c.length]||v||b||r6(O),A=new xl("span",{},[_]);c.push(new xl("button",{"data-name":"tab",role:"tab"},[A]));const y=z.transform(p,t);u.push(new xl("div",{role:"tabpanel"},[y]))}const f=new ze(c),d=new ze(u),h=f.wrap("div",{role:"tablist"}),g=d.wrap("div");return s.push(h.next(),g.next()),Ie({rune:"code-group",tag:"section",properties:i,refs:{tabs:h,panels:g,panel:d},children:s})}}),l6=He({attributes:{path:{type:String,required:!0,description:"Path to the source file, relative to the project root. Rejected if it escapes the root."},lines:{type:String,required:!1,description:'Line range. Formats: "10-25", "10-" (to EOF), "-20" (from start), "10" (single line). 1-indexed, inclusive.'},lang:{type:String,required:!1,description:"Syntax-highlighting language hint. Overrides the extension-based inference."},linenumbers:{type:Boolean,required:!1,description:'Show line numbers in the gutter. Starting number derives from the `lines` range start (e.g. lines="74-125" → first line is 74), so numbers reflect the file\'s real offsets. WORK-304.'},highlight:{type:String,required:!1,description:'Range(s) to emphasize without cropping — Shiki-style format: "74-78", "74-78,82,90-92". Indices are file coordinates (same frame as `lines=`). Use this when you want full context visible but want to draw the eye to specific lines. WORK-304.'}},contentModel:{type:"sequence",fields:[]},transform(n,e){throw new Error("snippet rune reached the transform phase — its preprocess hook was not wired through. Ensure the content pipeline runs registered `preprocess` hooks before `Markdoc.transform` (snippet pre-resolves to a Markdoc `fence` node; see SPEC-062 § Composition).")}}),{Tag:c6}=z,u6=["caution","check","note","warning"],f6=He({attributes:{type:{type:String,matches:u6.slice(),errorLevel:"critical",description:"Visual style: caution, check, note, or warning"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new c6("meta",{content:e.type??"note"}),s=new ze(z.transform(dt(n.body),t)).wrap("div");return Ie({rune:"hint",tag:"section",property:"contentSection",properties:{hintType:r},refs:{body:s.tag("div")},children:[r,s.next()]})}}),qA={layout:{type:String,required:!1,matches:["stacked","split","split-reverse"],description:"Display mode: stacked vertically, or split side-by-side"},ratio:{type:String,required:!1,description:'Column width ratio in split layout (e.g. "2 1")'},valign:{type:String,required:!1,matches:["top","center","bottom"],description:"Vertical alignment of columns in split layout"},gap:{type:String,required:!1,matches:["none","tight","default","loose"],description:"Space between columns in split layout"},collapse:{type:String,required:!1,matches:["sm","md","lg","never"],description:"Breakpoint at which split layout collapses to stacked"}};hj(qA,{name:"split layout",description:"Layout controls for runes that can render stacked vertically or split into side-by-side columns."});const d6=qA;He({contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=n.body?Array.isArray(n.body)?n.body:[n.body]:[],i=new ze(z.transform(r,{...t,nodes:{...t.nodes,text:{transform(s){return new z.Tag("span",{},[s.attributes.content])}}}}));return new z.Tag("li",{},i.toArray())}});function h6(n){const e=n.layout||"stacked",t=n.ratio||"1 1",r=n.valign||"top",i=n.gap||"default",s=n.collapse,o=new z.Tag("meta",{content:e}),a=e!=="stacked"?new z.Tag("meta",{content:t}):void 0,l=e!=="stacked"?new z.Tag("meta",{content:r}):void 0,c=i!=="default"?new z.Tag("meta",{content:i}):void 0,u=s?new z.Tag("meta",{content:s}):void 0,f=[o];return a&&f.push(a),l&&f.push(l),c&&f.push(c),u&&f.push(u),{metas:{layout:o,ratio:a,valign:l,gap:c,collapse:u},children:f}}function p6(n){for(const e of n.toArray()){if(z.Tag.isTag(e)&&e.name==="img")return e;if(z.Tag.isTag(e)&&e.name==="p"){const t=e.children.find(r=>z.Tag.isTag(r)&&r.name==="img");if(t)return t}}}function m6(n){return n.map(e=>z.Tag.isTag(e)&&e.name==="p"&&e.children.length===1&&z.Tag.isTag(e.children[0])&&(e.children[0].name==="img"||e.children[0].attributes?.["data-rune"])?e.children[0]:e)}function Kc(n){const e=n.nodes,t=c=>z.Tag.isTag(c)&&/^h[1-6]$/.test(c.name),r=c=>z.Tag.isTag(c)&&c.name==="p",i=e.findIndex(t);if(i===-1)return{eyebrow:void 0,headline:void 0,image:n.tag("img").limit(1),blurb:e.find(r)};const s=e.slice(0,i).findIndex(r);let o,a;if(s!==-1)o=e[s],a=i;else{const c=e.findIndex((u,f)=>f>i&&t(u));c!==-1?(o=e[i],a=c):(o=void 0,a=i)}const l=e.findIndex((c,u)=>u>a&&r(c));return{eyebrow:o,headline:e[a],image:n.tag("img").limit(1),blurb:l!==-1?e[l]:void 0}}const{Ast:RA,Tag:g6}=z,O6=He({attributes:{name:{type:String,required:!0},image:{type:String,required:!1}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){let r=new ze([]);e.image&&(r=r.concat(z.transform(new RA.Node("image",{src:e.image}),t))),r=r.concat(new g6("span",{},[e.name??""]));const i=new ze(z.transform(dt(n.body),t)),s=r.tag("span"),o=r.tag("svg");return[Ie({rune:"tab",tag:"button",properties:{image:o},refs:{name:s},children:r.toArray()}),Ie({rune:"tab-panel",tag:"div",properties:{},children:i.toArray()})]}});function v6(n){const e=bv()(n),t=e.length-1;if(!e[t]||e[t].type!=="list")return n;const r=e[t].children.map(i=>{const s=i.children[0],o=Array.from(s.walk()).find(l=>l.type==="image"),a=Array.from(s.walk()).filter(l=>l.type==="text").map(l=>l.attributes.content);return new RA.Node("tag",{name:a,image:o?o.attributes.src:void 0},i.children.slice(1),"tab")});return e.splice(t,1,...r),e}const b6=He({attributes:{},contentModel:()=>({type:"custom",processChildren:n=>v6(n),description:"Converts headings at the specified level to tab tags, extracting tab name and optional image from heading content."}),transform(n,e,t){const r=dt(n.children),i=[],s=[];for(const h of r)h.type==="tag"&&h.tag==="tab"?s.push(h):(h.type==="heading"||h.type==="paragraph")&&i.push(h);const o=new ze(z.transform(i,t)),a=new ze(z.transform(s,t)),l=a.tag("button").typeof("Tab"),c=a.tag("div").typeof("TabPanel"),u=l.wrap("div",{role:"tablist"}),f=c.wrap("div"),d=o.count()>0?[o.wrap("header").next(),u.next(),f.next()]:[u.next(),f.next()];return Ie({rune:"tab-group",tag:"section",class:e.class,property:"contentSection",properties:{},refs:{...Kc(o),tabs:u,panels:f},children:d})}}),IA="__nav-auto",NA="auto";function yv(n){return z.Tag.isTag(n)&&(n.name==="ul"||n.name==="ol")}const y6=He({contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new ze(z.transform(dt(n.body),{...t,nodes:{...t.nodes,text:{transform(O){return new z.Tag("span",{"data-field":"slug"},[O.attributes.content])}}}})),i=r.tag("a").toArray(),s=r.tag("span"),o=r.tag("ul"),a=r.toArray().filter(O=>z.Tag.isTag(O)&&O.attributes?.["data-rune"]==="badge"),l=r.tag("p").toArray(),c=[],u=[];for(const O of l)O.children.some(b=>z.Tag.isTag(b)&&b.name==="a")?c.push(O):u.push(O);const f=c.flatMap(O=>O.children.filter(v=>z.Tag.isTag(v)&&v.name==="a")),d=[...i,...f],h=u.flatMap(O=>O.children),g=h.length>0?new z.Tag("span",{"data-name":"description",class:"rf-nav-item__description"},h):void 0;if(d.length>0){const O=g?d.map(b=>({...b,children:[...b.children??[],g]})):d,v=[];if(a.length>0){for(const b of a)b.attributes["data-name"]="badge";v.push(...a)}return Ie({rune:"nav-item",tag:"li",properties:g?{description:g}:{},children:[...O,...v]})}const p=[];if(s.count()>0&&p.push(...s.toArray()),g&&p.push(g),a.length>0){for(const O of a)O.attributes["data-name"]="badge";p.push(...a)}return o.count()>0&&p.push(...o.toArray()),Ie({rune:"nav-item",tag:"li",properties:{slug:s,...g?{description:g}:{},children:o.count()>0?o.flatten().tag("li"):void 0},children:p})}});function w6(n){const e=[],t=[];let r=null;const i=()=>{r&&(t.push(r),r=null)};for(const s of n){if(z.Tag.isTag(s)&&/^h[1-6]$/.test(s.name)){i(),r={kind:"group",heading:s,children:[]};continue}if(z.Tag.isTag(s)&&s.name==="hr"){r&&i(),t.push({kind:"column-break"});continue}if(!r){z.Tag.isTag(s)&&yv(s)&&e.push(...s.children.filter(o=>z.Tag.isTag(o)&&o.name==="li"));continue}r.children.push(s)}return i(),{topLevel:e,sequence:t}}function _6(n){const e=u=>z.Tag.isTag(u)?u.name==="ul"||u.name==="ol"?!0:!!u.attributes?.["data-rune"]:!1,t=u=>z.Tag.isTag(u)&&!e(u);let r=-1,i=-1;n.forEach((u,f)=>{e(u)&&(r===-1&&(r=f),i=f)});let s,o;if(r!==-1){for(let u=0;u<r;u++)if(t(n[u])){s=u;break}for(let u=n.length-1;u>i;u--)if(t(n[u])){o=u;break}}else{const u=[];n.forEach((f,d)=>{t(f)&&u.push(d)}),u.length===1?s=u[0]:u.length>=2&&(s=u[0],o=u[u.length-1])}const a=s!==void 0?n[s]:void 0,l=o!==void 0?n[o]:void 0,c=[];return n.forEach((u,f)=>{f===s||f===o||c.push(u)}),{intro:a,body:c,footer:l}}function k6(n){const{intro:e,body:t,footer:r}=_6(n.children),i=[];for(const a of t)z.Tag.isTag(a)&&yv(a)&&i.push(...a.children.filter(l=>z.Tag.isTag(l)&&l.name==="li"));const s=[];e&&s.push(new z.Tag("div",{"data-name":"intro"},[e])),s.push(...t),r&&s.push(new z.Tag("div",{"data-name":"footer"},[r]));const o=[n.heading];return s.length>0&&o.push(new z.Tag("div",{"data-name":"panel"},s)),Ie({rune:"nav-group",tag:"section",properties:{title:n.heading,item:i},children:o})}function x6(n){const e=[];let t=[];for(const r of n)r.kind==="column-break"?(t.length>0&&e.push(t),t=[]):t.push(r);return t.length>0&&e.push(t),e}const S6=He({attributes:{ordered:{type:Boolean,required:!1,description:"Use numbered list for navigation items"},auto:{type:Boolean,required:!1,description:"Automatically generate from child pages"},layout:{type:String,required:!1,matches:["vertical","menubar","columns","cards","strip"],description:"Presentation layout: sidebar (vertical), horizontal menubar (header), column grid (footer), cards (section landing), or strip (compact secondary nav). Defaults to vertical."},collapsible:{type:Boolean,required:!1,description:"Make each group collapsible. The group containing the current page auto-expands; others start collapsed. Only meaningful for vertical layout."},defaultOpen:{type:String,required:!1,description:"Comma-separated group titles to expand by default, overriding the URL-driven auto-open behaviour."}},contentModel:{type:"custom",processChildren:n=>bv({level:1})(n),description:"Top-level (#) headings become nav groups; the list directly under each heading becomes the group's items. Items are page slugs — wrap in markdown links to set custom labels, or use plain text to resolve the page title. Without headings, a single list becomes a flat nav."},transform(n,e,t){const r=!!e.collapsible,i=t.variables?.__sourcePath,s=O=>{if(e.layout&&(O.attributes.layout=e.layout),i&&(O.attributes["data-source-path"]=i),e.auto&&(O.attributes["data-auto"]="true"),r){O.attributes["data-collapsible"]="true";const v=O.attributes.class??"";O.attributes.class=[v,"rf-nav--collapsible"].filter(Boolean).join(" "),typeof e.defaultOpen=="string"&&e.defaultOpen.trim()&&(O.attributes["data-default-open"]=e.defaultOpen.trim())}return O},o=O=>e.layout==="menubar"?[new z.Tag("button",{"data-name":"trigger",type:"button","aria-label":"Toggle navigation","aria-expanded":"false"},[]),...O]:O;if(e.auto){const O=new z.Tag("meta",{"data-field":IA,content:"true"});return s(Ie({rune:"nav",tag:"nav",properties:{group:[],item:[]},children:o([O])}))}const a=new ze(z.transform(dt(n.children),{...t,nodes:{...t.nodes,item:y6,list:{transform(O,v){return new z.Tag("ul",{},O.transformChildren(v))}}}}));if(e.layout==="strip"){const O=a.flatten().tag("li");return s(Ie({rune:"nav",tag:"nav",class:e.ordered?"ordered":void 0,properties:{group:[],item:O},children:a.toArray()}))}const{topLevel:l,sequence:c}=w6(a.toArray()),u=c.filter(O=>O.kind==="group"),f=u.length>0,d=c.some(O=>O.kind==="column-break");if(!f){if(e.layout==="columns"&&d){const v=[];let b=[];const _=()=>{b.length>0&&(v.push([new z.Tag("ul",{},b)]),b=[])};for(const w of a.toArray()){if(z.Tag.isTag(w)&&w.name==="hr"){_();continue}z.Tag.isTag(w)&&yv(w)&&b.push(...w.children.filter(S=>z.Tag.isTag(S)&&S.name==="li"))}_();const A=v.map(w=>new z.Tag("div",{"data-name":"column"},w)),y=a.flatten().tag("li");return s(Ie({rune:"nav",tag:"nav",class:e.ordered?"ordered":void 0,properties:{group:[],item:y},children:o(A)}))}const O=a.flatten().tag("li");return s(Ie({rune:"nav",tag:"nav",class:e.ordered?"ordered":void 0,properties:{group:[],item:O},children:o(a.toArray())}))}const h=u.map(k6);if(r)for(const O of h)O.attributes["data-collapsed"]=NA;const g=l.length>0?new z.Tag("div",{"data-name":"top-level"},[new z.Tag("ul",{},l)]):null,p=h.flatMap(O=>{const v=[],b=_=>{if(z.Tag.isTag(_)){if(_.name==="li"){v.push(_);return}for(const A of _.children)b(A)}};for(const _ of O.children)b(_);return v});if(e.layout==="columns"&&d){const O=x6(c),v=new Map(u.map((_,A)=>[_,h[A]])),b=O.map(_=>new z.Tag("div",{"data-name":"column"},_.map(A=>v.get(A)).filter(Boolean)));return s(Ie({rune:"nav",tag:"nav",class:e.ordered?"ordered":void 0,properties:{group:h,item:[...l,...p]},children:o(g?[g,...b]:b)}))}return s(Ie({rune:"nav",tag:"nav",class:e.ordered?"ordered":void 0,properties:{group:h,item:[...l,...p]},children:o(g?[g,...h]:h)}))}}),{Tag:A6}=z,C6=["replace","prepend","append"],T6=He({attributes:{name:{type:String,required:!0,description:"Name of the layout region to fill"},mode:{type:String,required:!1,matches:C6.slice(),errorLevel:"critical",default:"replace",description:"How content is placed: replace, prepend, or append"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",greedy:!0,optional:!0}]},transform(n,e,t){const r=z.transform(dt(n.body),t);return new A6("div",{"data-region":e.name,"data-mode":e.mode},r)}}),{Tag:P6}=z,E6=He({attributes:{extends:{type:String,required:!1,default:"parent",description:"Layout inheritance: parent or none"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",greedy:!0,optional:!0}]},transform(n,e,t){const r=z.transform(dt(n.body),t);return new P6("div",{"data-layout-def":!0,"data-extends":e.extends},r)}}),{Tag:$6}=z,Q6=He({attributes:{summary:{type:String,required:!1,description:"Clickable summary text shown when collapsed"},open:{type:Boolean,required:!1,description:"Expand the details section by default"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new ze(z.transform(dt(n.body),t)),i=e.summary||"Details",s=new $6("summary",{},[i]),o=r.wrap("div"),a=Ie({rune:"details",tag:"details",properties:{summary:s},refs:{body:o.tag("div")},children:[s,o.next()]});return e.open&&(a.attributes.open=!0),a}}),{Tag:lo}=z,Jm="data-drawer-title-auto",L6=["right","left","top","bottom"],M6=["sm","md","lg"];function D6(n){const e=n.findIndex(t=>t.type==="hr");return e<0?{body:n,footer:null}:{body:n.slice(0,e),footer:n.slice(e+1)}}const q6=He({attributes:{id:{type:String,required:!0,description:'Stable id for the drawer. Used in entity registration and as the `id="drawer-{value}"` on the rendered element so xref triggers can target it via fragment.'},title:{type:String,required:!1,description:"Panel heading text. Rendered in the drawer header (or as a heading in the no-JS in-flow rendering)."},headingLevel:{type:Number,required:!1,description:"Heading level (1-6) for the title. When omitted, the level is auto-detected from outline position (one deeper than the nearest preceding heading). Out-of-range values are clamped to the 1-6 range."},shortcut:{type:String,required:!1,description:'Keyboard shortcut that opens the drawer when behaviors are loaded (e.g. ".", "cmd+k"). Surfaces as `data-shortcut`; the progressive-enhancement layer wires the listener.'},side:{type:String,required:!1,matches:L6.slice(),description:'Edge the panel slides from when enhanced. Defaults to "right".'},size:{type:String,required:!1,matches:M6.slice(),description:'Panel size. "sm" / "md" (default) / "lg" — width for left/right sides, height for top/bottom.'}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=e.id,i=e.title,s=e.side??"right",o=e.size??"md",a=typeof e.headingLevel=="number"?Math.min(6,Math.max(1,Math.trunc(e.headingLevel))):void 0,l=i?a?new lo(`h${a}`,{},[i]):new lo("h3",{[Jm]:"true"},[i]):void 0,c=new lo("button",{type:"button","aria-label":"Close",hidden:!0},["×"]),u=[];l&&u.push(l),u.push(c);const f=new lo("header",{},u),d=D6(dt(n.body)),h=new ze(z.transform(d.body,t)).wrap("div"),g=d.footer!==null?new ze(z.transform(d.footer,t)).wrap("footer"):null,p={side:new lo("meta",{content:s}),size:new lo("meta",{content:o})};e.shortcut&&(p.shortcut=new lo("meta",{content:e.shortcut}));const O=Ie({rune:"drawer",tag:"section",id:`drawer-${r}`,properties:p,refs:{header:f,...l?{title:l}:{},close:c,body:h.tag("div"),...g?{footer:g.tag("footer")}:{}},children:[...Object.values(p),f,h.next(),...g?[g.next()]:[]]});return O.attributes["data-drawer-id"]=r,O}}),{Tag:Du}=z,R6=["small","medium","large","full"],I6=["left","center","right"],N6=He({attributes:{size:{type:String,required:!1,matches:R6.slice(),description:"Display width of the figure"},align:{type:String,required:!1,matches:I6.slice(),description:"Horizontal alignment of the figure"},caption:{type:String,required:!1,description:"Caption text displayed below the figure"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new ze(z.transform(dt(n.body),t)),i=r.flatten().tag("img").toArray(),s=r.tag("p").toArray().filter(f=>{const d=(f.children||[]).filter(h=>z.Tag.isTag(h));return!(d.length===1&&d[0].name==="img")}),o=e.caption||void 0,a=o?new Du("figcaption",{},[o]):s.length>0?new Du("figcaption",{},[s[0]]):void 0,l=e.size?new Du("meta",{content:e.size}):void 0,c=e.align?new Du("meta",{content:e.align}):void 0,u=[...i];return a&&u.push(a),l&&u.push(l),c&&u.push(c),Ie({rune:"figure",schemaOrgType:"ImageObject",tag:"figure",properties:{...l?{size:l}:{},...c?{align:c}:{}},refs:{...a?{caption:a}:{}},schema:{...i.length>0?{contentUrl:i[0]}:{},...a?{caption:a}:{}},children:u})}}),{Tag:Ps}=z,B6=["grid","carousel","masonry"],j6=["none","tight","default","loose"],z6=He({attributes:{layout:{type:String,required:!1,matches:B6.slice(),description:"Arrangement of images in the gallery"},columns:{type:Number,required:!1,description:"Number of columns in grid layout"},lightbox:{type:Boolean,required:!1,description:"Allow clicking images to view full-size"},gap:{type:String,required:!1,matches:j6.slice(),description:"Space between gallery items"},caption:{type:String,required:!1,description:"Caption text displayed below the gallery"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new ze(z.transform(dt(n.body),t)),i=e.layout??"grid",s=e.columns??3,o=e.lightbox??!0,a=e.gap??"default",l=e.caption??"",u=r.flatten().tag("img").toArray().map(_=>{const A=_.attributes?.alt||"",y=[_];return A&&y.push(new Ps("figcaption",{},[A])),new Ps("figure",{"data-name":"item"},y)}),f=new Ps("meta",{content:i}),d=new Ps("meta",{content:String(o)}),h=s!==3?new Ps("meta",{content:String(s)}):void 0,g=a!=="default"?new Ps("meta",{content:a}):void 0,p=l?new Ps("figcaption",{},[l]):void 0,O=new Ps("div",{"data-name":"items"},u),b=[...[f,d,h,g].filter(Boolean),O];return p&&b.push(p),Ie({rune:"gallery",schemaOrgType:"ImageGallery",tag:"figure",properties:{layout:f,lightbox:d,...h?{columns:h}:{},...g?{gap:g}:{},...p?{caption:p}:{}},children:b})}}),{Tag:pp}=z,Z6=He({attributes:{name:{type:String,required:!0}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new pp("summary",{},[e.name??""]),i=new ze(z.transform(dt(n.body),t)).wrap("div"),s=i.tag("div");for(const o of s.nodes)pp.isTag(o)&&(o.attributes.typeof="Answer",o.children=[new pp("div",{property:"text"},o.children)]);return Ie({rune:"accordion-item",schemaOrgType:"Question",tag:"details",properties:{name:r},refs:{body:s},schema:{name:r,acceptedAnswer:s},children:[r,i.next()]})}}),X6=He({attributes:{multiple:{type:Boolean,required:!1,description:"Allow multiple panels to be open at once"}},contentModel:()=>({type:"sections",sectionHeading:"heading",emitTag:"accordion-item",emitAttributes:{name:"$heading"},fields:[{name:"header",match:"heading|paragraph",optional:!0,greedy:!0},{name:"items",match:"tag",optional:!0,greedy:!0}],sectionModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]}}),transform(n,e,t){const r=new ze(z.transform(dt(n.header),t)),i=[...dt(n.items),...dt(n.sections)],o=new ze(z.transform(i,t)).tag("details").typeof("AccordionItem"),a=o.wrap("div"),l=r.count()>0?[r.wrap("header").next(),a.next()]:[a.next()];return Ie({rune:"accordion",schemaOrgType:"FAQPage",tag:"section",property:"contentSection",properties:{item:o},refs:{...Kc(r),items:a},schema:{mainEntity:o},children:l})}}),{Tag:Sl}=z,F6=He({attributes:{depth:{type:Number,required:!1,default:3,description:"Maximum heading depth to include"},ordered:{type:Boolean,required:!1,default:!1,description:"Use numbered list instead of bullets"}},contentModel:{type:"sequence",fields:[]},transform(n,e,t){const r=t.variables?.headings||[],i=e.depth+1,o=r.filter(u=>u.level>=2&&u.level<=i).map(u=>new Sl("li",{"data-level":u.level},[new Sl("a",{href:`#${u.id}`},[u.text])])),a=new Sl("ul",{},o),l=new Sl("meta",{content:e.depth}),c=new Sl("meta",{content:e.ordered});return Ie({rune:"table-of-contents",tag:"nav",properties:{depth:l,ordered:c},refs:{list:a},children:[l,c,a]})}}),{Tag:Jo}=z,V6=["16:9","4:3","1:1","auto"];function W6(n){try{const e=new URL(n),t=e.hostname.replace("www.","");if(t==="youtube.com"||t==="youtu.be"){let r="";return t==="youtu.be"?r=e.pathname.slice(1):r=e.searchParams.get("v")||"",{provider:"youtube",embedUrl:r?`https://www.youtube-nocookie.com/embed/${r}`:n,type:"video"}}if(t==="vimeo.com")return{provider:"vimeo",embedUrl:`https://player.vimeo.com/video/${e.pathname.slice(1)}`,type:"video"};if(t==="twitter.com"||t==="x.com")return{provider:"twitter",embedUrl:n,type:"tweet"};if(t==="codepen.io")return{provider:"codepen",embedUrl:n.replace("/pen/","/embed/"),type:"codepen"};if(t==="open.spotify.com")return{provider:"spotify",embedUrl:n.replace("open.spotify.com/","open.spotify.com/embed/"),type:"spotify"}}catch{}return{provider:"generic",embedUrl:n,type:"generic"}}const Y6=He({attributes:{url:{type:String,required:!0,description:"URL of the content to embed"},type:{type:String,required:!1,description:"Override auto-detected embed type"},aspect:{type:String,required:!1,matches:V6.slice(),description:"Aspect ratio of the embed frame"},title:{type:String,required:!1,description:"Accessible title for the embed iframe"}},contentModel:{type:"sequence",fields:[{name:"fallback",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=e.url??"",i=W6(r),s=e.type||i.type,o=new Jo("meta",{content:r}),a=new Jo("meta",{content:s}),l=new Jo("meta",{content:e.aspect??"16:9"}),c=new Jo("meta",{content:e.title??""}),u=new Jo("meta",{content:i.embedUrl}),f=new Jo("meta",{content:i.provider}),d=new ze(z.transform(dt(n.fallback),t)).wrap("div");return Ie({rune:"embed",schemaOrgType:"VideoObject",tag:"figure",properties:{url:o,type:a,aspect:l,title:c,embedUrl:u,provider:f},refs:{fallback:d.tag("div")},schema:{name:c,contentUrl:o,embedUrl:u},children:[o,a,l,c,u,f,d.next()]})}}),{Tag:di}=z,BA="__breadcrumb-auto",U6=He({attributes:{separator:{type:String,required:!1,default:"/",description:"Character between breadcrumb items"},auto:{type:Boolean,required:!1,default:!1,description:"Automatically generate from page hierarchy"}},contentModel:n=>n.auto?{type:"sequence",fields:[]}:{type:"sequence",fields:[{name:"list",match:"list",optional:!0,greedy:!0}]},transform(n,e,t){const r=new di("meta",{content:e.separator});if(e.auto){const l=new di("meta",{"data-field":BA,content:"true"}),c=new di("ol",{},[]);return Ie({rune:"breadcrumb",schemaOrgType:"BreadcrumbList",tag:"nav",properties:{separator:r},refs:{items:c},children:[r,l,c]})}const i=new ze(z.transform(dt(n.list),t)),s=[];let o=0;for(const l of i.toArray())if(di.isTag(l)&&(l.name==="ul"||l.name==="ol")){for(const c of l.children)if(di.isTag(c)&&c.name==="li"){o++;const u=new di("meta",{content:o}),f=c.children.find(d=>di.isTag(d)&&d.name==="a");if(f){const d=new di("span",{hidden:!0},f.children),h=new di("a",{href:f.attributes.href},f.children);s.push(Ie({rune:"breadcrumb-item",schemaOrgType:"ListItem",tag:"li",properties:{name:d,url:h},schema:{name:d,item:h,position:u},children:[d,h,u]}))}else{const d=c.children.filter(g=>typeof g=="string").join("").trim(),h=new di("span",{},d?[d]:c.children);s.push(Ie({rune:"breadcrumb-item",schemaOrgType:"ListItem",tag:"li",properties:{name:h},schema:{name:h,position:u},children:[h,u]}))}}}const a=new di("ol",{},s);return Ie({rune:"breadcrumb",schemaOrgType:"BreadcrumbList",tag:"nav",properties:{separator:r},refs:{items:a},schema:{itemListElement:s},children:[r,a]})}}),{Tag:Li}=z,eg="__pagination-auto",G6=He({attributes:{auto:{type:Boolean,required:!1,default:!1,description:"Derive prev/next from sibling page order"},prev:{type:String,required:!1,description:"Explicit previous page (slug or URL)"},next:{type:String,required:!1,description:"Explicit next page (slug or URL)"},scope:{type:String,required:!1,matches:["siblings","section"],default:"siblings",description:"Auto-mode scope: direct siblings, or all pages in the current top-level section"},"prev-label":{type:String,required:!1,description:"Override label for the previous link"},"next-label":{type:String,required:!1,description:"Override label for the next link"}},contentModel:{type:"sequence",fields:[]},selfClosing:!0,transform(n,e,t){if(e.auto){const i=new Li("meta",{"data-field":eg,content:"true"}),s=e.scope?new Li("meta",{"data-field":"scope",content:String(e.scope)}):null,o=e["prev-label"]?new Li("meta",{"data-field":"prev-label",content:String(e["prev-label"])}):null,a=e["next-label"]?new Li("meta",{"data-field":"next-label",content:String(e["next-label"])}):null,l=[i,s,o,a].filter(Boolean);return Ie({rune:"pagination",tag:"nav",children:l})}const r=[];if(e.prev){const s=String(e.prev).startsWith("/")||/^[a-z]+:\/\//i.test(String(e.prev))?String(e.prev):`__slug:${e.prev}`,o=e["prev-label"]??String(e.prev);r.push(new Li("a",{href:s,"data-direction":"prev","data-name":"prev"},[new Li("span",{"data-name":"marker"},["←"]),new Li("span",{"data-name":"label"},[o])]))}if(e.next){const s=String(e.next).startsWith("/")||/^[a-z]+:\/\//i.test(String(e.next))?String(e.next):`__slug:${e.next}`,o=e["next-label"]??String(e.next);r.push(new Li("a",{href:s,"data-direction":"next","data-name":"next"},[new Li("span",{"data-name":"label"},[o]),new Li("span",{"data-name":"marker"},["→"])]))}return Ie({rune:"pagination",tag:"nav",children:r})}}),{Ast:tg,Tag:Ur}=z,H6=/^(.+)\s*:\s*([€$£¥]?\s*[\d].*)$/;function K6(n){const e=n.replace(/[€$£¥\s]/g,"").replace(/,/g,""),t=e.match(/^([\d.]+)\s*[-–]\s*([\d.]+)/);if(t)return(parseFloat(t[1])+parseFloat(t[2]))/2;const r=parseFloat(e);return isNaN(r)?0:r}const J6=/^(.+?)\s*\((?:estimate|est\.?)\)\s*$/i,e9=/^~(.+?)~$/;function t9(n){const e=[];let t=!1;for(const o of n.walk())o.type==="text"&&o.attributes.content&&e.push(o.attributes.content),o.type==="s"&&(t=!0);const r=e.join(" ").trim(),i=r.match(J6);if(i)return{label:i[1].trim(),estimate:!0};const s=r.match(e9);return s?{label:s[1].trim(),estimate:!0}:t?{label:r,estimate:!0}:{label:r,estimate:!1}}const n9=He({attributes:{description:{type:String,required:!1,description:"Line item description"},amount:{type:String,required:!1,description:"Line item amount"}},contentModel:{type:"sequence",fields:[]},transform(n,e){const t=new Ur("span",{},[e.description??""]),r=new Ur("span",{},[e.amount??""]);return Ie({rune:"budget-line-item",tag:"li",properties:{description:t,amount:r},children:[t,r]})}});function r9(n){const e=[];for(const t of n)if(t.type==="list")for(const r of t.children){const i=[];for(const a of r.walk())a.type==="text"&&a.attributes.content&&i.push(a.attributes.content);const s=i.join(" ").trim(),o=s.match(H6);o?e.push(new tg.Node("tag",{description:o[1].trim(),amount:o[2].trim()},[],"budget-line-item")):e.push(new tg.Node("tag",{description:s,amount:""},[],"budget-line-item"))}else e.push(t);return e}function i9(n){let e=0;for(const t of n)t.type==="tag"&&t.tag==="budget-line-item"&&t.attributes.amount&&(e+=K6(t.attributes.amount));return e}const s9=He({attributes:{label:{type:String,required:!0},estimate:{type:Boolean,required:!1}},contentModel:{type:"custom",processChildren:r9,description:'Converts list items into budget-line-item tags with "Description: $Amount" pattern.'},transform(n,e,t){const r=dt(n.children),i=i9(r),s=new ze(z.transform(r,t)),o=new Ur("meta",{content:e.label??""}),a=new Ur("meta",{content:e.estimate?"estimate":"false"}),l=new Ur("meta",{content:String(i)}),c=s.tag("li").typeof("BudgetLineItem"),u=new Ur("ul",{},c.toArray());return Ie({rune:"budget-category",tag:"div",properties:{label:o,estimate:a,lineItem:c,subtotal:l},refs:{"line-items":u},children:[o,a,l,u]})}}),o9=["detailed","summary"];function a9(n){const e=n,t=e.reduce((l,c,u)=>(c.type==="heading"&&l.push({idx:u,level:c.attributes.level}),l),[]);let r=[],i=e;t.length>=2&&t[0].level<t[1].level&&(r=e.slice(0,t[1].idx),i=e.slice(t[1].idx));const s=bv()(i),o=s.length-1;if(!s[o]||s[o].type!=="list")return n;const a=s[o].children.map(l=>{const c=l.children[0],{label:u,estimate:f}=t9(c);return new tg.Node("tag",{label:u,estimate:f},l.children.slice(1),"budget-category")});return s.splice(o,1,...a),[...r,...s]}const l9=He({attributes:{currency:{type:String,required:!1,description:"Currency symbol or code (e.g. USD, EUR)"},duration:{type:String,required:!1,description:'Budget duration for per-day calculations (e.g. "5 days", "1 month")'},showPerDay:{type:Boolean,required:!1,description:"Show per-day cost breakdown"},variant:{type:String,required:!1,matches:o9.slice(),description:"Display style: detailed line items or summary"}},contentModel:{type:"custom",processChildren:a9,description:'Converts headings into budget-category tags with estimate parsing, where list items become budget-line-items with "Description: $Amount" pattern.'},transform(n,e,t){const r=dt(n.children),i=[],s=[];for(const b of r)b.type==="tag"?s.push(b):(b.type==="paragraph"||b.type==="heading")&&i.push(b);const o=new ze(z.transform(i,t)),a=new ze(z.transform(s,t)),l=Kc(o),c=new Ur("meta",{content:e.currency??"USD"}),u=new Ur("meta",{content:e.duration??""}),f=new Ur("meta",{content:String(e.showPerDay??!0)}),d=new Ur("meta",{content:e.variant??"detailed"}),h=a.tag("div").typeof("BudgetCategory"),g=new Ur("div",{},h.toArray()),O=o.count()>0?new Ur("header",{},o.toArray()):void 0,v=[c,u,f,d,...O?[O]:[],g];return Ie({rune:"budget",schemaOrgType:"ItemList",tag:"section",property:"contentSection",properties:{currency:c,duration:u,showPerDay:f,variant:d,category:h},refs:{...O?{preamble:O}:{},...l,categories:g},children:v})}}),{Tag:ns}=z,c9=["side-by-side","stacked"],u9=He({attributes:{layout:{type:String,required:!1,matches:c9.slice(),description:"Display panels side-by-side or stacked"},labels:{type:String,required:!1,description:"Comma-separated custom labels for each panel"},title:{type:String,required:!1,description:"Optional title displayed above the panels"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new ze(z.transform(dt(n.body),t)),i=e.layout??"side-by-side",s=e.labels??"",o=e.title??"",a=new ns("meta",{content:i}),l=[],c=s?s.split(",").map(g=>g.trim()):[];let u=0;for(const g of r.toArray()){let p;if(ns.isTag(g)&&g.name==="pre")p=g;else if(ns.isTag(g)&&g.name==="div"&&g.attributes.class==="rf-codeblock"){const O=g.children.find(v=>ns.isTag(v)&&v.name==="pre");O&&(p=O)}if(p&&ns.isTag(p)){const O=c[u]||p.attributes["data-language"]||`Panel ${u+1}`,v=new ns("span",{"data-label":!0},[O]);l.push(new ns("div",{"data-panel":!0},[v,g])),u++}}const f=new ns("div",{"data-panels":!0},l),d=o?[new ns("div",{"data-name":"header"},[o])]:[],h=Ie({rune:"compare",tag:"div",properties:{layout:a},refs:{panels:f},children:[a,...d,f]});return h.attributes["data-code-host"]=!0,h}}),{Tag:rs}=z,f9=He({attributes:{sortable:{type:String,required:!1,description:'Column names to enable sorting, or "all"'},searchable:{type:Boolean,required:!1,description:"Show a search input to filter rows"},pageSize:{type:Number,required:!1,description:"Rows per page; 0 disables pagination"},defaultSort:{type:String,required:!1,description:"Column to sort by initially"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new ze(z.transform(dt(n.body),t)),i=new rs("meta",{content:e.sortable??""}),s=new rs("meta",{content:String(e.searchable??!1)}),o=new rs("meta",{content:String(e.pageSize??0)}),a=new rs("meta",{content:e.defaultSort??""});let l;const c=r.tag("table");if(c.count()>0)l=c.next();else{const u=r.toArray().find(d=>rs.isTag(d)&&d.name==="div"&&d.attributes.class==="rf-table-wrapper"),f=u&&rs.isTag(u)?u.children.find(d=>rs.isTag(d)&&d.name==="table"):void 0;l=f&&rs.isTag(f)?f:new rs("table",{},[])}return Ie({rune:"data-table",schemaOrgType:"Dataset",tag:"div",properties:{sortable:i,searchable:s,pageSize:o,defaultSort:a},refs:{table:l},children:[i,s,o,a,l]})}}),{Tag:wn}=z,d9=["unified","split","inline"];function h9(n,e){const t=n.split(`
296
- `),r=e.split(`
297
- `),i=t.length,s=r.length,o=Array.from({length:i+1},()=>new Array(s+1).fill(0));for(let u=1;u<=i;u++)for(let f=1;f<=s;f++)o[u][f]=t[u-1]===r[f-1]?o[u-1][f-1]+1:Math.max(o[u-1][f],o[u][f-1]);let a=i,l=s;const c=[];for(;a>0||l>0;)a>0&&l>0&&t[a-1]===r[l-1]?(c.push({type:"equal",text:t[a-1]}),a--,l--):l>0&&(a===0||o[a][l-1]>=o[a-1][l])?(c.push({type:"add",text:r[l-1]}),l--):(c.push({type:"remove",text:t[a-1]}),a--);return c.reverse(),c}function p9(n){const e=[],t=[];let r=1,i=1,s=0;for(;s<n.length;)if(n[s].type==="equal")e.push({hunk:n[s],num:r++}),t.push({hunk:n[s],num:i++}),s++;else{const o=[],a=[];for(;s<n.length&&n[s].type==="remove";)o.push(n[s]),s++;for(;s<n.length&&n[s].type==="add";)a.push(n[s]),s++;const l=Math.max(o.length,a.length);for(let c=0;c<l;c++)e.push(c<o.length?{hunk:o[c],num:r++}:null),t.push(c<a.length?{hunk:a[c],num:i++}:null)}return{before:e,after:t}}function m9(n){const e=[];let t=1,r=1;for(const i of n)i.type==="equal"?(e.push({hunk:i,beforeNum:t,afterNum:r}),t++,r++):i.type==="remove"?(e.push({hunk:i,beforeNum:t,afterNum:null}),t++):i.type==="add"&&(e.push({hunk:i,beforeNum:null,afterNum:r}),r++);return e}function g9(n,e,t=0,r=0){const s=m9(n).map(({hunk:o,beforeNum:a,afterNum:l})=>new wn("span",{"data-name":"line","data-line-status":o.type},[new wn("span",{"data-name":"gutter-num","data-side":"before"},[a!=null?String(a+t):""]),new wn("span",{"data-name":"gutter-num","data-side":"after"},[l!=null?String(l+r):""]),new wn("span",{"data-name":"line-content",...e?{"data-language":e}:{}},[o.text])]));return[new wn("pre",{"data-name":"code","data-copy-selector":'[data-name="line-content"]'},[new wn("div",{"data-name":"rows"},s)])]}function O9(n,e,t=0,r=0){const{before:i,after:s}=p9(n);function o(a,l,c){return a.map(u=>{const f=u?u.hunk.type:"empty";return new wn("span",{"data-name":"line","data-line-status":f},[new wn("span",{"data-name":"gutter-num","data-side":l},[u?String(u.num+c):""]),new wn("span",{"data-name":"line-content",...u&&e?{"data-language":e}:{}},[u?u.hunk.text:""])])})}return[new wn("div",{"data-name":"split-container"},[new wn("div",{"data-name":"panel"},[new wn("pre",{"data-name":"code","data-copy-selector":'[data-name="line-content"]'},[new wn("div",{"data-name":"rows"},o(i,"before",t))])]),new wn("div",{"data-name":"panel"},[new wn("pre",{"data-name":"code","data-copy-selector":'[data-name="line-content"]'},[new wn("div",{"data-name":"rows"},o(s,"after",r))])])])]}function p0(n){if(typeof n!="string"||n.length===0)return 0;const e=/^(\d+)/.exec(n.trim());if(!e)return 0;const t=Number(e[1]);return Number.isFinite(t)&&t>0?t-1:0}function v9(n,e,t){if(n)return[new wn("div",{"data-name":"header"},[n])];if(e&&t)return e===t?[new wn("div",{"data-name":"header"},[e])]:[new wn("div",{"data-name":"header"},[`${e} → ${t}`])];const r=e||t;return r?[new wn("div",{"data-name":"header"},[r])]:[]}const b9=He({attributes:{mode:{type:String,required:!1,matches:d9.slice(),description:"Diff display style: unified, split, or inline"},language:{type:String,required:!1,description:"Programming language for syntax highlighting"},title:{type:String,required:!1,description:"Optional title or filename displayed above the diff"}},contentModel:{type:"sequence",fields:[{name:"fences",match:"fence",greedy:!0}]},transform(n,e){const t=e.mode??"unified",r=e.language??"",i=e.title??"",s=new wn("meta",{content:t}),o=new wn("meta",{content:r}),a=dt(n.fences),l=a.length>0?(a[0].attributes.content||"").replace(/\n$/,""):"",c=a.length>1?(a[1].attributes.content||"").replace(/\n$/,""):"",u=r||a.length>0&&a[0].attributes.language||"",f=a.length>0&&typeof a[0].attributes.source=="string"?a[0].attributes.source:void 0,d=a.length>1&&typeof a[1].attributes.source=="string"?a[1].attributes.source:void 0,h=a.length>0?p0(a[0].attributes.lines):0,g=a.length>1?p0(a[1].attributes.lines):0,p=h9(l,c),O=t==="split"?O9(p,u,h,g):g9(p,u,h,g),v=v9(i,f,d),b=Ie({rune:"diff",tag:"div",properties:{mode:s,language:o},children:[s,o,...v,...O]});return b.attributes["data-code-host"]=!0,b}}),{Tag:qu}=z,y9=["bar","line","pie","area"];function w9(n){const e=[],t=[];for(const r of n){if(!z.Tag.isTag(r))continue;let i=r;if(r.name==="div"&&r.attributes.class==="rf-table-wrapper"){const s=r.children.find(o=>z.Tag.isTag(o)&&o.name==="table");s&&z.Tag.isTag(s)&&(i=s)}if(i.name==="table"){for(const s of i.children)if(z.Tag.isTag(s)){if(s.name==="thead"){for(const o of s.children)if(!(!z.Tag.isTag(o)||o.name!=="tr")){for(const a of o.children)if(z.Tag.isTag(a)){const l=Array.from(ld(a)).filter(c=>typeof c=="string").join("");e.push(l.trim())}}}if(s.name==="tbody")for(const o of s.children){if(!z.Tag.isTag(o)||o.name!=="tr")continue;const a=[];for(const l of o.children)if(z.Tag.isTag(l)){const c=Array.from(ld(l)).filter(u=>typeof u=="string").join("");a.push(c.trim())}t.push(a)}}}}return{headers:e,rows:t}}const _9=He({attributes:{type:{type:String,required:!1,matches:y9.slice(),description:"Chart visualization type"},title:{type:String,required:!1,description:"Title displayed above the chart"},stacked:{type:Boolean,required:!1,description:"Stack data series instead of grouping"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=z.transform(dt(n.body),t),i=new qu("meta",{content:e.type??"bar"}),s=new qu("meta",{content:e.title??""}),o=new qu("meta",{content:String(e.stacked??!1)}),a=w9(r),l=new qu("meta",{content:JSON.stringify(a)});return Ie({rune:"chart",tag:"figure",properties:{type:i,title:s,stacked:o},refs:{data:l},children:[i,s,o,l]})}}),{Tag:mp}=z,k9=["mermaid","plantuml","ascii"],x9=He({attributes:{language:{type:String,required:!1,matches:k9.slice(),description:"Diagram language: mermaid, plantuml, or ascii"},title:{type:String,required:!1,description:"Title displayed above the diagram"}},contentModel:{type:"sequence",fields:[{name:"source",match:"fence"}]},transform(n,e){const t=e.language??"mermaid",r=e.title??"",i=new mp("meta",{content:t}),s=new mp("meta",{content:r}),a=dt(n.source)[0]?.attributes?.content||"",l=new mp("meta",{content:a});return Ie({rune:"diagram",tag:"figure",properties:{language:i,title:s},refs:{source:l},children:[i,s,l]})}}),{Tag:S9}=z,A9=["sidenote","footnote","tooltip"],C9=He({attributes:{variant:{type:String,required:!1,matches:A9.slice(),description:"Display style: sidenote, footnote, or tooltip"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new S9("meta",{content:e.variant??"sidenote"}),s=new ze(z.transform(dt(n.body),t)).wrap("div");return Ie({rune:"sidenote",tag:"aside",properties:{variant:r},refs:{body:s},children:[r,s.next()]})}}),{Ast:Ru,Tag:m0}=z,T9=He({attributes:{speaker:{type:String,required:!1},align:{type:String,required:!1,matches:["left","right"]}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new m0("span",{},[e.speaker??""]),i=new m0("meta",{content:e.align??"left"}),s=new ze(z.transform(dt(n.body),t)).wrap("div");return Ie({rune:"conversation-message",tag:"div",properties:{speaker:r,align:i},refs:{body:s.tag("div")},children:[r,i,s.next()]})}});function P9(n,e){const t=e.speakers?String(e.speakers).split(",").map(s=>s.trim()):[],r=[];let i=0;for(const s of n)if(s.type==="blockquote"){let o="";const a=[...s.children],l=a.length>0&&a[0].type==="paragraph"?a[0]:null,c=l&&l.children[0]?.type==="inline"?l.children[0]:l;if(c){const f=c.children[0];f&&f.type==="strong"&&(o=Array.from(f.walk()).filter(h=>h.type==="text").map(h=>h.attributes.content).join("").replace(/:\s*$/,""))}if(!o&&t.length>0&&(o=t[i%t.length],c)){const f=new Ru.Node("strong",{},[new Ru.Node("text",{content:`${o}:`},[])]),d=new Ru.Node("text",{content:" "},[]);c.children=[f,d,...c.children]}const u=i%2===0?"left":"right";r.push(new Ru.Node("tag",{speaker:o,align:u},s.children,"conversation-message")),i++}else r.push(s);return r}const E9=He({attributes:{speakers:{type:String,required:!1,description:"Comma-separated speaker names for alternating messages"}},contentModel:{type:"custom",processChildren:(n,e)=>P9(n,e),description:"Converts blockquotes to conversation messages with alternating left/right alignment. Extracts speaker name from bold text in first paragraph, falls back to speakers list."},transform(n,e,t){const i=new ze(z.transform(dt(n.children),t)).tag("div").typeof("ConversationMessage"),s=i.wrap("div");return Ie({rune:"conversation",tag:"div",properties:{message:i},refs:{messages:s},children:[s.next()]})}}),{Tag:jA}=z,$9=["click","scroll","auto"],Q9=He({attributes:{name:{type:String,required:!0}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new jA("span",{},[e.name??""]),i=new ze(z.transform(dt(n.body),t)).wrap("div");return Ie({rune:"reveal-step",tag:"div",properties:{name:r},refs:{body:i.tag("div")},children:[r,i.next()]})}}),L9=He({attributes:{mode:{type:String,required:!1,matches:$9.slice(),description:"Step progression: click, scroll, or auto"}},contentModel:()=>({type:"sections",sectionHeading:"heading",emitTag:"reveal-step",emitAttributes:{name:"$heading"},fields:[{name:"header",match:"heading|paragraph",optional:!0,greedy:!0},{name:"items",match:"tag",optional:!0,greedy:!0}],sectionModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]}}),transform(n,e,t){const r=new ze(z.transform(dt(n.header),t)),i=[...dt(n.items),...dt(n.sections)],s=new ze(z.transform(i,t)),o=new jA("meta",{content:e.mode??"click"}),a=s.tag("div").typeof("RevealStep"),l=a.wrap("div"),c=r.count()>0?[r.wrap("header").next(),o,l.next()]:[o,l.next()];return Ie({rune:"reveal",tag:"section",property:"contentSection",properties:{step:a},refs:{...Kc(r),steps:l},children:c})}}),{Tag:Al}=z,M9=["slider","toggle","fade","auto"],D9=["horizontal","vertical"],q9=He({attributes:{variant:{type:String,required:!1,matches:M9.slice(),description:"Interaction mode: slider, toggle, fade, or auto"},orientation:{type:String,required:!1,matches:D9.slice(),description:"Divider axis for slider/auto variants (horizontal or vertical)"},position:{type:Number,required:!1,description:"Initial slider position as a percentage (0-100)"},duration:{type:Number,required:!1,description:"Animation duration in milliseconds (fade/auto variants)"},labels:{type:String,required:!1,description:"Comma-separated custom labels for the two panels"}},contentModel:{type:"delimited",delimiter:"hr",dynamicZones:!0,zoneModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]}},transform(n,e,t){const r=n.zones??[],i=e.labels?e.labels.split(",").map(d=>d.trim()):[],s=r.map((d,h)=>{const p=new ze(m6(z.transform(dt(d.body),t))).wrap("div"),O=i[h],v=O?new Al("span",{},[O]):void 0;return Ie({rune:"juxtapose-panel",tag:"div",properties:{},refs:{...v?{name:v}:{},body:p.tag("div")},children:[...v?[v]:[],p.next()]})}),o=new ze(s).tag("div").typeof("JuxtaposePanel"),a=o.wrap("div"),l=new Al("meta",{content:e.variant??"slider"}),c=new Al("meta",{content:e.orientation??"vertical"}),u=new Al("meta",{content:String(e.position??50)}),f=new Al("meta",{content:String(e.duration??1e3)});return Ie({rune:"juxtapose",tag:"section",properties:{panel:o,variant:l,orientation:c,position:u,duration:f},refs:{panels:a},children:[l,c,u,f,a.next()]})}}),{Tag:R9}=z,I9=He({contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new ze(z.transform(dt(n.body),t)).wrap("div");return Ie({rune:"annotate-note",tag:"aside",properties:{},refs:{body:r.tag("div")},children:[r.next()]})}}),N9=["margin","tooltip","inline"],B9=He({attributes:{variant:{type:String,required:!1,matches:N9.slice(),description:"Annotation display style: margin, tooltip, or inline"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new ze(z.transform(dt(n.body),t)),i=new R9("meta",{content:e.variant??"margin"}),s=r.tag("aside").typeof("AnnotateNote"),o=r.wrap("div");return Ie({rune:"annotate",tag:"div",properties:{note:s,variant:i},refs:{body:o.tag("div")},children:[i,o.next()]})}}),{Ast:co,Tag:Kt}=z,j9=["stacked","inline","compact"],z9=["GET","POST"],Z9=[[["email","e-mail"],"email"],[["phone","telephone","mobile","cell"],"tel"],[["website","url","homepage","link"],"url"],[["date","birthday","dob"],"date"],[["number","amount","quantity","age","count"],"number"],[["password","pin","passcode"],"password"],[["message","comments","description","feedback","notes","bio","about"],"textarea"],[["file","upload","attachment","resume","document","cv"],"file"]];function X9(n){const e=n.toLowerCase();for(const[t,r]of Z9)if(t.some(i=>e.includes(i)))return r;return"text"}function F9(n){const e=n.match(/^(.+?)\s*\(([^)]+)\)\s*$/);if(!e)return{name:n.trim(),optional:!1,placeholder:""};const t=e[1].trim(),r=e[2],i=/\boptional\b/i.test(r),s=r.match(/placeholder:\s*["']?([^"',]+)["']?/i),o=s?s[1].trim():"";return{name:t,optional:i,placeholder:o}}function uo(n){return Array.from(n.walk()).filter(e=>e.type==="text").map(e=>e.attributes.content).join("")}function V9(n){if(n.type!=="paragraph")return!1;const e=Array.from(n.walk());if(!e.some(s=>s.type==="strong"))return!1;const r=e.filter(s=>s.type==="text").map(s=>s.attributes.content).join(""),i=e.filter(s=>s.type==="strong").flatMap(s=>Array.from(s.walk()).filter(o=>o.type==="text")).map(s=>s.attributes.content).join("");return r.trim()===i.trim()&&r.trim().length>0}function W9(n){const e=/\(multiple\)/i.test(n)||/select all/i.test(n),t=/\(radio\)/i.test(n),r=/\(optional\)/i.test(n);return{label:n.replace(/\s*\(multiple\)/gi,"").replace(/\s*\(radio\)/gi,"").replace(/\s*\(optional\)/gi,"").trim(),multiple:e,radio:t,optional:r}}const Y9=He({attributes:{name:{type:String,required:!1},fieldType:{type:String,required:!1},required:{type:Boolean,required:!1},placeholder:{type:String,required:!1},options:{type:String,required:!1}},contentModel:{type:"sequence",fields:[]},transform(n,e){const t=e.name??"",r=e.fieldType??"text",i=e.required??!0,s=e.placeholder??"",o=e.options??"",a=`field-${t.toLowerCase().replace(/\s+/g,"-")}`,l=o?o.split(",").map(g=>g.trim()).filter(Boolean):[];if(r==="submit")return new Kt("button",{type:"submit","data-name":"submit"},[t]);if(r==="separator")return new Kt("hr",{"data-name":"separator"},[]);if(r==="help")return new Kt("p",{"data-name":"help"},[t]);if(r==="description")return new Kt("p",{"data-name":"text"},[t]);if(r==="group")return new Kt("fieldset",{class:"rf-form-fieldset"},[new Kt("legend",{},[t])]);if(r==="radio"||r==="checkbox"){const g=[t];i&&g.push(new Kt("span",{"data-name":"required","aria-hidden":"true"},["*"]));const p=l.map((v,b)=>new Kt("label",{class:"rf-form-choice"},[new Kt("input",{type:r,name:a,value:v,...i&&r==="radio"&&b===0?{required:""}:{}},[]),new Kt("span",{},[v])])),O=new Kt("meta",{"data-field":"field-type",content:r});return new Kt("fieldset",{"data-rune":"form-field",class:"rf-form-choice-group"},[O,new Kt("legend",{},g),...p])}const c=[t];i&&c.push(new Kt("span",{"data-name":"required","aria-hidden":"true"},["*"]));const u=new Kt("label",{for:a},c);let f;r==="textarea"?f=new Kt("textarea",{id:a,name:a,...s?{placeholder:s}:{},...i?{required:""}:{},rows:"4"},[]):r==="select"?f=new Kt("select",{id:a,name:a,...i?{required:""}:{}},[new Kt("option",{value:"",disabled:"",selected:""},["Select an option"]),...l.map(g=>new Kt("option",{value:g},[g]))]):f=new Kt("input",{type:r,id:a,name:a,...s?{placeholder:s}:{},...i?{required:""}:{}},[]);const d=new Kt("div",{},[u,f]),h=new Kt("meta",{content:r});return Ie({rune:"form-field",tag:"div",properties:{fieldType:h},refs:{body:d},children:[h,d]})}});function U9(n){const e=[];let t=null,r=-1;for(let s=n.length-1;s>=0;s--)if(V9(n[s])){r=s;break}const i=()=>{if(t){const s=uo(t);e.push(new co.Node("tag",{name:s,fieldType:"help",required:!1,placeholder:"",options:""},[],"form-field")),t=null}};for(let s=0;s<n.length;s++){const o=n[s];if(o.type==="heading"){i();const a=uo(o);e.push(new co.Node("tag",{name:a,fieldType:"group",required:!1,placeholder:"",options:""},[],"form-field"))}else if(o.type==="list"&&t){const a=uo(t),l=W9(a),c=[];for(const f of o.children)f.type==="item"&&c.push(uo(f));let u;l.multiple?u="checkbox":l.radio||c.length<=4?u="radio":u="select",e.push(new co.Node("tag",{name:l.label,fieldType:u,required:!l.optional,placeholder:"",options:c.join(",")},[],"form-field")),t=null}else if(o.type==="list"){i();for(const a of o.children)if(a.type==="item"){const l=uo(a),c=F9(l),u=X9(c.name);e.push(new co.Node("tag",{name:c.name,fieldType:u,required:!c.optional,placeholder:c.placeholder,options:""},[],"form-field"))}}else if(o.type==="blockquote")i(),t=o;else if(s===r){i();const a=uo(o);e.push(new co.Node("tag",{name:a,fieldType:"submit",required:!1,placeholder:"",options:""},[],"form-field"))}else if(o.type==="hr")i(),e.push(new co.Node("tag",{name:"",fieldType:"separator",required:!1,placeholder:"",options:""},[],"form-field"));else if(o.type==="paragraph"){i();const a=uo(o);e.push(new co.Node("tag",{name:a,fieldType:"description",required:!1,placeholder:"",options:""},[],"form-field"))}else i(),e.push(o)}return i(),e}const G9=He({attributes:{action:{type:String,required:!0,description:"URL the form submits to"},method:{type:String,required:!1,matches:z9.slice(),description:"HTTP method for form submission"},success:{type:String,required:!1,description:"Message shown after successful submission"},error:{type:String,required:!1,description:"Message shown when submission fails"},variant:{type:String,required:!1,matches:j9.slice(),description:"Form layout style"},name:{type:String,required:!1,description:"Form name for identification"},honeypot:{type:Boolean,required:!1,description:"Include a hidden field to prevent spam"}},contentModel:{type:"custom",processChildren:n=>U9(n),description:"Multi-pass form field parser with type inference and selection detection. Converts lists to text inputs, blockquote + list to selection fields, headings to fieldsets, bold paragraphs to submit buttons, and blockquotes to help text."},transform(n,e,t){const r=new ze(z.transform(dt(n.children),t)),i=new Kt("meta",{content:e.action??""}),s=new Kt("meta",{content:e.method??"POST"}),o=new Kt("meta",{content:e.success??""}),a=new Kt("meta",{content:e.error??""}),l=new Kt("meta",{content:e.variant??"stacked"}),c=new Kt("meta",{content:String(e.honeypot??!0)}),u=r.tag("div").typeof("FormField"),f=r.wrap("div");return Ie({rune:"form",tag:"form",properties:{action:i,method:s,success:o,error:a,variant:l,honeypot:c,field:u},refs:{body:f},children:[i,s,o,a,l,c,f.next()]})}}),H9={".html":"html",".css":"css",".js":"js",".svg":"svg",".glsl-vert":"glsl-vert",".glsl-frag":"glsl-frag"};function K9(n,e){return n.endsWith("/")?n+e:n+"/"+e}function J9(n){if(n.endsWith(".glsl-vert"))return"glsl-vert";if(n.endsWith(".glsl-frag"))return"glsl-frag";const e=n.lastIndexOf(".");if(e===-1)return null;const t=n.slice(e);return H9[t]??null}function e8(n,e,t,r,i){const s=[],o=[];if(i&&!i(n))return{content:"",panels:[],errors:[`Sandbox src directory not found: "${e}"`],warnings:[]};const a=r(n);if(a.length===0)return{content:"",panels:[],errors:[],warnings:[`Sandbox src directory "${e}" contains no .html, .css, or .js files`]};const l=[];for(const x of a.sort()){const k=J9(x);if(!k)continue;const E=t(K9(n,x));E!=null&&l.push({name:x,role:k,content:E})}if(l.length===0)return{content:"",panels:[],errors:[],warnings:[`Sandbox src directory "${e}" contains no .html, .css, or .js files`]};const c=new Map;for(const x of l){const k=c.get(x.role)??[];k.push(x),c.set(x.role,k)}const u=c.get("html")??[];let f;u.length>1?(f=u.find(x=>x.name==="index.html")??u[0],o.push(`Sandbox src "${e}" has multiple .html files — using ${f.name}`)):u.length===1?f=u[0]:o.push(`Sandbox src "${e}" has no .html file — body will be empty`);const d=c.get("css")??[],h=d.map(x=>x.content).join(`
298
- `),g=c.get("js")??[];let p=g.map(x=>x.content).join(`
299
- `);const v=(c.get("svg")??[]).map(x=>x.content).join(`
300
- `),b=(c.get("glsl-vert")??[])[0],_=(c.get("glsl-frag")??[])[0];let A="";b&&(A+=`const VERTEX_SHADER = \`${g0(b.content)}\`;
301
- `),_&&(A+=`const FRAGMENT_SHADER = \`${g0(_.content)}\`;
302
- `),A&&(p=A+p);const y=(f?.content??"")+(v?`
303
- `+v:""),w=[];y&&w.push(`<div data-source="HTML">
304
- ${y}
305
- </div>`),h&&w.push(`<style data-source="CSS">
306
- ${h}
307
- </style>`),p&&w.push(`<script data-source="JavaScript">
308
- ${p}
309
- <\/script>`);const S=w.join(`
310
- `),C=[];if(f&&C.push({label:"HTML",language:"html",content:y,origin:`${e}/${f.name}`}),h){const x=d.map(k=>`${e}/${k.name}`).join(", ");C.push({label:"CSS",language:"css",content:h,origin:x})}if(p){const x=[];b&&x.push(`${e}/${b.name}`),_&&x.push(`${e}/${_.name}`),x.push(...g.map(k=>`${e}/${k.name}`)),C.push({label:"JavaScript",language:"javascript",content:p,origin:x.join(", ")})}return{content:S,panels:C,errors:s,warnings:o}}function t8(n,e){const t=ea(n,"div","HTML"),r=ea(n,"style","CSS"),i=ea(n,"script","JavaScript"),s=ea(e,"div","HTML"),o=ea(e,"style","CSS"),a=ea(e,"script","JavaScript"),l=gp(t,s),c=gp(r,o),u=gp(i,a),f=[];return l&&f.push(`<div data-source="HTML">
311
- ${l}
312
- </div>`),c&&f.push(`<style data-source="CSS">
313
- ${c}
314
- </style>`),u&&f.push(`<script data-source="JavaScript">
315
- ${u}
316
- <\/script>`),f.join(`
317
- `)}function ea(n,e,t){const r=new RegExp(`<${e}[^>]*data-source="${t}"[^>]*>([\\s\\S]*?)</${e}>`,"i");return n.match(r)?.[1]?.trim()??""}function gp(n,e){return n&&e?n+`
318
- `+e:n||e}function g0(n){return n.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}const{Tag:mr}=z;function O0(n){const e=n.split(`
319
- `),t=e.filter(i=>i.trim().length>0).map(i=>i.match(/^(\s*)/)?.[0].length??0),r=t.length>0?Math.min(...t):0;return r>0?e.map(i=>i.slice(r)).join(`
320
- `):n}function v0(n){const e=[],t=/<(\w+)\b([^>]*?)\bdata-source(?:="([^"]*)")?([^>]*)>([\s\S]*?)<\/\1>/g;let r;for(;(r=t.exec(n))!==null;){const[,i,s,o,a,l]=r,c=i==="style"?"css":i==="script"?"javascript":"html",u=c.charAt(0).toUpperCase()+c.slice(1);let f;if(i==="style"||i==="script")f=O0(l.trim());else{const d=(s+a).replace(/\s{2,}/g," ").trim(),h=d?` ${d}`:"",g=O0(l).split(`
321
- `).map(p=>p.trim().length>0?" "+p:p).join(`
322
- `);f=`<${i}${h}>${g}</${i}>`.trim()}e.push({label:o||u,language:c,content:f})}return e}function b0(n,e){const t=e.variables?.__source;if(typeof t=="string"&&n.lines?.length>=2){const r=t.split(`
323
- `),i=n.lines[0]+1,s=n.lines[n.lines.length-1]-1;return r.slice(i,s).join(`
324
- `).trim()}return""}const n8=He({attributes:{src:{type:String,required:!1,description:"Directory containing external source files"},framework:{type:String,required:!1,description:"JavaScript framework for the sandbox"},dependencies:{type:String,required:!1,description:"Comma-separated npm packages to include"},label:{type:String,required:!1,description:"Label displayed above the sandbox"},height:{type:Number,required:!1,description:"Height of the sandbox iframe in pixels"},context:{type:String,required:!1,description:"Shared context scope for multiple sandboxes"}},contentModel:{type:"sequence",fields:[]},transform(n,e,t,r){const i=e.src??"",s=e.framework??"",o=e.dependencies??"",a=e.label??"",l=e.height,c=e.context??"default";let u="",f=[];const d=t.variables?.__sandboxReadFile,h=t.variables?.__sandboxListDir,g=t.variables?.__sandboxDirExists,p=t.variables?.__sandboxExamplesDir;if(i&&d&&h&&p){const M=p.endsWith("/")?p+i:p+"/"+i,P=e8(M,i,d,h,g);P.errors.length>0?(u=`<div data-source="HTML"><pre style="color:red;padding:1rem">${P.errors.join(`
325
- `)}</pre></div>`,f=[]):(u=P.content,f=P.panels.map(I=>({label:I.label,language:I.language,content:I.content,origin:I.origin})));const D=b0(r,t);D&&(u=t8(u,D),f=v0(u))}else u=b0(r,t),f=v0(u);const O=t.variables?.__securityPolicy??{trust:"trusted",allowJs:!0,sandboxOrigin:void 0},v=zj(u,O),b=new mr("meta",{content:v}),_=new mr("meta",{content:O.trust}),A=new mr("meta",{content:O.allowJs?"true":"false"}),y=O.sandboxOrigin?new mr("meta",{content:O.sandboxOrigin}):void 0,w=new mr("meta",{content:s}),S=new mr("meta",{content:o}),C=a?new mr("meta",{content:a}):void 0,x=new mr("meta",{content:l!=null?String(l):"auto"}),k=new mr("meta",{content:c}),E=v?new mr("pre",{"data-language":"html"},[new mr("code",{"data-language":"html"},[v])]):void 0,T=f.map(M=>{const P=new mr("pre",{"data-language":M.language},[new mr("code",{"data-language":M.language},[M.content])]);return new mr("meta",{"data-field":"source-panel","data-label":M.label,...M.origin?{"data-origin":M.origin}:{}},[P])}),$=[b,w,S,...C?[C]:[],x,k,_,A,...y?[y]:[],...E?[E]:[],...T];return Ie({rune:"sandbox",tag:"div",properties:{content:b,framework:w,dependencies:S,...C?{label:C}:{},height:x,context:k,securityMode:_,allowJs:A,...y?{sandboxOrigin:y}:{}},children:$})}}),{Tag:Op}=z;function r8(n,e){const t=n.match(/^<svg\s([^>]*)>/);if(!t)return new Op("span",{class:"rf-icon","data-icon":e});const i={...y0(t[1]),class:"rf-icon","data-icon":e},s=[],o=["path","circle","line","polyline","rect","polygon","ellipse"],a=new RegExp(`<(${o.join("|")})\\s([^>]*?)\\s*/?>`,"g");let l;for(;(l=a.exec(n))!==null;){const c=l[1],u=y0(l[2]);s.push(new Op(c,u))}return new Op("svg",i,s)}function y0(n){const e={},t=/([\w-]+)="([^"]*)"/g;let r;for(;(r=t.exec(n))!==null;)e[r[1]]=r[2];return e}const{Tag:i8}=z,s8={selfClosing:!0,attributes:{name:{type:String,required:!0,description:'Icon name, optionally prefixed with group (e.g., "rocket" or "hint/warning")'},size:{type:String,required:!1,description:"CSS size override for the icon"}},transform(n,e){const t=n.attributes.name,r=n.attributes.size;let i="global",s=t;const o=t.indexOf("/");o!==-1&&(i=t.substring(0,o),s=t.substring(o+1));const l=e.variables?.__icons?.[i]?.[s];if(l){const u=r8(l,t);return r&&(u.attributes.width=r,u.attributes.height=r),u}const c={class:"rf-icon","data-icon":t};return r&&(c.style=`width:${r};height:${r}`),new i8("span",c)}},{Tag:w0}=z,o8=["left","center","right"],a8=["default","accent","editorial"],l8=He({attributes:{align:{type:String,required:!1,matches:o8.slice(),description:"Text alignment of the quote"},variant:{type:String,required:!1,matches:a8.slice(),description:"Visual style of the quote block"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new ze(z.transform(dt(n.body),t)),i=new w0("meta",{content:e.align??"center"}),s=new w0("meta",{content:e.variant??"default"}),o=r.tag("blockquote"),l=[...o.count()>0?o.limit(1).toArray():r.tag("p").toArray(),i,s];return Ie({rune:"pull-quote",tag:"blockquote",properties:{align:i,variant:s},children:l})}}),{Tag:Iu}=z,c8=["left","center","right","justify"],u8=He({attributes:{dropcap:{type:Boolean,required:!1,description:"Style the first letter as a large drop cap"},columns:{type:Number,required:!1,description:"Number of text columns"},lead:{type:Boolean,required:!1,description:"Style the first paragraph as a lead"},align:{type:String,required:!1,matches:c8.slice(),description:"Text alignment"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new ze(z.transform(dt(n.body),t)),i=e.dropcap??!1,s=e.columns??1,o=e.lead??!1,a=e.align??"left",l=i?new Iu("meta",{content:"dropcap"}):void 0,c=s>1?new Iu("meta",{content:String(s)}):void 0,u=o?new Iu("meta",{content:"lead"}):void 0,f=a!=="left"?new Iu("meta",{content:a}):void 0,d=r.wrap("div"),h=[];return l&&h.push(l),c&&h.push(c),u&&h.push(u),f&&h.push(f),h.push(d.next()),Ie({rune:"text-block",tag:"div",properties:{...l?{dropcap:l}:{},...c?{columns:c}:{},...u?{lead:u}:{},...f?{align:f}:{}},refs:{body:d.tag("div")},children:h})}}),{Tag:Cl}=z,f8=["left","right"],d8=["1:2","1:1","2:1"],h8=He({attributes:{align:{type:String,required:!1,matches:f8.slice(),description:"Side the media appears on"},ratio:{type:String,required:!1,matches:d8.slice(),description:"Width ratio between media and text"},wrap:{type:Boolean,required:!1,description:"Wrap text around the media"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new ze(z.transform(dt(n.body),t)),i=e.align??"left",s=e.ratio??"1:1",o=e.wrap??!1,a=new Cl("meta",{content:i}),l=new Cl("meta",{content:s}),c=o?new Cl("meta",{content:"true"}):void 0,u=[],f=[];for(const p of r.toArray())z.Tag.isTag(p)&&p.name==="p"&&p.children.length===1&&z.Tag.isTag(p.children[0])&&p.children[0].name==="img"?u.push(p.children[0]):z.Tag.isTag(p)&&p.name==="img"?u.push(p):f.push(p);const d=new Cl("div",{},u),h=new Cl("div",{},f),g=[a,l];return c&&g.push(c),g.push(d,h),Ie({rune:"media-text",tag:"div",properties:{align:a,ratio:l,...c?{wrap:c}:{}},refs:{media:d,body:h},children:g})}}),{Tag:ta}=z,p8=["background","surface","primary","secondary","accent","border"],m8=/^\s*(\w+)\s*:\s*(.+)\s*$/;function _0(n){const e=[];for(const t of n.walk())t.type==="text"&&t.attributes.content&&e.push(t.attributes.content);return e.join(" ").trim()}function g8(n){const e={},t={};let r="light";for(const i of n){if(i.type==="heading"){const s=_0(i).toLowerCase();s==="dark"?r="dark":s==="light"&&(r="light");continue}if(i.type==="list")for(const s of i.children){const a=_0(s).match(m8);if(a){const l=a[1].toLowerCase(),c=a[2].trim();p8.includes(l)&&(r==="dark"?t[l]=c:e[l]=c)}}}return{light:e,dark:t}}const O8={attributes:{preset:{type:String,required:!1,description:"Named tint preset from the theme"},mode:{type:String,required:!1,matches:["auto","dark","light"],description:"Whether the tint adapts to auto, dark, or light mode"}},transform(n,e){const t=n.transformAttributes(e).preset,r=n.transformAttributes(e).mode,{light:i,dark:s}=g8(n.children),o=[];t?o.push(new ta("meta",{"data-field":"tint",content:t})):(Object.keys(i).length>0||Object.keys(s).length>0)&&o.push(new ta("meta",{"data-field":"tint",content:"custom"})),r&&r!=="auto"&&o.push(new ta("meta",{"data-field":"tint-mode",content:r}));for(const[a,l]of Object.entries(i))o.push(new ta("meta",{"data-field":`tint-${a}`,content:l}));for(const[a,l]of Object.entries(s))o.push(new ta("meta",{"data-field":`tint-dark-${a}`,content:l}));return new ta("div",{"data-tint-source":!0},o)}},{Tag:na}=z,v8=["none","soft","hard","elevated"],b8=["none","top","bottom","both","end","bottom-end","top-end"],y8=He({attributes:{shadow:{type:String,required:!1,matches:v8.slice(),description:"Shadow style around the showcase content"},bleed:{type:String,required:!1,matches:b8.slice(),description:"Direction content extends beyond its container"},offset:{type:String,required:!1,description:"CSS offset from the container edge"},aspect:{type:String,required:!1,description:"Aspect ratio of the showcase area"},place:{type:String,required:!1,matches:["left","center","right","top","bottom","top left","top center","top right","bottom left","bottom center","bottom right"],description:"Position of content within the showcase area"}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=new ze(z.transform(dt(n.body),t)),i=e.shadow??"none",s=e.bleed??"none",o=e.offset??"",a=e.aspect??"",l=e.place??"",c={},u=[];if(i&&i!=="none"){const d=new na("meta",{content:i});c.shadow=d,u.push(d)}if(s&&s!=="none"){const d=new na("meta",{content:s});c.bleed=d,u.push(d)}if(o){const d=new na("meta",{content:o});c.offset=d,u.push(d)}if(a){const d=new na("meta",{content:a});c.aspect=d,u.push(d)}if(l){const d=new na("meta",{content:l});c.place=d,u.push(d)}const f=new na("div",{},r.toArray());return u.push(f),Ie({rune:"showcase",tag:"div",properties:c,refs:{viewport:f},children:u})}}),{Tag:Mi}=z,w8={attributes:{preset:{type:String,required:!1,description:"Named background preset from the theme"},src:{type:String,required:!1,description:"URL of the background image"},video:{type:String,required:!1,description:"URL of a background video"},overlay:{type:String,required:!1,description:"Color overlay applied on top of the background"},blur:{type:String,required:!1,matches:["none","sm","md","lg"],description:"Blur intensity applied to the background"},position:{type:String,required:!1,description:"CSS background-position value"},fit:{type:String,required:!1,matches:["cover","contain"],description:"How the background image fills its container"},opacity:{type:String,required:!1,description:"Opacity of the background layer (0 to 1)"},fixed:{type:Boolean,required:!1,description:"Fix the background so it stays in place while scrolling"}},transform(n,e){const t=n.transformAttributes(e),r=[];return t.preset&&r.push(new Mi("meta",{"data-field":"bg-preset",content:t.preset})),t.src&&r.push(new Mi("meta",{"data-field":"bg-src",content:t.src})),t.video&&r.push(new Mi("meta",{"data-field":"bg-video",content:t.video})),t.overlay&&t.overlay!=="none"&&r.push(new Mi("meta",{"data-field":"bg-overlay",content:t.overlay})),t.blur&&t.blur!=="none"&&r.push(new Mi("meta",{"data-field":"bg-blur",content:t.blur})),t.position&&t.position!=="center"&&r.push(new Mi("meta",{"data-field":"bg-position",content:t.position})),t.fit&&t.fit!=="cover"&&r.push(new Mi("meta",{"data-field":"bg-fit",content:t.fit})),t.opacity&&t.opacity!=="1"&&r.push(new Mi("meta",{"data-field":"bg-opacity",content:t.opacity})),t.fixed&&r.push(new Mi("meta",{"data-field":"bg-fixed",content:"true"})),new Mi("div",{"data-bg-source":!0},r)}},{Tag:ra}=z,_8=["date-desc","date-asc","title-asc","title-desc"],k8=["list","grid","compact"],x8=He({attributes:{folder:{type:String,required:!0,description:'Content folder path to list blog posts from (e.g. "/blog")'},sort:{type:String,required:!1,default:"date-desc",matches:_8.slice(),description:"Sort order: date-desc, date-asc, title-asc, title-desc"},filter:{type:String,required:!1,default:"",description:'Filter expression to match against frontmatter fields (e.g. "tag:javascript" or "draft:false")'},limit:{type:Number,required:!1,description:"Maximum number of posts to display"},layout:{type:String,required:!1,default:"list",matches:k8.slice(),description:"Display layout: list, grid, or compact"}},contentModel:{type:"sequence",fields:[{name:"headline",match:"heading",optional:!0},{name:"blurb",match:"paragraph",optional:!0}]},transform(n,e,t){const r=[n.headline,n.blurb].filter(Boolean),i=new ze(z.transform(r,t)),s=new ra("meta",{content:e.folder}),o=new ra("meta",{content:e.sort||"date-desc"}),a=new ra("meta",{content:e.filter||""}),l=new ra("meta",{content:e.limit!=null?String(e.limit):""}),c=new ra("meta",{content:e.layout||"list"}),u=new ra("div",{},[]),f=Kc(i),d=i.count()>0?[i.wrap("header").next()]:[],h=[s,o,a,l,c,...d,u];return Ie({rune:"blog",schemaOrgType:"Blog",tag:"section",property:"contentSection",properties:{folder:s,sort:o,filter:a,limit:l,layout:c},refs:{...f,posts:u},children:h})}}),{Tag:S8}=z,wv="xref",A8={selfClosing:!0,inline:!0,attributes:{primary:{type:String,required:!0,description:"Entity ID or name to resolve"},label:{type:String,required:!1,description:"Custom link text (defaults to entity title)"},type:{type:String,required:!1,description:"Entity type hint for disambiguation"},preview:{type:String,required:!1,matches:["drawer"],description:"Preview target. `\"drawer\"` hoists a drawer containing the entity's expanded content + a link to its resolved page URL in the chrome footer, leaving an inline link at the call site that opens it. Absent → today's behaviour (just the inline link). SPEC-078."}},transform(n,e){const t=n.attributes.primary,r=n.attributes.label,i=n.attributes.type,s=n.attributes.preview,o={"data-rune":wv,"data-xref-id":t};return r&&(o["data-xref-label"]=r),i&&(o["data-xref-type"]=i),s&&(o["data-xref-preview"]=s),new S8("span",o,[r||t])}},{Tag:C8}=z,_v="expand-pending",T8={selfClosing:!0,attributes:{primary:{type:String,required:!0,description:"Entity ID or name to substitute inline. Same lookup chain as xref."},level:{type:Number,required:!1,description:"Optional heading-demotion opt-in. When set, embedded headings shift by `N - 1` and the embed joins the host outline instead of staying TOC-isolated."},type:{type:String,required:!1,description:"Entity type hint for disambiguation when the same ID/name lives in multiple registries."},canonical:{type:Boolean,required:!1,description:`When true, append a visible "View canonical" link pointing at the entity's canonical URL.`},label:{type:String,required:!1,description:"Custom label for the canonical link (only meaningful when `canonical=true`)."}},transform(n,e){const t=n.attributes.primary,r=n.attributes.level,i=n.attributes.type,s=n.attributes.canonical===!0,o=n.attributes.label,a={"data-rune":_v,"data-expand-id":t};return typeof r=="number"&&(a["data-expand-level"]=String(r)),i&&(a["data-expand-type"]=i),s&&(a["data-expand-canonical"]="true"),o&&(a["data-expand-label"]=o),new C8("div",a,[])}},{Ast:lY}=z,P8="__deferred-body";function kv(n){const e=n[P8];return typeof e=="string"&&e.length>0?e:void 0}function xv(n,e,t){const r=z.parse(n),i={...e??{},variables:{...e?.variables??{},...t}},s=z.transform(r,i);return z.Tag.isTag(s)&&s.name==="article"&&!s.attributes?.class&&!s.attributes?.["data-rune"]?s.children:s}const{Tag:k0}=z,zA="__collection-sentinel",E8=He({attributes:{type:{type:String,required:!1,default:"",description:"Entity type(s), comma-separated."},filter:{type:String,required:!1,default:"",description:"field:value clauses (SPEC-070 grammar)."},sort:{type:String,required:!1,default:"",description:"Sort field (prefix - for descending)."},group:{type:String,required:!1,default:"",description:"Group-by field."},limit:{type:String,required:!1,default:"",description:"Max items."},show:{type:String,required:!1,default:"",description:"Alias for type (entity types to include)."},fields:{type:String,required:!1,default:"",description:"Comma-separated data fields to project."},layout:{type:String,required:!1,default:"list",description:"Arrangement: list (stacked) | grid (multi-column) | table (aligned columns). Item chrome comes from the item — the no-body built-in, or a rune like {% card %} in the body template."},"group-display":{type:String,required:!1,default:"headings",matches:["headings","accordion"],description:"How groups are presented when `group` is set: headings (default) or accordion (collapsible native <details> panels, styled like the accordion rune, with a per-group count)."},empty:{type:String,required:!1,default:"",description:"Fallback text shown when the query yields nothing (no-body form; body-template form uses a fallback zone). Absent → render nothing."}},deferBody:!0,contentModel:{type:"sequence",fields:[]},transform(n,e){const t=(o,a)=>new k0("meta",{"data-field":o,content:a}),r=kv(e)??"",i=[t("collection-type",String(e.type??e.show??"")),t("collection-filter",String(e.filter??"")),t("collection-sort",String(e.sort??"")),t("collection-group",String(e.group??"")),t("collection-limit",String(e.limit??"")),t("collection-fields",String(e.fields??"")),t("collection-layout",String(e.layout??"list")),t("collection-group-display",String(e["group-display"]??"headings")),t("collection-empty",String(e.empty??"")),t(zA,"true")];r&&i.push(t("collection-body",r));const s=new k0("div",{"data-name":"items"},[]);return Ie({rune:"collection",tag:"section",properties:{},refs:{items:s},children:[...i,s]})}}),{Tag:x0}=z,ZA="__relationships-sentinel",$8=He({attributes:{of:{type:String,required:!1,default:"",description:"Entity to describe — an id (e.g. `of=$item.id`) or a bound entity."},kind:{type:String,required:!1,default:"",description:'Edge kinds to include, comma-separated (e.g. "blocks,blocked-by").'},type:{type:String,required:!1,default:"",description:"Restrict related entity types, comma-separated."},group:{type:String,required:!1,default:"kind",description:"Group-by: kind (default) | type | none."},"group-display":{type:String,required:!1,default:"headings",matches:["headings","accordion"],description:"How groups are presented: headings (default) or accordion (collapsible native <details> panels, styled like the accordion rune, with a per-group count)."},sort:{type:String,required:!1,default:"",description:"Sort related entities by a field (prefix - for descending)."},limit:{type:String,required:!1,default:"",description:"Max edges."},fields:{type:String,required:!1,default:"",description:"Comma-separated data fields to project in the no-body built-in."},layout:{type:String,required:!1,default:"list",description:"Arrangement: list (stacked) | grid (multi-column). Item chrome comes from the item — the no-body built-in, or a rune like {% card %} in the body template."},empty:{type:String,required:!1,default:"",description:"Fallback text shown when there are no edges (no-body form; body form uses a fallback zone). Absent → render nothing."}},deferBody:!0,contentModel:{type:"sequence",fields:[]},transform(n,e){const t=(l,c)=>new x0("meta",{"data-field":l,content:c}),r=kv(e)??"",i=e.of,s=String(i&&typeof i=="object"?i.id??"":i??""),o=[t("relationships-of",s),t("relationships-kind",String(e.kind??"")),t("relationships-type",String(e.type??"")),t("relationships-group",String(e.group??"kind")),t("relationships-group-display",String(e["group-display"]??"headings")),t("relationships-sort",String(e.sort??"")),t("relationships-limit",String(e.limit??"")),t("relationships-fields",String(e.fields??"")),t("relationships-layout",String(e.layout??"list")),t("relationships-empty",String(e.empty??"")),t(ZA,"true")];r&&o.push(t("relationships-body",r));const a=new x0("div",{"data-name":"items"},[]);return Ie({rune:"relationships",tag:"section",properties:{},refs:{items:a},children:[...o,a]})}}),{Tag:Q8}=z,XA="__aggregate-sentinel",L8=He({attributes:{type:{type:String,required:!1,default:"",description:"Entity type(s), comma-separated."},filter:{type:String,required:!1,default:"",description:"field:value clauses defining the primary set being measured (SPEC-070 grammar)."},value:{type:String,required:!1,default:"",description:'Optional secondary field:value clause defining the achieved subset within `filter` (e.g. value="status:done"). When set, $item.value is the count matching both; $item.percent is the ratio. Without it, the rune is a pure count + breakdown — no progress-bar semantics.'},group:{type:String,required:!1,default:"",description:"Group-by field; omit to render the body once with totals."},sort:{type:String,required:!1,default:"",description:"Sort groups by `key`, `count`, `value`, or `percent` (prefix `-` for descending). Honors SPEC-072 domain-aware ordering when the group field has one."},limit:{type:String,required:!1,default:"",description:"Cap the number of groups (after sort)."},empty:{type:String,required:!1,default:"",description:"Fallback text shown when the query matches no entities (self-closing form; body form uses a fallback zone). Absent → render nothing."}},deferBody:!0,contentModel:{type:"sequence",fields:[]},transform(n,e){const t=(o,a)=>new Q8("meta",{"data-field":o,content:a}),r=kv(e)??"",i=r.length>0,s=[t("aggregate-type",String(e.type??"")),t("aggregate-filter",String(e.filter??"")),t("aggregate-value",String(e.value??"")),t("aggregate-group",String(e.group??"")),t("aggregate-sort",String(e.sort??"")),t("aggregate-limit",String(e.limit??"")),t("aggregate-empty",String(e.empty??"")),t(XA,"true")];return r&&s.push(t("aggregate-body",r)),Ie({rune:"aggregate",tag:i?"section":"span",properties:{},children:s})}}),{Tag:S0}=z,FA="__file-ref-sentinel",M8=He({attributes:{path:{type:String,required:!0,description:"Project-root-relative file path. Same sandbox as snippet — absolute paths, traversal escapes, and out-of-root symlinks are rejected."},lines:{type:String,required:!1,description:'Line range. `"42-58"` (range), `"42"` (single line). Drives both the GitHub anchor (#L42-L58) and the drawer-body snippet slice when `preview="drawer"`.'},label:{type:String,required:!1,description:"Display text for the inline link. Defaults to the filename (e.g. `token-contract.ts`). Pass an explicit label when the file-ref refers to a symbol within the file rather than the file itself."},preview:{type:String,required:!1,matches:["drawer"],description:'Preview target. `"drawer"` hoists a drawer with the file\'s snippet + a GitHub footer link, leaving an inline link at the call site that opens it. Absent → no preview, just the inline link.'}},selfClosing:!0,contentModel:{type:"sequence",fields:[]},transform(n,e){const t=String(e.path??""),r=e.lines!==void 0?String(e.lines):"",i=e.label!==void 0?String(e.label):"",s=e.preview!==void 0?String(e.preview):"",o=D8(t),a=(u,f)=>new S0("meta",{"data-field":u,content:f}),l=[a("file-ref-path",t),a("file-ref-lines",r),a("file-ref-label",i),a("file-ref-preview",s),a(FA,"true")],c=new S0("a",{},[i||o]);return Ie({rune:"file-ref",tag:"span",properties:{},refs:{link:c},children:[...l,c]})}});function D8(n){if(!n)return"";const e=n.endsWith("/")?n.slice(0,-1):n,t=e.lastIndexOf("/");return t>=0?e.slice(t+1):e}const{Tag:ii}=z,q8=/^h([1-6])$/;function R8(n,e){const t=n.attributes?.[e];return typeof t=="string"?t:void 0}function vp(n,e){for(const t of n.children??[]){if(!ii.isTag(t))continue;const r=t;if(r.name!=="meta"||r.attributes?.["data-field"]!==e)continue;const i=r.attributes?.content;return typeof i=="string"?i:void 0}}function I8(n,e,t){for(const r of n){const i=[],s=new Set;ng(r.renderable,o=>{const a=R8(o,"data-drawer-id");if(!a){t.error("drawer rune is missing required `id` attribute",r.url);return}s.has(a)&&t.warn(`drawer id="${a}" is declared more than once on this page — last declaration wins`,r.url),s.add(a),i.push({id:a,title:N8(o),side:vp(o,"side")??"right",size:vp(o,"size")??"md",shortcut:vp(o,"shortcut")})});for(const o of i)e.register({type:"drawer",id:o.id,scope:"page",sourceUrl:`${r.url}#drawer-${o.id}`,data:{title:o.title,side:o.side,size:o.size,shortcut:o.shortcut}})}}function ng(n,e){if(Array.isArray(n)){for(const r of n)ng(r,e);return}if(!ii.isTag(n))return;const t=n;if(t.attributes?.["data-rune"]==="drawer"){e(t);return}if(t.children)for(const r of t.children)ng(r,e)}function N8(n){const e=VA(n,"title");if(!e)return;const t=rg(e);return t.length>0?t:void 0}function VA(n,e){if(n.attributes?.["data-name"]===e)return n;for(const t of n.children??[])if(ii.isTag(t)){const r=VA(t,e);if(r)return r}}function rg(n){return typeof n=="string"?n:Array.isArray(n)?n.map(rg).join(""):ii.isTag(n)?(n.children??[]).map(rg).join(""):""}function B8(n){const e={lastHeadingLevel:0,mutated:!1},t=ig(n,e);return e.mutated?t:n}function ig(n,e){if(typeof n=="string"||typeof n=="number"||n==null)return n;if(Array.isArray(n)){let a=!1;const l=n.map(c=>{const u=ig(c,e);return u!==c&&(a=!0),u});return a?l:n}if(!ii.isTag(n))return n;const t=n,r=q8.exec(t.name);if(t.attributes?.[Jm]==="true"){const a=e.lastHeadingLevel===0?1:e.lastHeadingLevel,l=Math.min(6,Math.max(1,a+1));e.mutated=!0;const c={...t.attributes};return delete c[Jm],new ii(`h${l}`,c,t.children)}if(r&&(e.lastHeadingLevel=Number(r[1])),!t.children||t.children.length===0)return t;let s=!1;const o=t.children.map(a=>{const l=ig(a,e);return l!==a&&(s=!0),l});return s?new ii(t.name,t.attributes,o):t}const Sv="hoist-drawer",WA=new Map;function YA(n,e){WA.set(n,e)}function j8(n){const e={},t=n.attributes;if(!t)return e;for(const[r,i]of Object.entries(t))r.startsWith("data-")&&typeof i=="string"&&(e[r.slice(5)]=i);return e}function z8(n,e,t,r,i){const s=Z8(n),o=new Map,l={payloads:o,seenIds:new Set,authorIds:s,drawerDepth:0,pageUrl:e,ctx:i,mutated:!1},c=sg(n,l);if(o.size===0)return l.mutated?c:n;const u={pageUrl:e,registry:t,projectRoot:r,ctx:i},f=[];for(const d of o.values()){const h=d.source;if(!h){i.warn(`hoist drawer payload is missing required \`source\` attribute (target-id=${d["target-id"]??"?"})`,e);continue}const g=WA.get(h);if(!g){i.warn(`hoist drawer source "${h}" has no registered builder — skipping target-id=${d["target-id"]??"?"}`,e);continue}const p=g(d,u);p&&f.push(p)}if(f.length===0)return c;if(Array.isArray(c))return[...c,...f];if(ii.isTag(c)){const d=c;return new ii(d.name,d.attributes,[...d.children??[],...f])}return[c,...f]}function Z8(n){const e=new Set,t=r=>{if(Array.isArray(r)){for(const s of r)t(s);return}if(!ii.isTag(r))return;const i=r;if(i.attributes?.["data-rune"]==="drawer"){const s=i.attributes?.["data-drawer-id"];typeof s=="string"&&e.add(s);return}for(const s of i.children??[])t(s)};return t(n),e}function sg(n,e){if(Array.isArray(n)){let o=!1;const a=[];for(const l of n){const c=sg(l,e);c!==l&&(o=!0),c!==Tl&&a.push(c)}return o?(e.mutated=!0,a):n}if(!ii.isTag(n))return n;const t=n;if(t.name==="meta"&&t.attributes?.["data-field"]===Sv){const o=j8(t),a=o["target-id"];return a?e.authorIds.has(a)?(e.ctx.info(`Hoist preview "${a}" (source=${o.source??"?"}) collides with an author-declared {% drawer id="${a}" %} on this page — author drawer wins, hoist defers.`,e.pageUrl),Tl):(e.drawerDepth>0&&e.ctx.info(`Hoist preview "${a}" (source=${o.source??"?"}) appears inside another drawer's body — nested previews stack on modern browsers, consider not nesting.`,e.pageUrl),e.seenIds.has(a)||(e.payloads.set(a,o),e.seenIds.add(a)),Tl):(e.ctx.warn("hoist drawer sentinel is missing required `data-target-id` attribute",e.pageUrl),Tl)}const r=t.attributes?.["data-rune"]==="drawer";if(r&&e.drawerDepth++,!t.children||t.children.length===0)return r&&e.drawerDepth--,t;let i=!1;const s=[];for(const o of t.children){const a=sg(o,e);a!==o&&(i=!0),a!==Tl&&s.push(a)}return r&&e.drawerDepth--,i?(e.mutated=!0,new ii(t.name,t.attributes,s)):t}const Tl=Symbol("hoist-strip");function X8(n,e){const t=n.toLowerCase().replace(/[^a-z0-9.]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");if(!e)return t;const r=e.trim(),i=r.indexOf("-");if(i<0)return`${t}-L${r}`;const s=r.slice(0,i).trim(),o=r.slice(i+1).trim();return o?`${t}-L${s}-L${o}`:`${t}-L${s}`}function F8(n){return n.split(void 0).join("/")}function UA(n,e){if(typeof n!="string"||n.length===0)throw new Jn("snippet `path` attribute is required");(void 0)(n);const r=(void 0)((void 0)(e,n)),i=e.endsWith(void 0)?e:e+void 0;if(!r.startsWith(i)&&r!==e)throw new Jn(`snippet path "${n}" escapes the project root after normalization`);try{const s=(void 0)(r);if(!s.startsWith(i)&&s!==e)throw new Jn(`snippet path "${n}" resolves through a symlink that escapes the project root`)}catch(s){if(s.code!=="ENOENT")throw s}return r}function V8(n){if(n==null||n==="")return null;if(typeof n!="string")throw new Jn(`snippet \`lines\` attribute must be a string, got ${typeof n}`);const e=n.trim();if(e.length===0)return null;if(/^\d+$/.test(e)){const a=Number(e);if(!Number.isFinite(a)||a<1)throw new Jn(`snippet \`lines\` value "${n}" is not a positive integer`);return{start:a,end:a}}const t=/^(\d*)-(\d*)$/.exec(e);if(!t)throw new Jn(`snippet \`lines\` value "${n}" is malformed; expected "N", "N-M", "N-", or "-M"`);const r=t[1],i=t[2],s=r.length>0?Number(r):void 0,o=i.length>0?Number(i):void 0;if(s!==void 0&&(!Number.isFinite(s)||s<1))throw new Jn(`snippet \`lines\` start "${r}" is not a positive integer`);if(o!==void 0&&(!Number.isFinite(o)||o<1))throw new Jn(`snippet \`lines\` end "${i}" is not a positive integer`);if(s!==void 0&&o!==void 0&&o<s)throw new Jn(`snippet \`lines\` value "${n}" is inverted (end before start)`);return{start:s,end:o}}function W8(n,e){if(e===null)return{sliced:n,warnings:[]};const t=n.split(`
326
- `),r=t.length,i=e.start??1;let s=e.end??r;const o=[];if(i>r)throw new Jn(`snippet \`lines\` start ${i} is past end of file (${r} lines)`);return s>r&&(o.push(`snippet \`lines\` end ${s} exceeds file length; clamped to ${r}`),s=r),{sliced:t.slice(i-1,s).join(`
327
- `),warnings:o}}function GA(n){const e=UA(n.pathAttr,n.projectRoot);let t;try{t=(void 0)(e)}catch{const l=n.referencingPage?`
328
-
329
- Referenced from: ${n.referencingPage}`:"";throw new Jn(`snippet path "${n.pathAttr}" cannot be resolved.
330
-
331
- Resolved to: ${e}
332
- Reason: file not found${l}`)}if(!t.isFile())throw new Jn(`snippet path "${n.pathAttr}" must be a file (got ${t.isDirectory()?"directory":"other"})`);const r=(void 0)(e,"utf-8"),i=V8(n.lines),{sliced:s,warnings:o}=W8(r,i),a=F8((void 0)(n.projectRoot,e));return{content:s,absolutePath:e,relativePath:a,warnings:o}}function Y8(n){if(!(void 0)(UA(n.relativePath,n.projectRoot)))throw new Jn(`source file "${n.relativePath}" does not exist`)}class Jn extends Error{constructor(e){super(e),this.name="SnippetSandboxError"}}const U8=Object.freeze({".ts":"typescript",".tsx":"typescript",".js":"javascript",".jsx":"javascript",".mjs":"javascript",".cjs":"javascript",".svelte":"svelte",".vue":"vue",".md":"markdoc",".markdoc":"markdoc",".json":"json",".jsonc":"jsonc",".html":"html",".css":"css",".yml":"yaml",".yaml":"yaml",".toml":"toml",".sh":"bash",".bash":"bash"}),A0="text";function HA(n){if(typeof n!="string"||n.length===0)return A0;let e;const t=Math.max(n.lastIndexOf("/"),n.lastIndexOf("\\")),r=t>=0?n.slice(t+1):n,i=r.lastIndexOf(".");return i===-1?e="."+r.toLowerCase():i===0?e=r.toLowerCase():e=r.slice(i).toLowerCase(),U8[e]??A0}const{Tag:rr}=z;function Av(n){return rr.isTag(n)}function Nu(n,e){for(const t of n.children??[])if(Av(t)&&t.name==="meta"&&t.attributes["data-field"]===e)return String(t.attributes.content??"");return""}function G8(n){return(n.children??[]).some(e=>Av(e)&&e.name==="meta"&&e.attributes["data-field"]===FA)}function H8(n){return{path:Nu(n,"file-ref-path"),lines:Nu(n,"file-ref-lines"),label:Nu(n,"file-ref-label"),preview:Nu(n,"file-ref-preview")}}function KA(n){if(!n)return"";const e=n.endsWith("/")?n.slice(0,-1):n,t=e.lastIndexOf("/");return t>=0?e.slice(t+1):e}function K8(n,e,t,r,i){const s={value:!1},o=a=>{if(Array.isArray(a)){let f=!1;const d=a.map(h=>{const g=o(h);return g!==h&&(f=!0),g});return f?d:a}if(!Av(a))return a;const l=a;if(l.attributes?.["data-rune"]==="file-ref"&&G8(l))return J8(l,e,t,r,i,s);if(!l.children||l.children.length===0)return l;let c=!1;const u=l.children.map(f=>{const d=o(f);return d!==f&&(c=!0),d});return c?new rr(l.name,l.attributes,u):l};return o(n)}function J8(n,e,t,r,i,s){const o=H8(n),a=o.label||KA(o.path)||o.path,l=X8(o.path,o.lines),c=o.preview==="drawer",u=Dj(t,r,o.path,o.lines);!u&&!s.value&&(i.warn(`file-ref on this page has no GitHub URL — site config is missing \`repoUrl\` (path="${o.path}"). Configure \`SiteConfig.repoUrl\` to render canonical "View source" links.`,e),s.value=!0);const f={};c?(f.href=`#drawer-${l}`,f["aria-controls"]=`drawer-${l}`,f["aria-expanded"]="false",f["data-target-type"]="drawer"):u&&(f.href=u);const h=[new rr("a",f,[a])];if(c){const g=new rr("meta",{"data-field":Sv,"data-source":"file-ref","data-target-id":l,"data-title":a,"data-path":o.path,"data-lines":o.lines,"data-github-url":u??""});h.push(g)}return new rr(n.name,n.attributes,h)}function ez(n,e){const t=n.path,r=n.lines,i=n.title||KA(t),s=n["target-id"],o=n["github-url"];if(!t||!s)return e.ctx.warn("file-ref hoist payload missing required path or target-id",e.pageUrl),null;if(!e.projectRoot)return e.ctx.error(`file-ref hoist for "${t}" requires a project root in the pipeline; none was threaded through. Drawer body will be empty.`,e.pageUrl),null;let a="",l="text";try{const _=GA({pathAttr:t,projectRoot:e.projectRoot,lines:r||void 0,referencingPage:e.pageUrl});a=_.content,l=HA(_.relativePath);for(const A of _.warnings)e.ctx.warn(`file-ref ${t}: ${A}`,e.pageUrl)}catch(_){const A=_ instanceof Jn?_.message:`file-ref ${t}: ${_ instanceof Error?_.message:String(_)}`;return e.ctx.error(A,e.pageUrl),null}const c=new rr("pre",{"data-language":l,"data-codeblock":"true"},[new rr("code",{"data-language":l,"data-codeblock":"true"},[a])]),u=new rr("figure",{class:"rf-snippet","data-rune":"snippet","data-source-path":t,...r?{"data-lines":r}:{}},[c]),f=new rr("div",{"data-name":"body",class:"rf-drawer__body"},[u]),d=new rr("h3",{"data-name":"title",class:"rf-drawer__title"},[i]),h=new rr("button",{type:"button","aria-label":"Close",hidden:!0,"data-name":"close",class:"rf-drawer__close"},["×"]),g=new rr("header",{"data-name":"header",class:"rf-drawer__header"},[d,h]),p=[];o&&p.push(new rr("a",{href:o,rel:"external noopener",target:"_blank"},["View source on GitHub →"]));const O=p.length>0?new rr("footer",{"data-name":"footer",class:"rf-drawer__footer"},p):null,v=[g,f];return O&&v.push(O),new rr("section",{id:`drawer-${s}`,class:"rf-drawer","data-rune":"drawer","data-drawer-id":s,"data-side":"right","data-size":"md"},v)}YA("file-ref",ez);const{Tag:Wr}=z;function tz(n){return Wr.isTag(n)}function nz(n,e,t,r){const i=s=>{if(Array.isArray(s)){let c=!1;const u=[];for(const f of s){const d=i(f);d!==f&&(c=!0),Array.isArray(d)?u.push(...d):u.push(d)}return c?u:s}if(!tz(s))return s;const o=s;if(o.attributes?.["data-rune"]===wv&&o.attributes?.["data-xref-preview"]==="drawer")return rz(o,t,r,e);if(!o.children||o.children.length===0)return o;let a=!1;const l=[];for(const c of o.children){const u=i(c);u!==c&&(a=!0),Array.isArray(u)?l.push(...u):l.push(u)}return a?new Wr(o.name,o.attributes,l):o};return i(n)}function rz(n,e,t,r){const i=n.attributes,s=String(i["data-xref-id"]??""),o=i["data-xref-label"];if(!s)return t.warn(`xref preview placeholder on ${r} has no entity id`,r),[n];const a=e?JA(e,s):void 0,l=o||(a?C0(a):s),c=a?C0(a):s,u=s,f=new Wr("a",{class:"rf-xref",href:`#drawer-${u}`,"aria-controls":`drawer-${u}`,"aria-expanded":"false","data-target-type":"drawer","data-xref-id":s},[l]),d=new Wr("meta",{"data-field":Sv,"data-source":"xref","data-target-id":u,"data-title":c,"data-entity-id":s});return[f,d]}function JA(n,e){const t=n.getTypes?.()??[];for(const r of t){const i=n.getById(r,e);if(i)return i}}function C0(n){const e=n.data;return String(e.title??e.name??n.id)}function iz(n,e){const t=n["entity-id"]||n["target-id"],r=n["target-id"],i=n.title||t;if(!t||!r)return e.ctx.warn("xref hoist payload missing required entity-id or target-id",e.pageUrl),null;const s=e.registry?JA(e.registry,t):void 0,o=new Wr("h3",{"data-name":"title",class:"rf-drawer__title"},[i]),a=new Wr("button",{type:"button","aria-label":"Close",hidden:!0,"data-name":"close",class:"rf-drawer__close"},["×"]),l=new Wr("header",{"data-name":"header",class:"rf-drawer__header"},[o,a]),u=[new Wr("div",{"data-rune":_v,"data-expand-id":t},[])],f=new Wr("div",{"data-name":"body",class:"rf-drawer__body"},u),d=s?.sourceUrl??"",h=d?new Wr("footer",{"data-name":"footer",class:"rf-drawer__footer"},[new Wr("a",{href:d},["View full page →"])]):null,g=[l,f];return h&&g.push(h),new Wr("section",{id:`drawer-${r}`,class:"rf-drawer","data-rune":"drawer","data-drawer-id":r,"data-side":"right","data-size":"md"},g)}YA("xref",iz);const{Tag:Pl}=z,sz=["fraction","percent","none"],oz=["positive","caution","negative"];function og(n){return typeof n=="string"?n:Array.isArray(n)?n.map(og).join(""):z.Tag.isTag(n)?og(n.children??[]):""}const az=He({attributes:{value:{type:Number,required:!1,description:"Completed amount (paired with `max`)."},max:{type:Number,required:!1,description:"Total amount (paired with `value`)."},percent:{type:Number,required:!1,description:"Direct percentage 0–100, when there is no count."},display:{type:String,required:!1,matches:sz.slice(),description:"Readout: fraction (default with value/max), percent, or none."},sentiment:{type:String,required:!1,matches:oz.slice(),description:"Tone cue: positive / caution / negative. Absent → the neutral primary fill."}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=e.value!=null?Number(e.value):void 0,i=e.max!=null?Number(e.max):void 0,s=e.percent!=null?Number(e.percent):void 0,o=y=>Math.max(0,Math.min(100,y)),a=r!=null&&i!=null&&Number.isFinite(r)&&Number.isFinite(i)&&i>0,l=a?o(Math.round(r/i*100)):s!=null&&Number.isFinite(s)?o(s):0,c=e.display||(a?"fraction":"percent");let u="";c==="fraction"&&a?u=`${r}/${i}`:c==="percent"&&(u=`${l}%`);const d=new ze(z.transform(dt(n.body),t)).toArray(),h=og(d).trim(),g=e.sentiment,p=g?new Pl("meta",{content:g}):void 0,O=new Pl("span",{},[]),v=new Pl("span",{},[O]),b={track:v,fill:O},_=p?[p]:[];if(d.length>0){const y=new Pl("span",{},d);b.label=y,_.push(y)}if(u){const y=new Pl("span",{},[u]);b.value=y,_.push(y)}_.push(v);const A=Ie({rune:"progress",tag:"div",properties:p?{sentiment:p}:{},refs:b,children:_});return A.attributes.role="progressbar",A.attributes["aria-valuemin"]="0",a?(A.attributes["aria-valuenow"]=String(r),A.attributes["aria-valuemax"]=String(i)):(A.attributes["aria-valuenow"]=String(l),A.attributes["aria-valuemax"]="100"),h&&(A.attributes["aria-label"]=h),A.attributes.style=`--rf-progress: ${l}%`,A}}),{Tag:El}=z,lz=He({base:d6,attributes:{href:{type:String,required:!1,default:"",description:"Optional link target; makes the whole card clickable."}},contentModel:{type:"sequence",fields:[{name:"body",match:"any",optional:!0,greedy:!0}]},transform(n,e,t){const r=dt(n.body),i=[[]];for(const k of r)k.type==="hr"?i.push([]):i[i.length-1].push(k);let s=[],o=[],a=[];i.length===1?o=i[0]:i.length===2?(s=i[0],o=i[1]):(s=i[0],a=i[i.length-1],o=i.slice(1,-1).flat());const{metas:l,children:c}=h6(e),u=[...c];if(s.length>0){const k=new ze(z.transform(s,t)),E=p6(k),T=E?[E]:k.toArray();u.push(new El("div",{"data-section":"media","data-name":"media"},T))}let f,d=o;o.length>=2&&o[0].type==="paragraph"&&o[1].type==="heading"&&(f=o[0],d=o.slice(1));const h=[];let g;if(f){const E=new ze(z.transform([f],t)).toArray()[0];z.Tag.isTag(E)&&(g=E,h.push(g))}const O=new ze(z.transform(d,t)).toArray();let v;const b=O[0];z.Tag.isTag(b)&&/^h[1-6]$/.test(b.name)&&(v=b),h.push(...O);const _=new El("div",{"data-name":"body"},h),A=[_];let y;if(a.length>0){const k=new ze(z.transform(a,t));y=new El("footer",{"data-name":"footer"},k.toArray()),A.push(y)}const w=new El("div",{"data-name":"content"},A);u.push(w);let S;const C=String(e.href??"");C&&(S=new El("a",{"data-name":"link",href:C,"aria-hidden":"true",tabindex:"-1"},[]),u.push(S));const x={content:w,body:_};return v&&(x.title=v),g&&(x.eyebrow=g),y&&(x.footer=y),S&&(x.link=S),Ie({rune:"card",tag:"div",properties:{layout:l.layout},refs:x,children:u})}}),{Tag:cz}=z,uz=["positive","negative","caution","neutral"],fz=["primary","secondary"],dz=["status","category","quantity","temporal","tag","id"],hz={inline:!0,attributes:{sentiment:{type:String,required:!1,matches:uz.slice(),description:"Sentiment dimension (SPEC-024): positive, negative, caution, neutral. Default: neutral."},rank:{type:String,required:!1,matches:fz.slice(),description:"Rank dimension (SPEC-024): primary or secondary. Optional — omitted when absent."},type:{type:String,required:!1,matches:dz.slice(),description:"Meta-type dimension (SPEC-024): status, category, quantity, temporal, tag, id. Default: tag."}},transform(n,e){const t=n.attributes.sentiment??"neutral",r=n.attributes.type??"tag",i=n.attributes.rank,s={class:"rf-badge","data-rune":"badge","data-meta-sentiment":t,"data-meta-type":r};i&&(s["data-meta-rank"]=i);const o=n.transformChildren(e);return new cz("span",s,o)}};class pz{constructor(e){this.name=e.name,this.aliases=e.aliases??[],this.schema=e.schema,this.description=e.description??"",this.seoType=e.seoType,this.typeName=e.typeName,this.schemaOrgType=e.schemaOrgType,this.authoringHints=e.authoringHints,this.category=e.category,this.snippet=e.snippet}get names(){return[this.name,...this.aliases]}}function Ve(n){return new pz(n)}function mz(n){const e={};for(const t of Object.values(n))for(const r of t.names)e[r]=t.schema;return e}const{Ast:gz}=z;class cY extends gz.Node{constructor(e,t,r,i){super(e,t,r,i)}transform(e){return super.transform(e)}}const Oz=new Set(["id","type","sourceFile","sourceUrl"]);function vz(n){const e=[];let t="",r=!1;for(const i of n){if(i==='"'){r=!r;continue}if(!r&&/\s/.test(i)){t&&(e.push(t),t="");continue}t+=i}return t&&e.push(t),e}function ag(n){const e=[],t=new Map;if(!n||!n.trim())return{clauses:[],warnings:e};for(const r of vz(n)){const i=r.indexOf(":");if(i===-1){e.push(`Ignored filter clause "${r}": expected field:value`);continue}const s=r.slice(0,i);if(!s){e.push(`Ignored filter clause "${r}": empty field name`);continue}const o=r.slice(i+1),a=t.get(s);a?a.push(o):t.set(s,[o])}return{clauses:[...t.entries()].map(([r,i])=>({field:r,values:i})),warnings:e}}function eC(n,e){return e==="url"?n.sourceUrl??n.data.url??"":Oz.has(e)?n[e]:n.data[e]}function bz(n){const e=n.split("*").map(t=>t.replace(/[.+?^${}()|[\]\\]/g,"\\$&"));return new RegExp("^"+e.join(".*")+"$")}const yz=/^\/(.+)\/([gimsuy]*)$/,wz=/[\\^$.+?()[\]{}|]/;function _z(n,e){const t=e.match(yz);if(t&&(t[2].length>0||wz.test(t[1])))try{return new RegExp(t[1],t[2]).test(n)}catch{return n===e}return e.includes("*")?bz(e).test(n):n===e}function kz(n){if(Array.isArray(n))return n.map(t=>String(t??""));const e=String(n??"");return e.includes(",")?e.split(",").map(t=>t.trim()):[e]}function Cv(n,e){for(const t of e.clauses){const r=kz(eC(n,t.field));if(!t.values.some(s=>r.some(o=>_z(o,s))))return!1}return!0}function lg(n){return String(n??"").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[-_]+/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim()}const{Tag:Rs,Ast:xz}=z;function Tv(n){if(!n)return{template:""};const e=z.parse(`
333
- `+n),t=[[]];for(const s of e.children)s.type==="hr"?t.push([]):t[t.length-1].push(s);if(t.length===1)return{template:n};const r=s=>s.length?z.format(new xz.Node("document",{},s)):"",i=t.map(r);return i.length===2?{preamble:i[0]||void 0,template:i[1]}:{preamble:i[0]||void 0,template:i[1],fallback:i[2]||void 0}}class Sz{constructor(e,t={}){this.matches=e,this.overrides=t}order(e,t){return this.overrides[e]?.[t]??this.matches[e]?.[t]}rank(e,t,r){const i=this.order(e,t);return i?i.indexOf(r):-1}}function Pv(n){const e={},t=n?.tags??{};for(const[r,i]of Object.entries(t)){const s=i?.attributes;if(s)for(const[o,a]of Object.entries(s)){const l=a?.matches;Array.isArray(l)&&l.every(c=>typeof c=="string")&&((e[r]??={})[o]=l)}}return new Sz(e,n?.orderings??{})}function tC(n){return n.sourceUrl||String(n.data.url??"")}function Az(n){const e=n.data;return String(e.title??e.name??n.id)}function Br(n,e){const t=eC(n,e);return Array.isArray(t)?t.join(", "):String(t??"")}function nC(n,e){const t=tC(n),r=Az(n),i=`${e}__title`;return t?new Rs("a",{class:i,href:t},[r]):new Rs("span",{class:i},[r])}function Ev(n){return{id:n.id,type:n.type,url:tC(n),data:n.data}}function Cz(n,e,t){if(!e)return n;let r=e.trim(),i=1;r.startsWith("-")?(i=-1,r=r.slice(1)):r.endsWith("-desc")?(i=-1,r=r.slice(0,-5)):r.endsWith("-asc")&&(r=r.slice(0,-4));const s=t&&n.some(o=>t.order(o.type,r));return[...n].sort((o,a)=>{if(s){const d=t.rank(o.type,r,Br(o,r)),h=t.rank(a.type,r,Br(a,r)),g=d>=0,p=h>=0;if(g&&p){if(d!==h)return(d-h)*i}else if(g!==p)return g?-1:1}const l=Br(o,r),c=Br(a,r),u=Number(l),f=Number(c);return l!==""&&c!==""&&Number.isFinite(u)&&Number.isFinite(f)?(u-f)*i:l.localeCompare(c)*i})}function rC(n,e){const t=new Map;for(const r of n){const i=e(r),s=t.get(i);s?s.push(r):t.set(i,[r])}return t}function iC(n,e,t){const r=rC(n,o=>Br(o,e)||"(none)");if(!t||![...n].some(o=>t.order(o.type,e)))return r;const i=o=>{let a=1/0;for(const l of o){const c=t.rank(l.type,e,Br(l,e));c>=0&&c<a&&(a=c)}return a},s=[...r.entries()].sort((o,a)=>i(o[1])-i(a[1]));return new Map(s)}function sC(n){const e=n.map(t=>new Rs("details",{class:"rf-accordion-item","data-group":t.key},[new Rs("summary",{class:"rf-accordion-item__header"},[new Rs("span",{class:"rf-accordion-item__title"},[t.label]),new Rs("span",{class:"rf-accordion-item__count"},[String(t.count)])]),new Rs("div",{class:"rf-accordion-item__body"},t.nodes)]));return[new Rs("div",{class:"rf-accordion"},e)]}function fs(n,e,t){const r=xv(n,e,t);return Array.isArray(r)?r:[r]}const{Tag:Zt,Ast:Tz}=z;function cg(n){return nC(n,"rf-collection")}function $v(n){return Zt.isTag(n)}function Di(n,e){for(const t of n.children??[])if($v(t)&&t.name==="meta"&&t.attributes["data-field"]===e)return String(t.attributes.content??"");return""}function Pz(n){return(n.children??[]).some(e=>$v(e)&&e.name==="meta"&&e.attributes["data-field"]===zA)}function Ez(n){const e=Di(n,"collection-limit"),t=Number(e);return{types:Di(n,"collection-type").split(",").map(r=>r.trim()).filter(Boolean),filter:Di(n,"collection-filter"),sort:Di(n,"collection-sort"),group:Di(n,"collection-group"),groupDisplay:Di(n,"collection-group-display")||"headings",limit:e&&Number.isFinite(t)&&t>0?Math.floor(t):void 0,fields:Di(n,"collection-fields").split(",").map(r=>r.trim()).filter(Boolean),layout:Di(n,"collection-layout")||"list",bodySource:Di(n,"collection-body"),empty:Di(n,"collection-empty")}}function $z(n,e){const t=e.fields.map(r=>new Zt("span",{class:"rf-collection__field","data-field":r},[Br(n,r)]));return e.layout==="list"?new Zt("div",{class:"rf-collection__item","data-entity-id":n.id},[cg(n)]):new Zt("article",{class:"rf-collection__card","data-entity-id":n.id},[cg(n),...t])}function Qz(n,e,t){const r=z.parse(n),i=[];let s=null;for(const o of r.children)if(o.type==="heading"){const a=z.format(o).replace(/^#+\s*/,"").trim();a.includes("$item")&&e.warn(`collection: $item in a table column heading ("${a}") is not per-row; use a static label`,t),s={label:a,cellNodes:[]},i.push({label:a,cellSource:""})}else s&&(s.cellNodes.push(o),i[i.length-1].cellSource=z.format(new Tz.Node("document",{},s.cellNodes)));return i}function Lz(n,e,t,r,i){const s=Qz(e,r,i);if(!t)return r.error("collection — table column templates present but no embedConfig threaded through the pipeline",i),new Zt("table",{class:"rf-collection__table"},[]);const o=new Zt("thead",{},[new Zt("tr",{},s.map(l=>new Zt("th",{},[l.label])))]),a=n.map(l=>{const c=Ev(l),u=s.map(f=>{const d=xv(f.cellSource,t,{item:c}),h=Array.isArray(d)?d:[d];return new Zt("td",{},h)});return new Zt("tr",{"data-entity-id":l.id},u)});return new Zt("table",{class:"rf-collection__table"},[o,new Zt("tbody",{},a)])}function Mz(n,e){const t=[new Zt("th",{},["Title"]),...e.fields.map(s=>new Zt("th",{},[lg(s)]))],r=new Zt("thead",{},[new Zt("tr",{},t)]),i=n.map(s=>{const o=[new Zt("td",{},[cg(s)]),...e.fields.map(a=>new Zt("td",{"data-field":a},[Br(s,a)]))];return new Zt("tr",{"data-entity-id":s.id},o)});return new Zt("table",{class:"rf-collection__table"},[r,new Zt("tbody",{},i)])}function Dz(n,e,t,r,i){return t?n.map(s=>{const o=Ev(s),a=xv(e,t,{item:o}),l=Array.isArray(a)?a:[a];return new Zt("div",{class:"rf-collection__item","data-entity-id":s.id,"data-block":""},l)}):(r.error("collection — body template present but no embedConfig threaded through the pipeline",i),[])}function Bu(n,e,t,r){if(!e.group)return r(n);const i=iC(n,e.group,t);if(e.groupDisplay==="accordion")return sC([...i].map(([o,a])=>({key:o,label:o,count:a.length,nodes:r(a)})));const s=[];for(const[o,a]of i)s.push(new Zt("div",{class:"rf-collection__group","data-group":o},[new Zt("h3",{class:"rf-collection__group-title"},[o]),...r(a)]));return s}function qz(n,e,t,r,i,s){const o=Ez(n);let a=[];for(const O of o.types)a.push(...e.getAll(O));if(o.filter){const O=ag(o.filter);for(const v of O.warnings)i.warn(`collection filter: ${v}`,s);a=a.filter(v=>Cv(v,O))}a=Cz(a,o.sort,r);const l=a.length;o.limit!==void 0&&a.length>o.limit&&(a=a.slice(0,o.limit));const c={count:l,shown:a.length},u=Tv(o.bodySource),f=u.template,d={...n.attributes,"data-type":o.types.join(","),"data-layout":o.layout};if(a.length===0){const O=[];return u.fallback&&t?O.push(new Zt("div",{"data-name":"empty",class:"rf-collection__empty"},fs(u.fallback,t,c))):o.empty&&O.push(new Zt("div",{"data-name":"empty",class:"rf-collection__empty"},[o.empty])),new Zt(n.name,d,O)}let h;o.layout==="table"&&f?h=Bu(a,o,r,O=>[Lz(O,f,t,i,s)]):f?h=Bu(a,o,r,O=>Dz(O,f,t,i,s)):o.layout==="table"?h=Bu(a,o,r,O=>[Mz(O,o)]):h=Bu(a,o,r,O=>O.map(v=>$z(v,o)));const g=new Zt("div",{"data-name":"items",class:"rf-collection__items"},h),p=[];return u.preamble&&t&&p.push(new Zt("div",{"data-name":"preamble",class:"rf-collection__preamble"},fs(u.preamble,t,c))),new Zt(n.name,d,[...p,g])}function Rz(n,e,t,r,i){const s=Pv(r),o=a=>{if(Array.isArray(a))return a.map(o);if(!$v(a))return a;const l=a;return l.attributes?.["data-rune"]==="collection"&&Pz(l)?qz(l,t,r,s,i,e):!l.children||l.children.length===0?l:new Zt(l.name,l.attributes,l.children.map(o))};return o(n)}const{Tag:br}=z;function Qv(n){return br.isTag(n)}function hi(n,e){for(const t of n.children??[])if(Qv(t)&&t.name==="meta"&&t.attributes["data-field"]===e)return String(t.attributes.content??"");return""}function Iz(n){return(n.children??[]).some(e=>Qv(e)&&e.name==="meta"&&e.attributes["data-field"]===ZA)}function bp(n){return n.split(",").map(e=>e.trim()).filter(Boolean)}function Nz(n){const e=hi(n,"relationships-limit"),t=Number(e);return{of:hi(n,"relationships-of"),kinds:bp(hi(n,"relationships-kind")),types:bp(hi(n,"relationships-type")),group:hi(n,"relationships-group")||"kind",groupDisplay:hi(n,"relationships-group-display")||"headings",sort:hi(n,"relationships-sort"),limit:e&&Number.isFinite(t)&&t>0?Math.floor(t):void 0,fields:bp(hi(n,"relationships-fields")),layout:hi(n,"relationships-layout")||"list",bodySource:hi(n,"relationships-body"),empty:hi(n,"relationships-empty")}}function Bz(n,e,t){if(!e)return n;let r=e.trim(),i=1;r.startsWith("-")?(i=-1,r=r.slice(1)):r.endsWith("-desc")?(i=-1,r=r.slice(0,-5)):r.endsWith("-asc")&&(r=r.slice(0,-4));const s=n.some(o=>t.order(o.target.type,r));return[...n].sort((o,a)=>{if(s){const u=t.rank(o.target.type,r,Br(o.target,r)),f=t.rank(a.target.type,r,Br(a.target,r)),d=u>=0,h=f>=0;if(d&&h){if(u!==f)return(u-f)*i}else if(d!==h)return d?-1:1}const l=Br(o.target,r),c=Br(a.target,r);return l.localeCompare(c)*i})}function T0(n){return nC(n,"rf-relationships")}function jz(n,e){const t=e.fields.map(i=>new br("span",{class:"rf-relationships__field","data-field":i},[Br(n.target,i)])),r={"data-entity-id":n.target.id,"data-kind":n.kind};return e.layout==="grid"?new br("article",{class:"rf-relationships__card",...r},[T0(n.target),...t]):new br("div",{class:"rf-relationships__item",...r},[T0(n.target),...t])}function yp(n,e,t,r){return n.map(i=>{if(t&&r){const s=fs(t,r,{item:Ev(i.target),kind:i.kind});return new br("div",{class:"rf-relationships__item","data-entity-id":i.target.id,"data-kind":i.kind,"data-block":""},s)}return jz(i,e)})}function zz(n,e,t,r,i,s){const o=Nz(n);o.of||i.warn("relationships — no `of` entity given (pass of=$item.id on an entity page)",s);let a=o.of&&e.getRelated?e.getRelated(o.of,{kind:o.kinds.length?o.kinds:void 0,type:o.types.length?o.types:void 0}):[];a=Bz(a,o.sort,r);const l=a.length;o.limit!==void 0&&a.length>o.limit&&(a=a.slice(0,o.limit));const c={count:l,shown:a.length},u=Tv(o.bodySource),f=u.template,d={...n.attributes,"data-of":o.of,"data-layout":o.layout};if(a.length===0){const O=[];return u.fallback&&t?O.push(new br("div",{"data-name":"empty",class:"rf-relationships__empty"},fs(u.fallback,t,c))):o.empty&&O.push(new br("div",{"data-name":"empty",class:"rf-relationships__empty"},[o.empty])),new br(n.name,d,O)}let h;if(o.group==="none")h=yp(a,o,f,t);else{const O=o.group==="type"?b=>b.target.type:b=>b.kind,v=rC(a,O);if(o.groupDisplay==="accordion")h=sC([...v].map(([b,_])=>({key:b,label:lg(b),count:_.length,nodes:yp(_,o,f,t)})));else{h=[];for(const[b,_]of v)h.push(new br("div",{class:"rf-relationships__group","data-group":b},[new br("h3",{class:"rf-relationships__group-title"},[lg(b)]),...yp(_,o,f,t)]))}}const g=new br("div",{"data-name":"items",class:"rf-relationships__items"},h),p=[];return u.preamble&&t&&p.push(new br("div",{"data-name":"preamble",class:"rf-relationships__preamble"},fs(u.preamble,t,c))),new br(n.name,d,[...p,g])}function Zz(n,e,t,r,i){const s=Pv(r),o=a=>{if(Array.isArray(a))return a.map(o);if(!Qv(a))return a;const l=a;return l.attributes?.["data-rune"]==="relationships"&&Iz(l)?zz(l,t,r,s,i,e):!l.children||l.children.length===0?l:new br(l.name,l.attributes,l.children.map(o))};return o(n)}const{Tag:Fr}=z;function Lv(n){return Fr.isTag(n)}function Es(n,e){for(const t of n.children??[])if(Lv(t)&&t.name==="meta"&&t.attributes["data-field"]===e)return String(t.attributes.content??"");return""}function Xz(n){return(n.children??[]).some(e=>Lv(e)&&e.name==="meta"&&e.attributes["data-field"]===XA)}function Fz(n){const e=Es(n,"aggregate-limit"),t=Number(e);return{types:Es(n,"aggregate-type").split(",").map(r=>r.trim()).filter(Boolean),filter:Es(n,"aggregate-filter"),value:Es(n,"aggregate-value"),group:Es(n,"aggregate-group"),sort:Es(n,"aggregate-sort"),limit:e&&Number.isFinite(t)&&t>0?Math.floor(t):void 0,bodySource:Es(n,"aggregate-body"),empty:Es(n,"aggregate-empty")}}function cd(n,e){return e<=0?0:Math.round(n/e*100)}function ba(n,e){return e?n.filter(t=>Cv(t,e)).length:n.length}function Vz(n,e,t,r,i){if(!e)return n;let s=e.trim(),o=1;return s.startsWith("-")?(o=-1,s=s.slice(1)):s.endsWith("-desc")?(o=-1,s=s.slice(0,-5)):s.endsWith("-asc")&&(s=s.slice(0,-4)),s==="count"?[...n].sort(([,a],[,l])=>(a.length-l.length)*o):s==="value"?[...n].sort(([,a],[,l])=>(ba(a,i)-ba(l,i))*o):s==="percent"?[...n].sort(([,a],[,l])=>{const c=cd(ba(a,i),a.length),u=cd(ba(l,i),l.length);return(c-u)*o}):[...n].sort(([a,l],[c,u])=>{const f=l[0]?.type??"",d=u[0]?.type??"",h=r.rank(f,t,a),g=r.rank(d,t,c),p=h>=0,O=g>=0;if(p&&O){if(h!==g)return(h-g)*o}else if(p!==O)return p?-1:1;return a.localeCompare(c)*o})}function Wz(n,e,t,r,i,s){const o=Fz(n);let a=[];for(const A of o.types)a.push(...e.getAll(A));if(o.filter){const A=ag(o.filter);for(const y of A.warnings)i.warn(`aggregate filter: ${y}`,s);a=a.filter(y=>Cv(y,A))}const l=o.value?ag(o.value):null;if(l)for(const A of l.warnings)i.warn(`aggregate value: ${A}`,s);const c=a.length,u=ba(a,l),f=o.value?cd(u,c):100;if(!o.bodySource)return new Fr(n.name,{...n.attributes,"data-aggregate":"count","data-count":String(c)},[String(c)]);const d=Tv(o.bodySource),h=d.template,g={...n.attributes,"data-aggregate":"breakdown"};if(c===0){const A=[];if(d.fallback&&t){const y={item:{key:"",count:0,value:0,percent:0,total:0,shown:0}};A.push(new Fr("div",{"data-name":"empty",class:"rf-aggregate__empty"},fs(d.fallback,t,y)))}else o.empty&&A.push(new Fr("div",{"data-name":"empty",class:"rf-aggregate__empty"},[o.empty]));return new Fr(n.name,g,A)}const p=[];if(d.preamble&&t){const A={item:{count:c,value:u,percent:f,total:c}};p.push(new Fr("div",{"data-name":"preamble",class:"rf-aggregate__preamble"},fs(d.preamble,t,A)))}if(!o.group){const A=[...p];if(h&&t){const y={item:{key:"",count:c,value:u,percent:f,total:c,shown:1}};A.push(new Fr("div",{"data-name":"items",class:"rf-aggregate__items"},fs(h,t,y)))}return new Fr(n.name,g,A)}let O=[...iC(a,o.group,r).entries()];O=Vz(O,o.sort,o.group,r,l),o.limit!==void 0&&O.length>o.limit&&(O=O.slice(0,o.limit));const v=O.length,b=[];if(h&&t)for(const[A,y]of O){const w=y.length,S=ba(y,l),C=o.value?cd(S,w):100,k=fs(h,t,{item:{key:A,count:w,value:S,percent:C,total:c,shown:v}});b.push(new Fr("div",{class:"rf-aggregate__group","data-group":A,"data-block":""},k))}const _=new Fr("div",{"data-name":"items",class:"rf-aggregate__items"},b);return new Fr(n.name,g,[...p,_])}function Yz(n,e,t,r,i){const s=Pv(r),o=a=>{if(Array.isArray(a))return a.map(o);if(!Lv(a))return a;const l=a;return l.attributes?.["data-rune"]==="aggregate"&&Xz(l)?Wz(l,t,r,s,i,e):!l.children||l.children.length===0?l:new Fr(l.name,l.attributes,l.children.map(o))};return o(n)}const{Tag:Uz}=z;function ug(n){return n==null||typeof n=="string"||typeof n=="number"?n:Uz.isTag(n)?{$$mdtype:"Tag",name:n.name,attributes:n.attributes,children:n.children.map(ug)}:n}function Gz(n){return Array.isArray(n)?n.map(ug):ug(n)}const{Tag:ud}=z;function Hz(n,e,t,r){const i=r?[r]:n.getTypes();for(const s of i){const o=n.getById(s,e,t);if(o)return o}}function Kz(n,e,t){const r=e.toLowerCase(),i=t?[t]:n.getTypes(),s=[];for(const o of i)for(const a of n.getAll(o)){const l=a.data.name??"",c=a.data.title??"";(l.toLowerCase()===r||c.toLowerCase()===r)&&s.push(a)}return s}function Jz(n){const e=n.data.url||n.sourceUrl;if(!e)return;const t=n.data.headingId;return t?`${e}#${t}`:e}function P0(n,e,t){if(e)return e;if(t){const r=t.data.title,i=t.data.name,s=t.data.text;return r||i||s||n}return n}const oC=/\{([a-zA-Z_$][a-zA-Z0-9_$]*)\}/g;function eZ(n){return n.split("/").map(encodeURIComponent).join("/")}function tZ(n,e,t){return n.replace(oC,(r,i)=>{const s=i==="id"?e:t[i]??"";return eZ(s)})}function nZ(n,e,t){return n.replace(oC,(r,i)=>i==="id"?e:t[i]??"")}function rZ(n,e){for(const t of e){const r=t.match.exec(n);if(!r)continue;const i=r.groups??{};return{url:tZ(t.template,n,i),label:nZ(t.label,n,i),type:t.type}}}function iZ(n,e){const t=n.indexOf("#");if(t<0)return n;const r=n.slice(0,t),i=n.slice(t),s=o=>o.endsWith("/")?o.slice(0,-1):o;return s(r)===s(e)?i:n}function sZ(n,e,t,r){let i=Hz(r.registry,n,r.pageUrl,t);if(!i){const c=Kz(r.registry,n,t);if(c.length===1)i=c[0];else if(c.length>1){const u=c.map(f=>`${f.type} "${f.data.title||f.data.name||f.id}" on ${f.sourceUrl??"(no URL)"}`).join(", ");r.ctx.warn(`xref "${n}" on ${r.pageUrl} — matches ${c.length} entities (${u}). Add type hint to disambiguate.`,r.pageUrl),i=c[0]}}const s=i?Jz(i):void 0;let o;if(i&&s)o={href:s,label:P0(n,e,i),type:i.type,source:"registry",targetType:i.type,entityId:i.id};else{const c=rZ(n,r.patterns);c&&(o={href:c.url,label:P0(n,e,i)||c.label,type:i?.type??c.type,source:"pattern",targetType:i?.type,entityId:i?.id},!i&&!e&&(o.label=c.label))}if(!o)return r.ctx.warn(`xref "${n}" on ${r.pageUrl} — entity not found`,r.pageUrl),{tag:new ud("span",{class:"rf-xref rf-xref--unresolved","data-xref-id":n},[e||n])};o.href===r.pageUrl&&r.ctx.info(`xref "${n}" on ${r.pageUrl} — references itself`,r.pageUrl);const a=iZ(o.href,r.pageUrl),l={class:`rf-xref rf-xref--${o.type}`,href:a,"data-xref-id":o.entityId??n,"data-xref-source":o.source};return o.targetType&&(l["data-target-type"]=o.targetType),{tag:new ud("a",l,[o.label])}}function oZ(n,e,t,r,i){return fg(n,{pageUrl:e,registry:t,patterns:r,ctx:i})}function fg(n,e){if(!ud.isTag(n)){if(Array.isArray(n)){const i=n,s=i.map(o=>fg(o,e));return s.every((o,a)=>o===i[a])?n:s}return n}const t=n;if(t.attributes?.["data-rune"]===wv){const i=t.attributes["data-xref-id"],s=t.attributes["data-xref-label"],o=t.attributes["data-xref-type"];return i?sZ(i,s,o,e).tag:new ud("span",{class:"rf-xref rf-xref--unresolved"},[s||"?"])}const r=(t.children??[]).map(i=>fg(i,e));return r.every((i,s)=>i===t.children[s])?t:{...t,children:r}}const{Ast:aC,Tag:dg}=z;function ju(n,e){if(n==null)return"";if(typeof n=="string")return n;if(typeof n=="number"||typeof n=="boolean")return String(n);if(typeof n=="object"&&"$$mdtype"in n){const t=n;if(t.$$mdtype==="Variable"&&Array.isArray(t.path)){let r=e;for(const i of t.path){if(r==null)return"";r=r[i]}return r==null?"":String(r)}}return""}const aZ=new Set(["code-group","diff"]);function lZ(n,e,t){if(!t.projectRoot)return;let r=!1;return lC(n,e,t,t.projectRoot,i=>{i&&(r=!0)}),r?n:void 0}function lC(n,e,t,r,i){if(n.children)for(let s=0;s<n.children.length;s++){const o=n.children[s];if(o.type==="tag"&&o.tag==="snippet"){n.children[s]=cZ(o,e,t,r),i(!0);continue}lC(o,e,t,r,i)}}function wp(n,e){return new aC.Node("fence",{content:`snippet error: ${e}
334
- `,language:"text",source:n||"(unresolved)","data-snippet-error":e})}function cZ(n,e,t,r){const i=ju(n.attributes.path,t.variables),s=n.attributes.lines!==void 0?ju(n.attributes.lines,t.variables):void 0,o=n.attributes.lang!==void 0?ju(n.attributes.lang,t.variables):void 0,a=n.attributes.linenumbers===!0,l=n.attributes.highlight!==void 0?ju(n.attributes.highlight,t.variables):void 0;if(!i){const d="snippet `path` attribute is required (and an unresolvable variable reference resolves to empty)";return t.error(d,e.url),wp("",d)}let c;try{c=GA({pathAttr:i,projectRoot:r,lines:s||void 0,referencingPage:e.relativePath})}catch(d){if(d instanceof Jn)return t.error(d.message,e.url),wp(i,d.message);const h=d.message??String(d);return t.error(`snippet "${i}" failed unexpectedly: ${h}`,e.url),wp(i,h)}for(const d of c.warnings)t.warn(d,e.url);const u=o&&o.length>0?o:HA(c.relativePath),f={content:c.content,language:u,source:c.relativePath};return s&&(f.lines=s),a&&(f.linenumbers=!0),l&&l.length>0&&(f.highlight=l),new aC.Node("fence",f)}function uZ(n,e,t){const r=hg(n.renderable,!1);return r===n.renderable?n:{...n,renderable:r}}function hg(n,e){if(Array.isArray(n)){let l=!1;const c=n.map(u=>{const f=hg(u,e);return f!==u&&(l=!0),f});return l?c:n}if(!dg.isTag(n))return n;const t=n,r=t.attributes?.["data-rune"],i=typeof r=="string"&&aZ.has(r),s=e||i;if(t.name==="pre"&&t.attributes?.["data-source"]!==void 0&&!e)return fZ(t);if(!t.children||t.children.length===0)return t;let o=!1;const a=t.children.map(l=>{const c=hg(l,s);return c!==l&&(o=!0),c});return o?new dg(t.name,t.attributes,a):t}function fZ(n){const e=n.attributes,t=String(e["data-source"]??""),r=e["data-lines"]!==void 0?String(e["data-lines"]):void 0,i={class:"rf-snippet","data-rune":"snippet","data-source-path":t};return r&&(i["data-lines"]=r),new dg("figure",i,[n])}const{Tag:zo}=z,cC=/^h[1-6]$/,pg="data-outline-scope";function dZ(n){const e=new Set;return Og(n,[],e),e.size>0&&vg(n,e),n}function hZ(n){const e=[];return mg(n,!1,e),e}function mg(n,e,t){if(Array.isArray(n)){for(const o of n)mg(o,e,t);return}if(!zo.isTag(n))return;const r=n,i=r.attributes;if(cC.test(r.name)){if(e)return;const o=Number(r.name.slice(1)),a=typeof i?.id=="string"?i.id:"",l=gg(r);a&&l&&t.push({level:o,text:l,id:a});return}const s=e||i&&typeof i[pg]=="string";if(!(!r.children||r.children.length===0))for(const o of r.children)mg(o,!!s,t)}function gg(n){return typeof n=="string"?n:typeof n=="number"?String(n):Array.isArray(n)?n.map(gg).join(""):zo.isTag(n)?(n.children??[]).map(gg).join(""):""}function Og(n,e,t){if(Array.isArray(n)){for(const a of n)Og(a,e,t);return}if(!zo.isTag(n))return;const r=n,i=r.attributes,s=i&&typeof i[pg]=="string"?i[pg]:void 0;if(cC.test(r.name)&&e.length>0){const a=e[e.length-1],l=typeof i?.id=="string"?i.id:void 0;l&&!l.startsWith(`${a}--`)&&(t.add(l),r.attributes.id=`${a}--${l}`);return}const o=s!==void 0?[...e,s]:e;if(!(!r.children||r.children.length===0))for(const a of r.children)Og(a,o,t)}function vg(n,e){if(Array.isArray(n)){for(const i of n)vg(i,e);return}if(!zo.isTag(n))return;const t=n;if(t.attributes?.["data-rune"]==="table-of-contents"){pZ(t,e);return}if(t.children)for(const i of t.children)vg(i,e)}function pZ(n,e){for(const t of n.children??[])bg(t,e)}function bg(n,e){if(Array.isArray(n)){for(const r of n)bg(r,e);return}if(!zo.isTag(n))return;const t=n;(t.name==="ul"||t.name==="ol")&&(t.children=(t.children??[]).filter(r=>{if(!zo.isTag(r))return!0;const i=r;return i.name!=="li"?!0:!uC(i,e)}));for(const r of t.children??[])bg(r,e)}function uC(n,e){for(const t of n.children??[]){if(!zo.isTag(t))continue;const r=t;if(r.name==="a"){const i=r.attributes?.href;if(typeof i=="string"&&i.startsWith("#")&&e.has(i.slice(1)))return!0}if(uC(r,e))return!0}return!1}const{Tag:Ec}=z,mZ=new Map;function gZ(n,e,t,r,i,s){return fd(n,{pageUrl:e,registry:t,patterns:r,embedConfig:i,ctx:s,parseCache:mZ},[])}function fd(n,e,t){if(Array.isArray(n)){let a=!1;const l=n.map(c=>{const u=fd(c,e,t);return u!==c&&(a=!0),u});return a?l:n}if(!Ec.isTag(n))return n;const r=n;if(r.attributes?.["data-rune"]===_v)return OZ(r,e,t);if(!r.children||r.children.length===0)return r;let s=!1;const o=r.children.map(a=>{const l=fd(a,e,t);return l!==a&&(s=!0),l});return s?new Ec(r.name,r.attributes,o):r}function OZ(n,e,t){const r=n.attributes,i=String(r["data-expand-id"]??""),s=r["data-expand-type"],o=r["data-expand-level"],a=r["data-expand-canonical"]==="true",l=r["data-expand-label"];if(!i)return e.ctx.error(`expand placeholder is missing \`primary\`/id attribute on ${e.pageUrl}`,e.pageUrl),$s(i,"missing id attribute");const c=o!==void 0?Number(o):void 0,u=vZ(e.registry,i,e.pageUrl,s);if(!u)return e.ctx.error(`expand "${i}" on ${e.pageUrl} — entity not found`,e.pageUrl),$s(i,"entity not found");if(!u.embed&&!(u.sourceFile&&u.extract))return e.ctx.error(`expand "${i}" on ${e.pageUrl} — entity type "${u.type}" does not support embedding (no embed() or sourceFile/extract)`,e.pageUrl),$s(i,`entity type "${u.type}" does not support embedding`);if(t.some(_=>_.type===u.type&&_.id===u.id)){const _=[...t,{type:u.type,id:u.id}].map(A=>`${A.id} (${A.type})`).join(" → ");return e.ctx.error(`expand cycle detected on ${e.pageUrl}. Cycle: ${_}`,e.pageUrl),$s(i,"cycle detected")}let f;if(u.embed)f=u.embed();else{const _=e.embedConfig?.projectRoot;if(!_)return e.ctx.error(`expand "${i}" — no project root configured (embedConfig.projectRoot is unset)`,e.pageUrl),$s(i,"no project root configured");let A;try{A=wZ(u.sourceFile,_,e.parseCache)}catch(y){const w=(y instanceof Jn,y.message);return e.ctx.error(`expand "${i}" — failed to read source file "${u.sourceFile}": ${w}`,e.pageUrl),$s(i,w)}f=u.extract(A)}if(!f)return e.ctx.error(`expand "${i}" — extractor returned no content; the entity may be out-of-sync with the registry`,e.pageUrl),$s(i,"extractor returned no content");let d=f;if(c!==void 0&&c!==1){const _=c-1,A=[];d=fC(f,_,A),A.length>0&&e.ctx.warn(`expand "${i}" at ${e.pageUrl} — heading demotion (level=${c}) would push ${A.length} heading(s) past H6. Clamped to H6: ${A.map(y=>`"${y}"`).join(", ")}`,e.pageUrl)}if(!e.embedConfig)return e.ctx.error(`expand "${i}" — no embedConfig threaded through the pipeline`,e.pageUrl),$s(i,"no embed transform config");const h=[...t,{type:u.type,id:u.id}],g=z.transform(d,e.embedConfig),p=fd(g,e,h),O=bZ(u,e.patterns),v={"data-rune":"expand","data-entity-id":u.id,"data-entity-type":u.type,"data-source":"registry"};c===void 0&&(v["data-outline-scope"]=u.id),O&&(v["data-canonical-href"]=O);const b=[];if(Array.isArray(p)?b.push(...p):b.push(p),a){const _=l||yZ(u),A={class:O?"rf-expand__canonical-link":"rf-expand__canonical-link rf-xref--unresolved"};O&&(A.href=O),b.push(new Ec("a",A,[_]))}return new Ec("section",v,b)}function vZ(n,e,t,r){const i=r?[r]:n.getTypes();for(const o of i){const a=n.getById(o,e,t);if(a)return a}const s=e.toLowerCase();for(const o of i)for(const a of n.getAll(o)){const l=a.data.name??"",c=a.data.title??"";if(l.toLowerCase()===s||c.toLowerCase()===s)return a}}function bZ(n,e){const t=n.sourceUrl,i=n.data.url||t;if(i){const s=n.data.headingId;return s?`${i}#${s}`:i}for(const s of e){const o=s.match.exec(n.id);if(!o)continue;const a=o.groups??{},l=/\{([a-zA-Z_$][a-zA-Z0-9_$]*)\}/g;return s.template.replace(l,(c,u)=>(u==="id"?n.id:a[u]??"").split("/").map(encodeURIComponent).join("/"))}}function yZ(n){const e=n.data.title,t=n.data.name;return e?`View ${n.type}: ${e}`:t?`View ${n.type}: ${t}`:`View ${n.type} ${n.id}`}function wZ(n,e,t){const r=t.get(n);if(r)return r;const i=Y8({relativePath:n,projectRoot:e}),s=z.parse(i);return t.set(n,s),s}function fC(n,e,t){if(n.type==="heading"){const i=n.attributes.level+e;if(i>6){const s=_Z(n);t.push(s),n.attributes.level=6}else n.attributes.level=i}for(const r of n.children??[])fC(r,e,t);return n}function _Z(n){const e=[];for(const t of n.walk())t.type==="text"&&typeof t.attributes.content=="string"&&e.push(t.attributes.content);return e.join("")}function $s(n,e){return new Ec("section",{"data-rune":"expand","data-entity-id":n,"data-expand-error":e},[`expand "${n}" — ${e}`])}const{Tag:Te}=z,kZ={USD:"$",EUR:"€",GBP:"£",JPY:"¥",CNY:"¥",AUD:"A$",CAD:"C$",CHF:"CHF ",SEK:"kr",NOK:"kr",DKK:"kr",INR:"₹",KRW:"₩",BRL:"R$",MXN:"MX$",ZAR:"R"};function _p(n,e){const t=(n%1===0?String(n):n.toFixed(2)).split(".");return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e+t.join(".")}function xZ(n){let e=0;const t=n.match(/(\d+)\s*day/i),r=n.match(/(\d+)\s*week/i),i=n.match(/(\d+)\s*month/i);if(t&&(e+=parseInt(t[1])),r&&(e+=parseInt(r[1])*7),i&&(e+=parseInt(i[1])*30),e===0){const s=parseInt(n);isNaN(s)||(e=s)}return e}function dC(n,e){const t=[];for(const r of n)Pn(r)&&(r.attributes?.["data-rune"]===e?t.push(r):t.push(...dC(r.children,e)));return t}const zu={header:"preamble",eyebrow:"eyebrow",headline:"headline",blurb:"blurb",image:"image"},SZ={runes:{Accordion:{block:"accordion",defaultDensity:"full",sections:{preamble:"preamble",headline:"title",blurb:"description"},autoLabel:zu,editHints:{headline:"inline",eyebrow:"inline",blurb:"inline"}},AccordionItem:{block:"accordion-item",parent:"Accordion",rootAttributes:{"data-state":"closed"},autoLabel:{name:"header"},editHints:{header:"inline",body:"none"}},Details:{block:"details",autoLabel:{summary:"summary"},editHints:{summary:"inline",body:"none"}},Grid:{block:"grid",defaultDensity:"full",childDensity:"compact",modifiers:{mode:{source:"meta",default:"columns"},collapse:{source:"meta",noBemClass:!0},aspect:{source:"meta",noBemClass:!0},stack:{source:"meta",noBemClass:!0},ratio:{source:"meta",noBemClass:!0},valign:{source:"meta",noBemClass:!0},gap:{source:"meta",noBemClass:!0},min:{source:"meta",noBemClass:!0}},styles:{ratio:{prop:"--grid-ratio",transform:Oj},valign:{prop:"--grid-valign",transform:wj},gap:{prop:"--grid-gap",transform:c0},min:"--grid-min",aspect:"--grid-aspect"},editHints:{cell:"none"}},CodeGroup:{block:"codegroup",defaultDensity:"compact",modifiers:{title:{source:"meta",noBemClass:!0},overflow:{source:"meta",default:"scroll"}},structure:{topbar:{tag:"div",before:!0,children:[{tag:"span",ref:"dot"},{tag:"span",ref:"dot"},{tag:"span",ref:"dot"},{tag:"span",ref:"title",metaText:"title",condition:"title"}]}},sections:{topbar:"header",title:"title"},editHints:{panel:"code",title:"none"},postTransform(n){return{...n,attributes:{...n.attributes,"data-code-host":!0}}}},PageSection:{block:"page-section"},TableOfContents:{block:"toc"},Snippet:{block:"snippet"},Expand:{block:"expand"},Badge:{block:"badge"},Collection:{block:"collection"},Relationships:{block:"relationships"},FileRef:{block:"file-ref"},Aggregate:{block:"aggregate"},Progress:{block:"progress",modifiers:{sentiment:{source:"meta"}}},Card:{block:"card",rootAttributes:{"data-media-position":"top"},modifiers:{layout:{source:"meta",default:"stacked"}}},Embed:{block:"embed",defaultDensity:"compact",editHints:{fallback:"none"},postTransform(n){const e=n.attributes.class?.split(" ")[0]||"rf-embed",t=Nt(n,"embedUrl")||Nt(n,"url")||"",r=Nt(n,"title")||"Embedded content",i=Nt(n,"aspect")||"16:9",s=Nt(n,"provider")||"",[o,a]=i.split(":").map(Number),l=a&&o?a/o*100:56.25,c=n.children.filter(f=>{if(!Pn(f)||f.name!=="meta")return!0;const d=f.attributes["data-field"];return!["embedUrl","url","title","aspect","provider","type"].includes(d)}),u=[];return t&&u.push(rt("div",{class:`${e}__wrapper`,style:`padding-bottom: ${l}%`},[rt("iframe",{src:t,title:r,frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:"",loading:"lazy"},[])])),u.push(rt("div",{class:`${e}__fallback`},c)),{...n,attributes:{...n.attributes,...s?{"data-provider":s}:{}},children:u}}},Breadcrumb:{block:"breadcrumb",defaultDensity:"minimal",editHints:{items:"none"},modifiers:{separator:{source:"meta",default:"/",noBemClass:!0}},styles:{separator:{prop:"--separator",template:'"{}"'}}},BreadcrumbItem:{block:"breadcrumb-item",parent:"Breadcrumb"},Blog:{block:"blog",defaultDensity:"full",sections:{preamble:"preamble",headline:"title",blurb:"description",content:"body"},contentWrapper:{tag:"div",ref:"content"},modifiers:{layout:{source:"meta",default:"list"},sort:{source:"meta",default:"date-desc",noBemClass:!0},filter:{source:"meta",noBemClass:!0},limit:{source:"meta",noBemClass:!0},folder:{source:"meta",noBemClass:!0}},autoLabel:zu,editHints:{headline:"inline",blurb:"inline"}},Budget:{block:"budget",defaultDensity:"full",sections:{header:"header",preamble:"preamble",headline:"title",footer:"footer"},editHints:{headline:"inline",meta:"none","meta-item":"none"},modifiers:{currency:{source:"meta",default:"USD"},duration:{source:"meta"},showPerDay:{source:"meta",default:"true"},variant:{source:"meta",default:"detailed"}},structure:{header:{tag:"div",before:!0,conditionAny:["currency","duration"],children:[{tag:"div",ref:"meta",children:[{tag:"span",ref:"meta-item",metaText:"currency",condition:"currency",metaType:"category",metaRank:"primary"},{tag:"span",ref:"meta-item",metaText:"duration",label:"Duration:",condition:"duration",metaType:"temporal",metaRank:"secondary"}]}]}},postTransform(n){const e="rf-budget",t="rf-budget-category",r=n.attributes["data-currency"]||"USD",i=n.attributes["data-duration"]||"",s=n.attributes["data-show-per-day"]!=="false",o=kZ[r.toUpperCase()]||r+" ",a=dC(n.children,"budget-category");let l=0;for(const f of a){const d=f.attributes["data-label"]||"",h=f.attributes["data-subtotal"]||"0",g=parseFloat(h)||0;l+=g;const p=rt("div",{class:`${t}__header`},[rt("span",{class:`${t}__label`},[d]),rt("span",{class:`${t}__subtotal`},[_p(g,o)])]);f.children.unshift(p)}const c=[rt("div",{class:`${e}__total`},[rt("span",{class:`${e}__total-label`},["Total"]),rt("span",{class:`${e}__total-amount`},[_p(l,o)])])];if(i&&s){const f=xZ(i);if(f>0){const d=l/f;c.push(rt("div",{class:`${e}__per-day`},[rt("span",{class:`${e}__per-day-label`},["Per day"]),rt("span",{class:`${e}__per-day-amount`},[_p(d,o)])]))}}const u=rt("div",{class:`${e}__footer`},c);return{...n,children:[...n.children,u]}}},BudgetCategory:{block:"budget-category",parent:"Budget",modifiers:{estimate:{source:"meta",default:"false"},label:{source:"meta",noBemClass:!0},subtotal:{source:"meta",noBemClass:!0}},editHints:{label:"none",subtotal:"none"}},BudgetLineItem:{block:"budget-line-item",parent:"Budget"},Hint:{block:"hint",defaultDensity:"compact",modifiers:{hintType:{source:"meta",default:"note"}},contextModifiers:{hero:"in-hero",feature:"in-feature"},sections:{header:"header"},editHints:{icon:"none",title:"none"},structure:{header:{tag:"div",before:!0,children:[{tag:"span",ref:"icon",icon:{group:"hint",variant:"hintType"}},{tag:"span",ref:"title",metaText:"hintType"}]}}},Drawer:{block:"drawer",defaultDensity:"compact",modifiers:{side:{source:"meta",default:"right"},size:{source:"meta",default:"md"},shortcut:{source:"meta",noBemClass:!0}},sections:{header:"header",body:"body",footer:"footer"},editHints:{title:"inline",body:"none",close:"none",footer:"none"}},Figure:{block:"figure",defaultDensity:"compact",modifiers:{size:{source:"meta",default:"default"},align:{source:"meta",default:"center"}},sections:{caption:"description"},editHints:{caption:"inline"}},Gallery:{block:"gallery",defaultDensity:"full",childDensity:"compact",modifiers:{layout:{source:"meta",default:"grid"},lightbox:{source:"meta",default:"true",noBemClass:!0},gap:{source:"meta",default:"default",noBemClass:!0},columns:{source:"meta",noBemClass:!0}},styles:{columns:"--gallery-columns",gap:{prop:"--gallery-gap",transform:c0}},editHints:{items:"none"}},Sidenote:{block:"sidenote",defaultDensity:"full",modifiers:{variant:{source:"meta",default:"sidenote"}},sections:{body:"body"},editHints:{body:"inline"}},Compare:{block:"compare",defaultDensity:"full",modifiers:{layout:{source:"meta",default:"side-by-side"}},editHints:{panels:"none"}},Conversation:{block:"conversation",defaultDensity:"compact",editHints:{messages:"none"}},ConversationMessage:{block:"conversation-message",parent:"Conversation",modifiers:{align:{source:"meta",default:"left"}},editHints:{body:"inline"}},Annotate:{block:"annotate",defaultDensity:"full",modifiers:{variant:{source:"meta",default:"margin"}},sections:{body:"body"},editHints:{body:"none",notes:"none"}},AnnotateNote:{block:"annotate-note",parent:"Annotate",editHints:{body:"inline"}},Nav:{block:"nav",defaultDensity:"compact",modifiers:{layout:{source:"attribute"}},postTransform(n){return{...n,name:"rf-nav"}}},NavGroup:{block:"nav-group",parent:"Nav"},Pagination:{block:"pagination",defaultDensity:"compact",modifiers:{scope:{source:"meta",default:"siblings",noBemClass:!0}}},NavItem:{block:"nav-item",parent:"Nav",postTransform(n){let e="";const t=n.children.filter(i=>Pn(i)&&i.name==="span"&&i.attributes["data-field"]==="slug"?(e=i.children.filter(s=>typeof s=="string").join(""),!1):!0);if(e)return t.unshift(e),{...n,attributes:{...n.attributes,"data-slug":e},children:t};const r=t.map(i=>{if(Pn(i)&&i.name==="a"){const s=i.attributes.class||"";return{...i,attributes:{...i.attributes,class:["rf-nav-item__link",s].filter(Boolean).join(" ")}}}return i});return{...n,children:r}}},Diff:{block:"diff",modifiers:{mode:{source:"meta",default:"unified"}},editHints:{line:"none","gutter-num":"none","gutter-prefix":"none","line-content":"none"}},Chart:{block:"chart",defaultDensity:"compact",editHints:{data:"none"},postTransform(n){const e=n.attributes.class?.split(" ")[0]||"rf-chart",t=Nt(n,"type")||"bar",r=Nt(n,"title")||"",i=l0(n,"data")?.attributes?.content||"{}";let s={headers:[],rows:[]};try{s=JSON.parse(i)}catch{}const o=["var(--rf-color-info)","var(--rf-color-success)","var(--rf-color-warning)","var(--rf-color-danger)","#7c3aed","#0891b2"],a=600,l=300,c={top:30,right:20,bottom:40,left:50},u=a-c.left-c.right,f=l-c.top-c.bottom,d=s.rows.map(A=>A[0]||""),h=s.headers.slice(1),g=s.rows.map(A=>A.slice(1).map(y=>parseFloat(y)||0)),p=Math.max(...g.flat(),1),O=u/Math.max(d.length,1),v=O/Math.max(h.length+1,2),b=[];if(b.push(rt("line",{x1:String(c.left),y1:String(c.top),x2:String(c.left),y2:String(l-c.bottom),stroke:"var(--rf-color-border)","stroke-width":"1"},[])),b.push(rt("line",{x1:String(c.left),y1:String(l-c.bottom),x2:String(a-c.right),y2:String(l-c.bottom),stroke:"var(--rf-color-border)","stroke-width":"1"},[])),t==="bar")for(let A=0;A<d.length;A++){for(let y=0;y<h.length;y++){const w=g[A][y]/p*f;b.push(rt("rect",{x:String(c.left+A*O+y*v+v*.25),y:String(c.top+f-w),width:String(v*.75),height:String(w),style:`fill: ${o[y%o.length]}`,rx:"2"},[]))}b.push(rt("text",{x:String(c.left+A*O+O/2),y:String(l-c.bottom+20),"text-anchor":"middle","font-size":"12",fill:"var(--rf-color-muted)"},[d[A]]))}else if(t==="line"){for(let A=0;A<h.length;A++){const y=d.map((w,S)=>`${c.left+S*O+O/2},${c.top+f-g[S][A]/p*f}`).join(" ");b.push(rt("polyline",{points:y,fill:"none",style:`stroke: ${o[A%o.length]}`,"stroke-width":"2"},[]));for(let w=0;w<d.length;w++)b.push(rt("circle",{cx:String(c.left+w*O+O/2),cy:String(c.top+f-g[w][A]/p*f),r:"4",style:`fill: ${o[A%o.length]}`},[]))}for(let A=0;A<d.length;A++)b.push(rt("text",{x:String(c.left+A*O+O/2),y:String(l-c.bottom+20),"text-anchor":"middle","font-size":"12",fill:"var(--rf-color-muted)"},[d[A]]))}const _=[];if(r&&_.push(rt("figcaption",{class:`${e}__title`},[r])),_.push(rt("div",{class:`${e}__container`},[rt("svg",{viewBox:`0 0 ${a} ${l}`,class:`${e}__svg`},b)])),h.length>1){const A=h.map((y,w)=>rt("span",{class:`${e}__legend-item`},[rt("span",{class:`${e}__legend-color`,style:`background: ${o[w%o.length]};`},[]),y]));_.push(rt("div",{class:`${e}__legend`},A))}return{...n,children:_}}},PullQuote:{block:"pullquote",defaultDensity:"compact",modifiers:{align:{source:"meta",default:"center"},variant:{source:"meta",default:"default"}},sections:{body:"body"},editHints:{body:"inline"}},TextBlock:{block:"textblock",defaultDensity:"full",modifiers:{dropcap:{source:"meta"},columns:{source:"meta"},lead:{source:"meta"},align:{source:"meta",default:"left"}},sections:{body:"body"},editHints:{body:"none"}},MediaText:{block:"mediatext",defaultDensity:"full",modifiers:{align:{source:"meta",default:"left"},ratio:{source:"meta",default:"1:1"},wrap:{source:"meta"}},sections:{body:"body",media:"media"},mediaSlots:{media:"cover"},editHints:{media:"image",body:"none"}},Showcase:{block:"showcase",defaultDensity:"compact",childDensity:"compact",sections:{viewport:"body"},modifiers:{shadow:{source:"meta",default:"none"},bleed:{source:"meta",default:"none"},aspect:{source:"meta",noBemClass:!0},offset:{source:"meta",noBemClass:!0},place:{source:"meta",noBemClass:!0}},contextModifiers:{"bento-cell":"in-bento-cell"},styles:{offset:{prop:"--showcase-offset",transform:bj},aspect:"--showcase-aspect"},editHints:{viewport:"none"},postTransform(n,e){const t=e.modifiers.place;if(t){const{x:r,y:i}=kj(t),s=n.attributes.style||"",o=`--place-x: ${r}; --place-y: ${i}`;n.attributes.style=s?`${s}; ${o}`:o}return n}},TabGroup:{block:"tabs",defaultDensity:"full",sections:{preamble:"preamble",headline:"title",blurb:"description"},autoLabel:zu,editHints:{headline:"inline",eyebrow:"inline",blurb:"inline"}},Tab:{block:"tab",parent:"TabGroup",rootAttributes:{"data-state":"inactive"},editHints:{name:"inline"}},TabPanel:{block:"tab-panel",parent:"TabGroup",rootAttributes:{"data-state":"inactive"}},DataTable:{block:"datatable",defaultDensity:"compact",sections:{table:"body"},modifiers:{searchable:{source:"meta",default:"false"},sortable:{source:"meta"},pageSize:{source:"meta",default:"0"},defaultSort:{source:"meta"}},editHints:{table:"none"}},Form:{block:"form",defaultDensity:"full",sections:{body:"body"},modifiers:{variant:{source:"meta",default:"stacked"},action:{source:"meta"},method:{source:"meta",default:"POST"},success:{source:"meta"},error:{source:"meta"},honeypot:{source:"meta",default:"true"}},editHints:{body:"none"}},FormField:{block:"form-field",parent:"Form",modifiers:{fieldType:{source:"meta"}}},Reveal:{block:"reveal",defaultDensity:"full",modifiers:{mode:{source:"meta",default:"click"}},sections:{preamble:"preamble",headline:"title",blurb:"description"},autoLabel:zu,editHints:{headline:"inline",eyebrow:"inline",blurb:"inline",steps:"none"}},RevealStep:{block:"reveal-step",parent:"Reveal",rootAttributes:{"data-state":"closed"},editHints:{body:"none"}},Juxtapose:{block:"juxtapose",defaultDensity:"compact",modifiers:{variant:{source:"meta",default:"slider"},orientation:{source:"meta",default:"vertical",noBemClass:!0},position:{source:"meta",default:"50",noBemClass:!0},duration:{source:"meta",default:"1000",noBemClass:!0}},styles:{position:"--jx-position",duration:"--jx-duration"},editHints:{panels:"none"}},JuxtaposePanel:{block:"juxtapose-panel",parent:"Juxtapose",rootAttributes:{"data-state":"inactive"},editHints:{body:"none"}},Diagram:{block:"diagram",defaultDensity:"compact",editHints:{source:"code"},postTransform(n){const e=n.attributes.class?.split(" ")[0]||"rf-diagram",t=Nt(n,"language")||"mermaid",r=Nt(n,"title")||"",s=l0(n,"source")?.attributes?.content||"",o=[];r&&o.push(rt("figcaption",{class:`${e}__title`},[r]));const a=s?[rt("pre",{class:`${e}__source`},[rt("code",{},[s])])]:[];return o.push(rt("div",{class:`${e}__container`},a)),s&&o.push(rt("div",{"data-content":"source",style:"display:none"},[s])),{...n,name:"rf-diagram",attributes:{...n.attributes,"data-language":t},children:o}}},Tint:{block:"tint",parent:"*"},Bg:{block:"bg",parent:"*"},Region:{block:"region",parent:"Layout"},Sandbox:{block:"sandbox",defaultDensity:"compact",editHints:{source:"code"},postTransform(n){const e=Nt(n,"content")||"",t=Nt(n,"framework")||"",r=Nt(n,"dependencies")||"",i=Nt(n,"label")||"",s=Nt(n,"height")||"auto",o=Nt(n,"design-tokens")||"",a=Nt(n,"security-mode")||"trusted",l=Nt(n,"allow-js")||"true",c=Nt(n,"sandbox-origin")||"",u=[],f=[];for(const h of n.children){if(!Pn(h)){u.push(h);continue}if(h.name==="meta"){h.attributes?.["data-field"]==="source-panel"&&h.attributes?.["data-origin"]&&f.push(`${h.attributes["data-label"]||""} ${h.attributes["data-origin"]}`);continue}u.push(h)}const d=[...u.length>0?[rt("template",{"data-content":"fallback"},u)]:[],rt("template",{"data-content":"source"},[e])];return{...n,name:"rf-sandbox",attributes:{...n.attributes,"data-source-content":e,...t?{"data-framework":t}:{},...r?{"data-dependencies":r}:{},...i?{"data-label":i}:{},"data-height":s,...o?{"data-design-tokens":o}:{},...f.length>0?{"data-source-origins":f.join(`
335
- `)}:{},"data-security-mode":a,"data-allow-js":l,...c?{"data-sandbox-origin":c}:{}},children:d}}}}},AZ=SZ;function CZ(n){const e=new Map;for(const r of n)e.set(r.url,{url:r.url,title:r.title,children:[]});const t={url:"/",title:"Root",children:[]};for(const r of n){const i=e.get(r.url);r.url==="/"?(t.title=r.title,t.children=i.children,e.set("/",t)):(e.get(r.parentUrl)??t).children.push(i)}return t}function TZ(n){const e=new Map;for(const r of n)r.url!=="/"&&e.set(r.url,r.parentUrl);const t=new Map;for(const r of n){const i=[];let s=e.get(r.url);for(;s!==void 0;)i.unshift(s),s=e.get(s);t.set(r.url,i)}return t}function PZ(n){if(n==="/"||!n.includes("/"))return"/";const e=n.endsWith("/")?n.slice(0,-1):n,t=e.lastIndexOf("/");return t<=0?"/":e.slice(0,t+1)}function yg(n,e,t,r,i){if(!Te.isTag(n)){if(Array.isArray(n)){const a=n.map(l=>yg(l,e,t,r,i));return a.every((l,c)=>l===n[c])?n:a}return n}const s=n;if(s.attributes?.["data-rune"]==="breadcrumb"&&s.children?.some(l=>Te.isTag(l)&&l.attributes?.["data-field"]===BA))return EZ(s,e,t,r,i);const o=(s.children??[]).map(a=>yg(a,e,t,r,i));return o.every((a,l)=>a===s.children[l])?s:{...s,children:o}}function EZ(n,e,t,r,i){const s=t.get(e);if(s===void 0)return i.warn(`Breadcrumb auto: page URL "${e}" not found in page registry`,e),n;const a=n.children?.find(g=>Te.isTag(g)&&g.name==="meta"&&!g.attributes?.["data-field"])?.attributes?.content??"/",l=[];for(const g of s){const p=r.get(g);if(!p)continue;const O=new Te("span",{hidden:!0},[p.title]),v=new Te("a",{href:g},[p.title]);l.push(Ie({rune:"breadcrumb-item",schemaOrgType:"ListItem",tag:"li",properties:{name:O,url:v},children:[O,v]}))}const u=r.get(e)?.title??e,f=new Te("span",{},[u]);l.push(Ie({rune:"breadcrumb-item",schemaOrgType:"ListItem",tag:"li",properties:{name:f},children:[f]}));const d=new Te("meta",{content:a}),h=new Te("ol",{},l);return Ie({rune:"breadcrumb",schemaOrgType:"BreadcrumbList",tag:"nav",properties:{separator:d},refs:{items:h},children:[d,h]})}function wg(n,e,t,r){if(!Te.isTag(n)){if(Array.isArray(n)){const o=n.map(a=>wg(a,e,t,r));return o.every((a,l)=>a===n[l])?n:o}return n}const i=n;if(i.attributes?.["data-rune"]==="nav"&&i.children?.some(a=>Te.isTag(a)&&a.attributes?.["data-field"]===IA))return $Z(e,t,r,i);const s=(i.children??[]).map(o=>wg(o,e,t,r));return s.every((o,a)=>o===i.children[a])?i:{...i,children:s}}function $Z(n,e,t,r){const i=Array.from(e.values()).filter(c=>c.parentUrl===n&&c.url!==n);i.length===0&&t.warn(`Nav auto: page '${n}' has no registered child pages`,n);const s=i.map(c=>{const u=new Te("span",{"data-field":"slug"},[c.title]),f=new Te("a",{href:c.url},[u]);return Ie({rune:"nav-item",tag:"li",properties:{slug:u},children:[f]})}),o=new Te("ul",{},s),a=Ie({rune:"nav",tag:"nav",properties:{group:[],item:s},children:[o]}),l=["layout","data-layout","data-auto","data-source-path","data-collapsible","data-default-open"];for(const c of l){const u=r?.attributes?.[c];u!==void 0&&(a.attributes[c]=u)}return a}function ec(n){let e=n.trim();return e.length>1&&e.endsWith("/")&&(e=e.slice(0,-1)),e.endsWith("/index")&&(e=e.slice(0,-6)||"/"),e.toLowerCase()}function QZ(n){const e=n.split("/").filter(Boolean);return e.pop(),e.length===0?"/":"/"+e.join("/")+"/"}function LZ(n,e){if(n===e)return 0;if(n.length===0)return e.length;if(e.length===0)return n.length;const t=new Array(e.length+1),r=new Array(e.length+1);for(let i=0;i<=e.length;i++)t[i]=i;for(let i=1;i<=n.length;i++){r[0]=i;for(let s=1;s<=e.length;s++){const o=n[i-1]===e[s-1]?0:1;r[s]=Math.min(r[s-1]+1,t[s]+1,t[s-1]+o)}for(let s=0;s<=e.length;s++)t[s]=r[s]}return t[e.length]}function MZ(n,e,t){const r=e.endsWith("/")?e:e+"/",i=n.toLowerCase(),s=[],o=[],a=(r+n).replace(/\/+/g,"/").toLowerCase();for(const c of t.values()){const u=c.url,f=u.toLowerCase(),h=(u.split("/").filter(Boolean).pop()??"").toLowerCase();if(h===i&&f!==a){s.push(u);continue}if(f.startsWith(r.toLowerCase())){const g=LZ(i,h);g>0&&g<=2&&o.push({url:u,distance:g})}}return s.sort(),o.sort((c,u)=>c.distance-u.distance||c.url.localeCompare(u.url)),[...s,...o.map(c=>c.url)].slice(0,3)}function DZ(n,e,t){if(n.startsWith("/"))return{ok:!0,url:n};const r=e.endsWith("/")?e:e+"/",i=(r+n).replace(/\/+/g,"/"),s=ec(i);for(const a of t.values())if(ec(a.url)===s)return{ok:!0,url:a.url};const o=MZ(n.includes("/")?n.split("/").pop():n,r,t);return{ok:!1,reason:"not-found",attemptedUrl:i,suggestions:o}}function E0(n,e){let t=0;for(;t<n.length&&t<e.length&&n[t]===e[t];)t++;return t}function $c(n,e,t){const r=Array.from(e.values()).filter(i=>i.url.endsWith("/"+n)||i.url==="/"+n);return r.length===0?null:r.length===1?r[0].url:r.slice().sort((i,s)=>E0(s.url,t)-E0(i.url,t))[0].url}function Qc(n){const e=n.attributes?.["data-slug"];if(e)return String(e);const t=r=>{if(!Te.isTag(r)){if(Array.isArray(r))for(const s of r){const o=t(s);if(o)return o}return null}const i=r;if(i.name==="span"&&i.attributes?.["data-field"]==="slug"){const s=[];for(const o of i.children??[])typeof o=="string"&&s.push(o);return s.join("").trim()||null}for(const s of i.children??[]){const o=t(s);if(o)return o}return null};return t(n)}function qZ(n,e,t){const r=[],i=s=>{if(!Te.isTag(s)){Array.isArray(s)&&s.forEach(i);return}const o=s;if(o.attributes?.["data-rune"]==="nav-item"){const a=Lc(o);if(a)r.push(a);else{const l=Qc(o);if(l){const c=$c(l,e,t);c&&r.push(c)}}}(o.children??[]).forEach(i)};return(n.children??[]).forEach(i),r}function RZ(n){const e=t=>{if(typeof t=="string")return t;if(!Te.isTag(t)){if(Array.isArray(t))for(const i of t){const s=e(i);if(s)return s}return null}const r=t;if(r.attributes?.["data-field"]==="title"){const i=[];for(const s of r.children??[])typeof s=="string"&&i.push(s);if(i.length>0)return i.join("").trim()}for(const i of r.children??[]){const s=e(i);if(s)return s}return null};return e(n)??""}function IZ(n,e){for(const t of e){if(!t)continue;if(n===t)return!0;const r=t.endsWith("/")?t:t+"/";if(n.startsWith(r))return!0}return!1}function df(n,e,t){if(!Te.isTag(n)){if(Array.isArray(n)){const s=n.map(o=>df(o,e,t));return s.every((o,a)=>o===n[a])?n:s}return n}const r=n;if(r.attributes?.["data-rune"]==="nav"&&r.attributes?.["data-collapsible"]==="true"){const s=String(r.attributes?.["data-default-open"]??""),o=s?s.split(",").map(u=>u.trim()).filter(Boolean):[],a=[],l=u=>{if(!Te.isTag(u))return;const f=u;f.attributes?.["data-rune"]==="nav-group"&&a.push(f),(f.children??[]).forEach(l)};(r.children??[]).forEach(l);for(const u of a){if(u.attributes?.["data-collapsed"]!==NA)continue;const f=RZ(u),d=f&&o.includes(f),h=qZ(u,t,e),g=IZ(e,h);u.attributes["data-collapsed"]=d||g?"false":"true"}const c=(r.children??[]).map(u=>df(u,e,t));return c.every((u,f)=>u===r.children[f])?r:{...r,children:c}}const i=(r.children??[]).map(s=>df(s,e,t));return i.every((s,o)=>s===r.children[o])?r:{...r,children:i}}function $0(n,e,t){const r=e?.title??t??"",i=e?.description,s=e?.icon,o=e?.url??t??"",a=[];s&&a.push(new Te("rf-icon",{name:s,"data-name":"icon",class:"rf-nav-item__icon"},[])),a.push(new Te("span",{"data-name":"title",class:"rf-nav-item__title"},[r])),i&&a.push(new Te("span",{"data-name":"description",class:"rf-nav-item__description"},[i]));const l=o?new Te("a",{href:o,class:"rf-nav-item__link"},a):new Te("span",{class:"rf-nav-item__link"},a);return{...n,children:[l]}}function Lc(n){const e=t=>{if(!Te.isTag(t)){if(Array.isArray(t))for(const i of t){const s=e(i);if(s)return s}return null}const r=t;if(r.name==="a"&&r.attributes?.href)return String(r.attributes.href);for(const i of r.children??[]){const s=e(i);if(s)return s}return null};return e(n)}function NZ(n,e,t){const r=Lc(n);if(r){const s=/^[a-z]+:\/\//i.test(r);return{url:r,isExternal:s}}const i=Qc(n);if(i){const s=$c(i,e,t);return s?{url:s,isExternal:!1}:null}return null}function BZ(n,e){const t=(n.children??[]).map(r=>{if(!Te.isTag(r))return r;const i=r;if(i.name!=="a")return r;const s=(i.children??[]).some(l=>Te.isTag(l)&&l.attributes?.["data-name"]==="icon"),o=(i.children??[]).some(l=>Te.isTag(l)&&l.attributes?.["data-name"]==="description"),a=[...i.children??[]];return e.icon&&!s&&a.unshift(new Te("rf-icon",{name:e.icon,"data-name":"icon",class:"rf-nav-item__icon"},[])),e.description&&!o&&a.push(new Te("span",{"data-name":"description",class:"rf-nav-item__description"},[e.description])),{...i,children:a}});return{...n,children:t}}function _g(n,e,t){if(!Te.isTag(n)){if(Array.isArray(n)){const s=n.map(o=>_g(o,e,t));return s.every((o,a)=>o===n[a])?n:s}return n}const r=n;if(r.attributes?.["data-rune"]==="nav"){const o=(r.attributes?.["data-layout"]??r.attributes?.layout)==="cards",a=r.attributes?.["data-auto"]==="true";if(o||a){const l=u=>{if(!Te.isTag(u))return Array.isArray(u)?u.map(l):u;const f=u;if(f.attributes?.["data-rune"]==="nav-item"){const h=NZ(f,t,e);if(!h)return f;if(o){if(h.isExternal)return $0(f,null,h.url);const O=t.get(h.url),v=O?{url:O.url,title:O.title,description:O.description,icon:O.icon}:null;return $0(f,v,h.url)}if(h.isExternal)return f;const g=t.get(h.url);if(!g)return f;const p={url:g.url,title:g.title,description:g.description,icon:g.icon};return BZ(f,p)}const d=(f.children??[]).map(l);return d.every((h,g)=>h===f.children[g])?f:{...f,children:d}},c=(r.children??[]).map(l);return{...r,children:c}}}const i=(r.children??[]).map(s=>_g(s,e,t));return i.every((s,o)=>s===r.children[o])?r:{...r,children:i}}function jZ(n){return/^[a-z]+:\/\//i.test(n)||n.startsWith("mailto:")||n.startsWith("//")}function zZ(n,e,t,r){const i=e?` in ${e}`:"",s=`Nav item \`${n}\`${i} cannot be resolved (no page at \`${t}\`).`;if(r.length===0)return s;const o=["","Did you mean one of:",...r.map(a=>` - ${a}`),"","Use a multi-segment slug (e.g. `section/page`) or an explicit `[Label](/path)` link."];return s+`
336
- `+o.join(`
337
- `)}function ZZ(n,e,t,r){const i=n.attributes?.["data-source-path"],s=QZ(i??""),o=a=>{if(!Te.isTag(a)){if(Array.isArray(a)){const u=a.map(o);return u.every((f,d)=>f===a[d])?a:u}return a}const l=a;if(l.attributes?.["data-rune"]==="nav-item"){if(Lc(l))return l;const f=Qc(l);if(!f)return l;const d=DZ(f,s,e);if(!d.ok)return t.error(zZ(f,i,d.attemptedUrl,d.suggestions),r),l;const g=e.get(d.url)?.title??f,p=new Te("a",{href:d.url},[g]),O=(l.children??[]).filter(v=>{if(typeof v=="string")return!1;if(Te.isTag(v)){const b=v;if(b.name==="span"&&b.attributes?.["data-field"]==="slug")return!1}return!0});return{...l,children:[p,...O]}}const c=(l.children??[]).map(o);return c.every((u,f)=>u===l.children[f])?l:{...l,children:c}};return o(n)}function kg(n,e,t,r){if(!Te.isTag(n)){if(Array.isArray(n)){const o=n.map(a=>kg(a,e,t,r));return o.every((a,l)=>a===n[l])?n:o}return n}const i=n;if(i.attributes?.["data-rune"]==="nav")return ZZ(i,e,t,r);const s=(i.children??[]).map(o=>kg(o,e,t,r));return s.every((o,a)=>o===i.children[a])?i:{...i,children:s}}function XZ(n,e){const t=ec(e),r=s=>{const o=[],a=f=>{if(!Te.isTag(f)){Array.isArray(f)&&f.forEach(a);return}const d=f;if(d.name==="a"&&typeof d.attributes?.href=="string"){const h=String(d.attributes.href);jZ(h)||o.push({tag:d,href:h})}(d.children??[]).forEach(a)};(s.children??[]).forEach(a);let l=null;for(const{tag:f,href:d}of o)if(ec(d)===t){l=f;break}let c=null,u=0;for(const{tag:f,href:d}of o){if(f===l)continue;const h=ec(d);if(h==="/"&&t==="/")continue;h!==t&&(t.startsWith(h+"/")||h==="/"&&t.startsWith("/"))&&h.length>u&&(c=f,u=h.length)}return l&&(l.attributes["aria-current"]="page"),c&&(c.attributes["data-active"]="ancestor"),s},i=s=>{if(!Te.isTag(s))return Array.isArray(s)&&s.forEach(i),s;const o=s;return o.attributes?.["data-rune"]==="nav"?(r(o),o):((o.children??[]).forEach(i),o)};return i(n),n}function FZ(n,e,t){const r=[],i=s=>{if(!Te.isTag(s)){Array.isArray(s)&&s.forEach(i);return}const o=s;if(o.attributes?.["data-rune"]==="nav"){const a=o.attributes?.layout??o.attributes?.["data-layout"];if(a&&a!=="vertical"){(o.children??[]).forEach(i);return}const l=[],c=u=>{if(!Te.isTag(u)){Array.isArray(u)&&u.forEach(c);return}const f=u;f.attributes?.["data-rune"]==="nav-group"&&l.push(f),(f.children??[]).forEach(c)};if((o.children??[]).forEach(c),l.length===0){const u=[],f=d=>{if(!Te.isTag(d)){Array.isArray(d)&&d.forEach(f);return}const h=d;if(h.attributes?.["data-rune"]==="nav-item"){const g=Lc(h);if(g)/^[a-z]+:\/\//i.test(g)||u.push(g);else{const p=Qc(h);if(p){const O=$c(p,e,t);O&&u.push(O)}}}(h.children??[]).forEach(f)};(o.children??[]).forEach(f),u.length>0&&r.push(u)}else for(const u of l){const f=[],d=h=>{if(!Te.isTag(h)){Array.isArray(h)&&h.forEach(d);return}const g=h;if(g.attributes?.["data-rune"]==="nav-item"){const p=Lc(g);if(p)/^[a-z]+:\/\//i.test(p)||f.push(p);else{const O=Qc(g);if(O){const v=$c(O,e,t);v&&f.push(v)}}}(g.children??[]).forEach(d)};(u.children??[]).forEach(d),f.length>0&&r.push(f)}}(o.children??[]).forEach(i)};return i(n),r}function VZ(n,e,t){const r=e.get(n);if(!r)return[];const i=Array.from(e.values());let s;if(t==="section"){let o=n,a=r;for(;a&&a.parentUrl&&a.parentUrl!=="/";){const c=e.get(a.parentUrl);if(!c)break;o=c.url,a=c}const l=o.endsWith("/")?o:o+"/";s=i.filter(c=>c.url===o||c.url.startsWith(l))}else s=i.filter(o=>o.parentUrl===r.parentUrl);return s.sort((o,a)=>{const l=o.order??Number.POSITIVE_INFINITY,c=a.order??Number.POSITIVE_INFINITY;return l!==c?l-c:o.url.localeCompare(a.url)}),s.map(o=>({url:o.url,title:o.title}))}function WZ(n,e,t){const r=n.indexOf(e);if(r===-1)return{prev:null,next:null};const i=r>0?n[r-1]:null,s=r<n.length-1?n[r+1]:null,o=a=>{if(!a)return null;const l=t.get(a);return l?{url:l.url,title:l.title}:{url:a,title:a}};return{prev:o(i),next:o(s)}}function Q0(n,e,t){const r=e==="prev"?"←":"→",i=t??n.title,s=e==="prev"?[new Te("span",{"data-name":"marker"},[r]),new Te("span",{"data-name":"label"},[i])]:[new Te("span",{"data-name":"label"},[i]),new Te("span",{"data-name":"marker"},[r])];return new Te("a",{href:n.url,"data-direction":e,"data-name":e},s)}function xg(n,e,t,r){if(!Te.isTag(n)){if(Array.isArray(n)){const o=n.map(a=>xg(a,e,t,r));return o.every((a,l)=>a===n[l])?n:o}return n}const i=n;if(i.attributes?.["data-rune"]==="pagination"){if((i.children??[]).some(l=>Te.isTag(l)&&l.attributes?.["data-field"]===eg)){const l=(i.children??[]).find(S=>Te.isTag(S)&&S.attributes?.["data-field"]==="scope"),u=String(l?l.attributes?.content??"":i.attributes?.["data-scope"]??"")==="section"?"section":"siblings",f=(i.children??[]).find(S=>Te.isTag(S)&&S.attributes?.["data-field"]==="prev-label"),d=(i.children??[]).find(S=>Te.isTag(S)&&S.attributes?.["data-field"]==="next-label"),h=f?String(f.attributes.content??""):void 0,g=d?String(d.attributes.content??""):void 0;if(Array.from(t.values()).some(S=>S.parentUrl===e&&S.url!==e))return{...i,children:[]};let O=null;const v=FZ(r,t,e);for(const S of v)if(S.includes(e)){O=S;break}let b=null,_=null;if(O)({prev:b,next:_}=WZ(O,e,t));else{const S=VZ(e,t,u),C=S.findIndex(x=>x.url===e);C!==-1&&(b=C>0?S[C-1]:null,_=C<S.length-1?S[C+1]:null)}const A=[];b&&A.push(Q0(b,"prev",h)),_&&A.push(Q0(_,"next",g));const y=new Set([eg,"prev-label","next-label","scope"]),w=(i.children??[]).filter(S=>{if(!Te.isTag(S)||S.name!=="meta")return!0;const C=S.attributes?.["data-field"];return!y.has(C)});return{...i,children:[...w,...A]}}const a=(i.children??[]).map(l=>{if(!Te.isTag(l))return l;if(l.name==="a"&&typeof l.attributes?.href=="string"&&l.attributes.href.startsWith("__slug:")){const c=l.attributes.href.slice(7),u=$c(c,t,e);if(u){const d=t.get(u)?.title??c,h=(l.children??[]).map(g=>Te.isTag(g)&&g.attributes?.["data-name"]==="label"&&(g.children??[]).filter(O=>typeof O=="string").join("")===c?{...g,children:[d]}:g);return{...l,attributes:{...l.attributes,href:u},children:h}}}return l});return{...i,children:a}}const s=(i.children??[]).map(o=>xg(o,e,t,r));return s.every((o,a)=>o===i.children[a])?i:{...i,children:s}}function Sg(n,e){if(Te.isTag(n)){const t=e(n);if(t!==n)return t;const r=n.children.map(s=>Sg(s,e));return r.some((s,o)=>s!==n.children[o])?new Te(n.name,n.attributes,r):n}return Array.isArray(n)?n.map(t=>Sg(t,e)):n}function YZ(n){let e=n.trim();return e.startsWith("/")||(e="/"+e),e.endsWith("/")||(e+="/"),e}function UZ(n,e){return n.startsWith(e)?n.slice(e.length).replace(/\/$/,"").split("/").filter(Boolean).length===1:!1}function GZ(n){return!n||!n.trim()?[]:n.split(",").map(e=>{const t=e.indexOf(":");return t===-1?{field:e.trim(),value:""}:{field:e.slice(0,t).trim(),value:e.slice(t+1).trim()}})}function HZ(n,e){for(const{field:t,value:r}of e){const i=n.frontmatter[t];if(r===""){if(i==null)return!1}else if(Array.isArray(i)){if(!i.some(s=>String(s).toLowerCase()===r.toLowerCase()))return!1}else if(String(i??"").toLowerCase()!==r.toLowerCase())return!1}return!0}function KZ(n,e){const t=[...n];switch(e){case"date-asc":t.sort((r,i)=>(r.date||"").localeCompare(i.date||""));break;case"title-asc":t.sort((r,i)=>r.title.localeCompare(i.title));break;case"title-desc":t.sort((r,i)=>i.title.localeCompare(r.title));break;default:t.sort((r,i)=>(i.date||"").localeCompare(r.date||""));break}return t}function JZ(n){const t=[new Te("h3",{},[new Te("a",{href:n.url},[n.title])])];return n.date&&t.push(new Te("time",{datetime:n.date},[n.date])),n.description&&t.push(new Te("p",{},[n.description])),new Te("article",{"data-name":"post"},t)}function e7(n,e,t,r){let i=!1;const s=Sg(n,o=>{if(o.attributes["data-rune"]!=="blog")return o;const a=o.children.find(S=>Te.isTag(S)&&S.attributes["data-field"]==="folder"),l=o.children.find(S=>Te.isTag(S)&&S.attributes["data-field"]==="sort"),c=o.children.find(S=>Te.isTag(S)&&S.attributes["data-field"]==="filter"),u=o.children.find(S=>Te.isTag(S)&&S.attributes["data-field"]==="limit"),f=Te.isTag(a)?a.attributes.content:"",d=Te.isTag(l)?l.attributes.content:"date-desc",h=Te.isTag(c)?c.attributes.content:"",g=Te.isTag(u)?u.attributes.content:"",p=g?parseInt(g,10):void 0;if(!f)return t.warn("Blog rune missing folder attribute",r),o;const O=YZ(f),v=GZ(h);let b=e.filter(S=>!(S.draft||!UZ(S.url,O)||v.length>0&&!HZ(S,v)));b=KZ(b,d),p&&p>0&&(b=b.slice(0,p));const _=o.children.find(S=>Te.isTag(S)&&S.attributes["data-name"]==="posts");if(!Te.isTag(_))return o;const A=b.map(JZ);i=!0;const y=new Te(_.name,_.attributes,A),w=o.children.map(S=>S===_?y:S);return new Te(o.name,o.attributes,w)});return i?s:n}function t7(n={}){const e=n.xrefPatterns??[],t=n.embedConfig,r=n.repoUrl,i=n.repoBranch;return{preprocess:lZ,register(s,o,a){for(const l of s){const c=PZ(l.url),u=o.getById("page",l.url);u&&u.sourceUrl!==l.url&&a.warn(`Page '${l.url}' already registered from '${u.sourceUrl}'`,l.url),o.register({type:"page",id:l.url,sourceUrl:l.url,data:{title:l.title,url:l.url,parentUrl:c,draft:l.frontmatter.draft??!1,description:l.frontmatter.description,date:l.frontmatter.date,order:l.frontmatter.order,icon:l.frontmatter.icon}});for(const f of l.headings){const d=`${l.url}#${f.id}`,h=o.getById("heading",d);h&&h.sourceUrl!==l.url&&a.warn(`Heading '${d}' already registered from '${h.sourceUrl}'`,l.url),o.register({type:"heading",id:d,sourceUrl:l.url,data:{level:f.level,text:f.text,headingId:f.id,url:l.url}})}}I8(s,o,a)},aggregate(s,o){const a=s.getAll("page"),l=a.map(g=>({url:g.data.url,title:g.data.title,parentUrl:g.data.parentUrl,description:g.data.description,icon:g.data.icon,order:g.data.order})),c=CZ(l),u=TZ(l),f=new Map(l.map(g=>[g.url,g])),d=new Map;for(const g of s.getAll("heading"))d.set(g.id,g.data);const h=a.map(g=>({title:g.data.title||"",url:g.data.url||g.id,date:g.data.date||"",description:g.data.description||"",draft:g.data.draft||!1,frontmatter:g.data}));return{pageTree:c,breadcrumbPaths:u,pagesByUrl:f,headingIndex:d,allPosts:h,registry:s,xrefPatterns:e,embedConfig:t,repoUrl:r,repoBranch:i}},postProcess(s,o,a){const l=o.__core__;if(!l)return s;let c=yg(s.renderable,s.url,l.breadcrumbPaths,l.pagesByUrl,a);c=wg(c,s.url,l.pagesByUrl,a),c=kg(c,l.pagesByUrl,a,s.url),c=df(c,s.url,l.pagesByUrl),c=_g(c,s.url,l.pagesByUrl),c=xg(c,s.url,l.pagesByUrl,c),c=XZ(c,s.url),c=e7(c,l.allPosts,a,s.url),c=B8(c),c=K8(c,s.url,l.repoUrl,l.repoBranch,a),c=nz(c,s.url,l.registry,a),c=z8(c,s.url,l.registry,l.embedConfig?.projectRoot,a),c=gZ(c,s.url,l.registry,l.xrefPatterns??[],l.embedConfig,a),c=Rz(c,s.url,l.registry,l.embedConfig,a),c=Zz(c,s.url,l.registry,l.embedConfig,a),c=Yz(c,s.url,l.registry,l.embedConfig,a),c=oZ(c,s.url,l.registry,l.xrefPatterns??[],a);const u=uZ(c===s.renderable?s:{...s,renderable:c});dZ(u.renderable);const f=hZ(u.renderable);return f.length>0||u.headings.length>0?{...u,headings:f}:u}}}t7();const n7={nav:Ve({name:"nav",schema:S6,description:"Navigation structure with page slug references and optional grouping",typeName:"Nav",category:"Site",snippet:["{% nav %}","## ${1:Section}","","- ${2:page-slug}","- ${3:another-page}","{% /nav %}"]}),region:Ve({name:"region",schema:T6,description:"Named content block within a layout definition",snippet:['{% region name="${1:header}" %}',"$0","{% /region %}"]}),layout:Ve({name:"layout",schema:E6,description:"Layout definition containing named regions",category:"Site",snippet:["{% layout %}",'{% region name="${1:header}" %}',"$0","{% /region %}","{% /layout %}"]}),codegroup:Ve({name:"codegroup",schema:a6,description:"Tabbed code block with language tabs",typeName:"CodeGroup",category:"Code & Data",snippet:["{% codegroup %}","```${1:js}","$0","```","","```${2:ts}","","```","{% /codegroup %}"]}),error:Ve({name:"error",schema:Wj,description:"Error reporting table",typeName:"Error",category:"Semantic"}),grid:Ve({name:"grid",aliases:["columns"],schema:t6,description:"Grid layout container with configurable columns and rows",typeName:"Grid",category:"Layout",snippet:["{% grid columns=${1:2} %}","${2:First column content}","","---","","${3:Second column content}","{% /grid %}"]}),hint:Ve({name:"hint",aliases:["callout","alert"],schema:f6,description:"Callout/admonition block with type variants (note, warning, caution, check)",typeName:"Hint",category:"Content",snippet:['{% hint type="${1|note,warning,caution,check|}" %}',"$0","{% /hint %}"]}),tab:Ve({name:"tab",schema:O6,description:"Individual tab within a tab group",typeName:"Tab"}),tabs:Ve({name:"tabs",schema:b6,description:"Tabbed interface with tab panels",typeName:"TabGroup",category:"Layout",snippet:["{% tabs %}","## ${1:Tab One}","","${2:Content for tab one.}","","## ${3:Tab Two}","","${4:Content for tab two.}","{% /tabs %}"]}),details:Ve({name:"details",schema:Q6,description:"Collapsible disclosure block for supplementary content",typeName:"Details",category:"Content",snippet:['{% details summary="${1:Click to expand}" %}',"$0","{% /details %}"]}),drawer:Ve({name:"drawer",schema:q6,description:"Modal side panel addressed by id. Triggered by xrefs anywhere on the page; falls back to in-flow rendering without JS.",typeName:"Drawer",category:"Layout",snippet:['{% drawer id="${1:auth-explainer}" title="${2:Auth system}" %}',"$0","{% /drawer %}"]}),figure:Ve({name:"figure",schema:N6,description:"Enhanced image with caption, attribution, and sizing",seoType:"ImageObject",typeName:"Figure",schemaOrgType:"ImageObject",category:"Content",snippet:['{% figure size="${1|medium,small,large,full|}" %}',"![${2:Alt text}](${3:/path/to/image.png})","","${4:Caption text}","{% /figure %}"]}),gallery:Ve({name:"gallery",schema:z6,description:"Multi-image container with grid, carousel, or masonry layout and optional lightbox",seoType:"ImageGallery",typeName:"Gallery",schemaOrgType:"ImageGallery",category:"Content",snippet:['{% gallery layout="${1|grid,carousel,masonry|}" %}',"![${2:Alt text}](${3:/path/to/image1.png})","","![${4:Alt text}](${5:/path/to/image2.png})","{% /gallery %}"]}),accordion:Ve({name:"accordion",aliases:["faq"],schema:X6,description:"Collapsible accordion sections where headings become toggleable headers",seoType:"FAQPage",typeName:"Accordion",schemaOrgType:"FAQPage",category:"Layout",snippet:["{% accordion %}","## ${1:First Question}","","${2:Answer to the first question.}","","## ${3:Second Question}","","${4:Answer to the second question.}","{% /accordion %}"]}),"accordion-item":Ve({name:"accordion-item",schema:Z6,description:"Individual accordion section",typeName:"AccordionItem",schemaOrgType:"Question"}),toc:Ve({name:"toc",aliases:["table-of-contents"],schema:F6,description:"Auto-generated table of contents from document headings",typeName:"TableOfContents",category:"Site",snippet:["{% toc /%}"]}),embed:Ve({name:"embed",schema:Y6,description:"Embedded content from external services (YouTube, Twitter, CodePen, Spotify)",seoType:"VideoObject",typeName:"Embed",schemaOrgType:"VideoObject",category:"Content",snippet:['{% embed url="${1:https://}" /%}']}),breadcrumb:Ve({name:"breadcrumb",schema:U6,description:"Navigation breadcrumb trail showing page hierarchy",seoType:"BreadcrumbList",typeName:"Breadcrumb",schemaOrgType:"BreadcrumbList",category:"Site",snippet:["{% breadcrumb /%}"]}),pagination:Ve({name:"pagination",schema:G6,description:"Sequential prev/next links for ordered docs and tutorials",typeName:"Pagination",category:"Site",snippet:["{% pagination auto /%}"]}),budget:Ve({name:"budget",schema:l9,description:"Structured cost breakdown with categories, line items, and auto-calculated totals",seoType:"ItemList",typeName:"Budget",schemaOrgType:"ItemList",category:"Semantic",snippet:["{% budget %}","## ${1:Category}","","- ${2:Item description}: \\$${3:100}","- ${4:Another item}: \\$${5:200}","{% /budget %}"]}),"budget-category":Ve({name:"budget-category",schema:s9,description:"Cost category within a budget containing line items",typeName:"BudgetCategory"}),"budget-line-item":Ve({name:"budget-line-item",schema:n9,description:"Individual budget line item with description and amount",typeName:"BudgetLineItem"}),compare:Ve({name:"compare",schema:u9,description:"Side-by-side code comparison with labeled panels",typeName:"Compare",category:"Code & Data",snippet:["{% compare %}","```${1:js}","${2:// Before}","```","","```${3:js}","${4:// After}","```","{% /compare %}"]}),datatable:Ve({name:"datatable",aliases:["data-table"],schema:f9,description:"Interactive data table with sorting, filtering, and pagination from a Markdown table",seoType:"Dataset",typeName:"DataTable",schemaOrgType:"Dataset",category:"Code & Data",snippet:["{% datatable %}","| ${1:Column A} | ${2:Column B} | ${3:Column C} |","|---|---|---|","| ${4:Data} | ${5:Data} | ${6:Data} |","{% /datatable %}"]}),diff:Ve({name:"diff",schema:b9,description:"Side-by-side or unified diff view between two code blocks",typeName:"Diff",category:"Code & Data",snippet:["{% diff %}","```${1:js}","${2:// Before}","```","","```${3:js}","${4:// After}","```","{% /diff %}"]}),snippet:Ve({name:"snippet",schema:l6,description:"Embed a project file as a syntax-highlighted code block. Composes inside codegroup, diff, and any future fence-consuming rune via pre-resolve (SPEC-062).",typeName:"Snippet",category:"Code & Data",snippet:['{% snippet path="${1:src/lib/foo.ts}" /%}']}),chart:Ve({name:"chart",schema:_9,description:"Chart visualization from a Markdown table. First column becomes axis labels, header row becomes series names.",typeName:"Chart",category:"Code & Data",snippet:['{% chart type="${1|bar,line,pie,area|}" %}',"| ${2:Label} | ${3:Series A} | ${4:Series B} |","|---|---|---|","| ${5:Item 1} | ${6:10} | ${7:20} |","| ${8:Item 2} | ${9:30} | ${10:15} |","{% /chart %}"]}),diagram:Ve({name:"diagram",schema:x9,description:"Diagram rendering from Mermaid, PlantUML, or ASCII art code blocks",typeName:"Diagram",category:"Code & Data",snippet:['{% diagram language="${1|mermaid,plantuml,ascii|}" %}',"```${1:mermaid}","$0","```","{% /diagram %}"]}),sidenote:Ve({name:"sidenote",aliases:["footnote","marginnote"],schema:C9,description:"Margin note or footnote displayed alongside the main content",typeName:"Sidenote",category:"Content",snippet:["{% sidenote %}","$0","{% /sidenote %}"]}),conversation:Ve({name:"conversation",aliases:["dialogue","chat"],schema:E9,description:"Chat/dialogue display where blockquotes become alternating speaker messages",typeName:"Conversation",category:"Semantic",snippet:["{% conversation %}","> **${1:Alice}**: ${2:Hello!}","","> **${3:Bob}**: ${4:Hi there!}","{% /conversation %}"]}),"conversation-message":Ve({name:"conversation-message",schema:T9,description:"Individual message within a conversation",typeName:"ConversationMessage"}),reveal:Ve({name:"reveal",schema:L9,description:"Progressive disclosure where headings become reveal steps shown one at a time",typeName:"Reveal",category:"Layout",snippet:["{% reveal %}","## ${1:Step One}","","${2:Content revealed first.}","","## ${3:Step Two}","","${4:Content revealed next.}","{% /reveal %}"]}),"reveal-step":Ve({name:"reveal-step",schema:Q9,description:"Individual step within a reveal sequence",typeName:"RevealStep"}),juxtapose:Ve({name:"juxtapose",schema:q9,description:"Side-by-side comparison with interactive reveal (slider, toggle, fade, or auto)",typeName:"Juxtapose",category:"Layout"}),annotate:Ve({name:"annotate",schema:B9,description:"Content with margin annotations. Nested note tags appear as margin notes alongside the main text.",typeName:"Annotate",category:"Layout",snippet:["{% annotate %}","${1:Main content here.}","","{% note %}","${2:Margin note content.}","{% /note %}","","${3:More main content.}","{% /annotate %}"]}),note:Ve({name:"note",schema:I9,description:"Annotation note within an annotate block",typeName:"AnnotateNote"}),form:Ve({name:"form",aliases:["contact-form"],schema:G9,description:"Accessible HTML form from Markdown. Lists become input fields with smart type inference, blockquotes followed by lists become select/radio/checkbox groups.",typeName:"Form",category:"Content",snippet:['{% form action="${1:/api/contact}" %}',"- Name","- Email","- Message","","**${2:Submit}**","{% /form %}"]}),"form-field":Ve({name:"form-field",schema:Y9,description:"Individual form field with inferred type",typeName:"FormField"}),sandbox:Ve({name:"sandbox",schema:n8,description:"Isolated HTML/CSS/JS rendering in an iframe with optional framework loading",typeName:"Sandbox",category:"Code & Data",snippet:['{% sandbox framework="${1|,tailwind,bootstrap,bulma,pico|}" %}',"$0","{% /sandbox %}"]}),pullquote:Ve({name:"pullquote",aliases:["pull-quote"],schema:l8,description:"Decorative pull quote for magazine-style emphasis with float and block modes",typeName:"PullQuote",category:"Content",snippet:['{% pullquote variant="${1|default,accent,editorial|}" %}',"> ${2:Quote text to emphasize.}","{% /pullquote %}"]}),textblock:Ve({name:"textblock",aliases:["text-block","prose"],schema:u8,description:"Text formatting block with drop caps, multi-column layout, lead paragraphs, and alignment control",typeName:"TextBlock",category:"Content",snippet:["{% textblock dropcap %}","${1:Formatted text content with drop cap styling.}","{% /textblock %}"]}),mediatext:Ve({name:"mediatext",aliases:["media-text"],schema:h8,description:"Image and text side by side with configurable ratio and optional text wrapping",typeName:"MediaText",category:"Layout",snippet:['{% mediatext align="${1|left,right|}" ratio="${2|1:1,1:2,2:1|}" %}',"![${3:Alt text}](${4:/path/to/image.png})","","${5:Text content displayed alongside the image.}","{% /mediatext %}"]}),icon:Ve({name:"icon",schema:s8,description:"Inline icon resolved by name from the theme icon registry. Self-closing.",category:"Content",snippet:['{% icon name="${1:icon-name}" /%}']}),tint:Ve({name:"tint",schema:O8,description:"Section-level colour override via CSS custom properties. Declared as first child of a block rune.",typeName:"Tint",snippet:["{% tint %}","- background: ${1:#1a1a2e}","- primary: ${2:#e94560}","- accent: ${3:#0f3460}","{% /tint %}"]}),showcase:Ve({name:"showcase",schema:y8,description:"Media presentation wrapper with shadow, bleed displacement, and aspect ratio enforcement",typeName:"Showcase",category:"Layout",snippet:['{% showcase shadow="${1|none,soft,hard,elevated|}" %}',"$0","{% /showcase %}"]}),bg:Ve({name:"bg",schema:w8,description:"Background image/video directive — modifies parent section backdrop",typeName:"Bg",snippet:['{% bg src="${1:/path/to/image.jpg}" overlay="${2:rgba(0,0,0,0.5)}" /%}']}),blog:Ve({name:"blog",schema:x8,description:"Blog post listing with filtering, sorting, and multiple layouts. Displays pages from a content folder as a navigable blog index.",seoType:"Blog",typeName:"Blog",schemaOrgType:"Blog",category:"Semantic"}),xref:Ve({name:"xref",aliases:["ref"],schema:A8,description:"Inline cross-reference that resolves an entity by ID or name from the registry. Self-closing."}),expand:Ve({name:"expand",schema:T8,description:"Substitute a registered entity's source content inline. Reads the entity's sourceFile via the plan plugin (or any plugin that registers extractable entities) and inlines it. Symmetric with `xref`: same lookup chain, different output (content rather than a link).",typeName:"Expand",category:"Content",snippet:['{% expand "${1:SPEC-001}" /%}']}),badge:Ve({name:"badge",schema:hz,description:"Inline pill that flags a piece of content (status, category, recency, tag). Visual variant from the universal metadata-system dimensions (sentiment, rank, type).",typeName:"Badge",category:"Content",snippet:['{% badge sentiment="${1|positive,negative,caution,neutral|}" %}',"${2:Label}","{% /badge %}"]}),collection:Ve({name:"collection",schema:E8,description:"Render a list, grid, or table of registry entities — the plural counterpart to ref/expand. Queries the registry by type with a field:value filter, sort, group, and limit; projects fields into a built-in layout or a per-item body template ($item bound).",typeName:"Collection",category:"Content",snippet:['{% collection type="${1:work}" filter="${2:status:ready}" sort="${3:priority}" /%}']}),relationships:Ve({name:"relationships",schema:$8,description:"Render an entity's relationship edges, grouped by kind — the plural-graph counterpart to ref/expand. Reads the registry relationship graph for `of` (an id, e.g. of=$item.id); each item is a related entity with its edge $kind bound. Generic over kind, so it serves any domain (plan, storytelling, …).",typeName:"Relationships",category:"Content",snippet:['{% relationships of="${1:WORK-1}" /%}']}),aggregate:Ve({name:"aggregate",schema:L8,description:'Project numbers — counts (and per-group breakdowns) over the registry — beside collection (items) and relationships (edges). Two modes: a no-body inline integer (`{% aggregate type="work" filter="status:done" /%}`) or a body-zoned form whose preamble / template / fallback zones bind `$item` to a totals / per-group / zeros projection. Use the optional `value` sub-filter (e.g. `value="status:done"`) to drive a progress-bar ratio without a second query.',typeName:"Aggregate",category:"Content",snippet:['{% aggregate type="${1:work}" filter="${2:status:done}" /%}']}),"file-ref":Ve({name:"file-ref",schema:M8,description:'Path-based inline reference to a project file — third member of the Registry family beside `xref` (id → link) and `expand` (id → inlined content). Resolves to a deep-link `<a>` pointing at `{repoUrl}/blob/{repoBranch}/{path}#L{start}-L{end}` on GitHub. With `preview="drawer"`, hoists a drawer containing the file\'s snippet and a "View source on GitHub →" footer link, leaving an inline link at the call site that opens it.',typeName:"FileRef",category:"Content",snippet:['{% file-ref path="${1:packages/types/src/token-contract.ts}" lines="${2:42-58}" label="${3:ThemeTokensConfig}" /%}']}),progress:Ve({name:"progress",schema:az,description:"A generic completion bar. Renders a ratio from supplied numbers — value+max (or percent) — with an optional body label; computes nothing itself. Feed it an aggregate (e.g. value=$item.data.progressDone max=$item.data.progressTotal).",typeName:"Progress",category:"Content",snippet:['{% progress value="${1:3}" max="${2:10}" /%}']}),card:Ve({name:"card",schema:lz,description:"A generic, self-contained content card. The body splits on `---` into [media] / body / [footer]: the media zone holds any content (image, codegroup, sandbox, …) and lays out beside the body on wide screens / as a full-bleed header on mobile; the footer is a muted meta row. Optional `href` makes the whole card a link. Knows nothing about the registry — usable standalone or inside a collection body template.",typeName:"Card",category:"Content",snippet:['{% card href="${1:/posts/slug/}" %}',"### ${2:Title}","${3:A short summary.}","{% /card %}"]})},L0={...mz(n7),link:EA,...z.tags},r7={heading:VB,paragraph:WB,fence:YB,list:UB,item:GB,em:HB,strong:KB,text:JB,link:EA,hardbreak:ej,image:tj,table:nj,thead:z.nodes.thead,tbody:z.nodes.tbody,th:z.nodes.th,tr:z.nodes.tr,error:z.nodes.error},i7=new Set(["nav","nav-group","nav-item"]);function s7(n,e,t){const r={...n.runes};for(const[i,s]of Object.entries(AZ.runes)){if(!r[i])continue;const o={};s.postTransform&&(o.postTransform=s.postTransform),s.styles&&(o.styles=s.styles),Object.keys(o).length&&(r[i]={...r[i],...o})}if(e)for(const[i,s]of Object.entries(e))r[i]&&(r[i]={...r[i],postTransform:s});if(t)for(const[i,s]of Object.entries(t))r[i]&&(r[i]={...r[i],styles:s});return{...n,runes:r}}function hC(n,e,t,r,i,s,o){const a=z.parse(n),l=s7(e,i,o),c=r?{...L0,...r}:L0,u=z.transform(a,{tags:c,nodes:r7,variables:{__source:n,__icons:l.icons}});let f=Gz(u);s&&(f=Ag(f,s));const d=pC(f);let g=Sj(l)(f);return t&&(g=t(g)),{html:Mj(g),isComponent:d}}function pC(n){return n==null||typeof n=="string"||typeof n=="number"?!1:Array.isArray(n)?n.some(pC):"attributes"in n&&n.attributes?.["data-rune"]?i7.has(n.attributes["data-rune"]):!1}function Ag(n,e){if(n==null||typeof n=="string"||typeof n=="number")return n;if(Array.isArray(n))return n.map(r=>Ag(r,e));const t=n;if(t.attributes?.["data-rune"]==="sandbox"){const i=e.design?.contexts??{},o=t.children?.find(l=>l?.attributes?.["data-field"]==="context")?.attributes?.content??"default",a=i[o];if(a){const l={$$mdtype:"Tag",name:"meta",attributes:{"data-field":"design-tokens",content:JSON.stringify(a)},children:[]};return{...t,children:[...t.children??[],l]}}}if(t.children?.length){const r=t.children.map(i=>Ag(i,e));return{...t,children:r}}return t}function o7(n){return n.hasAttribute("x-data")||n.hasAttribute("data-controller")}let a7=0;function to(n){return`${n}-${++a7}`}const l7="http://www.w3.org/2000/svg",M0='<rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/>',c7='<polyline points="20 6 9 17 4 12"/>';function kp(n){const e=document.createElementNS(l7,"svg");return e.setAttribute("width","16"),e.setAttribute("height","16"),e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("fill","none"),e.setAttribute("stroke","currentColor"),e.setAttribute("stroke-width","2"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.innerHTML=n,e}function u7(n){const e=n.getAttribute("data-copy-selector");if(e){const t=n.querySelectorAll(e);return Array.from(t).map(r=>r.textContent??"").join(`
338
- `)}return n.textContent??""}function f7(n){const e=n.querySelectorAll("pre"),t=[];for(const r of e){const i=r.parentElement;if(i?.classList.contains("rf-codeblock")&&i.querySelector(":scope > .rf-codeblock__copy"))continue;const s=document.createElement("button");s.className="rf-codeblock__copy",s.type="button",s.setAttribute("aria-label","Copy code"),s.appendChild(kp(M0));let o;const a=()=>{const c=u7(r);navigator.clipboard.writeText(c).then(()=>{s.innerHTML="",s.appendChild(kp(c7)),s.setAttribute("aria-label","Copied"),s.classList.add("rf-codeblock__copy--copied"),o&&clearTimeout(o),o=setTimeout(()=>{s.innerHTML="",s.appendChild(kp(M0)),s.setAttribute("aria-label","Copy code"),s.classList.remove("rf-codeblock__copy--copied")},2e3)})};s.addEventListener("click",a);const l=r.parentElement?.classList.contains("rf-codeblock")?r.parentElement:null;if(l)l.appendChild(s),t.push(()=>{s.removeEventListener("click",a),o&&clearTimeout(o),s.remove()});else{const c=document.createElement("div");c.className="rf-codeblock",r.parentNode?.insertBefore(c,r),c.appendChild(r),c.appendChild(s),t.push(()=>{s.removeEventListener("click",a),o&&clearTimeout(o),c.parentNode?.insertBefore(r,c),c.remove()})}}return()=>t.forEach(r=>r())}function D0(n){const e=Array.from(n.querySelectorAll("details"));if(e.length===0)return()=>{};const t=n.hasAttribute("data-multiple"),r=[];for(const o of e){const a=o.querySelector("summary");if(!a)continue;const l=to("rf-accordion-panel"),c=to("rf-accordion-trigger");a.id=c,a.setAttribute("aria-expanded",String(o.open)),o.setAttribute("data-state",o.open?"open":"closed"),a.setAttribute("data-state",o.open?"active":"inactive");const u=Array.from(o.children).find(d=>d instanceof HTMLElement&&d.tagName!=="SUMMARY");u&&(u.id=l,u.setAttribute("role","region"),u.setAttribute("aria-labelledby",c),a.setAttribute("aria-controls",l));const f=()=>{if(a.setAttribute("aria-expanded",String(o.open)),o.setAttribute("data-state",o.open?"open":"closed"),a.setAttribute("data-state",o.open?"active":"inactive"),!t&&o.open){for(const d of e)if(d!==o&&d.open){d.open=!1;const h=d.querySelector("summary");h?.setAttribute("aria-expanded","false"),d.setAttribute("data-state","closed"),h?.setAttribute("data-state","inactive")}}};o.addEventListener("toggle",f),r.push(()=>o.removeEventListener("toggle",f))}const i=e.map(o=>o.querySelector("summary")).filter(o=>o!==null),s=o=>{const a=o.target,l=i.indexOf(a);if(l===-1)return;let c=null;switch(o.key){case"ArrowDown":c=(l+1)%i.length;break;case"ArrowUp":c=(l-1+i.length)%i.length;break;case"Home":c=0;break;case"End":c=i.length-1;break;default:return}c!==null&&(o.preventDefault(),i[c].focus())};return n.addEventListener("keydown",s),r.push(()=>n.removeEventListener("keydown",s)),()=>r.forEach(o=>o())}const Ka=new Map,q0=new WeakSet;function d7(n){let e=Ka.get(n);return e||(e=new Map,Ka.set(n,e)),e}function h7(n){const e=n.split("+").map(i=>i.trim().toLowerCase()).filter(Boolean);if(e.length===0)return null;const t=e[e.length-1];if(!t)return null;const r=new Set(e.slice(0,-1));return{key:t,cmd:r.has("cmd")||r.has("meta"),ctrl:r.has("ctrl")||r.has("control"),alt:r.has("alt")||r.has("option"),shift:r.has("shift")}}function p7(n,e){if(e.key.toLowerCase()!==n.key)return!1;const t=e.metaKey||e.ctrlKey,r=n.cmd||n.ctrl;return!(r&&!t||!r&&t||n.alt!==e.altKey||n.shift!==e.shiftKey)}function m7(n){const e=n.activeElement;if(!e)return!1;const t=e.tagName;return!!(t==="INPUT"||t==="TEXTAREA"||t==="SELECT"||e.isContentEditable)}function g7(n){const e=n.ownerDocument;if(!e||!e.defaultView)return()=>{};const t=e.defaultView,r=n instanceof t.HTMLDialogElement?n:O7(n);if(!r)return()=>{};const i=r.id;if(!i)return()=>{};const s=r.querySelector(".rf-drawer__close");s&&(s.hidden=!1);const o=r.getAttribute("data-shortcut")??void 0,a=o?h7(o)??void 0:void 0,l=d7(e);if(l.has(i))return()=>{};if(a)for(const O of l.values())O.shortcut&&I0(O.shortcut)===I0(a)&&console.warn(`[refrakt drawer] shortcut "${o}" is registered by drawers "${O.id}" and "${i}"; the later one wins.`);l.set(i,{dialog:r,id:i,shortcut:a});const c=[],u=`#${i}`,f=O=>{O.preventDefault(),Cg(r)},d=[];if(e.querySelectorAll('a[data-target-type="drawer"]').forEach(O=>{const v=O.getAttribute("href")??"";(v===u||v.endsWith(u))&&(O.addEventListener("click",f),d.push(O))}),c.push(()=>{for(const O of d)O.removeEventListener("click",f)}),s){const O=()=>hf(r);s.addEventListener("click",O),c.push(()=>s.removeEventListener("click",O))}const h=O=>{O.target===r&&hf(r)};r.addEventListener("click",h),c.push(()=>r.removeEventListener("click",h));const g=O=>{O.preventDefault(),hf(r)};r.addEventListener("cancel",g),c.push(()=>r.removeEventListener("cancel",g));const p=()=>{r.setAttribute("data-state","closed"),t.location.hash===u&&t.history.replaceState(null,"",t.location.pathname+t.location.search),R0(e)};return r.addEventListener("close",p),c.push(()=>r.removeEventListener("close",p)),t.location.hash===u&&t.queueMicrotask(()=>{r.open||Cg(r)}),q0.has(e)||(q0.add(e),y7(e)),()=>{for(const O of c)O();l.delete(i),R0(e)}}function O7(n){const e=n.ownerDocument;if(!e)return null;const t=e.createElement("dialog");for(const r of Array.from(n.attributes))t.setAttribute(r.name,r.value);for(;n.firstChild;)t.appendChild(n.firstChild);return n.parentNode&&n.parentNode.replaceChild(t,n),t.setAttribute("data-state","closed"),t}function Cg(n){const e=n.ownerDocument;if(!e||!e.defaultView)return;const t=e.defaultView,r=Ka.get(e);if(r)for(const i of r.values())i.dialog!==n&&i.dialog.open&&i.dialog.close();if(!n.open)try{n.showModal()}catch{n.setAttribute("open","")}if(n.setAttribute("data-state","open"),b7(e),n.id){const i=`#${n.id}`;t.location.hash!==i&&t.history.replaceState(null,"",t.location.pathname+t.location.search+i)}}const v7=280;function hf(n){if(!n.open||n.getAttribute("data-state")==="closing")return;n.setAttribute("data-state","closing");let e=!1;const t=()=>{if(!e){e=!0,n.removeEventListener("animationend",r),i!==void 0&&clearTimeout(i);try{n.close()}catch{n.removeAttribute("open")}}},r=s=>{s.target===n&&(s.animationName&&!s.animationName.startsWith("rf-drawer-slide-out")||t())};n.addEventListener("animationend",r);const i=setTimeout(t,v7)}function b7(n){n.documentElement.classList.add("rf-drawer-open")}function R0(n){const e=Ka.get(n);if(!e){n.documentElement.classList.remove("rf-drawer-open");return}for(const t of e.values())if(t.dialog.open)return;n.documentElement.classList.remove("rf-drawer-open")}function I0(n){const e=[];return(n.cmd||n.ctrl)&&e.push("mod"),n.alt&&e.push("alt"),n.shift&&e.push("shift"),e.push(n.key),e.join("+")}function y7(n){const e=n.defaultView;if(!e)return;const t=i=>{if(m7(n))return;const s=Ka.get(n);if(!s)return;let o;for(const a of s.values())a.shortcut&&p7(a.shortcut,i)&&(o=a);o&&(i.preventDefault(),Cg(o.dialog))};n.addEventListener("keydown",t);const r=()=>{const i=Ka.get(n);if(i)for(const s of i.values())s.dialog.open&&e.location.hash!==`#${s.id}`&&hf(s.dialog)};e.addEventListener("popstate",r)}function N0(n){const e=n.querySelector('[data-name="tabs"]'),t=n.querySelector('[data-name="panels"]');if(!e||!t)return()=>{};const r=Array.from(e.children).filter(d=>d instanceof HTMLElement&&d.tagName==="BUTTON"),i=Array.from(t.children).filter(d=>d instanceof HTMLElement);if(r.length===0||i.length===0)return()=>{};const s=r.map(()=>to("rf-tab")),o=i.map(()=>to("rf-tabpanel"));for(let d=0;d<r.length;d++)r[d].id=s[d],o[d]&&r[d].setAttribute("aria-controls",o[d]);for(let d=0;d<i.length;d++)o[d]&&(i[d].id=o[d]),s[d]&&i[d].setAttribute("aria-labelledby",s[d]);const a=r[0].className.split(" ")[0]||"";let l=0;function c(d){l=d;for(let h=0;h<r.length;h++){const g=h===l;r[h].setAttribute("aria-selected",String(g)),r[h].setAttribute("data-state",g?"active":"inactive"),a&&r[h].classList.toggle(`${a}--active`,g)}for(let h=0;h<i.length;h++){const g=h===l;i[h].hidden=!g,i[h].setAttribute("data-state",g?"active":"inactive")}}c(0);const u=[];for(let d=0;d<r.length;d++){const h=()=>c(d);r[d].addEventListener("click",h),u.push(()=>r[d].removeEventListener("click",h))}const f=d=>{const h=d.target,g=r.indexOf(h);if(g===-1)return;let p=null;switch(d.key){case"ArrowRight":p=(g+1)%r.length;break;case"ArrowLeft":p=(g-1+r.length)%r.length;break;case"Home":p=0;break;case"End":p=r.length-1;break;default:return}p!==null&&(d.preventDefault(),r[p].focus(),c(p))};return e.addEventListener("keydown",f),u.push(()=>e.removeEventListener("keydown",f)),()=>{u.forEach(d=>d());for(const d of r)d.removeAttribute("id"),d.removeAttribute("aria-controls"),d.removeAttribute("aria-selected"),d.removeAttribute("data-state"),a&&d.classList.remove(`${a}--active`);for(const d of i)d.hidden=!1,d.removeAttribute("id"),d.removeAttribute("aria-labelledby"),d.removeAttribute("data-state")}}function w7(n){const e=n.querySelector('[data-name="steps"]')||n,t=Array.from(e.querySelectorAll('[data-rune="reveal-step"]'));if(t.length===0)return()=>{};let r=1;const i=document.createElement("button");i.className="rf-reveal__next",i.textContent="Continue";const s=document.createElement("button");s.className="rf-reveal__reset",s.textContent="Start over";function o(){for(let c=0;c<t.length;c++){const u=c<r;t[c].classList.toggle("rf-reveal-step--visible",u),t[c].classList.toggle("rf-reveal-step--hidden",!u),t[c].setAttribute("data-state",u?"open":"closed")}r<t.length?(i.parentNode||n.appendChild(i),s.remove()):t.length>1?(i.remove(),s.parentNode||n.appendChild(s)):(i.remove(),s.remove())}const a=()=>{r<t.length&&(r++,o())},l=()=>{r=1,o()};return i.addEventListener("click",a),s.addEventListener("click",l),o(),()=>{i.removeEventListener("click",a),s.removeEventListener("click",l),i.remove(),s.remove();for(const c of t)c.classList.remove("rf-reveal-step--visible","rf-reveal-step--hidden"),c.removeAttribute("data-state")}}function _7(n){const e=n.querySelector("table");if(!e)return()=>{};const t=n.getAttribute("data-searchable")==="true",i=(n.getAttribute("data-sortable")||"").split(",").map(C=>C.trim()).filter(Boolean),s=parseInt(n.getAttribute("data-pagesize")||"0",10),o=n.getAttribute("data-defaultsort")||"",a=Array.from(e.querySelectorAll("th")),l=a.map(C=>C.textContent?.trim()||""),c=e.querySelectorAll("tbody tr"),u=Array.from(c.length>0?c:e.querySelectorAll("tr:not(:first-child)")).map(C=>({el:C,cells:Array.from(C.querySelectorAll("td")).map(x=>x.textContent?.trim()||"")})),f=u.map(C=>C.el);let d="",h=o,g="asc",p=0;const O=[];let v=null,b=null;if(t){v=document.createElement("div"),v.className="rf-datatable__toolbar",b=document.createElement("input"),b.type="search",b.placeholder="Filter rows...",b.className="rf-datatable__input",v.appendChild(b),e.before(v);const C=()=>{d=b.value,p=0,S()};b.addEventListener("input",C),O.push(()=>b.removeEventListener("input",C))}for(const C of a){const x=C.textContent?.trim()||"";if(!i.includes(x))continue;C.style.cursor="pointer",C.style.userSelect="none";const k=()=>{h===x?g=g==="asc"?"desc":"asc":(h=x,g="asc"),p=0,S()};C.addEventListener("click",k),O.push(()=>{C.removeEventListener("click",k),C.style.cursor="",C.style.userSelect=""})}let _=null,A=null,y=null,w=null;if(s>0){_=document.createElement("div"),_.className="rf-datatable__pagination",A=document.createElement("button"),A.className="rf-datatable__page-btn",A.innerHTML="&larr; Prev",w=document.createElement("span"),w.className="rf-datatable__page-info",y=document.createElement("button"),y.className="rf-datatable__page-btn",y.innerHTML="Next &rarr;",_.appendChild(A),_.appendChild(w),_.appendChild(y),e.after(_);const C=()=>{p>0&&(p--,S())},x=()=>{p++,S()};A.addEventListener("click",C),y.addEventListener("click",x),O.push(()=>{A.removeEventListener("click",C),y.removeEventListener("click",x)})}function S(){let C=[...u];if(d){const $=d.toLowerCase();C=C.filter(M=>M.cells.some(P=>P.toLowerCase().includes($)))}if(h){const $=l.indexOf(h);$>=0&&C.sort((M,P)=>{const D=M.cells[$].localeCompare(P.cells[$],void 0,{numeric:!0});return g==="asc"?D:-D})}const x=C.length,k=s>0?Math.ceil(x/s):1;p>=k&&(p=Math.max(0,k-1));const E=s>0?C.slice(p*s,(p+1)*s):C,T=e.querySelector("tbody")||e;for(const $ of u)$.el.style.display="none";for(const $ of E)$.el.style.display="",T.appendChild($.el);for(const $ of a){const M=$.textContent?.replace(/[▲▼]/g,"").trim()||"",P=$.querySelector(".rf-datatable__sort-indicator");if(i.includes(M))if(h===M)if(P)P.textContent=g==="asc"?" ▲":" ▼";else{const D=document.createElement("span");D.className="rf-datatable__sort-indicator",D.textContent=g==="asc"?" ▲":" ▼",$.appendChild(D)}else P?.remove()}_&&A&&y&&w&&(A.disabled=p===0,y.disabled=p>=k-1,w.textContent=`${p+1} / ${k}`,k<=1?_.hidden=!0:_.hidden=!1)}return S(),()=>{O.forEach(x=>x()),v?.remove(),_?.remove();for(const x of a)x.querySelector(".rf-datatable__sort-indicator")?.remove();const C=e.querySelector("tbody")||e;for(const x of f)x.style.display="",C.appendChild(x)}}function k7(n){const e=n.tagName==="FORM"?n:n.querySelector("form");if(!e)return()=>{};const t=n.getAttribute("data-action")||e.getAttribute("action")||"",r=n.getAttribute("data-method")||e.getAttribute("method")||"POST",i=n.getAttribute("data-success")||"Form submitted successfully.",s=n.getAttribute("data-error")||"Something went wrong. Please try again.",o=n.getAttribute("data-honeypot")!=="false";let a=null;if(o){a=document.createElement("div"),a.className="rf-form__hp",a.setAttribute("aria-hidden","true"),a.style.display="none";const f=document.createElement("input");f.type="text",f.name="_gotcha",f.setAttribute("autocomplete","off"),f.tabIndex=-1,a.appendChild(f),e.prepend(a)}const l=document.createElement("div");l.className="rf-form__status",l.hidden=!0,e.appendChild(l);function c(f,d){l.hidden=!1,l.className=`rf-form__status rf-form__status--${f}`,l.setAttribute("role",f==="submitting"?"status":"alert"),l.setAttribute("data-state",f),l.textContent=d}const u=async f=>{if(f.preventDefault(),!!t){c("submitting","Submitting...");try{const d=new FormData(e);(await fetch(t,{method:r,body:d,headers:{Accept:"application/json"}})).ok?(c("success",i),e.reset()):c("error",s)}catch{c("error",s)}}};return e.addEventListener("submit",u),()=>{e.removeEventListener("submit",u),a?.remove(),l.remove()}}const x7="http://www.w3.org/2000/svg";function Zu(n){const e=document.createElementNS(x7,"svg");return e.setAttribute("width","14"),e.setAttribute("height","14"),e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("fill","none"),e.setAttribute("stroke","currentColor"),e.setAttribute("stroke-width","2"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.innerHTML=n,e}const as={eye:'<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/>',code:'<polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/>',mobile:'<rect x="5" y="2" width="14" height="20" rx="2" ry="2"/><line x1="12" y1="18" x2="12.01" y2="18"/>',tablet:'<rect x="4" y="2" width="16" height="20" rx="2" ry="2"/><line x1="12" y1="18" x2="12.01" y2="18"/>',desktop:'<rect x="2" y="3" width="20" height="14" rx="2" ry="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/>',sun:'<circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/>',moon:'<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>'},S7={mobile:as.mobile,tablet:as.tablet,desktop:as.desktop},ia={mobile:{width:375,label:"375px"},tablet:{width:768,label:"768px"},desktop:{width:null,label:"Full"}};function A7(n){const e=n.getAttribute("data-theme")||"auto",r=(n.getAttribute("data-responsive")||"").split(",").map(P=>P.trim()).filter(P=>P in ia),i=r.length>0,s=n.querySelector('[data-name="source"]'),o=n.querySelector('[data-name="html-source"]'),a=n.querySelector('[data-name="themed-source"]'),l=Array.from(n.children).filter(P=>P!==s&&P!==o&&P!==a&&!P.matches?.("meta[data-field]")),c=s!==null||o!==null;let u="preview",f=e,d=i?r[r.length-1]:null;const h=[],g=document.createElement("div");g.className="rf-preview__toolbar";const p=document.createElement("span");p.className="rf-preview__title",g.appendChild(p);const O=document.createElement("div");O.className="rf-preview__controls",g.appendChild(O);let v=null,b=null;if(c){const P=document.createElement("div");P.className="rf-preview__view-toggle",v=document.createElement("button"),v.className="rf-preview__toggle-btn rf-preview__toggle-btn--active",v.setAttribute("aria-label","Preview"),v.setAttribute("title","Preview"),v.appendChild(Zu(as.eye)),b=document.createElement("button"),b.className="rf-preview__toggle-btn",b.setAttribute("aria-label","View source"),b.setAttribute("title","View source"),b.appendChild(Zu(as.code)),P.appendChild(v),P.appendChild(b),O.appendChild(P);const D=()=>{u="preview",M()},I=()=>{u="code",M()};v.addEventListener("click",D),b.addEventListener("click",I),h.push(()=>{v.removeEventListener("click",D),b.removeEventListener("click",I)})}const _=new Map;if(i){const P=document.createElement("div");P.className="rf-preview__viewport-toggle";for(const D of r){const I=document.createElement("button");I.className="rf-preview__toggle-btn",I.setAttribute("aria-label",`${ia[D].label} viewport`),I.setAttribute("title",ia[D].label),I.appendChild(Zu(S7[D]||as.desktop));const W=()=>{d=D,M()};I.addEventListener("click",W),h.push(()=>I.removeEventListener("click",W)),P.appendChild(I),_.set(D,I)}O.appendChild(P)}const A=document.createElement("div");A.className="rf-preview__toggle";const y=[{mode:"auto",label:"Auto",title:"System preference",icon:as.desktop},{mode:"light",label:"Light",title:"Light mode",icon:as.sun},{mode:"dark",label:"Dark",title:"Dark mode",icon:as.moon}],w=new Map;for(const P of y){const D=document.createElement("button");D.className="rf-preview__toggle-btn",D.setAttribute("aria-label",`${P.label} theme`),D.setAttribute("title",P.title),D.appendChild(Zu(P.icon));const I=()=>{f=P.mode,M()};D.addEventListener("click",I),h.push(()=>D.removeEventListener("click",I)),A.appendChild(D),w.set(P.mode,D)}O.appendChild(A);const S=document.createElement("div");S.className="rf-preview__canvas";let C=null,x=null;if(i){C=document.createElement("div"),C.className="rf-preview__viewport-frame",x=document.createElement("span"),x.className="rf-preview__viewport-label",x.hidden=!0,C.appendChild(x);for(const P of l)C.appendChild(P);S.appendChild(C)}else for(const P of l)S.appendChild(P);const k=[];let E=null,T=null,$="";if(c){if(E=document.createElement("div"),E.className="rf-preview__source",s){const P=document.createElement("div");P.appendChild(s),k.push({key:"markdoc",label:"Markdoc",panel:P})}if(o){const P=document.createElement("div");P.appendChild(o),k.push({key:"rune",label:"Rune",panel:P})}if(a){const P=document.createElement("div");P.appendChild(a),k.push({key:"html",label:"HTML",panel:P})}if($=k[0]?.key??"",k.length>1){const P=document.createElement("div");P.className="rf-preview__source-tabs",T=new Map;for(const D of k){const I=document.createElement("button");I.className="rf-preview__source-tab",D.key===$&&I.classList.add("rf-preview__source-tab--active"),I.textContent=D.label;const W=()=>{$=D.key,M()};I.addEventListener("click",W),h.push(()=>I.removeEventListener("click",W)),P.appendChild(I),T.set(D.key,I)}E.appendChild(P)}for(const P of k)P.panel.hidden=P.key!==$,E.appendChild(P.panel)}n.appendChild(g),E&&n.appendChild(E),n.appendChild(S);function M(){if(v&&b&&(v.classList.toggle("rf-preview__toggle-btn--active",u==="preview"),b.classList.toggle("rf-preview__toggle-btn--active",u==="code")),E&&(E.hidden=u!=="code"),S.hidden=u==="code"&&c,T)for(const[D,I]of T)I.classList.toggle("rf-preview__source-tab--active",$===D);for(const D of k)D.panel.hidden=D.key!==$;for(const[D,I]of _)I.classList.toggle("rf-preview__toggle-btn--active",d===D);if(C){const D=d&&ia[d]?ia[d].width:null;C.classList.toggle("rf-preview__viewport-frame--constrained",!!D),C.style.maxWidth=D?`${D}px`:"",x&&(D&&d?(x.textContent=ia[d].label,x.hidden=!1):x.hidden=!0)}for(const[D,I]of w)I.classList.toggle("rf-preview__toggle-btn--active",f===D);const P=f==="auto"?void 0:f;P?S.setAttribute("data-color-scheme",P):S.removeAttribute("data-color-scheme");for(const D of S.querySelectorAll("rf-sandbox"))typeof D.setTheme=="function"&&D.setTheme(P||"auto")}return M(),()=>{h.forEach(P=>P()),s&&n.appendChild(s),o&&n.appendChild(o),a&&n.appendChild(a);for(const P of Array.from(C?.children??S.children))P!==x&&n.appendChild(P);g.remove(),S.remove(),E?.remove()}}function C7(n){const e=n.querySelectorAll("[data-scrollspy]"),t=[];for(const r of e){const i=r.querySelectorAll('a[href^="#"]');if(i.length===0)continue;const s=new Map,o=[];for(const c of i){const u=c.getAttribute("href").slice(1),f=document.getElementById(u);if(!f)continue;const d=c.closest("li");d&&(s.set(f,d),o.push(f))}if(o.length===0)continue;let a=null;const l=new IntersectionObserver(c=>{for(const u of c)if(u.isIntersecting){const f=s.get(u.target);f&&f!==a&&(a?.removeAttribute("data-active"),f.setAttribute("data-active",""),a=f);break}},{rootMargin:"0px 0px -80% 0px"});for(const c of o)l.observe(c);t.push(()=>{l.disconnect(),a?.removeAttribute("data-active")})}return()=>t.forEach(r=>r())}function T7(n){const e=n.querySelectorAll("[data-version-switcher]"),t=[];for(const r of e){const i=r.querySelector("select");if(!i)continue;const s=()=>{const o=i.value;o&&o!==window.location.pathname&&(window.location.href=o)};i.addEventListener("change",s),t.push(()=>i.removeEventListener("change",s))}return()=>t.forEach(r=>r())}function P7(n){const e=[];if(n.getAttribute("data-layout")==="carousel"){const t=E7(n);t&&e.push(t)}if(n.getAttribute("data-lightbox")==="true"){const t=$7(n);t&&e.push(t)}return()=>e.forEach(t=>t())}function E7(n){const e=n.querySelector('[data-name="items"]');if(!e)return;const t=Array.from(e.querySelectorAll('[data-name="item"]'));if(t.length===0)return;const r=document.createElement("button");r.className="rf-gallery__nav rf-gallery__nav--prev",r.setAttribute("aria-label","Previous"),r.textContent="‹";const i=document.createElement("button");i.className="rf-gallery__nav rf-gallery__nav--next",i.setAttribute("aria-label","Next"),i.textContent="›",n.appendChild(r),n.appendChild(i);function s(c){const u=t[0];if(!u||!e)return;const f=u.offsetWidth+parseFloat(getComputedStyle(e).gap||"0");e.scrollBy({left:c*f,behavior:"smooth"})}const o=()=>s(-1),a=()=>s(1);r.addEventListener("click",o),i.addEventListener("click",a);const l=c=>{c.key==="ArrowLeft"&&(c.preventDefault(),s(-1)),c.key==="ArrowRight"&&(c.preventDefault(),s(1))};return n.setAttribute("tabindex","0"),n.addEventListener("keydown",l),()=>{r.removeEventListener("click",o),i.removeEventListener("click",a),n.removeEventListener("keydown",l),r.remove(),i.remove(),n.removeAttribute("tabindex")}}function $7(n){const e=Array.from(n.querySelectorAll('[data-name="item"]'));if(e.length===0)return;let t=null,r=0;function i(d){return d.querySelector("img")?.getAttribute("src")||""}function s(d){return d.querySelector("img")?.getAttribute("alt")||""}function o(d){r=d,e[r]?.setAttribute("data-state","selected"),t=document.createElement("div"),t.className="rf-gallery__lightbox",t.setAttribute("role","dialog"),t.setAttribute("aria-modal","true"),t.setAttribute("aria-label","Image lightbox");const h=document.createElement("img");h.src=i(e[r]),h.alt=s(e[r]);const g=document.createElement("button");g.className="rf-gallery__lightbox-close",g.setAttribute("aria-label","Close lightbox"),g.textContent="×";const p=document.createElement("button");p.className="rf-gallery__lightbox-nav rf-gallery__lightbox-nav--prev",p.setAttribute("aria-label","Previous image"),p.textContent="‹";const O=document.createElement("button");O.className="rf-gallery__lightbox-nav rf-gallery__lightbox-nav--next",O.setAttribute("aria-label","Next image"),O.textContent="›",t.appendChild(h),t.appendChild(g),e.length>1&&(t.appendChild(p),t.appendChild(O)),g.addEventListener("click",l),p.addEventListener("click",()=>a(-1)),O.addEventListener("click",()=>a(1)),t.addEventListener("click",v=>{v.target===t&&l()}),document.body.appendChild(t),document.addEventListener("keydown",c),g.focus()}function a(d){if(!t)return;e[r]?.removeAttribute("data-state"),r=(r+d+e.length)%e.length,e[r]?.setAttribute("data-state","selected");const h=t.querySelector("img");h&&(h.src=i(e[r]),h.alt=s(e[r]))}function l(){t&&(e[r]?.removeAttribute("data-state"),document.removeEventListener("keydown",c),t.remove(),t=null,e[r]?.focus())}function c(d){d.key==="Escape"&&(d.preventDefault(),l()),d.key==="ArrowLeft"&&(d.preventDefault(),a(-1)),d.key==="ArrowRight"&&(d.preventDefault(),a(1))}const u=[];e.forEach((d,h)=>{const g=()=>o(h);d.addEventListener("click",g),d.setAttribute("tabindex","0"),d.setAttribute("role","button"),d.setAttribute("aria-label",s(d)||`View image ${h+1}`),u.push([d,g])});const f=d=>{if(d.key==="Enter"||d.key===" "){d.preventDefault();const h=d.currentTarget,g=e.indexOf(h);g>=0&&o(g)}};return e.forEach(d=>d.addEventListener("keydown",f)),()=>{l();for(const[d,h]of u)d.removeEventListener("click",h),d.removeAttribute("tabindex"),d.removeAttribute("role"),d.removeAttribute("aria-label");e.forEach(d=>d.removeEventListener("keydown",f))}}function Q7(n){switch(n.getAttribute("data-variant")||"slider"){case"toggle":return D7(n);case"fade":return q7(n);case"auto":return R7(n);default:return M7(n)}}function Jd(n){const e=n.querySelector('[data-name="panels"]')||n;return Array.from(e.querySelectorAll(':scope > [data-rune="juxtapose-panel"]'))}function L7(n){return n.querySelector('[data-name="name"]')?.textContent?.trim()||""}function M7(n){const e=Jd(n);if(e.length<2)return()=>{};const r=(n.getAttribute("data-orientation")||"vertical")==="horizontal",i=n.querySelector('[data-name="panels"]');if(!i)return()=>{};i.style.position="relative",i.style.overflow="hidden",e[0].style.position="absolute",e[0].style.inset="0",e[0].style.zIndex="2",e[0].style.willChange="clip-path",e[1].style.position="relative",e[1].style.zIndex="1";for(const O of e)for(const v of O.querySelectorAll('iframe[loading="lazy"]'))v.loading="eager";const s=document.createElement("div");s.className="rf-juxtapose__divider",s.setAttribute("role","slider"),s.setAttribute("aria-label","Comparison slider"),s.setAttribute("aria-valuemin","0"),s.setAttribute("aria-valuemax","100"),s.setAttribute("tabindex","0");const o=document.createElement("div");o.className="rf-juxtapose__divider-handle",s.appendChild(o),i.appendChild(s);function a(O){const v=Math.max(0,Math.min(100,O));n.style.setProperty("--jx-position",String(v)),s.setAttribute("aria-valuenow",String(Math.round(v))),r?(e[0].style.clipPath=`inset(0 0 ${100-v}% 0)`,s.style.top=`${v}%`,s.style.left=""):(e[0].style.clipPath=`inset(0 ${100-v}% 0 0)`,s.style.left=`${v}%`,s.style.top="")}const l=parseFloat(n.style.getPropertyValue("--jx-position"))||50;a(l);let c=!1;function u(O){const v=i.getBoundingClientRect();return r?(O.clientY-v.top)/v.height*100:(O.clientX-v.left)/v.width*100}const f=O=>{c=!0,s.setPointerCapture(O.pointerId),a(u(O)),O.preventDefault()},d=O=>{c&&a(u(O))},h=O=>{c&&(c=!1,s.releasePointerCapture(O.pointerId))},g=O=>{O.target===s||s.contains(O.target)||(c=!0,s.setPointerCapture(O.pointerId),a(u(O)))};s.addEventListener("pointerdown",f),s.addEventListener("pointermove",d),s.addEventListener("pointerup",h),i.addEventListener("pointerdown",g),i.addEventListener("pointermove",d),i.addEventListener("pointerup",h);const p=O=>{const v=parseFloat(n.style.getPropertyValue("--jx-position"))||50,b=O.shiftKey?10:2,_=r?["ArrowUp"]:["ArrowLeft"],A=r?["ArrowDown"]:["ArrowRight"];_.includes(O.key)?(a(v-b),O.preventDefault()):A.includes(O.key)?(a(v+b),O.preventDefault()):O.key==="Home"?(a(0),O.preventDefault()):O.key==="End"&&(a(100),O.preventDefault())};return s.addEventListener("keydown",p),()=>{s.removeEventListener("pointerdown",f),s.removeEventListener("pointermove",d),s.removeEventListener("pointerup",h),i.removeEventListener("pointerdown",g),i.removeEventListener("pointermove",d),i.removeEventListener("pointerup",h),s.removeEventListener("keydown",p),s.remove(),i.style.position="",i.style.overflow="";for(const O of e)O.style.position="",O.style.inset="",O.style.zIndex="",O.style.clipPath="",O.style.willChange=""}}function D7(n){const e=Jd(n);if(e.length<2)return()=>{};let t=0;const r=document.createElement("div");r.className="rf-juxtapose__toggle-bar",r.setAttribute("role","radiogroup"),r.setAttribute("aria-label","Comparison toggle");const i=e.map((l,c)=>{const u=document.createElement("button");return u.className="rf-juxtapose__toggle-btn",u.setAttribute("role","radio"),u.textContent=L7(l)||`Panel ${c+1}`,r.appendChild(u),u}),s=n.querySelector('[data-name="panels"]');s?s.parentNode.insertBefore(r,s):n.insertBefore(r,n.firstChild);function o(){e.forEach((l,c)=>{const u=c===t;l.hidden=!u,l.setAttribute("data-state",u?"active":"inactive")}),i.forEach((l,c)=>{const u=c===t;l.setAttribute("aria-checked",String(u)),l.setAttribute("data-state",u?"active":"inactive"),l.classList.toggle("rf-juxtapose__toggle-btn--active",u)})}const a=l=>{const c=l.target.closest(".rf-juxtapose__toggle-btn");if(!c)return;const u=i.indexOf(c);u>=0&&(t=u,o())};return r.addEventListener("click",a),o(),()=>{r.removeEventListener("click",a),r.remove();for(const l of e)l.hidden=!1,l.removeAttribute("data-state")}}function q7(n){const e=Jd(n);if(e.length<2)return()=>{};const t=n.querySelector('[data-name="panels"]');if(!t)return()=>{};const r=parseInt(n.style.getPropertyValue("--jx-duration")||"1000",10);t.style.position="relative",e[0].style.position="relative",e[0].style.zIndex="1",e[1].style.position="absolute",e[1].style.inset="0",e[1].style.zIndex="2",e[1].style.opacity="0",e[1].style.transition=`opacity ${r}ms ease`;for(const l of e)for(const c of l.querySelectorAll('iframe[loading="lazy"]'))c.loading="eager";let i=!1;const s=()=>{i||(e[1].style.opacity="1")},o=()=>{i||(e[1].style.opacity="0")},a=()=>{i=!i,e[1].style.opacity=i?"1":"0"};return t.addEventListener("mouseenter",s),t.addEventListener("mouseleave",o),t.addEventListener("click",a),t.setAttribute("aria-live","polite"),()=>{t.removeEventListener("mouseenter",s),t.removeEventListener("mouseleave",o),t.removeEventListener("click",a),t.removeAttribute("aria-live"),t.style.position="";for(const l of e)l.style.position="",l.style.inset="",l.style.zIndex="",l.style.opacity="",l.style.transition=""}}function R7(n){const e=Jd(n);if(e.length<2)return()=>{};const r=(n.getAttribute("data-orientation")||"vertical")==="horizontal",i=n.querySelector('[data-name="panels"]');if(!i)return()=>{};const s=parseFloat(n.style.getPropertyValue("--jx-position"))||50,o=parseInt(n.style.getPropertyValue("--jx-duration")||"1000",10);i.style.position="relative",i.style.overflow="hidden",e[0].style.position="absolute",e[0].style.inset="0",e[0].style.zIndex="2",e[0].style.willChange="clip-path",e[1].style.position="relative",e[1].style.zIndex="1";for(const d of e)for(const h of d.querySelectorAll('iframe[loading="lazy"]'))h.loading="eager";function a(d){n.style.setProperty("--jx-position",String(d)),r?e[0].style.clipPath=`inset(0 0 ${100-d}% 0)`:e[0].style.clipPath=`inset(0 ${100-d}% 0 0)`}a(0);let l=null,c=!1;function u(){if(c)return;c=!0;const d=performance.now(),h=0;function g(p){const O=p-d,v=Math.min(O/o,1),b=1-Math.pow(1-v,3);a(h+(s-h)*b),v<1&&(l=requestAnimationFrame(g))}l=requestAnimationFrame(g)}const f=new IntersectionObserver(d=>{for(const h of d)h.isIntersecting&&u()},{threshold:.3});return f.observe(n),()=>{f.disconnect(),l!==null&&cancelAnimationFrame(l),i.style.position="",i.style.overflow="";for(const d of e)d.style.position="",d.style.inset="",d.style.zIndex="",d.style.clipPath="",d.style.willChange=""}}function I7(n){if(n.getAttribute("data-collapsible")!=="true")return()=>{};const e=Array.from(n.querySelectorAll('[data-rune="nav-group"]'));if(e.length===0)return()=>{};const t=[];for(const r of e){const i=r.querySelector('[data-field="title"], h1, h2, h3, h4, h5, h6');if(!i)continue;const s=r.querySelector(':scope > [data-name="panel"], :scope > ul, :scope > ol');if(!s)continue;const o=i.id||to("rf-nav-trigger"),a=s.id||to("rf-nav-panel");i.id=o,s.id=a,(r.getAttribute("data-collapsed")??"true")!=="false"&&r.setAttribute("data-collapsed","true"),i.setAttribute("role","button"),i.setAttribute("tabindex","0"),i.setAttribute("aria-controls",a),i.setAttribute("aria-expanded",r.getAttribute("data-collapsed")==="false"?"true":"false"),s.setAttribute("aria-labelledby",o);const c=()=>{const d=r.getAttribute("data-collapsed")==="false",h=s.getBoundingClientRect().height,g=d?0:s.scrollHeight;s.style.height=h+"px",s.offsetHeight,r.setAttribute("data-collapsed",d?"true":"false"),i.setAttribute("aria-expanded",d?"false":"true"),s.style.height=g+"px";const p=()=>{s.style.height="",s.removeEventListener("transitionend",O),clearTimeout(v)},O=b=>{b.target!==s||b.propertyName!=="height"||p()};s.addEventListener("transitionend",O);const v=setTimeout(p,260)},u=d=>{d.preventDefault(),c()},f=d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),c())};i.addEventListener("click",u),i.addEventListener("keydown",f),t.push(()=>{i.removeEventListener("click",u),i.removeEventListener("keydown",f)})}return()=>t.forEach(r=>r())}function N7(n){if(n.getAttribute("data-layout")!=="menubar")return()=>{};const e=[],t=Array.from(n.querySelectorAll('[data-rune="nav-group"]')),r=new Map,i=new Map;for(const f of t){const d=f.querySelector('[data-field="title"], h1, h2, h3, h4, h5, h6'),h=f.querySelector(":scope > ul, :scope > ol");if(!d||!h)continue;const g=d.id||to("rf-nav-trigger"),p=h.id||to("rf-nav-panel");d.id=g,h.id=p,d.setAttribute("role","button"),d.setAttribute("tabindex","0"),d.setAttribute("aria-haspopup","true"),d.setAttribute("aria-expanded","false"),d.setAttribute("aria-controls",p),h.setAttribute("role","menu"),h.setAttribute("aria-labelledby",g),f.setAttribute("data-open","false"),r.set(f,d),i.set(f,h)}const s=f=>{for(const[d,h]of r)d!==f&&(d.setAttribute("data-open","false"),h.setAttribute("aria-expanded","false"))},o=f=>{const d=r.get(f);d&&(s(f),f.setAttribute("data-open","true"),d.setAttribute("aria-expanded","true"))},a=f=>{f.getAttribute("data-open")==="true"?s():o(f)};for(const[f,d]of r){const h=i.get(f),g=v=>{v.preventDefault(),a(f)},p=v=>{switch(v.key){case"Enter":case" ":v.preventDefault(),a(f);break;case"ArrowDown":{v.preventDefault(),o(f),h.querySelector("a, button, [tabindex]")?.focus();break}case"ArrowRight":case"ArrowLeft":{v.preventDefault();const b=Array.from(r.keys()),_=b.indexOf(f);if(_===-1)break;const A=v.key==="ArrowRight"?b[(_+1)%b.length]:b[(_-1+b.length)%b.length];r.get(A)?.focus(),f.getAttribute("data-open")==="true"&&o(A);break}case"Escape":s(),d.focus();break}};d.addEventListener("click",g),d.addEventListener("keydown",p),e.push(()=>{d.removeEventListener("click",g),d.removeEventListener("keydown",p)});const O=v=>{const b=Array.from(h.querySelectorAll("a, button")),_=document.activeElement,A=_?b.indexOf(_):-1;switch(v.key){case"ArrowDown":v.preventDefault(),b[Math.min(A+1,b.length-1)]?.focus();break;case"ArrowUp":v.preventDefault(),A<=0?d.focus():b[A-1]?.focus();break;case"Escape":v.preventDefault(),s(),d.focus();break}};h.addEventListener("keydown",O),e.push(()=>h.removeEventListener("keydown",O))}const l=f=>{n.contains(f.target)||s()},c=f=>{const d=f.relatedTarget;(!d||!n.contains(d))&&s()};document.addEventListener("click",l),n.addEventListener("focusout",c),e.push(()=>document.removeEventListener("click",l)),e.push(()=>n.removeEventListener("focusout",c));const u=n.querySelector(':scope > [data-name="trigger"]');if(u){const f=d=>{d.preventDefault();const h=n.getAttribute("data-open")==="true";n.setAttribute("data-open",h?"false":"true"),u.setAttribute("aria-expanded",h?"false":"true")};u.addEventListener("click",f),e.push(()=>u.removeEventListener("click",f))}return()=>e.forEach(f=>f())}const Mv=typeof HTMLElement<"u"?HTMLElement:class{};function mC(n,e){const t=n.querySelector(`[data-content="${e}"]`);return t?t instanceof HTMLTemplateElement?t.content.textContent||"":t.textContent||"":""}class B7 extends Mv{connectedCallback(){const e=this.dataset.language||"mermaid",t=mC(this,"source"),r=this.querySelector(".rf-diagram__container");!r||!t||(e==="mermaid"?this.renderMermaid(t,r):e==="ascii"&&(r.textContent=t,r.style.fontFamily="var(--rf-font-mono)",r.style.whiteSpace="pre"))}async renderMermaid(e,t){try{const i=(await import("https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs")).default,s=getComputedStyle(t);i.initialize({startOnLoad:!1,theme:"base",themeVariables:{primaryColor:s.getPropertyValue("--rf-color-primary-100").trim()||"#f5f4f1",primaryTextColor:s.getPropertyValue("--rf-color-text").trim()||"#1c1a17",primaryBorderColor:s.getPropertyValue("--rf-color-primary-400").trim()||"#bfbab2",secondaryColor:s.getPropertyValue("--rf-color-surface-hover").trim()||"#ecebe8",secondaryTextColor:s.getPropertyValue("--rf-color-text").trim()||"#1c1a17",secondaryBorderColor:s.getPropertyValue("--rf-color-border").trim()||"#e2e0dd",tertiaryColor:s.getPropertyValue("--rf-color-info-bg").trim()||"#e8edf4",tertiaryTextColor:s.getPropertyValue("--rf-color-text").trim()||"#1c1a17",tertiaryBorderColor:s.getPropertyValue("--rf-color-info-border").trim()||"#c5d2e0",lineColor:s.getPropertyValue("--rf-color-muted").trim()||"#6b6661",textColor:s.getPropertyValue("--rf-color-text").trim()||"#1c1a17",mainBkg:s.getPropertyValue("--rf-color-primary-100").trim()||"#f5f4f1",nodeBorder:s.getPropertyValue("--rf-color-primary-400").trim()||"#bfbab2",clusterBkg:s.getPropertyValue("--rf-color-surface").trim()||"#fbfaf7",clusterBorder:s.getPropertyValue("--rf-color-border").trim()||"#e2e0dd",edgeLabelBackground:s.getPropertyValue("--rf-color-surface").trim()||"#fbfaf7",fontSize:"14px",fontFamily:s.getPropertyValue("--rf-font-sans").trim()||"system-ui, sans-serif"}});const o="mermaid-"+Math.random().toString(36).slice(2),{svg:a}=await i.render(o,e);t.innerHTML=a}catch{}}}const Xu={openstreetmap:{street:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",terrain:"https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png",dark:"https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",minimal:"https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png"},mapbox:{street:"streets-v12",satellite:"satellite-streets-v12",terrain:"outdoors-v12",dark:"dark-v11",minimal:"light-v11"}},B0={openstreetmap:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',mapbox:'&copy; <a href="https://www.mapbox.com/">Mapbox</a>'},xp=new Map;async function Sp(n){if(xp.has(n))return xp.get(n);try{const e=`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(n)}&format=json&limit=1`,r=await(await fetch(e,{headers:{"User-Agent":"refrakt-md-map-rune/1.0"}})).json();if(r.length>0){const i=[parseFloat(r[0].lat),parseFloat(r[0].lon)];return xp.set(n,i),i}}catch{}return null}class j7 extends Mv{mapInstance=null;initializing=!1;connectedCallback(){const e=this.extractPins();e.length>0&&this.initLeaflet(e)}disconnectedCallback(){this.mapInstance&&(this.mapInstance.remove(),this.mapInstance=null)}extractPins(){const e=[],t=this.querySelector("ol");if(!t)return e;for(const r of t.querySelectorAll('li[data-rune="map-pin"]')){const i=o=>r.querySelector(`meta[data-field="${o}"]`)?.content||"",s=o=>r.querySelector(`span[data-field="${o}"]`)?.textContent||"";e.push({name:s("name"),description:s("description"),lat:parseFloat(i("lat"))||0,lng:parseFloat(i("lng"))||0,address:i("address"),url:i("url"),group:i("group")})}return e}async initLeaflet(e){if(!(this.initializing||this.mapInstance)){this.initializing=!0;try{const t=this.getRootNode(),r=t instanceof ShadowRoot?t:document.head;if(!t.querySelector('link[href*="leaflet@1.9.4"]')){const C=document.createElement("link");C.rel="stylesheet",C.href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css",r.appendChild(C)}const s=await import("https://unpkg.com/leaflet@1.9.4/dist/leaflet-src.esm.js"),o=this.dataset.center||"",a=this.dataset.zoom||"",l=this.dataset.style||"street",c=this.dataset.provider||"openstreetmap",u=this.dataset.interactive!=="false",f=this.dataset.route==="true",d=this.dataset.cluster==="true",h=this.dataset.apiKey||"",p=(await Promise.all(e.map(async C=>{if(C.lat&&C.lng)return{...C};if(C.address){const x=await Sp(C.address);if(x)return{...C,lat:x[0],lng:x[1]}}if(C.name){const x=await Sp(C.name);if(x)return{...C,lat:x[0],lng:x[1]}}return null}))).filter(C=>C!==null&&C.lat!==0&&C.lng!==0);if(p.length===0)return;let O=this.querySelector(".rf-map__container");O||(O=document.createElement("div"),O.className="rf-map__container",this.prepend(O));const v=O.querySelector(".rf-map__fallback");v&&v.remove();let b;if(o){const C=o.match(/(-?\d+\.?\d*)\s*,\s*(-?\d+\.?\d*)/);C?b=[parseFloat(C[1]),parseFloat(C[2])]:b=await Sp(o)||[p[0].lat,p[0].lng]}else{const C=p.map(k=>k.lat),x=p.map(k=>k.lng);b=[(Math.min(...C)+Math.max(...C))/2,(Math.min(...x)+Math.max(...x))/2]}const _=a?parseInt(a):13,A=s.map(O,{zoomControl:u,dragging:u,scrollWheelZoom:u,doubleClickZoom:u,touchZoom:u}).setView(b,_);if(c==="mapbox"){const C=Xu.mapbox[l]||Xu.mapbox.street;s.tileLayer(`https://api.mapbox.com/styles/v1/mapbox/${C}/tiles/256/{z}/{x}/{y}@2x?access_token=${h}`,{attribution:B0.mapbox,tileSize:512,zoomOffset:-1}).addTo(A)}else{const C=Xu.openstreetmap[l]||Xu.openstreetmap.street;s.tileLayer(C,{attribution:B0.openstreetmap}).addTo(A)}const y=new Map;for(const C of p){const x=C.group||"";y.has(x)||y.set(x,[]),y.get(x).push(C)}const w=[],S={};for(const[C,x]of y){const k=x.map(E=>{const T=s.marker([E.lat,E.lng]);let $="";return E.name&&($+=`<strong>${E.name}</strong>`),E.description&&($+=`<br><em>${E.description}</em>`),E.address&&($+=`<br><small>${E.address}</small>`),E.url&&($+=`<br><a href="${E.url}" target="_blank" rel="noopener">More info</a>`),$&&T.bindPopup($),T});if(C){const E=s.layerGroup(k).addTo(A);S[C]=E}else k.forEach(E=>E.addTo(A));w.push(...k)}if(Object.keys(S).length>0&&s.control.layers(null,S).addTo(A),f&&p.length>1){const C=p.map(x=>[x.lat,x.lng]);s.polyline(C,{color:"var(--rf-color-primary, #3b82f6)",weight:3,opacity:.7,dashArray:"8, 8"}).addTo(A)}if(d&&w.length>0)try{const C="https://unpkg.com/leaflet.markercluster@1.5.3/dist/leaflet.markercluster-src.js",x="https://unpkg.com/leaflet.markercluster@1.5.3/dist/MarkerCluster.css",k="https://unpkg.com/leaflet.markercluster@1.5.3/dist/MarkerCluster.Default.css";for(const T of[x,k])if(!t.querySelector(`link[href="${T}"]`)){const $=document.createElement("link");$.rel="stylesheet",$.href=T,r.appendChild($)}await new Promise((T,$)=>{const M=document.createElement("script");M.src=C,M.onload=()=>T(),M.onerror=$,document.head.appendChild(M)});const E=s.markerClusterGroup();w.forEach(T=>{T.remove(),E.addLayer(T)}),A.addLayer(E)}catch{}if(!o&&!a&&p.length>1){const C=s.latLngBounds(p.map(x=>[x.lat,x.lng]));A.fitBounds(C,{padding:[30,30]})}this.mapInstance=A}catch(t){console.warn("Map rune: Leaflet failed to load",t)}finally{this.initializing=!1}}}}class gi{static pages=[];static currentUrl="";static designTokens=null;static theme="auto";static themeListeners=[];static onThemeChange(e){return gi.themeListeners.push(e),()=>{gi.themeListeners=gi.themeListeners.filter(t=>t!==e)}}static setTheme(e){gi.theme=e;for(const t of gi.themeListeners)t(e)}}const Fu={tailwind:['<script src="https://cdn.tailwindcss.com"><\/script>','<script>tailwind.config = { darkMode: "class" }<\/script>'],bootstrap:['<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5/dist/css/bootstrap.min.css">'],bulma:['<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@1/css/bulma.min.css">'],pico:['<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css">']},j0={heading:"sans-serif",body:"sans-serif",mono:"monospace",display:"sans-serif",caption:"sans-serif"};class z7 extends Mv{iframe=null;messageHandler=null;themeCleanup=null;ancestorObserver=null;_content="";_framework="";_dependencies="";_label="Sandbox";_heightAttr="auto";_tokens=null;_localScheme=null;_untrusted=!1;_allowJs=!0;_sandboxOrigin="";connectedCallback(){this._content=this.dataset.sourceContent||mC(this,"source"),this._framework=this.dataset.framework||"",this._dependencies=this.dataset.dependencies||"",this._label=this.dataset.label||"Sandbox",this._heightAttr=this.dataset.height||"auto",this._untrusted=this.dataset.securityMode==="untrusted",this._allowJs=this.dataset.allowJs!=="false",this._sandboxOrigin=this.dataset.sandboxOrigin||"",this._localScheme=this.getAttribute("data-color-scheme");const e=this._localScheme?null:this.closest("[data-color-scheme]")?.getAttribute("data-color-scheme"),t=this._localScheme||e||gi.theme,r=this.dataset.designTokens;if(this._tokens=r?JSON.parse(r):gi.designTokens,this.buildIframe(t),!this._localScheme){this.themeCleanup=gi.onThemeChange(s=>{this.closest("[data-color-scheme]")||this.setTheme(s)}),this.ancestorObserver=new MutationObserver(()=>{const o=this.closest("[data-color-scheme]")?.getAttribute("data-color-scheme");this.setTheme(o||gi.theme)});let i=this.parentElement;for(;i;)this.ancestorObserver.observe(i,{attributes:!0,attributeFilter:["data-color-scheme"]}),i=i.parentElement}}disconnectedCallback(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=null),this.themeCleanup&&(this.themeCleanup(),this.themeCleanup=null),this.ancestorObserver&&(this.ancestorObserver.disconnect(),this.ancestorObserver=null),this.iframe=null}buildIframe(e){const t=this.iframe?.style.height;this.iframe=document.createElement("iframe");const r=this._untrusted?"allow-scripts":"allow-scripts allow-same-origin";if(this.iframe.setAttribute("sandbox",r),this._untrusted&&this._sandboxOrigin){const s=new URLSearchParams({framework:this._framework,dependencies:this._dependencies,theme:e||"auto",height:this._heightAttr});this.iframe.src=`${this._sandboxOrigin.replace(/\/$/,"")}/render?${s.toString()}`;const o=a=>{a.data?.type==="rf-sandbox-ready"&&a.source===this.iframe?.contentWindow&&(this.iframe.contentWindow.postMessage({type:"rf-sandbox-content",content:this._content,tokens:this._tokens},this._sandboxOrigin),window.removeEventListener("message",o))};window.addEventListener("message",o)}else this.iframe.srcdoc=this.buildSrcdoc(this._content,this._framework,this._dependencies,this._tokens,e);this.iframe.title=this._label,this.iframe.setAttribute("frameborder","0"),this.iframe.loading="lazy",this.iframe.style.cssText=`width: 100%; border: none; height: ${t||(this._heightAttr!=="auto"?parseInt(this._heightAttr)+"px":"150px")};`;const i=this._untrusted?this.buildUntrustedBanner():null;this.messageHandler&&window.removeEventListener("message",this.messageHandler),this._heightAttr==="auto"&&(this.messageHandler=s=>{s.data?.type==="rf-sandbox-resize"&&s.source===this.iframe?.contentWindow&&(this.iframe.style.height=s.data.height+"px")},window.addEventListener("message",this.messageHandler)),i?this.replaceChildren(i,this.iframe):this.replaceChildren(this.iframe)}buildUntrustedBanner(){const e=document.createElement("div");return e.className="rf-sandbox__untrusted-banner",e.setAttribute("role","note"),e.setAttribute("aria-label","Sandboxed user content"),e.textContent="Sandboxed user content — do not enter sensitive information.",e}setTheme(e){this._localScheme||this.buildIframe(e)}buildSrcdoc(e,t,r,i,s){const o=this.buildDependencyTags(t,r,i);s=s||gi.theme;const a=s==="dark"?' class="dark" data-theme="dark" style="color-scheme:dark"':s==="light"?' data-theme="light" style="color-scheme:light"':"",l=s==="dark"?' class="dark"':"",c=s==="dark"||s==="light"?` data-theme="${s}"`:"",u=e.replace(/\s*data-source(?:="[^"]*")?/g,""),f=this.buildCspMetaTag();return`<!DOCTYPE html>
339
- <html${a}>
340
- <head>${f?`
341
- ${f}`:""}
342
- <meta charset="utf-8">
343
- <meta name="viewport" content="width=device-width, initial-scale=1">
344
- ${o}
345
- <style>
346
- body { margin: 0; font-family: system-ui, -apple-system, sans-serif; color-scheme: light dark; overflow: hidden; }
347
- body.dark, body[data-theme="dark"] { color-scheme: dark; }
348
- </style>
349
- </head>
350
- <body${l}${c}>
351
- ${u}
352
- <script>
353
- var ro = new ResizeObserver(function() {
354
- parent.postMessage({ type: 'rf-sandbox-resize', height: document.body.scrollHeight }, '*');
355
- });
356
- ro.observe(document.body);
357
- <\/script>
358
- <script>
359
- // The Tailwind CDN may ignore darkMode:"class" config and generate
360
- // @media (prefers-color-scheme: dark) rules instead. On desktop this
361
- // works via parent color-scheme propagation; on mobile it doesn't.
362
- // Fix: when theme is forced (not auto), rewrite the media-query rules:
363
- // - dark: duplicate as .dark ancestor selectors, remove originals
364
- // - light: just remove originals (prevents OS dark from leaking in)
365
- // - auto: leave untouched (media query follows OS preference)
366
- var forcedTheme = document.body.getAttribute('data-theme');
367
- function patchDarkCSS() {
368
- if (!forcedTheme) return; // auto — leave media queries intact
369
- try {
370
- for (var i = 0; i < document.styleSheets.length; i++) {
371
- var sheet = document.styleSheets[i], rules;
372
- try { rules = sheet.cssRules; } catch(e) { continue; }
373
- for (var j = rules.length - 1; j >= 0; j--) {
374
- var r = rules[j];
375
- if (r instanceof CSSMediaRule && r.conditionText === '(prefers-color-scheme: dark)') {
376
- if (forcedTheme === 'dark') {
377
- for (var k = 0; k < r.cssRules.length; k++) {
378
- var inner = r.cssRules[k];
379
- if (inner.cssText) {
380
- sheet.insertRule('.dark ' + inner.cssText, rules.length);
381
- }
382
- }
383
- }
384
- // Remove original media query rule — for dark, the .dark
385
- // ancestor selectors replace it; for light, removing it
386
- // prevents OS dark preference from leaking in.
387
- sheet.deleteRule(j);
388
- }
389
- }
390
- }
391
- } catch(e) {}
392
- }
393
- // Run after Tailwind CDN generates CSS (deferred to after current task)
394
- if (document.readyState === 'loading') {
395
- document.addEventListener('DOMContentLoaded', function() { setTimeout(patchDarkCSS, 0); });
396
- } else {
397
- setTimeout(patchDarkCSS, 0);
398
- }
399
- // Also re-patch when Tailwind re-generates (MutationObserver on style tags)
400
- new MutationObserver(function(mutations) {
401
- for (var m = 0; m < mutations.length; m++) {
402
- for (var n = 0; n < mutations[m].addedNodes.length; n++) {
403
- if (mutations[m].addedNodes[n].nodeName === 'STYLE') { setTimeout(patchDarkCSS, 0); return; }
404
- }
405
- }
406
- }).observe(document.head, { childList: true });
407
- <\/script>${!s||s==="auto"?`
408
- <script>if(window.matchMedia('(prefers-color-scheme:dark)').matches){document.body.classList.add('dark');document.body.setAttribute('data-theme','dark')}<\/script>`:""}
409
- </body>
410
- </html>`}buildCspMetaTag(){if(!this._untrusted)return"";const e=new Set,t=l=>{try{const c=new URL(l);e.add(`${c.protocol}//${c.host}`)}catch{}};if(this._framework&&Fu[this._framework])for(const l of Fu[this._framework]){const c=l.match(/(?:src|href)="([^"]+)"/);c&&t(c[1])}if(this._dependencies)for(const l of this._dependencies.split(",").map(c=>c.trim()).filter(Boolean))t(l);const r=["'unsafe-inline'",...e].join(" "),i=["data:","https://fonts.gstatic.com",...e].join(" "),s=["data:",...e].join(" ");return`<meta http-equiv="Content-Security-Policy" content="${["default-src 'none'",`script-src ${this._allowJs?["'unsafe-inline'",...e].join(" "):"'none'"}`,`style-src ${r}`,`font-src ${i}`,`img-src ${s}`,"connect-src 'none'","form-action 'none'","base-uri 'none'","frame-src 'none'","object-src 'none'"].join("; ")}">`}buildDependencyTags(e,t,r){const i=[];if(r&&i.push(this.buildDesignTokenTags(r)),e&&Fu[e])if(e==="tailwind"&&r){i.push('<script src="https://cdn.tailwindcss.com"><\\/script>');const s=this.buildTailwindTokenConfig(r);s?i.push(s):i.push('<script>tailwind.config = { darkMode: "class" }<\\/script>')}else i.push(...Fu[e]);if(t)for(const s of t.split(",").map(o=>o.trim()).filter(Boolean))s.endsWith(".css")?i.push(`<link rel="stylesheet" href="${s}">`):i.push(`<script src="${s}"><\\/script>`);return i.join(`
411
- `)}buildDesignTokenTags(e){const t=[];if(e.fonts&&e.fonts.length>0){const s=`https://fonts.googleapis.com/css2?${e.fonts.map(o=>{const a=o.family.replace(/ /g,"+"),l=o.weights.sort((c,u)=>c-u).join(";");return`family=${a}:wght@${l}`}).join("&")}&display=swap`;t.push('<link rel="preconnect" href="https://fonts.googleapis.com">'),t.push('<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>'),t.push(`<link href="${s}" rel="stylesheet">`)}const r=[];if(e.fonts)for(const i of e.fonts){const s=j0[i.role]||"sans-serif";r.push(` --font-${i.role}: '${i.family}', ${s};`)}if(e.colors)for(const i of e.colors){const s=i.name.toLowerCase().replace(/\s+/g,"-");r.push(` --color-${s}: ${i.value};`)}if(e.spacing?.unit&&r.push(` --spacing-unit: ${e.spacing.unit};`),e.radii)for(const i of e.radii){const s=i.name.toLowerCase().replace(/\s+/g,"-");r.push(` --radius-${s}: ${i.value};`)}if(e.shadows)for(const i of e.shadows){const s=i.name.toLowerCase().replace(/\s+/g,"-");r.push(` --shadow-${s}: ${i.value};`)}if(r.length>0){const i=[`:root {
412
- ${r.join(`
413
- `)}
414
- }`];if(e.fonts){const s=e.fonts.find(l=>l.role==="body"),o=e.fonts.find(l=>l.role==="heading"),a=e.fonts.find(l=>l.role==="mono");s&&i.push("body { font-family: var(--font-body); }"),o&&i.push("h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); }"),a&&i.push("code, pre, kbd { font-family: var(--font-mono); }")}t.push(`<style>
415
- ${i.join(`
416
- `)}
417
- </style>`)}return t.join(`
418
- `)}buildTailwindTokenConfig(e){const t={};if(e.fonts){t.fontFamily={};for(const r of e.fonts){const i=j0[r.role]||"sans-serif";t.fontFamily[r.role]=[`'${r.family}'`,i]}}if(e.colors){t.colors={};for(const r of e.colors){const i=r.name.toLowerCase().replace(/\s+/g,"-");t.colors[i]=r.value}}if(e.radii){t.borderRadius={};for(const r of e.radii){const i=r.name.toLowerCase().replace(/\s+/g,"-");t.borderRadius[i]=r.value}}return Object.keys(t).length===0?"":`<script>tailwind.config = { darkMode: "class", theme: { extend: ${JSON.stringify(t)} } }<\/script>`}}function Z7(n){const e=[],t=I7(n);t&&e.push(t);const r=N7(n);return r&&e.push(r),()=>e.forEach(i=>i?.())}const X7={accordion:D0,"accordion-item":D0,"tab-group":N0,"code-group":N0,reveal:w7,"data-table":_7,form:k7,preview:A7,gallery:P7,juxtapose:Q7,nav:Z7,drawer:g7};function gC(n=document,e){const t=[];n.querySelectorAll("[data-rune]").forEach(o=>{const a=o.getAttribute("data-rune");if(o7(o))return;const l=X7[a];if(l){const c=l(o);c&&t.push(c)}});const r=f7(n);t.push(r);const i=C7(n);t.push(i);const s=T7(n);return t.push(s),()=>t.forEach(o=>o())}var F7=V('<span class="block-card__drag svelte-15i1bgj" title="Drag to reorder"><svg width="8" height="14" viewBox="0 0 8 14" fill="currentColor"><circle cx="2" cy="2" r="1.2"></circle><circle cx="6" cy="2" r="1.2"></circle><circle cx="2" cy="7" r="1.2"></circle><circle cx="6" cy="7" r="1.2"></circle><circle cx="2" cy="12" r="1.2"></circle><circle cx="6" cy="12" r="1.2"></circle></svg></span>'),V7=V('<div class="block-card__inline-preview svelte-15i1bgj"></div>'),W7=V('<div class="block-card svelte-15i1bgj"><!> <!></div>');function Y7(n,e){Ot(e,!0);let t=Pt(e,"highlightCss",3,""),r=Pt(e,"highlightTransform",3,null),i=Pt(e,"communityTags",3,null),s=Pt(e,"communityPostTransforms",3,null),o=Pt(e,"communityStyles",3,null),a=Pt(e,"aggregated",19,()=>({})),l=Pt(e,"dragHandle",3,!0),c=Pt(e,"readOnly",3,!1),u=ee(void 0),f=null,d,h=null;function g(S){return S.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase()}function p(S){const C=new Map;for(const[x,k]of Object.entries(S.runes))C.set(g(x),k);return C}function O(S,C,x){let k=S,E=null,T=null;for(;k&&k!==C;)k.hasAttribute("data-name")&&!E&&(E=k),k.hasAttribute("data-rune")&&!T&&(T=k),k=k.parentElement;if(E){const $=E.getAttribute("data-name");let M=E.parentElement,P;for(;M&&M!==C;){const I=M.getAttribute("data-rune");if(I){P=x.get(I);break}M=M.parentElement}const D=P?.editHints?.[$];if(D&&D!=="none")return{type:"section",el:E,dataName:$,editType:D}}return T?{type:"rune",el:T}:null}function v(S,C){let x=null,k=null;const E=75,T=document.createElement("div");T.className="rf-edit-tooltip",S.appendChild(T);function $(P,D){T.textContent=P,T.style.left=`${D.clientX+12}px`,T.style.top=`${D.clientY+12}px`,T.classList.add("rf-tooltip-visible")}function M(){T.classList.remove("rf-tooltip-visible")}S.addEventListener("mouseover",P=>{const D=O(P.target,S,C),I=D?.el??null;if(k!==null&&(clearTimeout(k),k=null),I!==x)if(I&&x&&x.contains(I))x.classList.remove("rf-editable-hover"),x=I,x.classList.add("rf-editable-hover");else if(x&&I&&I.contains(x)){const W=x;k=setTimeout(()=>{x===W&&(W.classList.remove("rf-editable-hover"),x=I,x.classList.add("rf-editable-hover")),k=null},E);return}else x?.classList.remove("rf-editable-hover"),x=I,x?.classList.add("rf-editable-hover");if(D){const W=D.type==="section"?D.dataName:D.el.getAttribute("data-rune")??"";$(W,P)}else M()}),S.addEventListener("mousemove",P=>{T.classList.contains("rf-tooltip-visible")&&(T.style.left=`${P.clientX+12}px`,T.style.top=`${P.clientY+12}px`)}),S.addEventListener("mouseout",P=>{const D=P.relatedTarget;if(x&&(!D||!x.contains(D))){k!==null&&clearTimeout(k);const I=x;k=setTimeout(()=>{I.classList.remove("rf-editable-hover"),x===I&&(x=null),k=null},E),M()}}),S.addEventListener("click",P=>{M();const D=O(P.target,S,C);if(D)if(P.preventDefault(),P.stopPropagation(),D.type==="section"){const{el:I,dataName:W,editType:U}=D,ae=I.getBoundingClientRect(),ce=U==="link"?I.querySelector("a"):null,K=U==="image"?I.querySelector("img"):null,H=U==="code"?I.querySelector("code"):null,se=U==="icon"?I.hasAttribute("data-icon")?I:I.querySelector("[data-icon]"):null;e.onsectionclick?.({dataName:W,text:(H??I).textContent?.trim()??"",rect:ae,editType:U,href:ce?.getAttribute("href")??K?.getAttribute("src")??void 0,iconName:se?.getAttribute("data-icon")??void 0})}else{const I=P,W=Array.from(S.querySelectorAll("[data-rune]"));let U;W.length>1&&D.el!==W[0]&&(U=W.indexOf(D.el)-1),e.onruneclick?.({x:I.clientX,y:I.clientY,nestedRuneIndex:U})}})}hn(()=>{if(!m(u)||!e.themeConfig)return;f||(f=m(u).attachShadow({mode:"open"}));const S=e.block.source,C=e.themeConfig,x=e.themeCss,k=t()||"",E=r();return clearTimeout(d),d=setTimeout(()=>{if(f){h&&(h(),h=null);try{const{html:T,isComponent:$}=hC(S,C,E,i()??void 0,s()??void 0,a(),o()??void 0);if($)f.innerHTML=`<style>
419
- :host { display: block; padding: 0.75rem 1.5rem; }
420
- .placeholder { display: flex; align-items: center; gap: 0.5rem; color: #888; font-family: system-ui, sans-serif; font-size: 13px; }
421
- .placeholder svg { opacity: 0.5; }
422
- </style>
423
- <div class="placeholder">
424
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
425
- <rect x="2" y="2" width="12" height="12" rx="2" />
426
- <path d="M6 6l4 4M10 6l-4 4" />
427
- </svg>
428
- Interactive component — see full preview
429
- </div>`;else{const M=x.replace(/:root/g,":host").replace(/\bhtml\s*\{/g,":host {");f.innerHTML=`<style>${M}
430
- ${k}
431
- :host { display: block; }
432
- .rf-preview-wrapper {
433
- font-family: var(--rf-font-sans, system-ui, -apple-system, sans-serif);
434
- color: var(--rf-color-text, #1a1a2e);
435
- line-height: 1.6;
436
- --rf-content-max: calc(100% - 6rem);
437
- --rf-content-gutter: 1.5rem;
438
- }
439
- .rf-preview-wrapper > article {
440
- display: grid;
441
- grid-template-columns:
442
- [full-start] 1fr
443
- [wide-start] minmax(0, var(--rf-wide-inset, 8rem))
444
- [content-start] min(var(--rf-content-max), 100% - var(--rf-content-gutter) * 2)
445
- [content-end] minmax(0, var(--rf-wide-inset, 8rem))
446
- [wide-end] 1fr
447
- [full-end];
448
- }
449
- .rf-preview-wrapper > article > * { grid-column: content; }
450
- .rf-preview-wrapper > article > [data-width="wide"] { grid-column: wide; }
451
- .rf-preview-wrapper > article > [data-width="full"],
452
- .rf-preview-wrapper > article > :is([data-tint], [data-color-scheme]):not([data-width]) {
453
- grid-column: full;
454
- padding-inline: max(var(--rf-content-gutter, 1.5rem), calc((100% - var(--rf-content-max)) / 2));
455
- }
456
- /* Base: invisible outline + transition (persists on remove for fade-out) */
457
- [data-name] {
458
- outline: 2px dashed transparent;
459
- outline-offset: 4px;
460
- border-radius: 4px;
461
- transition: outline-color 150ms ease;
462
- }
463
- [data-rune] {
464
- outline: 2px dashed transparent;
465
- outline-offset: 4px;
466
- border-radius: 4px;
467
- transition: outline-color 150ms ease;
468
- }
469
- /* Editable section hover affordance */
470
- [data-name].rf-editable-hover {
471
- outline-color: rgba(59, 130, 246, 0.5);
472
- }
473
- [data-name].rf-editable-hover,
474
- [data-name].rf-editable-hover * {
475
- cursor: text !important;
476
- }
477
- /* Rune root hover affordance — opens block edit panel */
478
- [data-rune].rf-editable-hover {
479
- outline-color: rgba(59, 130, 246, 0.3);
480
- }
481
- [data-rune].rf-editable-hover,
482
- [data-rune].rf-editable-hover * {
483
- cursor: pointer !important;
484
- }
485
- /* Hover tooltip */
486
- .rf-edit-tooltip {
487
- position: fixed;
488
- padding: 2px 8px;
489
- font-family: system-ui, -apple-system, sans-serif;
490
- font-size: 11px;
491
- font-weight: 600;
492
- line-height: 1.4;
493
- color: #fff;
494
- background: rgba(30, 41, 59, 0.9);
495
- border-radius: 4px;
496
- pointer-events: none;
497
- z-index: 10000;
498
- white-space: nowrap;
499
- opacity: 0;
500
- transition: opacity 120ms ease;
501
- }
502
- .rf-edit-tooltip.rf-tooltip-visible {
503
- opacity: 1;
504
- }
505
- </style>
506
- <div class="rf-preview-wrapper">${T}</div>`;const P=f.querySelector(".rf-preview-wrapper");P&&(h=gC(P),P.addEventListener("click",D=>{D.target.closest("a")&&D.preventDefault()},!0),!c()&&(e.onsectionclick||e.onruneclick)&&e.block.type==="rune"&&v(P,p(C)))}}catch{f&&(f.innerHTML="<style>:host { display: block; padding: 0.75rem 1.5rem; color: #999; font-family: system-ui; font-size: 12px; }</style><em>Preview unavailable</em>")}}},50),()=>{clearTimeout(d),h&&(h(),h=null)}});var b=W7(),_=q(b);{var A=S=>{var C=F7();j(S,C)};ue(_,S=>{l()&&S(A)})}var y=R(_,2);{var w=S=>{var C=V7();cn(C,x=>L(u,x),()=>m(u)),j(S,C)};ue(y,S=>{e.themeConfig&&S(w)})}fe(()=>Et(b,"draggable",l()?"true":"false")),ct("dragstart",b,function(...S){e.ondragstart?.apply(this,S)}),ct("dragover",b,function(...S){e.ondragover?.apply(this,S)}),ct("drop",b,function(...S){e.ondrop?.apply(this,S)}),j(n,b),vt()}var U7=V('<span class="prose-card__drag svelte-1oewfd6" title="Drag to reorder"><svg width="8" height="14" viewBox="0 0 8 14" fill="currentColor"><circle cx="2" cy="2" r="1.2"></circle><circle cx="6" cy="2" r="1.2"></circle><circle cx="2" cy="7" r="1.2"></circle><circle cx="6" cy="7" r="1.2"></circle><circle cx="2" cy="12" r="1.2"></circle><circle cx="6" cy="12" r="1.2"></circle></svg></span>'),G7=V('<div class="prose-card__preview svelte-1oewfd6"></div>'),H7=V('<div class="prose-card svelte-1oewfd6"><!> <!></div>');function K7(n,e){Ot(e,!0);let t=Pt(e,"highlightCss",3,""),r=Pt(e,"highlightTransform",3,null),i=Pt(e,"communityTags",3,null),s=Pt(e,"communityPostTransforms",3,null),o=Pt(e,"communityStyles",3,null),a=Pt(e,"aggregated",19,()=>({})),l=Pt(e,"dragHandle",3,!0),c=Pt(e,"readOnly",3,!1),u=ee(void 0),f=null,d,h=null;const g=new Set(["H1","H2","H3","H4","H5","H6","P","PRE","UL","OL","BLOCKQUOTE","HR","TABLE"]);function p(x){return x.startsWith("H")&&x.length===2?`h${x[1]}`:{P:"paragraph",PRE:"code",UL:"list",OL:"list",BLOCKQUOTE:"quote",HR:"divider",TABLE:"table"}[x]??x.toLowerCase()}function O(x,k){let E=x;for(;E&&E!==k;){if(g.has(E.tagName))return E;E=E.parentElement}return null}function v(x){const k=(x.textContent??"").trim(),E=x.tagName;for(let T=0;T<e.block.children.length;T++){const $=e.block.children[T];if(E.startsWith("H")&&E.length===2&&$.type==="heading"){const M=yi($.text??"").trim();if(k===M)return T}else if(E==="P"&&$.type==="paragraph"){const M=yi($.source).trim();if(k===M)return T}else if(E==="PRE"&&$.type==="fence"){const P=(x.querySelector("code")??x).textContent?.trim()??"",D=($.code??"").trim();if(P===D)return T}else if((E==="UL"||E==="OL")&&$.type==="list"){const M=$.source.replace(/^[-*+\d.]+\s*/gm,"").trim();if(k.includes(M.slice(0,30))||M.includes(k.slice(0,30)))return T}else if(E==="BLOCKQUOTE"&&$.type==="quote"){const M=$.source.replace(/^>\s*/gm,"").trim();if(k===M)return T}else if(E==="HR"&&$.type==="hr")return T}return-1}function b(x){let k=null,E=null;const T=75,$=document.createElement("div");$.className="rf-edit-tooltip",x.appendChild($);function M(D,I){$.textContent=D,$.style.left=`${I.clientX+12}px`,$.style.top=`${I.clientY+12}px`,$.classList.add("rf-tooltip-visible")}function P(){$.classList.remove("rf-tooltip-visible")}x.addEventListener("mouseover",D=>{const I=O(D.target,x);E!==null&&(clearTimeout(E),E=null),I===k||(k?.classList.remove("rf-editable-hover"),k=I,k?.classList.add("rf-editable-hover")),I?(x.classList.remove("rf-block-hover"),M(p(I.tagName),D)):e.onblockclick?(x.classList.add("rf-block-hover"),M("prose",D)):P()}),x.addEventListener("mousemove",D=>{$.classList.contains("rf-tooltip-visible")&&($.style.left=`${D.clientX+12}px`,$.style.top=`${D.clientY+12}px`)}),x.addEventListener("mouseout",D=>{const I=D.relatedTarget;if(x.classList.remove("rf-block-hover"),k&&(!I||!k.contains(I))){E!==null&&clearTimeout(E);const W=k;E=setTimeout(()=>{W.classList.remove("rf-editable-hover"),k===W&&(k=null),E=null},T),P()}}),x.addEventListener("click",D=>{P();const I=O(D.target,x);if(!I){e.onblockclick?.({x:D.clientX,y:D.clientY});return}D.preventDefault(),D.stopPropagation();const W=v(I);if(W===-1)return;const U=e.block.children[W],ae=I.getBoundingClientRect();I.tagName;const ce={elementType:U.type,text:(I.textContent??"").trim(),rect:ae,childIndex:W};U.type==="heading"?ce.headingLevel=U.level:U.type==="fence"&&(ce.fenceLanguage=U.language??"",ce.fenceCode=U.code??""),e.onsectionclick?.(ce)})}const _=`
507
- /* Wrapper: inset border on dead-space hover */
508
- .rf-preview-wrapper {
509
- transition: box-shadow 150ms ease;
510
- cursor: pointer;
511
- }
512
- .rf-preview-wrapper.rf-block-hover {
513
- box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.5);
514
- border-radius: 4px;
515
- }
516
- /* Block-level elements: invisible outline + transition */
517
- h1, h2, h3, h4, h5, h6, p, pre, ul, ol, blockquote, hr, table {
518
- outline: 2px dashed transparent;
519
- outline-offset: 4px;
520
- border-radius: 4px;
521
- transition: outline-color 150ms ease;
522
- }
523
- /* Hover affordance */
524
- .rf-editable-hover {
525
- outline-color: rgba(59, 130, 246, 0.5);
526
- }
527
- .rf-editable-hover, .rf-editable-hover * {
528
- cursor: text !important;
529
- }
530
- /* Hover tooltip */
531
- .rf-edit-tooltip {
532
- position: fixed;
533
- padding: 2px 8px;
534
- font-family: system-ui, -apple-system, sans-serif;
535
- font-size: 11px;
536
- font-weight: 600;
537
- line-height: 1.4;
538
- color: #fff;
539
- background: rgba(30, 41, 59, 0.9);
540
- border-radius: 4px;
541
- pointer-events: none;
542
- z-index: 10000;
543
- white-space: nowrap;
544
- opacity: 0;
545
- transition: opacity 120ms ease;
546
- }
547
- .rf-edit-tooltip.rf-tooltip-visible {
548
- opacity: 1;
549
- }
550
- `;hn(()=>{if(!m(u)||!e.themeConfig)return;(!f||f.host!==m(u))&&(f=m(u).attachShadow({mode:"open"}));const x=e.block.source,k=e.themeConfig,E=e.themeCss,T=t()||"",$=r();return clearTimeout(d),d=setTimeout(()=>{if(f){h&&(h(),h=null);try{const{html:M}=hC(x,k,$,i()??void 0,s()??void 0,a(),o()??void 0),P=E.replace(/:root/g,":host").replace(/\bhtml\s*\{/g,":host {");f.innerHTML=`<style>${P}
551
- ${T}
552
- :host { display: block; }
553
- .rf-preview-wrapper {
554
- font-family: var(--rf-font-sans, system-ui, -apple-system, sans-serif);
555
- color: var(--rf-color-text, #1a1a2e);
556
- line-height: 1.6;
557
- --rf-content-max: calc(100% - 6rem);
558
- --rf-content-gutter: 1.5rem;
559
- }
560
- .rf-preview-wrapper > article {
561
- display: grid;
562
- grid-template-columns:
563
- [full-start] 1fr
564
- [wide-start] minmax(0, var(--rf-wide-inset, 8rem))
565
- [content-start] min(var(--rf-content-max), 100% - var(--rf-content-gutter) * 2)
566
- [content-end] minmax(0, var(--rf-wide-inset, 8rem))
567
- [wide-end] 1fr
568
- [full-end];
569
- }
570
- .rf-preview-wrapper > article > * { grid-column: content; }
571
- ${!c()&&e.onsectionclick?_:""}
572
- </style>
573
- <div class="rf-preview-wrapper">${M}</div>`;const D=f.querySelector(".rf-preview-wrapper");D&&(h=gC(D),D.addEventListener("click",I=>{I.target.closest("a")&&I.preventDefault()},!0),!c()&&e.onsectionclick&&b(D))}catch{f&&(f.innerHTML="<style>:host { display: block; padding: 0.75rem 1.5rem; color: #999; font-family: system-ui; font-size: 12px; }</style><em>Preview unavailable</em>")}}},50),()=>{clearTimeout(d),h&&(h(),h=null)}});var A=H7(),y=q(A);{var w=x=>{var k=U7();j(x,k)};ue(y,x=>{l()&&x(w)})}var S=R(y,2);{var C=x=>{var k=G7();cn(k,E=>L(u,E),()=>m(u)),j(x,k)};ue(S,x=>{e.themeConfig&&x(C)})}fe(()=>Et(A,"draggable",l()?"true":"false")),ct("dragstart",A,function(...x){e.ondragstart?.apply(this,x)}),ct("dragover",A,function(...x){e.ondragover?.apply(this,x)}),ct("drop",A,function(...x){e.ondrop?.apply(this,x)}),j(n,A),vt()}function Tg(n,e){if(e==="any")return!0;if(e.includes("|"))return e.split("|").some(t=>Tg(n,t));if(e.startsWith("heading:")){const t=parseInt(e.slice(8),10);return n.type==="heading"&&n.headingLevel===t}if(e==="list:ordered")return n.type==="list"&&n.listOrdered===!0;if(e==="list:unordered")return n.type==="list"&&n.listOrdered!==!0;if(e.startsWith("tag:")){const t=e.slice(4);return n.type==="rune"&&n.runeName===t}return e==="blockquote"?n.type==="quote":n.type===e}function Ap(n,e){const t=[];let r=0;for(const i of e){const s={name:i.name,match:i.match,optional:i.optional??!1,greedy:i.greedy??!1,filled:!1,nodes:[],description:i.description,template:i.template,emitTag:i.emitTag};if(i.greedy){for(;r<n.length&&Tg(n[r],i.match);)s.nodes.push(n[r]),r++;s.filled=s.nodes.length>0}else r<n.length&&Tg(n[r],i.match)&&(s.nodes.push(n[r]),s.filled=!0,r++);t.push(s)}return t}function J7(n,e){switch(e.type){case"sequence":return{type:"sequence",fields:Ap(n,e.fields)};case"delimited":{const t=[],r=[[]];for(const i of n)i.type==="hr"?r.push([]):r[r.length-1].push(i);if(e.zones)for(let i=0;i<e.zones.length;i++){const s=e.zones[i],o=r[i]??[];t.push({name:s.name,fields:Ap(o,s.fields)})}else if(e.dynamicZones&&e.zoneModel)for(let i=0;i<r.length;i++)t.push({name:`zone-${i+1}`,fields:Ap(r[i],e.zoneModel.fields)});return{type:"delimited",delimiter:e.delimiter,zones:t}}case"sections":return{type:"sections",description:`Sections split by ${e.sectionHeading}${e.emitTag?`, each emits ${e.emitTag}`:""}`};case"custom":return{type:"custom",description:e.description}}}var eX=V('<span class="rune-attrs__required svelte-ong743">*</span>'),tX=V('<span class="rune-attrs__info svelte-ong743"><svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="7"></circle><line x1="8" y1="7" x2="8" y2="11"></line><circle cx="8" cy="4.5" r="0.5" fill="currentColor" stroke="none"></circle></svg></span>'),nX=V('<button type="button"> </button>'),rX=_s('<svg class="rune-attrs__check svelte-ong743" width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 8l3.5 3.5L13 5"></path></svg>'),iX=_s('<svg class="rune-attrs__check svelte-ong743" width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 8l3.5 3.5L13 5"></path></svg>'),sX=V('<button type="button"><span class="rune-attrs__option-label svelte-ong743"> </span> <!></button>'),oX=V('<div class="rune-attrs__dropdown svelte-ong743"><button type="button"><span class="rune-attrs__option-label rune-attrs__option-label--default svelte-ong743">default</span> <!></button> <!></div>'),aX=V('<div class="rune-attrs__enum svelte-ong743"><button type="button"> </button> <!></div>'),lX=V('<input class="rune-attrs__inline-input svelte-ong743"/>'),cX=V('<button type="button"> </button>'),uX=V('<div class="rune-attrs__row svelte-ong743"><span class="rune-attrs__label svelte-ong743"> <!> <!></span> <!></div>'),fX=V('<span class="rune-attrs__empty svelte-ong743">No attributes</span>'),dX=V('<div class="rune-attrs svelte-ong743"><!> <!></div>');function z0(n,e){Ot(e,!0);const t=new Set(["ratio","align","gap","collapse"]);function r(w,S){const C={...e.attributes};S===""||S===void 0?delete C[w]:C[w]=S,e.onchange(C)}function i(w){return w.replace(/-/g," ").replace(/\b\w/g,S=>S.toUpperCase())}function s(w){if(!t.has(w)||!("layout"in e.runeInfo.attributes))return!1;const S=e.attributes.layout??"";return S!=="split"&&S!=="split-reverse"}let o=me(()=>Object.entries(e.runeInfo.attributes).filter(([w])=>!s(w)).sort(([,w],[,S])=>w.required===S.required?0:w.required?-1:1)),a=ee(null),l;function c(w){L(a,m(a)===w?null:w,!0)}function u(w,S){r(w,S),L(a,null)}function f(w){m(a)&&l&&!l.contains(w.target)&&L(a,null)}function d(w){w.key==="Escape"&&m(a)&&(L(a,null),w.stopPropagation())}let h=ee(null),g=ee("");function p(w,S){L(h,w,!0),L(g,S,!0)}function O(w){r(w,m(g)),L(h,null)}function v(w,S){w.key==="Enter"?O(S):w.key==="Escape"&&(L(h,null),w.stopPropagation())}var b=dX();ct("mousedown",Lo,f),ct("keydown",Lo,d);var _=q(b);$t(_,17,()=>m(o),([w,S])=>w,(w,S)=>{var C=me(()=>Mc(m(S),2));let x=()=>m(C)[0],k=()=>m(C)[1];const E=me(()=>e.attributes[x()]??"");var T=uX(),$=q(T),M=q($),P=R(M);{var D=se=>{var ie=eX();j(se,ie)};ue(P,se=>{k().required&&se(D)})}var I=R(P,2);{var W=se=>{var ie=tX();fe(()=>Et(ie,"data-tooltip",k().description)),j(se,ie)};ue(I,se=>{k().description&&se(W)})}var U=R($,2);{var ae=se=>{var ie=nX();let B;ie.__click=()=>r(x(),m(E)==="true"?"":"true");var J=q(ie);fe(()=>{B=Ze(ie,1,"rune-attrs__value svelte-ong743",null,B,{active:m(E)==="true"}),Ee(J,m(E)==="true"?"Yes":"No")}),j(se,ie)},ce=se=>{var ie=aX(),B=q(ie);let J;B.__click=()=>c(x());var Ae=q(B),Qe=R(B,2);{var Ne=ge=>{var Pe=oX(),Ke=q(Pe);let Je;Ke.__click=()=>u(x(),"");var We=R(q(Ke),2);{var be=Me=>{var xt=rX();j(Me,xt)};ue(We,Me=>{m(E)||Me(be)})}var Oe=R(Ke,2);$t(Oe,17,()=>k().values,Gt,(Me,xt)=>{var at=sX();let st;at.__click=()=>u(x(),m(xt));var kt=q(at),yn=q(kt),en=R(kt,2);{var xe=mn=>{var et=iX();j(mn,et)};ue(en,mn=>{m(E)===m(xt)&&mn(xe)})}fe(()=>{st=Ze(at,1,"rune-attrs__option svelte-ong743",null,st,{selected:m(E)===m(xt)}),Ee(yn,m(xt))}),j(Me,at)}),fe(()=>Je=Ze(Ke,1,"rune-attrs__option svelte-ong743",null,Je,{selected:!m(E)})),j(ge,Pe)};ue(Qe,ge=>{m(a)===x()&&ge(Ne)})}fe(()=>{J=Ze(B,1,"rune-attrs__value svelte-ong743",null,J,{active:!!m(E),open:m(a)===x()}),Ee(Ae,m(E)||"default")}),j(se,ie)},K=se=>{var ie=lX();ie.__keydown=B=>v(B,x()),Os(ie),fe(()=>Et(ie,"type",k().type==="Number"?"number":"text")),ct("blur",ie,()=>O(x())),$n(ie,()=>m(g),B=>L(g,B)),j(se,ie)},H=se=>{var ie=cX();let B;ie.__click=()=>p(x(),m(E));var J=q(ie);fe(()=>{B=Ze(ie,1,"rune-attrs__value svelte-ong743",null,B,{active:!!m(E)}),Ee(J,m(E)||(k().required?"required":"default"))}),j(se,ie)};ue(U,se=>{k().type==="Boolean"?se(ae):k().values&&k().values.length>0?se(ce,1):m(h)===x()?se(K,2):se(H,!1)})}fe(se=>Ee(M,`${se??""} `),[()=>i(x())]),j(w,T)});var A=R(_,2);{var y=w=>{var S=fX();j(w,S)};ue(A,w=>{m(o).length===0&&w(y)})}cn(b,w=>l=w,()=>l),j(n,b),vt()}Ut(["click","keydown"]);var hX=V('<div class="tree-node svelte-16z33d"><button type="button"><span class="tree-node__indicator svelte-16z33d">▾</span> <span class="tree-node__rune-dot svelte-16z33d"></span> <span class="tree-node__label tree-node__label--rune svelte-16z33d"> </span></button></div>'),pX=V('<button type="button"><span class="tree-node__indicator svelte-16z33d"> </span> <span class="tree-node__rune-dot svelte-16z33d"></span> <span class="tree-node__label tree-node__label--rune svelte-16z33d"> </span></button>'),mX=V('<button type="button"><svg class="tree-node__icon svelte-16z33d" width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path></path></svg> <span class="tree-node__label tree-node__label--content svelte-16z33d"> </span></button>'),gX=V('<div class="tree-node svelte-16z33d"><!></div> <!>',1),OX=V("<!> <!>",1);function OC(n,e){Ot(e,!0);let t=Pt(e,"isRootActive",3,!1),r=Pt(e,"depth",3,0),i=Pt(e,"pathPrefix",19,()=>[]);function s(d){return d.length!==e.activePath.length?!1:d.every((h,g)=>h===e.activePath[g])}function o(d){return d.length>e.activePath.length?!1:d.every((h,g)=>h===e.activePath[g])}const a={heading:"M3 3v10M13 3v10M3 8h10",paragraph:"M2 4h12M2 8h12M2 12h8",fence:"M5 4L2 8l3 4M11 4l3 4-3 4",list:"M4 4h10M4 8h10M4 12h10M2 4h0M2 8h0M2 12h0",quote:"M4 4h8M4 7h6M1 3v8",hr:"M2 8h12",image:"M2 2h12v12H2zM5 5l-3 7h12l-4-5-2 2.5"};var l=OX(),c=ot(l);{var u=d=>{var h=hX(),g=q(h);let p;g.__click=function(...b){e.onrootclick?.apply(this,b)};var O=R(q(g),4),v=q(O);fe(()=>{p=Ze(g,1,"tree-node__btn tree-node__btn--rune svelte-16z33d",null,p,{active:t()}),Ee(v,e.rootLabel)}),j(d,h)};ue(c,d=>{e.rootLabel&&e.onrootclick&&d(u)})}var f=R(c,2);$t(f,17,()=>e.nodes,Gt,(d,h,g)=>{const p=me(()=>[...i(),g]),O=me(()=>m(h).type==="rune"),v=me(()=>s(m(p))),b=me(()=>o(m(p))&&!m(v)),_=me(()=>m(O)&&!m(h).selfClosing&&m(h).children&&m(h).children.length>0);var A=gX(),y=ot(A),w=q(y);{var S=E=>{var T=pX();let $;T.__click=()=>e.onselect(m(p));var M=q(T),P=q(M),D=R(M,4),I=q(D);fe(()=>{$=Ze(T,1,"tree-node__btn tree-node__btn--rune svelte-16z33d",null,$,{active:m(v),ancestor:m(b)}),Ee(P,m(_)?"▾":"▸"),Ee(I,m(h).label)}),j(E,T)},C=E=>{var T=mX();let $;T.__click=()=>e.onselect(m(p));var M=q(T),P=q(M),D=R(M,2),I=q(D);fe(()=>{$=Ze(T,1,"tree-node__btn tree-node__btn--content svelte-16z33d",null,$,{active:m(v)}),Et(P,"d",a[m(h).type]??"M2 4h12M2 8h12M2 12h8"),Ee(I,m(h).label)}),j(E,T)};ue(w,E=>{m(O)?E(S):E(C,!1)})}var x=R(y,2);{var k=E=>{var T=ln(),$=ot(T);{let M=me(()=>r()+1);OC($,{get nodes(){return m(h).children},get activePath(){return e.activePath},get onselect(){return e.onselect},get depth(){return m(M)},get pathPrefix(){return m(p)}})}j(E,T)};ue(x,E=>{m(_)&&m(h).children&&E(k)})}fe(()=>Ar(y,`padding-left: ${(r()+(e.rootLabel?1:0))*16}px`)),j(d,A)}),j(n,l),vt()}Ut(["click"]);var vX=V('<button type="button" class="cm-tree__preview-line cm-tree__preview-line--rune svelte-1d9gzqq"><span class="cm-tree__rune-dot svelte-1d9gzqq"></span> </button>'),bX=V('<button type="button" class="cm-tree__preview-line cm-tree__preview-line--clickable svelte-1d9gzqq"> </button>'),yX=V('<div draggable="true"><span class="cm-tree__preview-grip svelte-1d9gzqq" title="Drag to reorder"><svg width="6" height="10" viewBox="0 0 6 10" fill="none"><circle cx="1.5" cy="1.5" r="1" fill="currentColor"></circle><circle cx="4.5" cy="1.5" r="1" fill="currentColor"></circle><circle cx="1.5" cy="5" r="1" fill="currentColor"></circle><circle cx="4.5" cy="5" r="1" fill="currentColor"></circle><circle cx="1.5" cy="8.5" r="1" fill="currentColor"></circle><circle cx="4.5" cy="8.5" r="1" fill="currentColor"></circle></svg></span> <button type="button" class="cm-tree__preview-text cm-tree__preview-text--clickable svelte-1d9gzqq"> </button> <button type="button" class="cm-tree__preview-remove svelte-1d9gzqq" title="Remove item"><svg width="10" height="10" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="4" y1="4" x2="12" y2="12"></line><line x1="12" y1="4" x2="4" y2="12"></line></svg></button></div>'),wX=V('<div draggable="true"><span class="cm-tree__preview-grip svelte-1d9gzqq" title="Drag to reorder"><svg width="6" height="10" viewBox="0 0 6 10" fill="none"><circle cx="1.5" cy="1.5" r="1" fill="currentColor"></circle><circle cx="4.5" cy="1.5" r="1" fill="currentColor"></circle><circle cx="1.5" cy="5" r="1" fill="currentColor"></circle><circle cx="4.5" cy="5" r="1" fill="currentColor"></circle><circle cx="1.5" cy="8.5" r="1" fill="currentColor"></circle><circle cx="4.5" cy="8.5" r="1" fill="currentColor"></circle></svg></span> <button type="button" class="cm-tree__preview-text cm-tree__preview-text--clickable svelte-1d9gzqq"> </button> <button type="button" class="cm-tree__preview-remove svelte-1d9gzqq" title="Remove item"><svg width="10" height="10" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="4" y1="4" x2="12" y2="12"></line><line x1="12" y1="4" x2="4" y2="12"></line></svg></button></div>'),_X=V('<span class="cm-tree__required-badge svelte-1d9gzqq">required</span>'),kX=V('<button type="button" class="cm-tree__action cm-tree__action--add svelte-1d9gzqq"><svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="8" y1="3" x2="8" y2="13"></line><line x1="3" y1="8" x2="13" y2="8"></line></svg></button>'),xX=V('<!> <button type="button" class="cm-tree__action cm-tree__action--remove svelte-1d9gzqq"><svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 3 14 13 14 13 6"></polyline><line x1="1" y1="4" x2="15" y2="4"></line><line x1="6" y1="8" x2="6" y2="12"></line><line x1="10" y1="8" x2="10" y2="12"></line></svg></button>',1),SX=V('<button type="button" class="cm-tree__action cm-tree__action--add svelte-1d9gzqq"><svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="8" y1="3" x2="8" y2="13"></line><line x1="3" y1="8" x2="13" y2="8"></line></svg></button>'),AX=V('<div class="cm-tree__previews svelte-1d9gzqq"><!></div>'),CX=V('<div class="cm-tree__previews svelte-1d9gzqq"><!></div>'),TX=V('<div class="cm-tree__previews svelte-1d9gzqq"><!></div>'),PX=V('<button type="button"><svg class="cm-tree__field-icon svelte-1d9gzqq" width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path></path></svg> <span class="cm-tree__field-name svelte-1d9gzqq"> </span> <!> <span class="cm-tree__field-spacer svelte-1d9gzqq"></span> <!></button> <!>',1),EX=V('<div class="cm-tree__fields svelte-1d9gzqq"></div>'),$X=V('<div class="cm-tree__delimiter svelte-1d9gzqq"><span class="cm-tree__delimiter-line svelte-1d9gzqq"></span></div>'),QX=V('<span class="cm-tree__required-badge svelte-1d9gzqq">required</span>'),LX=V('<button type="button" class="cm-tree__action cm-tree__action--add svelte-1d9gzqq"><svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="8" y1="3" x2="8" y2="13"></line><line x1="3" y1="8" x2="13" y2="8"></line></svg></button>'),MX=V('<!> <button type="button" class="cm-tree__action cm-tree__action--remove svelte-1d9gzqq"><svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 3 14 13 14 13 6"></polyline><line x1="1" y1="4" x2="15" y2="4"></line><line x1="6" y1="8" x2="6" y2="12"></line><line x1="10" y1="8" x2="10" y2="12"></line></svg></button>',1),DX=V('<button type="button" class="cm-tree__action cm-tree__action--add svelte-1d9gzqq"><svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="8" y1="3" x2="8" y2="13"></line><line x1="3" y1="8" x2="13" y2="8"></line></svg></button>'),qX=V('<div class="cm-tree__previews svelte-1d9gzqq"><!></div>'),RX=V('<div class="cm-tree__previews svelte-1d9gzqq"><!></div>'),IX=V('<div class="cm-tree__previews svelte-1d9gzqq"><!></div>'),NX=V('<button type="button"><svg class="cm-tree__field-icon svelte-1d9gzqq" width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path></path></svg> <span class="cm-tree__field-name svelte-1d9gzqq"> </span> <!> <span class="cm-tree__field-spacer svelte-1d9gzqq"></span> <!></button> <!>',1),BX=V('<!> <div class="cm-tree__zone svelte-1d9gzqq"><div class="cm-tree__zone-label svelte-1d9gzqq"> </div> <div class="cm-tree__fields svelte-1d9gzqq"></div></div>',1),jX=V('<div class="cm-tree__description svelte-1d9gzqq"> </div>'),zX=V('<div class="cm-tree svelte-1d9gzqq"><div class="cm-tree__root svelte-1d9gzqq"><span class="cm-tree__rune-dot svelte-1d9gzqq"></span> <span class="cm-tree__root-label svelte-1d9gzqq"> </span></div> <!></div>');function ZX(n,e){Ot(e,!0);const t=(T,$=Ji,M=Ji,P=Ji)=>{var D=ln(),I=ot(D);$t(I,17,$,Gt,(W,U)=>{var ae=ln(),ce=ot(ae);{var K=se=>{var ie=vX();ie.__click=()=>e.onnavigaterune(M(),m(U).nodeIndex,P());var B=R(q(ie));fe(()=>Ee(B,` ${m(U).text??""}`)),j(se,ie)},H=se=>{var ie=bX();ie.__click=J=>e.oneditfield(M(),J.currentTarget.getBoundingClientRect(),P(),m(U).nodeIndex);var B=q(ie);fe(()=>Ee(B,m(U).text)),j(se,ie)};ue(ce,se=>{m(U).type==="rune"&&m(U).nodeIndex!==void 0?se(K):se(H,!1)})}j(W,ae)}),j(T,D)},r=(T,$=Ji,M=Ji,P=Ji)=>{var D=ln(),I=ot(D);$t(I,17,$,Gt,(W,U)=>{var ae=yX();let ce;var K=R(q(ae),2);K.__click=ie=>{ie.stopPropagation(),e.oneditlistitem(M(),m(U).index,ie.currentTarget.getBoundingClientRect(),P())};var H=q(K),se=R(K,2);se.__click=()=>e.onremovelistitem(M(),m(U).index,P()),fe(()=>{ce=Ze(ae,1,"cm-tree__preview-item svelte-1d9gzqq",null,ce,{"cm-tree__preview-item--drag-over":m(o)===M()&&m(a)===P()&&m(c)===m(U).index&&m(l)!==m(U).index,"cm-tree__preview-item--dragging":m(o)===M()&&m(a)===P()&&m(l)===m(U).index}),Ee(H,m(U).text)}),ct("dragstart",ae,ie=>u(ie,M(),m(U).index,P())),ct("dragover",ae,ie=>f(ie,m(U).index)),ct("drop",ae,ie=>d(ie,m(U).index)),ct("dragend",ae,h),j(W,ae)}),j(T,D)},i=(T,$=Ji,M=Ji,P=Ji)=>{var D=ln(),I=ot(D);$t(I,17,$,Gt,(W,U)=>{var ae=wX();let ce;var K=R(q(ae),2);K.__click=ie=>{ie.stopPropagation(),e.oneditfield(M(),ie.currentTarget.getBoundingClientRect(),P(),m(U).index)};var H=q(K),se=R(K,2);se.__click=()=>e.onremovelistitem(M(),m(U).index,P()),fe(()=>{ce=Ze(ae,1,"cm-tree__preview-item svelte-1d9gzqq",null,ce,{"cm-tree__preview-item--drag-over":m(o)===M()&&m(a)===P()&&m(c)===m(U).index&&m(l)!==m(U).index,"cm-tree__preview-item--dragging":m(o)===M()&&m(a)===P()&&m(l)===m(U).index}),Ee(H,m(U).text)}),ct("dragstart",ae,ie=>u(ie,M(),m(U).index,P())),ct("dragover",ae,ie=>f(ie,m(U).index)),ct("drop",ae,ie=>d(ie,m(U).index)),ct("dragend",ae,h),j(W,ae)}),j(T,D)};let s=Pt(e,"selectedField",3,null),o=ee(null),a=ee(void 0),l=ee(null),c=ee(null);function u(T,$,M,P){L(o,$,!0),L(a,P,!0),L(l,M,!0),L(c,M,!0),T.dataTransfer&&(T.dataTransfer.effectAllowed="move",T.dataTransfer.setData("text/plain",String(M)))}function f(T,$){m(l)!==null&&(T.preventDefault(),T.dataTransfer&&(T.dataTransfer.dropEffect="move"),L(c,$,!0))}function d(T,$){T.preventDefault(),m(l)!==null&&m(l)!==$&&m(o)!==null&&e.onreorderlistitem(m(o),m(l),$,m(a)),L(o,null),L(a,void 0),L(l,null),L(c,null)}function h(){L(o,null),L(a,void 0),L(l,null),L(c,null)}function g(T){return T==="list"||T.startsWith("list:")}function p(T){return T.greedy&&T.filled&&T.match!=="any"}function O(T){return T.nodes.map(($,M)=>{let P;if($.type==="fence")P=$.fenceLanguage?`[${$.fenceLanguage}]`:"[code]";else if($.type==="heading"&&$.headingText)P=$.headingText;else if($.type==="rune"&&$.runeName)P=$.runeName;else if($.type==="image")P="[image]";else{const D=$.source.replace(/\n/g," ").trim();P=D.length>50?D.slice(0,47)+"...":D}return{text:P.length>50?P.slice(0,47)+"...":P,index:M}})}function v(T){switch(T.includes("|")?T.split("|")[0]:T){case"heading":case"heading:1":case"heading:2":case"heading:3":case"heading:4":case"heading:5":case"heading:6":return"M3 3v10M13 3v10M3 8h10";case"paragraph":return"M2 4h12M2 8h12M2 12h8";case"fence":return"M5 4L2 8l3 4M11 4l3 4-3 4";case"list":case"list:ordered":case"list:unordered":return"M4 4h10M4 8h10M4 12h10M2 4h0M2 8h0M2 12h0";case"blockquote":case"quote":return"M4 4h8M4 7h6M1 3v8";case"image":return"M2 2h12v12H2zM5 5l-3 7h12l-4-5-2 2.5";case"any":return"M2 8h12M8 2v12";default:return"M2 4h12M2 8h12M2 12h8"}}function b(T){const $=[];for(const M of T){if(M.type!=="list")continue;const P=Vd(M.source);for(let D=0;D<P.length;D++){const W=P[D].split(`
574
- `)[0].replace(/^[-*+]\s+|^\d+\.\s+/,"").trim();W&&$.push({text:W.length>50?W.slice(0,47)+"...":W,index:D})}}return $}function _(T){const $=[];for(let M=0;M<T.length;M++){const P=T[M];if(P.type==="heading"&&P.headingText)$.push({text:P.headingText,type:"text",nodeIndex:M});else if(P.type==="paragraph"){const D=P.source.replace(/\n/g," ").trim();$.push({text:D.length>60?D.slice(0,57)+"...":D,type:"text",nodeIndex:M})}else if(P.type==="rune"&&P.runeName)$.push({text:P.runeName,type:"rune",nodeIndex:M});else if(P.type==="fence"){const D=P.fenceLanguage?`[${P.fenceLanguage}]`:"[code]";$.push({text:D,type:"text",nodeIndex:M})}else if(P.type==="list"){const D=P.source.split(`
575
- `).filter(I=>I.match(/^[-*\d.]\s/)).map(I=>I.replace(/^[-*\d.]+\s+/,"").trim()).filter(Boolean);for(const I of D.slice(0,3))$.push({text:I.length>50?I.slice(0,47)+"...":I,type:"text"});D.length>3&&$.push({text:`... +${D.length-3} more`,type:"text"})}else if(P.type==="image")$.push({text:"[image]",type:"text",nodeIndex:M});else{const D=P.source.replace(/\n/g," ").trim();D&&$.push({text:D.length>50?D.slice(0,47)+"...":D,type:"text",nodeIndex:M})}}return $}var A=zX(),y=q(A),w=R(q(y),2),S=q(w),C=R(y,2);{var x=T=>{var $=EX();$t($,21,()=>e.structure.fields,Gt,(M,P)=>{const D=me(()=>_(m(P).nodes)),I=me(()=>g(m(P).match)?b(m(P).nodes):[]),W=me(()=>p(m(P))?O(m(P)):[]);var U=PX(),ae=ot(U);let ce;ae.__click=()=>e.onfieldselect(m(P).name);var K=q(ae),H=q(K),se=R(K,2),ie=q(se),B=R(se,2);{var J=be=>{var Oe=_X();j(be,Oe)};ue(B,be=>{!m(P).optional&&!m(P).filled&&be(J)})}var Ae=R(B,4);{var Qe=be=>{var Oe=xX(),Me=ot(Oe);{var xt=kt=>{var yn=kX();yn.__click=en=>{en.stopPropagation(),e.onappenditem(m(P).name)},fe(()=>Et(yn,"title",`Add item to ${m(P).name??""}`)),j(kt,yn)},at=me(()=>g(m(P).match)||p(m(P)));ue(Me,kt=>{m(at)&&kt(xt)})}var st=R(Me,2);st.__click=kt=>{kt.stopPropagation(),e.onremovefield(m(P).name)},fe(()=>Et(st,"title",`Remove ${m(P).name??""}`)),j(be,Oe)},Ne=be=>{var Oe=SX();Oe.__click=Me=>{Me.stopPropagation(),e.onaddfield(m(P).name)},fe(()=>Et(Oe,"title",`Add ${m(P).name??""}`)),j(be,Oe)};ue(Ae,be=>{m(P).filled?be(Qe):be(Ne,!1)})}var ge=R(ae,2);{var Pe=be=>{var Oe=AX(),Me=q(Oe);r(Me,()=>m(I),()=>m(P).name),j(be,Oe)},Ke=me(()=>m(P).filled&&g(m(P).match)&&m(I).length>0),Je=be=>{var Oe=CX(),Me=q(Oe);i(Me,()=>m(W),()=>m(P).name),j(be,Oe)},We=be=>{var Oe=TX(),Me=q(Oe);t(Me,()=>m(D),()=>m(P).name),j(be,Oe)};ue(ge,be=>{m(Ke)?be(Pe):m(P).filled&&m(W).length>0?be(Je,1):m(P).filled&&m(D).length>0&&be(We,2)})}fe(be=>{ce=Ze(ae,1,"cm-tree__field svelte-1d9gzqq",null,ce,{"cm-tree__field--filled":m(P).filled,"cm-tree__field--empty":!m(P).filled,"cm-tree__field--required":!m(P).optional&&!m(P).filled,"cm-tree__field--selected":s()===m(P).name}),Et(H,"d",be),Ee(ie,m(P).name)},[()=>v(m(P).match)]),j(M,U)}),j(T,$)},k=T=>{var $=ln(),M=ot($);$t(M,17,()=>e.structure.zones,Gt,(P,D,I)=>{var W=BX(),U=ot(W);{var ae=ie=>{var B=$X();j(ie,B)};ue(U,ie=>{I>0&&ie(ae)})}var ce=R(U,2),K=q(ce),H=q(K),se=R(K,2);$t(se,21,()=>m(D).fields,Gt,(ie,B)=>{const J=me(()=>_(m(B).nodes)),Ae=me(()=>g(m(B).match)?b(m(B).nodes):[]),Qe=me(()=>p(m(B))?O(m(B)):[]);var Ne=NX(),ge=ot(Ne);let Pe;ge.__click=()=>e.onfieldselect(m(B).name,m(D).name);var Ke=q(ge),Je=q(Ke),We=R(Ke,2),be=q(We),Oe=R(We,2);{var Me=et=>{var jt=QX();j(et,jt)};ue(Oe,et=>{!m(B).optional&&!m(B).filled&&et(Me)})}var xt=R(Oe,4);{var at=et=>{var jt=MX(),In=ot(jt);{var le=Ce=>{var De=LX();De.__click=St=>{St.stopPropagation(),e.onappenditem(m(B).name,m(D).name)},fe(()=>Et(De,"title",`Add item to ${m(B).name??""}`)),j(Ce,De)},ve=me(()=>g(m(B).match)||p(m(B)));ue(In,Ce=>{m(ve)&&Ce(le)})}var ke=R(In,2);ke.__click=Ce=>{Ce.stopPropagation(),e.onremovefield(m(B).name,m(D).name)},fe(()=>Et(ke,"title",`Remove ${m(B).name??""}`)),j(et,jt)},st=et=>{var jt=DX();jt.__click=In=>{In.stopPropagation(),e.onaddfield(m(B).name,m(D).name)},fe(()=>Et(jt,"title",`Add ${m(B).name??""}`)),j(et,jt)};ue(xt,et=>{m(B).filled?et(at):et(st,!1)})}var kt=R(ge,2);{var yn=et=>{var jt=qX(),In=q(jt);r(In,()=>m(Ae),()=>m(B).name,()=>m(D).name),j(et,jt)},en=me(()=>m(B).filled&&g(m(B).match)&&m(Ae).length>0),xe=et=>{var jt=RX(),In=q(jt);i(In,()=>m(Qe),()=>m(B).name,()=>m(D).name),j(et,jt)},mn=et=>{var jt=IX(),In=q(jt);t(In,()=>m(J),()=>m(B).name,()=>m(D).name),j(et,jt)};ue(kt,et=>{m(en)?et(yn):m(B).filled&&m(Qe).length>0?et(xe,1):m(B).filled&&m(J).length>0&&et(mn,2)})}fe(et=>{Pe=Ze(ge,1,"cm-tree__field svelte-1d9gzqq",null,Pe,{"cm-tree__field--filled":m(B).filled,"cm-tree__field--empty":!m(B).filled,"cm-tree__field--required":!m(B).optional&&!m(B).filled,"cm-tree__field--selected":s()===`${m(D).name}.${m(B).name}`}),Et(Je,"d",et),Ee(be,m(B).name)},[()=>v(m(B).match)]),j(ie,Ne)}),fe(()=>Ee(H,m(D).name)),j(P,W)}),j(T,$)},E=T=>{var $=jX(),M=q($);fe(()=>Ee(M,e.structure.description)),j(T,$)};ue(C,T=>{e.structure.type==="sequence"?T(x):e.structure.type==="delimited"?T(k,1):(e.structure.type==="sections"||e.structure.type==="custom")&&T(E,2)})}fe(()=>Ee(S,e.rootLabel)),j(n,A),vt()}Ut(["click"]);function he(n){return new Xa(kO.define(n))}function Qs(n){return re(()=>import("./index-CmKiH1-T.js"),[]).then(e=>e.sql({dialect:e[n]}))}const vC=[te.of({name:"C",extensions:["c","h","ino"],load(){return re(()=>import("./index-ecy9XYuN.js"),[]).then(n=>n.cpp())}}),te.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return re(()=>import("./index-ecy9XYuN.js"),[]).then(n=>n.cpp())}}),te.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return Qs("Cassandra")}}),te.of({name:"CSS",extensions:["css"],load(){return re(()=>Promise.resolve().then(()=>Aq),void 0).then(n=>n.css())}}),te.of({name:"Go",extensions:["go"],load(){return re(()=>import("./index-D8OPMZ9f.js"),[]).then(n=>n.go())}}),te.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return re(()=>Promise.resolve().then(()=>vR),void 0).then(n=>n.html())}}),te.of({name:"Java",extensions:["java"],load(){return re(()=>import("./index-D01QyTRk.js"),[]).then(n=>n.java())}}),te.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return re(()=>Promise.resolve().then(()=>Cu),void 0).then(n=>n.javascript())}}),te.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return re(()=>import("./index-cuSLHX69.js"),[]).then(n=>n.jinja())}}),te.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return re(()=>import("./index-B53MuvEc.js"),[]).then(n=>n.json())}}),te.of({name:"JSX",extensions:["jsx"],load(){return re(()=>Promise.resolve().then(()=>Cu),void 0).then(n=>n.javascript({jsx:!0}))}}),te.of({name:"LESS",extensions:["less"],load(){return re(()=>import("./index-DZNrS6h9.js"),[]).then(n=>n.less())}}),te.of({name:"Liquid",extensions:["liquid"],load(){return re(()=>import("./index-CsnqUyKo.js"),[]).then(n=>n.liquid())}}),te.of({name:"MariaDB SQL",load(){return Qs("MariaSQL")}}),te.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return re(()=>Promise.resolve().then(()=>PR),void 0).then(n=>n.markdown())}}),te.of({name:"MS SQL",load(){return Qs("MSSQL")}}),te.of({name:"MySQL",load(){return Qs("MySQL")}}),te.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return re(()=>import("./index-CMmIQ8D-.js"),[]).then(n=>n.php())}}),te.of({name:"PLSQL",extensions:["pls"],load(){return Qs("PLSQL")}}),te.of({name:"PostgreSQL",load(){return Qs("PostgreSQL")}}),te.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return re(()=>import("./index-BVus6uir.js"),[]).then(n=>n.python())}}),te.of({name:"Rust",extensions:["rs"],load(){return re(()=>import("./index-zcAuERSE.js"),[]).then(n=>n.rust())}}),te.of({name:"Sass",extensions:["sass"],load(){return re(()=>import("./index-YF86yMpl.js"),[]).then(n=>n.sass({indented:!0}))}}),te.of({name:"SCSS",extensions:["scss"],load(){return re(()=>import("./index-YF86yMpl.js"),[]).then(n=>n.sass())}}),te.of({name:"SQL",extensions:["sql"],load(){return Qs("StandardSQL")}}),te.of({name:"SQLite",load(){return Qs("SQLite")}}),te.of({name:"TSX",extensions:["tsx"],load(){return re(()=>Promise.resolve().then(()=>Cu),void 0).then(n=>n.javascript({jsx:!0,typescript:!0}))}}),te.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return re(()=>Promise.resolve().then(()=>Cu),void 0).then(n=>n.javascript({typescript:!0}))}}),te.of({name:"WebAssembly",extensions:["wat","wast"],load(){return re(()=>import("./index-B2LS3w4d.js"),[]).then(n=>n.wast())}}),te.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return re(()=>import("./index-CQ_bwo1n.js"),[]).then(n=>n.xml())}}),te.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return re(()=>import("./index-CitYJGc-.js"),[]).then(n=>n.yaml())}}),te.of({name:"APL",extensions:["dyalog","apl"],load(){return re(()=>import("./apl-B4CMkyY2.js"),[]).then(n=>he(n.apl))}}),te.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return re(()=>import("./asciiarmor-Df11BRmG.js"),[]).then(n=>he(n.asciiArmor))}}),te.of({name:"ASN.1",extensions:["asn","asn1"],load(){return re(()=>import("./asn1-EdZsLKOL.js"),[]).then(n=>he(n.asn1({})))}}),te.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return re(()=>import("./asterisk-B-8jnY81.js"),[]).then(n=>he(n.asterisk))}}),te.of({name:"Brainfuck",extensions:["b","bf"],load(){return re(()=>import("./brainfuck-C4LP7Hcl.js"),[]).then(n=>he(n.brainfuck))}}),te.of({name:"Cobol",extensions:["cob","cpy"],load(){return re(()=>import("./cobol-CWcv1MsR.js"),[]).then(n=>he(n.cobol))}}),te.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return re(()=>import("./clike-B9uivgTg.js"),[]).then(n=>he(n.csharp))}}),te.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return re(()=>import("./clojure-BMjYHr_A.js"),[]).then(n=>he(n.clojure))}}),te.of({name:"ClojureScript",extensions:["cljs"],load(){return re(()=>import("./clojure-BMjYHr_A.js"),[]).then(n=>he(n.clojure))}}),te.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return re(()=>import("./css-BnMrqG3P.js"),[]).then(n=>he(n.gss))}}),te.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return re(()=>import("./cmake-BQqOBYOt.js"),[]).then(n=>he(n.cmake))}}),te.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return re(()=>import("./coffeescript-S37ZYGWr.js"),[]).then(n=>he(n.coffeeScript))}}),te.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return re(()=>import("./commonlisp-DBKNyK5s.js"),[]).then(n=>he(n.commonLisp))}}),te.of({name:"Cypher",extensions:["cyp","cypher"],load(){return re(()=>import("./cypher-C_CwsFkJ.js"),[]).then(n=>he(n.cypher))}}),te.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return re(()=>import("./python-BuPzkPfP.js"),[]).then(n=>he(n.cython))}}),te.of({name:"Crystal",extensions:["cr"],load(){return re(()=>import("./crystal-SjHAIU92.js"),[]).then(n=>he(n.crystal))}}),te.of({name:"D",extensions:["d"],load(){return re(()=>import("./d-pRatUO7H.js"),[]).then(n=>he(n.d))}}),te.of({name:"Dart",extensions:["dart"],load(){return re(()=>import("./clike-B9uivgTg.js"),[]).then(n=>he(n.dart))}}),te.of({name:"diff",extensions:["diff","patch"],load(){return re(()=>import("./diff-DbItnlRl.js"),[]).then(n=>he(n.diff))}}),te.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return re(()=>import("./dockerfile-BKs6k2Af.js"),__vite__mapDeps([0,1])).then(n=>he(n.dockerFile))}}),te.of({name:"DTD",extensions:["dtd"],load(){return re(()=>import("./dtd-DF_7sFjM.js"),[]).then(n=>he(n.dtd))}}),te.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return re(()=>import("./dylan-DwRh75JA.js"),[]).then(n=>he(n.dylan))}}),te.of({name:"EBNF",load(){return re(()=>import("./ebnf-CDyGwa7X.js"),[]).then(n=>he(n.ebnf))}}),te.of({name:"ECL",extensions:["ecl"],load(){return re(()=>import("./ecl-Cabwm37j.js"),[]).then(n=>he(n.ecl))}}),te.of({name:"edn",extensions:["edn"],load(){return re(()=>import("./clojure-BMjYHr_A.js"),[]).then(n=>he(n.clojure))}}),te.of({name:"Eiffel",extensions:["e"],load(){return re(()=>import("./eiffel-CnydiIhH.js"),[]).then(n=>he(n.eiffel))}}),te.of({name:"Elm",extensions:["elm"],load(){return re(()=>import("./elm-vLlmbW-K.js"),[]).then(n=>he(n.elm))}}),te.of({name:"Erlang",extensions:["erl"],load(){return re(()=>import("./erlang-BNw1qcRV.js"),[]).then(n=>he(n.erlang))}}),te.of({name:"Esper",load(){return re(()=>import("./sql-D0XecflT.js"),[]).then(n=>he(n.esper))}}),te.of({name:"Factor",extensions:["factor"],load(){return re(()=>import("./factor-kuTfRLto.js"),__vite__mapDeps([2,1])).then(n=>he(n.factor))}}),te.of({name:"FCL",load(){return re(()=>import("./fcl-Kvtd6kyn.js"),[]).then(n=>he(n.fcl))}}),te.of({name:"Forth",extensions:["forth","fth","4th"],load(){return re(()=>import("./forth-Ffai-XNe.js"),[]).then(n=>he(n.forth))}}),te.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return re(()=>import("./fortran-DYz_wnZ1.js"),[]).then(n=>he(n.fortran))}}),te.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return re(()=>import("./mllike-CXdrOF99.js"),[]).then(n=>he(n.fSharp))}}),te.of({name:"Gas",extensions:["s"],load(){return re(()=>import("./gas-Bneqetm1.js"),[]).then(n=>he(n.gas))}}),te.of({name:"Gherkin",extensions:["feature"],load(){return re(()=>import("./gherkin-heZmZLOM.js"),[]).then(n=>he(n.gherkin))}}),te.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return re(()=>import("./groovy-D9Dt4D0W.js"),[]).then(n=>he(n.groovy))}}),te.of({name:"Haskell",extensions:["hs"],load(){return re(()=>import("./haskell-Cw1EW3IL.js"),[]).then(n=>he(n.haskell))}}),te.of({name:"Haxe",extensions:["hx"],load(){return re(()=>import("./haxe-H-WmDvRZ.js"),[]).then(n=>he(n.haxe))}}),te.of({name:"HXML",extensions:["hxml"],load(){return re(()=>import("./haxe-H-WmDvRZ.js"),[]).then(n=>he(n.hxml))}}),te.of({name:"HTTP",load(){return re(()=>import("./http-DBlCnlav.js"),[]).then(n=>he(n.http))}}),te.of({name:"IDL",extensions:["pro"],load(){return re(()=>import("./idl-BEugSyMb.js"),[]).then(n=>he(n.idl))}}),te.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return re(()=>import("./javascript-iXu5QeM3.js"),[]).then(n=>he(n.jsonld))}}),te.of({name:"Julia",extensions:["jl"],load(){return re(()=>import("./julia-DuME0IfC.js"),[]).then(n=>he(n.julia))}}),te.of({name:"Kotlin",extensions:["kt","kts"],load(){return re(()=>import("./clike-B9uivgTg.js"),[]).then(n=>he(n.kotlin))}}),te.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return re(()=>import("./livescript-BwQOo05w.js"),[]).then(n=>he(n.liveScript))}}),te.of({name:"Lua",extensions:["lua"],load(){return re(()=>import("./lua-BgMRiT3U.js"),[]).then(n=>he(n.lua))}}),te.of({name:"mIRC",extensions:["mrc"],load(){return re(()=>import("./mirc-CjQqDB4T.js"),[]).then(n=>he(n.mirc))}}),te.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return re(()=>import("./mathematica-DTrFuWx2.js"),[]).then(n=>he(n.mathematica))}}),te.of({name:"Modelica",extensions:["mo"],load(){return re(()=>import("./modelica-Dc1JOy9r.js"),[]).then(n=>he(n.modelica))}}),te.of({name:"MUMPS",extensions:["mps"],load(){return re(()=>import("./mumps-BT43cFF4.js"),[]).then(n=>he(n.mumps))}}),te.of({name:"Mbox",extensions:["mbox"],load(){return re(()=>import("./mbox-CNhZ1qSd.js"),[]).then(n=>he(n.mbox))}}),te.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return re(()=>import("./nginx-DdIZxoE0.js"),[]).then(n=>he(n.nginx))}}),te.of({name:"NSIS",extensions:["nsh","nsi"],load(){return re(()=>import("./nsis-LdVXkNf5.js"),__vite__mapDeps([3,1])).then(n=>he(n.nsis))}}),te.of({name:"NTriples",extensions:["nt","nq"],load(){return re(()=>import("./ntriples-BfvgReVJ.js"),[]).then(n=>he(n.ntriples))}}),te.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return re(()=>import("./clike-B9uivgTg.js"),[]).then(n=>he(n.objectiveC))}}),te.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return re(()=>import("./clike-B9uivgTg.js"),[]).then(n=>he(n.objectiveCpp))}}),te.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return re(()=>import("./mllike-CXdrOF99.js"),[]).then(n=>he(n.oCaml))}}),te.of({name:"Octave",extensions:["m"],load(){return re(()=>import("./octave-Ck1zUtKM.js"),[]).then(n=>he(n.octave))}}),te.of({name:"Oz",extensions:["oz"],load(){return re(()=>import("./oz-BzwKVEFT.js"),[]).then(n=>he(n.oz))}}),te.of({name:"Pascal",extensions:["p","pas"],load(){return re(()=>import("./pascal--L3eBynH.js"),[]).then(n=>he(n.pascal))}}),te.of({name:"Perl",extensions:["pl","pm"],load(){return re(()=>import("./perl-CdXCOZ3F.js"),[]).then(n=>he(n.perl))}}),te.of({name:"Pig",extensions:["pig"],load(){return re(()=>import("./pig-CevX1Tat.js"),[]).then(n=>he(n.pig))}}),te.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return re(()=>import("./powershell-CFHJl5sT.js"),[]).then(n=>he(n.powerShell))}}),te.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return re(()=>import("./properties-C78fOPTZ.js"),[]).then(n=>he(n.properties))}}),te.of({name:"ProtoBuf",extensions:["proto"],load(){return re(()=>import("./protobuf-ChK-085T.js"),[]).then(n=>he(n.protobuf))}}),te.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return re(()=>import("./pug-DeIclll2.js"),__vite__mapDeps([4,5])).then(n=>he(n.pug))}}),te.of({name:"Puppet",extensions:["pp"],load(){return re(()=>import("./puppet-DMA9R1ak.js"),[]).then(n=>he(n.puppet))}}),te.of({name:"Q",extensions:["q"],load(){return re(()=>import("./q-pXgVlZs6.js"),[]).then(n=>he(n.q))}}),te.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return re(()=>import("./r-B6wPVr8A.js"),[]).then(n=>he(n.r))}}),te.of({name:"RPM Changes",load(){return re(()=>import("./rpm-CTu-6PCP.js"),[]).then(n=>he(n.rpmChanges))}}),te.of({name:"RPM Spec",extensions:["spec"],load(){return re(()=>import("./rpm-CTu-6PCP.js"),[]).then(n=>he(n.rpmSpec))}}),te.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return re(()=>import("./ruby-B2Rjki9n.js"),[]).then(n=>he(n.ruby))}}),te.of({name:"SAS",extensions:["sas"],load(){return re(()=>import("./sas-B4kiWyti.js"),[]).then(n=>he(n.sas))}}),te.of({name:"Scala",extensions:["scala"],load(){return re(()=>import("./clike-B9uivgTg.js"),[]).then(n=>he(n.scala))}}),te.of({name:"Scheme",extensions:["scm","ss"],load(){return re(()=>import("./scheme-C41bIUwD.js"),[]).then(n=>he(n.scheme))}}),te.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return re(()=>import("./shell-CjFT_Tl9.js"),[]).then(n=>he(n.shell))}}),te.of({name:"Sieve",extensions:["siv","sieve"],load(){return re(()=>import("./sieve-C3Gn_uJK.js"),[]).then(n=>he(n.sieve))}}),te.of({name:"Smalltalk",extensions:["st"],load(){return re(()=>import("./smalltalk-CnHTOXQT.js"),[]).then(n=>he(n.smalltalk))}}),te.of({name:"Solr",load(){return re(()=>import("./solr-DehyRSwq.js"),[]).then(n=>he(n.solr))}}),te.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return re(()=>import("./mllike-CXdrOF99.js"),[]).then(n=>he(n.sml))}}),te.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return re(()=>import("./sparql-DkYu6x3z.js"),[]).then(n=>he(n.sparql))}}),te.of({name:"Spreadsheet",alias:["excel","formula"],load(){return re(()=>import("./spreadsheet-BCZA_wO0.js"),[]).then(n=>he(n.spreadsheet))}}),te.of({name:"Squirrel",extensions:["nut"],load(){return re(()=>import("./clike-B9uivgTg.js"),[]).then(n=>he(n.squirrel))}}),te.of({name:"Stylus",extensions:["styl"],load(){return re(()=>import("./stylus-B533Al4x.js"),[]).then(n=>he(n.stylus))}}),te.of({name:"Swift",extensions:["swift"],load(){return re(()=>import("./swift-BzpIVaGY.js"),[]).then(n=>he(n.swift))}}),te.of({name:"sTeX",load(){return re(()=>import("./stex-C3f8Ysf7.js"),[]).then(n=>he(n.stex))}}),te.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return re(()=>import("./stex-C3f8Ysf7.js"),[]).then(n=>he(n.stex))}}),te.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return re(()=>import("./verilog-C6RDOZhf.js"),[]).then(n=>he(n.verilog))}}),te.of({name:"Tcl",extensions:["tcl"],load(){return re(()=>import("./tcl-DVfN8rqt.js"),[]).then(n=>he(n.tcl))}}),te.of({name:"Textile",extensions:["textile"],load(){return re(()=>import("./textile-CnDTJFAw.js"),[]).then(n=>he(n.textile))}}),te.of({name:"TiddlyWiki",load(){return re(()=>import("./tiddlywiki-DO-Gjzrf.js"),[]).then(n=>he(n.tiddlyWiki))}}),te.of({name:"Tiki wiki",load(){return re(()=>import("./tiki-DGYXhP31.js"),[]).then(n=>he(n.tiki))}}),te.of({name:"TOML",extensions:["toml"],load(){return re(()=>import("./toml-Bm5Em-hy.js"),[]).then(n=>he(n.toml))}}),te.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return re(()=>import("./troff-wAsdV37c.js"),[]).then(n=>he(n.troff))}}),te.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return re(()=>import("./ttcn-CfJYG6tj.js"),[]).then(n=>he(n.ttcn))}}),te.of({name:"TTCN_CFG",extensions:["cfg"],load(){return re(()=>import("./ttcn-cfg-B9xdYoR4.js"),[]).then(n=>he(n.ttcnCfg))}}),te.of({name:"Turtle",extensions:["ttl"],load(){return re(()=>import("./turtle-B1tBg_DP.js"),[]).then(n=>he(n.turtle))}}),te.of({name:"Web IDL",extensions:["webidl"],load(){return re(()=>import("./webidl-ZXfAyPTL.js"),[]).then(n=>he(n.webIDL))}}),te.of({name:"VB.NET",extensions:["vb"],load(){return re(()=>import("./vb-CmGdzxic.js"),[]).then(n=>he(n.vb))}}),te.of({name:"VBScript",extensions:["vbs"],load(){return re(()=>import("./vbscript-BuJXcnF6.js"),[]).then(n=>he(n.vbScript))}}),te.of({name:"Velocity",extensions:["vtl"],load(){return re(()=>import("./velocity-D8B20fx6.js"),[]).then(n=>he(n.velocity))}}),te.of({name:"Verilog",extensions:["v"],load(){return re(()=>import("./verilog-C6RDOZhf.js"),[]).then(n=>he(n.verilog))}}),te.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return re(()=>import("./vhdl-lSbBsy5d.js"),[]).then(n=>he(n.vhdl))}}),te.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return re(()=>import("./xquery-DzFWVndE.js"),[]).then(n=>he(n.xQuery))}}),te.of({name:"Yacas",extensions:["ys"],load(){return re(()=>import("./yacas-BJ4BC0dw.js"),[]).then(n=>he(n.yacas))}}),te.of({name:"Z80",extensions:["z80"],load(){return re(()=>import("./z80-Hz9HOZM7.js"),[]).then(n=>he(n.z80))}}),te.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return re(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(n=>he(n.mscgen))}}),te.of({name:"Xù",extensions:["xu"],load(){return re(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(n=>he(n.xu))}}),te.of({name:"MsGenny",extensions:["msgenny"],load(){return re(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(n=>he(n.msgenny))}}),te.of({name:"Vue",extensions:["vue"],load(){return re(()=>import("./index-x8IWT_Q1.js"),[]).then(n=>n.vue())}}),te.of({name:"Angular Template",load(){return re(()=>import("./index-DPZWsfwV.js"),[]).then(n=>n.angular())}})];var XX=V('<div class="inline-editor svelte-1ewoogg"></div>');function po(n,e){Ot(e,!0);let t,r=ee(void 0),i="";const s=new ms,o=new ms,a=new ms,l=$e.theme({"&":{color:"#1a1a2e",fontSize:"13px",height:"auto"},".cm-scroller":{overflow:"visible",fontFamily:"'SF Mono', 'Fira Code', ui-monospace, monospace",lineHeight:"1.6"},".cm-content":{padding:"0.75rem",caretColor:"#1e293b",minHeight:"3rem"},".cm-cursor":{borderLeftColor:"#1e293b"},"&.cm-focused .cm-selectionBackground, ::selection":{backgroundColor:"rgba(14, 165, 233, 0.2)"},".cm-selectionBackground":{backgroundColor:"rgba(14, 165, 233, 0.12)"},"&.cm-focused":{outline:"none"},".cm-activeLine":{backgroundColor:"transparent"},".cm-tooltip.cm-tooltip-autocomplete":{border:"1px solid #e2e8f0",borderRadius:"6px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.12)",backgroundColor:"#ffffff",overflow:"hidden"},".cm-tooltip.cm-tooltip-autocomplete ul":{fontFamily:"system-ui, -apple-system, sans-serif",fontSize:"12px",maxHeight:"280px"},".cm-tooltip.cm-tooltip-autocomplete ul li":{padding:"4px 8px",borderBottom:"1px solid #f1f5f9"},".cm-tooltip.cm-tooltip-autocomplete ul li[aria-selected]":{backgroundColor:"#f0f9ff",color:"#0369a1"},".cm-tooltip.cm-completionInfo":{border:"1px solid #e2e8f0",borderRadius:"6px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.08)",backgroundColor:"#ffffff",padding:"6px 10px",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:"12px",color:"#475569",maxWidth:"300px"},".cm-completionDetail":{color:"#94a3b8",fontStyle:"normal",marginLeft:"0.5em"},".cm-markdoc-tag":{backgroundColor:"rgba(217, 119, 6, 0.06)",borderRadius:"2px"},".cm-markdoc-bracket":{color:"#94a3b8"},".cm-markdoc-name":{color:"#d97706",fontWeight:"600"}},{dark:!1});hn(()=>{if(!t)return;const u=!!Sr(()=>e.language)?.trim(),f=Lt.create({doc:Sr(()=>e.content),extensions:[s.of(Ua()),o.of(u?[]:Sc()),a.of(u?[]:$m({override:[zm(e.runes),Zm(e.runes,e.aggregated)],icons:!1})),TO(),l,pc(FS),pc(O2),RS(),Vo.of([...$O,...PO,...XS,{key:"Mod-/",run:h=>(Ul(h),!0)}]),$e.updateListener.of(h=>{h.docChanged&&(i=h.state.doc.toString(),e.onchange(i))}),$e.lineWrapping]}),d=new $e({state:f,parent:t});return L(r,d,!0),()=>{L(r,void 0),d.destroy()}}),hn(()=>{const u=m(r);if(!u)return;const f=e.language?.trim();if(!f){u.dispatch({effects:[s.reconfigure(Ua()),o.reconfigure(Sc()),a.reconfigure($m({override:[zm(e.runes),Zm(e.runes,e.aggregated)],icons:!1}))]});return}u.dispatch({effects:[o.reconfigure([]),a.reconfigure([])]});const d=te.matchLanguageName(vC,f,!0);d&&d.load().then(h=>{m(r)===u&&u.dispatch({effects:s.reconfigure(h)})})}),hn(()=>{const u=e.content,f=m(r);if(!f)return;const d=f.state.doc.toString();if(u!==d){if(i&&d===i){i="";return}i="",f.dispatch({changes:{from:0,to:f.state.doc.length,insert:u}})}});var c=XX();cn(c,u=>t=u,()=>t),j(n,c),vt()}var FX=V('<span class="edit-panel__category svelte-1t8cclf"> </span>'),VX=_s('<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="2"></circle><path d="M6.7 1.6h2.6l.4 1.8.8.4 1.7-.7 1.8 1.8-.7 1.7.4.8 1.8.4v2.6l-1.8.4-.4.8.7 1.7-1.8 1.8-1.7-.7-.8.4-.4 1.8H6.7l-.4-1.8-.8-.4-1.7.7-1.8-1.8.7-1.7-.4-.8-1.8-.4V6.7l1.8-.4.4-.8-.7-1.7 1.8-1.8 1.7.7.8-.4z"></path></svg> Settings',1),WX=_s('<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h4M2 7h4M6 11h4M6 15h4M4 3v8M8 11v4"></path></svg> Structure',1),YX=_s('<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 4h12M2 8h12M2 12h8"></path></svg> Content',1),UX=V('<button type="button"><!></button>'),GX=V('<div class="edit-panel__tabs svelte-1t8cclf"></div>'),HX=V('<div class="edit-panel__field-group svelte-1t8cclf"><label class="edit-panel__field svelte-1t8cclf"><span class="edit-panel__field-label svelte-1t8cclf">Level</span> <select class="edit-panel__select svelte-1t8cclf"><option>H1</option><option>H2</option><option>H3</option><option>H4</option><option>H5</option><option>H6</option></select></label> <label class="edit-panel__field svelte-1t8cclf"><span class="edit-panel__field-label svelte-1t8cclf">Text</span> <input class="edit-panel__input svelte-1t8cclf" type="text"/></label></div>'),KX=V('<div class="edit-panel__field-group svelte-1t8cclf"><label class="edit-panel__field svelte-1t8cclf"><span class="edit-panel__field-label svelte-1t8cclf">Language</span> <input class="edit-panel__input svelte-1t8cclf" type="text" placeholder="e.g. js, python, html"/></label></div>'),JX=V('<div class="edit-panel__empty-tab svelte-1t8cclf"><span class="edit-panel__empty-tab-text svelte-1t8cclf">No settings for this element</span></div>'),eF=V('<label class="edit-panel__field svelte-1t8cclf"><span class="edit-panel__field-label svelte-1t8cclf"> </span> <input class="edit-panel__input svelte-1t8cclf" type="text"/></label>'),tF=V('<div class="edit-panel__unknown svelte-1t8cclf"><span class="edit-panel__unknown-label svelte-1t8cclf"> </span> <!></div>'),nF=V('<div class="edit-panel__tab-panel svelte-1t8cclf"><!></div>'),rF=V('<div class="edit-panel__tab-panel svelte-1t8cclf"><!></div>'),iF=V('<div class="edit-panel__content-editor svelte-1t8cclf"><!></div>'),sF=V('<div class="edit-panel__content-editor svelte-1t8cclf"><!></div>'),oF=V('<div class="edit-panel__empty-tab svelte-1t8cclf"><span class="edit-panel__empty-tab-text svelte-1t8cclf">Edit heading text in Settings</span></div>'),aF=V('<div class="edit-panel__field-group svelte-1t8cclf"><label class="edit-panel__field svelte-1t8cclf"><span class="edit-panel__field-label svelte-1t8cclf">Source</span> <textarea class="edit-panel__textarea svelte-1t8cclf"></textarea></label></div>'),lF=V('<div class="edit-panel__content-editor svelte-1t8cclf"><!></div>'),cF=V('<div class="edit-panel__empty-tab svelte-1t8cclf"><span class="edit-panel__empty-tab-text svelte-1t8cclf">This rune has no inner content</span></div>'),uF=V('<div class="edit-panel__content-editor svelte-1t8cclf"><!></div>'),fF=V('<div class="edit-panel__tab-panel svelte-1t8cclf"><!></div>'),dF=V("<!> <!> <!>",1),hF=V('<div class="edit-panel__field-group svelte-1t8cclf"><label class="edit-panel__field svelte-1t8cclf"><span class="edit-panel__field-label svelte-1t8cclf">Level</span> <select class="edit-panel__select svelte-1t8cclf"><option>H1</option><option>H2</option><option>H3</option><option>H4</option><option>H5</option><option>H6</option></select></label> <label class="edit-panel__field svelte-1t8cclf"><span class="edit-panel__field-label svelte-1t8cclf">Text</span> <input class="edit-panel__input svelte-1t8cclf" type="text"/></label></div>'),pF=V('<div class="edit-panel__field-group svelte-1t8cclf"><label class="edit-panel__field svelte-1t8cclf"><span class="edit-panel__field-label svelte-1t8cclf">Language</span> <input class="edit-panel__input svelte-1t8cclf" type="text" placeholder="e.g. js, python, html"/></label></div> <div class="edit-panel__content-editor svelte-1t8cclf"><!></div>',1),mF=V('<div class="edit-panel__content-editor svelte-1t8cclf"><!></div>'),gF=V('<div class="edit-panel__field-group svelte-1t8cclf"><label class="edit-panel__field svelte-1t8cclf"><span class="edit-panel__field-label svelte-1t8cclf">Source</span> <textarea class="edit-panel__textarea svelte-1t8cclf"></textarea></label></div>'),OF=V('<div class="edit-panel__body svelte-1t8cclf"><!></div>'),vF=V('<div class="edit-panel svelte-1t8cclf"><div class="edit-panel__top svelte-1t8cclf"><div class="edit-panel__header svelte-1t8cclf"><span class="edit-panel__type svelte-1t8cclf"> </span> <!> <div class="edit-panel__spacer svelte-1t8cclf"></div> <button class="edit-panel__btn edit-panel__btn--danger svelte-1t8cclf" title="Remove block"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 3 14 13 14 13 6"></polyline><line x1="1" y1="4" x2="15" y2="4"></line><line x1="6" y1="2" x2="10" y2="2"></line><line x1="6" y1="8" x2="6" y2="12"></line><line x1="10" y1="8" x2="10" y2="12"></line></svg></button> <button class="edit-panel__btn svelte-1t8cclf" title="Close panel">&times;</button></div> <!></div> <!></div>');function bF(n,e){Ot(e,!0);let t=Pt(e,"aggregated",19,()=>({})),r=Pt(e,"initialRuneIndex",3,null),i=me(()=>av(e.block)),s=me(()=>e.block.type==="rune"?e.runeMap.get(e.block.runeName)??null:null),o=me(()=>m(s)?.category??null),a=ee(Jt([])),l=me(()=>{if(e.block.type!=="rune")return[];const le=e.block;return le.selfClosing||!le.innerContent.trim()?[]:sv(le.innerContent)}),c=me(()=>m(l).some(le=>le.type==="rune")),u=me(()=>m(v)?.type==="rune"&&m(b)?m(b):m(s)),f=me(()=>m(v)?.type==="rune"&&m(v).children?m(v).children:m(l)),d=me(()=>m(u)?.contentModel!=null),h=me(()=>m(u)?.contentModel?J7(m(f),m(u).contentModel):null),g=ee(null);function p(le,ve){let ke=0;function Ce(De,St){for(let pt=0;pt<De.length;pt++)if(De[pt].type==="rune"){if(ke===ve)return[...St,pt];ke++;const Ue=Ce(De[pt].children??[],[...St,pt]);if(Ue)return Ue}return null}return Ce(le,[])}hn(()=>{if(r()!=null&&m(l).length>0){const le=p(m(l),r());le&&L(a,le,!0)}});function O(le,ve){if(ve.length===0)return null;const[ke,...Ce]=ve,De=le[ke];return De?Ce.length===0?De:O(De.children??[],Ce):null}let v=me(()=>O(m(l),m(a))),b=me(()=>m(v)?.runeName?e.runeMap.get(m(v).runeName)??null:null),_=me(()=>m(v)!=null&&m(v).type!=="rune"),A=me(()=>m(v)?m(v).type==="rune"?m(v).runeName??m(i):m(v).type:m(i)),y=ee("settings"),w=me(()=>{if(e.block.type!=="rune")return[];const le=e.block,ve=["settings"];return(m(d)||!m(v)&&m(c))&&ve.push("structure"),le.selfClosing||ve.push("content"),ve});hn(()=>{m(y)==="structure"&&!m(w).includes("structure")&&L(y,"settings")});function S(le){L(a,le,!0);const ve=O(m(l),le);ve&&ve.type!=="rune"&&L(y,"content")}function C(){L(a,[],!0)}function x(le,ve){L(g,ve?`${ve}.${le}`:le,!0)}function k(le){const ve=e.block;if(m(v)?.type==="rune"&&m(v).innerContent!==void 0){const ke=le(m(v).innerContent);if(ke===m(v).innerContent)return;const Ce=cf(m(v).attributes??{}),De=ke.trim(),St=De?`{% ${m(v).runeName}${Ce} %}
576
- ${De}
577
- {% /${m(v).runeName} %}`:`{% ${m(v).runeName}${Ce} %}
578
-
579
- {% /${m(v).runeName} %}`,pt=Eu(ve.innerContent,m(v).source,St),Ue={...ve,innerContent:pt,source:""};Ue.source=Hn(Ue),e.onupdate(Ue)}else{const ke=le(ve.innerContent);if(ke===ve.innerContent)return;const Ce={...ve,innerContent:ke,source:""};Ce.source=Hn(Ce),e.onupdate(Ce)}}function E(le,ve){m(h)&&k(ke=>mI(ke,m(h),le,ve))}function T(le,ve){m(h)&&k(ke=>gI(ke,m(h),le,ve))}function $(le,ve){return m(h)?m(h).type==="sequence"?m(h).fields.find(ke=>ke.name===le)??null:m(h).type==="delimited"&&ve?m(h).zones.find(Ce=>Ce.name===ve)?.fields.find(Ce=>Ce.name===le)??null:null:null}function M(le){return le.greedy&&le.match!=="any"}function P(le,ve){if(!m(h))return;const ke=$(le,ve);ke&&M(ke)?k(Ce=>yI(Ce,m(h),le,ve)):k(Ce=>OI(Ce,m(h),le,ve))}function D(le,ve,ke){if(!m(h))return;const Ce=$(le,ke);Ce&&M(Ce)?k(De=>wI(De,m(h),le,ve,ke)):k(De=>vI(De,m(h),le,ve,ke))}function I(le,ve,ke,Ce){if(!m(h))return;const De=$(le,Ce);De&&M(De)?k(St=>_I(St,m(h),le,ve,ke,Ce)):k(St=>bI(St,m(h),le,ve,ke,Ce))}function W(le,ve,ke,Ce){if(!m(h))return;let De;if(m(h).type==="sequence"?De=m(h).fields.find(Ft=>Ft.name===le):m(h).type==="delimited"&&ke&&(De=m(h).zones.find(tn=>tn.name===ke)?.fields.find(tn=>tn.name===le)),!De||!De.filled)return;const St=Ce??0;if(St>=De.nodes.length||Ce===void 0&&De.nodes.length!==1)return;const pt=De.nodes[St],Ue=pt.source;if(pt.type==="fence"&&e.oneditcode){const Ft=pt.fenceCode??"",tn=pt.fenceLanguage??"",wt=Ue.split(`
580
- `)[0],Ht=wt.match(/^(`{3,}|~{3,})/),Nn=Ht?Ht[1]:"```",Gn={source:Ue,code:Ft,language:tn,opener:wt,delimiter:Nn};e.oneditcode(Ft,tn,ve,Gn);return}if(!e.oneditfield)return;const At=Ue.trim();let bt="",ft=At;const Ct=At.match(/^(#{1,6}\s+)(.*)/);if(Ct)bt=Ct[1],ft=Ct[2];else{const Ft=At.match(/^(>\s*)(.*)/);Ft&&(bt=Ft[1],ft=Ft[2])}const _n={dataName:le,text:yi(ft),source:Ue,sourcePrefix:bt,inlineSource:ft};e.oneditfield(le,ft,ve,_n)}function U(le,ve,ke,Ce){if(!m(h)||!e.oneditfield)return;let De;if(m(h).type==="sequence"?De=m(h).fields.find(_n=>_n.name===le):m(h).type==="delimited"&&Ce&&(De=m(h).zones.find(Ft=>Ft.name===Ce)?.fields.find(Ft=>Ft.name===le)),!De||!De.filled||De.nodes.length===0)return;const St=De.nodes[0],pt=Vd(St.source);if(ve<0||ve>=pt.length)return;const Ue=pt[ve],At=Ue.match(/^([-*+]\s+|\d+\.\s+)/),bt=At?At[1]:"",ft=At?Ue.slice(bt.length):Ue,Ct={dataName:`${le}[${ve}]`,text:yi(ft),source:Ue,sourcePrefix:bt,inlineSource:ft};e.oneditfield(`${le}[${ve}]`,ft,ke,Ct)}function ae(le,ve,ke){if(!m(h))return;let Ce;if(m(h).type==="sequence"?Ce=m(h).fields.find(Ue=>Ue.name===le):m(h).type==="delimited"&&ke&&(Ce=m(h).zones.find(At=>At.name===ke)?.fields.find(At=>At.name===le)),!Ce||ve<0||ve>=Ce.nodes.length)return;const De=Ce.nodes[ve];if(De.type!=="rune")return;const pt=m(f).findIndex(Ue=>Ue.source===De.source);pt!==-1&&(m(v)?.type==="rune"?L(a,[...m(a),pt],!0):L(a,[pt],!0),L(y,"settings"))}function ce(le){const ke={...e.block,text:le,source:""};ke.source=Fm(ke),e.onupdate(ke)}function K(le){const ke={...e.block,level:le,source:""};ke.source=Fm(ke),e.onupdate(ke)}function H(le){const ke={...e.block,attributes:le,source:""};ke.source=Hn(ke),e.onupdate(ke)}function se(le){const ke={...e.block,innerContent:le,source:""};ke.source=Hn(ke),e.onupdate(ke)}function ie(le){if(!m(v)||!m(v).runeName)return;const ve=m(v).source,ke=cf(le);let Ce;if(m(v).selfClosing)Ce=`{% ${m(v).runeName}${ke} /%}`;else{const Ue=(m(v).innerContent??"").trim();Ce=Ue?`{% ${m(v).runeName}${ke} %}
581
- ${Ue}
582
- {% /${m(v).runeName} %}`:`{% ${m(v).runeName}${ke} %}
583
-
584
- {% /${m(v).runeName} %}`}const De=e.block,St=Eu(De.innerContent,ve,Ce),pt={...De,innerContent:St,source:""};pt.source=Hn(pt),e.onupdate(pt)}function B(le){if(!m(v)||!m(v).runeName)return;const ve=m(v).source,ke=cf(m(v).attributes??{}),Ce=le.trim(),De=Ce?`{% ${m(v).runeName}${ke} %}
585
- ${Ce}
586
- {% /${m(v).runeName} %}`:`{% ${m(v).runeName}${ke} %}
587
-
588
- {% /${m(v).runeName} %}`,St=e.block,pt=Eu(St.innerContent,ve,De),Ue={...St,innerContent:pt,source:""};Ue.source=Hn(Ue),e.onupdate(Ue)}function J(le){const ke={...e.block,code:le,source:""};ke.source=td(ke),e.onupdate(ke)}function Ae(le){const ke={...e.block,language:le,source:""};ke.source=td(ke),e.onupdate(ke)}function Qe(le){e.onupdate({...e.block,source:le})}function Ne(le){if(!m(v))return;const ve=e.block,ke=Eu(ve.innerContent,m(v).source,le),Ce={...ve,innerContent:ke,source:""};Ce.source=Hn(Ce),e.onupdate(Ce)}function ge(le){m(v)&&Ne(`${"#".repeat(le)} ${m(v).headingText??""}`)}function Pe(le){m(v)&&Ne(`${"#".repeat(m(v).headingLevel??1)} ${le}`)}function Ke(le){if(!m(v))return;const ve=m(v).fenceCode??"";Ne(`\`\`\`${le}
589
- ${ve}
590
- \`\`\``)}function Je(le){if(!m(v))return;const ve=m(v).fenceLanguage??"";Ne(`\`\`\`${ve}
591
- ${le}
592
- \`\`\``)}function We(le){Ne(le)}var be=vF(),Oe=q(be),Me=q(Oe),xt=q(Me),at=q(xt),st=R(xt,2);{var kt=le=>{var ve=FX(),ke=q(ve);fe(()=>Ee(ke,m(o))),j(le,ve)};ue(st,le=>{!m(_)&&m(o)&&le(kt)})}var yn=R(st,4);yn.__click=function(...le){e.onremove?.apply(this,le)};var en=R(yn,2);en.__click=function(...le){e.onclose?.apply(this,le)};var xe=R(Me,2);{var mn=le=>{var ve=GX();$t(ve,21,()=>m(w),Gt,(ke,Ce)=>{var De=UX();let St;De.__click=()=>L(y,m(Ce),!0);var pt=q(De);{var Ue=ft=>{var Ct=VX();j(ft,Ct)},At=ft=>{var Ct=WX();j(ft,Ct)},bt=ft=>{var Ct=YX();j(ft,Ct)};ue(pt,ft=>{m(Ce)==="settings"?ft(Ue):m(Ce)==="structure"?ft(At,1):m(Ce)==="content"&&ft(bt,2)})}fe(()=>St=Ze(De,1,"edit-panel__tab svelte-1t8cclf",null,St,{active:m(y)===m(Ce)})),j(ke,De)}),j(le,ve)};ue(xe,le=>{e.block.type==="rune"&&m(w).length>1&&le(mn)})}var et=R(Oe,2);{var jt=le=>{const ve=me(()=>e.block);var ke=dF(),Ce=ot(ke);{var De=bt=>{var ft=nF(),Ct=q(ft);{var _n=wt=>{var Ht=ln(),Nn=ot(Ht);{var Gn=Rt=>{var Z=HX(),Xe=q(Z),fn=R(q(Xe),2);fn.__change=dr=>ge(Number(dr.target.value));var kn=q(fn);kn.value=kn.__value="1";var Ye=R(kn);Ye.value=Ye.__value="2";var fr=R(Ye);fr.value=fr.__value="3";var Pi=R(fr);Pi.value=Pi.__value="4";var Ln=R(Pi);Ln.value=Ln.__value="5";var Gi=R(Ln);Gi.value=Gi.__value="6";var Mn;Of(fn);var xs=R(Xe,2),Hi=R(q(xs),2);Hi.__input=dr=>Pe(dr.target.value),fe(dr=>{Mn!==(Mn=dr)&&(fn.value=(fn.__value=dr)??"",nc(fn,dr)),on(Hi,m(v).headingText??"")},[()=>String(m(v).headingLevel??1)]),j(Rt,Z)},ur=Rt=>{var Z=KX(),Xe=q(Z),fn=R(q(Xe),2);fn.__input=kn=>Ke(kn.target.value),fe(()=>on(fn,m(v).fenceLanguage??"")),j(Rt,Z)},un=Rt=>{var Z=JX();j(Rt,Z)};ue(Nn,Rt=>{m(v).type==="heading"?Rt(Gn):m(v).type==="fence"?Rt(ur,1):Rt(un,!1)})}j(wt,Ht)},Ft=wt=>{{let Ht=me(()=>m(v).attributes??{});z0(wt,{get runeInfo(){return m(b)},get attributes(){return m(Ht)},onchange:ie})}},tn=wt=>{var Ht=ln(),Nn=ot(Ht);{var Gn=un=>{z0(un,{get runeInfo(){return m(s)},get attributes(){return m(ve).attributes},onchange:H})},ur=un=>{var Rt=tF(),Z=q(Rt),Xe=q(Z),fn=R(Z,2);$t(fn,17,()=>Object.entries(m(ve).attributes),Gt,(kn,Ye)=>{var fr=me(()=>Mc(m(Ye),2));let Pi=()=>m(fr)[0],Ln=()=>m(fr)[1];var Gi=eF(),Mn=q(Gi),xs=q(Mn),Hi=R(Mn,2);Hi.__input=dr=>{const G={...m(ve).attributes,[Pi()]:dr.target.value};H(G)},fe(()=>{Ee(xs,Pi()),on(Hi,Ln())}),j(kn,Gi)}),fe(()=>Ee(Xe,`Unknown rune: ${m(ve).runeName??""}`)),j(un,Rt)};ue(Nn,un=>{m(s)?un(Gn):un(ur,!1)})}j(wt,Ht)};ue(Ct,wt=>{m(_)&&m(v)?wt(_n):m(v)&&m(b)?wt(Ft,1):m(v)||wt(tn,2)})}j(bt,ft)};ue(Ce,bt=>{m(y)==="settings"&&bt(De)})}var St=R(Ce,2);{var pt=bt=>{var ft=rF(),Ct=q(ft);{var _n=tn=>{{let wt=me(()=>m(v)?.runeName??m(ve).runeName);ZX(tn,{get structure(){return m(h)},get rootLabel(){return m(wt)},onaddfield:E,onremovefield:T,onappenditem:P,onremovelistitem:D,onreorderlistitem:I,oneditfield:W,oneditlistitem:U,onnavigaterune:ae,onfieldselect:x,get selectedField(){return m(g)}})}},Ft=tn=>{{let wt=me(()=>m(a).length===0);OC(tn,{get nodes(){return m(l)},get activePath(){return m(a)},onselect:S,get rootLabel(){return m(ve).runeName},onrootclick:C,get isRootActive(){return m(wt)}})}};ue(Ct,tn=>{m(d)&&m(h)?tn(_n):!m(v)&&m(c)&&tn(Ft,1)})}j(bt,ft)};ue(St,bt=>{m(y)==="structure"&&bt(pt)})}var Ue=R(St,2);{var At=bt=>{var ft=fF(),Ct=q(ft);{var _n=wt=>{var Ht=ln(),Nn=ot(Ht);{var Gn=Z=>{var Xe=iF(),fn=q(Xe);{let kn=me(()=>m(v).fenceCode??"");po(fn,{get content(){return m(kn)},onchange:Je,get language(){return m(v).fenceLanguage},get runes(){return e.runes},aggregated:()=>t()})}j(Z,Xe)},ur=Z=>{var Xe=sF(),fn=q(Xe);po(fn,{get content(){return m(v).source},onchange:We,get runes(){return e.runes},aggregated:()=>t()}),j(Z,Xe)},un=Z=>{var Xe=oF();j(Z,Xe)},Rt=Z=>{var Xe=aF(),fn=q(Xe),kn=R(q(fn),2);kn.__input=Ye=>We(Ye.target.value),fe(Ye=>{on(kn,m(v).source),Et(kn,"rows",Ye)},[()=>Math.max(4,m(v).source.split(`
593
- `).length)]),j(Z,Xe)};ue(Nn,Z=>{m(v).type==="fence"?Z(Gn):m(v).type==="paragraph"?Z(ur,1):m(v).type==="heading"?Z(un,2):Z(Rt,!1)})}j(wt,Ht)},Ft=wt=>{var Ht=ln(),Nn=ot(Ht);{var Gn=un=>{var Rt=lF(),Z=q(Rt);po(Z,{get content(){return m(v).innerContent},onchange:B,get runes(){return e.runes},aggregated:()=>t()}),j(un,Rt)},ur=un=>{var Rt=cF();j(un,Rt)};ue(Nn,un=>{!m(v).selfClosing&&m(v).innerContent!==void 0?un(Gn):un(ur,!1)})}j(wt,Ht)},tn=wt=>{var Ht=uF(),Nn=q(Ht);po(Nn,{get content(){return m(ve).innerContent},onchange:se,get runes(){return e.runes},aggregated:()=>t()}),j(wt,Ht)};ue(Ct,wt=>{m(_)&&m(v)?wt(_n):m(v)&&m(b)?wt(Ft,1):m(v)||wt(tn,2)})}j(bt,ft)};ue(Ue,bt=>{m(y)==="content"&&!m(ve).selfClosing&&bt(At)})}j(le,ke)},In=le=>{var ve=OF(),ke=q(ve);{var Ce=Ue=>{const At=me(()=>e.block);var bt=hF(),ft=q(bt),Ct=R(q(ft),2);Ct.__change=Rt=>K(Number(Rt.target.value));var _n=q(Ct);_n.value=_n.__value="1";var Ft=R(_n);Ft.value=Ft.__value="2";var tn=R(Ft);tn.value=tn.__value="3";var wt=R(tn);wt.value=wt.__value="4";var Ht=R(wt);Ht.value=Ht.__value="5";var Nn=R(Ht);Nn.value=Nn.__value="6";var Gn;Of(Ct);var ur=R(ft,2),un=R(q(ur),2);un.__input=Rt=>ce(Rt.target.value),fe(Rt=>{Gn!==(Gn=Rt)&&(Ct.value=(Ct.__value=Rt)??"",nc(Ct,Rt)),on(un,m(At).text)},[()=>String(m(At).level)]),j(Ue,bt)},De=Ue=>{const At=me(()=>e.block);var bt=pF(),ft=ot(bt),Ct=q(ft),_n=R(q(Ct),2);_n.__input=wt=>Ae(wt.target.value);var Ft=R(ft,2),tn=q(Ft);po(tn,{get content(){return m(At).code},onchange:J,get language(){return m(At).language},get runes(){return e.runes},aggregated:()=>t()}),fe(()=>on(_n,m(At).language)),j(Ue,bt)},St=Ue=>{var At=mF(),bt=q(At);po(bt,{get content(){return e.block.source},onchange:Qe,get runes(){return e.runes},aggregated:()=>t()}),j(Ue,At)},pt=Ue=>{var At=gF(),bt=q(At),ft=R(q(bt),2);ft.__input=Ct=>Qe(Ct.target.value),fe(Ct=>{on(ft,e.block.source),Et(ft,"rows",Ct)},[()=>Math.max(4,e.block.source.split(`
594
- `).length)]),j(Ue,At)};ue(ke,Ue=>{e.block.type==="heading"?Ue(Ce):e.block.type==="fence"?Ue(De,1):e.block.type==="paragraph"?Ue(St,2):Ue(pt,!1)})}j(le,ve)};ue(et,le=>{e.block.type==="rune"?le(jt):le(In,!1)})}fe(()=>Ee(at,m(A))),j(n,be),vt()}Ut(["click","change","input"]);var yF=V('<div draggable="true"><span class="structure-item__drag svelte-1lv3l5p" title="Drag to reorder"><svg width="8" height="12" viewBox="0 0 8 12" fill="currentColor"><circle cx="2" cy="2" r="1"></circle><circle cx="6" cy="2" r="1"></circle><circle cx="2" cy="6" r="1"></circle><circle cx="6" cy="6" r="1"></circle><circle cx="2" cy="10" r="1"></circle><circle cx="6" cy="10" r="1"></circle></svg></span> <span class="structure-item__icon svelte-1lv3l5p"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><!></svg></span> <span class="structure-item__info svelte-1lv3l5p"><span class="structure-item__type svelte-1lv3l5p"> </span> <span class="structure-item__preview svelte-1lv3l5p"> </span></span> <button class="structure-item__remove svelte-1lv3l5p" title="Remove"><svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><line x1="4" y1="4" x2="12" y2="12"></line><line x1="12" y1="4" x2="4" y2="12"></line></svg></button></div>'),wF=V('<div class="edit-panel__tab-panel svelte-1lv3l5p"><div class="structure-list svelte-1lv3l5p"></div></div>'),_F=V('<div class="edit-panel__tab-panel svelte-1lv3l5p"><div class="edit-panel__content-editor svelte-1lv3l5p"><!></div></div>'),kF=V('<div class="edit-panel svelte-1lv3l5p"><div class="edit-panel__top svelte-1lv3l5p"><div class="edit-panel__header svelte-1lv3l5p"><span class="edit-panel__type svelte-1lv3l5p">prose</span> <span class="edit-panel__count svelte-1lv3l5p"> </span> <div class="edit-panel__spacer svelte-1lv3l5p"></div> <button class="edit-panel__btn edit-panel__btn--danger svelte-1lv3l5p" title="Remove block"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 3 14 13 14 13 6"></polyline><line x1="1" y1="4" x2="15" y2="4"></line><line x1="6" y1="2" x2="10" y2="2"></line><line x1="6" y1="8" x2="6" y2="12"></line><line x1="10" y1="8" x2="10" y2="12"></line></svg></button> <button class="edit-panel__btn svelte-1lv3l5p" title="Close panel">&times;</button></div> <div class="edit-panel__tabs svelte-1lv3l5p"><button type="button"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h4M2 7h4M6 11h4M6 15h4M4 3v8M8 11v4"></path></svg> Structure</button> <button type="button"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 4h12M2 8h12M2 12h8"></path></svg> Content</button></div></div> <!> <!></div>');function xF(n,e){Ot(e,!0);let t=Pt(e,"aggregated",19,()=>({})),r=ee("structure");function i(P){switch(P.type){case"heading":return P.text;case"paragraph":return P.source.length>60?P.source.slice(0,60)+"...":P.source;case"fence":{const D=P,I=D.language?`${D.language}: `:"",W=D.code.split(`
595
- `)[0]??"";return I+(W.length>50?W.slice(0,50)+"...":W)}case"list":return P.source.split(`
596
- `)[0]??"";case"quote":return P.source.replace(/^>\s*/gm,"").split(`
597
- `)[0]??"";case"hr":return"---";case"image":return P.source;default:return P.source.split(`
598
- `)[0]??""}}function s(P){switch(P.type){case"heading":return'<path d="M3 3v10M13 3v10M3 8h10" />';case"paragraph":return'<path d="M2 4h12M2 8h12M2 12h8" />';case"fence":return'<polyline points="4 6 1 9 4 12" /><polyline points="12 6 15 9 12 12" />';case"list":return'<circle cx="3" cy="4" r="1" fill="currentColor" /><line x1="6" y1="4" x2="14" y2="4" /><circle cx="3" cy="8" r="1" fill="currentColor" /><line x1="6" y1="8" x2="14" y2="8" /><circle cx="3" cy="12" r="1" fill="currentColor" /><line x1="6" y1="12" x2="14" y2="12" />';case"quote":return'<path d="M3 5h10M5 5v8M5 9h6" />';case"hr":return'<line x1="2" y1="8" x2="14" y2="8" />';case"image":return'<rect x="2" y="2" width="12" height="12" rx="1" /><circle cx="5.5" cy="5.5" r="1.5" /><path d="M14 10l-3-3-5 5" />';default:return'<path d="M2 4h12M2 8h12M2 12h8" />'}}let o=ee(null),a=ee(null);function l(P,D){L(o,D,!0),P.dataTransfer&&(P.dataTransfer.effectAllowed="move",P.dataTransfer.setData("text/plain",String(D)))}function c(P,D){P.preventDefault(),P.dataTransfer&&(P.dataTransfer.dropEffect="move"),L(a,D,!0)}function u(P,D){P.preventDefault(),m(o)!==null&&m(o)!==D&&d(m(o),D),L(o,null),L(a,null)}function f(){L(o,null),L(a,null)}function d(P,D){const I=[...e.block.children],[W]=I.splice(P,1);I.splice(D,0,W);const U=Xm(I);e.onupdate({...e.block,children:I,source:U})}function h(P){const D=e.block.children.filter((W,U)=>U!==P);if(D.length===0){e.onremove();return}const I=Xm(D);e.onupdate({...e.block,children:D,source:I})}function g(P){if(!P.trim()){e.onremove();return}const D=YS(P);e.onupdate({...e.block,children:D,source:P})}var p=kF(),O=q(p),v=q(O),b=R(q(v),2),_=q(b),A=R(b,4);A.__click=function(...P){e.onremove?.apply(this,P)};var y=R(A,2);y.__click=function(...P){e.onclose?.apply(this,P)};var w=R(v,2),S=q(w);let C;S.__click=()=>L(r,"structure");var x=R(S,2);let k;x.__click=()=>L(r,"content");var E=R(O,2);{var T=P=>{var D=wF(),I=q(D);$t(I,23,()=>e.block.children,W=>W.id,(W,U,ae)=>{var ce=yF();let K;var H=R(q(ce),2),se=q(H),ie=q(se);qw(ie,()=>s(m(U)),!0);var B=R(H,2),J=q(B),Ae=q(J),Qe=R(J,2),Ne=q(Qe),ge=R(B,2);ge.__click=()=>h(m(ae)),fe((Pe,Ke)=>{K=Ze(ce,1,"structure-item svelte-1lv3l5p",null,K,{"drag-source":m(o)===m(ae),"drag-over":m(a)===m(ae)&&m(o)!==m(ae)}),Ee(Ae,Pe),Ee(Ne,Ke)},[()=>av(m(U)),()=>i(m(U))]),ct("dragstart",ce,Pe=>l(Pe,m(ae))),ct("dragover",ce,Pe=>c(Pe,m(ae))),ct("drop",ce,Pe=>u(Pe,m(ae))),ct("dragend",ce,f),j(W,ce)}),j(P,D)};ue(E,P=>{m(r)==="structure"&&P(T)})}var $=R(E,2);{var M=P=>{var D=_F(),I=q(D),W=q(I);po(W,{get content(){return e.block.source},onchange:g,get runes(){return e.runes},aggregated:()=>t()}),j(P,D)};ue($,P=>{m(r)==="content"&&P(M)})}fe(()=>{Ee(_,`${e.block.children.length??""} block${e.block.children.length!==1?"s":""}`),C=Ze(S,1,"edit-panel__tab svelte-1lv3l5p",null,C,{active:m(r)==="structure"}),k=Ze(x,1,"edit-panel__tab svelte-1lv3l5p",null,k,{active:m(r)==="content"})}),j(n,p),vt()}Ut(["click"]);var SF=V('<div class="edit-panel__field svelte-1wxsk8w"><span class="edit-panel__field-label svelte-1wxsk8w"> </span> <div class="edit-panel__custom-row svelte-1wxsk8w"><input class="edit-panel__input svelte-1wxsk8w" type="text"/> <button class="edit-panel__remove-btn svelte-1wxsk8w">&times;</button></div></div>'),AF=V('<div class="edit-panel__custom-section svelte-1wxsk8w"><span class="edit-panel__section-label svelte-1wxsk8w">Custom fields</span> <!></div>'),CF=V('<div class="edit-panel svelte-1wxsk8w"><div class="edit-panel__header svelte-1wxsk8w"><span class="edit-panel__type svelte-1wxsk8w">Frontmatter</span> <div class="edit-panel__spacer svelte-1wxsk8w"></div> <button class="edit-panel__btn svelte-1wxsk8w" title="Close panel">&times;</button></div> <div class="edit-panel__body svelte-1wxsk8w"><div class="edit-panel__field-group svelte-1wxsk8w"><label class="edit-panel__field svelte-1wxsk8w"><span class="edit-panel__field-label svelte-1wxsk8w">Title</span> <input class="edit-panel__input svelte-1wxsk8w" type="text"/></label> <label class="edit-panel__field svelte-1wxsk8w"><span class="edit-panel__field-label svelte-1wxsk8w">Description</span> <textarea class="edit-panel__textarea svelte-1wxsk8w"></textarea></label> <label class="edit-panel__field svelte-1wxsk8w"><span class="edit-panel__field-label svelte-1wxsk8w">Slug</span> <input class="edit-panel__input svelte-1wxsk8w" type="text" placeholder="auto-derived from filename"/></label> <div class="edit-panel__row svelte-1wxsk8w"><label class="edit-panel__field svelte-1wxsk8w"><span class="edit-panel__field-label svelte-1wxsk8w">Author</span> <input class="edit-panel__input svelte-1wxsk8w" type="text"/></label> <label class="edit-panel__field svelte-1wxsk8w"><span class="edit-panel__field-label svelte-1wxsk8w">Date</span> <input class="edit-panel__input svelte-1wxsk8w" type="date"/></label></div> <div class="edit-panel__row svelte-1wxsk8w"><label class="edit-panel__field svelte-1wxsk8w"><span class="edit-panel__field-label svelte-1wxsk8w">Order</span> <input class="edit-panel__input svelte-1wxsk8w" type="number"/></label> <div class="edit-panel__field svelte-1wxsk8w"><span class="edit-panel__field-label svelte-1wxsk8w">Draft</span> <div role="switch" tabindex="0"><div class="fm-toggle__track svelte-1wxsk8w"><div class="fm-toggle__thumb svelte-1wxsk8w"></div></div> <span class="fm-toggle__label svelte-1wxsk8w"> </span></div></div></div> <div class="edit-panel__field svelte-1wxsk8w"><span class="edit-panel__field-label svelte-1wxsk8w">Tags</span> <!></div> <!> <div class="edit-panel__add-field svelte-1wxsk8w"><input class="edit-panel__input svelte-1wxsk8w" type="text" placeholder="Field name"/> <button class="edit-panel__add-btn svelte-1wxsk8w">+ Add field</button></div></div></div></div>');function TF(n,e){Ot(e,!0);const t=new Set(["title","description","tags","draft","order","date","author","slug"]);let r=ee(""),i=me(()=>Object.entries(X.frontmatter).filter(([H])=>!t.has(H)));function s(H,se){X.updateFrontmatterField(H,se)}function o(){const H=m(r).trim();!H||H in X.frontmatter||(X.updateFrontmatterField(H,""),L(r,""))}function a(H){X.updateFrontmatterField(H,void 0)}var l=CF(),c=q(l),u=R(q(c),4);u.__click=function(...H){e.onclose?.apply(this,H)};var f=R(c,2),d=q(f),h=q(d),g=R(q(h),2);g.__input=H=>s("title",H.target.value);var p=R(h,2),O=R(q(p),2);O.__input=H=>s("description",H.target.value),Et(O,"rows",2);var v=R(p,2),b=R(q(v),2);b.__input=H=>s("slug",H.target.value);var _=R(v,2),A=q(_),y=R(q(A),2);y.__input=H=>s("author",H.target.value);var w=R(A,2),S=R(q(w),2);S.__input=H=>s("date",H.target.value);var C=R(_,2),x=q(C),k=R(q(x),2);k.__input=H=>{const se=H.target.value;s("order",se===""?void 0:Number(se))};var E=R(x,2),T=R(q(E),2);let $;T.__click=()=>s("draft",X.frontmatter.draft===!0?void 0:!0),T.__keydown=H=>{(H.key==="Enter"||H.key===" ")&&(H.preventDefault(),s("draft",X.frontmatter.draft===!0?void 0:!0))};var M=R(q(T),2),P=q(M),D=R(C,2),I=R(q(D),2);{let H=me(()=>X.frontmatter.tags??[]);D_(I,{get tags(){return m(H)},onchange:se=>s("tags",se)})}var W=R(D,2);{var U=H=>{var se=AF(),ie=R(q(se),2);$t(ie,17,()=>m(i),Gt,(B,J)=>{var Ae=me(()=>Mc(m(J),2));let Qe=()=>m(Ae)[0],Ne=()=>m(Ae)[1];var ge=SF(),Pe=q(ge),Ke=q(Pe),Je=R(Pe,2),We=q(Je);We.__input=Oe=>s(Qe(),Oe.target.value);var be=R(We,2);be.__click=()=>a(Qe()),fe(Oe=>{Ee(Ke,Qe()),on(We,Oe),Et(be,"aria-label",`Remove ${Qe()??""}`)},[()=>String(Ne()??"")]),j(B,ge)}),j(H,se)};ue(W,H=>{m(i).length>0&&H(U)})}var ae=R(W,2),ce=q(ae);ce.__keydown=H=>{H.key==="Enter"&&(H.preventDefault(),o())};var K=R(ce,2);K.__click=o,fe(H=>{on(g,X.frontmatter.title??""),on(O,X.frontmatter.description??""),on(b,X.frontmatter.slug??""),on(y,X.frontmatter.author??""),on(S,X.frontmatter.date??""),on(k,X.frontmatter.order??""),$=Ze(T,1,"fm-toggle svelte-1wxsk8w",null,$,{active:X.frontmatter.draft===!0}),Et(T,"aria-checked",X.frontmatter.draft===!0),Ee(P,X.frontmatter.draft===!0?"Draft":"Published"),K.disabled=H},[()=>!m(r).trim()]),$n(ce,()=>m(r),H=>L(r,H)),j(n,l),vt()}Ut(["click","input","keydown"]);var PF=V('<button type="button"> </button>'),EF=V('<div class="insert-dialog__tabs svelte-gvk8wi"></div>'),$F=V('<div class="insert-dialog__empty svelte-gvk8wi"> </div>'),QF=V('<span class="insert-dialog__rune-desc svelte-gvk8wi"> </span>'),LF=V('<button class="insert-dialog__btn insert-dialog__btn--rune svelte-gvk8wi"><span class="insert-dialog__rune-dot svelte-gvk8wi"></span> <span class="insert-dialog__rune-info svelte-gvk8wi"><span class="insert-dialog__rune-name svelte-gvk8wi"> </span> <!></span></button>'),MF=V('<div class="insert-dialog__grid svelte-gvk8wi"></div>'),DF=V('<button class="insert-dialog__btn svelte-gvk8wi"><svg class="insert-dialog__btn-icon svelte-gvk8wi" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path></path></svg> <span class="insert-dialog__btn-info svelte-gvk8wi"><span class="insert-dialog__btn-name svelte-gvk8wi"> </span> <span class="insert-dialog__btn-desc svelte-gvk8wi"> </span></span></button>'),qF=V('<span class="insert-dialog__rune-desc svelte-gvk8wi"> </span>'),RF=V('<button class="insert-dialog__btn insert-dialog__btn--rune svelte-gvk8wi"><span class="insert-dialog__rune-dot svelte-gvk8wi"></span> <span class="insert-dialog__rune-info svelte-gvk8wi"><span class="insert-dialog__rune-name svelte-gvk8wi"> </span> <!></span></button>'),IF=V('<div class="insert-dialog__grid svelte-gvk8wi"><!> <!></div>'),NF=V('<dialog class="insert-dialog svelte-gvk8wi"><div class="insert-dialog__inner svelte-gvk8wi"><div class="insert-dialog__header svelte-gvk8wi"><h2 class="insert-dialog__title svelte-gvk8wi">Insert Block</h2> <div class="insert-dialog__search-wrap svelte-gvk8wi"><svg class="insert-dialog__search-icon svelte-gvk8wi" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><circle cx="7" cy="7" r="4.5"></circle><path d="M10.5 10.5L14 14"></path></svg> <input class="insert-dialog__search svelte-gvk8wi" type="text" placeholder="Search blocks..."/></div> <button class="insert-dialog__close svelte-gvk8wi"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M4 4l8 8M12 4l-8 8"></path></svg></button></div> <!> <div class="insert-dialog__body svelte-gvk8wi"><!></div></div></dialog>');function BF(n,e){Ot(e,!0);const t=["Content","Section","Layout","Code & Data","Semantic","Design","Site"];let r=ee("Content"),i=ee(""),s,o,a=me(()=>{const x=new Set(e.runesByCategory.keys()),k=t.filter(E=>x.has(E));for(const E of x)k.includes(E)||k.push(E);return k}),l=me(()=>{if(!m(i).trim())return null;const x=m(i).toLowerCase();return e.runes.filter(k=>k.name.toLowerCase().includes(x)||k.description&&k.description.toLowerCase().includes(x))});const c=[{type:"heading",name:"Heading",description:"Section heading",icon:"M3 3v10M13 3v10M3 8h10"},{type:"paragraph",name:"Paragraph",description:"Body text",icon:"M2 4h12M2 8h12M2 12h8"},{type:"fence",name:"Code Block",description:"Fenced code",icon:"M5 4L2 8l3 4M11 4l3 4-3 4"},{type:"hr",name:"Divider",description:"Horizontal rule",icon:"M2 8h12"}];hn(()=>{s?.showModal(),o?.focus()});function u(x){x.target===s&&e.onclose()}function f(x){e.oninsert(x)}function d(x){e.oninsert("rune",x)}var h=NF();h.__click=u,h.__keydown=x=>{x.key==="Escape"&&(x.preventDefault(),e.onclose())};var g=q(h),p=q(g),O=R(q(p),2),v=R(q(O),2);cn(v,x=>o=x,()=>o);var b=R(O,2);b.__click=function(...x){e.onclose?.apply(this,x)};var _=R(p,2);{var A=x=>{var k=EF();$t(k,21,()=>m(a),Gt,(E,T)=>{var $=PF();let M;$.__click=()=>L(r,m(T),!0);var P=q($);fe(()=>{M=Ze($,1,"insert-dialog__tab svelte-gvk8wi",null,M,{active:m(r)===m(T)}),Ee(P,m(T))}),j(E,$)}),j(x,k)};ue(_,x=>{m(l)||x(A)})}var y=R(_,2),w=q(y);{var S=x=>{var k=ln(),E=ot(k);{var T=M=>{var P=$F(),D=q(P);fe(()=>Ee(D,`No blocks match "${m(i)??""}"`)),j(M,P)},$=M=>{var P=MF();$t(P,21,()=>m(l),Gt,(D,I)=>{var W=LF();W.__click=()=>d(m(I).name);var U=R(q(W),2),ae=q(U),ce=q(ae),K=R(ae,2);{var H=se=>{var ie=QF(),B=q(ie);fe(()=>Ee(B,m(I).description)),j(se,ie)};ue(K,se=>{m(I).description&&se(H)})}fe(()=>Ee(ce,m(I).name)),j(D,W)}),j(M,P)};ue(E,M=>{m(l).length===0?M(T):M($,!1)})}j(x,k)},C=x=>{var k=IF(),E=q(k);{var T=M=>{var P=ln(),D=ot(P);$t(D,17,()=>c,Gt,(I,W)=>{var U=DF();U.__click=()=>f(m(W).type);var ae=q(U),ce=q(ae),K=R(ae,2),H=q(K),se=q(H),ie=R(H,2),B=q(ie);fe(()=>{Et(ce,"d",m(W).icon),Ee(se,m(W).name),Ee(B,m(W).description)}),j(I,U)}),j(M,P)};ue(E,M=>{m(r)==="Content"&&M(T)})}var $=R(E,2);$t($,17,()=>e.runesByCategory.get(m(r))??[],Gt,(M,P)=>{var D=RF();D.__click=()=>d(m(P).name);var I=R(q(D),2),W=q(I),U=q(W),ae=R(W,2);{var ce=K=>{var H=qF(),se=q(H);fe(()=>Ee(se,m(P).description)),j(K,H)};ue(ae,K=>{m(P).description&&K(ce)})}fe(()=>Ee(U,m(P).name)),j(M,D)}),j(x,k)};ue(w,x=>{m(l)?x(S):x(C,!1)})}cn(h,x=>s=x,()=>s),ct("close",h,function(...x){e.onclose?.apply(this,x)}),$n(v,()=>m(i),x=>L(i,x)),j(n,h),vt()}Ut(["click","keydown"]);var jF=V('<div class="inline-edit-popover__link-editor svelte-1c50n5q"><div class="inline-edit-popover__link-row svelte-1c50n5q"><label class="inline-edit-popover__link-label svelte-1c50n5q">Text</label> <input class="inline-edit-popover__link-input svelte-1c50n5q" type="text"/></div> <div class="inline-edit-popover__link-row svelte-1c50n5q"><label class="inline-edit-popover__link-label svelte-1c50n5q">URL</label> <input class="inline-edit-popover__link-input svelte-1c50n5q" type="text" placeholder="https://..."/></div> <div class="inline-edit-popover__link-actions svelte-1c50n5q"><button class="inline-edit-popover__link-btn inline-edit-popover__link-btn--apply svelte-1c50n5q">Apply</button> <button class="inline-edit-popover__link-btn inline-edit-popover__link-btn--remove svelte-1c50n5q">Remove link</button></div></div>'),zF=V('<div><div class="inline-edit-popover__header svelte-1c50n5q"><span class="inline-edit-popover__label svelte-1c50n5q"> </span> <button class="inline-edit-popover__close svelte-1c50n5q" aria-label="Close">&times;</button></div> <div class="inline-edit-popover__toolbar svelte-1c50n5q"><button title="Bold (Ctrl+B)"><strong>B</strong></button> <button title="Italic (Ctrl+I)"><em>I</em></button> <button title="Inline code">&lt;/&gt;</button> <button class="inline-edit-popover__tool-btn svelte-1c50n5q" title="Link (Ctrl+K)"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M6.5 9.5a3 3 0 0 0 4.2.3l2-2a3 3 0 0 0-4.2-4.3l-1.1 1.1"></path><path d="M9.5 6.5a3 3 0 0 0-4.2-.3l-2 2a3 3 0 0 0 4.2 4.3l1.1-1.1"></path></svg></button></div> <div class="inline-edit-popover__editable svelte-1c50n5q" contenteditable="true"></div> <!></div>');function Z0(n,e){Ot(e,!0);let t,r,i=ee(0),s=ee(0),o=ee(!0),a=ee(null),l=ee(void 0),c;no(()=>{r.innerHTML=aB(e.inlineSource);const B=t.getBoundingClientRect(),J=B.width,Ae=B.height,Qe=8;let Ne=e.anchorRect.left+e.anchorRect.width/2-J/2;Ne<Qe&&(Ne=Qe),Ne+J>window.innerWidth-Qe&&(Ne=window.innerWidth-J-Qe),L(i,Ne,!0);const ge=e.anchorRect.top-Ae-Qe;ge>=Qe?(L(s,ge),L(o,!0)):(L(s,e.anchorRect.bottom+Qe),L(o,!1)),r.focus();const Pe=window.getSelection();if(Pe&&r.childNodes.length>0){const We=document.createRange();We.selectNodeContents(r),We.collapse(!1),Pe.removeAllRanges(),Pe.addRange(We)}function Ke(We){t&&!t.contains(We.target)&&e.onclose()}function Je(We){We.key==="Escape"&&(m(a)?L(a,null):e.onclose())}return requestAnimationFrame(()=>{document.addEventListener("mousedown",Ke)}),document.addEventListener("keydown",Je),()=>{document.removeEventListener("mousedown",Ke),document.removeEventListener("keydown",Je),clearTimeout(c)}});function u(){clearTimeout(c),c=setTimeout(()=>{F1(r);const B=cB(r);e.onchange(B)},100)}function f(B){if(B.key==="Enter"){B.preventDefault();return}(B.metaKey||B.ctrlKey)&&(B.key==="b"?(B.preventDefault(),g("bold")):B.key==="i"?(B.preventDefault(),g("italic")):B.key==="k"&&(B.preventDefault(),p()))}function d(B){B.preventDefault();const J=B.clipboardData?.getData("text/plain")??"";document.execCommand("insertText",!1,J)}function h(B){const Ae=B.target.closest("a");Ae&&r.contains(Ae)&&(B.preventDefault(),O(Ae))}function g(B){r.focus();const J=window.getSelection();if(!(!J||J.rangeCount===0)){if(B==="code"){const Ae=J.getRangeAt(0);if(Ae.collapsed)return;const Qe=C(Ae.commonAncestorContainer,"CODE",r);if(Qe){const Ne=document.createTextNode(Qe.textContent??"");Qe.replaceWith(Ne);const ge=document.createRange();ge.selectNode(Ne),J.removeAllRanges(),J.addRange(ge)}else{const Ne=document.createElement("code");Ne.textContent=Ae.toString(),Ae.deleteContents(),Ae.insertNode(Ne);const ge=document.createRange();ge.selectNodeContents(Ne),J.removeAllRanges(),J.addRange(ge)}}else{const Ae=B==="bold"?"bold":"italic";document.execCommand(Ae,!1)}F1(r),u()}}function p(){const B=window.getSelection();if(!B||B.rangeCount===0)return;const J=B.getRangeAt(0),Ae=C(J.commonAncestorContainer,"A",r);if(Ae){O(Ae);return}if(J.collapsed)return;const Qe=J.toString(),Ne=document.createElement("a");Ne.href="",Ne.textContent=Qe,J.deleteContents(),J.insertNode(Ne),O(Ne)}function O(B){L(a,{anchorEl:B,href:B.getAttribute("href")??"",text:B.textContent??"",rect:B.getBoundingClientRect()},!0),requestAnimationFrame(()=>{m(l)?.focus(),m(l)?.select()})}function v(){m(a)&&(m(a).anchorEl.href=m(a).href,m(a).anchorEl.textContent=m(a).text,L(a,null),r.focus(),u())}function b(){if(!m(a))return;const B=document.createTextNode(m(a).anchorEl.textContent??"");m(a).anchorEl.replaceWith(B),L(a,null),r.focus(),u()}function _(B){B.key==="Enter"&&(B.preventDefault(),v())}let A=ee(!1),y=ee(!1),w=ee(!1);function S(){L(A,document.queryCommandState("bold"),!0),L(y,document.queryCommandState("italic"),!0);const B=window.getSelection();B&&B.rangeCount>0?L(w,!!C(B.getRangeAt(0).commonAncestorContainer,"CODE",r)):L(w,!1)}function C(B,J,Ae){let Qe=B;for(;Qe&&Qe!==Ae;){if(Qe.nodeType===globalThis.Node.ELEMENT_NODE&&Qe.tagName===J)return Qe;Qe=Qe.parentNode}return null}var x=zF();let k;var E=q(x),T=q(E),$=q(T),M=R(T,2);M.__click=function(...B){e.onclose?.apply(this,B)};var P=R(E,2),D=q(P);let I;D.__click=()=>g("bold");var W=R(D,2);let U;W.__click=()=>g("italic");var ae=R(W,2);let ce;ae.__click=()=>g("code");var K=R(ae,2);K.__click=p;var H=R(P,2);H.__input=u,H.__keydown=f,H.__keyup=S,H.__mouseup=S,H.__click=h,cn(H,B=>r=B,()=>r);var se=R(H,2);{var ie=B=>{var J=jF(),Ae=q(J),Qe=R(q(Ae),2);Qe.__keydown=_;var Ne=R(Ae,2),ge=R(q(Ne),2);ge.__keydown=_,cn(ge,We=>L(l,We),()=>m(l));var Pe=R(Ne,2),Ke=q(Pe);Ke.__click=v;var Je=R(Ke,2);Je.__click=b,$n(Qe,()=>m(a).text,We=>m(a).text=We),$n(ge,()=>m(a).href,We=>m(a).href=We),j(B,J)};ue(se,B=>{m(a)&&B(ie)})}cn(x,B=>t=B,()=>t),fe(()=>{k=Ze(x,1,"inline-edit-popover svelte-1c50n5q",null,k,{above:m(o),below:!m(o)}),Ar(x,`left: ${m(i)??""}px; top: ${m(s)??""}px`),Ee($,e.dataName),I=Ze(D,1,"inline-edit-popover__tool-btn svelte-1c50n5q",null,I,{active:m(A)}),U=Ze(W,1,"inline-edit-popover__tool-btn svelte-1c50n5q",null,U,{active:m(y)}),ce=Ze(ae,1,"inline-edit-popover__tool-btn inline-edit-popover__tool-btn--code svelte-1c50n5q",null,ce,{active:m(w)})}),ct("paste",H,d),j(n,x),vt()}Ut(["click","input","keydown","keyup","mouseup"]);var ZF=V('<div><div class="action-edit-popover__header svelte-15w9shn"><span class="action-edit-popover__label svelte-15w9shn">action</span> <button class="action-edit-popover__close svelte-15w9shn" aria-label="Close">&times;</button></div> <div class="action-edit-popover__row svelte-15w9shn"><label class="action-edit-popover__field-label svelte-15w9shn">Text</label> <input class="action-edit-popover__input svelte-15w9shn" type="text"/></div> <div class="action-edit-popover__row svelte-15w9shn"><label class="action-edit-popover__field-label svelte-15w9shn">URL</label> <input class="action-edit-popover__input svelte-15w9shn" type="text" placeholder="https://..."/></div> <div class="action-edit-popover__actions svelte-15w9shn"><button class="action-edit-popover__btn action-edit-popover__btn--apply svelte-15w9shn">Apply</button> <button class="action-edit-popover__btn action-edit-popover__btn--remove svelte-15w9shn">Remove</button></div></div>');function XF(n,e){Ot(e,!0);let t,r,i=ee(0),s=ee(0),o=ee(!0),a=ee(Jt(e.text)),l=ee(Jt(e.href));no(()=>{const w=t.getBoundingClientRect(),S=w.width,C=w.height,x=8;let k=e.anchorRect.left+e.anchorRect.width/2-S/2;k<x&&(k=x),k+S>window.innerWidth-x&&(k=window.innerWidth-S-x),L(i,k,!0);const E=e.anchorRect.top-C-x;E>=x?(L(s,E),L(o,!0)):(L(s,e.anchorRect.bottom+x),L(o,!1)),r?.focus(),r?.select();function T(M){t&&!t.contains(M.target)&&c()}function $(M){M.key==="Escape"&&e.onclose()}return requestAnimationFrame(()=>{document.addEventListener("mousedown",T)}),document.addEventListener("keydown",$),()=>{document.removeEventListener("mousedown",T),document.removeEventListener("keydown",$)}});function c(){(m(a)!==e.text||m(l)!==e.href)&&e.onchange(m(a),m(l)),e.onclose()}function u(w){w.key==="Enter"&&(w.preventDefault(),c())}var f=ZF();let d;var h=q(f),g=R(q(h),2);g.__click=function(...w){e.onclose?.apply(this,w)};var p=R(h,2),O=R(q(p),2);O.__keydown=u,cn(O,w=>r=w,()=>r);var v=R(p,2),b=R(q(v),2);b.__keydown=u;var _=R(v,2),A=q(_);A.__click=c;var y=R(A,2);y.__click=function(...w){e.onremove?.apply(this,w)},cn(f,w=>t=w,()=>t),fe(()=>{d=Ze(f,1,"action-edit-popover svelte-15w9shn",null,d,{above:m(o),below:!m(o)}),Ar(f,`left: ${m(i)??""}px; top: ${m(s)??""}px`)}),$n(O,()=>m(a),w=>L(a,w)),$n(b,()=>m(l),w=>L(l,w)),j(n,f),vt()}Ut(["click","keydown"]);var FF=V("<option> </option>"),VF=V('<div><div class="code-edit-popover__header svelte-rmoejq"><span class="code-edit-popover__label svelte-rmoejq">code</span> <button class="code-edit-popover__close svelte-rmoejq" aria-label="Close">&times;</button></div> <div class="code-edit-popover__toolbar svelte-rmoejq"><select class="code-edit-popover__lang-select svelte-rmoejq"><option>No language</option><!></select></div> <div class="code-edit-popover__editor svelte-rmoejq"></div> <div class="code-edit-popover__actions svelte-rmoejq"><button class="code-edit-popover__btn code-edit-popover__btn--apply svelte-rmoejq">Apply</button> <button class="code-edit-popover__btn code-edit-popover__btn--remove svelte-rmoejq">Remove</button></div></div>');function WF(n,e){Ot(e,!0);const t=["bash","sh","shell","javascript","typescript","python","html","css","json","yaml","markdown","markdoc","go","rust","java","c","cpp","ruby","php","sql","swift","kotlin","dart","lua","r","perl","scala","haskell","elixir","toml","xml","graphql","dockerfile","diff","plaintext"];let r,i,s=ee(void 0),o=ee(0),a=ee(0),l=ee(!0),c=ee(Jt(e.code)),u=ee(Jt(e.language));const f=new ms,d=new ms,h=cl.define([{tag:N.keyword,color:"#8839ef"},{tag:[N.atom,N.bool],color:"#fe640b"},{tag:N.number,color:"#fe640b"},{tag:[N.string,N.special(N.string)],color:"#40a02b"},{tag:[N.regexp,N.escape],color:"#ea76cb"},{tag:N.definition(N.variableName),color:"#1e66f5"},{tag:N.local(N.variableName),color:"#1e66f5"},{tag:N.variableName,color:"#4c4f69"},{tag:N.definition(N.propertyName),color:"#1e66f5"},{tag:N.propertyName,color:"#1e66f5"},{tag:[N.typeName,N.className,N.namespace],color:"#df8e1d"},{tag:[N.macroName,N.labelName],color:"#d20f39"},{tag:N.function(N.variableName),color:"#1e66f5"},{tag:N.operator,color:"#04a5e5"},{tag:N.punctuation,color:"#7c7f93"},{tag:N.comment,color:"#9ca0b0",fontStyle:"italic"},{tag:N.lineComment,color:"#9ca0b0",fontStyle:"italic"},{tag:N.blockComment,color:"#9ca0b0",fontStyle:"italic"},{tag:N.meta,color:"#7c7f93"},{tag:N.link,color:"#1e66f5",textDecoration:"underline"},{tag:N.url,color:"#1e66f5"},{tag:N.invalid,color:"#d20f39"}]),g=$e.theme({"&":{fontSize:"13px",height:"auto",backgroundColor:"var(--ed-surface-1, #f8fafc)",border:"1px solid var(--ed-border-default, #e2e8f0)",borderRadius:"var(--ed-radius-sm, 4px)"},"&.cm-focused":{outline:"none",borderColor:"var(--ed-accent, #3b82f6)",boxShadow:"0 0 0 2px var(--ed-accent-ring, rgba(59, 130, 246, 0.2))"},".cm-scroller":{overflow:"auto",maxHeight:"12rem",fontFamily:"var(--ed-font-mono, 'SF Mono', 'Fira Code', monospace)",lineHeight:"1.5"},".cm-content":{padding:"var(--ed-space-2, 0.5rem)",caretColor:"#1e293b",minHeight:"3rem"},".cm-cursor":{borderLeftColor:"#1e293b"},"&.cm-focused .cm-selectionBackground, ::selection":{backgroundColor:"rgba(14, 165, 233, 0.2)"},".cm-selectionBackground":{backgroundColor:"rgba(14, 165, 233, 0.12)"},".cm-activeLine":{backgroundColor:"transparent"},".cm-markdoc-tag":{backgroundColor:"rgba(217, 119, 6, 0.06)",borderRadius:"2px"},".cm-markdoc-bracket":{color:"#94a3b8"},".cm-markdoc-name":{color:"#d97706",fontWeight:"600"}},{dark:!1}),p=me(()=>t.includes(m(u))||!m(u)?t:[m(u),...t]);function O(){if(!r)return;const I=r.getBoundingClientRect(),W=I.width,U=I.height,ae=8;let ce=e.anchorRect.left+e.anchorRect.width/2-W/2;ce<ae&&(ce=ae),ce+W>window.innerWidth-ae&&(ce=window.innerWidth-W-ae),L(o,ce,!0);const K=e.anchorRect.top-U-ae;K>=ae?(L(a,K),L(l,!0)):(L(a,e.anchorRect.bottom+ae),L(l,!1))}no(()=>{O();function I(U){r&&!r.contains(U.target)&&b()}function W(U){U.key==="Escape"&&e.onclose()}return requestAnimationFrame(()=>{document.addEventListener("mousedown",I)}),document.addEventListener("keydown",W),()=>{document.removeEventListener("mousedown",I),document.removeEventListener("keydown",W)}}),hn(()=>{if(!i)return;const I=Lt.create({doc:Sr(()=>m(c)),extensions:[f.of(Ua()),d.of(Sr(()=>m(u))==="markdoc"?Sc():[]),TO(),g,pc(h),pc(O2,{fallback:!0}),Vo.of([...$O,...PO,ZM,{key:"Mod-Enter",run:()=>(b(),!0)},{key:"Escape",run:()=>(e.onclose(),!0)}]),$e.updateListener.of(U=>{U.docChanged&&L(c,U.state.doc.toString(),!0)}),$e.lineWrapping]}),W=new $e({state:I,parent:i});return L(s,W,!0),W.focus(),v(W,Sr(()=>m(u))),requestAnimationFrame(()=>O()),()=>{L(s,void 0),W.destroy()}});function v(I,W){const U=W?.trim();if(!U)return;if(U==="markdoc"){I.dispatch({effects:[f.reconfigure(Ua()),d.reconfigure(Sc())]});return}I.dispatch({effects:d.reconfigure([])});const ae=te.matchLanguageName(vC,U,!0);ae&&ae.load().then(ce=>{I.dispatch({effects:f.reconfigure(ce)})}).catch(console.error)}function b(){m(c)!==e.code&&e.onchange(m(c)),e.onclose()}function _(I){const W=I.target;L(u,W.value,!0),e.onlanguagechange(m(u)),m(s)&&v(m(s),m(u))}var A=VF();let y;var w=q(A),S=R(q(w),2);S.__click=function(...I){e.onclose?.apply(this,I)};var C=R(w,2),x=q(C);x.__change=_;var k=q(x);k.value=k.__value="";var E=R(k);$t(E,17,()=>m(p),Gt,(I,W)=>{var U=FF(),ae=q(U),ce={};fe(()=>{Ee(ae,m(W)),ce!==(ce=m(W))&&(U.value=(U.__value=m(W))??"")}),j(I,U)});var T;Of(x);var $=R(C,2);cn($,I=>i=I,()=>i);var M=R($,2),P=q(M);P.__click=b;var D=R(P,2);D.__click=function(...I){e.onremove?.apply(this,I)},cn(A,I=>r=I,()=>r),fe(()=>{y=Ze(A,1,"code-edit-popover svelte-rmoejq",null,y,{above:m(l),below:!m(l)}),Ar(A,`left: ${m(o)??""}px; top: ${m(a)??""}px`),T!==(T=m(u))&&(x.value=(x.__value=m(u))??"",nc(x,m(u)))}),j(n,A),vt()}Ut(["click","change"]);const Rn="";async function X0(){const n=await fetch(`${Rn}/api/tree`);if(!n.ok)throw new Error(`Failed to load tree: ${n.status}`);return n.json()}async function Cp(n){const e=await fetch(`${Rn}/api/files/${encodeURIComponent(n)}`);if(!e.ok)throw new Error(`Failed to load file: ${e.status}`);return e.json()}async function YF(n,e){const t=await fetch(`${Rn}/api/files/${encodeURIComponent(n)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e})});if(!t.ok)throw new Error(`Failed to save file: ${t.status}`)}async function UF(n,e){const t=await fetch(`${Rn}/api/preview`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:n,content:e})});if(!t.ok)throw new Error(`Preview failed: ${t.status}`);return t.text()}async function GF(n,e){const t=await fetch(`${Rn}/api/preview-data`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:n,content:e})});if(!t.ok)throw new Error(`Preview data failed: ${t.status}`);return t.json()}async function HF(){const n=await fetch(`${Rn}/api/config`);if(!n.ok)throw new Error(`Config failed: ${n.status}`);return n.json()}async function KF(){const n=await fetch(`${Rn}/api/route-rules`);if(!n.ok)throw new Error(`Failed to load route rules: ${n.status}`);return(await n.json()).routeRules}async function JF(n){const e=await fetch(`${Rn}/api/route-rules`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({routeRules:n})});if(!e.ok){const t=await e.json().catch(()=>({}));throw new Error(t.error??`Failed to update route rules: ${e.status}`)}}async function eV(n){const e=await fetch(`${Rn}/api/pages`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!e.ok){const t=await e.json().catch(()=>({}));throw new Error(t.error??`Failed to create page: ${e.status}`)}return e.json()}async function F0(n){const e=await fetch(`${Rn}/api/directories`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!e.ok){const t=await e.json().catch(()=>({}));throw new Error(t.error??`Failed to create directory: ${e.status}`)}return e.json()}async function tV(n,e){const t=await fetch(`${Rn}/api/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:n,newName:e})});if(!t.ok){const r=await t.json().catch(()=>({}));throw new Error(r.error??`Failed to rename: ${t.status}`)}return t.json()}async function nV(n){const e=await fetch(`${Rn}/api/duplicate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:n})});if(!e.ok){const t=await e.json().catch(()=>({}));throw new Error(t.error??`Failed to duplicate: ${e.status}`)}return e.json()}async function rV(n){const e=await fetch(`${Rn}/api/files/${encodeURIComponent(n)}`,{method:"DELETE"});if(!e.ok){const t=await e.json().catch(()=>({}));throw new Error(t.error??`Failed to delete: ${e.status}`)}}async function iV(n){const e=await fetch(`${Rn}/api/toggle-draft`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:n})});if(!e.ok){const t=await e.json().catch(()=>({}));throw new Error(t.error??`Failed to toggle draft: ${e.status}`)}return e.json()}async function sV(){const n=await fetch(`${Rn}/api/assets`);if(!n.ok)throw new Error(`Failed to load assets: ${n.status}`);return(await n.json()).images}async function oV(n){const e=new FormData;e.append("file",n);const t=await fetch(`${Rn}/api/assets/upload`,{method:"POST",body:e});if(!t.ok){const r=await t.json().catch(()=>({}));throw new Error(r.error??`Upload failed: ${t.status}`)}return t.json()}async function aV(){const n=await fetch(`${Rn}/api/runes`);if(!n.ok)throw new Error(`Failed to load runes: ${n.status}`);return(await n.json()).runes}async function lV(){const n=await fetch(`${Rn}/api/aggregated`);return n.ok?n.json():{}}function cV(n){const e=new EventSource(`${Rn}/api/events`);return e.addEventListener("file-changed",t=>n("file-changed",JSON.parse(t.data))),e.addEventListener("file-created",t=>n("file-created",JSON.parse(t.data))),e.addEventListener("file-deleted",t=>n("file-deleted",JSON.parse(t.data))),()=>e.close()}var uV=V('<div class="image-edit-modal__empty svelte-1yd8alm">Loading images...</div>'),fV=V('<div class="image-edit-modal__empty svelte-1yd8alm">No images found. Upload one to get started.</div>'),dV=V('<div class="image-edit-modal__empty svelte-1yd8alm"> </div>'),hV=V('<button><img loading="lazy" class="svelte-1yd8alm"/></button>'),pV=V('<div class="image-edit-modal__grid svelte-1yd8alm"></div>'),mV=V('<div class="image-edit-backdrop svelte-1yd8alm" role="dialog" aria-modal="true" aria-label="Select image"><div><div class="image-edit-modal__header svelte-1yd8alm"><span class="image-edit-modal__label svelte-1yd8alm">image</span> <button class="image-edit-modal__close svelte-1yd8alm" aria-label="Close">&times;</button></div> <div class="image-edit-modal__search svelte-1yd8alm"><input class="image-edit-modal__search-input svelte-1yd8alm" type="text" placeholder="Search images..."/></div> <div class="image-edit-modal__grid-area svelte-1yd8alm"><!></div> <div class="image-edit-modal__upload-bar svelte-1yd8alm"><button class="image-edit-modal__upload-btn svelte-1yd8alm"> </button> <span class="image-edit-modal__upload-hint svelte-1yd8alm">or drag & drop</span> <input type="file" accept="image/*" style="display: none"/></div> <div class="image-edit-modal__footer svelte-1yd8alm"><div class="image-edit-modal__row svelte-1yd8alm"><label class="image-edit-modal__field-label svelte-1yd8alm" for="image-alt">Alt</label> <input id="image-alt" class="image-edit-modal__input svelte-1yd8alm" type="text" placeholder="Describe this image..."/></div> <div class="image-edit-modal__actions svelte-1yd8alm"><button class="image-edit-modal__btn image-edit-modal__btn--apply svelte-1yd8alm">Apply</button> <button class="image-edit-modal__btn image-edit-modal__btn--remove svelte-1yd8alm">Remove</button></div></div></div></div>');function gV(n,e){Ot(e,!0);let t,r,i,s=ee(Jt([])),o=ee(!0),a=ee(!1),l=ee(""),c=ee(Jt(e.currentSrc)),u=ee(Jt(e.currentAlt)),f=ee(!1);const d=me(()=>m(l)?m(s).filter(ge=>ge.name.toLowerCase().includes(m(l).toLowerCase())):m(s));no(()=>{h();function ge(Pe){Pe.key==="Escape"&&e.onclose()}return document.addEventListener("keydown",ge),()=>document.removeEventListener("keydown",ge)});async function h(){L(o,!0);try{L(s,await sV(),!0)}catch{L(s,[],!0)}L(o,!1)}function g(ge){ge.target===ge.currentTarget&&e.onclose()}function p(ge){if(L(c,ge.path,!0),!m(u)){const Pe=ge.name.replace(/\.[^.]+$/,"").replace(/[-_]/g," ");L(u,Pe,!0)}}function O(){m(c)&&e.onchange(m(c),m(u))}function v(){r?.click()}async function b(ge){const Pe=ge.target,Ke=Pe.files?.[0];Ke&&(await _(Ke),Pe.value="")}async function _(ge){if(ge.type.startsWith("image/")){L(a,!0);try{const Pe=await oV(ge);if(await h(),L(c,Pe.path,!0),!m(u)){const Ke=Pe.name.replace(/\.[^.]+$/,"").replace(/[-_]/g," ");L(u,Ke,!0)}}catch(Pe){console.error("Upload failed:",Pe)}L(a,!1)}}function A(ge){ge.preventDefault(),L(f,!0)}function y(){L(f,!1)}async function w(ge){ge.preventDefault(),L(f,!1);const Pe=ge.dataTransfer?.files[0];Pe&&await _(Pe)}function S(ge){ge.key==="Enter"&&(ge.preventDefault(),O())}var C=mV();C.__click=g,C.__keydown=()=>{};var x=q(C);let k;var E=q(x),T=R(q(E),2);T.__click=function(...ge){e.onclose?.apply(this,ge)};var $=R(E,2),M=q($),P=R($,2),D=q(P);{var I=ge=>{var Pe=uV();j(ge,Pe)},W=ge=>{var Pe=fV();j(ge,Pe)},U=ge=>{var Pe=dV(),Ke=q(Pe);fe(()=>Ee(Ke,`No images match "${m(l)??""}"`)),j(ge,Pe)},ae=ge=>{var Pe=pV();$t(Pe,21,()=>m(d),Ke=>Ke.path,(Ke,Je)=>{var We=hV();let be;We.__click=()=>p(m(Je));var Oe=q(We);fe(()=>{be=Ze(We,1,"image-edit-modal__thumb svelte-1yd8alm",null,be,{selected:m(c)===m(Je).path}),Et(We,"title",m(Je).name),Et(Oe,"src",m(Je).path),Et(Oe,"alt",m(Je).name)}),j(Ke,We)}),j(ge,Pe)};ue(D,ge=>{m(o)?ge(I):m(d).length===0&&!m(l)?ge(W,1):m(d).length===0?ge(U,2):ge(ae,!1)})}var ce=R(P,2),K=q(ce);K.__click=v;var H=q(K),se=R(K,4);se.__change=b,cn(se,ge=>r=ge,()=>r);var ie=R(ce,2),B=q(ie),J=R(q(B),2);J.__keydown=S,cn(J,ge=>i=ge,()=>i);var Ae=R(B,2),Qe=q(Ae);Qe.__click=O;var Ne=R(Qe,2);Ne.__click=function(...ge){e.onremove?.apply(this,ge)},cn(x,ge=>t=ge,()=>t),fe(()=>{k=Ze(x,1,"image-edit-modal svelte-1yd8alm",null,k,{"drag-over":m(f)}),K.disabled=m(a),Ee(H,m(a)?"Uploading...":"Upload image"),Qe.disabled=!m(c)}),ct("dragover",x,A),ct("dragleave",x,y),ct("drop",x,w),$n(M,()=>m(l),ge=>L(l,ge)),$n(J,()=>m(u),ge=>L(u,ge)),j(n,C),vt()}Ut(["click","keydown","change"]);var OV=V('<div class="icon-picker-modal__empty svelte-1rc2pkk">No icons available.</div>'),vV=V('<div class="icon-picker-modal__empty svelte-1rc2pkk"> </div>'),bV=V('<button><span class="icon-picker-modal__icon-svg svelte-1rc2pkk"><!></span> <span class="icon-picker-modal__icon-name svelte-1rc2pkk"> </span></button>'),yV=V('<div class="icon-picker-modal__group svelte-1rc2pkk"><div class="icon-picker-modal__group-label svelte-1rc2pkk"> </div> <div class="icon-picker-modal__grid svelte-1rc2pkk"></div></div>'),wV=V('<div class="icon-picker-backdrop svelte-1rc2pkk" role="dialog" aria-modal="true" aria-label="Select icon"><div class="icon-picker-modal svelte-1rc2pkk"><div class="icon-picker-modal__header svelte-1rc2pkk"><span class="icon-picker-modal__label svelte-1rc2pkk">icon</span> <button class="icon-picker-modal__close svelte-1rc2pkk" aria-label="Close">&times;</button></div> <div class="icon-picker-modal__search svelte-1rc2pkk"><input class="icon-picker-modal__search-input svelte-1rc2pkk" type="text" placeholder="Search icons..."/></div> <div class="icon-picker-modal__grid-area svelte-1rc2pkk"><!></div> <div class="icon-picker-modal__footer svelte-1rc2pkk"><button class="icon-picker-modal__btn icon-picker-modal__btn--apply svelte-1rc2pkk">Apply</button> <button class="icon-picker-modal__btn icon-picker-modal__btn--cancel svelte-1rc2pkk">Cancel</button></div></div></div>');function _V(n,e){Ot(e,!0);let t,r=ee(Jt(e.currentIcon)),i=ee("");const s=me(()=>{const x=[];for(const[k,E]of Object.entries(e.icons))for(const[T,$]of Object.entries(E)){const M=k==="global"?T:`${k}/${T}`;x.push({name:T,qualifiedName:M,group:k,svg:$})}return x}),o=me(()=>m(i)?m(s).filter(x=>x.name.toLowerCase().includes(m(i).toLowerCase())||x.qualifiedName.toLowerCase().includes(m(i).toLowerCase())):m(s)),a=me(()=>{const x=new Map;for(const k of m(o)){const E=x.get(k.group)??[];E.push(k),x.set(k.group,E)}return x});no(()=>{t?.focus();function x(k){k.key==="Escape"&&e.onclose()}return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)});function l(x){x.target===x.currentTarget&&e.onclose()}function c(x){L(r,x.qualifiedName,!0)}function u(){m(r)&&e.onchange(m(r))}var f=wV();f.__click=l,f.__keydown=()=>{};var d=q(f),h=q(d),g=R(q(h),2);g.__click=function(...x){e.onclose?.apply(this,x)};var p=R(h,2),O=q(p);cn(O,x=>t=x,()=>t);var v=R(p,2),b=q(v);{var _=x=>{var k=OV();j(x,k)},A=x=>{var k=vV(),E=q(k);fe(()=>Ee(E,`No icons match "${m(i)??""}"`)),j(x,k)},y=x=>{var k=ln(),E=ot(k);$t(E,17,()=>[...m(a)],([T,$])=>T,(T,$)=>{var M=me(()=>Mc(m($),2));let P=()=>m(M)[0],D=()=>m(M)[1];var I=yV(),W=q(I),U=q(W),ae=R(W,2);$t(ae,21,D,ce=>ce.qualifiedName,(ce,K)=>{var H=bV();let se;H.__click=()=>c(m(K));var ie=q(H),B=q(ie);qw(B,()=>m(K).svg);var J=R(ie,2),Ae=q(J);fe(()=>{se=Ze(H,1,"icon-picker-modal__icon svelte-1rc2pkk",null,se,{selected:m(r)===m(K).qualifiedName}),Et(H,"title",m(K).qualifiedName),Ee(Ae,m(K).name)}),j(ce,H)}),fe(()=>Ee(U,P())),j(T,I)}),j(x,k)};ue(b,x=>{m(s).length===0?x(_):m(o).length===0?x(A,1):x(y,!1)})}var w=R(v,2),S=q(w);S.__click=u;var C=R(S,2);C.__click=function(...x){e.onclose?.apply(this,x)},fe(()=>S.disabled=!m(r)),$n(O,()=>m(i),x=>L(i,x)),j(n,f),vt()}Ut(["click","keydown"]);var kV=V('<div class="block-editor__empty svelte-10brcoc"><svg class="block-editor__empty-icon svelte-10brcoc" width="40" height="40" viewBox="0 0 48 48" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="6" y="8" width="36" height="32" rx="3"></rect><line x1="14" y1="18" x2="34" y2="18"></line><line x1="14" y1="24" x2="28" y2="24"></line><line x1="14" y1="30" x2="22" y2="30"></line></svg> <span class="block-editor__empty-text svelte-10brcoc">No content blocks yet</span> <span class="block-editor__empty-hint svelte-10brcoc">Use the + button to add your first block</span></div>'),xV=V('<span class="block-editor__fm-desc svelte-10brcoc"> </span>'),SV=V('<div class="block-editor__fm-header svelte-10brcoc"><div class="block-editor__fm-info svelte-10brcoc"><span class="block-editor__fm-title svelte-10brcoc"> </span> <!></div> <button title="Edit frontmatter"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M11.5 1.5l3 3L5 14H2v-3L11.5 1.5z"></path></svg> Edit</button></div>'),AV=V('<button class="block-editor__insert-marker block-editor__insert-marker--top svelte-10brcoc" title="Insert block above"><svg width="10" height="10" viewBox="0 0 10 10" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><line x1="5" y1="2" x2="5" y2="8"></line><line x1="2" y1="5" x2="8" y2="5"></line></svg></button> <button class="block-editor__insert-marker block-editor__insert-marker--bottom svelte-10brcoc" title="Insert block below"><svg width="10" height="10" viewBox="0 0 10 10" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><line x1="5" y1="2" x2="5" y2="8"></line><line x1="2" y1="5" x2="8" y2="5"></line></svg></button>',1),CV=V('<button class="block-editor__hover-label svelte-10brcoc"> </button>'),TV=V('<div><div class="block-editor__block-cell svelte-10brcoc"><!></div> <!> <!></div>'),PV=V('<div class="block-editor__popover-backdrop svelte-10brcoc"></div> <div class="block-editor__popover svelte-10brcoc"><!></div>',1),EV=V('<div class="block-editor svelte-10brcoc"><!> <div class="block-editor__stage svelte-10brcoc"><div class="block-editor__scroll svelte-10brcoc"><div class="block-editor__list-wrap svelte-10brcoc"><!> <!></div></div></div> <!> <!> <!> <!> <!> <!> <!> <!></div>');function $V(n,e){Ot(e,!0);let t=Pt(e,"highlightCss",3,""),r=Pt(e,"highlightTransform",3,null),i=Pt(e,"showInsertMenu",3,!0),s=Pt(e,"frontmatter",19,()=>({})),o=Pt(e,"readOnly",3,!1),a=Pt(e,"communityTags",3,null),l=Pt(e,"communityPostTransforms",3,null),c=Pt(e,"communityStyles",3,null),u=Pt(e,"aggregated",19,()=>({})),f=ee(Jt([])),d=me(()=>xI(e.runes)),h="";function g(G,ne){if(G.length===0)return;const de=new Set(G.map(tt=>tt.id)),we=new Set(ne.map(tt=>tt.id)),Le=G.filter(tt=>!we.has(tt.id)),nt=ne.filter(tt=>!de.has(tt.id));if(Le.length===0||nt.length===0)return;const Ge=[...Le];for(const tt of nt){let lt=-1,It=1/0;for(let ht=0;ht<Ge.length;ht++){const Cn=Ge[ht],dn=Cn.type===tt.type?0:1e3,mt=Math.abs(Cn.startLine-tt.startLine)+dn;mt<It&&(It=mt,lt=ht)}lt>=0&&(tt.id=Ge[lt].id,Ge.splice(lt,1))}}hn(()=>{const G=e.bodyContent;if(G!==h){const ne=YS(G);g(m(f),ne),L(f,ne,!0),h=G,L(k,null),L(S,!1),L(T,null),L(Oe,null),L(A,null)}});function p(){const G=Xm(m(f));h=G,e.onchange(G)}let O=me(()=>L1(m(f)));function v(G){const ne=m(O)[G];if(!ne)return[0,0];if(ne.type==="prose"){const we=ne.children[0],Le=ne.children[ne.children.length-1],nt=m(f).indexOf(we),Ge=m(f).indexOf(Le);return[nt,Ge]}const de=m(f).indexOf(ne);return[de,de]}function b(G,ne){const[de,we]=v(G),Le=m(f).slice(de,we+1);g(Le,ne.children),L(f,[...m(f).slice(0,de),...ne.children,...m(f).slice(we+1)],!0),p()}function _(G,ne){const de=m(O)[G];if(!de||de.type!=="prose")return;const we=de.children[ne.childIndex];if(!we)return;const[Le]=v(G),nt=Le+ne.childIndex;if(we.type==="fence"){const ht=we,Cn=ht.code,dn=ht.language,mt=we.source.split(`
599
- `)[0],Bn=mt.match(/^(`{3,}|~{3,})/),Xr=Bn?Bn[1]:"```";L(xe,{blockIndex:nt,rect:ne.rect,mapping:{source:we.source,code:Cn,language:dn,opener:mt,delimiter:Xr}},!0);return}const Ge=we.source.trim();let tt="",lt=Ge;if(we.type==="heading"){const ht=Ge.match(/^(#{1,6}\s+)(.*)/);ht&&(tt=ht[1],lt=ht[2])}else if(we.type==="quote"){const ht=Ge.match(/^(>\s*)(.*)/);ht&&(tt=ht[1],lt=ht[2])}const It={dataName:we.type,text:yi(lt),source:Ge,sourcePrefix:tt,inlineSource:lt};L(A,{editorIndex:G,childIndex:ne.childIndex,flatIndex:nt,inlineSource:lt,rect:ne.rect,mapping:It},!0)}let A=ee(null);function y(G){if(!m(A))return;const ne=m(f)[m(A).flatIndex];if(!ne)return;const de=m(A).mapping.sourcePrefix+G;let we;ne.type==="heading"?(we={...ne,text:G,source:""},we.source=Fm(we)):we={...ne,source:de},L(A,{...m(A),inlineSource:G,mapping:{...m(A).mapping,text:yi(G),source:de,inlineSource:G}},!0),ie(m(A).flatIndex,we)}function w(){L(A,null)}let S=ee(!1),C=me(()=>s().title||""),x=me(()=>()=>{const G=s().description||"";return G.length>80?G.slice(0,80)+"...":G}),k=ee(null),E=ee(null),T=ee(null),$=ee(null),M=ee(0);const P=420,D=12;function I(G){if(!G.target.closest(".edit-panel__header")||G.target.closest("button"))return;G.preventDefault();const de=G.currentTarget,we=de.getBoundingClientRect(),Le=G.clientX,nt=G.clientY,Ge=we.left,tt=we.top;function lt(ht){de.style.left=`${Ge+(ht.clientX-Le)}px`,de.style.top=`${tt+(ht.clientY-nt)}px`}function It(){window.removeEventListener("mousemove",lt),window.removeEventListener("mouseup",It)}window.addEventListener("mousemove",lt),window.addEventListener("mouseup",It)}let W=me(()=>{if(!m(T))return"";const G=window.innerWidth,ne=window.innerHeight;let de=m(T).x+D;de+P>G-16&&(de=m(T).x-P-D),de<16&&(de=G-P-16);let we=m(T).y;const Le=ne-120,nt=ne-Math.min(600,Le)-16;return we>nt&&(we=nt),we<60&&(we=60),`left: ${de}px; top: ${we}px; max-height: min(600px, ${Le}px);`});function U(G,ne,de){L(S,!1),m(O)[G]&&(m(k)===G?(L(k,null),L(T,null),L($,null)):(th(M),L(k,G,!0),L(T,{x:ne,y:de},!0),L($,null)))}function ae(G,ne,de,we){L(S,!1),th(M),L(k,G,!0),L(T,{x:ne,y:de},!0),L($,we??null,!0)}function ce(G){L(k,null),m(S)?(L(S,!1),L(T,null)):(L(S,!0),L(T,{x:G.clientX,y:G.clientY},!0))}function K(G){if(!o()&&G.key==="Escape"){if(m(A)){w();return}(m(k)!==null||m(S))&&(L(k,null),L(S,!1),L(T,null),L($,null))}}function H(){(m(k)!==null||m(S))&&(L(k,null),L(S,!1),L(T,null),L($,null))}function se(){m(T)&&L(T,{...m(T)},!0)}function ie(G,ne){L(f,m(f).map((de,we)=>we===G?ne:de),!0),p()}function B(G){const[ne,de]=v(G);m(k)!==null&&(m(k)===G?L(k,null):m(k)>G&&th(k,-1)),L(f,[...m(f).slice(0,ne),...m(f).slice(de+1)],!0),p()}let J=ee(null),Ae=ee(null);function Qe(G,ne){L(J,ne,!0),L(k,null),L(S,!1),L(T,null),G.dataTransfer&&(G.dataTransfer.effectAllowed="move",G.dataTransfer.setData("text/plain",String(ne)))}function Ne(G,ne){G.preventDefault(),G.dataTransfer&&(G.dataTransfer.dropEffect="move"),L(Ae,ne,!0)}function ge(G,ne){if(G.preventDefault(),m(J)!==null&&m(J)!==ne){const[de,we]=v(m(J)),Le=m(f).slice(de,we+1),nt=[...m(f).slice(0,de),...m(f).slice(we+1)];let Ge;if(ne>=m(O).length)Ge=nt.length;else{const[tt]=v(ne);Ge=tt>we?tt-Le.length:tt}if(nt.splice(Ge,0,...Le),L(f,nt,!0),m(k)!==null)if(m(k)===m(J))L(k,ne>m(J)?ne-1:ne,!0);else{let tt=m(k);m(J)<m(k)&&ne>=m(k)?tt--:m(J)>m(k)&&ne<=m(k)&&tt++,L(k,tt,!0)}p()}L(J,null),L(Ae,null)}let Pe=ee(!1),Ke=ee(null);function Je(G){L(Ke,G,!0),L(Pe,!0)}function We(){L(Pe,!1),L(Ke,null)}function be(G,ne){let de;const we=`blk_new_${Date.now()}`;switch(G){case"heading":de={id:we,type:"heading",source:"## New heading",startLine:0,endLine:0,level:2,text:"New heading"};break;case"paragraph":de={id:we,type:"paragraph",source:"New paragraph text.",startLine:0,endLine:0};break;case"fence":de={id:we,type:"fence",source:"```\n\n```",startLine:0,endLine:0,language:"",code:""};break;case"hr":de={id:we,type:"hr",source:"---",startLine:0,endLine:0};break;case"rune":{const Ge=ne??"hint",tt=m(d).get(Ge),lt=tt?.selfClosing??!1,It={};if(tt)for(const[dn,mt]of Object.entries(tt.attributes))mt.required&&(It[dn]=mt.values?.[0]??"");const ht=Object.entries(It).map(([dn,mt])=>`${dn}="${mt}"`).join(" "),Cn=ht?" "+ht:"";if(lt)de={id:we,type:"rune",source:`{% ${Ge}${Cn} /%}`,startLine:0,endLine:0,runeName:Ge,selfClosing:!0,attributes:It,innerContent:""};else{const dn=tt?.example?SI(tt.example,Ge):"";de={id:we,type:"rune",source:`{% ${Ge}${Cn} %}
600
- ${dn}
601
- {% /${Ge} %}`,startLine:0,endLine:0,runeName:Ge,selfClosing:!1,attributes:It,innerContent:dn}}break}}const Le=m(Ke)??m(O).length;let nt;if(Le>=m(O).length)nt=m(f).length;else{const[Ge]=v(Le);nt=Ge}if(L(f,[...m(f).slice(0,nt),de,...m(f).slice(nt)],!0),L(Ke,null),L(Pe,!1),L(S,!1),G==="rune"){const Ge=L1(m(f));L(k,Ge.findIndex(tt=>tt.type==="rune"&&tt===m(f)[nt]),!0),m(k)===-1&&L(k,null)}else L(k,null);p()}let Oe=ee(null);function Me(G,ne){const de=m(O)[G];if(!de||de.type!=="rune")return;const[we]=v(G),Le=m(f)[we];if(Le.type!=="rune")return;const nt=Le,Ge=we;if(ne.editType==="link"){const lt=vB(nt.innerContent,ne.text,ne.href??"");if(!lt)return;L(st,{blockIndex:Ge,rect:ne.rect,mapping:lt},!0);return}if(ne.editType==="code"){const lt=yB(nt.innerContent,ne.text);if(!lt)return;L(xe,{blockIndex:Ge,rect:ne.rect,mapping:lt},!0);return}if(ne.editType==="image"){const lt=ne.href??"",It=kB(nt.innerContent,lt);if(!It)return;L(le,{blockIndex:Ge,mapping:It},!0);return}if(ne.editType==="icon"){const lt=ne.iconName??"",It=SB(nt.innerContent,lt);if(!It)return;L(De,{blockIndex:Ge,mapping:It},!0);return}const tt=SA(nt.innerContent,ne.dataName,ne.text);tt&&L(Oe,{blockIndex:Ge,dataName:ne.dataName,inlineSource:tt.inlineSource,rect:ne.rect,mapping:tt},!0)}function xt(G){if(!m(Oe))return;const ne=m(f)[m(Oe).blockIndex];if(ne.type!=="rune")return;const de=ne,we=OB(de.innerContent,m(Oe).mapping,G),Le={...de,innerContent:we,source:""};Le.source=Hn(Le),L(Oe,{...m(Oe),inlineSource:G,mapping:{...m(Oe).mapping,text:yi(G),source:m(Oe).mapping.sourcePrefix+G,inlineSource:G}},!0),ie(m(Oe).blockIndex,Le)}function at(){L(Oe,null)}let st=ee(null);function kt(G,ne){if(!m(st))return;const de=m(f)[m(st).blockIndex];if(de.type!=="rune")return;const we=de,Le=bB(we.innerContent,m(st).mapping,G,ne),nt={...we,innerContent:Le,source:""};nt.source=Hn(nt),ie(m(st).blockIndex,nt)}function yn(){if(!m(st))return;const G=m(st).blockIndex,ne=m(f)[G];if(ne.type!=="rune")return;const de=ne,we=de.innerContent.replace(m(st).mapping.source+`
602
- `,"").replace(m(st).mapping.source,""),Le={...de,innerContent:we,source:""};Le.source=Hn(Le),L(st,null),ie(G,Le)}function en(){L(st,null)}let xe=ee(null);function mn(G){if(!m(xe))return;const ne=m(f)[m(xe).blockIndex];if(ne.type==="fence"){const Ge={...ne,code:G,source:""};Ge.source=td(Ge),ie(m(xe).blockIndex,Ge);return}if(ne.type!=="rune")return;const de=ne,we=wB(de.innerContent,m(xe).mapping,G),Le={...de,innerContent:we,source:""};Le.source=Hn(Le),ie(m(xe).blockIndex,Le)}function et(){if(!m(xe))return;const G=m(xe).blockIndex,ne=m(f)[G];if(ne.type==="fence"){L(xe,null),L(f,m(f).filter((nt,Ge)=>Ge!==G),!0),p();return}if(ne.type!=="rune")return;const de=ne,we=de.innerContent.replace(m(xe).mapping.source+`
603
- `,"").replace(m(xe).mapping.source,""),Le={...de,innerContent:we,source:""};Le.source=Hn(Le),L(xe,null),ie(G,Le)}function jt(){L(xe,null)}function In(G){if(!m(xe))return;const ne=m(f)[m(xe).blockIndex];if(ne.type==="fence"){const ht={...ne,language:G,source:""};ht.source=td(ht);const dn=m(xe).mapping.opener.slice(m(xe).mapping.delimiter.length).replace(/^\w*/,"").trim(),mt=m(xe).mapping.delimiter+G+(dn?" "+dn:""),Bn=mt+`
604
- `+m(xe).mapping.code+`
605
- `+m(xe).mapping.delimiter;L(xe,{...m(xe),mapping:{...m(xe).mapping,language:G,opener:mt,source:Bn}},!0),ie(m(xe).blockIndex,ht);return}if(ne.type!=="rune")return;const de=ne,we=_B(de.innerContent,m(xe).mapping,G),Le={...de,innerContent:we,source:""};Le.source=Hn(Le);const Ge=m(xe).mapping.opener.slice(m(xe).mapping.delimiter.length).replace(/^\w*/,"").trim(),tt=m(xe).mapping.delimiter+G+(Ge?" "+Ge:""),lt=tt+`
606
- `+m(xe).mapping.code+`
607
- `+m(xe).mapping.delimiter;L(xe,{...m(xe),mapping:{...m(xe).mapping,language:G,opener:tt,source:lt}},!0),ie(m(xe).blockIndex,Le)}let le=ee(null);function ve(G,ne){if(!m(le))return;const de=m(f)[m(le).blockIndex];if(de.type!=="rune")return;const we=de,Le=xB(we.innerContent,m(le).mapping,ne,G),nt={...we,innerContent:Le,source:""};nt.source=Hn(nt),ie(m(le).blockIndex,nt)}function ke(){if(!m(le))return;const G=m(le).blockIndex,ne=m(f)[G];if(ne.type!=="rune")return;const de=ne,we=de.innerContent.replace(m(le).mapping.source+`
608
- `,"").replace(m(le).mapping.source,""),Le={...de,innerContent:we,source:""};Le.source=Hn(Le),L(le,null),ie(G,Le)}function Ce(){L(le,null)}let De=ee(null);function St(G){if(!m(De))return;const ne=m(f)[m(De).blockIndex];if(ne.type!=="rune")return;const de=ne,we=AB(de.innerContent,m(De).mapping,G),Le={...de,innerContent:we,source:""};Le.source=Hn(Le),ie(m(De).blockIndex,Le)}function pt(){L(De,null)}function Ue(G,ne,de,we){if(m(k)===null)return;const[Le]=v(m(k));L(xe,null),L(Oe,{blockIndex:Le,dataName:G,inlineSource:ne,rect:de,mapping:we},!0)}function At(G,ne,de,we){if(m(k)===null)return;const[Le]=v(m(k));L(Oe,null),L(xe,{blockIndex:Le,rect:de,mapping:we},!0)}let bt=me(()=>{const G=new Map;for(const ne of e.runes){const de=G.get(ne.category)??[];de.push(ne),G.set(ne.category,de)}return G});var ft=EV();ct("keydown",Lo,K),ct("resize",Lo,se);var Ct=q(ft);{var _n=G=>{var ne=kV();j(G,ne)};ue(Ct,G=>{m(f).length===0&&!o()&&G(_n)})}var Ft=R(Ct,2),tn=q(Ft),wt=q(tn),Ht=q(wt);{var Nn=G=>{var ne=SV(),de=q(ne),we=q(de),Le=q(we),nt=R(we,2);{var Ge=ht=>{var Cn=xV(),dn=q(Cn);fe(mt=>Ee(dn,mt),[()=>m(x)()]),j(ht,Cn)},tt=me(()=>m(x)());ue(nt,ht=>{m(tt)&&ht(Ge)})}var lt=R(de,2);let It;lt.__click=ht=>ce(ht),fe(()=>{Ee(Le,m(C)||"Untitled"),It=Ze(lt,1,"block-editor__fm-edit svelte-10brcoc",null,It,{active:m(S)})}),j(G,ne)};ue(Ht,G=>{o()||G(Nn)})}var Gn=R(Ht,2);$t(Gn,19,()=>m(O),G=>G.id,(G,ne,de)=>{var we=TV();let Le;var nt=q(we),Ge=q(nt);{var tt=mt=>{{let Bn=me(()=>o()?void 0:an=>_(m(de),an)),Xr=me(()=>o()?void 0:an=>U(m(de),an.x,an.y)),Pr=me(()=>o()?void 0:an=>Qe(an,m(de))),Wo=me(()=>o()?void 0:an=>Ne(an,m(de))),Yo=me(()=>o()?void 0:an=>ge(an,m(de)));K7(mt,{get block(){return m(ne)},get themeConfig(){return e.themeConfig},get themeCss(){return e.themeCss},get highlightCss(){return t()},get highlightTransform(){return r()},get communityTags(){return a()},get communityPostTransforms(){return l()},get communityStyles(){return c()},get aggregated(){return u()},get readOnly(){return o()},get onsectionclick(){return m(Bn)},get onblockclick(){return m(Xr)},get ondragstart(){return m(Pr)},get ondragover(){return m(Wo)},get ondrop(){return m(Yo)}})}},lt=mt=>{{let Bn=me(()=>o()?void 0:an=>Me(m(de),an)),Xr=me(()=>o()?void 0:an=>ae(m(de),an.x,an.y,an.nestedRuneIndex)),Pr=me(()=>o()?void 0:an=>Qe(an,m(de))),Wo=me(()=>o()?void 0:an=>Ne(an,m(de))),Yo=me(()=>o()?void 0:an=>ge(an,m(de)));Y7(mt,{get block(){return m(ne)},get themeConfig(){return e.themeConfig},get themeCss(){return e.themeCss},get highlightCss(){return t()},get highlightTransform(){return r()},get communityTags(){return a()},get communityPostTransforms(){return l()},get communityStyles(){return c()},get aggregated(){return u()},get readOnly(){return o()},get onsectionclick(){return m(Bn)},get onruneclick(){return m(Xr)},get ondragstart(){return m(Pr)},get ondragover(){return m(Wo)},get ondrop(){return m(Yo)}})}};ue(Ge,mt=>{m(ne).type==="prose"?mt(tt):mt(lt,!1)})}var It=R(nt,2);{var ht=mt=>{var Bn=AV(),Xr=ot(Bn);Xr.__click=()=>Je(m(de));var Pr=R(Xr,2);Pr.__click=()=>Je(m(de)+1),j(mt,Bn)};ue(It,mt=>{!o()&&i()&&mt(ht)})}var Cn=R(It,2);{var dn=mt=>{var Bn=CV();Bn.__click=Pr=>U(m(de),Pr.clientX,Pr.clientY);var Xr=q(Bn);fe(Pr=>{Et(Bn,"aria-pressed",m(k)===m(de)),Ee(Xr,Pr)},[()=>av(m(ne))]),j(mt,Bn)};ue(Cn,mt=>{o()||mt(dn)})}fe(()=>Le=Ze(we,1,"block-editor__row svelte-10brcoc",null,Le,{hovered:!o()&&m(E)===m(de),active:!o()&&m(k)===m(de),"drag-source":!o()&&m(J)===m(de),"drag-over":!o()&&m(Ae)===m(de)&&m(J)!==m(de)})),ct("mouseenter",we,()=>{o()||L(E,m(de),!0)}),ct("mouseleave",we,()=>{!o()&&m(E)===m(de)&&L(E,null)}),j(G,we)});var ur=R(Ft,2);{var un=G=>{var ne=PV(),de=ot(ne);de.__mousedown=()=>{L(k,null),L(S,!1),L(T,null),L($,null)};var we=R(de,2);we.__mousedown=I;var Le=q(we);{var nt=lt=>{TF(lt,{onclose:()=>{L(S,!1),L(T,null)}})},Ge=lt=>{const It=me(()=>m(f)[v(m(k))[0]]);var ht=ln(),Cn=ot(ht);Kv(Cn,()=>m(M),dn=>{bF(dn,{get block(){return m(It)},get runeMap(){return m(d)},runes:()=>e.runes,get aggregated(){return u()},get initialRuneIndex(){return m($)},onupdate:mt=>ie(v(m(k))[0],mt),onremove:()=>{const mt=m(k);L(k,null),L(T,null),L($,null),B(mt)},onclose:()=>{L(k,null),L(T,null),L($,null)},oneditfield:Ue,oneditcode:At})}),j(lt,ht)},tt=lt=>{const It=me(()=>m(O)[m(k)]);var ht=ln(),Cn=ot(ht);Kv(Cn,()=>m(M),dn=>{xF(dn,{get block(){return m(It)},runes:()=>e.runes,get aggregated(){return u()},onupdate:mt=>b(m(k),mt),onremove:()=>{const mt=m(k);L(k,null),L(T,null),B(mt)},onclose:()=>{L(k,null),L(T,null)}})}),j(lt,ht)};ue(Le,lt=>{m(S)?lt(nt):m(k)!==null&&m(O)[m(k)]?.type==="rune"?lt(Ge,1):m(k)!==null&&m(O)[m(k)]?.type==="prose"&&lt(tt,2)})}fe(()=>Ar(we,m(W))),j(G,ne)};ue(ur,G=>{!o()&&(m(k)!==null||m(S))&&G(un)})}var Rt=R(ur,2);{var Z=G=>{BF(G,{get runes(){return e.runes},get runesByCategory(){return m(bt)},oninsert:be,onclose:We})};ue(Rt,G=>{m(Pe)&&G(Z)})}var Xe=R(Rt,2);{var fn=G=>{Z0(G,{get anchorRect(){return m(Oe).rect},get dataName(){return m(Oe).dataName},get inlineSource(){return m(Oe).inlineSource},onchange:xt,onclose:at})};ue(Xe,G=>{m(Oe)&&G(fn)})}var kn=R(Xe,2);{var Ye=G=>{XF(G,{get anchorRect(){return m(st).rect},get text(){return m(st).mapping.text},get href(){return m(st).mapping.href},onchange:kt,onremove:yn,onclose:en})};ue(kn,G=>{m(st)&&G(Ye)})}var fr=R(kn,2);{var Pi=G=>{WF(G,{get anchorRect(){return m(xe).rect},get code(){return m(xe).mapping.code},get language(){return m(xe).mapping.language},onchange:mn,onlanguagechange:In,onremove:et,onclose:jt})};ue(fr,G=>{m(xe)&&G(Pi)})}var Ln=R(fr,2);{var Gi=G=>{gV(G,{get currentSrc(){return m(le).mapping.src},get currentAlt(){return m(le).mapping.alt},onchange:(ne,de)=>{ve(ne,de),Ce()},onremove:ke,onclose:Ce})};ue(Ln,G=>{m(le)&&G(Gi)})}var Mn=R(Ln,2);{var xs=G=>{{let ne=me(()=>e.themeConfig?.icons??{});_V(G,{get icons(){return m(ne)},get currentIcon(){return m(De).mapping.name},onchange:de=>{St(de),pt()},onclose:pt})}};ue(Mn,G=>{m(De)&&G(xs)})}var Hi=R(Mn,2);{var dr=G=>{Z0(G,{get anchorRect(){return m(A).rect},get dataName(){return m(A).mapping.dataName},get inlineSource(){return m(A).inlineSource},onchange:y,onclose:w})};ue(Hi,G=>{m(A)&&G(dr)})}ct("scroll",wt,H),j(n,ft),vt()}Ut(["click","mousedown"]);const V0=/\{%\s*region\s+([^%]*?)%\}([\s\S]*?)\{%\s*\/region\s*%\}/g,W0=/(\w+)="([^"]*)"/g;function QV(n){const e=[];let t;for(V0.lastIndex=0;(t=V0.exec(n))!==null;){const r=t[1],i=t[2],s={};let o;for(W0.lastIndex=0;(o=W0.exec(r))!==null;)s[o[1]]=o[2];const a=s.name||"",l=s.mode||"replace";let c=i;c.startsWith(`
609
- `)&&(c=c.slice(1)),c.endsWith(`
610
- `)&&(c=c.slice(0,-1)),e.push({name:a,mode:l,content:c})}return{regions:e}}function LV(n){const e=["{% layout %}"];for(const t of n.regions){const r=t.mode!=="replace"?` mode="${t.mode}"`:"";e.push(`{% region name="${t.name}"${r} %}`),e.push(t.content),e.push("{% /region %}"),e.push("")}return e.push("{% /layout %}"),e.join(`
611
- `)}const Dv=/\{%\s*nav\s*%\}/,bC=/\{%\s*\/nav\s*%\}/;function MV(n){return Dv.test(n)}function DV(n){const e=Dv.exec(n);if(!e)return null;const t=e.index+e[0].length,r=bC.exec(n.slice(t));if(!r)return null;let i=n.slice(t,t+r.index);return i.startsWith(`
612
- `)&&(i=i.slice(1)),i.endsWith(`
613
- `)&&(i=i.slice(0,-1)),i}function qV(n,e){const t=Dv.exec(n);if(!t)return n;const r=t.index+t[0].length,i=bC.exec(n.slice(r));if(!i)return n;const s=n.slice(0,r),o=n.slice(r+i.index);return`${s}
614
- ${e}
615
- ${o}`}function RV(n){const e=n.split(`
616
- `),t=[],r=[];let i=null;for(const s of e){const o=s.trim(),a=o.match(/^##\s+(.+)$/);if(a){i={title:a[1],items:[]},t.push(i);continue}const l=o.match(/^-\s+(.+)$/);if(l){const c=l[1].trim();i?i.items.push(c):r.push(c);continue}}return{groups:t,ungrouped:r}}function IV(n){const e=[];for(const t of n.ungrouped)e.push(`- ${t}`);n.ungrouped.length>0&&n.groups.length>0&&e.push("");for(let t=0;t<n.groups.length;t++){const r=n.groups[t];e.push(`## ${r.title}`),e.push("");for(const i of r.items)e.push(`- ${i}`);t<n.groups.length-1&&e.push("")}return e.join(`
617
- `)}var NV=V('<input class="nav-item__input svelte-8xlxf2" type="text"/>'),BV=V('<button class="nav-item__slug svelte-8xlxf2"> </button>'),jV=V('<div class="nav-item svelte-8xlxf2"><button class="nav-item__grip svelte-8xlxf2" title="Drag to reorder"><svg width="10" height="14" viewBox="0 0 10 14" fill="none"><circle cx="3" cy="3" r="1.2" fill="currentColor"></circle><circle cx="7" cy="3" r="1.2" fill="currentColor"></circle><circle cx="3" cy="7" r="1.2" fill="currentColor"></circle><circle cx="7" cy="7" r="1.2" fill="currentColor"></circle><circle cx="3" cy="11" r="1.2" fill="currentColor"></circle><circle cx="7" cy="11" r="1.2" fill="currentColor"></circle></svg></button> <!> <button class="nav-item__remove svelte-8xlxf2" title="Remove item"><svg width="12" height="12" viewBox="0 0 16 16" fill="none"><path d="M4 4l8 8M12 4l-8 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg></button></div>');function zV(n,e){Ot(e,!0);let t=ee(!1),r=ee(Jt(e.slug));function i(){L(r,e.slug,!0),L(t,!0)}function s(){const h=m(r).trim();h&&h!==e.slug&&e.onchange(h),L(t,!1)}function o(h){h.key==="Enter"?(h.preventDefault(),s()):h.key==="Escape"&&L(t,!1)}var a=jV(),l=q(a);l.__pointerdown=function(...h){e.ondragstart?.apply(this,h)};var c=R(l,2);{var u=h=>{var g=NV();g.__keydown=o,Os(g),ct("blur",g,s),$n(g,()=>m(r),p=>L(r,p)),j(h,g)},f=h=>{var g=BV();g.__dblclick=i;var p=q(g);fe(()=>Ee(p,e.slug)),j(h,g)};ue(c,h=>{m(t)?h(u):h(f,!1)})}var d=R(c,2);d.__click=function(...h){e.ondelete?.apply(this,h)},j(n,a),vt()}Ut(["pointerdown","keydown","dblclick","click"]);var ZV=V('<div role="listitem"><!></div>'),XV=V('<div class="nav-editor__add-item svelte-1h0zo48"><input class="nav-editor__add-input svelte-1h0zo48" type="text" placeholder="Page slug..."/></div>'),FV=V('<button class="nav-editor__add-item-btn svelte-1h0zo48">+ Add item</button>'),VV=V('<div class="nav-editor__group svelte-1h0zo48"><div class="nav-editor__group-header svelte-1h0zo48"><input class="nav-editor__group-title svelte-1h0zo48" type="text" placeholder="Group title"/> <button class="nav-editor__group-delete svelte-1h0zo48" title="Delete group"><svg width="12" height="12" viewBox="0 0 16 16" fill="none"><path d="M4 4l8 8M12 4l-8 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg></button></div> <div class="nav-editor__items svelte-1h0zo48"></div> <!></div>'),WV=V('<div class="nav-editor__add-group svelte-1h0zo48"><input class="nav-editor__add-input svelte-1h0zo48" type="text" placeholder="Group title..."/></div>'),YV=V('<button class="nav-editor__add-group-btn svelte-1h0zo48">+ Add group</button>'),UV=V('<div class="nav-editor svelte-1h0zo48"><!> <!></div>');function GV(n,e){Ot(e,!0);let t=ee(Jt({groups:[],ungrouped:[]})),r=ee(null),i=ee(""),s=ee(""),o=ee(!1),a=ee(null),l=ee(null);hn(()=>{const k=DV(e.content);k!==null&&L(t,RV(k),!0)});function c(){const k=IV(m(t)),E=qV(e.content,k);e.onchange(E)}function u(k,E){m(t).groups[k]={...m(t).groups[k],title:E},L(t,{...m(t)},!0),c()}function f(k){const E=m(t).groups[k];E.items.length>0&&!confirm(`Delete group "${E.title}" and its ${E.items.length} items?`)||(m(t).groups.splice(k,1),L(t,{...m(t)},!0),c())}function d(){const k=m(s).trim();k&&(m(t).groups.push({title:k,items:[]}),L(t,{...m(t)},!0),L(s,""),L(o,!1),c())}function h(k,E,T){m(t).groups[k].items[E]=T,L(t,{...m(t)},!0),c()}function g(k,E){m(t).groups[k].items.splice(E,1),L(t,{...m(t)},!0),c()}function p(k){const E=m(i).trim();E&&(m(t).groups[k].items.push(E),L(t,{...m(t)},!0),L(i,""),L(r,null),c())}function O(k,E){k.key==="Enter"?(k.preventDefault(),p(E)):k.key==="Escape"&&(L(r,null),L(i,""))}function v(k){k.key==="Enter"?(k.preventDefault(),d()):k.key==="Escape"&&(L(o,!1),L(s,""))}function b(k,E,T){k.currentTarget.setPointerCapture(k.pointerId),L(a,{groupIdx:E,itemIdx:T},!0)}function _(k,E,T){m(a)&&L(l,{groupIdx:E,itemIdx:T},!0)}function A(k){if(!m(a)||!m(l)){L(a,null),L(l,null);return}const{groupIdx:E,itemIdx:T}=m(a),{groupIdx:$,itemIdx:M}=m(l);if(E===$&&T===M){L(a,null),L(l,null);return}const[P]=m(t).groups[E].items.splice(T,1);let D=M;E===$&&T<M&&(D=M-1),m(t).groups[$].items.splice(D,0,P),L(t,{...m(t)},!0),L(a,null),L(l,null),c()}var y=UV(),w=q(y);$t(w,17,()=>m(t).groups,Gt,(k,E,T)=>{var $=VV(),M=q($),P=q(M);P.__input=ce=>u(T,ce.target.value);var D=R(P,2);D.__click=()=>f(T);var I=R(M,2);$t(I,21,()=>m(E).items,Gt,(ce,K,H)=>{var se=ZV();let ie;se.__pointermove=J=>_(J,T,H),se.__pointerup=A;var B=q(se);zV(B,{get slug(){return m(K)},onchange:J=>h(T,H,J),ondelete:()=>g(T,H),ondragstart:J=>b(J,T,H)}),fe(()=>ie=Ze(se,1,"nav-editor__item-wrapper svelte-1h0zo48",null,ie,{"drag-over":m(l)?.groupIdx===T&&m(l)?.itemIdx===H})),j(ce,se)});var W=R(I,2);{var U=ce=>{var K=XV(),H=q(K);H.__keydown=se=>O(se,T),Os(H),ct("blur",H,()=>{L(r,null),L(i,"")}),$n(H,()=>m(i),se=>L(i,se)),j(ce,K)},ae=ce=>{var K=FV();K.__click=()=>{L(r,T,!0),L(i,"")},j(ce,K)};ue(W,ce=>{m(r)===T?ce(U):ce(ae,!1)})}fe(()=>on(P,m(E).title)),j(k,$)});var S=R(w,2);{var C=k=>{var E=WV(),T=q(E);T.__keydown=v,Os(T),ct("blur",T,()=>{L(o,!1),L(s,"")}),$n(T,()=>m(s),$=>L(s,$)),j(k,E)},x=k=>{var E=YV();E.__click=()=>{L(o,!0),L(s,"")},j(k,E)};ue(S,k=>{m(o)?k(C):k(x,!1)})}j(n,y),vt()}Ut(["input","click","pointermove","pointerup","keydown"]);var HV=V("<button> </button>"),KV=V("<button> </button>"),JV=V('<textarea class="region-card__textarea svelte-1ah7fba" placeholder="Region content..." rows="4"></textarea>'),eW=V('<div class="region-card svelte-1ah7fba"><div class="region-card__header svelte-1ah7fba"><div class="region-card__name-row svelte-1ah7fba"><input class="region-card__name svelte-1ah7fba" type="text" placeholder="Region name"/> <div class="region-card__mode svelte-1ah7fba"></div></div> <div class="region-card__actions svelte-1ah7fba"><!> <button class="region-card__delete-btn svelte-1ah7fba" title="Delete region"><svg width="14" height="14" viewBox="0 0 16 16" fill="none"><path d="M4 4l8 8M12 4l-8 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg></button></div></div> <div class="region-card__body svelte-1ah7fba"><!></div></div>');function tW(n,e){Ot(e,!0);let t=ee(!1),r=me(()=>MV(e.region.content));function i(C){const x=C.target;e.onchange({...e.region,name:x.value})}function s(C){e.onchange({...e.region,mode:C})}function o(C){const x=C.target;e.onchange({...e.region,content:x.value})}function a(C){e.onchange({...e.region,content:C})}function l(){e.region.content.trim()&&!confirm(`Delete region "${e.region.name}"? Its content will be lost.`)||e.ondelete()}function c(C){C.style.height="auto",C.style.height=`${C.scrollHeight}px`}function u(C){const x=C.target;c(x),o(C)}var f=eW(),d=q(f),h=q(d),g=q(h);g.__input=i;var p=R(g,2);$t(p,20,()=>["replace","prepend","append"],Gt,(C,x)=>{var k=HV();let E;k.__click=()=>s(x);var T=q(k);fe(()=>{E=Ze(k,1,"region-card__mode-btn svelte-1ah7fba",null,E,{active:e.region.mode===x}),Ee(T,x)}),j(C,k)});var O=R(h,2),v=q(O);{var b=C=>{var x=KV();let k;x.__click=()=>{L(t,!m(t))};var E=q(x);fe(()=>{k=Ze(x,1,"region-card__toggle-btn svelte-1ah7fba",null,k,{active:m(t)}),Ee(E,m(t)?"Text":"Visual")}),j(C,x)};ue(v,C=>{m(r)&&C(b)})}var _=R(v,2);_.__click=l;var A=R(d,2),y=q(A);{var w=C=>{GV(C,{get content(){return e.region.content},onchange:a})},S=C=>{var x=JV();x.__input=u,YT(x,k=>c?.(k)),fe(()=>on(x,e.region.content)),j(C,x)};ue(y,C=>{m(r)&&m(t)?C(w):C(S,!1)})}fe(()=>on(g,e.region.name)),j(n,f),vt()}Ut(["input","click"]);var nW=V('<span class="layout-editor__path svelte-u2phg9"> </span>'),rW=V('<div class="layout-editor__raw svelte-u2phg9"><!></div>'),iW=V('<div class="layout-editor__empty svelte-u2phg9"><p class="svelte-u2phg9">No regions defined. Add a region to get started.</p></div>'),sW=V('<div class="layout-editor__regions svelte-u2phg9"><!> <!> <button class="layout-editor__add-btn svelte-u2phg9"><svg width="14" height="14" viewBox="0 0 16 16" fill="none"><path d="M8 3v10M3 8h10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg> Add Region</button></div>'),oW=V('<div class="layout-editor svelte-u2phg9"><div class="layout-editor__header svelte-u2phg9"><div class="layout-editor__title-row svelte-u2phg9"><svg class="layout-editor__icon svelte-u2phg9" width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="1" width="14" height="14" rx="2" stroke="currentColor" stroke-width="1.2"></rect><path d="M1 5h14M6 5v10" stroke="currentColor" stroke-width="1.2"></path></svg> <span class="layout-editor__title svelte-u2phg9">Layout</span> <!></div> <div class="layout-editor__mode-track svelte-u2phg9"><button>Visual</button> <button>Raw</button></div></div> <!></div>');function aW(n,e){Ot(e,!0);let t=ee(!1),r=ee(Jt({regions:[]})),i="";hn(()=>{const w=X.editorContent;w!==i&&(L(r,QV(w),!0),i=w)});function s(){const w=LV(m(r));i=w,X.editorContent=w,X.bodyContent=w}function o(w,S){m(r).regions[w]=S,L(r,{...m(r)},!0),s()}function a(w){m(r).regions.splice(w,1),L(r,{...m(r)},!0),s()}function l(){m(r).regions.push({name:"",mode:"replace",content:""}),L(r,{...m(r)},!0),s()}var c=oW(),u=q(c),f=q(u),d=R(q(f),4);{var h=w=>{var S=nW(),C=q(S);fe(()=>Ee(C,X.currentPath)),j(w,S)};ue(d,w=>{X.currentPath&&w(h)})}var g=R(f,2),p=q(g);let O;p.__click=()=>{L(t,!1)};var v=R(p,2);let b;v.__click=()=>{L(t,!0)};var _=R(u,2);{var A=w=>{var S=rW(),C=q(S);VS(C,{}),j(w,S)},y=w=>{var S=sW(),C=q(S);{var x=T=>{var $=iW();j(T,$)};ue(C,T=>{m(r).regions.length===0&&T(x)})}var k=R(C,2);$t(k,17,()=>m(r).regions,Gt,(T,$,M)=>{tW(T,{get region(){return m($)},onchange:P=>o(M,P),ondelete:()=>a(M)})});var E=R(k,2);E.__click=l,j(w,S)};ue(_,w=>{m(t)?w(A):w(y,!1)})}fe(()=>{O=Ze(p,1,"layout-editor__mode-btn svelte-u2phg9",null,O,{active:!m(t)}),b=Ze(v,1,"layout-editor__mode-btn svelte-u2phg9",null,b,{active:m(t)})}),j(n,c),vt()}Ut(["click"]);var lW=V('<div class="preview__empty svelte-1iqwj2q"><svg class="preview__empty-icon svelte-1iqwj2q" width="40" height="40" viewBox="0 0 48 48" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="8" width="40" height="32" rx="3" class="svelte-1iqwj2q"></rect><line x1="4" y1="16" x2="44" y2="16" class="svelte-1iqwj2q"></line><circle cx="10" cy="12" r="1.5" fill="currentColor" stroke="none" class="svelte-1iqwj2q"></circle><circle cx="15" cy="12" r="1.5" fill="currentColor" stroke="none" class="svelte-1iqwj2q"></circle><circle cx="20" cy="12" r="1.5" fill="currentColor" stroke="none" class="svelte-1iqwj2q"></circle><line x1="14" y1="26" x2="34" y2="26" class="svelte-1iqwj2q"></line><line x1="14" y1="32" x2="28" y2="32" class="svelte-1iqwj2q"></line></svg> <span class="preview__empty-text svelte-1iqwj2q">Select a page to preview</span></div>'),cW=V('<div class="preview__progress svelte-1iqwj2q"></div>'),uW=V('<iframe title="Preview" src="/preview/" class="preview__iframe svelte-1iqwj2q"></iframe>'),fW=V('<iframe title="Preview" class="preview__iframe svelte-1iqwj2q"></iframe>'),dW=V('<div class="preview__container svelte-1iqwj2q"><!> <div class="preview__viewport svelte-1iqwj2q"><!></div></div>');function hW(n,e){Ot(e,!0);let t=ee(""),r=ee(void 0),i=ee(void 0),s,o=new Map,a=ee(!1);const l=me(()=>m(t).replace("<html",`<html data-theme="${X.previewTheme}"`));hn(()=>{function g(p){if(p.data?.type==="preview-ready")X.previewRuntimeReady=!0;else if(p.data?.type==="preview-navigate"){const O=p.data.href,v=o.get(O);v&&e.onnavigate&&e.onnavigate(v)}}return window.addEventListener("message",g),()=>window.removeEventListener("message",g)});const c=me(()=>X.previewRuntimeAvailable&&X.previewRuntimeReady);hn(()=>{const g=uT(X.routeRules);m(c)&&m(r)?.contentWindow&&m(r).contentWindow.postMessage({type:"route-rules-update",routeRules:g},"*")}),hn(()=>{const g=X.previewTheme;m(c)&&m(r)?.contentWindow&&m(r).contentWindow.postMessage({type:"theme-update",theme:g},"*")}),hn(()=>{const g=X.currentPath,p=X.editorContent,O=m(c);if(!g||!p){L(t,"");return}return L(a,!0),clearTimeout(s),s=setTimeout(async()=>{try{if(O){const v=await GF(g,p);v.pages&&(o=new Map(v.pages.map(b=>[b.url,b.path]))),m(r)?.contentWindow?.postMessage({type:"preview-update",page:v},"*")}else L(t,await UF(g,p),!0)}catch{}finally{L(a,!1)}},400),()=>clearTimeout(s)});var u=ln(),f=ot(u);{var d=g=>{var p=lW();j(g,p)},h=g=>{var p=dW(),O=q(p);{var v=w=>{var S=cW();j(w,S)};ue(O,w=>{m(a)&&w(v)})}var b=R(O,2),_=q(b);{var A=w=>{var S=uW();cn(S,C=>L(r,C),()=>m(r)),j(w,S)},y=w=>{var S=fW();cn(S,C=>L(i,C),()=>m(i)),fe(()=>Et(S,"srcdoc",m(l))),j(w,S)};ue(_,w=>{X.previewRuntimeAvailable?w(A):w(y,!1)})}j(g,p)};ue(f,g=>{X.currentPath?g(h,!1):g(d)})}j(n,u),vt()}var pW=V('<div class="page-card svelte-1nxc0wz"><!></div>');function mW(n,e){Ot(e,!0);const t={desktop:1440,tablet:768,mobile:375},r=me(()=>X.editorMode==="preview"?t[X.viewport]??1440:1440);var i=pW(),s=q(i);ca(s,()=>e.children),fe(()=>Ar(i,`--page-card-width: ${m(r)??""}px`)),j(n,i),vt()}var gW=V('<div class="popover svelte-ohlzgl"><!></div>');function yC(n,e){Ot(e,!0);let t,r=ee(e.anchorRect.x+e.anchorRect.width+8),i=ee(Jt(e.anchorRect.y));no(()=>{if(t){const c=t.getBoundingClientRect();c.right>window.innerWidth-8&&L(r,e.anchorRect.x-c.width-8),c.bottom>window.innerHeight-8&&L(i,window.innerHeight-c.height-8),m(i)<8&&L(i,8)}function a(c){t&&!t.contains(c.target)&&e.onclose()}function l(c){c.key==="Escape"&&e.onclose()}return requestAnimationFrame(()=>{document.addEventListener("click",a)}),document.addEventListener("keydown",l),()=>{document.removeEventListener("click",a),document.removeEventListener("keydown",l)}});var s=gW(),o=q(s);ca(o,()=>e.children),cn(s,a=>t=a,()=>t),fe(()=>Ar(s,`left: ${m(r)??""}px; top: ${m(i)??""}px`)),j(n,s),vt()}var OW=V('<span class="modal__location svelte-vqemeo"> </span>'),vW=V('<span class="modal__hint svelte-vqemeo">Auto-derived from title</span>'),bW=V('<label class="modal__field svelte-vqemeo"><span class="modal__label svelte-vqemeo">Title</span> <input class="modal__input svelte-vqemeo" type="text" placeholder="My New Page"/></label> <label class="modal__field svelte-vqemeo"><span class="modal__label svelte-vqemeo">Slug</span> <input class="modal__input svelte-vqemeo" type="text" placeholder="my-new-page"/> <!></label> <label class="modal__checkbox svelte-vqemeo"><input type="checkbox"/> <span>Create as draft</span></label> <div class="modal__actions svelte-vqemeo"><button type="button" class="modal__btn modal__btn--cancel svelte-vqemeo">Cancel</button> <button type="submit" class="modal__btn modal__btn--primary svelte-vqemeo">Create</button></div>',1),yW=V('<span class="modal__error svelte-vqemeo">Use lowercase letters, numbers, and hyphens</span>'),wW=V('<label class="modal__field svelte-vqemeo"><span class="modal__label svelte-vqemeo">Name</span> <input class="modal__input svelte-vqemeo" type="text" placeholder="my-section"/> <!></label> <label class="modal__checkbox svelte-vqemeo"><input type="checkbox"/> <span>Create with _layout.md</span></label> <div class="modal__actions svelte-vqemeo"><button type="button" class="modal__btn modal__btn--cancel svelte-vqemeo">Cancel</button> <button type="submit" class="modal__btn modal__btn--primary svelte-vqemeo">Create</button></div>',1),_W=V('<form class="modal__form svelte-vqemeo"><div class="modal__tabs svelte-vqemeo"><button type="button"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"><path d="M9 1.5H4a1.5 1.5 0 0 0-1.5 1.5v10A1.5 1.5 0 0 0 4 14.5h8A1.5 1.5 0 0 0 13.5 13V6L9 1.5Z"></path><polyline points="9 1.5 9 6 13.5 6"></polyline></svg> File</button> <button type="button"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"><path d="M1.5 4h4.5l1.5 1.5H14.5v8.5h-13z"></path><path d="M1.5 4v-1.5h4.5l1.5 1.5"></path></svg> Folder</button></div> <!> <!></form>');function kW(n,e){Ot(e,!0);let t=Pt(e,"initialDirectory",3,""),r=ee("file"),i=ee(""),s=ee(""),o=ee(!1),a=ee(!1),l=me(()=>m(i).toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")),c=me(()=>m(o)?m(s):m(l)),u=ee(""),f=ee(!0),d=me(()=>/^[a-z0-9][a-z0-9-]*$/.test(m(u)));function h(g){if(g.preventDefault(),m(r)==="file"){if(!m(c))return;e.oncreate({directory:t(),slug:m(c),title:m(i)||m(c),template:"blank",draft:m(a)})}else{if(!m(d))return;e.oncreatefolder({parent:t(),name:m(u),createLayout:m(f)})}}yC(n,{get anchorRect(){return e.anchorRect},get onclose(){return e.onclose},children:(g,p)=>{var O=_W(),v=q(O),b=q(v);let _;b.__click=()=>L(r,"file");var A=R(b,2);let y;A.__click=()=>L(r,"folder");var w=R(v,2);{var S=E=>{var T=OW(),$=q(T);fe(()=>Ee($,`in ${t()??""}/`)),j(E,T)};ue(w,E=>{t()&&E(S)})}var C=R(w,2);{var x=E=>{var T=bW(),$=ot(T),M=R(q($),2);Os(M);var P=R($,2),D=R(q(P),2);D.__input=se=>{L(s,se.target.value,!0),L(o,!0)};var I=R(D,2);{var W=se=>{var ie=vW();j(se,ie)};ue(I,se=>{!m(o)&&m(i)&&se(W)})}var U=R(P,2),ae=q(U),ce=R(U,2),K=q(ce);K.__click=function(...se){e.onclose?.apply(this,se)};var H=R(K,2);fe(()=>{on(D,m(c)),H.disabled=!m(c)}),$n(M,()=>m(i),se=>L(i,se)),Dp(ae,()=>m(a),se=>L(a,se)),j(E,T)},k=E=>{var T=wW(),$=ot(T),M=R(q($),2);Os(M);var P=R(M,2);{var D=K=>{var H=yW();j(K,H)};ue(P,K=>{m(u)&&!m(d)&&K(D)})}var I=R($,2),W=q(I),U=R(I,2),ae=q(U);ae.__click=function(...K){e.onclose?.apply(this,K)};var ce=R(ae,2);fe(()=>ce.disabled=!m(d)),$n(M,()=>m(u),K=>L(u,K)),Dp(W,()=>m(f),K=>L(f,K)),j(E,T)};ue(C,E=>{m(r)==="file"?E(x):E(k,!1)})}fe(()=>{_=Ze(b,1,"modal__tab svelte-vqemeo",null,_,{active:m(r)==="file"}),y=Ze(A,1,"modal__tab svelte-vqemeo",null,y,{active:m(r)==="folder"})}),ct("submit",O,h),j(g,O)},$$slots:{default:!0}}),vt()}Ut(["click","input"]);var xW=V('<span class="modal__error svelte-fv7j9w">Use lowercase letters, numbers, and hyphens</span>'),SW=V("<option> </option>"),AW=V('<dialog class="modal svelte-fv7j9w"><form class="modal__form svelte-fv7j9w"><h2 class="modal__title svelte-fv7j9w">New Directory</h2> <label class="modal__field svelte-fv7j9w"><span class="modal__label svelte-fv7j9w">Name</span> <input class="modal__input svelte-fv7j9w" type="text" placeholder="my-section"/> <!></label> <label class="modal__field svelte-fv7j9w"><span class="modal__label svelte-fv7j9w">Parent directory</span> <select class="modal__select svelte-fv7j9w"></select></label> <label class="modal__checkbox svelte-fv7j9w"><input type="checkbox"/> <span>Create with _layout.md</span></label> <div class="modal__actions svelte-fv7j9w"><button type="button" class="modal__btn modal__btn--cancel svelte-fv7j9w">Cancel</button> <button type="submit" class="modal__btn modal__btn--primary svelte-fv7j9w">Create</button></div></form></dialog>');function CW(n,e){Ot(e,!0);let t=ee(""),r=ee(""),i=ee(!0),s;function o(C,x=[]){if(!C||C.type!=="directory")return x;x.push(C.path);for(const k of C.children??[])o(k,x);return x}let a=me(()=>o(X.tree)),l=me(()=>/^[a-z0-9][a-z0-9-]*$/.test(m(t)));hn(()=>{s&&!s.open&&s.showModal()});function c(C){C.preventDefault(),m(l)&&e.oncreate({parent:m(r),name:m(t),createLayout:m(i)})}function u(C){C.key==="Escape"&&e.onclose()}var f=AW();f.__keydown=u;var d=q(f),h=R(q(d),2),g=R(q(h),2);Os(g);var p=R(g,2);{var O=C=>{var x=xW();j(C,x)};ue(p,C=>{m(t)&&!m(l)&&C(O)})}var v=R(h,2),b=R(q(v),2);$t(b,21,()=>m(a),Gt,(C,x)=>{var k=SW(),E=q(k),T={};fe(()=>{Ee(E,m(x)||"/ (root)"),T!==(T=m(x))&&(k.value=(k.__value=m(x))??"")}),j(C,k)});var _=R(v,2),A=q(_),y=R(_,2),w=q(y);w.__click=function(...C){e.onclose?.apply(this,C)};var S=R(w,2);cn(f,C=>s=C,()=>s),fe(()=>S.disabled=!m(l)),ct("close",f,function(...C){e.onclose?.apply(this,C)}),ct("submit",d,c),$n(g,()=>m(t),C=>L(t,C)),Rw(b,()=>m(r),C=>L(r,C)),Dp(A,()=>m(i),C=>L(i,C)),j(n,f),vt()}Ut(["keydown","click"]);var TW=V('<span class="modal__error svelte-e8lnud">Use lowercase letters, numbers, and hyphens</span>'),PW=V('<span class="modal__hint svelte-e8lnud"> </span>'),EW=V("<option> </option>"),$W=V('<form class="modal__form svelte-e8lnud"><h2 class="modal__title svelte-e8lnud">New Category</h2> <p class="modal__desc svelte-e8lnud">Creates a directory with a route rule and layout.</p> <label class="modal__field svelte-e8lnud"><span class="modal__label svelte-e8lnud">Name</span> <input class="modal__input svelte-e8lnud" type="text" placeholder="tutorials"/> <!></label> <label class="modal__field svelte-e8lnud"><span class="modal__label svelte-e8lnud">Layout</span> <select class="modal__select svelte-e8lnud"></select></label> <div class="modal__actions svelte-e8lnud"><button type="button" class="modal__btn modal__btn--cancel svelte-e8lnud">Cancel</button> <button type="submit" class="modal__btn modal__btn--primary svelte-e8lnud">Create</button></div></form>');function QW(n,e){Ot(e,!0);let t=ee(""),r=ee("default"),i=me(()=>/^[a-z0-9][a-z0-9-]*$/.test(m(t))),s=me(()=>{const a=X.themeConfig;return a?.layouts?Object.keys(a.layouts):["default"]});function o(a){a.preventDefault(),m(i)&&e.oncreate({name:m(t),layout:m(r)})}yC(n,{get anchorRect(){return e.anchorRect},get onclose(){return e.onclose},children:(a,l)=>{var c=$W(),u=R(q(c),4),f=R(q(u),2);Os(f);var d=R(f,2);{var h=A=>{var y=TW();j(A,y)},g=A=>{var y=PW(),w=q(y);fe(()=>Ee(w,`Pattern: ${m(t)??""}/** · Directory: ${m(t)??""}/`)),j(A,y)};ue(d,A=>{m(t)&&!m(i)?A(h):m(t)&&A(g,1)})}var p=R(u,2),O=R(q(p),2);$t(O,21,()=>m(s),Gt,(A,y)=>{var w=EW(),S=q(w),C={};fe(()=>{Ee(S,m(y)),C!==(C=m(y))&&(w.value=(w.__value=m(y))??"")}),j(A,w)});var v=R(p,2),b=q(v);b.__click=function(...A){e.onclose?.apply(this,A)};var _=R(b,2);fe(()=>_.disabled=!m(i)),ct("submit",c,o),$n(f,()=>m(t),A=>L(t,A)),Rw(O,()=>m(r),A=>L(r,A)),j(a,c)},$$slots:{default:!0}}),vt()}Ut(["click"]);var LW=_s('<svg class="context-menu__icon svelte-1ksg7ac" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"><path></path></svg>'),MW=V("<button><!> </button>"),DW=V('<div class="context-menu svelte-1ksg7ac"></div>');function qW(n,e){Ot(e,!0);let t,r=ee(Jt(e.x)),i=ee(Jt(e.y));function s(l){switch(l){case"Rename":return"M12.5 3.5l-9 9L2 16l3.5-1.5 9-9zM10.5 5.5l2 2";case"Duplicate":return"M5 3h6l3 3v7H5zM3 6v9h8";case"Delete":return"M3 5h12M6 5V3h6v2M5 5v9h8V5";case"Publish":case"Set as Draft":return"M2 8h5v6H2zM9 4h5v10H9z";default:return null}}no(()=>{if(t){const c=t.getBoundingClientRect();c.right>window.innerWidth&&L(r,window.innerWidth-c.width-4),c.bottom>window.innerHeight&&L(i,window.innerHeight-c.height-4)}function l(c){t&&!t.contains(c.target)&&e.onclose()}return requestAnimationFrame(()=>{document.addEventListener("click",l),document.addEventListener("contextmenu",l)}),()=>{document.removeEventListener("click",l),document.removeEventListener("contextmenu",l)}});function o(l){l(),e.onclose()}var a=DW();$t(a,21,()=>e.items,Gt,(l,c)=>{const u=me(()=>s(m(c).label));var f=MW();let d;f.__click=()=>o(m(c).action);var h=q(f);{var g=O=>{var v=LW(),b=q(v);fe(()=>Et(b,"d",m(u))),j(O,v)};ue(h,O=>{m(u)&&O(g)})}var p=R(h);fe(()=>{d=Ze(f,1,"context-menu__item svelte-1ksg7ac",null,d,{danger:m(c).danger}),Ee(p,` ${m(c).label??""}`)}),j(l,f)}),cn(a,l=>t=l,()=>t),fe(()=>Ar(a,`left: ${m(r)??""}px; top: ${m(i)??""}px`)),j(n,a),vt()}Ut(["click"]);var RW=V('<dialog class="dialog svelte-19l8tke"><form class="dialog__form svelte-19l8tke"><h2 class="dialog__title svelte-19l8tke">Rename</h2> <input class="dialog__input svelte-19l8tke" type="text"/> <div class="dialog__actions svelte-19l8tke"><button type="button" class="dialog__btn dialog__btn--cancel svelte-19l8tke">Cancel</button> <button type="submit" class="dialog__btn dialog__btn--primary svelte-19l8tke">Rename</button></div></form></dialog>');function IW(n,e){Ot(e,!0);let t=ee(Jt(e.currentName)),r;hn(()=>{r&&!r.open&&r.showModal()});function i(f){f.preventDefault();const d=m(t).trim();d&&d!==e.currentName&&e.onrename(d)}var s=RW(),o=q(s),a=R(q(o),2);Os(a),a.__keydown=f=>{f.key==="Escape"&&e.onclose()};var l=R(a,2),c=q(l);c.__click=function(...f){e.onclose?.apply(this,f)};var u=R(c,2);cn(s,f=>r=f,()=>r),fe(f=>u.disabled=f,[()=>!m(t).trim()||m(t).trim()===e.currentName]),ct("close",s,function(...f){e.onclose?.apply(this,f)}),ct("submit",o,i),$n(a,()=>m(t),f=>L(t,f)),j(n,s),vt()}Ut(["keydown","click"]);var NW=V('<dialog class="dialog svelte-1r8rwv8"><form class="dialog__form svelte-1r8rwv8"><h2 class="dialog__title svelte-1r8rwv8"> </h2> <p class="dialog__message svelte-1r8rwv8"> </p> <div class="dialog__actions svelte-1r8rwv8"><button type="button" class="dialog__btn dialog__btn--cancel svelte-1r8rwv8">Cancel</button> <button type="submit" class="dialog__btn dialog__btn--danger svelte-1r8rwv8"> </button></div></form></dialog>');function BW(n,e){Ot(e,!0);let t=Pt(e,"confirmLabel",3,"Delete"),r;hn(()=>{r&&!r.open&&r.showModal()});function i(p){p.preventDefault(),e.onconfirm()}var s=NW(),o=q(s),a=q(o),l=q(a),c=R(a,2),u=q(c),f=R(c,2),d=q(f);d.__click=function(...p){e.onclose?.apply(this,p)};var h=R(d,2),g=q(h);cn(s,p=>r=p,()=>r),fe(()=>{Ee(l,e.title),Ee(u,e.message),Ee(g,t())}),ct("close",s,function(...p){e.onclose?.apply(this,p)}),ct("submit",o,i),j(n,s),vt()}Ut(["click"]);var jW=V('<div class="banner svelte-toaoe3"><span class="banner__text svelte-toaoe3"> </span> <button class="banner__btn banner__btn--reload svelte-toaoe3">Reload</button> <button class="banner__btn banner__btn--dismiss svelte-toaoe3">Dismiss</button></div>');function zW(n,e){Ot(e,!0);const t=me(()=>X.externalChange?.event==="file-deleted");var r=ln(),i=ot(r);{var s=o=>{var a=jW(),l=q(a),c=q(l),u=R(l,2);u.__click=function(...d){e.onreload?.apply(this,d)};var f=R(u,2);f.__click=()=>{X.externalChange=null},fe(()=>Ee(c,m(t)?"This file was deleted outside the editor.":"This file was changed outside the editor.")),j(o,a)};ue(i,o=>{X.externalChange&&o(s)})}j(n,r),vt()}Ut(["click"]);var ZW=V("<!> <!>",1),XW=V("<!> <!>",1),FW=V('<div class="editor-placeholder svelte-16t0oly"><svg width="40" height="40" viewBox="0 0 48 48" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-16t0oly"><rect x="6" y="4" width="24" height="32" rx="2"></rect><polyline points="20 4 20 14 30 14"></polyline><line x1="12" y1="22" x2="24" y2="22"></line><line x1="12" y1="27" x2="20" y2="27"></line><path d="M34 24l6 6M34 36l6-6"></path></svg> <span>Select a file to edit</span></div>'),VW=V('<div class="editor-app svelte-16t0oly"><!></div> <!> <!> <!> <!> <!> <!>',1);function WW(n,e){Ot(e,!0),customElements.get("rf-diagram")||customElements.define("rf-diagram",B7),customElements.get("rf-sandbox")||customElements.define("rf-sandbox",z7),customElements.get("rf-map")||customElements.define("rf-map",j7);let t=ee(!1),r=ee(!1),i=ee(!1),s=ee(""),o=ee(null),a=ee(null),l=ee(null),c=ee(null),u=ee(null),f="",d=0;no(()=>{(async()=>{X.treeLoading=!0;try{const[Ae,Qe,Ne,ge,Pe]=await Promise.all([X0(),aV(),HF(),KF(),lV()]);X.tree=Ae,X.runes=Qe,X.previewRuntimeAvailable=Ne.previewRuntime,X.themeCss=Ne.themeCss,X.themeConfig=Ne.themeConfig,X.routeRules=ge??[],X.aggregated=Pe,Ne.hasCommunityTags&&re(()=>import("/api/community-tags.js"),[]).then(Je=>{X.communityTags=Je.communityTags??null,X.communityPostTransforms=Je.communityPostTransforms??null,X.communityStyles=Je.communityStyles??null}).catch(()=>{}),re(async()=>{const{createHighlightTransform:Je}=await import("./index-CJ7VXzai.js");return{createHighlightTransform:Je}},[]).then(({createHighlightTransform:Je})=>Je().then(We=>{X.highlightTransform=We,X.highlightCss=We.css})).catch(()=>{});const Ke=Ae.children?.find(Je=>Je.type==="page"&&Je.name==="index.md");Ke&&g(Ke.path)}catch(Ae){X.error=Ae instanceof Error?Ae.message:"Failed to load content tree"}finally{X.treeLoading=!1}})();let B;const J=cV((Ae,Qe)=>{if(clearTimeout(B),B=setTimeout(()=>h(),500),Qe.path===X.currentPath){if(f===Qe.path&&Date.now()-d<2e3)return;X.externalChange={path:Qe.path,event:Ae}}});return()=>{J(),clearTimeout(B)}});async function h(){try{X.tree=await X0()}catch{}}async function g(B){if(!(X.dirty&&!confirm("You have unsaved changes. Discard them?"))){X.externalChange=null,X.fileLoading=!0,X.error=null;try{const J=await Cp(B);X.loadFile(B,J.raw)}catch(J){X.error=J instanceof Error?J.message:"Failed to load file"}finally{X.fileLoading=!1}}}async function p(){if(!(!X.currentPath||!X.dirty)){X.saving=!0,X.error=null;try{f=X.currentPath,d=Date.now(),await YF(X.currentPath,X.editorContent),X.savedContent=X.editorContent,X.saveJustCompleted=!0,setTimeout(()=>{X.saveJustCompleted=!1},1500)}catch(B){X.error=B instanceof Error?B.message:"Failed to save file"}finally{X.saving=!1}}}function O(B){(B.metaKey||B.ctrlKey)&&B.key==="s"&&(B.preventDefault(),p())}async function v(B){try{const J=await eV(B);L(t,!1),await h(),await g(J.path)}catch(J){X.error=J instanceof Error?J.message:"Failed to create page"}}async function b(B){try{await F0(B),L(r,!1),L(t,!1),await h()}catch(J){X.error=J instanceof Error?J.message:"Failed to create directory"}}async function _(B){try{await F0({parent:"",name:B.name,createLayout:!0});const J={pattern:`${B.name}/**`,layout:B.layout},Ae=[...X.routeRules],Qe=Ae.findIndex(Ne=>Ne.pattern==="**");Qe>=0?Ae.splice(Qe,0,J):Ae.push(J),await JF(Ae),X.routeRules=Ae,L(i,!1),await h()}catch(J){X.error=J instanceof Error?J.message:"Failed to create category"}}function A(B,J){L(l,{x:B.clientX,y:B.clientY,node:J},!0)}function y(B){const J=[];return B.type==="page"||B.type==="layout"?(J.push({label:"Rename",action:()=>{L(c,B,!0)}}),B.type==="page"&&(J.push({label:"Duplicate",action:()=>S(B)}),J.push({label:B.draft?"Publish":"Set as Draft",action:()=>k(B)})),J.push({label:"Delete",action:()=>{L(u,B,!0)},danger:!0})):B.type==="directory"&&(J.push({label:"Rename",action:()=>{L(c,B,!0)}}),J.push({label:"Delete",action:()=>{L(u,B,!0)},danger:!0})),J}async function w(B){if(!m(c))return;const J=m(c).path;try{const Ae=await tV(J,B);L(c,null),await h(),X.currentPath===J&&await g(Ae.newPath)}catch(Ae){X.error=Ae instanceof Error?Ae.message:"Failed to rename"}}async function S(B){try{const J=await nV(B.path);await h(),await g(J.path)}catch(J){X.error=J instanceof Error?J.message:"Failed to duplicate"}}async function C(){if(!m(u))return;const B=m(u).path;try{await rV(B),L(u,null),await h(),X.currentPath===B&&(X.currentPath=null,X.editorContent="",X.savedContent="",X.bodyContent="",X.frontmatter={})}catch(J){X.error=J instanceof Error?J.message:"Failed to delete"}}async function x(){if(!(X.dirty&&!confirm("You have unsaved changes. Reload will discard them."))){if(X.externalChange?.event==="file-deleted")X.currentPath=null,X.editorContent="",X.savedContent="",X.bodyContent="",X.frontmatter={};else if(X.externalChange){const B=await Cp(X.externalChange.path);X.loadFile(B.path,B.raw)}X.externalChange=null}}async function k(B){try{if(await iV(B.path),await h(),X.currentPath===B.path){const J=await Cp(B.path);X.loadFile(B.path,J.raw)}}catch(J){X.error=J instanceof Error?J.message:"Failed to toggle draft"}}var E=VW();ct("keydown",Lo,O);var T=ot(E),$=q(T);$E($,{header:Ne=>{PE(Ne,{onsave:p})},left:Ne=>{YE(Ne,{onselectfile:g,onnewpage:(ge,Pe)=>{L(s,ge??"",!0),L(o,Pe,!0),L(t,!0)},onnewdirectory:ge=>{L(r,!0)},onnewcategory:ge=>{L(a,ge,!0),L(i,!0)},oncontextmenu:A})},center:Ne=>{var ge=XW(),Pe=ot(ge);zW(Pe,{onreload:x});var Ke=R(Pe,2);{var Je=be=>{aW(be,{})},We=be=>{var Oe=ZW(),Me=ot(Oe);a$(Me,{forceRawMode:!0});var xt=R(Me,2);VS(xt,{}),j(be,Oe)};ue(Ke,be=>{X.currentFileType==="layout"?be(Je):X.currentPath&&be(We,1)})}j(Ne,ge)},right:Ne=>{var ge=ln(),Pe=ot(ge);{var Ke=We=>{var be=FW();j(We,be)},Je=We=>{mW(We,{children:(be,Oe)=>{var Me=ln(),xt=ot(Me);{var at=kt=>{hW(kt,{onnavigate:g})},st=kt=>{{let yn=me(()=>X.editorMode==="code");$V(kt,{get bodyContent(){return X.bodyContent},onchange:en=>X.updateBody(en),get runes(){return X.runes},get themeConfig(){return X.themeConfig},get themeCss(){return X.themeCss},get highlightCss(){return X.highlightCss},get highlightTransform(){return X.highlightTransform},get frontmatter(){return X.frontmatter},get readOnly(){return m(yn)},get communityTags(){return X.communityTags},get communityPostTransforms(){return X.communityPostTransforms},get communityStyles(){return X.communityStyles},get aggregated(){return X.aggregated}})}};ue(xt,kt=>{X.editorMode==="preview"?kt(at):kt(st,!1)})}j(be,Me)},$$slots:{default:!0}})};ue(Pe,We=>{X.currentPath?X.currentFileType!=="layout"&&We(Je,1):We(Ke)})}j(Ne,ge)},$$slots:{header:!0,left:!0,center:!0,right:!0}});var M=R(T,2);{var P=B=>{kW(B,{oncreate:v,oncreatefolder:b,onclose:()=>{L(t,!1)},get initialDirectory(){return m(s)},get anchorRect(){return m(o)}})};ue(M,B=>{m(t)&&m(o)&&B(P)})}var D=R(M,2);{var I=B=>{QW(B,{oncreate:_,onclose:()=>{L(i,!1)},get anchorRect(){return m(a)}})};ue(D,B=>{m(i)&&m(a)&&B(I)})}var W=R(D,2);{var U=B=>{CW(B,{oncreate:b,onclose:()=>{L(r,!1)}})};ue(W,B=>{m(r)&&B(U)})}var ae=R(W,2);{var ce=B=>{{let J=me(()=>y(m(l).node));qW(B,{get x(){return m(l).x},get y(){return m(l).y},get items(){return m(J)},onclose:()=>{L(l,null)}})}};ue(ae,B=>{m(l)&&B(ce)})}var K=R(ae,2);{var H=B=>{IW(B,{get currentName(){return m(c).name},onrename:w,onclose:()=>{L(c,null)}})};ue(K,B=>{m(c)&&B(H)})}var se=R(K,2);{var ie=B=>{{let J=me(()=>m(u).type==="directory"?"directory":"file");BW(B,{get title(){return`Delete ${m(J)??""}`},get message(){return`Are you sure you want to delete "${m(u).name??""}"? This cannot be undone.`},onconfirm:C,onclose:()=>{L(u,null)}})}};ue(se,B=>{m(u)&&B(ie)})}j(n,E),vt()}jT(WW,{target:document.getElementById("app")});export{Mx as C,Zr as E,Vt as I,ja as L,a2 as N,re as _,Xa as a,ll as b,of as c,FM as d,ix as e,Wc as f,Va as g,bn as h,Pn as i,Ff as j,bL as k,vL as l,m2 as m,gr as n,$e as o,pe as p,yS as q,l2 as r,al as s,N as t,Gx as u,v2 as v,ri as w};