| 1 |
var ra=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var Tn=(t,e,n)=>(ra(t,e,"read from private field"),n?n.call(t):e.get(t)),Ro=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},zo=(t,e,n,r)=>(ra(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);import{l as td,a4 as Bc,r as Yt,k as Wn,s as nd,u as rd,au as id,q as od,j as Lc,o as sd,x as ld,g as ad,y as z,A as P,B as F,H as A}from"./vue.js?ver=2.4.01";import{h as ud}from"./dayjs.js?ver=2.4.01";var Gv=!1,cd=Object.defineProperty,fd=Object.defineProperties,hd=Object.getOwnPropertyDescriptors,ia=Object.getOwnPropertySymbols,pd=Object.prototype.hasOwnProperty,dd=Object.prototype.propertyIsEnumerable,oa=(t,e,n)=>e in t?cd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,md=(t,e)=>{for(var n in e||(e={}))pd.call(e,n)&&oa(t,n,e[n]);if(ia)for(var n of ia(e))dd.call(e,n)&&oa(t,n,e[n]);return t},gd=(t,e)=>fd(t,hd(e));function Xv(t,e){var n;const r=nd();return td(()=>{r.value=t()},gd(md({},e),{flush:(n=e==null?void 0:e.flush)!=null?n:"sync"})),Bc(r)}var sa;const co=typeof window<"u",yd=t=>typeof t<"u",bd=t=>typeof t=="function",wd=t=>typeof t=="string",Un=()=>{},xd=co&&((sa=window==null?void 0:window.navigator)==null?void 0:sa.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Jn(t){return typeof t=="function"?t():rd(t)}function Vc(t,e){function n(...r){return new Promise((i,o)=>{Promise.resolve(t(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(i).catch(o)})}return n}function kd(t,e={}){let n,r,i=Un;const o=l=>{clearTimeout(l),i(),i=Un};return l=>{const a=Jn(t),u=Jn(e.maxWait);return n&&o(n),a<=0||u!==void 0&&u<=0?(r&&(o(r),r=null),Promise.resolve(l())):new Promise((c,f)=>{i=e.rejectOnCancel?f:c,u&&!r&&(r=setTimeout(()=>{n&&o(n),r=null,c(l())},u)),n=setTimeout(()=>{r&&o(r),r=null,c(l())},a)})}}function vd(t,e=!0,n=!0,r=!1){let i=0,o,s=!0,l=Un,a;const u=()=>{o&&(clearTimeout(o),o=void 0,l(),l=Un)};return f=>{const h=Jn(t),p=Date.now()-i,d=()=>a=f();return u(),h<=0?(i=Date.now(),d()):(p>h&&(n||!s)?(i=Date.now(),d()):e&&(a=new Promise((m,y)=>{l=r?y:m,o=setTimeout(()=>{i=Date.now(),s=!0,m(d()),u()},Math.max(0,h-p))})),!n&&!o&&(o=setTimeout(()=>s=!0,h)),s=!1,a)}}function _d(t){return t}function fo(t){return id()?(od(t),!0):!1}function Sd(t,e=200,n={}){return Vc(kd(e,n),t)}function Qv(t,e=200,n={}){const r=Yt(t.value),i=Sd(()=>{r.value=t.value},e,n);return Wn(t,()=>i()),r}function Zv(t,e=200,n=!1,r=!0,i=!1){return Vc(vd(e,n,r,i),t)}function Cd(t,e=!0){Lc()?sd(t):e?t():ld(t)}function e_(t,e,n={}){const{immediate:r=!0}=n,i=Yt(!1);let o=null;function s(){o&&(clearTimeout(o),o=null)}function l(){i.value=!1,s()}function a(...u){s(),i.value=!0,o=setTimeout(()=>{i.value=!1,o=null,t(...u)},Jn(e))}return r&&(i.value=!0,co&&a()),fo(l),{isPending:Bc(i),start:a,stop:l}}function cn(t){var e;const n=Jn(t);return(e=n==null?void 0:n.$el)!=null?e:n}const Xr=co?window:void 0,Od=co?window.document:void 0;function Ln(...t){let e,n,r,i;if(wd(t[0])||Array.isArray(t[0])?([n,r,i]=t,e=Xr):[e,n,r,i]=t,!e)return Un;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],s=()=>{o.forEach(c=>c()),o.length=0},l=(c,f,h,p)=>(c.addEventListener(f,h,p),()=>c.removeEventListener(f,h,p)),a=Wn(()=>[cn(e),Jn(i)],([c,f])=>{s(),c&&o.push(...n.flatMap(h=>r.map(p=>l(c,h,p,f))))},{immediate:!0,flush:"post"}),u=()=>{a(),s()};return fo(u),u}let la=!1;function t_(t,e,n={}){const{window:r=Xr,ignore:i=[],capture:o=!0,detectIframe:s=!1}=n;if(!r)return;xd&&!la&&(la=!0,Array.from(r.document.body.children).forEach(h=>h.addEventListener("click",Un)));let l=!0;const a=h=>i.some(p=>{if(typeof p=="string")return Array.from(r.document.querySelectorAll(p)).some(d=>d===h.target||h.composedPath().includes(d));{const d=cn(p);return d&&(h.target===d||h.composedPath().includes(d))}}),c=[Ln(r,"click",h=>{const p=cn(t);if(!(!p||p===h.target||h.composedPath().includes(p))){if(h.detail===0&&(l=!a(h)),!l){l=!0;return}e(h)}},{passive:!0,capture:o}),Ln(r,"pointerdown",h=>{const p=cn(t);p&&(l=!h.composedPath().includes(p)&&!a(h))},{passive:!0}),s&&Ln(r,"blur",h=>{var p;const d=cn(t);((p=r.document.activeElement)==null?void 0:p.tagName)==="IFRAME"&&!(d!=null&&d.contains(r.document.activeElement))&&e(h)})].filter(Boolean);return()=>c.forEach(h=>h())}function Hc(t,e=!1){const n=Yt(),r=()=>n.value=!!t();return r(),Cd(r,e),n}function Ad(t){return JSON.parse(JSON.stringify(t))}const aa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ua="__vueuse_ssr_handlers__";aa[ua]=aa[ua]||{};function n_({document:t=Od}={}){if(!t)return Yt("visible");const e=Yt(t.visibilityState);return Ln(t,"visibilitychange",()=>{e.value=t.visibilityState}),e}var ca=Object.getOwnPropertySymbols,Ed=Object.prototype.hasOwnProperty,Md=Object.prototype.propertyIsEnumerable,Td=(t,e)=>{var n={};for(var r in t)Ed.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ca)for(var r of ca(t))e.indexOf(r)<0&&Md.call(t,r)&&(n[r]=t[r]);return n};function r_(t,e,n={}){const r=n,{window:i=Xr}=r,o=Td(r,["window"]);let s;const l=Hc(()=>i&&"ResizeObserver"in i),a=()=>{s&&(s.disconnect(),s=void 0)},u=Wn(()=>cn(t),f=>{a(),l.value&&i&&f&&(s=new ResizeObserver(e),s.observe(f,o))},{immediate:!0,flush:"post"}),c=()=>{a(),u()};return fo(c),{isSupported:l,stop:c}}var fa=Object.getOwnPropertySymbols,Nd=Object.prototype.hasOwnProperty,Dd=Object.prototype.propertyIsEnumerable,Id=(t,e)=>{var n={};for(var r in t)Nd.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&fa)for(var r of fa(t))e.indexOf(r)<0&&Dd.call(t,r)&&(n[r]=t[r]);return n};function i_(t,e,n={}){const r=n,{window:i=Xr}=r,o=Id(r,["window"]);let s;const l=Hc(()=>i&&"MutationObserver"in i),a=()=>{s&&(s.disconnect(),s=void 0)},u=Wn(()=>cn(t),f=>{a(),l.value&&i&&f&&(s=new MutationObserver(e),s.observe(f,o))},{immediate:!0}),c=()=>{a(),u()};return fo(c),{isSupported:l,stop:c}}var ha;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(ha||(ha={}));var Rd=Object.defineProperty,pa=Object.getOwnPropertySymbols,zd=Object.prototype.hasOwnProperty,Pd=Object.prototype.propertyIsEnumerable,da=(t,e,n)=>e in t?Rd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Fd=(t,e)=>{for(var n in e||(e={}))zd.call(e,n)&&da(t,n,e[n]);if(pa)for(var n of pa(e))Pd.call(e,n)&&da(t,n,e[n]);return t};const Bd={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};Fd({linear:_d},Bd);function o_(t,e,n,r={}){var i,o,s;const{clone:l=!1,passive:a=!1,eventName:u,deep:c=!1,defaultValue:f}=r,h=Lc(),p=n||(h==null?void 0:h.emit)||((i=h==null?void 0:h.$emit)==null?void 0:i.bind(h))||((s=(o=h==null?void 0:h.proxy)==null?void 0:o.$emit)==null?void 0:s.bind(h==null?void 0:h.proxy));let d=u;e||(e="modelValue"),d=u||d||`update:${e.toString()}`;const m=g=>l?bd(l)?l(g):Ad(g):g,y=()=>yd(t[e])?m(t[e]):f;if(a){const g=y(),_=Yt(g);return Wn(()=>t[e],x=>_.value=m(x)),Wn(_,x=>{(x!==t[e]||c)&&p(d,x)},{deep:c}),_}else return ad({get(){return y()},set(g){p(d,g)}})}function s_({window:t=Xr}={}){if(!t)return Yt(!1);const e=Yt(t.document.hasFocus());return Ln(t,"blur",()=>{e.value=!1}),Ln(t,"focus",()=>{e.value=!0}),e}/*! Element Plus Icons Vue v2.3.1 */var Ld=z({name:"AlarmClock",__name:"alarm-clock",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M512 832a320 320 0 1 0 0-640 320 320 0 0 0 0 640m0 64a384 384 0 1 1 0-768 384 384 0 0 1 0 768"}),A("path",{fill:"currentColor",d:"m292.288 824.576 55.424 32-48 83.136a32 32 0 1 1-55.424-32zm439.424 0-55.424 32 48 83.136a32 32 0 1 0 55.424-32zM512 512h160a32 32 0 1 1 0 64H480a32 32 0 0 1-32-32V320a32 32 0 0 1 64 0zM90.496 312.256A160 160 0 0 1 312.32 90.496l-46.848 46.848a96 96 0 0 0-128 128L90.56 312.256zm835.264 0A160 160 0 0 0 704 90.496l46.848 46.848a96 96 0 0 1 128 128z"})]))}}),l_=Ld,Vd=z({name:"ArrowDown",__name:"arrow-down",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),a_=Vd,Hd=z({name:"ArrowLeftBold",__name:"arrow-left-bold",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M685.248 104.704a64 64 0 0 1 0 90.496L368.448 512l316.8 316.8a64 64 0 0 1-90.496 90.496L232.704 557.248a64 64 0 0 1 0-90.496l362.048-362.048a64 64 0 0 1 90.496 0z"})]))}}),u_=Hd,jd=z({name:"ArrowLeft",__name:"arrow-left",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"})]))}}),c_=jd,qd=z({name:"ArrowRight",__name:"arrow-right",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),f_=qd,$d=z({name:"ArrowUp",__name:"arrow-up",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),h_=$d,Wd=z({name:"Avatar",__name:"avatar",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M628.736 528.896A416 416 0 0 1 928 928H96a415.872 415.872 0 0 1 299.264-399.104L512 704zM720 304a208 208 0 1 1-416 0 208 208 0 0 1 416 0"})]))}}),p_=Wd,Ud=z({name:"Back",__name:"back",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),A("path",{fill:"currentColor",d:"m237.248 512 265.408 265.344a32 32 0 0 1-45.312 45.312l-288-288a32 32 0 0 1 0-45.312l288-288a32 32 0 1 1 45.312 45.312z"})]))}}),d_=Ud,Jd=z({name:"Baseball",__name:"baseball",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M195.2 828.8a448 448 0 1 1 633.6-633.6 448 448 0 0 1-633.6 633.6zm45.248-45.248a384 384 0 1 0 543.104-543.104 384 384 0 0 0-543.104 543.104"}),A("path",{fill:"currentColor",d:"M497.472 96.896c22.784 4.672 44.416 9.472 64.896 14.528a256.128 256.128 0 0 0 350.208 350.208c5.056 20.48 9.856 42.112 14.528 64.896A320.128 320.128 0 0 1 497.472 96.896zM108.48 491.904a320.128 320.128 0 0 1 423.616 423.68c-23.04-3.648-44.992-7.424-65.728-11.52a256.128 256.128 0 0 0-346.496-346.432 1736.64 1736.64 0 0 1-11.392-65.728z"})]))}}),m_=Jd,Kd=z({name:"Bell",__name:"bell",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M512 64a64 64 0 0 1 64 64v64H448v-64a64 64 0 0 1 64-64"}),A("path",{fill:"currentColor",d:"M256 768h512V448a256 256 0 1 0-512 0zm256-640a320 320 0 0 1 320 320v384H192V448a320 320 0 0 1 320-320"}),A("path",{fill:"currentColor",d:"M96 768h832q32 0 32 32t-32 32H96q-32 0-32-32t32-32m352 128h128a64 64 0 0 1-128 0"})]))}}),g_=Kd,Yd=z({name:"Bottom",__name:"bottom",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M544 805.888V168a32 32 0 1 0-64 0v637.888L246.656 557.952a30.72 30.72 0 0 0-45.312 0 35.52 35.52 0 0 0 0 48.064l288 306.048a30.72 30.72 0 0 0 45.312 0l288-306.048a35.52 35.52 0 0 0 0-48 30.72 30.72 0 0 0-45.312 0L544 805.824z"})]))}}),y_=Yd,Gd=z({name:"Calendar",__name:"calendar",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M128 384v512h768V192H768v32a32 32 0 1 1-64 0v-32H320v32a32 32 0 0 1-64 0v-32H128v128h768v64zm192-256h384V96a32 32 0 1 1 64 0v32h160a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h160V96a32 32 0 0 1 64 0zm-32 384h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64"})]))}}),b_=Gd,Xd=z({name:"CameraFilled",__name:"camera-filled",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M160 224a64 64 0 0 0-64 64v512a64 64 0 0 0 64 64h704a64 64 0 0 0 64-64V288a64 64 0 0 0-64-64H748.416l-46.464-92.672A64 64 0 0 0 644.736 96H379.328a64 64 0 0 0-57.216 35.392L275.776 224zm352 435.2a115.2 115.2 0 1 0 0-230.4 115.2 115.2 0 0 0 0 230.4m0 140.8a256 256 0 1 1 0-512 256 256 0 0 1 0 512"})]))}}),w_=Xd,Qd=z({name:"ChatDotRound",__name:"chat-dot-round",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"m174.72 855.68 135.296-45.12 23.68 11.84C388.096 849.536 448.576 864 512 864c211.84 0 384-166.784 384-352S723.84 160 512 160 128 326.784 128 512c0 69.12 24.96 139.264 70.848 199.232l22.08 28.8-46.272 115.584zm-45.248 82.56A32 32 0 0 1 89.6 896l58.368-145.92C94.72 680.32 64 596.864 64 512 64 299.904 256 96 512 96s448 203.904 448 416-192 416-448 416a461.056 461.056 0 0 1-206.912-48.384l-175.616 58.56z"}),A("path",{fill:"currentColor",d:"M512 563.2a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m192 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m-384 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4"})]))}}),x_=Qd,Zd=z({name:"ChatDotSquare",__name:"chat-dot-square",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M273.536 736H800a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64H224a64 64 0 0 0-64 64v570.88zM296 800 147.968 918.4A32 32 0 0 1 96 893.44V256a128 128 0 0 1 128-128h576a128 128 0 0 1 128 128v416a128 128 0 0 1-128 128z"}),A("path",{fill:"currentColor",d:"M512 499.2a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4zm192 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4zm-384 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4z"})]))}}),k_=Zd,e0=z({name:"Check",__name:"check",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}}),v_=e0,t0=z({name:"CircleCheckFilled",__name:"circle-check-filled",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),__=t0,n0=z({name:"CircleCheck",__name:"circle-check",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),A("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})]))}}),S_=n0,r0=z({name:"CircleCloseFilled",__name:"circle-close-filled",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),C_=r0,i0=z({name:"CircleClose",__name:"circle-close",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),A("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),O_=i0,o0=z({name:"Clock",__name:"clock",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),A("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),A("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),A_=o0,s0=z({name:"CloseBold",__name:"close-bold",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M195.2 195.2a64 64 0 0 1 90.496 0L512 421.504 738.304 195.2a64 64 0 0 1 90.496 90.496L602.496 512 828.8 738.304a64 64 0 0 1-90.496 90.496L512 602.496 285.696 828.8a64 64 0 0 1-90.496-90.496L421.504 512 195.2 285.696a64 64 0 0 1 0-90.496z"})]))}}),E_=s0,l0=z({name:"Close",__name:"close",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),M_=l0,a0=z({name:"Comment",__name:"comment",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M736 504a56 56 0 1 1 0-112 56 56 0 0 1 0 112m-224 0a56 56 0 1 1 0-112 56 56 0 0 1 0 112m-224 0a56 56 0 1 1 0-112 56 56 0 0 1 0 112M128 128v640h192v160l224-160h352V128z"})]))}}),T_=a0,u0=z({name:"CopyDocument",__name:"copy-document",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M768 832a128 128 0 0 1-128 128H192A128 128 0 0 1 64 832V384a128 128 0 0 1 128-128v64a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64z"}),A("path",{fill:"currentColor",d:"M384 128a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h448a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H384a128 128 0 0 1-128-128V192A128 128 0 0 1 384 64"})]))}}),N_=u0,c0=z({name:"DArrowLeft",__name:"d-arrow-left",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z"})]))}}),D_=c0,f0=z({name:"DArrowRight",__name:"d-arrow-right",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}}),I_=f0,h0=z({name:"DeleteFilled",__name:"delete-filled",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M352 192V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64H96a32 32 0 0 1 0-64zm64 0h192v-64H416zM192 960a32 32 0 0 1-32-32V256h704v672a32 32 0 0 1-32 32zm224-192a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32m192 0a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32"})]))}}),R_=h0,p0=z({name:"Delete",__name:"delete",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),z_=p0,d0=z({name:"Document",__name:"document",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),P_=d0,m0=z({name:"Download",__name:"download",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),F_=m0,g0=z({name:"EditPen",__name:"edit-pen",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"m199.04 672.64 193.984 112 224-387.968-193.92-112-224 388.032zm-23.872 60.16 32.896 148.288 144.896-45.696zM455.04 229.248l193.92 112 56.704-98.112-193.984-112-56.64 98.112zM104.32 708.8l384-665.024 304.768 175.936L409.152 884.8h.064l-248.448 78.336zm384 254.272v-64h448v64h-448z"})]))}}),B_=g0,y0=z({name:"Edit",__name:"edit",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"}),A("path",{fill:"currentColor",d:"m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"})]))}}),L_=y0,b0=z({name:"Expand",__name:"expand",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M128 192h768v128H128zm0 256h512v128H128zm0 256h768v128H128zm576-352 192 160-192 128z"})]))}}),V_=b0,w0=z({name:"FullScreen",__name:"full-screen",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64l192-.192zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}}),H_=w0,x0=z({name:"Guide",__name:"guide",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M640 608h-64V416h64zm0 160v160a32 32 0 0 1-32 32H416a32 32 0 0 1-32-32V768h64v128h128V768zM384 608V416h64v192zm256-352h-64V128H448v128h-64V96a32 32 0 0 1 32-32h192a32 32 0 0 1 32 32z"}),A("path",{fill:"currentColor",d:"m220.8 256-71.232 80 71.168 80H768V256H220.8zm-14.4-64H800a32 32 0 0 1 32 32v224a32 32 0 0 1-32 32H206.4a32 32 0 0 1-23.936-10.752l-99.584-112a32 32 0 0 1 0-42.496l99.584-112A32 32 0 0 1 206.4 192m678.784 496-71.104 80H266.816V608h547.2l71.168 80zm-56.768-144H234.88a32 32 0 0 0-32 32v224a32 32 0 0 0 32 32h593.6a32 32 0 0 0 23.936-10.752l99.584-112a32 32 0 0 0 0-42.496l-99.584-112A32 32 0 0 0 828.48 544z"})]))}}),j_=x0,k0=z({name:"Hide",__name:"hide",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}),A("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"})]))}}),q_=k0,v0=z({name:"HomeFilled",__name:"home-filled",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M512 128 128 447.936V896h255.936V640H640v256h255.936V447.936z"})]))}}),$_=v0,_0=z({name:"InfoFilled",__name:"info-filled",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),W_=_0,S0=z({name:"Iphone",__name:"iphone",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M224 768v96.064a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V768zm0-64h576V160a64 64 0 0 0-64-64H288a64 64 0 0 0-64 64zm32 288a96 96 0 0 1-96-96V128a96 96 0 0 1 96-96h512a96 96 0 0 1 96 96v768a96 96 0 0 1-96 96zm304-144a48 48 0 1 1-96 0 48 48 0 0 1 96 0"})]))}}),U_=S0,C0=z({name:"Link",__name:"link",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M715.648 625.152 670.4 579.904l90.496-90.56c75.008-74.944 85.12-186.368 22.656-248.896-62.528-62.464-173.952-52.352-248.96 22.656L444.16 353.6l-45.248-45.248 90.496-90.496c100.032-99.968 251.968-110.08 339.456-22.656 87.488 87.488 77.312 239.424-22.656 339.456l-90.496 90.496zm-90.496 90.496-90.496 90.496C434.624 906.112 282.688 916.224 195.2 828.8c-87.488-87.488-77.312-239.424 22.656-339.456l90.496-90.496 45.248 45.248-90.496 90.56c-75.008 74.944-85.12 186.368-22.656 248.896 62.528 62.464 173.952 52.352 248.96-22.656l90.496-90.496zm0-362.048 45.248 45.248L398.848 670.4 353.6 625.152z"})]))}}),J_=C0,O0=z({name:"Loading",__name:"loading",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),K_=O0,A0=z({name:"Lock",__name:"lock",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"}),A("path",{fill:"currentColor",d:"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m192-160v-64a192 192 0 1 0-384 0v64zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64"})]))}}),Y_=A0,E0=z({name:"Memo",__name:"memo",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M480 320h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32"}),A("path",{fill:"currentColor",d:"M887.01 72.99C881.01 67 873.34 64 864 64H160c-9.35 0-17.02 3-23.01 8.99C131 78.99 128 86.66 128 96v832c0 9.35 2.99 17.02 8.99 23.01S150.66 960 160 960h704c9.35 0 17.02-2.99 23.01-8.99S896 937.34 896 928V96c0-9.35-3-17.02-8.99-23.01M192 896V128h96v768zm640 0H352V128h480z"}),A("path",{fill:"currentColor",d:"M480 512h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32m0 192h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32"})]))}}),G_=E0,M0=z({name:"Message",__name:"message",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M128 224v512a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V224zm0-64h768a64 64 0 0 1 64 64v512a128 128 0 0 1-128 128H192A128 128 0 0 1 64 736V224a64 64 0 0 1 64-64"}),A("path",{fill:"currentColor",d:"M904 224 656.512 506.88a192 192 0 0 1-289.024 0L120 224zm-698.944 0 210.56 240.704a128 128 0 0 0 192.704 0L818.944 224H205.056"})]))}}),X_=M0,T0=z({name:"Money",__name:"money",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M256 640v192h640V384H768v-64h150.976c14.272 0 19.456 1.472 24.64 4.288a29.056 29.056 0 0 1 12.16 12.096c2.752 5.184 4.224 10.368 4.224 24.64v493.952c0 14.272-1.472 19.456-4.288 24.64a29.056 29.056 0 0 1-12.096 12.16c-5.184 2.752-10.368 4.224-24.64 4.224H233.024c-14.272 0-19.456-1.472-24.64-4.288a29.056 29.056 0 0 1-12.16-12.096c-2.688-5.184-4.224-10.368-4.224-24.576V640z"}),A("path",{fill:"currentColor",d:"M768 192H128v448h640zm64-22.976v493.952c0 14.272-1.472 19.456-4.288 24.64a29.056 29.056 0 0 1-12.096 12.16c-5.184 2.752-10.368 4.224-24.64 4.224H105.024c-14.272 0-19.456-1.472-24.64-4.288a29.056 29.056 0 0 1-12.16-12.096C65.536 682.432 64 677.248 64 663.04V169.024c0-14.272 1.472-19.456 4.288-24.64a29.056 29.056 0 0 1 12.096-12.16C85.568 129.536 90.752 128 104.96 128h685.952c14.272 0 19.456 1.472 24.64 4.288a29.056 29.056 0 0 1 12.16 12.096c2.752 5.184 4.224 10.368 4.224 24.64z"}),A("path",{fill:"currentColor",d:"M448 576a160 160 0 1 1 0-320 160 160 0 0 1 0 320m0-64a96 96 0 1 0 0-192 96 96 0 0 0 0 192"})]))}}),Q_=T0,N0=z({name:"MoreFilled",__name:"more-filled",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"})]))}}),Z_=N0,D0=z({name:"More",__name:"more",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M176 416a112 112 0 1 0 0 224 112 112 0 0 0 0-224m0 64a48 48 0 1 1 0 96 48 48 0 0 1 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96"})]))}}),e8=D0,I0=z({name:"Notebook",__name:"notebook",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M192 128v768h640V128zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32"}),A("path",{fill:"currentColor",d:"M672 128h64v768h-64zM96 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32"})]))}}),t8=I0,R0=z({name:"Notification",__name:"notification",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M512 128v64H256a64 64 0 0 0-64 64v512a64 64 0 0 0 64 64h512a64 64 0 0 0 64-64V512h64v256a128 128 0 0 1-128 128H256a128 128 0 0 1-128-128V256a128 128 0 0 1 128-128z"}),A("path",{fill:"currentColor",d:"M768 384a128 128 0 1 0 0-256 128 128 0 0 0 0 256m0 64a192 192 0 1 1 0-384 192 192 0 0 1 0 384"})]))}}),n8=R0,z0=z({name:"Operation",__name:"operation",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M389.44 768a96.064 96.064 0 0 1 181.12 0H896v64H570.56a96.064 96.064 0 0 1-181.12 0H128v-64zm192-288a96.064 96.064 0 0 1 181.12 0H896v64H762.56a96.064 96.064 0 0 1-181.12 0H128v-64zm-320-288a96.064 96.064 0 0 1 181.12 0H896v64H442.56a96.064 96.064 0 0 1-181.12 0H128v-64z"})]))}}),r8=z0,P0=z({name:"PictureFilled",__name:"picture-filled",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M96 896a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h832a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32zm315.52-228.48-68.928-68.928a32 32 0 0 0-45.248 0L128 768.064h778.688l-242.112-290.56a32 32 0 0 0-49.216 0L458.752 665.408a32 32 0 0 1-47.232 2.112M256 384a96 96 0 1 0 192.064-.064A96 96 0 0 0 256 384"})]))}}),i8=P0,F0=z({name:"Picture",__name:"picture",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M160 160v704h704V160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32"}),A("path",{fill:"currentColor",d:"M384 288q64 0 64 64t-64 64q-64 0-64-64t64-64M185.408 876.992l-50.816-38.912L350.72 556.032a96 96 0 0 1 134.592-17.856l1.856 1.472 122.88 99.136a32 32 0 0 0 44.992-4.864l216-269.888 49.92 39.936-215.808 269.824-.256.32a96 96 0 0 1-135.04 14.464l-122.88-99.072-.64-.512a32 32 0 0 0-44.8 5.952z"})]))}}),o8=F0,B0=z({name:"Plus",__name:"plus",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),s8=B0,L0=z({name:"Postcard",__name:"postcard",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M160 224a32 32 0 0 0-32 32v512a32 32 0 0 0 32 32h704a32 32 0 0 0 32-32V256a32 32 0 0 0-32-32zm0-64h704a96 96 0 0 1 96 96v512a96 96 0 0 1-96 96H160a96 96 0 0 1-96-96V256a96 96 0 0 1 96-96"}),A("path",{fill:"currentColor",d:"M704 320a64 64 0 1 1 0 128 64 64 0 0 1 0-128M288 448h256q32 0 32 32t-32 32H288q-32 0-32-32t32-32m0 128h256q32 0 32 32t-32 32H288q-32 0-32-32t32-32"})]))}}),l8=L0,V0=z({name:"Reading",__name:"reading",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"m512 863.36 384-54.848v-638.72L525.568 222.72a96 96 0 0 1-27.136 0L128 169.792v638.72zM137.024 106.432l370.432 52.928a32 32 0 0 0 9.088 0l370.432-52.928A64 64 0 0 1 960 169.792v638.72a64 64 0 0 1-54.976 63.36l-388.48 55.488a32 32 0 0 1-9.088 0l-388.48-55.488A64 64 0 0 1 64 808.512v-638.72a64 64 0 0 1 73.024-63.36z"}),A("path",{fill:"currentColor",d:"M480 192h64v704h-64z"})]))}}),a8=V0,H0=z({name:"RefreshLeft",__name:"refresh-left",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}}),u8=H0,j0=z({name:"RefreshRight",__name:"refresh-right",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88z"})]))}}),c8=j0,q0=z({name:"ScaleToOriginal",__name:"scale-to-original",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118zm-361.412 0a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118M512 361.412a30.118 30.118 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.118 30.118 0 0 0 512 361.412M512 512a30.118 30.118 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.118 30.118 0 0 0 512 512"})]))}}),f8=q0,$0=z({name:"Search",__name:"search",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}}),h8=$0,W0=z({name:"SuccessFilled",__name:"success-filled",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),p8=W0,U0=z({name:"Tickets",__name:"tickets",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M192 128v768h640V128zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h192v64H320zm0 384h384v64H320z"})]))}}),d8=U0,J0=z({name:"Timer",__name:"timer",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M512 896a320 320 0 1 0 0-640 320 320 0 0 0 0 640m0 64a384 384 0 1 1 0-768 384 384 0 0 1 0 768"}),A("path",{fill:"currentColor",d:"M512 320a32 32 0 0 1 32 32l-.512 224a32 32 0 1 1-64 0L480 352a32 32 0 0 1 32-32"}),A("path",{fill:"currentColor",d:"M448 576a64 64 0 1 0 128 0 64 64 0 1 0-128 0m96-448v128h-64V128h-96a32 32 0 0 1 0-64h256a32 32 0 1 1 0 64z"})]))}}),m8=J0,K0=z({name:"Top",__name:"top",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M572.235 205.282v600.365a30.118 30.118 0 1 1-60.235 0V205.282L292.382 438.633a28.913 28.913 0 0 1-42.646 0 33.43 33.43 0 0 1 0-45.236l271.058-288.045a28.913 28.913 0 0 1 42.647 0L834.5 393.397a33.43 33.43 0 0 1 0 45.176 28.913 28.913 0 0 1-42.647 0l-219.618-233.23z"})]))}}),g8=K0,Y0=z({name:"UploadFilled",__name:"upload-filled",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M544 864V672h128L512 480 352 672h128v192H320v-1.6c-5.376.32-10.496 1.6-16 1.6A240 240 0 0 1 64 624c0-123.136 93.12-223.488 212.608-237.248A239.808 239.808 0 0 1 512 192a239.872 239.872 0 0 1 235.456 194.752c119.488 13.76 212.48 114.112 212.48 237.248a240 240 0 0 1-240 240c-5.376 0-10.56-1.28-16-1.6v1.6z"})]))}}),y8=Y0,G0=z({name:"User",__name:"user",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M512 512a192 192 0 1 0 0-384 192 192 0 0 0 0 384m0 64a256 256 0 1 1 0-512 256 256 0 0 1 0 512m320 320v-96a96 96 0 0 0-96-96H288a96 96 0 0 0-96 96v96a32 32 0 1 1-64 0v-96a160 160 0 0 1 160-160h448a160 160 0 0 1 160 160v96a32 32 0 1 1-64 0"})]))}}),b8=G0,X0=z({name:"VideoPlay",__name:"video-play",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-48-247.616L668.608 512 464 375.616zm10.624-342.656 249.472 166.336a48 48 0 0 1 0 79.872L474.624 718.272A48 48 0 0 1 400 678.336V345.6a48 48 0 0 1 74.624-39.936z"})]))}}),w8=X0,Q0=z({name:"View",__name:"view",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),x8=Q0,Z0=z({name:"WarningFilled",__name:"warning-filled",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),k8=Z0,em=z({name:"ZoomIn",__name:"zoom-in",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),v8=em,tm=z({name:"ZoomOut",__name:"zoom-out",setup(t){return(e,n)=>(P(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[A("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"})]))}}),_8=tm,Re="top",Xe="bottom",Qe="right",ze="left",kl="auto",Qr=[Re,Xe,Qe,ze],Kn="start",Lr="end",nm="clippingParents",jc="viewport",gr="popper",rm="reference",ma=Qr.reduce(function(t,e){return t.concat([e+"-"+Kn,e+"-"+Lr])},[]),qc=[].concat(Qr,[kl]).reduce(function(t,e){return t.concat([e,e+"-"+Kn,e+"-"+Lr])},[]),im="beforeRead",om="read",sm="afterRead",lm="beforeMain",am="main",um="afterMain",cm="beforeWrite",fm="write",hm="afterWrite",pm=[im,om,sm,lm,am,um,cm,fm,hm];function gt(t){return t?(t.nodeName||"").toLowerCase():null}function ut(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Yn(t){var e=ut(t).Element;return t instanceof e||t instanceof Element}function Ke(t){var e=ut(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function vl(t){if(typeof ShadowRoot>"u")return!1;var e=ut(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function dm(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},o=e.elements[n];!Ke(o)||!gt(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var l=i[s];l===!1?o.removeAttribute(s):o.setAttribute(s,l===!0?"":l)}))})}function mm(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],o=e.attributes[r]||{},s=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),l=s.reduce(function(a,u){return a[u]="",a},{});!Ke(i)||!gt(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(a){i.removeAttribute(a)}))})}}var $c={name:"applyStyles",enabled:!0,phase:"write",fn:dm,effect:mm,requires:["computeStyles"]};function mt(t){return t.split("-")[0]}var gn=Math.max,qi=Math.min,Gn=Math.round;function Xn(t,e){e===void 0&&(e=!1);var n=t.getBoundingClientRect(),r=1,i=1;if(Ke(t)&&e){var o=t.offsetHeight,s=t.offsetWidth;s>0&&(r=Gn(n.width)/s||1),o>0&&(i=Gn(n.height)/o||1)}return{width:n.width/r,height:n.height/i,top:n.top/i,right:n.right/r,bottom:n.bottom/i,left:n.left/r,x:n.left/r,y:n.top/i}}function _l(t){var e=Xn(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function Wc(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&vl(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Tt(t){return ut(t).getComputedStyle(t)}function gm(t){return["table","td","th"].indexOf(gt(t))>=0}function Zt(t){return((Yn(t)?t.ownerDocument:t.document)||window.document).documentElement}function ho(t){return gt(t)==="html"?t:t.assignedSlot||t.parentNode||(vl(t)?t.host:null)||Zt(t)}function ga(t){return!Ke(t)||Tt(t).position==="fixed"?null:t.offsetParent}function ym(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&Ke(t)){var r=Tt(t);if(r.position==="fixed")return null}var i=ho(t);for(vl(i)&&(i=i.host);Ke(i)&&["html","body"].indexOf(gt(i))<0;){var o=Tt(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Zr(t){for(var e=ut(t),n=ga(t);n&&gm(n)&&Tt(n).position==="static";)n=ga(n);return n&&(gt(n)==="html"||gt(n)==="body"&&Tt(n).position==="static")?e:n||ym(t)||e}function Sl(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Cr(t,e,n){return gn(t,qi(e,n))}function bm(t,e,n){var r=Cr(t,e,n);return r>n?n:r}function Uc(){return{top:0,right:0,bottom:0,left:0}}function Jc(t){return Object.assign({},Uc(),t)}function Kc(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var wm=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,Jc(typeof t!="number"?t:Kc(t,Qr))};function xm(t){var e,n=t.state,r=t.name,i=t.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,l=mt(n.placement),a=Sl(l),u=[ze,Qe].indexOf(l)>=0,c=u?"height":"width";if(!(!o||!s)){var f=wm(i.padding,n),h=_l(o),p=a==="y"?Re:ze,d=a==="y"?Xe:Qe,m=n.rects.reference[c]+n.rects.reference[a]-s[a]-n.rects.popper[c],y=s[a]-n.rects.reference[a],g=Zr(o),_=g?a==="y"?g.clientHeight||0:g.clientWidth||0:0,x=m/2-y/2,S=f[p],O=_-h[c]-f[d],k=_/2-h[c]/2+x,I=Cr(S,k,O),B=a;n.modifiersData[r]=(e={},e[B]=I,e.centerOffset=I-k,e)}}function km(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||!Wc(e.elements.popper,i)||(e.elements.arrow=i))}var vm={name:"arrow",enabled:!0,phase:"main",fn:xm,effect:km,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Qn(t){return t.split("-")[1]}var _m={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Sm(t){var e=t.x,n=t.y,r=window,i=r.devicePixelRatio||1;return{x:Gn(e*i)/i||0,y:Gn(n*i)/i||0}}function ya(t){var e,n=t.popper,r=t.popperRect,i=t.placement,o=t.variation,s=t.offsets,l=t.position,a=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,f=t.isFixed,h=s.x,p=h===void 0?0:h,d=s.y,m=d===void 0?0:d,y=typeof c=="function"?c({x:p,y:m}):{x:p,y:m};p=y.x,m=y.y;var g=s.hasOwnProperty("x"),_=s.hasOwnProperty("y"),x=ze,S=Re,O=window;if(u){var k=Zr(n),I="clientHeight",B="clientWidth";if(k===ut(n)&&(k=Zt(n),Tt(k).position!=="static"&&l==="absolute"&&(I="scrollHeight",B="scrollWidth")),k=k,i===Re||(i===ze||i===Qe)&&o===Lr){S=Xe;var E=f&&k===O&&O.visualViewport?O.visualViewport.height:k[I];m-=E-r.height,m*=a?1:-1}if(i===ze||(i===Re||i===Xe)&&o===Lr){x=Qe;var v=f&&k===O&&O.visualViewport?O.visualViewport.width:k[B];p-=v-r.width,p*=a?1:-1}}var T=Object.assign({position:l},u&&_m),D=c===!0?Sm({x:p,y:m}):{x:p,y:m};if(p=D.x,m=D.y,a){var L;return Object.assign({},T,(L={},L[S]=_?"0":"",L[x]=g?"0":"",L.transform=(O.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",L))}return Object.assign({},T,(e={},e[S]=_?m+"px":"",e[x]=g?p+"px":"",e.transform="",e))}function Cm(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,l=n.roundOffsets,a=l===void 0?!0:l,u={placement:mt(e.placement),variation:Qn(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,ya(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:a})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,ya(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var Yc={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Cm,data:{}},mi={passive:!0};function Om(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,l=s===void 0?!0:s,a=ut(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",n.update,mi)}),l&&a.addEventListener("resize",n.update,mi),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",n.update,mi)}),l&&a.removeEventListener("resize",n.update,mi)}}var Gc={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Om,data:{}},Am={left:"right",right:"left",bottom:"top",top:"bottom"};function Ti(t){return t.replace(/left|right|bottom|top/g,function(e){return Am[e]})}var Em={start:"end",end:"start"};function ba(t){return t.replace(/start|end/g,function(e){return Em[e]})}function Cl(t){var e=ut(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Ol(t){return Xn(Zt(t)).left+Cl(t).scrollLeft}function Mm(t){var e=ut(t),n=Zt(t),r=e.visualViewport,i=n.clientWidth,o=n.clientHeight,s=0,l=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=r.offsetLeft,l=r.offsetTop)),{width:i,height:o,x:s+Ol(t),y:l}}function Tm(t){var e,n=Zt(t),r=Cl(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=gn(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=gn(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+Ol(t),a=-r.scrollTop;return Tt(i||n).direction==="rtl"&&(l+=gn(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:l,y:a}}function Al(t){var e=Tt(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Xc(t){return["html","body","#document"].indexOf(gt(t))>=0?t.ownerDocument.body:Ke(t)&&Al(t)?t:Xc(ho(t))}function Or(t,e){var n;e===void 0&&(e=[]);var r=Xc(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),o=ut(r),s=i?[o].concat(o.visualViewport||[],Al(r)?r:[]):r,l=e.concat(s);return i?l:l.concat(Or(ho(s)))}function xs(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Nm(t){var e=Xn(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function wa(t,e){return e===jc?xs(Mm(t)):Yn(e)?Nm(e):xs(Tm(Zt(t)))}function Dm(t){var e=Or(ho(t)),n=["absolute","fixed"].indexOf(Tt(t).position)>=0,r=n&&Ke(t)?Zr(t):t;return Yn(r)?e.filter(function(i){return Yn(i)&&Wc(i,r)&>(i)!=="body"}):[]}function Im(t,e,n){var r=e==="clippingParents"?Dm(t):[].concat(e),i=[].concat(r,[n]),o=i[0],s=i.reduce(function(l,a){var u=wa(t,a);return l.top=gn(u.top,l.top),l.right=qi(u.right,l.right),l.bottom=qi(u.bottom,l.bottom),l.left=gn(u.left,l.left),l},wa(t,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Qc(t){var e=t.reference,n=t.element,r=t.placement,i=r?mt(r):null,o=r?Qn(r):null,s=e.x+e.width/2-n.width/2,l=e.y+e.height/2-n.height/2,a;switch(i){case Re:a={x:s,y:e.y-n.height};break;case Xe:a={x:s,y:e.y+e.height};break;case Qe:a={x:e.x+e.width,y:l};break;case ze:a={x:e.x-n.width,y:l};break;default:a={x:e.x,y:e.y}}var u=i?Sl(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case Kn:a[u]=a[u]-(e[c]/2-n[c]/2);break;case Lr:a[u]=a[u]+(e[c]/2-n[c]/2);break}}return a}function Vr(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,o=n.boundary,s=o===void 0?nm:o,l=n.rootBoundary,a=l===void 0?jc:l,u=n.elementContext,c=u===void 0?gr:u,f=n.altBoundary,h=f===void 0?!1:f,p=n.padding,d=p===void 0?0:p,m=Jc(typeof d!="number"?d:Kc(d,Qr)),y=c===gr?rm:gr,g=t.rects.popper,_=t.elements[h?y:c],x=Im(Yn(_)?_:_.contextElement||Zt(t.elements.popper),s,a),S=Xn(t.elements.reference),O=Qc({reference:S,element:g,strategy:"absolute",placement:i}),k=xs(Object.assign({},g,O)),I=c===gr?k:S,B={top:x.top-I.top+m.top,bottom:I.bottom-x.bottom+m.bottom,left:x.left-I.left+m.left,right:I.right-x.right+m.right},E=t.modifiersData.offset;if(c===gr&&E){var v=E[i];Object.keys(B).forEach(function(T){var D=[Qe,Xe].indexOf(T)>=0?1:-1,L=[Re,Xe].indexOf(T)>=0?"y":"x";B[T]+=v[L]*D})}return B}function Rm(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,l=n.flipVariations,a=n.allowedAutoPlacements,u=a===void 0?qc:a,c=Qn(r),f=c?l?ma:ma.filter(function(d){return Qn(d)===c}):Qr,h=f.filter(function(d){return u.indexOf(d)>=0});h.length===0&&(h=f);var p=h.reduce(function(d,m){return d[m]=Vr(t,{placement:m,boundary:i,rootBoundary:o,padding:s})[mt(m)],d},{});return Object.keys(p).sort(function(d,m){return p[d]-p[m]})}function zm(t){if(mt(t)===kl)return[];var e=Ti(t);return[ba(t),e,ba(e)]}function Pm(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!0:s,a=n.fallbackPlacements,u=n.padding,c=n.boundary,f=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,d=p===void 0?!0:p,m=n.allowedAutoPlacements,y=e.options.placement,g=mt(y),_=g===y,x=a||(_||!d?[Ti(y)]:zm(y)),S=[y].concat(x).reduce(function(ae,he){return ae.concat(mt(he)===kl?Rm(e,{placement:he,boundary:c,rootBoundary:f,padding:u,flipVariations:d,allowedAutoPlacements:m}):he)},[]),O=e.rects.reference,k=e.rects.popper,I=new Map,B=!0,E=S[0],v=0;v<S.length;v++){var T=S[v],D=mt(T),L=Qn(T)===Kn,W=[Re,Xe].indexOf(D)>=0,q=W?"width":"height",J=Vr(e,{placement:T,boundary:c,rootBoundary:f,altBoundary:h,padding:u}),K=W?L?Qe:ze:L?Xe:Re;O[q]>k[q]&&(K=Ti(K));var re=Ti(K),ne=[];if(o&&ne.push(J[D]<=0),l&&ne.push(J[K]<=0,J[re]<=0),ne.every(function(ae){return ae})){E=T,B=!1;break}I.set(T,ne)}if(B)for(var b=d?3:1,ve=function(ae){var he=S.find(function(ie){var et=I.get(ie);if(et)return et.slice(0,ae).every(function(Se){return Se})});if(he)return E=he,"break"},_e=b;_e>0;_e--){var w=ve(_e);if(w==="break")break}e.placement!==E&&(e.modifiersData[r]._skip=!0,e.placement=E,e.reset=!0)}}var Fm={name:"flip",enabled:!0,phase:"main",fn:Pm,requiresIfExists:["offset"],data:{_skip:!1}};function xa(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function ka(t){return[Re,Qe,Xe,ze].some(function(e){return t[e]>=0})}function Bm(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,s=Vr(e,{elementContext:"reference"}),l=Vr(e,{altBoundary:!0}),a=xa(s,r),u=xa(l,i,o),c=ka(a),f=ka(u);e.modifiersData[n]={referenceClippingOffsets:a,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":f})}var Lm={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Bm};function Vm(t,e,n){var r=mt(t),i=[ze,Re].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,s=o[0],l=o[1];return s=s||0,l=(l||0)*i,[ze,Qe].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function Hm(t){var e=t.state,n=t.options,r=t.name,i=n.offset,o=i===void 0?[0,0]:i,s=qc.reduce(function(c,f){return c[f]=Vm(f,e.rects,o),c},{}),l=s[e.placement],a=l.x,u=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=a,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=s}var jm={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Hm};function qm(t){var e=t.state,n=t.name;e.modifiersData[n]=Qc({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var Zc={name:"popperOffsets",enabled:!0,phase:"read",fn:qm,data:{}};function $m(t){return t==="x"?"y":"x"}function Wm(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!1:s,a=n.boundary,u=n.rootBoundary,c=n.altBoundary,f=n.padding,h=n.tether,p=h===void 0?!0:h,d=n.tetherOffset,m=d===void 0?0:d,y=Vr(e,{boundary:a,rootBoundary:u,padding:f,altBoundary:c}),g=mt(e.placement),_=Qn(e.placement),x=!_,S=Sl(g),O=$m(S),k=e.modifiersData.popperOffsets,I=e.rects.reference,B=e.rects.popper,E=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,v=typeof E=="number"?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),T=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,D={x:0,y:0};if(k){if(o){var L,W=S==="y"?Re:ze,q=S==="y"?Xe:Qe,J=S==="y"?"height":"width",K=k[S],re=K+y[W],ne=K-y[q],b=p?-B[J]/2:0,ve=_===Kn?I[J]:B[J],_e=_===Kn?-B[J]:-I[J],w=e.elements.arrow,ae=p&&w?_l(w):{width:0,height:0},he=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Uc(),ie=he[W],et=he[q],Se=Cr(0,I[J],ae[J]),It=x?I[J]/2-b-Se-ie-v.mainAxis:ve-Se-ie-v.mainAxis,Rt=x?-I[J]/2+b+Se+et+v.mainAxis:_e+Se+et+v.mainAxis,zt=e.elements.arrow&&Zr(e.elements.arrow),No=zt?S==="y"?zt.clientTop||0:zt.clientLeft||0:0,ui=(L=T==null?void 0:T[S])!=null?L:0,Do=K+It-ui-No,ci=K+Rt-ui,fr=Cr(p?qi(re,Do):re,K,p?gn(ne,ci):ne);k[S]=fr,D[S]=fr-K}if(l){var hr,Io=S==="x"?Re:ze,fi=S==="x"?Xe:Qe,ct=k[O],En=O==="y"?"height":"width",hi=ct+y[Io],pi=ct-y[fi],pr=[Re,ze].indexOf(g)!==-1,di=(hr=T==null?void 0:T[O])!=null?hr:0,C=pr?hi:ct-I[En]-B[En]-di+v.altAxis,N=pr?ct+I[En]+B[En]-di-v.altAxis:pi,H=p&&pr?bm(C,ct,N):Cr(p?C:hi,ct,p?N:pi);k[O]=H,D[O]=H-ct}e.modifiersData[r]=D}}var Um={name:"preventOverflow",enabled:!0,phase:"main",fn:Wm,requiresIfExists:["offset"]};function Jm(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Km(t){return t===ut(t)||!Ke(t)?Cl(t):Jm(t)}function Ym(t){var e=t.getBoundingClientRect(),n=Gn(e.width)/t.offsetWidth||1,r=Gn(e.height)/t.offsetHeight||1;return n!==1||r!==1}function Gm(t,e,n){n===void 0&&(n=!1);var r=Ke(e),i=Ke(e)&&Ym(e),o=Zt(e),s=Xn(t,i),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(r||!r&&!n)&&((gt(e)!=="body"||Al(o))&&(l=Km(e)),Ke(e)?(a=Xn(e,!0),a.x+=e.clientLeft,a.y+=e.clientTop):o&&(a.x=Ol(o))),{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function Xm(t){var e=new Map,n=new Set,r=[];t.forEach(function(o){e.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!n.has(l)){var a=e.get(l);a&&i(a)}}),r.push(o)}return t.forEach(function(o){n.has(o.name)||i(o)}),r}function Qm(t){var e=Xm(t);return pm.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function Zm(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function e1(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var va={placement:"bottom",modifiers:[],strategy:"absolute"};function _a(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function El(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,i=e.defaultOptions,o=i===void 0?va:i;return function(s,l,a){a===void 0&&(a=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},va,o),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},c=[],f=!1,h={state:u,setOptions:function(m){var y=typeof m=="function"?m(u.options):m;d(),u.options=Object.assign({},o,u.options,y),u.scrollParents={reference:Yn(s)?Or(s):s.contextElement?Or(s.contextElement):[],popper:Or(l)};var g=Qm(e1([].concat(r,u.options.modifiers)));return u.orderedModifiers=g.filter(function(_){return _.enabled}),p(),h.update()},forceUpdate:function(){if(!f){var m=u.elements,y=m.reference,g=m.popper;if(_a(y,g)){u.rects={reference:Gm(y,Zr(g),u.options.strategy==="fixed"),popper:_l(g)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(B){return u.modifiersData[B.name]=Object.assign({},B.data)});for(var _=0;_<u.orderedModifiers.length;_++){if(u.reset===!0){u.reset=!1,_=-1;continue}var x=u.orderedModifiers[_],S=x.fn,O=x.options,k=O===void 0?{}:O,I=x.name;typeof S=="function"&&(u=S({state:u,options:k,name:I,instance:h})||u)}}}},update:Zm(function(){return new Promise(function(m){h.forceUpdate(),m(u)})}),destroy:function(){d(),f=!0}};if(!_a(s,l))return h;h.setOptions(a).then(function(m){!f&&a.onFirstUpdate&&a.onFirstUpdate(m)});function p(){u.orderedModifiers.forEach(function(m){var y=m.name,g=m.options,_=g===void 0?{}:g,x=m.effect;if(typeof x=="function"){var S=x({state:u,name:y,instance:h,options:_}),O=function(){};c.push(S||O)}})}function d(){c.forEach(function(m){return m()}),c=[]}return h}}El();var t1=[Gc,Zc,Yc,$c];El({defaultModifiers:t1});var n1=[Gc,Zc,Yc,$c,jm,Fm,Um,vm,Lm],S8=El({defaultModifiers:n1});const Sa=Math.min,Ar=Math.max,$i=Math.round,Gt=t=>({x:t,y:t}),r1={left:"right",right:"left",bottom:"top",top:"bottom"},i1={start:"end",end:"start"};function Ml(t,e){return typeof t=="function"?t(e):t}function Zn(t){return t.split("-")[0]}function po(t){return t.split("-")[1]}function o1(t){return t==="x"?"y":"x"}function ef(t){return t==="y"?"height":"width"}function Hr(t){return["top","bottom"].includes(Zn(t))?"y":"x"}function tf(t){return o1(Hr(t))}function s1(t,e,n){n===void 0&&(n=!1);const r=po(t),i=tf(t),o=ef(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=Wi(s)),[s,Wi(s)]}function l1(t){const e=Wi(t);return[ks(t),e,ks(e)]}function ks(t){return t.replace(/start|end/g,e=>i1[e])}function a1(t,e,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?o:s;default:return[]}}function u1(t,e,n,r){const i=po(t);let o=a1(Zn(t),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),e&&(o=o.concat(o.map(ks)))),o}function Wi(t){return t.replace(/left|right|bottom|top/g,e=>r1[e])}function c1(t){return{top:0,right:0,bottom:0,left:0,...t}}function f1(t){return typeof t!="number"?c1(t):{top:t,right:t,bottom:t,left:t}}function Ui(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function Ca(t,e,n){let{reference:r,floating:i}=t;const o=Hr(e),s=tf(e),l=ef(s),a=Zn(e),u=o==="y",c=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,h=r[l]/2-i[l]/2;let p;switch(a){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(po(e)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1);break}return p}const h1=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,l=o.filter(Boolean),a=await(s.isRTL==null?void 0:s.isRTL(e));let u=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:f}=Ca(u,r,a),h=r,p={},d=0;for(let m=0;m<l.length;m++){const{name:y,fn:g}=l[m],{x:_,y:x,data:S,reset:O}=await g({x:c,y:f,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:u,platform:s,elements:{reference:t,floating:e}});c=_??c,f=x??f,p={...p,[y]:{...p[y],...S}},O&&d<=50&&(d++,typeof O=="object"&&(O.placement&&(h=O.placement),O.rects&&(u=O.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):O.rects),{x:c,y:f}=Ca(u,h,a)),m=-1)}return{x:c,y:f,placement:h,strategy:i,middlewareData:p}};async function p1(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:o,rects:s,elements:l,strategy:a}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Ml(e,t),d=f1(p),y=l[h?f==="floating"?"reference":"floating":f],g=Ui(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(y)))==null||n?y:y.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:u,rootBoundary:c,strategy:a})),_=f==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,x=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),S=await(o.isElement==null?void 0:o.isElement(x))?await(o.getScale==null?void 0:o.getScale(x))||{x:1,y:1}:{x:1,y:1},O=Ui(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:_,offsetParent:x,strategy:a}):_);return{top:(g.top-O.top+d.top)/S.y,bottom:(O.bottom-g.bottom+d.bottom)/S.y,left:(g.left-O.left+d.left)/S.x,right:(O.right-g.right+d.right)/S.x}}const d1=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:l,platform:a,elements:u}=e,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:m=!0,...y}=Ml(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const g=Zn(i),_=Hr(l),x=Zn(l)===l,S=await(a.isRTL==null?void 0:a.isRTL(u.floating)),O=h||(x||!m?[Wi(l)]:l1(l)),k=d!=="none";!h&&k&&O.push(...u1(l,m,d,S));const I=[l,...O],B=await p1(e,y),E=[];let v=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&E.push(B[g]),f){const W=s1(i,s,S);E.push(B[W[0]],B[W[1]])}if(v=[...v,{placement:i,overflows:E}],!E.every(W=>W<=0)){var T,D;const W=(((T=o.flip)==null?void 0:T.index)||0)+1,q=I[W];if(q)return{data:{index:W,overflows:v},reset:{placement:q}};let J=(D=v.filter(K=>K.overflows[0]<=0).sort((K,re)=>K.overflows[1]-re.overflows[1])[0])==null?void 0:D.placement;if(!J)switch(p){case"bestFit":{var L;const K=(L=v.filter(re=>{if(k){const ne=Hr(re.placement);return ne===_||ne==="y"}return!0}).map(re=>[re.placement,re.overflows.filter(ne=>ne>0).reduce((ne,b)=>ne+b,0)]).sort((re,ne)=>re[1]-ne[1])[0])==null?void 0:L[0];K&&(J=K);break}case"initialPlacement":J=l;break}if(i!==J)return{reset:{placement:J}}}return{}}}};async function m1(t,e){const{placement:n,platform:r,elements:i}=t,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=Zn(n),l=po(n),a=Hr(n)==="y",u=["left","top"].includes(s)?-1:1,c=o&&a?-1:1,f=Ml(e,t);let{mainAxis:h,crossAxis:p,alignmentAxis:d}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return l&&typeof d=="number"&&(p=l==="end"?d*-1:d),a?{x:p*c,y:h*u}:{x:h*u,y:p*c}}const g1=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:o,placement:s,middlewareData:l}=e,a=await m1(e,t);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+a.x,y:o+a.y,data:{...a,placement:s}}}}};function sr(t){return nf(t)?(t.nodeName||"").toLowerCase():"#document"}function je(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function en(t){var e;return(e=(nf(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function nf(t){return t instanceof Node||t instanceof je(t).Node}function st(t){return t instanceof Element||t instanceof je(t).Element}function yt(t){return t instanceof HTMLElement||t instanceof je(t).HTMLElement}function Oa(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof je(t).ShadowRoot}function ei(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=lt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function y1(t){return["table","td","th"].includes(sr(t))}function mo(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Tl(t){const e=Nl(),n=st(t)?lt(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function b1(t){let e=Xt(t);for(;yt(e)&&!er(e);){if(Tl(e))return e;if(mo(e))return null;e=Xt(e)}return null}function Nl(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function er(t){return["html","body","#document"].includes(sr(t))}function lt(t){return je(t).getComputedStyle(t)}function go(t){return st(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Xt(t){if(sr(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Oa(t)&&t.host||en(t);return Oa(e)?e.host:e}function rf(t){const e=Xt(t);return er(e)?t.ownerDocument?t.ownerDocument.body:t.body:yt(e)&&ei(e)?e:rf(e)}function vs(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=rf(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),s=je(i);if(o){const l=_s(s);return e.concat(s,s.visualViewport||[],ei(i)?i:[],l&&n?vs(l):[])}return e.concat(i,vs(i,[],n))}function _s(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function of(t){const e=lt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=yt(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,l=$i(n)!==o||$i(r)!==s;return l&&(n=o,r=s),{width:n,height:r,$:l}}function sf(t){return st(t)?t:t.contextElement}function Vn(t){const e=sf(t);if(!yt(e))return Gt(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=of(e);let s=(o?$i(n.width):n.width)/r,l=(o?$i(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const w1=Gt(0);function lf(t){const e=je(t);return!Nl()||!e.visualViewport?w1:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function x1(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==je(t)?!1:e}function jr(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=sf(t);let s=Gt(1);e&&(r?st(r)&&(s=Vn(r)):s=Vn(t));const l=x1(o,n,r)?lf(o):Gt(0);let a=(i.left+l.x)/s.x,u=(i.top+l.y)/s.y,c=i.width/s.x,f=i.height/s.y;if(o){const h=je(o),p=r&&st(r)?je(r):r;let d=h,m=_s(d);for(;m&&r&&p!==d;){const y=Vn(m),g=m.getBoundingClientRect(),_=lt(m),x=g.left+(m.clientLeft+parseFloat(_.paddingLeft))*y.x,S=g.top+(m.clientTop+parseFloat(_.paddingTop))*y.y;a*=y.x,u*=y.y,c*=y.x,f*=y.y,a+=x,u+=S,d=je(m),m=_s(d)}}return Ui({width:c,height:f,x:a,y:u})}function k1(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o=i==="fixed",s=en(r),l=e?mo(e.floating):!1;if(r===s||l&&o)return n;let a={scrollLeft:0,scrollTop:0},u=Gt(1);const c=Gt(0),f=yt(r);if((f||!f&&!o)&&((sr(r)!=="body"||ei(s))&&(a=go(r)),yt(r))){const h=jr(r);u=Vn(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+c.x,y:n.y*u.y-a.scrollTop*u.y+c.y}}function v1(t){return Array.from(t.getClientRects())}function af(t){return jr(en(t)).left+go(t).scrollLeft}function _1(t){const e=en(t),n=go(t),r=t.ownerDocument.body,i=Ar(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=Ar(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+af(t);const l=-n.scrollTop;return lt(r).direction==="rtl"&&(s+=Ar(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:l}}function S1(t,e){const n=je(t),r=en(t),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,l=0,a=0;if(i){o=i.width,s=i.height;const u=Nl();(!u||u&&e==="fixed")&&(l=i.offsetLeft,a=i.offsetTop)}return{width:o,height:s,x:l,y:a}}function C1(t,e){const n=jr(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=yt(t)?Vn(t):Gt(1),s=t.clientWidth*o.x,l=t.clientHeight*o.y,a=i*o.x,u=r*o.y;return{width:s,height:l,x:a,y:u}}function Aa(t,e,n){let r;if(e==="viewport")r=S1(t,n);else if(e==="document")r=_1(en(t));else if(st(e))r=C1(e,n);else{const i=lf(t);r={...e,x:e.x-i.x,y:e.y-i.y}}return Ui(r)}function uf(t,e){const n=Xt(t);return n===e||!st(n)||er(n)?!1:lt(n).position==="fixed"||uf(n,e)}function O1(t,e){const n=e.get(t);if(n)return n;let r=vs(t,[],!1).filter(l=>st(l)&&sr(l)!=="body"),i=null;const o=lt(t).position==="fixed";let s=o?Xt(t):t;for(;st(s)&&!er(s);){const l=lt(s),a=Tl(s);!a&&l.position==="fixed"&&(i=null),(o?!a&&!i:!a&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||ei(s)&&!a&&uf(t,s))?r=r.filter(c=>c!==s):i=l,s=Xt(s)}return e.set(t,r),r}function A1(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const s=[...n==="clippingAncestors"?mo(e)?[]:O1(e,this._c):[].concat(n),r],l=s[0],a=s.reduce((u,c)=>{const f=Aa(e,c,i);return u.top=Ar(f.top,u.top),u.right=Sa(f.right,u.right),u.bottom=Sa(f.bottom,u.bottom),u.left=Ar(f.left,u.left),u},Aa(e,l,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function E1(t){const{width:e,height:n}=of(t);return{width:e,height:n}}function M1(t,e,n){const r=yt(e),i=en(e),o=n==="fixed",s=jr(t,!0,o,e);let l={scrollLeft:0,scrollTop:0};const a=Gt(0);if(r||!r&&!o)if((sr(e)!=="body"||ei(i))&&(l=go(e)),r){const f=jr(e,!0,o,e);a.x=f.x+e.clientLeft,a.y=f.y+e.clientTop}else i&&(a.x=af(i));const u=s.left+l.scrollLeft-a.x,c=s.top+l.scrollTop-a.y;return{x:u,y:c,width:s.width,height:s.height}}function Po(t){return lt(t).position==="static"}function Ea(t,e){return!yt(t)||lt(t).position==="fixed"?null:e?e(t):t.offsetParent}function cf(t,e){const n=je(t);if(mo(t))return n;if(!yt(t)){let i=Xt(t);for(;i&&!er(i);){if(st(i)&&!Po(i))return i;i=Xt(i)}return n}let r=Ea(t,e);for(;r&&y1(r)&&Po(r);)r=Ea(r,e);return r&&er(r)&&Po(r)&&!Tl(r)?n:r||b1(t)||n}const T1=async function(t){const e=this.getOffsetParent||cf,n=this.getDimensions,r=await n(t.floating);return{reference:M1(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function N1(t){return lt(t).direction==="rtl"}const D1={convertOffsetParentRelativeRectToViewportRelativeRect:k1,getDocumentElement:en,getClippingRect:A1,getOffsetParent:cf,getElementRects:T1,getClientRects:v1,getDimensions:E1,getScale:Vn,isElement:st,isRTL:N1},C8=g1,O8=d1,A8=(t,e,n)=>{const r=new Map,i={platform:D1,...n},o={...i.platform,_c:r};return h1(t,e,{...i,platform:o})};function fn(){return fn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},fn.apply(this,arguments)}function I1(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,qr(t,e)}function Ss(t){return Ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ss(t)}function qr(t,e){return qr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},qr(t,e)}function R1(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ni(t,e,n){return R1()?Ni=Reflect.construct.bind():Ni=function(i,o,s){var l=[null];l.push.apply(l,o);var a=Function.bind.apply(i,l),u=new a;return s&&qr(u,s.prototype),u},Ni.apply(null,arguments)}function z1(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Cs(t){var e=typeof Map=="function"?new Map:void 0;return Cs=function(r){if(r===null||!z1(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(r))return e.get(r);e.set(r,i)}function i(){return Ni(r,arguments,Ss(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),qr(i,r)},Cs(t)}var P1=/%[sdj%]/g,F1=function(){};typeof process<"u"&&process.env;function Os(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var r=n.field;e[r]=e[r]||[],e[r].push(n)}),e}function He(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=0,o=n.length;if(typeof t=="function")return t.apply(null,n);if(typeof t=="string"){var s=t.replace(P1,function(l){if(l==="%%")return"%";if(i>=o)return l;switch(l){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}break;default:return l}});return s}return t}function B1(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function ce(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||B1(e)&&typeof t=="string"&&!t)}function L1(t,e,n){var r=[],i=0,o=t.length;function s(l){r.push.apply(r,l||[]),i++,i===o&&n(r)}t.forEach(function(l){e(l,s)})}function Ma(t,e,n){var r=0,i=t.length;function o(s){if(s&&s.length){n(s);return}var l=r;r=r+1,l<i?e(t[l],o):n([])}o([])}function V1(t){var e=[];return Object.keys(t).forEach(function(n){e.push.apply(e,t[n]||[])}),e}var Ta=function(t){I1(e,t);function e(n,r){var i;return i=t.call(this,"Async Validation Error")||this,i.errors=n,i.fields=r,i}return e}(Cs(Error));function H1(t,e,n,r,i){if(e.first){var o=new Promise(function(h,p){var d=function(g){return r(g),g.length?p(new Ta(g,Os(g))):h(i)},m=V1(t);Ma(m,n,d)});return o.catch(function(h){return h}),o}var s=e.firstFields===!0?Object.keys(t):e.firstFields||[],l=Object.keys(t),a=l.length,u=0,c=[],f=new Promise(function(h,p){var d=function(y){if(c.push.apply(c,y),u++,u===a)return r(c),c.length?p(new Ta(c,Os(c))):h(i)};l.length||(r(c),h(i)),l.forEach(function(m){var y=t[m];s.indexOf(m)!==-1?Ma(y,n,d):L1(y,n,d)})});return f.catch(function(h){return h}),f}function j1(t){return!!(t&&t.message!==void 0)}function q1(t,e){for(var n=t,r=0;r<e.length;r++){if(n==null)return n;n=n[e[r]]}return n}function Na(t,e){return function(n){var r;return t.fullFields?r=q1(e,t.fullFields):r=e[n.field||t.fullField],j1(n)?(n.field=n.field||t.fullField,n.fieldValue=r,n):{message:typeof n=="function"?n():n,fieldValue:r,field:n.field||t.fullField}}}function Da(t,e){if(e){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];typeof r=="object"&&typeof t[n]=="object"?t[n]=fn({},t[n],r):t[n]=r}}return t}var ff=function(e,n,r,i,o,s){e.required&&(!r.hasOwnProperty(e.field)||ce(n,s||e.type))&&i.push(He(o.messages.required,e.fullField))},$1=function(e,n,r,i,o){(/^\s+$/.test(n)||n==="")&&i.push(He(o.messages.whitespace,e.fullField))},gi,W1=function(){if(gi)return gi;var t="[a-fA-F\\d:]",e=function(S){return S&&S.includeBoundaries?"(?:(?<=\\s|^)(?="+t+")|(?<="+t+")(?=\\s|$))":""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",i=(` |
| 2 |
(?: |
| 3 |
(?:`+r+":){7}(?:"+r+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 |
| 4 |
(?:`+r+":){6}(?:"+n+"|:"+r+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4 |
| 5 |
(?:`+r+":){5}(?::"+n+"|(?::"+r+`){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4 |
| 6 |
(?:`+r+":){4}(?:(?::"+r+"){0,1}:"+n+"|(?::"+r+`){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4 |
| 7 |
(?:`+r+":){3}(?:(?::"+r+"){0,2}:"+n+"|(?::"+r+`){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4 |
| 8 |
(?:`+r+":){2}(?:(?::"+r+"){0,3}:"+n+"|(?::"+r+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4 |
| 9 |
(?:`+r+":){1}(?:(?::"+r+"){0,4}:"+n+"|(?::"+r+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 |
| 10 |
(?::(?:(?::`+r+"){0,5}:"+n+"|(?::"+r+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4 |
| 11 |
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1 |
| 12 |
`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),o=new RegExp("(?:^"+n+"$)|(?:^"+i+"$)"),s=new RegExp("^"+n+"$"),l=new RegExp("^"+i+"$"),a=function(S){return S&&S.exact?o:new RegExp("(?:"+e(S)+n+e(S)+")|(?:"+e(S)+i+e(S)+")","g")};a.v4=function(x){return x&&x.exact?s:new RegExp(""+e(x)+n+e(x),"g")},a.v6=function(x){return x&&x.exact?l:new RegExp(""+e(x)+i+e(x),"g")};var u="(?:(?:[a-z]+:)?//)",c="(?:\\S+(?::\\S*)?@)?",f=a.v4().source,h=a.v6().source,p="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",d="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",m="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",y="(?::\\d{2,5})?",g='(?:[/?#][^\\s"]*)?',_="(?:"+u+"|www\\.)"+c+"(?:localhost|"+f+"|"+h+"|"+p+d+m+")"+y+g;return gi=new RegExp("(?:^"+_+"$)","i"),gi},Ia={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},wr={integer:function(e){return wr.number(e)&&parseInt(e,10)===e},float:function(e){return wr.number(e)&&!wr.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return typeof e=="object"&&!wr.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(Ia.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(W1())},hex:function(e){return typeof e=="string"&&!!e.match(Ia.hex)}},U1=function(e,n,r,i,o){if(e.required&&n===void 0){ff(e,n,r,i,o);return}var s=["integer","float","array","regexp","object","method","email","number","date","url","hex"],l=e.type;s.indexOf(l)>-1?wr[l](n)||i.push(He(o.messages.types[l],e.fullField,e.type)):l&&typeof n!==e.type&&i.push(He(o.messages.types[l],e.fullField,e.type))},J1=function(e,n,r,i,o){var s=typeof e.len=="number",l=typeof e.min=="number",a=typeof e.max=="number",u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=n,f=null,h=typeof n=="number",p=typeof n=="string",d=Array.isArray(n);if(h?f="number":p?f="string":d&&(f="array"),!f)return!1;d&&(c=n.length),p&&(c=n.replace(u,"_").length),s?c!==e.len&&i.push(He(o.messages[f].len,e.fullField,e.len)):l&&!a&&c<e.min?i.push(He(o.messages[f].min,e.fullField,e.min)):a&&!l&&c>e.max?i.push(He(o.messages[f].max,e.fullField,e.max)):l&&a&&(c<e.min||c>e.max)&&i.push(He(o.messages[f].range,e.fullField,e.min,e.max))},Nn="enum",K1=function(e,n,r,i,o){e[Nn]=Array.isArray(e[Nn])?e[Nn]:[],e[Nn].indexOf(n)===-1&&i.push(He(o.messages[Nn],e.fullField,e[Nn].join(", ")))},Y1=function(e,n,r,i,o){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||i.push(He(o.messages.pattern.mismatch,e.fullField,n,e.pattern));else if(typeof e.pattern=="string"){var s=new RegExp(e.pattern);s.test(n)||i.push(He(o.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},Y={required:ff,whitespace:$1,type:U1,range:J1,enum:K1,pattern:Y1},G1=function(e,n,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(ce(n,"string")&&!e.required)return r();Y.required(e,n,i,s,o,"string"),ce(n,"string")||(Y.type(e,n,i,s,o),Y.range(e,n,i,s,o),Y.pattern(e,n,i,s,o),e.whitespace===!0&&Y.whitespace(e,n,i,s,o))}r(s)},X1=function(e,n,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(ce(n)&&!e.required)return r();Y.required(e,n,i,s,o),n!==void 0&&Y.type(e,n,i,s,o)}r(s)},Q1=function(e,n,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(n===""&&(n=void 0),ce(n)&&!e.required)return r();Y.required(e,n,i,s,o),n!==void 0&&(Y.type(e,n,i,s,o),Y.range(e,n,i,s,o))}r(s)},Z1=function(e,n,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(ce(n)&&!e.required)return r();Y.required(e,n,i,s,o),n!==void 0&&Y.type(e,n,i,s,o)}r(s)},eg=function(e,n,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(ce(n)&&!e.required)return r();Y.required(e,n,i,s,o),ce(n)||Y.type(e,n,i,s,o)}r(s)},tg=function(e,n,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(ce(n)&&!e.required)return r();Y.required(e,n,i,s,o),n!==void 0&&(Y.type(e,n,i,s,o),Y.range(e,n,i,s,o))}r(s)},ng=function(e,n,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(ce(n)&&!e.required)return r();Y.required(e,n,i,s,o),n!==void 0&&(Y.type(e,n,i,s,o),Y.range(e,n,i,s,o))}r(s)},rg=function(e,n,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(n==null&&!e.required)return r();Y.required(e,n,i,s,o,"array"),n!=null&&(Y.type(e,n,i,s,o),Y.range(e,n,i,s,o))}r(s)},ig=function(e,n,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(ce(n)&&!e.required)return r();Y.required(e,n,i,s,o),n!==void 0&&Y.type(e,n,i,s,o)}r(s)},og="enum",sg=function(e,n,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(ce(n)&&!e.required)return r();Y.required(e,n,i,s,o),n!==void 0&&Y[og](e,n,i,s,o)}r(s)},lg=function(e,n,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(ce(n,"string")&&!e.required)return r();Y.required(e,n,i,s,o),ce(n,"string")||Y.pattern(e,n,i,s,o)}r(s)},ag=function(e,n,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(ce(n,"date")&&!e.required)return r();if(Y.required(e,n,i,s,o),!ce(n,"date")){var a;n instanceof Date?a=n:a=new Date(n),Y.type(e,a,i,s,o),a&&Y.range(e,a.getTime(),i,s,o)}}r(s)},ug=function(e,n,r,i,o){var s=[],l=Array.isArray(n)?"array":typeof n;Y.required(e,n,i,s,o,l),r(s)},Fo=function(e,n,r,i,o){var s=e.type,l=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(ce(n,s)&&!e.required)return r();Y.required(e,n,i,l,o,s),ce(n,s)||Y.type(e,n,i,l,o)}r(l)},cg=function(e,n,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(ce(n)&&!e.required)return r();Y.required(e,n,i,s,o)}r(s)},Er={string:G1,method:X1,number:Q1,boolean:Z1,regexp:eg,integer:tg,float:ng,array:rg,object:ig,enum:sg,pattern:lg,date:ag,url:Fo,hex:Fo,email:Fo,required:ug,any:cg};function As(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var Es=As(),yo=function(){function t(n){this.rules=null,this._messages=Es,this.define(n)}var e=t.prototype;return e.define=function(r){var i=this;if(!r)throw new Error("Cannot configure a schema with no rules");if(typeof r!="object"||Array.isArray(r))throw new Error("Rules must be an object");this.rules={},Object.keys(r).forEach(function(o){var s=r[o];i.rules[o]=Array.isArray(s)?s:[s]})},e.messages=function(r){return r&&(this._messages=Da(As(),r)),this._messages},e.validate=function(r,i,o){var s=this;i===void 0&&(i={}),o===void 0&&(o=function(){});var l=r,a=i,u=o;if(typeof a=="function"&&(u=a,a={}),!this.rules||Object.keys(this.rules).length===0)return u&&u(null,l),Promise.resolve(l);function c(m){var y=[],g={};function _(S){if(Array.isArray(S)){var O;y=(O=y).concat.apply(O,S)}else y.push(S)}for(var x=0;x<m.length;x++)_(m[x]);y.length?(g=Os(y),u(y,g)):u(null,l)}if(a.messages){var f=this.messages();f===Es&&(f=As()),Da(f,a.messages),a.messages=f}else a.messages=this.messages();var h={},p=a.keys||Object.keys(this.rules);p.forEach(function(m){var y=s.rules[m],g=l[m];y.forEach(function(_){var x=_;typeof x.transform=="function"&&(l===r&&(l=fn({},l)),g=l[m]=x.transform(g)),typeof x=="function"?x={validator:x}:x=fn({},x),x.validator=s.getValidationMethod(x),x.validator&&(x.field=m,x.fullField=x.fullField||m,x.type=s.getType(x),h[m]=h[m]||[],h[m].push({rule:x,value:g,source:l,field:m}))})});var d={};return H1(h,a,function(m,y){var g=m.rule,_=(g.type==="object"||g.type==="array")&&(typeof g.fields=="object"||typeof g.defaultField=="object");_=_&&(g.required||!g.required&&m.value),g.field=m.field;function x(k,I){return fn({},I,{fullField:g.fullField+"."+k,fullFields:g.fullFields?[].concat(g.fullFields,[k]):[k]})}function S(k){k===void 0&&(k=[]);var I=Array.isArray(k)?k:[k];!a.suppressWarning&&I.length&&t.warning("async-validator:",I),I.length&&g.message!==void 0&&(I=[].concat(g.message));var B=I.map(Na(g,l));if(a.first&&B.length)return d[g.field]=1,y(B);if(!_)y(B);else{if(g.required&&!m.value)return g.message!==void 0?B=[].concat(g.message).map(Na(g,l)):a.error&&(B=[a.error(g,He(a.messages.required,g.field))]),y(B);var E={};g.defaultField&&Object.keys(m.value).map(function(D){E[D]=g.defaultField}),E=fn({},E,m.rule.fields);var v={};Object.keys(E).forEach(function(D){var L=E[D],W=Array.isArray(L)?L:[L];v[D]=W.map(x.bind(null,D))});var T=new t(v);T.messages(a.messages),m.rule.options&&(m.rule.options.messages=a.messages,m.rule.options.error=a.error),T.validate(m.value,m.rule.options||a,function(D){var L=[];B&&B.length&&L.push.apply(L,B),D&&D.length&&L.push.apply(L,D),y(L.length?L:null)})}}var O;if(g.asyncValidator)O=g.asyncValidator(g,m.value,S,m.source,a);else if(g.validator){try{O=g.validator(g,m.value,S,m.source,a)}catch(k){console.error==null||console.error(k),a.suppressValidatorError||setTimeout(function(){throw k},0),S(k.message)}O===!0?S():O===!1?S(typeof g.message=="function"?g.message(g.fullField||g.field):g.message||(g.fullField||g.field)+" fails"):O instanceof Array?S(O):O instanceof Error&&S(O.message)}O&&O.then&&O.then(function(){return S()},function(k){return S(k)})},function(m){c(m)},l)},e.getType=function(r){if(r.type===void 0&&r.pattern instanceof RegExp&&(r.type="pattern"),typeof r.validator!="function"&&r.type&&!Er.hasOwnProperty(r.type))throw new Error(He("Unknown rule type %s",r.type));return r.type||"string"},e.getValidationMethod=function(r){if(typeof r.validator=="function")return r.validator;var i=Object.keys(r),o=i.indexOf("message");return o!==-1&&i.splice(o,1),i.length===1&&i[0]==="required"?Er.required:Er[this.getType(r)]||void 0},t}();yo.register=function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");Er[e]=n};yo.warning=F1;yo.messages=Es;yo.validators=Er;function ge(t,e){fg(t)&&(t="100%");var n=hg(t);return t=e===360?t:Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:(e===360?t=(t<0?t%e+e:t%e)/parseFloat(String(e)):t=t%e/parseFloat(String(e)),t)}function yi(t){return Math.min(1,Math.max(0,t))}function fg(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function hg(t){return typeof t=="string"&&t.indexOf("%")!==-1}function hf(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function bi(t){return t<=1?"".concat(Number(t)*100,"%"):t}function hn(t){return t.length===1?"0"+t:String(t)}function pg(t,e,n){return{r:ge(t,255)*255,g:ge(e,255)*255,b:ge(n,255)*255}}function Ra(t,e,n){t=ge(t,255),e=ge(e,255),n=ge(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o=0,s=0,l=(r+i)/2;if(r===i)s=0,o=0;else{var a=r-i;switch(s=l>.5?a/(2-r-i):a/(r+i),r){case t:o=(e-n)/a+(e<n?6:0);break;case e:o=(n-t)/a+2;break;case n:o=(t-e)/a+4;break}o/=6}return{h:o,s,l}}function Bo(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*(6*n):n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function dg(t,e,n){var r,i,o;if(t=ge(t,360),e=ge(e,100),n=ge(n,100),e===0)i=n,o=n,r=n;else{var s=n<.5?n*(1+e):n+e-n*e,l=2*n-s;r=Bo(l,s,t+1/3),i=Bo(l,s,t),o=Bo(l,s,t-1/3)}return{r:r*255,g:i*255,b:o*255}}function za(t,e,n){t=ge(t,255),e=ge(e,255),n=ge(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o=0,s=r,l=r-i,a=r===0?0:l/r;if(r===i)o=0;else{switch(r){case t:o=(e-n)/l+(e<n?6:0);break;case e:o=(n-t)/l+2;break;case n:o=(t-e)/l+4;break}o/=6}return{h:o,s:a,v:s}}function mg(t,e,n){t=ge(t,360)*6,e=ge(e,100),n=ge(n,100);var r=Math.floor(t),i=t-r,o=n*(1-e),s=n*(1-i*e),l=n*(1-(1-i)*e),a=r%6,u=[n,s,o,o,l,n][a],c=[l,n,n,s,o,o][a],f=[o,o,l,n,n,s][a];return{r:u*255,g:c*255,b:f*255}}function Pa(t,e,n,r){var i=[hn(Math.round(t).toString(16)),hn(Math.round(e).toString(16)),hn(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function gg(t,e,n,r,i){var o=[hn(Math.round(t).toString(16)),hn(Math.round(e).toString(16)),hn(Math.round(n).toString(16)),hn(yg(r))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function yg(t){return Math.round(parseFloat(t)*255).toString(16)}function Fa(t){return Le(t)/255}function Le(t){return parseInt(t,16)}function bg(t){return{r:t>>16,g:(t&65280)>>8,b:t&255}}var Ms={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function wg(t){var e={r:0,g:0,b:0},n=1,r=null,i=null,o=null,s=!1,l=!1;return typeof t=="string"&&(t=vg(t)),typeof t=="object"&&(_t(t.r)&&_t(t.g)&&_t(t.b)?(e=pg(t.r,t.g,t.b),s=!0,l=String(t.r).substr(-1)==="%"?"prgb":"rgb"):_t(t.h)&&_t(t.s)&&_t(t.v)?(r=bi(t.s),i=bi(t.v),e=mg(t.h,r,i),s=!0,l="hsv"):_t(t.h)&&_t(t.s)&&_t(t.l)&&(r=bi(t.s),o=bi(t.l),e=dg(t.h,r,o),s=!0,l="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=hf(n),{ok:s,format:t.format||l,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}var xg="[-\\+]?\\d+%?",kg="[-\\+]?\\d*\\.\\d+%?",jt="(?:".concat(kg,")|(?:").concat(xg,")"),Lo="[\\s|\\(]+(".concat(jt,")[,|\\s]+(").concat(jt,")[,|\\s]+(").concat(jt,")\\s*\\)?"),Vo="[\\s|\\(]+(".concat(jt,")[,|\\s]+(").concat(jt,")[,|\\s]+(").concat(jt,")[,|\\s]+(").concat(jt,")\\s*\\)?"),nt={CSS_UNIT:new RegExp(jt),rgb:new RegExp("rgb"+Lo),rgba:new RegExp("rgba"+Vo),hsl:new RegExp("hsl"+Lo),hsla:new RegExp("hsla"+Vo),hsv:new RegExp("hsv"+Lo),hsva:new RegExp("hsva"+Vo),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function vg(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var e=!1;if(Ms[t])t=Ms[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=nt.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=nt.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=nt.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=nt.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=nt.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=nt.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=nt.hex8.exec(t),n?{r:Le(n[1]),g:Le(n[2]),b:Le(n[3]),a:Fa(n[4]),format:e?"name":"hex8"}:(n=nt.hex6.exec(t),n?{r:Le(n[1]),g:Le(n[2]),b:Le(n[3]),format:e?"name":"hex"}:(n=nt.hex4.exec(t),n?{r:Le(n[1]+n[1]),g:Le(n[2]+n[2]),b:Le(n[3]+n[3]),a:Fa(n[4]+n[4]),format:e?"name":"hex8"}:(n=nt.hex3.exec(t),n?{r:Le(n[1]+n[1]),g:Le(n[2]+n[2]),b:Le(n[3]+n[3]),format:e?"name":"hex"}:!1)))))))))}function _t(t){return!!nt.CSS_UNIT.exec(String(t))}var E8=function(){function t(e,n){e===void 0&&(e=""),n===void 0&&(n={});var r;if(e instanceof t)return e;typeof e=="number"&&(e=bg(e)),this.originalInput=e;var i=wg(e);this.originalInput=e,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return t.prototype.isDark=function(){return this.getBrightness()<128},t.prototype.isLight=function(){return!this.isDark()},t.prototype.getBrightness=function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},t.prototype.getLuminance=function(){var e=this.toRgb(),n,r,i,o=e.r/255,s=e.g/255,l=e.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),s<=.03928?r=s/12.92:r=Math.pow((s+.055)/1.055,2.4),l<=.03928?i=l/12.92:i=Math.pow((l+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(e){return this.a=hf(e),this.roundA=Math.round(100*this.a)/100,this},t.prototype.isMonochrome=function(){var e=this.toHsl().s;return e===0},t.prototype.toHsv=function(){var e=za(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}},t.prototype.toHsvString=function(){var e=za(this.r,this.g,this.b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},t.prototype.toHsl=function(){var e=Ra(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}},t.prototype.toHslString=function(){var e=Ra(this.r,this.g,this.b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},t.prototype.toHex=function(e){return e===void 0&&(e=!1),Pa(this.r,this.g,this.b,e)},t.prototype.toHexString=function(e){return e===void 0&&(e=!1),"#"+this.toHex(e)},t.prototype.toHex8=function(e){return e===void 0&&(e=!1),gg(this.r,this.g,this.b,this.a,e)},t.prototype.toHex8String=function(e){return e===void 0&&(e=!1),"#"+this.toHex8(e)},t.prototype.toHexShortString=function(e){return e===void 0&&(e=!1),this.a===1?this.toHexString(e):this.toHex8String(e)},t.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},t.prototype.toRgbString=function(){var e=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(e,", ").concat(n,", ").concat(r,")"):"rgba(".concat(e,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},t.prototype.toPercentageRgb=function(){var e=function(n){return"".concat(Math.round(ge(n,255)*100),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},t.prototype.toPercentageRgbString=function(){var e=function(n){return Math.round(ge(n,255)*100)};return this.a===1?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},t.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var e="#"+Pa(this.r,this.g,this.b,!1),n=0,r=Object.entries(Ms);n<r.length;n++){var i=r[n],o=i[0],s=i[1];if(e===s)return o}return!1},t.prototype.toString=function(e){var n=!!e;e=e??this.format;var r=!1,i=this.a<1&&this.a>=0,o=!n&&i&&(e.startsWith("hex")||e==="name");return o?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},t.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},t.prototype.clone=function(){return new t(this.toString())},t.prototype.lighten=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.l+=e/100,n.l=yi(n.l),new t(n)},t.prototype.brighten=function(e){e===void 0&&(e=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(e/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(e/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(e/100)))),new t(n)},t.prototype.darken=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.l-=e/100,n.l=yi(n.l),new t(n)},t.prototype.tint=function(e){return e===void 0&&(e=10),this.mix("white",e)},t.prototype.shade=function(e){return e===void 0&&(e=10),this.mix("black",e)},t.prototype.desaturate=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.s-=e/100,n.s=yi(n.s),new t(n)},t.prototype.saturate=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.s+=e/100,n.s=yi(n.s),new t(n)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(e){var n=this.toHsl(),r=(n.h+e)%360;return n.h=r<0?360+r:r,new t(n)},t.prototype.mix=function(e,n){n===void 0&&(n=50);var r=this.toRgb(),i=new t(e).toRgb(),o=n/100,s={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new t(s)},t.prototype.analogous=function(e,n){e===void 0&&(e=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*e>>1)+720)%360;--e;)r.h=(r.h+i)%360,o.push(new t(r));return o},t.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new t(e)},t.prototype.monochromatic=function(e){e===void 0&&(e=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,s=[],l=1/e;e--;)s.push(new t({h:r,s:i,v:o})),o=(o+l)%1;return s},t.prototype.splitcomplement=function(){var e=this.toHsl(),n=e.h;return[this,new t({h:(n+72)%360,s:e.s,l:e.l}),new t({h:(n+216)%360,s:e.s,l:e.l})]},t.prototype.onBackground=function(e){var n=this.toRgb(),r=new t(e).toRgb(),i=n.a+r.a*(1-n.a);return new t({r:(n.r*n.a+r.r*r.a*(1-n.a))/i,g:(n.g*n.a+r.g*r.a*(1-n.a))/i,b:(n.b*n.a+r.b*r.a*(1-n.a))/i,a:i})},t.prototype.triad=function(){return this.polyad(3)},t.prototype.tetrad=function(){return this.polyad(4)},t.prototype.polyad=function(e){for(var n=this.toHsl(),r=n.h,i=[this],o=360/e,s=1;s<e;s++)i.push(new t({h:(r+s*o)%360,s:n.s,l:n.l}));return i},t.prototype.equals=function(e){return this.toRgbString()===new t(e).toRgbString()},t}(),Ba=!1,an,Ts,Ns,Di,Ii,pf,Ri,Ds,Is,Rs,df,zs,Ps,mf,gf;function Te(){if(!Ba){Ba=!0;var t=navigator.userAgent,e=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(t),n=/(Mac OS X)|(Windows)|(Linux)/.exec(t);if(zs=/\b(iPhone|iP[ao]d)/.exec(t),Ps=/\b(iP[ao]d)/.exec(t),Rs=/Android/i.exec(t),mf=/FBAN\/\w+;/i.exec(t),gf=/Mobile/i.exec(t),df=!!/Win64/.exec(t),e){an=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN,an&&document&&document.documentMode&&(an=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(t);pf=r?parseFloat(r[1])+4:an,Ts=e[2]?parseFloat(e[2]):NaN,Ns=e[3]?parseFloat(e[3]):NaN,Di=e[4]?parseFloat(e[4]):NaN,Di?(e=/(?:Chrome\/(\d+\.\d+))/.exec(t),Ii=e&&e[1]?parseFloat(e[1]):NaN):Ii=NaN}else an=Ts=Ns=Ii=Di=NaN;if(n){if(n[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);Ri=i?parseFloat(i[1].replace("_",".")):!0}else Ri=!1;Ds=!!n[2],Is=!!n[3]}else Ri=Ds=Is=!1}}var Fs={ie:function(){return Te()||an},ieCompatibilityMode:function(){return Te()||pf>an},ie64:function(){return Fs.ie()&&df},firefox:function(){return Te()||Ts},opera:function(){return Te()||Ns},webkit:function(){return Te()||Di},safari:function(){return Fs.webkit()},chrome:function(){return Te()||Ii},windows:function(){return Te()||Ds},osx:function(){return Te()||Ri},linux:function(){return Te()||Is},iphone:function(){return Te()||zs},mobile:function(){return Te()||zs||Ps||Rs||gf},nativeApp:function(){return Te()||mf},android:function(){return Te()||Rs},ipad:function(){return Te()||Ps}},_g=Fs,wi=!!(typeof window<"u"&&window.document&&window.document.createElement),Sg={canUseDOM:wi,canUseWorkers:typeof Worker<"u",canUseEventListeners:wi&&!!(window.addEventListener||window.attachEvent),canUseViewport:wi&&!!window.screen,isInWorker:!wi},yf=Sg,bf;yf.canUseDOM&&(bf=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function Cg(t,e){if(!yf.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r=typeof i[n]=="function"}return!r&&bf&&t==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var Og=Cg,La=10,Va=40,Ha=800;function wf(t){var e=0,n=0,r=0,i=0;return"detail"in t&&(n=t.detail),"wheelDelta"in t&&(n=-t.wheelDelta/120),"wheelDeltaY"in t&&(n=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=n,n=0),r=e*La,i=n*La,"deltaY"in t&&(i=t.deltaY),"deltaX"in t&&(r=t.deltaX),(r||i)&&t.deltaMode&&(t.deltaMode==1?(r*=Va,i*=Va):(r*=Ha,i*=Ha)),r&&!e&&(e=r<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:e,spinY:n,pixelX:r,pixelY:i}}wf.getEventType=function(){return _g.firefox()?"DOMMouseScroll":Og("wheel")?"wheel":"mousewheel"};var M8=wf;/** |
| 13 |
* Checks if an event is supported in the current execution environment. |
| 14 |
* |
| 15 |
* NOTE: This will not work correctly for non-generic events such as `change`, |
| 16 |
* `reset`, `load`, `error`, and `select`. |
| 17 |
* |
| 18 |
* Borrows from Modernizr. |
| 19 |
* |
| 20 |
* @param {string} eventNameSuffix Event name, e.g. "click". |
| 21 |
* @param {?boolean} capture Check if the capture phase is supported. |
| 22 |
* @return {boolean} True if the event is supported. |
| 23 |
* @internal |
| 24 |
* @license Modernizr 3.0.0pre (Custom Build) | MIT |
| 25 |
*/var ft=(t=>(t.LOADING="loading",t.LOADED="loaded",t.ERROR="error",t))(ft||{});const Ag=typeof window<"u"&&window!==null,Eg=Dg(),Mg=Object.prototype.propertyIsEnumerable,ja=Object.getOwnPropertySymbols;function Mr(t){return typeof t=="function"||toString.call(t)==="[object Object]"}function Tg(t){return typeof t=="object"?t===null:typeof t!="function"}function Ng(t){return t!=="__proto__"&&t!=="constructor"&&t!=="prototype"}function Dg(){return Ag&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype?("isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get(){return this.intersectionRatio>0}}),!0):!1}function Ig(t,...e){if(!Mr(t))throw new TypeError("expected the first argument to be an object");if(e.length===0||typeof Symbol!="function"||typeof ja!="function")return t;for(const n of e){const r=ja(n);for(const i of r)Mg.call(n,i)&&(t[i]=n[i])}return t}function xf(t,...e){let n=0;for(Tg(t)&&(t=e[n++]),t||(t={});n<e.length;n++)if(Mr(e[n])){for(const r of Object.keys(e[n]))Ng(r)&&(Mr(t[r])&&Mr(e[n][r])?xf(t[r],e[n][r]):t[r]=e[n][r]);Ig(t,e[n])}return t}const qa="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Rg="",zg={rootMargin:"0px",threshold:0},Dn="data-lazy-timeout-id";class Pg{constructor(e){this.options={loading:qa,error:Rg,observerOptions:zg,log:!0,lifecycle:{},logLevel:"error"},this._images=new WeakMap,this.config(e)}config(e={}){xf(this.options,e)}mount(e,n){if(!e)return;const{src:r,loading:i,error:o,lifecycle:s,delay:l}=this._valueFormatter(typeof n=="string"?n:n.value);this._lifecycle(ft.LOADING,s,e),e.setAttribute("src",i||qa),Eg||(this.loadImages(e,r,o,s),this._log(()=>{this._logger("Not support IntersectionObserver!")})),this._initIntersectionObserver(e,r,o,s,l)}update(e,n){var l;if(!e)return;(l=this._realObserver(e))==null||l.unobserve(e);const{src:r,error:i,lifecycle:o,delay:s}=this._valueFormatter(typeof n=="string"?n:n.value);this._initIntersectionObserver(e,r,i,o,s)}unmount(e){var n;e&&((n=this._realObserver(e))==null||n.unobserve(e),this._images.delete(e))}loadImages(e,n,r,i){this._setImageSrc(e,n,r,i)}_setImageSrc(e,n,r,i){e.tagName.toLowerCase()==="img"?(n&&e.getAttribute("src")!==n&&e.setAttribute("src",n),this._listenImageStatus(e,()=>{this._lifecycle(ft.LOADED,i,e)},()=>{var o;e.onload=null,this._lifecycle(ft.ERROR,i,e),(o=this._realObserver(e))==null||o.disconnect(),r&&e.getAttribute("src")!==r&&e.setAttribute("src",r),this._log(()=>{this._logger(`Image failed to load!And failed src was: ${n} `)})})):e.style.backgroundImage=`url('${n}')`}_initIntersectionObserver(e,n,r,i,o){var l;const s=this.options.observerOptions;this._images.set(e,new IntersectionObserver(a=>{Array.prototype.forEach.call(a,u=>{o&&o>0?this._delayedIntersectionCallback(e,u,o,n,r,i):this._intersectionCallback(e,u,n,r,i)})},s)),(l=this._realObserver(e))==null||l.observe(e)}_intersectionCallback(e,n,r,i,o){var s;n.isIntersecting&&((s=this._realObserver(e))==null||s.unobserve(n.target),this._setImageSrc(e,r,i,o))}_delayedIntersectionCallback(e,n,r,i,o,s){if(n.isIntersecting){if(n.target.hasAttribute(Dn))return;const l=setTimeout(()=>{this._intersectionCallback(e,n,i,o,s),n.target.removeAttribute(Dn)},r);n.target.setAttribute(Dn,String(l))}else n.target.hasAttribute(Dn)&&(clearTimeout(Number(n.target.getAttribute(Dn))),n.target.removeAttribute(Dn))}_listenImageStatus(e,n,r){e.onload=n,e.onerror=r}_valueFormatter(e){let n=e,r=this.options.loading,i=this.options.error,o=this.options.lifecycle,s=this.options.delay;return Mr(e)&&(n=e.src,r=e.loading||this.options.loading,i=e.error||this.options.error,o=e.lifecycle||this.options.lifecycle,s=e.delay||this.options.delay),{src:n,loading:r,error:i,lifecycle:o,delay:s}}_log(e){this.options.log&&e()}_lifecycle(e,n,r){switch(e){case ft.LOADING:r==null||r.setAttribute("lazy",ft.LOADING),n!=null&&n.loading&&n.loading(r);break;case ft.LOADED:r==null||r.setAttribute("lazy",ft.LOADED),n!=null&&n.loaded&&n.loaded(r);break;case ft.ERROR:r==null||r.setAttribute("lazy",ft.ERROR),n!=null&&n.error&&n.error(r);break}}_realObserver(e){return this._images.get(e)}_logger(e,...n){let r=console.error;switch(this.options.logLevel){case"error":r=console.error;break;case"warn":r=console.warn;break;case"info":r=console.info;break;case"debug":r=console.debug;break}r(e,n)}}const T8={install(t,e){const n=new Pg(e);t.config.globalProperties.$Lazyload=n,t.provide("Lazyload",n),t.directive("lazy",{mounted:n.mount.bind(n),updated:n.update.bind(n),unmounted:n.unmount.bind(n)})}};function pe(t){this.content=t}pe.prototype={constructor:pe,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),o=r.content.slice();return i==-1?o.push(n||t,e):(o[i+1]=e,n&&(o[i]=n)),new pe(o)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new pe(n)},addToStart:function(t,e){return new pe([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new pe(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),o=r.find(t);return i.splice(o==-1?i.length:o,0,e,n),new pe(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=pe.from(t),t.size?new pe(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=pe.from(t),t.size?new pe(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=pe.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};pe.from=function(t){if(t instanceof pe)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new pe(e)};function kf(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),o=e.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)n++;return n}if(i.content.size||o.content.size){let s=kf(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}}function vf(t,e,n,r){for(let i=t.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let s=t.child(--i),l=e.child(--o),a=s.nodeSize;if(s==l){n-=a,r-=a;continue}if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let u=0,c=Math.min(s.text.length,l.text.length);for(;u<c&&s.text[s.text.length-u-1]==l.text[l.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(s.content.size||l.content.size){let u=vf(s.content,l.content,n-1,r-1);if(u)return u}n-=a,r-=a}}let M=class Ce{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,o){for(let s=0,l=0;l<n;s++){let a=this.content[s],u=l+a.nodeSize;if(u>e&&r(a,i+l,o||null,s)!==!1&&a.content.size){let c=l+1;a.nodesBetween(Math.max(0,e-c),Math.min(a.content.size,n-c),r,i+c)}l=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let o="",s=!0;return this.nodesBetween(e,n,(l,a)=>{let u=l.isText?l.text.slice(Math.max(e,a)-a,n-a):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&u||l.isTextblock)&&r&&(s?s=!1:o+=r),o+=u},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new Ce(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let o=0,s=0;s<n;o++){let l=this.content[o],a=s+l.nodeSize;a>e&&((s<e||a>n)&&(l.isText?l=l.cut(Math.max(0,e-s),Math.min(l.text.length,n-s)):l=l.cut(Math.max(0,e-s-1),Math.min(l.content.size,n-s-1))),r.push(l),i+=l.nodeSize),s=a}return new Ce(r,i)}cutByIndex(e,n){return e==n?Ce.empty:e==0&&n==this.content.length?this:new Ce(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new Ce(i,o)}addToStart(e){return new Ce([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Ce(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return kf(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return vf(this,e,n,r)}findIndex(e,n=-1){if(e==0)return xi(0,e);if(e==this.size)return xi(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=this.child(r),s=i+o.nodeSize;if(s>=e)return s==e||n>0?xi(r+1,s):xi(r,i);i=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return Ce.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Ce(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Ce.empty;let n,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(n||(n=e.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new Ce(n||e,r)}static from(e){if(!e)return Ce.empty;if(e instanceof Ce)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Ce([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};M.empty=new M([],0);const Ho={index:0,offset:0};function xi(t,e){return Ho.index=t,Ho.offset=e,Ho}function Ji(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Ji(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Ji(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let ee=class Bs{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))n||(n=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Ji(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Bs.none;if(e instanceof Bs)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};ee.none=[];class Ki extends Error{}class R{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=Sf(this.content,e+this.openStart,n);return r&&new R(r,this.openStart,this.openEnd)}removeBetween(e,n){return new R(_f(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return R.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new R(M.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new R(e,r,i)}}R.empty=new R(M.empty,0,0);function _f(t,e,n){let{index:r,offset:i}=t.findIndex(e),o=t.maybeChild(r),{index:s,offset:l}=t.findIndex(n);if(i==e||o.isText){if(l!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,o.copy(_f(o.content,e-i-1,n-i-1)))}function Sf(t,e,n,r){let{index:i,offset:o}=t.findIndex(e),s=t.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let l=Sf(s.content,e-o-1,n);return l&&t.replaceChild(i,s.copy(l))}function Fg(t,e,n){if(n.openStart>t.depth)throw new Ki("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Ki("Inconsistent open depths");return Cf(t,e,n,0)}function Cf(t,e,n,r){let i=t.index(r),o=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let s=Cf(t,e,n,r+1);return o.copy(o.content.replaceChild(i,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,l=s.content;return bn(s,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}else{let{start:s,end:l}=Bg(n,t);return bn(o,Af(t,s,l,e,r))}else return bn(o,Yi(t,e,r))}function Of(t,e){if(!e.type.compatibleContent(t.type))throw new Ki("Cannot join "+e.type.name+" onto "+t.type.name)}function Ls(t,e,n){let r=t.node(n);return Of(r,e.node(n)),r}function yn(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Tr(t,e,n,r){let i=(e||t).node(n),o=0,s=e?e.index(n):i.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(yn(t.nodeAfter,r),o++));for(let l=o;l<s;l++)yn(i.child(l),r);e&&e.depth==n&&e.textOffset&&yn(e.nodeBefore,r)}function bn(t,e){return t.type.checkContent(e),t.copy(e)}function Af(t,e,n,r,i){let o=t.depth>i&&Ls(t,e,i+1),s=r.depth>i&&Ls(n,r,i+1),l=[];return Tr(null,t,i,l),o&&s&&e.index(i)==n.index(i)?(Of(o,s),yn(bn(o,Af(t,e,n,r,i+1)),l)):(o&&yn(bn(o,Yi(t,e,i+1)),l),Tr(e,n,i,l),s&&yn(bn(s,Yi(n,r,i+1)),l)),Tr(r,null,i,l),new M(l)}function Yi(t,e,n){let r=[];if(Tr(null,t,n,r),t.depth>n){let i=Ls(t,e,n+1);yn(bn(i,Yi(t,e,n+1)),r)}return Tr(e,null,n,r),new M(r)}function Bg(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let o=n-1;o>=0;o--)i=e.node(o).copy(M.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class $r{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return ee.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let l=r;r=i,i=l}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new Ef(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let s=e;;){let{index:l,offset:a}=s.content.findIndex(o),u=o-a;if(r.push(s,l,i+a),!u||(s=s.child(l),s.isText))break;o=u-1,i+=a+1}return new $r(n,r,o)}static resolveCached(e,n){let r=$a.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==n)return s}else $a.set(e,r=new Lg);let i=r.elts[r.i]=$r.resolve(e,n);return r.i=(r.i+1)%Vg,i}}class Lg{constructor(){this.elts=[],this.i=0}}const Vg=12,$a=new WeakMap;class Ef{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Hg=Object.create(null);let wn=class Vs{constructor(e,n,r,i=ee.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||M.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,i){return this.content.textBetween(e,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&Ji(this.attrs,n||e.defaultAttrs||Hg)&&ee.sameSet(this.marks,r||ee.none)}copy(e=null){return e==this.content?this:new Vs(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Vs(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return R.empty;let i=this.resolve(e),o=this.resolve(n),s=r?0:i.sharedDepth(n),l=i.start(s),u=i.node(s).content.cut(i.pos-l,o.pos-l);return new R(u,i.depth-s,o.depth-s)}replace(e,n,r){return Fg(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return $r.resolveCached(this,e)}resolveNoCache(e){return $r.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Mf(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=M.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),l=s&&s.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=i;a<o;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=ee.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!ee.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=M.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}};wn.prototype.text=void 0;class Gi extends wn{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Mf(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Gi(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Gi(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Mf(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class _n{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new jg(e,n);if(r.next==null)return _n.empty;let i=Tf(r);r.next&&r.err("Unexpected trailing text");let o=Yg(Kg(i));return Gg(o,r),o}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function o(s,l){let a=s.matchFragment(e,r);if(a&&(!n||a.validEnd))return M.from(l.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:f}=s.next[u];if(!(c.isText||c.hasRequiredAttrs())&&i.indexOf(f)==-1){i.push(f);let h=o(f,l.concat(c));if(h)return h}}return null}return o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let l=i;l.type;l=l.via)s.push(l.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:l,next:a}=o.next[s];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!i.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:i}),n[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(` |
| 26 |
`)}}_n.empty=new _n(!0);class jg{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Tf(t){let e=[];do e.push(qg(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function qg(t){let e=[];do e.push($g(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function $g(t){let e=Jg(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=Wg(t,e);else break;return e}function Wa(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function Wg(t,e){let n=Wa(t),r=n;return t.eat(",")&&(t.next!="}"?r=Wa(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function Ug(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let o in n){let s=n[o];s.groups.indexOf(e)>-1&&i.push(s)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function Jg(t){if(t.eat("(")){let e=Tf(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=Ug(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Kg(t){let e=[[]];return i(o(t,0),n()),e;function n(){return e.push([])-1}function r(s,l,a){let u={term:a,to:l};return e[s].push(u),u}function i(s,l){s.forEach(a=>a.to=l)}function o(s,l){if(s.type=="choice")return s.exprs.reduce((a,u)=>a.concat(o(u,l)),[]);if(s.type=="seq")for(let a=0;;a++){let u=o(s.exprs[a],l);if(a==s.exprs.length-1)return u;i(u,l=n())}else if(s.type=="star"){let a=n();return r(l,a),i(o(s.expr,a),a),[r(a)]}else if(s.type=="plus"){let a=n();return i(o(s.expr,l),a),i(o(s.expr,a),a),[r(a)]}else{if(s.type=="opt")return[r(l)].concat(o(s.expr,l));if(s.type=="range"){let a=l;for(let u=0;u<s.min;u++){let c=n();i(o(s.expr,a),c),a=c}if(s.max==-1)i(o(s.expr,a),a);else for(let u=s.min;u<s.max;u++){let c=n();r(a,c),i(o(s.expr,a),c),a=c}return[r(a)]}else{if(s.type=="name")return[r(l,void 0,s.value)];throw new Error("Unknown expr type")}}}}function Nf(t,e){return e-t}function Ua(t,e){let n=[];return r(e),n.sort(Nf);function r(i){let o=t[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let s=0;s<o.length;s++){let{term:l,to:a}=o[s];!l&&n.indexOf(a)==-1&&r(a)}}}function Yg(t){let e=Object.create(null);return n(Ua(t,0));function n(r){let i=[];r.forEach(s=>{t[s].forEach(({term:l,to:a})=>{if(!l)return;let u;for(let c=0;c<i.length;c++)i[c][0]==l&&(u=i[c][1]);Ua(t,a).forEach(c=>{u||i.push([l,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let o=e[r.join(",")]=new _n(r.indexOf(t.length-1)>-1);for(let s=0;s<i.length;s++){let l=i[s][1].sort(Nf);o.next.push({type:i[s][0],next:e[l.join(",")]||n(l)})}return o}}function Gg(t,e){for(let n=0,r=[t];n<r.length;n++){let i=r[n],o=!i.validEnd,s=[];for(let l=0;l<i.next.length;l++){let{type:a,next:u}=i.next[l];s.push(a.name),o&&!(a.isText||a.hasRequiredAttrs())&&(o=!1),r.indexOf(u)==-1&&r.push(u)}o&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Df(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function If(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(i===void 0){let o=t[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function Rf(t,e,n,r){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in t){let o=t[i];o.validate&&o.validate(e[i])}}function zf(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new Qg(t,r,e[r]);return n}let Ja=class Pf{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=zf(e,r.attrs),this.defaultAttrs=Df(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==_n.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:If(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new wn(this,this.computeAttrs(e),M.from(n),ee.setFrom(r))}createChecked(e=null,n,r){return n=M.from(n),this.checkContent(n),new wn(this,this.computeAttrs(e),n,ee.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=M.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let i=this.contentMatch.matchFragment(n),o=i&&i.fillBefore(M.empty,!0);return o?new wn(this,e,n.append(o),ee.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){Rf(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:ee.none:e}static compile(e,n){let r=Object.create(null);e.forEach((o,s)=>r[o]=new Pf(o,n,s));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Xg(t,e,n){let r=n.split("|");return i=>{let o=i===null?"null":typeof i;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${o}`)}}class Qg{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Xg(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class bo{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=zf(e,i.attrs),this.excluded=null;let o=Df(this.attrs);this.instance=o?new ee(this,o):null}create(e=null){return!e&&this.instance?this.instance:new ee(this,If(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new bo(o,i++,n,s)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){Rf(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class N8{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in e)n[i]=e[i];n.nodes=pe.from(e.nodes),n.marks=pe.from(e.marks||{}),this.nodes=Ja.compile(this.spec.nodes,this),this.marks=bo.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let o=this.nodes[i],s=o.spec.content||"",l=o.spec.marks;if(o.contentMatch=r[s]||(r[s]=_n.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=l=="_"?null:l?Ka(this,l.split(" ")):l==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],s=o.spec.excludes;o.excluded=s==null?[o]:s==""?[]:Ka(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Ja){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,i)}text(e,n){let r=this.nodes.text;return new Gi(r,r.defaultAttrs,e,ee.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeFromJSON(e){return wn.fromJSON(this,e)}markFromJSON(e){return ee.fromJSON(this,e)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function Ka(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],o=t.marks[i],s=o;if(o)n.push(o);else for(let l in t.marks){let a=t.marks[l];(i=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=a)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function Zg(t){return t.tag!=null}function e2(t){return t.style!=null}class Wr{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(Zg(i))this.tags.push(i);else if(e2(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=e.nodes[i.node];return o.contentMatch.matchType(o)})}parse(e,n={}){let r=new Ga(this,n,!1);return r.addAll(e,ee.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new Ga(this,n,!0);return r.addAll(e,ee.none,n.from,n.to),R.maxOpen(r.finish())}matchTag(e,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(r2(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(e);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(e,n,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],l=s.style;if(!(l.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=n))){if(s.getAttrs){let a=s.getAttrs(n);if(a===!1)continue;s.attrs=a||void 0}return s}}}static schemaRules(e){let n=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<n.length;s++){let l=n[s];if((l.priority==null?50:l.priority)<o)break}n.splice(s,0,i)}for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=Xa(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=Xa(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Wr(e,Wr.schemaRules(e)))}}const Ff={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},t2={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Bf={ol:!0,ul:!0},Xi=1,Qi=2,Nr=4;function Ya(t,e,n){return e!=null?(e?Xi:0)|(e==="full"?Qi:0):t&&t.whitespace=="pre"?Xi|Qi:n&~Nr}class ki{constructor(e,n,r,i,o,s){this.type=e,this.attrs=n,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=ee.none,this.match=o||(s&Nr?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(M.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Xi)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let n=M.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(M.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Ff.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Ga{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0;let i=n.topNode,o,s=Ya(null,n.preserveWhitespace,0)|(r?Nr:0);i?o=new ki(i.type,i.attrs,ee.none,!0,n.topMatch||i.type.contentMatch,s):r?o=new ki(null,null,ee.none,!0,null,s):o=new ki(e.schema.topNodeType,null,ee.none,!0,null,s),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,i=this.top;if(i.options&Qi||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i.options&Xi)i.options&Qi?r=r.replace(/\r\n?/g,` |
| 27 |
`):r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let o=i.content[i.content.length-1],s=e.previousSibling;(!o||s&&s.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),n),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let i=e.nodeName.toLowerCase(),o;Bf.hasOwnProperty(i)&&this.parser.normalizeLists&&n2(e);let s=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,r));if(s?s.ignore:t2.hasOwnProperty(i))this.findInside(e),this.ignoreFallback(e,n);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(e=s.skip);let l,a=this.top,u=this.needsBlock;if(Ff.hasOwnProperty(i))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),l=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);return}let c=s&&s.skip?n:this.readStyles(e,n);c&&this.addAll(e,c),l&&this.sync(a),this.needsBlock=u}else{let l=this.readStyles(e,n);l&&this.addElementByRule(e,s,l,s.consuming===!1?o:void 0)}}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(` |
| 28 |
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let l=void 0;;){let a=this.parser.matchStyle(o,s,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?n=n.filter(u=>!a.clearMark(u)):n=n.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return n}addElementByRule(e,n,r,i){let o,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r)||this.leafFallback(e,r);else{let a=this.enter(s,n.attrs||null,r,n.preserveWhitespace);a&&(o=!0,r=a)}else{let a=this.parser.schema.marks[n.mark];r=r.concat(a.create(n.attrs))}let l=this.top;if(s&&s.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r));else{let a=e;typeof n.contentElement=="string"?a=e.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(e):n.contentElement&&(a=n.contentElement),this.findAround(e,a,!0),this.addAll(a,r)}o&&this.sync(l)&&this.open--}addAll(e,n,r,i){let o=r||0;for(let s=r?e.childNodes[r]:e.firstChild,l=i==null?null:e.childNodes[i];s!=l;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s,n);this.findAtPoint(e,o)}findPlace(e,n){let r,i;for(let o=this.open;o>=0;o--){let s=this.nodes[o],l=s.findWrapping(e);if(l&&(!r||r.length>l.length)&&(r=l,i=s,!l.length)||s.solid)break}if(!r)return null;this.sync(i);for(let o=0;o<r.length;o++)n=this.enterInner(r[o],null,n,!1);return n}insertNode(e,n){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let r=this.findPlace(e,n);if(r){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let o=ee.none;for(let s of r.concat(e.marks))(i.type?i.type.allowsMarkType(s.type):Qa(s.type,e.type))&&(o=s.addToSet(o));return i.content.push(e.mark(o)),!0}return!1}enter(e,n,r,i){let o=this.findPlace(e.create(n),r);return o&&(o=this.enterInner(e,n,r,!0,i)),o}enterInner(e,n,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let l=Ya(e,o,s.options);s.options&Nr&&s.content.length==0&&(l|=Nr);let a=ee.none;return r=r.filter(u=>(s.type?s.type.allowsMarkType(u.type):Qa(u.type,e))?(a=u.addToSet(a),!1):!0),this.nodes.push(new ki(e,n,a,i,null,l)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let n=this.open;n>=0;n--)if(this.nodes[n]==e)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=(l,a)=>{for(;l>=0;l--){let u=n[l];if(u==""){if(l==n.length-1||l==0)continue;for(;a>=o;a--)if(s(l-1,a))return!0;return!1}else{let c=a>0||a==0&&i?this.nodes[a].type:r&&a>=o?r.node(a-o).type:null;if(!c||c.name!=u&&c.groups.indexOf(u)==-1)return!1;a--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function n2(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Bf.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function r2(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Xa(t){let e={};for(let n in t)e[n]=t[n];return e}function Qa(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let o=[],s=l=>{o.push(l);for(let a=0;a<l.edgeCount;a++){let{type:u,next:c}=l.edge(a);if(u==e||o.indexOf(c)<0&&s(c))return!0}};if(s(i.contentMatch))return!0}}class lr{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=jo(n).createDocumentFragment());let i=r,o=[];return e.forEach(s=>{if(o.length||s.marks.length){let l=0,a=0;for(;l<o.length&&a<s.marks.length;){let u=s.marks[a];if(!this.marks[u.type.name]){a++;continue}if(!u.eq(o[l][0])||u.type.spec.spanning===!1)break;l++,a++}for(;l<o.length;)i=o.pop()[1];for(;a<s.marks.length;){let u=s.marks[a++],c=this.serializeMark(u,s.isInline,n);c&&(o.push([u,i]),i.appendChild(c.dom),i=c.contentDOM||c.dom)}}i.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:i}=zi(jo(n),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,i)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,n,r={}){let i=this.marks[e.type.name];return i&&zi(jo(r),i(e,n),null,e.attrs)}static renderSpec(e,n,r=null,i){return zi(e,n,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new lr(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=Za(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return Za(e.marks)}}function Za(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function jo(t){return t.document||window.document}const eu=new WeakMap;function i2(t){let e=eu.get(t);return e===void 0&&eu.set(t,e=o2(t)),e}function o2(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return n(t),e}function zi(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],o;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(o=i2(r))&&o.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=i.indexOf(" ");s>0&&(n=i.slice(0,s),i=i.slice(s+1));let l,a=n?t.createElementNS(n,i):t.createElement(i),u=e[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let f in u)if(u[f]!=null){let h=f.indexOf(" ");h>0?a.setAttributeNS(f.slice(0,h),f.slice(h+1),u[f]):a.setAttribute(f,u[f])}}for(let f=c;f<e.length;f++){let h=e[f];if(h===0){if(f<e.length-1||f>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:p,contentDOM:d}=zi(t,h,n,r);if(a.appendChild(p),d){if(l)throw new RangeError("Multiple content holes");l=d}}}return{dom:a,contentDOM:l}}const s2={};function Dl(t,e){const n=e||s2,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Lf(t,r,i)}function Lf(t,e,n){if(l2(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return tu(t.children,e,n)}return Array.isArray(t)?tu(t,e,n):""}function tu(t,e,n){const r=[];let i=-1;for(;++i<t.length;)r[i]=Lf(t[i],e,n);return r.join("")}function l2(t){return!!(t&&typeof t=="object")}const nu=document.createElement("i");function Il(t){const e="&"+t+";";nu.innerHTML=e;const n=nu.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}function Ye(t,e,n,r){const i=t.length;let o=0,s;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(e,n),t.splice(...s);else for(n&&t.splice(e,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(e,0),t.splice(...s),o+=1e4,e+=1e4}function We(t,e){return t.length>0?(Ye(t,t.length,0,e),t):e}const ru={}.hasOwnProperty;function Vf(t){const e={};let n=-1;for(;++n<t.length;)a2(e,t[n]);return e}function a2(t,e){let n;for(n in e){const i=(ru.call(t,n)?t[n]:void 0)||(t[n]={}),o=e[n];let s;if(o)for(s in o){ru.call(i,s)||(i[s]=[]);const l=o[s];u2(i[s],Array.isArray(l)?l:l?[l]:[])}}}function u2(t,e){let n=-1;const r=[];for(;++n<e.length;)(e[n].add==="after"?t:r).push(e[n]);Ye(t,0,0,r)}function Hf(t,e){const n=Number.parseInt(t,e);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ot(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Oe=tn(/[A-Za-z]/),De=tn(/[\dA-Za-z]/),c2=tn(/[#-'*+\--9=?A-Z^-~]/);function Zi(t){return t!==null&&(t<32||t===127)}const Hs=tn(/\d/),f2=tn(/[\dA-Fa-f]/),h2=tn(/[!-/:-@[-`{-~]/);function V(t){return t!==null&&t<-2}function te(t){return t!==null&&(t<0||t===32)}function U(t){return t===-2||t===-1||t===32}const wo=tn(/\p{P}|\p{S}/u),Sn=tn(/\s/);function tn(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function Q(t,e,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(a){return U(a)?(t.enter(n),l(a)):e(a)}function l(a){return U(a)&&o++<i?(t.consume(a),l):(t.exit(n),e(a))}}const p2={tokenize:d2};function d2(t){const e=t.attempt(this.parser.constructs.contentInitial,r,i);let n;return e;function r(l){if(l===null){t.consume(l);return}return t.enter("lineEnding"),t.consume(l),t.exit("lineEnding"),Q(t,e,"linePrefix")}function i(l){return t.enter("paragraph"),o(l)}function o(l){const a=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,s(l)}function s(l){if(l===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(l);return}return V(l)?(t.consume(l),t.exit("chunkText"),o):(t.consume(l),s)}}const m2={tokenize:g2},iu={tokenize:y2};function g2(t){const e=this,n=[];let r=0,i,o,s;return l;function l(x){if(r<n.length){const S=n[r];return e.containerState=S[1],t.attempt(S[0].continuation,a,u)(x)}return u(x)}function a(x){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&_();const S=e.events.length;let O=S,k;for(;O--;)if(e.events[O][0]==="exit"&&e.events[O][1].type==="chunkFlow"){k=e.events[O][1].end;break}g(r);let I=S;for(;I<e.events.length;)e.events[I][1].end=Object.assign({},k),I++;return Ye(e.events,O+1,0,e.events.slice(S)),e.events.length=I,u(x)}return l(x)}function u(x){if(r===n.length){if(!i)return h(x);if(i.currentConstruct&&i.currentConstruct.concrete)return d(x);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(iu,c,f)(x)}function c(x){return i&&_(),g(r),h(x)}function f(x){return e.parser.lazy[e.now().line]=r!==n.length,s=e.now().offset,d(x)}function h(x){return e.containerState={},t.attempt(iu,p,d)(x)}function p(x){return r++,n.push([e.currentConstruct,e.containerState]),h(x)}function d(x){if(x===null){i&&_(),g(0),t.consume(x);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),m(x)}function m(x){if(x===null){y(t.exit("chunkFlow"),!0),g(0),t.consume(x);return}return V(x)?(t.consume(x),y(t.exit("chunkFlow")),r=0,e.interrupt=void 0,l):(t.consume(x),m)}function y(x,S){const O=e.sliceStream(x);if(S&&O.push(null),x.previous=o,o&&(o.next=x),o=x,i.defineSkip(x.start),i.write(O),e.parser.lazy[x.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<s&&(!i.events[k][1].end||i.events[k][1].end.offset>s))return;const I=e.events.length;let B=I,E,v;for(;B--;)if(e.events[B][0]==="exit"&&e.events[B][1].type==="chunkFlow"){if(E){v=e.events[B][1].end;break}E=!0}for(g(r),k=I;k<e.events.length;)e.events[k][1].end=Object.assign({},v),k++;Ye(e.events,B+1,0,e.events.slice(I)),e.events.length=k}}function g(x){let S=n.length;for(;S-- >x;){const O=n[S];e.containerState=O[1],O[0].exit.call(e,t)}n.length=x}function _(){i.write([null]),o=void 0,i=void 0,e.containerState._closeFlow=void 0}}function y2(t,e,n){return Q(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function eo(t){if(t===null||te(t)||Sn(t))return 1;if(wo(t))return 2}function xo(t,e,n){const r=[];let i=-1;for(;++i<t.length;){const o=t[i].resolveAll;o&&!r.includes(o)&&(e=o(e,n),r.push(o))}return e}const js={name:"attention",tokenize:w2,resolveAll:b2};function b2(t,e){let n=-1,r,i,o,s,l,a,u,c;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(r=n;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&e.sliceSerialize(t[r][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[r][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;a=t[r][1].end.offset-t[r][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const f=Object.assign({},t[r][1].end),h=Object.assign({},t[n][1].start);ou(f,-a),ou(h,a),s={type:a>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},t[r][1].end)},l={type:a>1?"strongSequence":"emphasisSequence",start:Object.assign({},t[n][1].start),end:h},o={type:a>1?"strongText":"emphasisText",start:Object.assign({},t[r][1].end),end:Object.assign({},t[n][1].start)},i={type:a>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},l.end)},t[r][1].end=Object.assign({},s.start),t[n][1].start=Object.assign({},l.end),u=[],t[r][1].end.offset-t[r][1].start.offset&&(u=We(u,[["enter",t[r][1],e],["exit",t[r][1],e]])),u=We(u,[["enter",i,e],["enter",s,e],["exit",s,e],["enter",o,e]]),u=We(u,xo(e.parser.constructs.insideSpan.null,t.slice(r+1,n),e)),u=We(u,[["exit",o,e],["enter",l,e],["exit",l,e],["exit",i,e]]),t[n][1].end.offset-t[n][1].start.offset?(c=2,u=We(u,[["enter",t[n][1],e],["exit",t[n][1],e]])):c=0,Ye(t,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function w2(t,e){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=eo(r);let o;return s;function s(a){return o=a,t.enter("attentionSequence"),l(a)}function l(a){if(a===o)return t.consume(a),l;const u=t.exit("attentionSequence"),c=eo(a),f=!c||c===2&&i||n.includes(a),h=!i||i===2&&c||n.includes(r);return u._open=!!(o===42?f:f&&(i||!h)),u._close=!!(o===42?h:h&&(c||!f)),e(a)}}function ou(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const x2={name:"autolink",tokenize:k2};function k2(t,e,n){let r=0;return i;function i(p){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(p),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o}function o(p){return Oe(p)?(t.consume(p),s):p===64?n(p):u(p)}function s(p){return p===43||p===45||p===46||De(p)?(r=1,l(p)):u(p)}function l(p){return p===58?(t.consume(p),r=0,a):(p===43||p===45||p===46||De(p))&&r++<32?(t.consume(p),l):(r=0,u(p))}function a(p){return p===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(p),t.exit("autolinkMarker"),t.exit("autolink"),e):p===null||p===32||p===60||Zi(p)?n(p):(t.consume(p),a)}function u(p){return p===64?(t.consume(p),c):c2(p)?(t.consume(p),u):n(p)}function c(p){return De(p)?f(p):n(p)}function f(p){return p===46?(t.consume(p),r=0,c):p===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(p),t.exit("autolinkMarker"),t.exit("autolink"),e):h(p)}function h(p){if((p===45||De(p))&&r++<63){const d=p===45?h:f;return t.consume(p),d}return n(p)}}const ti={tokenize:v2,partial:!0};function v2(t,e,n){return r;function r(o){return U(o)?Q(t,i,"linePrefix")(o):i(o)}function i(o){return o===null||V(o)?e(o):n(o)}}const jf={name:"blockQuote",tokenize:_2,continuation:{tokenize:S2},exit:C2};function _2(t,e,n){const r=this;return i;function i(s){if(s===62){const l=r.containerState;return l.open||(t.enter("blockQuote",{_container:!0}),l.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(s),t.exit("blockQuoteMarker"),o}return n(s)}function o(s){return U(s)?(t.enter("blockQuotePrefixWhitespace"),t.consume(s),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(s))}}function S2(t,e,n){const r=this;return i;function i(s){return U(s)?Q(t,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return t.attempt(jf,e,n)(s)}}function C2(t){t.exit("blockQuote")}const qf={name:"characterEscape",tokenize:O2};function O2(t,e,n){return r;function r(o){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(o),t.exit("escapeMarker"),i}function i(o){return h2(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(o)}}const $f={name:"characterReference",tokenize:A2};function A2(t,e,n){const r=this;let i=0,o,s;return l;function l(f){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),a}function a(f){return f===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(f),t.exit("characterReferenceMarkerNumeric"),u):(t.enter("characterReferenceValue"),o=31,s=De,c(f))}function u(f){return f===88||f===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(f),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),o=6,s=f2,c):(t.enter("characterReferenceValue"),o=7,s=Hs,c(f))}function c(f){if(f===59&&i){const h=t.exit("characterReferenceValue");return s===De&&!Il(r.sliceSerialize(h))?n(f):(t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return s(f)&&i++<o?(t.consume(f),c):n(f)}}const su={tokenize:M2,partial:!0},lu={name:"codeFenced",tokenize:E2,concrete:!0};function E2(t,e,n){const r=this,i={tokenize:O,partial:!0};let o=0,s=0,l;return a;function a(k){return u(k)}function u(k){const I=r.events[r.events.length-1];return o=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,l=k,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),c(k)}function c(k){return k===l?(s++,t.consume(k),c):s<3?n(k):(t.exit("codeFencedFenceSequence"),U(k)?Q(t,f,"whitespace")(k):f(k))}function f(k){return k===null||V(k)?(t.exit("codeFencedFence"),r.interrupt?e(k):t.check(su,m,S)(k)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),h(k))}function h(k){return k===null||V(k)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),f(k)):U(k)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Q(t,p,"whitespace")(k)):k===96&&k===l?n(k):(t.consume(k),h)}function p(k){return k===null||V(k)?f(k):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),d(k))}function d(k){return k===null||V(k)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),f(k)):k===96&&k===l?n(k):(t.consume(k),d)}function m(k){return t.attempt(i,S,y)(k)}function y(k){return t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),g}function g(k){return o>0&&U(k)?Q(t,_,"linePrefix",o+1)(k):_(k)}function _(k){return k===null||V(k)?t.check(su,m,S)(k):(t.enter("codeFlowValue"),x(k))}function x(k){return k===null||V(k)?(t.exit("codeFlowValue"),_(k)):(t.consume(k),x)}function S(k){return t.exit("codeFenced"),e(k)}function O(k,I,B){let E=0;return v;function v(q){return k.enter("lineEnding"),k.consume(q),k.exit("lineEnding"),T}function T(q){return k.enter("codeFencedFence"),U(q)?Q(k,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):D(q)}function D(q){return q===l?(k.enter("codeFencedFenceSequence"),L(q)):B(q)}function L(q){return q===l?(E++,k.consume(q),L):E>=s?(k.exit("codeFencedFenceSequence"),U(q)?Q(k,W,"whitespace")(q):W(q)):B(q)}function W(q){return q===null||V(q)?(k.exit("codeFencedFence"),I(q)):B(q)}}}function M2(t,e,n){const r=this;return i;function i(s){return s===null?n(s):(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):e(s)}}const qo={name:"codeIndented",tokenize:N2},T2={tokenize:D2,partial:!0};function N2(t,e,n){const r=this;return i;function i(u){return t.enter("codeIndented"),Q(t,o,"linePrefix",4+1)(u)}function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?a(u):V(u)?t.attempt(T2,s,a)(u):(t.enter("codeFlowValue"),l(u))}function l(u){return u===null||V(u)?(t.exit("codeFlowValue"),s(u)):(t.consume(u),l)}function a(u){return t.exit("codeIndented"),e(u)}}function D2(t,e,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):V(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),i):Q(t,o,"linePrefix",4+1)(s)}function o(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?e(s):V(s)?i(s):n(s)}}const I2={name:"codeText",tokenize:P2,resolve:R2,previous:z2};function R2(t){let e=t.length-4,n=3,r,i;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=n;++r<e;)if(t[r][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(r=n-1,e++;++r<=e;)i===void 0?r!==e&&t[r][1].type!=="lineEnding"&&(i=r):(r===e||t[r][1].type==="lineEnding")&&(t[i][1].type="codeTextData",r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),e-=r-i-2,r=i+2),i=void 0);return t}function z2(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function P2(t,e,n){let r=0,i,o;return s;function s(f){return t.enter("codeText"),t.enter("codeTextSequence"),l(f)}function l(f){return f===96?(t.consume(f),r++,l):(t.exit("codeTextSequence"),a(f))}function a(f){return f===null?n(f):f===32?(t.enter("space"),t.consume(f),t.exit("space"),a):f===96?(o=t.enter("codeTextSequence"),i=0,c(f)):V(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),a):(t.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||V(f)?(t.exit("codeTextData"),a(f)):(t.consume(f),u)}function c(f){return f===96?(t.consume(f),i++,c):i===r?(t.exit("codeTextSequence"),t.exit("codeText"),e(f)):(o.type="codeTextData",u(f))}}class F2{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,n,r){const i=n||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&yr(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),yr(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),yr(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const n=this.left.splice(e,Number.POSITIVE_INFINITY);yr(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);yr(this.left,n.reverse())}}}function yr(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}function Wf(t){const e={};let n=-1,r,i,o,s,l,a,u;const c=new F2(t);for(;++n<c.length;){for(;n in e;)n=e[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(a=r[1]._tokenizer.events,o=0,o<a.length&&a[o][1].type==="lineEndingBlank"&&(o+=2),o<a.length&&a[o][1].type==="content"))for(;++o<a.length&&a[o][1].type!=="content";)a[o][1].type==="chunkText"&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,B2(c,n)),n=e[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--&&(s=c.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank");)s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);i&&(r[1].end=Object.assign({},c.get(i)[1].start),l=c.slice(i,n),l.unshift(r),c.splice(i,n-i+1,l))}}return Ye(t,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function B2(t,e){const n=t.get(e)[1],r=t.get(e)[2];let i=e-1;const o=[],s=n._tokenizer||r.parser[n.contentType](n.start),l=s.events,a=[],u={};let c,f,h=-1,p=n,d=0,m=0;const y=[m];for(;p;){for(;t.get(++i)[1]!==p;);o.push(i),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),f&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++h<l.length;)l[h][0]==="exit"&&l[h-1][0]==="enter"&&l[h][1].type===l[h-1][1].type&&l[h][1].start.line!==l[h][1].end.line&&(m=h+1,y.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):y.pop(),h=y.length;h--;){const g=l.slice(y[h],y[h+1]),_=o.pop();a.push([_,_+g.length-1]),t.splice(_,2,g)}for(a.reverse(),h=-1;++h<a.length;)u[d+a[h][0]]=d+a[h][1],d+=a[h][1]-a[h][0]-1;return u}const L2={tokenize:j2,resolve:H2},V2={tokenize:q2,partial:!0};function H2(t){return Wf(t),t}function j2(t,e){let n;return r;function r(l){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?o(l):V(l)?t.check(V2,s,o)(l):(t.consume(l),i)}function o(l){return t.exit("chunkContent"),t.exit("content"),e(l)}function s(l){return t.consume(l),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function q2(t,e,n){const r=this;return i;function i(s){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),Q(t,o,"linePrefix")}function o(s){if(s===null||V(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?e(s):t.interrupt(r.parser.constructs.flow,n,e)(s)}}function Uf(t,e,n,r,i,o,s,l,a){const u=a||Number.POSITIVE_INFINITY;let c=0;return f;function f(g){return g===60?(t.enter(r),t.enter(i),t.enter(o),t.consume(g),t.exit(o),h):g===null||g===32||g===41||Zi(g)?n(g):(t.enter(r),t.enter(s),t.enter(l),t.enter("chunkString",{contentType:"string"}),m(g))}function h(g){return g===62?(t.enter(o),t.consume(g),t.exit(o),t.exit(i),t.exit(r),e):(t.enter(l),t.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===62?(t.exit("chunkString"),t.exit(l),h(g)):g===null||g===60||V(g)?n(g):(t.consume(g),g===92?d:p)}function d(g){return g===60||g===62||g===92?(t.consume(g),p):p(g)}function m(g){return!c&&(g===null||g===41||te(g))?(t.exit("chunkString"),t.exit(l),t.exit(s),t.exit(r),e(g)):c<u&&g===40?(t.consume(g),c++,m):g===41?(t.consume(g),c--,m):g===null||g===32||g===40||Zi(g)?n(g):(t.consume(g),g===92?y:m)}function y(g){return g===40||g===41||g===92?(t.consume(g),m):m(g)}}function Jf(t,e,n,r,i,o){const s=this;let l=0,a;return u;function u(p){return t.enter(r),t.enter(i),t.consume(p),t.exit(i),t.enter(o),c}function c(p){return l>999||p===null||p===91||p===93&&!a||p===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(t.exit(o),t.enter(i),t.consume(p),t.exit(i),t.exit(r),e):V(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),c):(t.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||V(p)||l++>999?(t.exit("chunkString"),c(p)):(t.consume(p),a||(a=!U(p)),p===92?h:f)}function h(p){return p===91||p===92||p===93?(t.consume(p),l++,f):f(p)}}function Kf(t,e,n,r,i,o){let s;return l;function l(h){return h===34||h===39||h===40?(t.enter(r),t.enter(i),t.consume(h),t.exit(i),s=h===40?41:h,a):n(h)}function a(h){return h===s?(t.enter(i),t.consume(h),t.exit(i),t.exit(r),e):(t.enter(o),u(h))}function u(h){return h===s?(t.exit(o),a(s)):h===null?n(h):V(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),Q(t,u,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===s||h===null||V(h)?(t.exit("chunkString"),u(h)):(t.consume(h),h===92?f:c)}function f(h){return h===s||h===92?(t.consume(h),c):c(h)}}function Dr(t,e){let n;return r;function r(i){return V(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,r):U(i)?Q(t,r,n?"linePrefix":"lineSuffix")(i):e(i)}}const $2={name:"definition",tokenize:U2},W2={tokenize:J2,partial:!0};function U2(t,e,n){const r=this;let i;return o;function o(p){return t.enter("definition"),s(p)}function s(p){return Jf.call(r,t,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function l(p){return i=ot(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(t.enter("definitionMarker"),t.consume(p),t.exit("definitionMarker"),a):n(p)}function a(p){return te(p)?Dr(t,u)(p):u(p)}function u(p){return Uf(t,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return t.attempt(W2,f,f)(p)}function f(p){return U(p)?Q(t,h,"whitespace")(p):h(p)}function h(p){return p===null||V(p)?(t.exit("definition"),r.parser.defined.push(i),e(p)):n(p)}}function J2(t,e,n){return r;function r(l){return te(l)?Dr(t,i)(l):n(l)}function i(l){return Kf(t,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return U(l)?Q(t,s,"whitespace")(l):s(l)}function s(l){return l===null||V(l)?e(l):n(l)}}const K2={name:"hardBreakEscape",tokenize:Y2};function Y2(t,e,n){return r;function r(o){return t.enter("hardBreakEscape"),t.consume(o),i}function i(o){return V(o)?(t.exit("hardBreakEscape"),e(o)):n(o)}}const G2={name:"headingAtx",tokenize:Q2,resolve:X2};function X2(t,e){let n=t.length-2,r=3,i,o;return t[r][1].type==="whitespace"&&(r+=2),n-2>r&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&t[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:t[r][1].start,end:t[n][1].end},o={type:"chunkText",start:t[r][1].start,end:t[n][1].end,contentType:"text"},Ye(t,r,n-r+1,[["enter",i,e],["enter",o,e],["exit",o,e],["exit",i,e]])),t}function Q2(t,e,n){let r=0;return i;function i(c){return t.enter("atxHeading"),o(c)}function o(c){return t.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(t.consume(c),s):c===null||te(c)?(t.exit("atxHeadingSequence"),l(c)):n(c)}function l(c){return c===35?(t.enter("atxHeadingSequence"),a(c)):c===null||V(c)?(t.exit("atxHeading"),e(c)):U(c)?Q(t,l,"whitespace")(c):(t.enter("atxHeadingText"),u(c))}function a(c){return c===35?(t.consume(c),a):(t.exit("atxHeadingSequence"),l(c))}function u(c){return c===null||c===35||te(c)?(t.exit("atxHeadingText"),l(c)):(t.consume(c),u)}}const Z2=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],au=["pre","script","style","textarea"],ey={name:"htmlFlow",tokenize:iy,resolveTo:ry,concrete:!0},ty={tokenize:sy,partial:!0},ny={tokenize:oy,partial:!0};function ry(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function iy(t,e,n){const r=this;let i,o,s,l,a;return u;function u(w){return c(w)}function c(w){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(w),f}function f(w){return w===33?(t.consume(w),h):w===47?(t.consume(w),o=!0,m):w===63?(t.consume(w),i=3,r.interrupt?e:b):Oe(w)?(t.consume(w),s=String.fromCharCode(w),y):n(w)}function h(w){return w===45?(t.consume(w),i=2,p):w===91?(t.consume(w),i=5,l=0,d):Oe(w)?(t.consume(w),i=4,r.interrupt?e:b):n(w)}function p(w){return w===45?(t.consume(w),r.interrupt?e:b):n(w)}function d(w){const ae="CDATA[";return w===ae.charCodeAt(l++)?(t.consume(w),l===ae.length?r.interrupt?e:D:d):n(w)}function m(w){return Oe(w)?(t.consume(w),s=String.fromCharCode(w),y):n(w)}function y(w){if(w===null||w===47||w===62||te(w)){const ae=w===47,he=s.toLowerCase();return!ae&&!o&&au.includes(he)?(i=1,r.interrupt?e(w):D(w)):Z2.includes(s.toLowerCase())?(i=6,ae?(t.consume(w),g):r.interrupt?e(w):D(w)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(w):o?_(w):x(w))}return w===45||De(w)?(t.consume(w),s+=String.fromCharCode(w),y):n(w)}function g(w){return w===62?(t.consume(w),r.interrupt?e:D):n(w)}function _(w){return U(w)?(t.consume(w),_):v(w)}function x(w){return w===47?(t.consume(w),v):w===58||w===95||Oe(w)?(t.consume(w),S):U(w)?(t.consume(w),x):v(w)}function S(w){return w===45||w===46||w===58||w===95||De(w)?(t.consume(w),S):O(w)}function O(w){return w===61?(t.consume(w),k):U(w)?(t.consume(w),O):x(w)}function k(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(t.consume(w),a=w,I):U(w)?(t.consume(w),k):B(w)}function I(w){return w===a?(t.consume(w),a=null,E):w===null||V(w)?n(w):(t.consume(w),I)}function B(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||te(w)?O(w):(t.consume(w),B)}function E(w){return w===47||w===62||U(w)?x(w):n(w)}function v(w){return w===62?(t.consume(w),T):n(w)}function T(w){return w===null||V(w)?D(w):U(w)?(t.consume(w),T):n(w)}function D(w){return w===45&&i===2?(t.consume(w),J):w===60&&i===1?(t.consume(w),K):w===62&&i===4?(t.consume(w),ve):w===63&&i===3?(t.consume(w),b):w===93&&i===5?(t.consume(w),ne):V(w)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(ty,_e,L)(w)):w===null||V(w)?(t.exit("htmlFlowData"),L(w)):(t.consume(w),D)}function L(w){return t.check(ny,W,_e)(w)}function W(w){return t.enter("lineEnding"),t.consume(w),t.exit("lineEnding"),q}function q(w){return w===null||V(w)?L(w):(t.enter("htmlFlowData"),D(w))}function J(w){return w===45?(t.consume(w),b):D(w)}function K(w){return w===47?(t.consume(w),s="",re):D(w)}function re(w){if(w===62){const ae=s.toLowerCase();return au.includes(ae)?(t.consume(w),ve):D(w)}return Oe(w)&&s.length<8?(t.consume(w),s+=String.fromCharCode(w),re):D(w)}function ne(w){return w===93?(t.consume(w),b):D(w)}function b(w){return w===62?(t.consume(w),ve):w===45&&i===2?(t.consume(w),b):D(w)}function ve(w){return w===null||V(w)?(t.exit("htmlFlowData"),_e(w)):(t.consume(w),ve)}function _e(w){return t.exit("htmlFlow"),e(w)}}function oy(t,e,n){const r=this;return i;function i(s){return V(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):e(s)}}function sy(t,e,n){return r;function r(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(ti,e,n)}}const ly={name:"htmlText",tokenize:ay};function ay(t,e,n){const r=this;let i,o,s;return l;function l(b){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(b),a}function a(b){return b===33?(t.consume(b),u):b===47?(t.consume(b),O):b===63?(t.consume(b),x):Oe(b)?(t.consume(b),B):n(b)}function u(b){return b===45?(t.consume(b),c):b===91?(t.consume(b),o=0,d):Oe(b)?(t.consume(b),_):n(b)}function c(b){return b===45?(t.consume(b),p):n(b)}function f(b){return b===null?n(b):b===45?(t.consume(b),h):V(b)?(s=f,K(b)):(t.consume(b),f)}function h(b){return b===45?(t.consume(b),p):f(b)}function p(b){return b===62?J(b):b===45?h(b):f(b)}function d(b){const ve="CDATA[";return b===ve.charCodeAt(o++)?(t.consume(b),o===ve.length?m:d):n(b)}function m(b){return b===null?n(b):b===93?(t.consume(b),y):V(b)?(s=m,K(b)):(t.consume(b),m)}function y(b){return b===93?(t.consume(b),g):m(b)}function g(b){return b===62?J(b):b===93?(t.consume(b),g):m(b)}function _(b){return b===null||b===62?J(b):V(b)?(s=_,K(b)):(t.consume(b),_)}function x(b){return b===null?n(b):b===63?(t.consume(b),S):V(b)?(s=x,K(b)):(t.consume(b),x)}function S(b){return b===62?J(b):x(b)}function O(b){return Oe(b)?(t.consume(b),k):n(b)}function k(b){return b===45||De(b)?(t.consume(b),k):I(b)}function I(b){return V(b)?(s=I,K(b)):U(b)?(t.consume(b),I):J(b)}function B(b){return b===45||De(b)?(t.consume(b),B):b===47||b===62||te(b)?E(b):n(b)}function E(b){return b===47?(t.consume(b),J):b===58||b===95||Oe(b)?(t.consume(b),v):V(b)?(s=E,K(b)):U(b)?(t.consume(b),E):J(b)}function v(b){return b===45||b===46||b===58||b===95||De(b)?(t.consume(b),v):T(b)}function T(b){return b===61?(t.consume(b),D):V(b)?(s=T,K(b)):U(b)?(t.consume(b),T):E(b)}function D(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(t.consume(b),i=b,L):V(b)?(s=D,K(b)):U(b)?(t.consume(b),D):(t.consume(b),W)}function L(b){return b===i?(t.consume(b),i=void 0,q):b===null?n(b):V(b)?(s=L,K(b)):(t.consume(b),L)}function W(b){return b===null||b===34||b===39||b===60||b===61||b===96?n(b):b===47||b===62||te(b)?E(b):(t.consume(b),W)}function q(b){return b===47||b===62||te(b)?E(b):n(b)}function J(b){return b===62?(t.consume(b),t.exit("htmlTextData"),t.exit("htmlText"),e):n(b)}function K(b){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(b),t.exit("lineEnding"),re}function re(b){return U(b)?Q(t,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):ne(b)}function ne(b){return t.enter("htmlTextData"),s(b)}}const Rl={name:"labelEnd",tokenize:dy,resolveTo:py,resolveAll:hy},uy={tokenize:my},cy={tokenize:gy},fy={tokenize:yy};function hy(t){let e=-1;for(;++e<t.length;){const n=t[e][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(t.splice(e+1,n.type==="labelImage"?4:2),n.type="data",e++)}return t}function py(t,e){let n=t.length,r=0,i,o,s,l;for(;n--;)if(i=t[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(t[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const a={type:t[o][1].type==="labelLink"?"link":"image",start:Object.assign({},t[o][1].start),end:Object.assign({},t[t.length-1][1].end)},u={type:"label",start:Object.assign({},t[o][1].start),end:Object.assign({},t[s][1].end)},c={type:"labelText",start:Object.assign({},t[o+r+2][1].end),end:Object.assign({},t[s-2][1].start)};return l=[["enter",a,e],["enter",u,e]],l=We(l,t.slice(o+1,o+r+3)),l=We(l,[["enter",c,e]]),l=We(l,xo(e.parser.constructs.insideSpan.null,t.slice(o+r+4,s-3),e)),l=We(l,[["exit",c,e],t[s-2],t[s-1],["exit",u,e]]),l=We(l,t.slice(s+1)),l=We(l,[["exit",a,e]]),Ye(t,o,t.length,l),t}function dy(t,e,n){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return l;function l(h){return o?o._inactive?f(h):(s=r.parser.defined.includes(ot(r.sliceSerialize({start:o.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(h),t.exit("labelMarker"),t.exit("labelEnd"),a):n(h)}function a(h){return h===40?t.attempt(uy,c,s?c:f)(h):h===91?t.attempt(cy,c,s?u:f)(h):s?c(h):f(h)}function u(h){return t.attempt(fy,c,f)(h)}function c(h){return e(h)}function f(h){return o._balanced=!0,n(h)}}function my(t,e,n){return r;function r(f){return t.enter("resource"),t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),i}function i(f){return te(f)?Dr(t,o)(f):o(f)}function o(f){return f===41?c(f):Uf(t,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return te(f)?Dr(t,a)(f):c(f)}function l(f){return n(f)}function a(f){return f===34||f===39||f===40?Kf(t,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function u(f){return te(f)?Dr(t,c)(f):c(f)}function c(f){return f===41?(t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),t.exit("resource"),e):n(f)}}function gy(t,e,n){const r=this;return i;function i(l){return Jf.call(r,t,o,s,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(ot(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(l):n(l)}function s(l){return n(l)}}function yy(t,e,n){return r;function r(o){return t.enter("reference"),t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),i}function i(o){return o===93?(t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),t.exit("reference"),e):n(o)}}const by={name:"labelStartImage",tokenize:wy,resolveAll:Rl.resolveAll};function wy(t,e,n){const r=this;return i;function i(l){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(l),t.exit("labelImageMarker"),o}function o(l){return l===91?(t.enter("labelMarker"),t.consume(l),t.exit("labelMarker"),t.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):e(l)}}const xy={name:"labelStartLink",tokenize:ky,resolveAll:Rl.resolveAll};function ky(t,e,n){const r=this;return i;function i(s){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(s),t.exit("labelMarker"),t.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):e(s)}}const $o={name:"lineEnding",tokenize:vy};function vy(t,e){return n;function n(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),Q(t,e,"linePrefix")}}const Pi={name:"thematicBreak",tokenize:_y};function _y(t,e,n){let r=0,i;return o;function o(u){return t.enter("thematicBreak"),s(u)}function s(u){return i=u,l(u)}function l(u){return u===i?(t.enter("thematicBreakSequence"),a(u)):r>=3&&(u===null||V(u))?(t.exit("thematicBreak"),e(u)):n(u)}function a(u){return u===i?(t.consume(u),r++,a):(t.exit("thematicBreakSequence"),U(u)?Q(t,l,"whitespace")(u):l(u))}}const Ne={name:"list",tokenize:Oy,continuation:{tokenize:Ay},exit:My},Sy={tokenize:Ty,partial:!0},Cy={tokenize:Ey,partial:!0};function Oy(t,e,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(p){const d=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(d==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Hs(p)){if(r.containerState.type||(r.containerState.type=d,t.enter(d,{_container:!0})),d==="listUnordered")return t.enter("listItemPrefix"),p===42||p===45?t.check(Pi,n,u)(p):u(p);if(!r.interrupt||p===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),a(p)}return n(p)}function a(p){return Hs(p)&&++s<10?(t.consume(p),a):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(t.exit("listItemValue"),u(p)):n(p)}function u(p){return t.enter("listItemMarker"),t.consume(p),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,t.check(ti,r.interrupt?n:c,t.attempt(Sy,h,f))}function c(p){return r.containerState.initialBlankLine=!0,o++,h(p)}function f(p){return U(p)?(t.enter("listItemPrefixWhitespace"),t.consume(p),t.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=o+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(p)}}function Ay(t,e,n){const r=this;return r.containerState._closeFlow=void 0,t.check(ti,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Q(t,e,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!U(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(Cy,e,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Q(t,t.attempt(Ne,e,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function Ey(t,e,n){const r=this;return Q(t,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?e(o):n(o)}}function My(t){t.exit(this.containerState.type)}function Ty(t,e,n){const r=this;return Q(t,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function i(o){const s=r.events[r.events.length-1];return!U(o)&&s&&s[1].type==="listItemPrefixWhitespace"?e(o):n(o)}}const uu={name:"setextUnderline",tokenize:Dy,resolveTo:Ny};function Ny(t,e){let n=t.length,r,i,o;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){r=n;break}t[n][1].type==="paragraph"&&(i=n)}else t[n][1].type==="content"&&t.splice(n,1),!o&&t[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:Object.assign({},t[i][1].start),end:Object.assign({},t[t.length-1][1].end)};return t[i][1].type="setextHeadingText",o?(t.splice(i,0,["enter",s,e]),t.splice(o+1,0,["exit",t[r][1],e]),t[r][1].end=Object.assign({},t[o][1].end)):t[r][1]=s,t.push(["exit",s,e]),t}function Dy(t,e,n){const r=this;let i;return o;function o(u){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(t.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return t.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===i?(t.consume(u),l):(t.exit("setextHeadingLineSequence"),U(u)?Q(t,a,"lineSuffix")(u):a(u))}function a(u){return u===null||V(u)?(t.exit("setextHeadingLine"),e(u)):n(u)}}const Iy={tokenize:Ry};function Ry(t){const e=this,n=t.attempt(ti,r,t.attempt(this.parser.constructs.flowInitial,i,Q(t,t.attempt(this.parser.constructs.flow,i,t.attempt(L2,i)),"linePrefix")));return n;function r(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function i(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const zy={resolveAll:Gf()},Py=Yf("string"),Fy=Yf("text");function Yf(t){return{tokenize:e,resolveAll:Gf(t==="text"?By:void 0)};function e(n){const r=this,i=this.parser.constructs[t],o=n.attempt(i,s,l);return s;function s(c){return u(c)?o(c):l(c)}function l(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),a}function a(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),a)}function u(c){if(c===null)return!0;const f=i[c];let h=-1;if(f)for(;++h<f.length;){const p=f[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Gf(t){return e;function e(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return t?t(n,r):n}}function By(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){const r=t[n-1][1],i=e.sliceStream(r);let o=i.length,s=-1,l=0,a;for(;o--;){const u=i[o];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(u===-2)a=!0,l++;else if(u!==-1){o++;break}}if(l){const u={type:n===t.length||a||l<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-l,offset:r.end.offset-l,_index:r.start._index+o,_bufferIndex:o?s:r.start._bufferIndex+s},end:Object.assign({},r.end)};r.end=Object.assign({},u.start),r.start.offset===r.end.offset?Object.assign(r,u):(t.splice(n,0,["enter",u,e],["exit",u,e]),n+=2)}n++}return t}function Ly(t,e,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let s=[],l=[];const a={consume:_,enter:x,exit:S,attempt:I(O),check:I(k),interrupt:I(k,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:t,sliceStream:p,sliceSerialize:h,now:d,defineSkip:m,write:f};let c=e.tokenize.call(u,a);return e.resolveAll&&o.push(e),u;function f(T){return s=We(s,T),y(),s[s.length-1]!==null?[]:(B(e,0),u.events=xo(o,u.events,u),u.events)}function h(T,D){return Hy(p(T),D)}function p(T){return Vy(s,T)}function d(){const{line:T,column:D,offset:L,_index:W,_bufferIndex:q}=r;return{line:T,column:D,offset:L,_index:W,_bufferIndex:q}}function m(T){i[T.line]=T.column,v()}function y(){let T;for(;r._index<s.length;){const D=s[r._index];if(typeof D=="string")for(T=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===T&&r._bufferIndex<D.length;)g(D.charCodeAt(r._bufferIndex));else g(D)}}function g(T){c=c(T)}function _(T){V(T)?(r.line++,r.column=1,r.offset+=T===-3?2:1,v()):T!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=T}function x(T,D){const L=D||{};return L.type=T,L.start=d(),u.events.push(["enter",L,u]),l.push(L),L}function S(T){const D=l.pop();return D.end=d(),u.events.push(["exit",D,u]),D}function O(T,D){B(T,D.from)}function k(T,D){D.restore()}function I(T,D){return L;function L(W,q,J){let K,re,ne,b;return Array.isArray(W)?_e(W):"tokenize"in W?_e([W]):ve(W);function ve(ie){return et;function et(Se){const It=Se!==null&&ie[Se],Rt=Se!==null&&ie.null,zt=[...Array.isArray(It)?It:It?[It]:[],...Array.isArray(Rt)?Rt:Rt?[Rt]:[]];return _e(zt)(Se)}}function _e(ie){return K=ie,re=0,ie.length===0?J:w(ie[re])}function w(ie){return et;function et(Se){return b=E(),ne=ie,ie.partial||(u.currentConstruct=ie),ie.name&&u.parser.constructs.disable.null.includes(ie.name)?he():ie.tokenize.call(D?Object.assign(Object.create(u),D):u,a,ae,he)(Se)}}function ae(ie){return T(ne,b),q}function he(ie){return b.restore(),++re<K.length?w(K[re]):J}}}function B(T,D){T.resolveAll&&!o.includes(T)&&o.push(T),T.resolve&&Ye(u.events,D,u.events.length-D,T.resolve(u.events.slice(D),u)),T.resolveTo&&(u.events=T.resolveTo(u.events,u))}function E(){const T=d(),D=u.previous,L=u.currentConstruct,W=u.events.length,q=Array.from(l);return{restore:J,from:W};function J(){r=T,u.previous=D,u.currentConstruct=L,u.events.length=W,l=q,v()}}function v(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Vy(t,e){const n=e.start._index,r=e.start._bufferIndex,i=e.end._index,o=e.end._bufferIndex;let s;if(n===i)s=[t[n].slice(r,o)];else{if(s=t.slice(n,i),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}o>0&&s.push(t[i].slice(0,o))}return s}function Hy(t,e){let n=-1;const r=[];let i;for(;++n<t.length;){const o=t[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=` |
| 29 |
`;break}case-3:{s=`\r |
| 30 |
`;break}case-2:{s=e?" ":" ";break}case-1:{if(!e&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}const jy={42:Ne,43:Ne,45:Ne,48:Ne,49:Ne,50:Ne,51:Ne,52:Ne,53:Ne,54:Ne,55:Ne,56:Ne,57:Ne,62:jf},qy={91:$2},$y={[-2]:qo,[-1]:qo,32:qo},Wy={35:G2,42:Pi,45:[uu,Pi],60:ey,61:uu,95:Pi,96:lu,126:lu},Uy={38:$f,92:qf},Jy={[-5]:$o,[-4]:$o,[-3]:$o,33:by,38:$f,42:js,60:[x2,ly],91:xy,92:[K2,qf],93:Rl,95:js,96:I2},Ky={null:[js,zy]},Yy={null:[42,95]},Gy={null:[]},Xy=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Yy,contentInitial:qy,disable:Gy,document:jy,flow:Wy,flowInitial:$y,insideSpan:Ky,string:Uy,text:Jy},Symbol.toStringTag,{value:"Module"}));function Qy(t){const n=Vf([Xy,...(t||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(p2),document:i(m2),flow:i(Iy),string:i(Py),text:i(Fy)};return r;function i(o){return s;function s(l){return Ly(r,o,l)}}}function Zy(t){for(;!Wf(t););return t}const cu=/[\0\t\n\r]/g;function e4(){let t=1,e="",n=!0,r;return i;function i(o,s,l){const a=[];let u,c,f,h,p;for(o=e+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),f=0,e="",n&&(o.charCodeAt(0)===65279&&f++,n=void 0);f<o.length;){if(cu.lastIndex=f,u=cu.exec(o),h=u&&u.index!==void 0?u.index:o.length,p=o.charCodeAt(h),!u){e=o.slice(f);break}if(p===10&&f===h&&r)a.push(-3),r=void 0;else switch(r&&(a.push(-5),r=void 0),f<h&&(a.push(o.slice(f,h)),t+=h-f),p){case 0:{a.push(65533),t++;break}case 9:{for(c=Math.ceil(t/4)*4,a.push(-2);t++<c;)a.push(-1);break}case 10:{a.push(-4),t=1;break}default:r=!0,t=1}f=h+1}return l&&(r&&a.push(-5),e&&a.push(e),a.push(null)),a}}const t4=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Xf(t){return t.replace(t4,n4)}function n4(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Hf(n.slice(o?2:1),o?16:10)}return Il(n)||t}function Ir(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?fu(t.position):"start"in t||"end"in t?fu(t):"line"in t||"column"in t?qs(t):""}function qs(t){return hu(t&&t.line)+":"+hu(t&&t.column)}function fu(t){return qs(t&&t.start)+"-"+qs(t&&t.end)}function hu(t){return t&&typeof t=="number"?t:1}const Qf={}.hasOwnProperty;function r4(t,e,n){return typeof e!="string"&&(n=e,e=void 0),i4(n)(Zy(Qy(n).document().write(e4()(t,e,!0))))}function i4(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(fi),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(ci),blockQuote:o(Rt),characterEscape:E,characterReference:E,codeFenced:o(zt),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(zt,s),codeText:o(No,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(ui),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(Do),hardBreakEscape:o(fr),hardBreakTrailing:o(fr),htmlFlow:o(hr,s),htmlFlowData:E,htmlText:o(hr,s),htmlTextData:E,image:o(Io),label:s,link:o(fi),listItem:o(En),listItemValue:h,listOrdered:o(ct,f),listUnordered:o(ct),paragraph:o(hi),reference:w,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(ci),strong:o(pi),thematicBreak:o(di)},exit:{atxHeading:a(),atxHeadingSequence:O,autolink:a(),autolinkEmail:It,autolinkProtocol:Se,blockQuote:a(),characterEscapeValue:v,characterReferenceMarkerHexadecimal:he,characterReferenceMarkerNumeric:he,characterReferenceValue:ie,characterReference:et,codeFenced:a(y),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:d,codeFlowValue:v,codeIndented:a(g),codeText:a(q),codeTextData:v,data:v,definition:a(),definitionDestinationString:S,definitionLabelString:_,definitionTitleString:x,emphasis:a(),hardBreakEscape:a(D),hardBreakTrailing:a(D),htmlFlow:a(L),htmlFlowData:v,htmlText:a(W),htmlTextData:v,image:a(K),label:ne,labelText:re,lineEnding:T,link:a(J),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:ae,resourceDestinationString:b,resourceTitleString:ve,resource:_e,setextHeading:a(B),setextHeadingLineSequence:I,setextHeadingText:k,strong:a(),thematicBreak:a()}};Zf(e,(t||{}).mdastExtensions||[]);const n={};return r;function r(C){let N={type:"root",children:[]};const H={stack:[N],tokenStack:[],config:e,enter:l,exit:u,buffer:s,resume:c,data:n},G=[];let Z=-1;for(;++Z<C.length;)if(C[Z][1].type==="listOrdered"||C[Z][1].type==="listUnordered")if(C[Z][0]==="enter")G.push(Z);else{const tt=G.pop();Z=i(C,tt,Z)}for(Z=-1;++Z<C.length;){const tt=e[C[Z][0]];Qf.call(tt,C[Z][1].type)&&tt[C[Z][1].type].call(Object.assign({sliceSerialize:C[Z][2].sliceSerialize},H),C[Z][1])}if(H.tokenStack.length>0){const tt=H.tokenStack[H.tokenStack.length-1];(tt[1]||pu).call(H,void 0,tt[0])}for(N.position={start:Pt(C.length>0?C[0][1].start:{line:1,column:1,offset:0}),end:Pt(C.length>0?C[C.length-2][1].end:{line:1,column:1,offset:0})},Z=-1;++Z<e.transforms.length;)N=e.transforms[Z](N)||N;return N}function i(C,N,H){let G=N-1,Z=-1,tt=!1,on,kt,dr,mr;for(;++G<=H;){const Be=C[G];switch(Be[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Be[0]==="enter"?Z++:Z--,mr=void 0;break}case"lineEndingBlank":{Be[0]==="enter"&&(on&&!mr&&!Z&&!dr&&(dr=G),mr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:mr=void 0}if(!Z&&Be[0]==="enter"&&Be[1].type==="listItemPrefix"||Z===-1&&Be[0]==="exit"&&(Be[1].type==="listUnordered"||Be[1].type==="listOrdered")){if(on){let Mn=G;for(kt=void 0;Mn--;){const vt=C[Mn];if(vt[1].type==="lineEnding"||vt[1].type==="lineEndingBlank"){if(vt[0]==="exit")continue;kt&&(C[kt][1].type="lineEndingBlank",tt=!0),vt[1].type="lineEnding",kt=Mn}else if(!(vt[1].type==="linePrefix"||vt[1].type==="blockQuotePrefix"||vt[1].type==="blockQuotePrefixWhitespace"||vt[1].type==="blockQuoteMarker"||vt[1].type==="listItemIndent"))break}dr&&(!kt||dr<kt)&&(on._spread=!0),on.end=Object.assign({},kt?C[kt][1].start:Be[1].end),C.splice(kt||G,0,["exit",on,Be[2]]),G++,H++}if(Be[1].type==="listItemPrefix"){const Mn={type:"listItem",_spread:!1,start:Object.assign({},Be[1].start),end:void 0};on=Mn,C.splice(G,0,["enter",Mn,Be[2]]),G++,H++,dr=void 0,mr=!0}}}return C[N][1]._spread=tt,H}function o(C,N){return H;function H(G){l.call(this,C(G),G),N&&N.call(this,G)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(C,N,H){this.stack[this.stack.length-1].children.push(C),this.stack.push(C),this.tokenStack.push([N,H]),C.position={start:Pt(N.start),end:void 0}}function a(C){return N;function N(H){C&&C.call(this,H),u.call(this,H)}}function u(C,N){const H=this.stack.pop(),G=this.tokenStack.pop();if(G)G[0].type!==C.type&&(N?N.call(this,C,G[0]):(G[1]||pu).call(this,C,G[0]));else throw new Error("Cannot close `"+C.type+"` ("+Ir({start:C.start,end:C.end})+"): it’s not open");H.position.end=Pt(C.end)}function c(){return Dl(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function h(C){if(this.data.expectingFirstListItemValue){const N=this.stack[this.stack.length-2];N.start=Number.parseInt(this.sliceSerialize(C),10),this.data.expectingFirstListItemValue=void 0}}function p(){const C=this.resume(),N=this.stack[this.stack.length-1];N.lang=C}function d(){const C=this.resume(),N=this.stack[this.stack.length-1];N.meta=C}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const C=this.resume(),N=this.stack[this.stack.length-1];N.value=C.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const C=this.resume(),N=this.stack[this.stack.length-1];N.value=C.replace(/(\r?\n|\r)$/g,"")}function _(C){const N=this.resume(),H=this.stack[this.stack.length-1];H.label=N,H.identifier=ot(this.sliceSerialize(C)).toLowerCase()}function x(){const C=this.resume(),N=this.stack[this.stack.length-1];N.title=C}function S(){const C=this.resume(),N=this.stack[this.stack.length-1];N.url=C}function O(C){const N=this.stack[this.stack.length-1];if(!N.depth){const H=this.sliceSerialize(C).length;N.depth=H}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function I(C){const N=this.stack[this.stack.length-1];N.depth=this.sliceSerialize(C).codePointAt(0)===61?1:2}function B(){this.data.setextHeadingSlurpLineEnding=void 0}function E(C){const H=this.stack[this.stack.length-1].children;let G=H[H.length-1];(!G||G.type!=="text")&&(G=pr(),G.position={start:Pt(C.start),end:void 0},H.push(G)),this.stack.push(G)}function v(C){const N=this.stack.pop();N.value+=this.sliceSerialize(C),N.position.end=Pt(C.end)}function T(C){const N=this.stack[this.stack.length-1];if(this.data.atHardBreak){const H=N.children[N.children.length-1];H.position.end=Pt(C.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(N.type)&&(E.call(this,C),v.call(this,C))}function D(){this.data.atHardBreak=!0}function L(){const C=this.resume(),N=this.stack[this.stack.length-1];N.value=C}function W(){const C=this.resume(),N=this.stack[this.stack.length-1];N.value=C}function q(){const C=this.resume(),N=this.stack[this.stack.length-1];N.value=C}function J(){const C=this.stack[this.stack.length-1];if(this.data.inReference){const N=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=N,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function K(){const C=this.stack[this.stack.length-1];if(this.data.inReference){const N=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=N,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function re(C){const N=this.sliceSerialize(C),H=this.stack[this.stack.length-2];H.label=Xf(N),H.identifier=ot(N).toLowerCase()}function ne(){const C=this.stack[this.stack.length-1],N=this.resume(),H=this.stack[this.stack.length-1];if(this.data.inReference=!0,H.type==="link"){const G=C.children;H.children=G}else H.alt=N}function b(){const C=this.resume(),N=this.stack[this.stack.length-1];N.url=C}function ve(){const C=this.resume(),N=this.stack[this.stack.length-1];N.title=C}function _e(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function ae(C){const N=this.resume(),H=this.stack[this.stack.length-1];H.label=N,H.identifier=ot(this.sliceSerialize(C)).toLowerCase(),this.data.referenceType="full"}function he(C){this.data.characterReferenceType=C.type}function ie(C){const N=this.sliceSerialize(C),H=this.data.characterReferenceType;let G;H?(G=Hf(N,H==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):G=Il(N);const Z=this.stack[this.stack.length-1];Z.value+=G}function et(C){const N=this.stack.pop();N.position.end=Pt(C.end)}function Se(C){v.call(this,C);const N=this.stack[this.stack.length-1];N.url=this.sliceSerialize(C)}function It(C){v.call(this,C);const N=this.stack[this.stack.length-1];N.url="mailto:"+this.sliceSerialize(C)}function Rt(){return{type:"blockquote",children:[]}}function zt(){return{type:"code",lang:null,meta:null,value:""}}function No(){return{type:"inlineCode",value:""}}function ui(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Do(){return{type:"emphasis",children:[]}}function ci(){return{type:"heading",depth:0,children:[]}}function fr(){return{type:"break"}}function hr(){return{type:"html",value:""}}function Io(){return{type:"image",title:null,url:"",alt:null}}function fi(){return{type:"link",title:null,url:"",children:[]}}function ct(C){return{type:"list",ordered:C.type==="listOrdered",start:null,spread:C._spread,children:[]}}function En(C){return{type:"listItem",spread:C._spread,checked:null,children:[]}}function hi(){return{type:"paragraph",children:[]}}function pi(){return{type:"strong",children:[]}}function pr(){return{type:"text",value:""}}function di(){return{type:"thematicBreak"}}}function Pt(t){return{line:t.line,column:t.column,offset:t.offset}}function Zf(t,e){let n=-1;for(;++n<e.length;){const r=e[n];Array.isArray(r)?Zf(t,r):o4(t,r)}}function o4(t,e){let n;for(n in e)if(Qf.call(e,n))switch(n){case"canContainEols":{const r=e[n];r&&t[n].push(...r);break}case"transforms":{const r=e[n];r&&t[n].push(...r);break}case"enter":case"exit":{const r=e[n];r&&Object.assign(t[n],r);break}}}function pu(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+Ir({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+Ir({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Ir({start:e.start,end:e.end})+") is still open")}function D8(t){const e=this;e.parser=n;function n(r){return r4(r,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}const du={}.hasOwnProperty;function s4(t,e){const n=e||{};function r(i,...o){let s=r.invalid;const l=r.handlers;if(i&&du.call(i,t)){const a=String(i[t]);s=du.call(l,a)?l[a]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const l4={}.hasOwnProperty;function eh(t,e){let n=-1,r;if(e.extensions)for(;++n<e.extensions.length;)eh(t,e.extensions[n]);for(r in e)if(l4.call(e,r))switch(r){case"extensions":break;case"unsafe":{mu(t[r],e[r]);break}case"join":{mu(t[r],e[r]);break}case"handlers":{a4(t[r],e[r]);break}default:t.options[r]=e[r]}return t}function mu(t,e){e&&t.push(...e)}function a4(t,e){e&&Object.assign(t,e)}function u4(t,e,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(t,o.current()),c4);return i(),s}function c4(t,e,n){return">"+(n?"":" ")+t}function th(t,e){return gu(t,e.inConstruct,!0)&&!gu(t,e.notInConstruct,!1)}function gu(t,e,n){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return n;let r=-1;for(;++r<e.length;)if(t.includes(e[r]))return!0;return!1}function yu(t,e,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===` |
| 31 |
`&&th(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\ |
| 32 |
`}function f4(t,e){const n=String(t);let r=n.indexOf(e),i=r,o=0,s=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+e.length,r=n.indexOf(e,i);return s}function $s(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function h4(t){const e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function p4(t,e,n,r){const i=h4(n),o=t.value||"",s=i==="`"?"GraveAccent":"Tilde";if($s(t,n)){const f=n.enter("codeIndented"),h=n.indentLines(o,d4);return f(),h}const l=n.createTracker(r),a=i.repeat(Math.max(f4(o,i)+1,3)),u=n.enter("codeFenced");let c=l.move(a);if(t.lang){const f=n.enter(`codeFencedLang${s}`);c+=l.move(n.safe(t.lang,{before:c,after:" ",encode:["`"],...l.current()})),f()}if(t.lang&&t.meta){const f=n.enter(`codeFencedMeta${s}`);c+=l.move(" "),c+=l.move(n.safe(t.meta,{before:c,after:` |
| 33 |
`,encode:["`"],...l.current()})),f()}return c+=l.move(` |
| 34 |
`),o&&(c+=l.move(o+` |
| 35 |
`)),c+=l.move(a),u(),c}function d4(t,e,n){return(n?"":" ")+t}function zl(t){const e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function m4(t,e,n,r){const i=zl(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("[");return u+=a.move(n.safe(n.associationId(t),{before:u,after:"]",...a.current()})),u+=a.move("]: "),l(),!t.url||/[\0- \u007F]/.test(t.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(t.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(t.url,{before:u,after:t.title?" ":` |
| 36 |
`,...a.current()}))),l(),t.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(t.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),s(),u}function g4(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}nh.peek=y4;function nh(t,e,n,r){const i=g4(n),o=n.enter("emphasis"),s=n.createTracker(r);let l=s.move(i);return l+=s.move(n.containerPhrasing(t,{before:l,after:i,...s.current()})),l+=s.move(i),o(),l}function y4(t,e,n){return n.options.emphasis||"*"}const ko=function(t){if(t==null)return k4;if(typeof t=="function")return vo(t);if(typeof t=="object")return Array.isArray(t)?b4(t):w4(t);if(typeof t=="string")return x4(t);throw new Error("Expected function, string, or object as test")};function b4(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=ko(t[n]);return vo(r);function r(...i){let o=-1;for(;++o<e.length;)if(e[o].apply(this,i))return!0;return!1}}function w4(t){const e=t;return vo(n);function n(r){const i=r;let o;for(o in t)if(i[o]!==e[o])return!1;return!0}}function x4(t){return vo(e);function e(n){return n&&n.type===t}}function vo(t){return e;function e(n,r,i){return!!(v4(n)&&t.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function k4(){return!0}function v4(t){return t!==null&&typeof t=="object"&&"type"in t}const rh=[],_4=!0,Ws=!1,Us="skip";function ih(t,e,n,r){let i;typeof e=="function"&&typeof n!="function"?(r=n,n=e):i=e;const o=ko(i),s=r?-1:1;l(t,void 0,[])();function l(a,u,c){const f=a&&typeof a=="object"?a:{};if(typeof f.type=="string"){const p=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(a.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=rh,d,m,y;if((!e||o(a,u,c[c.length-1]||void 0))&&(p=S4(n(a,c)),p[0]===Ws))return p;if("children"in a&&a.children){const g=a;if(g.children&&p[0]!==Us)for(m=(r?g.children.length:-1)+s,y=c.concat(g);m>-1&&m<g.children.length;){const _=g.children[m];if(d=l(_,m,y)(),d[0]===Ws)return d;m=typeof d[1]=="number"?d[1]:m+s}}return p}}}function S4(t){return Array.isArray(t)?t:typeof t=="number"?[_4,t]:t==null?rh:[t]}function Pl(t,e,n,r){let i,o,s;typeof e=="function"&&typeof n!="function"?(o=void 0,s=e,i=n):(o=e,s=n,i=r),ih(t,o,l,i);function l(a,u){const c=u[u.length-1],f=c?c.children.indexOf(a):void 0;return s(a,f,c)}}function oh(t,e){let n=!1;return Pl(t,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ws}),!!((!t.depth||t.depth<3)&&Dl(t)&&(e.options.setext||n))}function C4(t,e,n,r){const i=Math.max(Math.min(6,t.depth||1),1),o=n.createTracker(r);if(oh(t,n)){const c=n.enter("headingSetext"),f=n.enter("phrasing"),h=n.containerPhrasing(t,{...o.current(),before:` |
| 37 |
`,after:` |
| 38 |
`});return f(),c(),h+` |
| 39 |
`+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(` |
| 40 |
`))+1))}const s="#".repeat(i),l=n.enter("headingAtx"),a=n.enter("phrasing");o.move(s+" ");let u=n.containerPhrasing(t,{before:"# ",after:` |
| 41 |
`,...o.current()});return/^[\t ]/.test(u)&&(u="&#x"+u.charCodeAt(0).toString(16).toUpperCase()+";"+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),a(),l(),u}sh.peek=O4;function sh(t){return t.value||""}function O4(){return"<"}lh.peek=A4;function lh(t,e,n,r){const i=zl(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("![");return u+=a.move(n.safe(t.alt,{before:u,after:"]",...a.current()})),u+=a.move("]("),l(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(t.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(t.url,{before:u,after:t.title?" ":")",...a.current()}))),l(),t.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(t.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),u+=a.move(")"),s(),u}function A4(){return"!"}ah.peek=E4;function ah(t,e,n,r){const i=t.referenceType,o=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(r);let a=l.move("![");const u=n.safe(t.alt,{before:a,after:"]",...l.current()});a+=l.move(u+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(t),{before:a,after:"]",...l.current()});return s(),n.stack=c,o(),i==="full"||!u||u!==f?a+=l.move(f+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function E4(){return"!"}uh.peek=M4;function uh(t,e,n){let r=t.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const s=n.unsafe[o],l=n.compilePattern(s);let a;if(s.atBreak)for(;a=l.exec(r);){let u=a.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(a.index+1)}}return i+r+i}function M4(){return"`"}function ch(t,e){const n=Dl(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(n===t.url||"mailto:"+n===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}fh.peek=T4;function fh(t,e,n,r){const i=zl(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let l,a;if(ch(t,n)){const c=n.stack;n.stack=[],l=n.enter("autolink");let f=s.move("<");return f+=s.move(n.containerPhrasing(t,{before:f,after:">",...s.current()})),f+=s.move(">"),l(),n.stack=c,f}l=n.enter("link"),a=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(t,{before:u,after:"](",...s.current()})),u+=s.move("]("),a(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(t.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(t.url,{before:u,after:t.title?" ":")",...s.current()}))),a(),t.title&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(t.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),u+=s.move(")"),l(),u}function T4(t,e,n){return ch(t,n)?"<":"["}hh.peek=N4;function hh(t,e,n,r){const i=t.referenceType,o=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(r);let a=l.move("[");const u=n.containerPhrasing(t,{before:a,after:"]",...l.current()});a+=l.move(u+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(t),{before:a,after:"]",...l.current()});return s(),n.stack=c,o(),i==="full"||!u||u!==f?a+=l.move(f+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function N4(){return"["}function Fl(t){const e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function D4(t){const e=Fl(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function I4(t){const e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function ph(t){const e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function R4(t,e,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=t.ordered?I4(n):Fl(n);const l=t.ordered?s==="."?")":".":D4(n);let a=e&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!t.ordered){const c=t.children?t.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(a=!0),ph(n)===s&&c){let f=-1;for(;++f<t.children.length;){const h=t.children[f];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){a=!0;break}}}}a&&(s=l),n.bulletCurrent=s;const u=n.containerFlow(t,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),u}function z4(t){const e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function P4(t,e,n,r){const i=z4(n);let o=n.bulletCurrent||Fl(n);e&&e.type==="list"&&e.ordered&&(o=(typeof e.start=="number"&&e.start>-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(r);l.move(o+" ".repeat(s-o.length)),l.shift(s);const a=n.enter("listItem"),u=n.indentLines(n.containerFlow(t,l.current()),c);return a(),u;function c(f,h,p){return h?(p?"":" ".repeat(s))+f:(p?o:o+" ".repeat(s-o.length))+f}}function F4(t,e,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(t,r);return o(),i(),s}const B4=ko(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function L4(t,e,n,r){return(t.children.some(function(s){return B4(s)})?n.containerPhrasing:n.containerFlow).call(n,t,r)}function V4(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}dh.peek=H4;function dh(t,e,n,r){const i=V4(n),o=n.enter("strong"),s=n.createTracker(r);let l=s.move(i+i);return l+=s.move(n.containerPhrasing(t,{before:l,after:i,...s.current()})),l+=s.move(i+i),o(),l}function H4(t,e,n){return n.options.strong||"*"}function j4(t,e,n,r){return n.safe(t.value,r)}function q4(t){const e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function $4(t,e,n){const r=(ph(n)+(n.options.ruleSpaces?" ":"")).repeat(q4(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Bl={blockquote:u4,break:yu,code:p4,definition:m4,emphasis:nh,hardBreak:yu,heading:C4,html:sh,image:lh,imageReference:ah,inlineCode:uh,link:fh,linkReference:hh,list:R4,listItem:P4,paragraph:F4,root:L4,strong:dh,text:j4,thematicBreak:$4},W4=[U4];function U4(t,e,n,r){if(e.type==="code"&&$s(e,r)&&(t.type==="list"||t.type===e.type&&$s(t,r)))return!1;if("spread"in n&&typeof n.spread=="boolean")return t.type==="paragraph"&&(t.type===e.type||e.type==="definition"||e.type==="heading"&&oh(e,r))?void 0:n.spread?1:0}const sn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],J4=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:` |
| 42 |
`,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:sn},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r |
| 43 |
]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:sn},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r |
| 44 |
*])`},{character:"*",inConstruct:"phrasing",notInConstruct:sn},{atBreak:!0,character:"+",after:`(?:[ \r |
| 45 |
])`},{atBreak:!0,character:"-",after:`(?:[ \r |
| 46 |
-])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r |
| 47 |
]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:sn},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:sn},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:sn},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:sn},{atBreak:!0,character:"~"}];function K4(t){return t.label||!t.identifier?t.label||"":Xf(t.identifier)}function Y4(t){if(!t._compiled){const e=(t.atBreak?"[\\r\\n][\\t ]*":"")+(t.before?"(?:"+t.before+")":"");t._compiled=new RegExp((e?"("+e+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(t.character)?"\\":"")+t.character+(t.after?"(?:"+t.after+")":""),"g")}return t._compiled}function G4(t,e,n){const r=e.indexStack,i=t.children||[],o=[];let s=-1,l=n.before;r.push(-1);let a=e.createTracker(n);for(;++s<i.length;){const u=i[s];let c;if(r[r.length-1]=s,s+1<i.length){let f=e.handle.handlers[i[s+1].type];f&&f.peek&&(f=f.peek),c=f?f(i[s+1],t,e,{before:"",after:"",...a.current()}).charAt(0):""}else c=n.after;o.length>0&&(l==="\r"||l===` |
| 48 |
`)&&u.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),l=" ",a=e.createTracker(n),a.move(o.join(""))),o.push(a.move(e.handle(u,t,e,{...a.current(),before:l,after:c}))),l=o[o.length-1].slice(-1)}return r.pop(),o.join("")}function X4(t,e,n){const r=e.indexStack,i=t.children||[],o=e.createTracker(n),s=[];let l=-1;for(r.push(-1);++l<i.length;){const a=i[l];r[r.length-1]=l,s.push(o.move(e.handle(a,t,e,{before:` |
| 49 |
`,after:` |
| 50 |
`,...o.current()}))),a.type!=="list"&&(e.bulletLastUsed=void 0),l<i.length-1&&s.push(o.move(Q4(a,i[l+1],t,e)))}return r.pop(),s.join("")}function Q4(t,e,n,r){let i=r.join.length;for(;i--;){const o=r.join[i](t,e,n,r);if(o===!0||o===1)break;if(typeof o=="number")return` |
| 51 |
`.repeat(1+o);if(o===!1)return` |
| 52 |
|
| 53 |
<!----> |
| 54 |
|
| 55 |
`}return` |
| 56 |
|
| 57 |
`}const Z4=/\r?\n|\r/g;function eb(t,e){const n=[];let r=0,i=0,o;for(;o=Z4.exec(t);)s(t.slice(r,o.index)),n.push(o[0]),r=o.index+o[0].length,i++;return s(t.slice(r)),n.join("");function s(l){n.push(e(l,i,!l))}}function tb(t,e,n){const r=(n.before||"")+(e||"")+(n.after||""),i=[],o=[],s={};let l=-1;for(;++l<t.unsafe.length;){const c=t.unsafe[l];if(!th(t.stack,c))continue;const f=t.compilePattern(c);let h;for(;h=f.exec(r);){const p="before"in c||!!c.atBreak,d="after"in c,m=h.index+(p?h[1].length:0);i.includes(m)?(s[m].before&&!p&&(s[m].before=!1),s[m].after&&!d&&(s[m].after=!1)):(i.push(m),s[m]={before:p,after:d})}}i.sort(nb);let a=n.before?n.before.length:0;const u=r.length-(n.after?n.after.length:0);for(l=-1;++l<i.length;){const c=i[l];c<a||c>=u||c+1<u&&i[l+1]===c+1&&s[c].after&&!s[c+1].before&&!s[c+1].after||i[l-1]===c-1&&s[c].before&&!s[c-1].before&&!s[c-1].after||(a!==c&&o.push(bu(r.slice(a,c),"\\")),a=c,/[!-/:-@[-`{-~]/.test(r.charAt(c))&&(!n.encode||!n.encode.includes(r.charAt(c)))?o.push("\\"):(o.push("&#x"+r.charCodeAt(c).toString(16).toUpperCase()+";"),a++))}return o.push(bu(r.slice(a,u),n.after)),o.join("")}function nb(t,e){return t-e}function bu(t,e){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],o=t+e;let s=-1,l=0,a;for(;a=n.exec(o);)r.push(a.index);for(;++s<r.length;)l!==r[s]&&i.push(t.slice(l,r[s])),i.push("\\"),l=r[s];return i.push(t.slice(l)),i.join("")}function rb(t){const e=t||{},n=e.now||{};let r=e.lineShift||0,i=n.line||1,o=n.column||1;return{move:a,current:s,shift:l};function s(){return{now:{line:i,column:o},lineShift:r}}function l(u){r+=u}function a(u){const c=u||"",f=c.split(/\r?\n|\r/g),h=f[f.length-1];return i+=f.length-1,o=f.length===1?o+h.length:1+h.length+r,c}}function ib(t,e={}){const n={enter:i,indentLines:eb,associationId:K4,containerPhrasing:ab,containerFlow:ub,createTracker:rb,compilePattern:Y4,safe:cb,stack:[],unsafe:[...J4],join:[...W4],handlers:{...Bl},options:{},indexStack:[],handle:void 0};eh(n,e),n.options.tightDefinitions&&n.join.push(lb),n.handle=s4("type",{invalid:ob,unknown:sb,handlers:n.handlers});let r=n.handle(t,void 0,n,{before:` |
| 58 |
`,after:` |
| 59 |
`,now:{line:1,column:1},lineShift:0});return r&&r.charCodeAt(r.length-1)!==10&&r.charCodeAt(r.length-1)!==13&&(r+=` |
| 60 |
`),r;function i(o){return n.stack.push(o),s;function s(){n.stack.pop()}}}function ob(t){throw new Error("Cannot handle value `"+t+"`, expected node")}function sb(t){const e=t;throw new Error("Cannot handle unknown node `"+e.type+"`")}function lb(t,e){if(t.type==="definition"&&t.type===e.type)return 0}function ab(t,e){return G4(t,this,e)}function ub(t,e){return X4(t,this,e)}function cb(t,e){return tb(this,t,e)}function I8(t){const e=this;e.compiler=n;function n(r){return ib(r,{...e.data("settings"),...t,extensions:e.data("toMarkdownExtensions")||[]})}}function wu(t){if(t)throw t}var Fi=Object.prototype.hasOwnProperty,mh=Object.prototype.toString,xu=Object.defineProperty,ku=Object.getOwnPropertyDescriptor,vu=function(e){return typeof Array.isArray=="function"?Array.isArray(e):mh.call(e)==="[object Array]"},_u=function(e){if(!e||mh.call(e)!=="[object Object]")return!1;var n=Fi.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Fi.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;var i;for(i in e);return typeof i>"u"||Fi.call(e,i)},Su=function(e,n){xu&&n.name==="__proto__"?xu(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},Cu=function(e,n){if(n==="__proto__")if(Fi.call(e,n)){if(ku)return ku(e,n).value}else return;return e[n]},fb=function t(){var e,n,r,i,o,s,l=arguments[0],a=1,u=arguments.length,c=!1;for(typeof l=="boolean"&&(c=l,l=arguments[1]||{},a=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});a<u;++a)if(e=arguments[a],e!=null)for(n in e)r=Cu(l,n),i=Cu(e,n),l!==i&&(c&&i&&(_u(i)||(o=vu(i)))?(o?(o=!1,s=r&&vu(r)?r:[]):s=r&&_u(r)?r:{},Su(l,{name:n,newValue:t(c,s,i)})):typeof i<"u"&&Su(l,{name:n,newValue:i}));return l};const Wo=ud(fb);function Js(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function hb(){const t=[],e={run:n,use:r};return e;function n(...i){let o=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...i);function l(a,...u){const c=t[++o];let f=-1;if(a){s(a);return}for(;++f<i.length;)(u[f]===null||u[f]===void 0)&&(u[f]=i[f]);i=u,c?pb(c,l)(...u):s(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}function pb(t,e){let n;return r;function r(...s){const l=t.length>s.length;let a;l&&s.push(i);try{a=t.apply(this,s)}catch(u){const c=u;if(l&&n)throw c;return i(c)}l||(a&&a.then&&typeof a.then=="function"?a.then(o,i):a instanceof Error?i(a):o(a))}function i(s,...l){n||(n=!0,e(s,...l))}function o(s){i(null,s)}}class Fe extends Error{constructor(e,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof e=="string"?i=e:!o.cause&&e&&(s=!0,i=e.message,o.cause=e),!o.ruleId&&!o.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?o.ruleId=r:(o.source=r.slice(0,a),o.ruleId=r.slice(a+1))}if(!o.place&&o.ancestors&&o.ancestors){const a=o.ancestors[o.ancestors.length-1];a&&(o.place=a.position)}const l=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=l?l.line:void 0,this.name=Ir(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Fe.prototype.file="";Fe.prototype.name="";Fe.prototype.reason="";Fe.prototype.message="";Fe.prototype.stack="";Fe.prototype.column=void 0;Fe.prototype.line=void 0;Fe.prototype.ancestors=void 0;Fe.prototype.cause=void 0;Fe.prototype.fatal=void 0;Fe.prototype.place=void 0;Fe.prototype.ruleId=void 0;Fe.prototype.source=void 0;const ht={basename:db,dirname:mb,extname:gb,join:yb,sep:"/"};function db(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');ni(t);let n=0,r=-1,i=t.length,o;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":t.slice(n,r)}if(e===t)return"";let s=-1,l=e.length-1;for(;i--;)if(t.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),l>-1&&(t.codePointAt(i)===e.codePointAt(l--)?l<0&&(r=i):(l=-1,r=s));return n===r?r=s:r<0&&(r=t.length),t.slice(n,r)}function mb(t){if(ni(t),t.length===0)return".";let e=-1,n=t.length,r;for(;--n;)if(t.codePointAt(n)===47){if(r){e=n;break}}else r||(r=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function gb(t){ni(t);let e=t.length,n=-1,r=0,i=-1,o=0,s;for(;e--;){const l=t.codePointAt(e);if(l===47){if(s){r=e+1;break}continue}n<0&&(s=!0,n=e+1),l===46?i<0?i=e:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":t.slice(i,n)}function yb(...t){let e=-1,n;for(;++e<t.length;)ni(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":bb(n)}function bb(t){ni(t);const e=t.codePointAt(0)===47;let n=wb(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function wb(t,e){let n="",r=0,i=-1,o=0,s=-1,l,a;for(;++s<=t.length;){if(s<t.length)l=t.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(i===s-1||o===1))if(i!==s-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(a=n.lastIndexOf("/"),a!==n.length-1){a<0?(n="",r=0):(n=n.slice(0,a),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}e&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+t.slice(i+1,s):n=t.slice(i+1,s),r=s-i-1;i=s,o=0}else l===46&&o>-1?o++:o=-1}return n}function ni(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const xb={cwd:kb};function kb(){return"/"}function Ks(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function vb(t){if(typeof t=="string")t=new URL(t);else if(!Ks(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return _b(t)}function _b(t){if(t.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const e=t.pathname;let n=-1;for(;++n<e.length;)if(e.codePointAt(n)===37&&e.codePointAt(n+1)===50){const r=e.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(e)}const Uo=["history","path","basename","stem","extname","dirname"];class Sb{constructor(e){let n;e?Ks(e)?n={path:e}:typeof e=="string"||Cb(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":xb.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Uo.length;){const o=Uo[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Uo.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?ht.basename(this.path):void 0}set basename(e){Ko(e,"basename"),Jo(e,"basename"),this.path=ht.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?ht.dirname(this.path):void 0}set dirname(e){Ou(this.basename,"dirname"),this.path=ht.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?ht.extname(this.path):void 0}set extname(e){if(Jo(e,"extname"),Ou(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ht.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Ks(e)&&(e=vb(e)),Ko(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?ht.basename(this.path,this.extname):void 0}set stem(e){Ko(e,"stem"),Jo(e,"stem"),this.path=ht.join(this.dirname||"",e+(this.extname||""))}fail(e,n,r){const i=this.message(e,n,r);throw i.fatal=!0,i}info(e,n,r){const i=this.message(e,n,r);return i.fatal=void 0,i}message(e,n,r){const i=new Fe(e,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function Jo(t,e){if(t&&t.includes(ht.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+ht.sep+"`")}function Ko(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function Ou(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function Cb(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const Ob=function(t){const r=this.constructor.prototype,i=r[t],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},Ab={}.hasOwnProperty;class Ll extends Ob{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=hb()}copy(){const e=new Ll;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];e.use(...r)}return e.data(Wo(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(Xo("data",this.frozen),this.namespace[e]=n,this):Ab.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Xo("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(e,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=vi(e),r=this.parser||this.Parser;return Yo("parse",r),r(String(n),n)}process(e,n){const r=this;return this.freeze(),Yo("process",this.parser||this.Parser),Go("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){const l=vi(e),a=r.parse(l);r.run(a,l,function(c,f,h){if(c||!f||!h)return u(c);const p=f,d=r.stringify(p,h);Mb(d)?h.value=d:h.result=d,u(c,h)});function u(c,f){c||!f?s(c):o?o(f):n(void 0,f)}}}processSync(e){let n=!1,r;return this.freeze(),Yo("processSync",this.parser||this.Parser),Go("processSync",this.compiler||this.Compiler),this.process(e,i),Eu("processSync","process",n),r;function i(o,s){n=!0,wu(o),r=s}}run(e,n,r){Au(e),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(s,l){const a=vi(n);i.run(e,a,u);function u(c,f,h){const p=f||e;c?l(c):s?s(p):r(void 0,p,h)}}}runSync(e,n){let r=!1,i;return this.run(e,n,o),Eu("runSync","run",r),i;function o(s,l){wu(s),i=l,r=!0}}stringify(e,n){this.freeze();const r=vi(n),i=this.compiler||this.Compiler;return Go("stringify",i),Au(e),i(e,r)}use(e,...n){const r=this.attachers,i=this.namespace;if(Xo("use",this.frozen),e!=null)if(typeof e=="function")a(e,n);else if(typeof e=="object")Array.isArray(e)?l(e):s(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function o(u){if(typeof u=="function")a(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...f]=u;a(c,f)}else s(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function s(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(u.plugins),u.settings&&(i.settings=Wo(!0,i.settings,u.settings))}function l(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const f=u[c];o(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function a(u,c){let f=-1,h=-1;for(;++f<r.length;)if(r[f][0]===u){h=f;break}if(h===-1)r.push([u,...c]);else if(c.length>0){let[p,...d]=c;const m=r[h][1];Js(m)&&Js(p)&&(p=Wo(!0,m,p)),r[h]=[u,p,...d]}}}}const R8=new Ll().freeze();function Yo(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Go(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Xo(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Au(t){if(!Js(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Eu(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function vi(t){return Eb(t)?t:new Sb(t)}function Eb(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function Mb(t){return typeof t=="string"||Tb(t)}function Tb(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const gh=65535,yh=Math.pow(2,16);function Nb(t,e){return t+e*yh}function Mu(t){return t&gh}function Db(t){return(t-(t&gh))/yh}const bh=1,wh=2,Bi=4,xh=8;class Ys{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&xh)>0}get deletedBefore(){return(this.delInfo&(bh|Bi))>0}get deletedAfter(){return(this.delInfo&(wh|Bi))>0}get deletedAcross(){return(this.delInfo&Bi)>0}}class Ve{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Ve.empty)return Ve.empty}recover(e){let n=0,r=Mu(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+Db(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?i:0);if(a>e)break;let u=this.ranges[l+o],c=this.ranges[l+s],f=a+u;if(e<=f){let h=u?e==a?-1:e==f?1:n:n,p=a+i+(h<0?0:c);if(r)return p;let d=e==(n<0?a:f)?null:Nb(l/3,e-a),m=e==a?wh:e==f?bh:Bi;return(n<0?e!=a:e!=f)&&(m|=xh),new Ys(p,m,d)}i+=c-u}return r?e+i:new Ys(e+i,0,null)}touches(e,n){let r=0,i=Mu(n),o=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let u=this.ranges[l+o],c=a+u;if(e<=c&&l==i*3)return!0;r+=this.ranges[l+s]-u}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],l=s-(this.inverted?o:0),a=s+(this.inverted?0:o),u=this.ranges[i+n],c=this.ranges[i+r];e(l,l+u,a,a+c),o+=c-u}}invert(){return new Ve(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Ve.empty:new Ve(e<0?[0,-e,0]:[0,0,e])}}Ve.empty=new Ve([]);class Hn{constructor(e=[],n,r=0,i=e.length){this.maps=e,this.mirror=n,this.from=r,this.to=i}slice(e=0,n=this.maps.length){return new Hn(this.maps,this.mirror,e,n)}copy(){return new Hn(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,n){this.to=this.maps.push(e),n!=null&&this.setMirror(this.maps.length-1,n)}appendMapping(e){for(let n=0,r=this.maps.length;n<e.maps.length;n++){let i=e.getMirror(n);this.appendMap(e.maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this.maps.length+e.maps.length;n>=0;n--){let i=e.getMirror(n);this.appendMap(e.maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let e=new Hn;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this.maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this.maps[o],l=s.mapResult(e,n);if(l.recover!=null){let a=this.getMirror(o);if(a!=null&&a>o&&a<this.to){o=a,e=this.maps[a].recover(l.recover);continue}}i|=l.delInfo,e=l.pos}return r?e:new Ys(e,i,null)}}const Qo=Object.create(null);class ke{getMap(){return Ve.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Qo[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Qo)throw new RangeError("Duplicate use of step JSON ID "+e);return Qo[e]=n,n.prototype.jsonID=e,n}}class le{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new le(e,null)}static fail(e){return new le(null,e)}static fromReplace(e,n,r,i){try{return le.ok(e.replace(n,r,i))}catch(o){if(o instanceof Ki)return le.fail(o.message);throw o}}}function Vl(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let o=t.child(i);o.content.size&&(o=o.copy(Vl(o.content,e,o))),o.isInline&&(o=e(o,n,i)),r.push(o)}return M.fromArray(r)}class qt extends ke{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new R(Vl(n.content,(s,l)=>!s.isAtom||!l.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),n.openStart,n.openEnd);return le.fromReplace(e,this.from,this.to,o)}invert(){return new dt(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new qt(n.pos,r.pos,this.mark)}merge(e){return e instanceof qt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new qt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new qt(n.from,n.to,e.markFromJSON(n.mark))}}ke.jsonID("addMark",qt);class dt extends ke{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new R(Vl(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return le.fromReplace(e,this.from,this.to,r)}invert(){return new qt(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new dt(n.pos,r.pos,this.mark)}merge(e){return e instanceof dt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new dt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new dt(n.from,n.to,e.markFromJSON(n.mark))}}ke.jsonID("removeMark",dt);class $t extends ke{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return le.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return le.fromReplace(e,this.pos,this.pos+1,new R(M.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new $t(this.pos,n.marks[i]);return new $t(this.pos,this.mark)}}return new tr(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new $t(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new $t(n.pos,e.markFromJSON(n.mark))}}ke.jsonID("addNodeMark",$t);class tr extends ke{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return le.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return le.fromReplace(e,this.pos,this.pos+1,new R(M.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new $t(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new tr(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new tr(n.pos,e.markFromJSON(n.mark))}}ke.jsonID("removeNodeMark",tr);class be extends ke{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&Gs(e,this.from,this.to)?le.fail("Structure replace would overwrite content"):le.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Ve([this.from,this.to-this.from,this.slice.size])}invert(e){return new be(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new be(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(e){if(!(e instanceof be)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?R.empty:new R(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new be(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?R.empty:new R(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new be(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new be(n.from,n.to,R.fromJSON(e,n.slice),!!n.structure)}}ke.jsonID("replace",be);class xe extends ke{constructor(e,n,r,i,o,s,l=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=l}apply(e){if(this.structure&&(Gs(e,this.from,this.gapFrom)||Gs(e,this.gapTo,this.to)))return le.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return le.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?le.fromReplace(e,this.from,this.to,r):le.fail("Content does not fit in gap")}getMap(){return new Ve([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new xe(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new xe(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new xe(n.from,n.to,n.gapFrom,n.gapTo,R.fromJSON(e,n.slice),n.insert,!!n.structure)}}ke.jsonID("replaceAround",xe);function Gs(t,e,n){let r=t.resolve(e),i=n-e,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function Ib(t,e,n,r){let i=[],o=[],s,l;t.doc.nodesBetween(e,n,(a,u,c)=>{if(!a.isInline)return;let f=a.marks;if(!r.isInSet(f)&&c.type.allowsMarkType(r.type)){let h=Math.max(u,e),p=Math.min(u+a.nodeSize,n),d=r.addToSet(f);for(let m=0;m<f.length;m++)f[m].isInSet(d)||(s&&s.to==h&&s.mark.eq(f[m])?s.to=p:i.push(s=new dt(h,p,f[m])));l&&l.to==h?l.to=p:o.push(l=new qt(h,p,r))}}),i.forEach(a=>t.step(a)),o.forEach(a=>t.step(a))}function Rb(t,e,n,r){let i=[],o=0;t.doc.nodesBetween(e,n,(s,l)=>{if(!s.isInline)return;o++;let a=null;if(r instanceof bo){let u=s.marks,c;for(;c=r.isInSet(u);)(a||(a=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(s.marks)&&(a=[r]):a=s.marks;if(a&&a.length){let u=Math.min(l+s.nodeSize,n);for(let c=0;c<a.length;c++){let f=a[c],h;for(let p=0;p<i.length;p++){let d=i[p];d.step==o-1&&f.eq(i[p].style)&&(h=d)}h?(h.to=u,h.step=o):i.push({style:f,from:Math.max(l,e),to:u,step:o})}}}),i.forEach(s=>t.step(new dt(s.from,s.to,s.style)))}function kh(t,e,n,r=n.contentMatch,i=!0){let o=t.doc.nodeAt(e),s=[],l=e+1;for(let a=0;a<o.childCount;a++){let u=o.child(a),c=l+u.nodeSize,f=r.matchType(u.type);if(!f)s.push(new be(l,c,R.empty));else{r=f;for(let h=0;h<u.marks.length;h++)n.allowsMarkType(u.marks[h].type)||t.step(new dt(l,c,u.marks[h]));if(i&&u.isText&&n.whitespace!="pre"){let h,p=/\r?\n|\r/g,d;for(;h=p.exec(u.text);)d||(d=new R(M.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),s.push(new be(l+h.index,l+h.index+h[0].length,d))}}l=c}if(!r.validEnd){let a=r.fillBefore(M.empty,!0);t.replace(l,l,new R(a,0,0))}for(let a=s.length-1;a>=0;a--)t.step(s[a])}function zb(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function _o(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth;;--r){let i=t.$from.node(r),o=t.$from.index(r),s=t.$to.indexAfter(r);if(r<t.depth&&i.canReplace(o,s,n))return r;if(r==0||i.type.spec.isolating||!zb(i,o,s))break}return null}function Pb(t,e,n){let{$from:r,$to:i,depth:o}=e,s=r.before(o+1),l=i.after(o+1),a=s,u=l,c=M.empty,f=0;for(let d=o,m=!1;d>n;d--)m||r.index(d)>0?(m=!0,c=M.from(r.node(d).copy(c)),f++):a--;let h=M.empty,p=0;for(let d=o,m=!1;d>n;d--)m||i.after(d+1)<i.end(d)?(m=!0,h=M.from(i.node(d).copy(h)),p++):u++;t.step(new xe(a,u,s,l,new R(c.append(h),f,p),c.size-f,!0))}function vh(t,e,n=null,r=t){let i=Fb(t,e),o=i&&Bb(r,e);return o?i.map(Tu).concat({type:e,attrs:n}).concat(o.map(Tu)):null}function Tu(t){return{type:t,attrs:null}}function Fb(t,e){let{parent:n,startIndex:r,endIndex:i}=t,o=n.contentMatchAt(r).findWrapping(e);if(!o)return null;let s=o.length?o[0]:e;return n.canReplaceWith(r,i,s)?o:null}function Bb(t,e){let{parent:n,startIndex:r,endIndex:i}=t,o=n.child(r),s=e.contentMatch.findWrapping(o.type);if(!s)return null;let a=(s.length?s[s.length-1]:e).contentMatch;for(let u=r;a&&u<i;u++)a=a.matchType(n.child(u).type);return!a||!a.validEnd?null:s}function Lb(t,e,n){let r=M.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let l=n[s].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=M.from(n[s].type.create(n[s].attrs,r))}let i=e.start,o=e.end;t.step(new xe(i,o,i,o,new R(r,0,0),n.length,!0))}function Vb(t,e,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=t.steps.length;t.doc.nodesBetween(e,n,(s,l)=>{let a=typeof i=="function"?i(s):i;if(s.isTextblock&&!s.hasMarkup(r,a)&&qb(t.doc,t.mapping.slice(o).map(l),r)){let u=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",d=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!d?u=!1:!p&&d&&(u=!0)}u===!1&&jb(t,s,l,o),kh(t,t.mapping.slice(o).map(l,1),r,void 0,u===null);let c=t.mapping.slice(o),f=c.map(l,1),h=c.map(l+s.nodeSize,1);return t.step(new xe(f,h,f+1,h-1,new R(M.from(r.create(a,null,s.marks)),0,0),1,!0)),u===!0&&Hb(t,s,l,o),!1}})}function Hb(t,e,n,r){e.forEach((i,o)=>{if(i.isText){let s,l=/\r?\n|\r/g;for(;s=l.exec(i.text);){let a=t.mapping.slice(r).map(n+1+o+s.index);t.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function jb(t,e,n,r){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+o);t.replaceWith(s,s+1,e.type.schema.text(` |
| 61 |
`))}})}function qb(t,e,n){let r=t.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function $b(t,e,n,r,i){let o=t.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let s=n.create(r,null,i||o.marks);if(o.isLeaf)return t.replaceWith(e,e+o.nodeSize,s);if(!n.validContent(o.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new xe(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new R(M.from(s),0,0),1,!0))}function Rr(t,e,n=1,r){let i=t.resolve(e),o=i.depth-n,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let u=i.depth-1,c=n-2;u>o;u--,c--){let f=i.node(u),h=i.index(u);if(f.type.spec.isolating)return!1;let p=f.content.cutByIndex(h,f.childCount),d=r&&r[c+1];d&&(p=p.replaceChild(0,d.type.create(d.attrs)));let m=r&&r[c]||f;if(!f.canReplace(h+1,f.childCount)||!m.type.validContent(p))return!1}let l=i.indexAfter(o),a=r&&r[0];return i.node(o).canReplaceWith(l,l,a?a.type:i.node(o+1).type)}function Wb(t,e,n=1,r){let i=t.doc.resolve(e),o=M.empty,s=M.empty;for(let l=i.depth,a=i.depth-n,u=n-1;l>a;l--,u--){o=M.from(i.node(l).copy(o));let c=r&&r[u];s=M.from(c?c.type.create(c.attrs,s):i.node(l).copy(s))}t.step(new be(e,e,new R(o.append(s),n,n),!0))}function So(t,e){let n=t.resolve(e),r=n.index();return Ub(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Ub(t,e){return!!(t&&e&&!t.isLeaf&&t.canAppend(e))}function Jb(t,e,n){let r=new be(e-n,e+n,R.empty,!0);t.step(r)}function Kb(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let o=r.index(i);if(r.node(i).canReplaceWith(o,o,n))return r.before(i+1);if(o>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let o=r.indexAfter(i);if(r.node(i).canReplaceWith(o,o,n))return r.after(i+1);if(o<r.node(i).childCount)return null}return null}function Yb(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let i=n.content;for(let o=0;o<n.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let s=r.depth;s>=0;s--){let l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,a=r.index(s)+(l>0?1:0),u=r.node(s),c=!1;if(o==1)c=u.canReplace(a,a,i);else{let f=u.contentMatchAt(a).findWrapping(i.firstChild.type);c=f&&u.canReplaceWith(a,a,f[0])}if(c)return l==0?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function Hl(t,e,n=e,r=R.empty){if(e==n&&!r.size)return null;let i=t.resolve(e),o=t.resolve(n);return _h(i,o,r)?new be(e,n,r):new Gb(i,o,r).fit()}function _h(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class Gb{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=M.empty;for(let i=0;i<=e.depth;i++){let o=e.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=M.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let o=this.placed,s=r.depth,l=i.depth;for(;s&&l&&o.childCount==1;)o=o.firstChild.content,s--,l--;let a=new R(o,s,l);return e>-1?new xe(r.pos,e,this.$to.pos,this.$to.end(),a,n):a.size||r.pos!=this.$to.pos?new be(r.pos,i.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<e;r++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){e=r;break}n=o.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=Zo(this.unplaced.content,r-1).firstChild,i=o.content):i=this.unplaced.content;let s=i.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:u}=this.frontier[l],c,f=null;if(n==1&&(s?u.matchType(s.type)||(f=u.fillBefore(M.from(s),!1)):o&&a.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:l,parent:o,inject:f};if(n==2&&s&&(c=u.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:l,parent:o,wrap:c};if(o&&u.matchType(o.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=Zo(e,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new R(e,n+1,Math.max(r,i.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=Zo(e,n);if(i.childCount<=1&&n>0){let o=e.size-n<=n+i.size;this.unplaced=new R(xr(e,n-1,1),n-1,o?n-1:r)}else this.unplaced=new R(xr(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:i,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let m=0;m<o.length;m++)this.openFrontierNode(o[m]);let s=this.unplaced,l=r?r.content:s.content,a=s.openStart-e,u=0,c=[],{match:f,type:h}=this.frontier[n];if(i){for(let m=0;m<i.childCount;m++)c.push(i.child(m));f=f.matchFragment(i)}let p=l.size+e-(s.content.size-s.openEnd);for(;u<l.childCount;){let m=l.child(u),y=f.matchType(m.type);if(!y)break;u++,(u>1||a==0||m.content.size)&&(f=y,c.push(Sh(m.mark(h.allowedMarks(m.marks)),u==1?a:0,u==l.childCount?p:-1)))}let d=u==l.childCount;d||(p=-1),this.placed=kr(this.placed,n,M.from(c)),this.frontier[n].match=f,d&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,y=l;m<p;m++){let g=y.lastChild;this.frontier.push({type:g.type,match:g.contentMatchAt(g.childCount)}),y=g.content}this.unplaced=d?e==0?R.empty:new R(xr(s.content,e-1,1),e-1,p<0?s.openEnd:e-1):new R(xr(s.content,e,u),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!es(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],o=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),s=es(e,n,i,r,o);if(s){for(let l=n-1;l>=0;l--){let{match:a,type:u}=this.frontier[l],c=es(e,l,u,a,!0);if(!c||c.childCount)continue e}return{depth:n,fit:s,move:o?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=kr(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let i=e.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,o)}return e}openFrontierNode(e,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=kr(this.placed,this.depth,M.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(M.empty,!0);n.childCount&&(this.placed=kr(this.placed,this.frontier.length,n))}}function xr(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(xr(t.firstChild.content,e-1,n)))}function kr(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(kr(t.lastChild.content,e-1,n)))}function Zo(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function Sh(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,Sh(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(M.empty,!0)))),t.copy(r)}function es(t,e,n,r,i){let o=t.node(e),s=i?t.indexAfter(e):t.index(e);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let l=r.fillBefore(o.content,!0,s);return l&&!Xb(n,o.content,s)?l:null}function Xb(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function Qb(t){return t.spec.defining||t.spec.definingForContent}function Zb(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let i=t.doc.resolve(e),o=t.doc.resolve(n);if(_h(i,o,r))return t.step(new be(e,n,r));let s=Oh(i,t.doc.resolve(n));s[s.length-1]==0&&s.pop();let l=-(i.depth+1);s.unshift(l);for(let h=i.depth,p=i.pos-1;h>0;h--,p--){let d=i.node(h).type.spec;if(d.defining||d.definingAsContext||d.isolating)break;s.indexOf(h)>-1?l=h:i.before(h)==p&&s.splice(1,0,-h)}let a=s.indexOf(l),u=[],c=r.openStart;for(let h=r.content,p=0;;p++){let d=h.firstChild;if(u.push(d),p==r.openStart)break;h=d.content}for(let h=c-1;h>=0;h--){let p=u[h],d=Qb(p.type);if(d&&!p.sameMarkup(i.node(Math.abs(l)-1)))c=h;else if(d||!p.type.isTextblock)break}for(let h=r.openStart;h>=0;h--){let p=(h+c+1)%(r.openStart+1),d=u[p];if(d)for(let m=0;m<s.length;m++){let y=s[(m+a)%s.length],g=!0;y<0&&(g=!1,y=-y);let _=i.node(y-1),x=i.index(y-1);if(_.canReplaceWith(x,x,d.type,d.marks))return t.replace(i.before(y),g?o.after(y):n,new R(Ch(r.content,0,r.openStart,p),p,r.openEnd))}}let f=t.steps.length;for(let h=s.length-1;h>=0&&(t.replace(e,n,r),!(t.steps.length>f));h--){let p=s[h];p<0||(e=i.before(p),n=o.after(p))}}function Ch(t,e,n,r,i){if(e<n){let o=t.firstChild;t=t.replaceChild(0,o.copy(Ch(o.content,e+1,n,r,o)))}if(e>r){let o=i.contentMatchAt(0),s=o.fillBefore(t).append(t);t=s.append(o.matchFragment(s).fillBefore(M.empty,!0))}return t}function ew(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let i=Kb(t.doc,e,r.type);i!=null&&(e=n=i)}t.replaceRange(e,n,new R(M.from(r),0,0))}function tw(t,e,n){let r=t.doc.resolve(e),i=t.doc.resolve(n),o=Oh(r,i);for(let s=0;s<o.length;s++){let l=o[s],a=s==o.length-1;if(a&&l==0||r.node(l).type.contentMatch.validEnd)return t.delete(r.start(l),i.end(l));if(l>0&&(a||r.node(l-1).canReplace(r.index(l-1),i.indexAfter(l-1))))return t.delete(r.before(l),i.after(l))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(e-r.start(s)==r.depth-s&&n>r.end(s)&&i.end(s)-n!=i.depth-s)return t.delete(r.before(s),n);t.delete(e,n)}function Oh(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let i=r;i>=0;i--){let o=t.start(i);if(o<t.pos-(t.depth-i)||e.end(i)>e.pos+(e.depth-i)||t.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(o==e.start(i)||i==t.depth&&i==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==o-1)&&n.push(i)}return n}class jn extends ke{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return le.fail("No node at attribute step's position");let r=Object.create(null);for(let o in n.attrs)r[o]=n.attrs[o];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return le.fromReplace(e,this.pos,this.pos+1,new R(M.from(i),0,n.isLeaf?0:1))}getMap(){return Ve.empty}invert(e){return new jn(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new jn(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new jn(n.pos,n.attr,n.value)}}ke.jsonID("attr",jn);class Ur extends ke{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let i in e.attrs)n[i]=e.attrs[i];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return le.ok(r)}getMap(){return Ve.empty}invert(e){return new Ur(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Ur(n.attr,n.value)}}ke.jsonID("docAttr",Ur);let nr=class extends Error{};nr=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};nr.prototype=Object.create(Error.prototype);nr.prototype.constructor=nr;nr.prototype.name="TransformError";class Ah{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Hn}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new nr(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=R.empty){let i=Hl(this.doc,e,n,r);return i&&this.step(i),this}replaceWith(e,n,r){return this.replace(e,n,new R(M.from(r),0,0))}delete(e,n){return this.replace(e,n,R.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return Zb(this,e,n,r),this}replaceRangeWith(e,n,r){return ew(this,e,n,r),this}deleteRange(e,n){return tw(this,e,n),this}lift(e,n){return Pb(this,e,n),this}join(e,n=1){return Jb(this,e,n),this}wrap(e,n){return Lb(this,e,n),this}setBlockType(e,n=e,r,i=null){return Vb(this,e,n,r,i),this}setNodeMarkup(e,n,r=null,i){return $b(this,e,n,r,i),this}setNodeAttribute(e,n,r){return this.step(new jn(e,n,r)),this}setDocAttribute(e,n){return this.step(new Ur(e,n)),this}addNodeMark(e,n){return this.step(new $t(e,n)),this}removeNodeMark(e,n){if(!(n instanceof ee)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n=n.isInSet(r.marks),!n)return this}return this.step(new tr(e,n)),this}split(e,n=1,r){return Wb(this,e,n,r),this}addMark(e,n,r){return Ib(this,e,n,r),this}removeMark(e,n,r){return Rb(this,e,n,r),this}clearIncompatible(e,n,r){return kh(this,e,n,r),this}}const ts=Object.create(null);class ${constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new to(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=R.empty){let r=n.content.lastChild,i=null;for(let l=0;l<n.openEnd;l++)i=r,r=r.lastChild;let o=e.steps.length,s=this.ranges;for(let l=0;l<s.length;l++){let{$from:a,$to:u}=s[l],c=e.mapping.slice(o);e.replaceRange(c.map(a.pos),c.map(u.pos),l?R.empty:n),l==0&&Iu(e,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:s,$to:l}=i[o],a=e.mapping.slice(r),u=a.map(s.pos),c=a.map(l.pos);o?e.deleteRange(u,c):(e.replaceRangeWith(u,c,n),Iu(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let i=e.parent.inlineContent?new X(e):Pn(e.node(0),e.parent,e.pos,e.index(),n,r);if(i)return i;for(let o=e.depth-1;o>=0;o--){let s=n<0?Pn(e.node(0),e.node(o),e.before(o+1),e.index(o),n,r):Pn(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,n,r);if(s)return s}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new qe(e.node(0))}static atStart(e){return Pn(e,e,0,0,1)||new qe(e)}static atEnd(e){return Pn(e,e,e.content.size,e.childCount,-1)||new qe(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=ts[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in ts)throw new RangeError("Duplicate use of selection JSON ID "+e);return ts[e]=n,n.prototype.jsonID=e,n}getBookmark(){return X.between(this.$anchor,this.$head).getBookmark()}}$.prototype.visible=!0;class to{constructor(e,n){this.$from=e,this.$to=n}}let Nu=!1;function Du(t){!Nu&&!t.parent.inlineContent&&(Nu=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class X extends ${constructor(e,n=e){Du(e),Du(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return $.near(r);let i=e.resolve(n.map(this.anchor));return new X(i.parent.inlineContent?i:r,r)}replace(e,n=R.empty){if(super.replace(e,n),n==R.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof X&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Co(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new X(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let i=e.resolve(n);return new this(i,r==n?i:e.resolve(r))}static between(e,n,r){let i=e.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let o=$.findFrom(n,r,!0)||$.findFrom(n,-r,!0);if(o)n=o.$head;else return $.near(n,r)}return e.parent.inlineContent||(i==0?e=n:(e=($.findFrom(e,-r,!0)||$.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=i<0&&(e=n))),new X(e,n)}}$.jsonID("text",X);class Co{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Co(e.map(this.anchor),e.map(this.head))}resolve(e){return X.between(e.resolve(this.anchor),e.resolve(this.head))}}class j extends ${constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),o=e.resolve(i);return r?$.near(o):new j(o)}content(){return new R(M.from(this.node),0,0)}eq(e){return e instanceof j&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new jl(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new j(e.resolve(n.anchor))}static create(e,n){return new j(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}j.prototype.visible=!1;$.jsonID("node",j);class jl{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new Co(r,r):new jl(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&j.isSelectable(r)?new j(n):$.near(n)}}class qe extends ${constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=R.empty){if(n==R.empty){e.delete(0,e.doc.content.size);let r=$.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new qe(e)}map(e){return new qe(e)}eq(e){return e instanceof qe}getBookmark(){return nw}}$.jsonID("all",qe);const nw={map(){return this},resolve(t){return new qe(t)}};function Pn(t,e,n,r,i,o=!1){if(e.inlineContent)return X.create(t,n);for(let s=r-(i>0?0:1);i>0?s<e.childCount:s>=0;s+=i){let l=e.child(s);if(l.isAtom){if(!o&&j.isSelectable(l))return j.create(t,n-(i<0?l.nodeSize:0))}else{let a=Pn(t,l,n+i,i<0?l.childCount:0,i,o);if(a)return a}n+=l.nodeSize*i}return null}function Iu(t,e,n){let r=t.steps.length-1;if(r<e)return;let i=t.steps[r];if(!(i instanceof be||i instanceof xe))return;let o=t.mapping.maps[r],s;o.forEach((l,a,u,c)=>{s==null&&(s=c)}),t.setSelection($.near(t.doc.resolve(s),n))}const Ru=1,_i=2,zu=4;class rw extends Ah{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|Ru)&~_i,this.storedMarks=null,this}get selectionSet(){return(this.updated&Ru)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=_i,this}ensureMarks(e){return ee.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&_i)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~_i,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||ee.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let i=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!e)return this.deleteRange(n,r);let o=this.storedMarks;if(!o){let s=this.doc.resolve(n);o=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,i.text(e,o)),this.selection.empty||this.setSelection($.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=zu,this}get scrolledIntoView(){return(this.updated&zu)>0}}function Pu(t,e){return!e||!t?t:t.bind(e)}class vr{constructor(e,n,r){this.name=e,this.init=Pu(n.init,r),this.apply=Pu(n.apply,r)}}const iw=[new vr("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new vr("selection",{init(t,e){return t.selection||$.atStart(e.doc)},apply(t){return t.selection}}),new vr("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new vr("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class ns{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=iw.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new vr(r.key,r.spec.state,r))})}}class _r{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),i=null;for(;;){let o=!1;for(let s=0;s<this.config.plugins.length;s++){let l=this.config.plugins[s];if(l.spec.appendTransaction){let a=i?i[s].n:0,u=i?i[s].state:this,c=a<n.length&&l.spec.appendTransaction.call(l,a?n.slice(a):n,u,r);if(c&&r.filterTransaction(c,s)){if(c.setMeta("appendedTransaction",e),!i){i=[];for(let f=0;f<this.config.plugins.length;f++)i.push(f<s?{state:r,n:n.length}:{state:this,n:0})}n.push(c),r=r.applyInner(c),o=!0}i&&(i[s]={state:r,n:n.length})}}if(!o)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new _r(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let o=r[i];n[o.name]=o.apply(e,this[o.name],this,n)}return n}get tr(){return new rw(this)}static create(e){let n=new ns(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new _r(n);for(let i=0;i<n.fields.length;i++)r[n.fields[i].name]=n.fields[i].init(e,r);return r}reconfigure(e){let n=new ns(this.schema,e.plugins),r=n.fields,i=new _r(n);for(let o=0;o<r.length;o++){let s=r[o].name;i[s]=this.hasOwnProperty(s)?this[s]:r[o].init(e,i)}return i}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[r],o=i.spec.state;o&&o.toJSON&&(n[r]=o.toJSON.call(i,this[i.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new ns(e.schema,e.plugins),o=new _r(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=wn.fromJSON(e.schema,n.doc);else if(s.name=="selection")o.selection=$.fromJSON(o.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(o.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],u=a.spec.state;if(a.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,l)){o[s.name]=u.fromJSON.call(a,e,n[l],o);return}}o[s.name]=s.init(e,o)}}),o}}function Eh(t,e,n){for(let r in t){let i=t[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=Eh(i,e,{})),n[r]=i}return n}class ar{constructor(e){this.spec=e,this.props={},e.props&&Eh(e.props,this,this.props),this.key=e.key?e.key.key:Mh("plugin")}getState(e){return e[this.key]}}const rs=Object.create(null);function Mh(t){return t in rs?t+"$"+ ++rs[t]:(rs[t]=0,t+"$")}class ur{constructor(e="key"){this.key=Mh(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}class nn{constructor(e,n,r={}){this.match=e,this.match=e,this.handler=typeof n=="string"?ow(n):n,this.undoable=r.undoable!==!1,this.inCode=r.inCode||!1}}function ow(t){return function(e,n,r,i){let o=t;if(n[1]){let s=n[0].lastIndexOf(n[1]);o+=n[0].slice(s+n[1].length),r+=s;let l=r-i;l>0&&(o=n[0].slice(s-l,s)+o,r=i)}return e.tr.insertText(o,r,i)}}const sw=500;function z8({rules:t}){let e=new ar({state:{init(){return null},apply(n,r){let i=n.getMeta(this);return i||(n.selectionSet||n.docChanged?null:r)}},props:{handleTextInput(n,r,i,o){return Fu(n,r,i,o,t,e)},handleDOMEvents:{compositionend:n=>{setTimeout(()=>{let{$cursor:r}=n.state.selection;r&&Fu(n,r.pos,r.pos,"",t,e)})}}},isInputRules:!0});return e}function Fu(t,e,n,r,i,o){if(t.composing)return!1;let s=t.state,l=s.doc.resolve(e),a=l.parent.textBetween(Math.max(0,l.parentOffset-sw),l.parentOffset,null,"")+r;for(let u=0;u<i.length;u++){let c=i[u];if(l.parent.type.spec.code){if(!c.inCode)continue}else if(c.inCode==="only")continue;let f=c.match.exec(a),h=f&&c.handler(s,f,e-(f[0].length-r.length),n);if(h)return c.undoable&&h.setMeta(o,{transform:h,from:e,to:n,text:r}),t.dispatch(h),!0}return!1}const P8=(t,e)=>{let n=t.plugins;for(let r=0;r<n.length;r++){let i=n[r],o;if(i.spec.isInputRules&&(o=i.getState(t))){if(e){let s=t.tr,l=o.transform;for(let a=l.steps.length-1;a>=0;a--)s.step(l.steps[a].invert(l.docs[a]));if(o.text){let a=s.doc.resolve(o.from).marks();s.replaceWith(o.from,o.to,t.schema.text(o.text,a))}else s.delete(o.from,o.to);e(s)}return!0}}return!1};new nn(/--$/,"—");new nn(/\.\.\.$/,"…");new nn(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“");new nn(/"$/,"”");new nn(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘");new nn(/'$/,"’");function F8(t,e,n=null,r){return new nn(t,(i,o,s,l)=>{let a=n instanceof Function?n(o):n,u=i.tr.delete(s,l),c=u.doc.resolve(s),f=c.blockRange(),h=f&&vh(f,e,a);if(!h)return null;u.wrap(f,h);let p=u.doc.resolve(s-1).nodeBefore;return p&&p.type==e&&So(u.doc,s-1)&&(!r||r(o,p))&&u.join(s-1),u})}function B8(t,e,n=null){return new nn(t,(r,i,o,s)=>{let l=r.doc.resolve(o),a=n instanceof Function?n(i):n;return l.node(-1).canReplaceWith(l.index(-1),l.indexAfter(-1),e)?r.tr.delete(o,s).setBlockType(o,o,e,a):null})}const Th=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function lw(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const aw=(t,e,n)=>{let r=lw(t,n);if(!r)return!1;let i=Nh(r);if(!i){let s=r.blockRange(),l=s&&_o(s);return l==null?!1:(e&&e(t.tr.lift(s,l).scrollIntoView()),!0)}let o=i.nodeBefore;if(Ih(t,i,e,-1))return!0;if(r.parent.content.size==0&&(rr(o,"end")||j.isSelectable(o)))for(let s=r.depth;;s--){let l=Hl(t.doc,r.before(s),r.after(s),R.empty);if(l&&l.slice.size<l.to-l.from){if(e){let a=t.tr.step(l);a.setSelection(rr(o,"end")?$.findFrom(a.doc.resolve(a.mapping.map(i.pos,-1)),-1):j.create(a.doc,i.pos-o.nodeSize)),e(a.scrollIntoView())}return!0}if(s==1||r.node(s-1).childCount>1)break}return o.isAtom&&i.depth==r.depth-1?(e&&e(t.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0):!1};function rr(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const uw=(t,e,n)=>{let{$head:r,empty:i}=t.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;o=Nh(r)}let s=o&&o.nodeBefore;return!s||!j.isSelectable(s)?!1:(e&&e(t.tr.setSelection(j.create(t.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)};function Nh(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function cw(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const fw=(t,e,n)=>{let r=cw(t,n);if(!r)return!1;let i=Dh(r);if(!i)return!1;let o=i.nodeAfter;if(Ih(t,i,e,1))return!0;if(r.parent.content.size==0&&(rr(o,"start")||j.isSelectable(o))){let s=Hl(t.doc,r.before(),r.after(),R.empty);if(s&&s.slice.size<s.to-s.from){if(e){let l=t.tr.step(s);l.setSelection(rr(o,"start")?$.findFrom(l.doc.resolve(l.mapping.map(i.pos)),1):j.create(l.doc,l.mapping.map(i.pos))),e(l.scrollIntoView())}return!0}}return o.isAtom&&i.depth==r.depth-1?(e&&e(t.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0):!1},hw=(t,e,n)=>{let{$head:r,empty:i}=t.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;o=Dh(r)}let s=o&&o.nodeAfter;return!s||!j.isSelectable(s)?!1:(e&&e(t.tr.setSelection(j.create(t.doc,o.pos)).scrollIntoView()),!0)};function Dh(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const pw=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(` |
| 62 |
`).scrollIntoView()),!0)};function ql(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const dw=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),s=ql(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(e){let l=n.after(),a=t.tr.replaceWith(l,l,s.createAndFill());a.setSelection($.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},mw=(t,e)=>{let n=t.selection,{$from:r,$to:i}=n;if(n instanceof qe||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=ql(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let s=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,l=t.tr.insert(s,o.createAndFill());l.setSelection(X.create(l.doc,s+1)),e(l.scrollIntoView())}return!0},gw=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(Rr(t.doc,o))return e&&e(t.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&_o(r);return i==null?!1:(e&&e(t.tr.lift(r,i).scrollIntoView()),!0)};function yw(t){return(e,n)=>{let{$from:r,$to:i}=e.selection;if(e.selection instanceof j&&e.selection.node.isBlock)return!r.parentOffset||!Rr(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(n){let o=i.parentOffset==i.parent.content.size,s=e.tr;(e.selection instanceof X||e.selection instanceof qe)&&s.deleteSelection();let l=r.depth==0?null:ql(r.node(-1).contentMatchAt(r.indexAfter(-1))),a=t&&t(i.parent,o,r),u=a?[a]:o&&l?[{type:l}]:void 0,c=Rr(s.doc,s.mapping.map(r.pos),1,u);if(!u&&!c&&Rr(s.doc,s.mapping.map(r.pos),1,l?[{type:l}]:void 0)&&(l&&(u=[{type:l}]),c=!0),c&&(s.split(s.mapping.map(r.pos),1,u),!o&&!r.parentOffset&&r.parent.type!=l)){let f=s.mapping.map(r.before()),h=s.doc.resolve(f);l&&r.node(-1).canReplaceWith(h.index(),h.index()+1,l)&&s.setNodeMarkup(s.mapping.map(r.before()),l)}n(s.scrollIntoView())}return!0}}const bw=yw(),ww=(t,e)=>(e&&e(t.tr.setSelection(new qe(t.doc))),!0);function xw(t,e,n){let r=e.nodeBefore,i=e.nodeAfter,o=e.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&e.parent.canReplace(o-1,o)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(o,o+1)||!(i.isTextblock||So(t.doc,e.pos))?!1:(n&&n(t.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),!0)}function Ih(t,e,n,r){let i=e.nodeBefore,o=e.nodeAfter,s,l,a=i.type.spec.isolating||o.type.spec.isolating;if(!a&&xw(t,e,n))return!0;let u=!a&&e.parent.canReplace(e.index(),e.index()+1);if(u&&(s=(l=i.contentMatchAt(i.childCount)).findWrapping(o.type))&&l.matchType(s[0]||o.type).validEnd){if(n){let p=e.pos+o.nodeSize,d=M.empty;for(let g=s.length-1;g>=0;g--)d=M.from(s[g].create(null,d));d=M.from(i.copy(d));let m=t.tr.step(new xe(e.pos-1,p,e.pos,p,new R(d,1,0),s.length,!0)),y=p+2*s.length;So(m.doc,y)&&m.join(y),n(m.scrollIntoView())}return!0}let c=o.type.spec.isolating||r>0&&a?null:$.findFrom(e,1),f=c&&c.$from.blockRange(c.$to),h=f&&_o(f);if(h!=null&&h>=e.depth)return n&&n(t.tr.lift(f,h).scrollIntoView()),!0;if(u&&rr(o,"start",!0)&&rr(i,"end")){let p=i,d=[];for(;d.push(p),!p.isTextblock;)p=p.lastChild;let m=o,y=1;for(;!m.isTextblock;m=m.firstChild)y++;if(p.canReplace(p.childCount,p.childCount,m.content)){if(n){let g=M.empty;for(let x=d.length-1;x>=0;x--)g=M.from(d[x].copy(g));let _=t.tr.step(new xe(e.pos-d.length,e.pos+o.nodeSize,e.pos+y,e.pos+o.nodeSize-y,new R(g,d.length,0),0,!0));n(_.scrollIntoView())}return!0}}return!1}function Rh(t){return function(e,n){let r=e.selection,i=t<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return i.node(o).isTextblock?(n&&n(e.tr.setSelection(X.create(e.doc,t<0?i.start(o):i.end(o)))),!0):!1}}const kw=Rh(-1),vw=Rh(1);function L8(t,e=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),l=s&&vh(s,t,e);return l?(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0):!1}}function V8(t,e=null){return function(n,r){let i=!1;for(let o=0;o<n.selection.ranges.length&&!i;o++){let{$from:{pos:s},$to:{pos:l}}=n.selection.ranges[o];n.doc.nodesBetween(s,l,(a,u)=>{if(i)return!1;if(!(!a.isTextblock||a.hasMarkup(t,e)))if(a.type==t)i=!0;else{let c=n.doc.resolve(u),f=c.index();i=c.parent.canReplaceWith(f,f+1,t)}})}if(!i)return!1;if(r){let o=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:l},$to:{pos:a}}=n.selection.ranges[s];o.setBlockType(l,a,t,e)}r(o.scrollIntoView())}return!0}}function _w(t,e,n,r){for(let i=0;i<e.length;i++){let{$from:o,$to:s}=e[i],l=o.depth==0?t.inlineContent&&t.type.allowsMarkType(n):!1;if(t.nodesBetween(o.pos,s.pos,(a,u)=>{if(l||!r&&a.isAtom&&a.isInline&&u>=o.pos&&u+a.nodeSize<=s.pos)return!1;l=a.inlineContent&&a.type.allowsMarkType(n)}),l)return!0}return!1}function Sw(t){let e=[];for(let n=0;n<t.length;n++){let{$from:r,$to:i}=t[n];r.doc.nodesBetween(r.pos,i.pos,(o,s)=>{if(o.isAtom&&o.content.size&&o.isInline&&s>=r.pos&&s+o.nodeSize<=i.pos)return s+1>r.pos&&e.push(new to(r,r.doc.resolve(s+1))),r=r.doc.resolve(s+1+o.content.size),!1}),r.pos<i.pos&&e.push(new to(r,i))}return e}function H8(t,e=null,n){let r=(n&&n.removeWhenPresent)!==!1,i=(n&&n.enterInlineAtoms)!==!1;return function(o,s){let{empty:l,$cursor:a,ranges:u}=o.selection;if(l&&!a||!_w(o.doc,u,t,i))return!1;if(s)if(a)t.isInSet(o.storedMarks||a.marks())?s(o.tr.removeStoredMark(t)):s(o.tr.addStoredMark(t.create(e)));else{let c,f=o.tr;i||(u=Sw(u)),r?c=!u.some(h=>o.doc.rangeHasMark(h.$from.pos,h.$to.pos,t)):c=!u.every(h=>{let p=!1;return f.doc.nodesBetween(h.$from.pos,h.$to.pos,(d,m,y)=>{if(p)return!1;p=!t.isInSet(d.marks)&&!!y&&y.type.allowsMarkType(t)&&!(d.isText&&/^\s*$/.test(d.textBetween(Math.max(0,h.$from.pos-m),Math.min(d.nodeSize,h.$to.pos-m))))}),!p});for(let h=0;h<u.length;h++){let{$from:p,$to:d}=u[h];if(!c)f.removeMark(p.pos,d.pos,t);else{let m=p.pos,y=d.pos,g=p.nodeAfter,_=d.nodeBefore,x=g&&g.isText?/^\s*/.exec(g.text)[0].length:0,S=_&&_.isText?/\s*$/.exec(_.text)[0].length:0;m+x<y&&(m+=x,y-=S),f.addMark(m,y,t.create(e))}}s(f.scrollIntoView())}return!0}}function $l(...t){return function(e,n,r){for(let i=0;i<t.length;i++)if(t[i](e,n,r))return!0;return!1}}let is=$l(Th,aw,uw),Bu=$l(Th,fw,hw);const At={Enter:$l(pw,mw,gw,bw),"Mod-Enter":dw,Backspace:is,"Mod-Backspace":is,"Shift-Backspace":is,Delete:Bu,"Mod-Delete":Bu,"Mod-a":ww},zh={"Ctrl-h":At.Backspace,"Alt-Backspace":At["Mod-Backspace"],"Ctrl-d":At.Delete,"Ctrl-Alt-Backspace":At["Mod-Delete"],"Alt-Delete":At["Mod-Delete"],"Alt-d":At["Mod-Delete"],"Ctrl-a":kw,"Ctrl-e":vw};for(let t in At)zh[t]=At[t];const Cw=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1,j8=Cw?zh:At;var Qt={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:"'"},no={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Ow=typeof navigator<"u"&&/Mac/.test(navigator.platform),Aw=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var de=0;de<10;de++)Qt[48+de]=Qt[96+de]=String(de);for(var de=1;de<=24;de++)Qt[de+111]="F"+de;for(var de=65;de<=90;de++)Qt[de]=String.fromCharCode(de+32),no[de]=String.fromCharCode(de);for(var ss in Qt)no.hasOwnProperty(ss)||(no[ss]=Qt[ss]);function Ew(t){var e=Ow&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||Aw&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?no:Qt)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const Mw=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function Tw(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,i,o,s;for(let l=0;l<e.length-1;l++){let a=e[l];if(/^(cmd|meta|m)$/i.test(a))s=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))i=!0;else if(/^s(hift)?$/i.test(a))o=!0;else if(/^mod$/i.test(a))Mw?s=!0:i=!0;else throw new Error("Unrecognized modifier name: "+a)}return r&&(n="Alt-"+n),i&&(n="Ctrl-"+n),s&&(n="Meta-"+n),o&&(n="Shift-"+n),n}function Nw(t){let e=Object.create(null);for(let n in t)e[Tw(n)]=t[n];return e}function ls(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function q8(t){return new ar({props:{handleKeyDown:Ph(t)}})}function Ph(t){let e=Nw(t);return function(n,r){let i=Ew(r),o,s=e[ls(i,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let l=e[ls(i,r,!1)];if(l&&l(n.state,n.dispatch,n))return!0}if((r.shiftKey||r.altKey||r.metaKey||i.charCodeAt(0)>127)&&(o=Qt[r.keyCode])&&o!=i){let l=e[ls(o,r)];if(l&&l(n.state,n.dispatch,n))return!0}}return!1}}const me=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},Jr=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let Xs=null;const Ot=function(t,e,n){let r=Xs||(Xs=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},Dw=function(){Xs=null},Cn=function(t,e,n,r){return n&&(Lu(t,e,n,r,-1)||Lu(t,e,n,r,1))},Iw=/^(img|br|input|textarea|hr)$/i;function Lu(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:Ue(t))){let o=t.parentNode;if(!o||o.nodeType!=1||ri(t)||Iw.test(t.nodeName)||t.contentEditable=="false")return!1;e=me(t)+(i<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.contentEditable=="false")return!1;e=i<0?Ue(t):0}else return!1}}function Ue(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Rw(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=Ue(t)}else if(t.parentNode&&!ri(t))e=me(t),t=t.parentNode;else return null}}function zw(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!ri(t))e=me(t)+1,t=t.parentNode;else return null}}function Pw(t,e,n){for(let r=e==0,i=e==Ue(t);r||i;){if(t==n)return!0;let o=me(t);if(t=t.parentNode,!t)return!1;r=r&&o==0,i=i&&o==Ue(t)}}function ri(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const Oo=function(t){return t.focusNode&&Cn(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function un(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function Fw(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Bw(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(Ue(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(Ue(r.startContainer),r.startOffset)}}}const bt=typeof navigator<"u"?navigator:null,Vu=typeof document<"u"?document:null,rn=bt&&bt.userAgent||"",Qs=/Edge\/(\d+)/.exec(rn),Fh=/MSIE \d/.exec(rn),Zs=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(rn),Pe=!!(Fh||Zs||Qs),Ut=Fh?document.documentMode:Zs?+Zs[1]:Qs?+Qs[1]:0,at=!Pe&&/gecko\/(\d+)/i.test(rn);at&&+(/Firefox\/(\d+)/.exec(rn)||[0,0])[1];const el=!Pe&&/Chrome\/(\d+)/.exec(rn),we=!!el,Bh=el?+el[1]:0,Ae=!Pe&&!!bt&&/Apple Computer/.test(bt.vendor),ir=Ae&&(/Mobile\/\w+/.test(rn)||!!bt&&bt.maxTouchPoints>2),$e=ir||(bt?/Mac/.test(bt.platform):!1),Lw=bt?/Win/.test(bt.platform):!1,rt=/Android \d/.test(rn),ii=!!Vu&&"webkitFontSmoothing"in Vu.documentElement.style,Vw=ii?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Hw(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function St(t,e){return typeof t=="number"?t:t[e]}function jw(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function Hu(t,e,n){let r=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,o=t.dom.ownerDocument;for(let s=n||t.dom;s;s=Jr(s)){if(s.nodeType!=1)continue;let l=s,a=l==o.body,u=a?Hw(o):jw(l),c=0,f=0;if(e.top<u.top+St(r,"top")?f=-(u.top-e.top+St(i,"top")):e.bottom>u.bottom-St(r,"bottom")&&(f=e.bottom-e.top>u.bottom-u.top?e.top+St(i,"top")-u.top:e.bottom-u.bottom+St(i,"bottom")),e.left<u.left+St(r,"left")?c=-(u.left-e.left+St(i,"left")):e.right>u.right-St(r,"right")&&(c=e.right-u.right+St(i,"right")),c||f)if(a)o.defaultView.scrollBy(c,f);else{let h=l.scrollLeft,p=l.scrollTop;f&&(l.scrollTop+=f),c&&(l.scrollLeft+=c);let d=l.scrollLeft-h,m=l.scrollTop-p;e={left:e.left-d,top:e.top-m,right:e.right-d,bottom:e.bottom-m}}if(a||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function qw(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,i;for(let o=(e.left+e.right)/2,s=n+1;s<Math.min(innerHeight,e.bottom);s+=5){let l=t.root.elementFromPoint(o,s);if(!l||l==t.dom||!t.dom.contains(l))continue;let a=l.getBoundingClientRect();if(a.top>=n-20){r=l,i=a.top;break}}return{refDOM:r,refTop:i,stack:Lh(t.dom)}}function Lh(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=Jr(r));return e}function $w({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;Vh(n,r==0?0:r-e)}function Vh(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:i,left:o}=t[n];r.scrollTop!=i+e&&(r.scrollTop=i+e),r.scrollLeft!=o&&(r.scrollLeft=o)}}let In=null;function Ww(t){if(t.setActive)return t.setActive();if(In)return t.focus(In);let e=Lh(t);t.focus(In==null?{get preventScroll(){return In={preventScroll:!0},!0}}:void 0),In||(In=!1,Vh(e,0))}function Hh(t,e){let n,r=2e8,i,o=0,s=e.top,l=e.top,a,u;for(let c=t.firstChild,f=0;c;c=c.nextSibling,f++){let h;if(c.nodeType==1)h=c.getClientRects();else if(c.nodeType==3)h=Ot(c).getClientRects();else continue;for(let p=0;p<h.length;p++){let d=h[p];if(d.top<=s&&d.bottom>=l){s=Math.max(d.bottom,s),l=Math.min(d.top,l);let m=d.left>e.left?d.left-e.left:d.right<e.left?e.left-d.right:0;if(m<r){n=c,r=m,i=m&&n.nodeType==3?{left:d.right<e.left?d.right:d.left,top:e.top}:e,c.nodeType==1&&m&&(o=f+(e.left>=(d.left+d.right)/2?1:0));continue}}else d.top>e.top&&!a&&d.left<=e.left&&d.right>=e.left&&(a=c,u={left:Math.max(d.left,Math.min(d.right,e.left)),top:d.top});!n&&(e.left>=d.right&&e.top>=d.top||e.left>=d.left&&e.top>=d.bottom)&&(o=f+1)}}return!n&&a&&(n=a,i=u,r=0),n&&n.nodeType==3?Uw(n,i):!n||r&&n.nodeType==1?{node:t,offset:o}:Hh(n,i)}function Uw(t,e){let n=t.nodeValue.length,r=document.createRange();for(let i=0;i<n;i++){r.setEnd(t,i+1),r.setStart(t,i);let o=Ft(r,1);if(o.top!=o.bottom&&Wl(e,o))return{node:t,offset:i+(e.left>=(o.left+o.right)/2?1:0)}}return{node:t,offset:0}}function Wl(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function Jw(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function Kw(t,e,n){let{node:r,offset:i}=Hh(e,n),o=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();o=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(r,i,o)}function Yw(t,e,n,r){let i=-1;for(let o=e,s=!1;o!=t.dom;){let l=t.docView.nearestDesc(o,!0);if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)){let a=l.dom.getBoundingClientRect();if(l.node.isBlock&&l.parent&&(!s&&a.left>r.left||a.top>r.top?i=l.posBefore:(!s&&a.right<r.left||a.bottom<r.top)&&(i=l.posAfter),s=!0),!l.contentDOM&&i<0&&!l.node.isText)return(l.node.isBlock?r.top<(a.top+a.bottom)/2:r.left<(a.left+a.right)/2)?l.posBefore:l.posAfter}o=l.dom.parentNode}return i>-1?i:t.docView.posFromDOM(e,n,-1)}function jh(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),o=i;;){let s=t.childNodes[o];if(s.nodeType==1){let l=s.getClientRects();for(let a=0;a<l.length;a++){let u=l[a];if(Wl(e,u))return jh(s,e,u)}}if((o=(o+1)%r)==i)break}return t}function Gw(t,e){let n=t.dom.ownerDocument,r,i=0,o=Bw(n,e.left,e.top);o&&({node:r,offset:i}=o);let s=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),l;if(!s||!t.dom.contains(s.nodeType!=1?s.parentNode:s)){let u=t.dom.getBoundingClientRect();if(!Wl(e,u)||(s=jh(t.dom,e,u),!s))return null}if(Ae)for(let u=s;r&&u;u=Jr(u))u.draggable&&(r=void 0);if(s=Jw(s,e),r){if(at&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let c=r.childNodes[i],f;c.nodeName=="IMG"&&(f=c.getBoundingClientRect()).right<=e.left&&f.bottom>e.top&&i++}let u;ii&&i&&r.nodeType==1&&(u=r.childNodes[i-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=e.top&&i--,r==t.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=t.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(l=Yw(t,r,i,e))}l==null&&(l=Kw(t,s,e));let a=t.docView.nearestDesc(s,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function ju(t){return t.top<t.bottom||t.left<t.right}function Ft(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(ju(r))return r}return Array.prototype.find.call(n,ju)||t.getBoundingClientRect()}const Xw=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function qh(t,e,n){let{node:r,offset:i,atom:o}=t.docView.domFromPos(e,n<0?-1:1),s=ii||at;if(r.nodeType==3)if(s&&(Xw.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let a=Ft(Ot(r,i,i),n);if(at&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let u=Ft(Ot(r,i-1,i-1),-1);if(u.top==a.top){let c=Ft(Ot(r,i,i+1),-1);if(c.top!=a.top)return br(c,c.left<u.left)}}return a}else{let a=i,u=i,c=n<0?1:-1;return n<0&&!i?(u++,c=-1):n>=0&&i==r.nodeValue.length?(a--,c=1):n<0?a--:u++,br(Ft(Ot(r,a,u),c),c<0)}if(!t.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&i&&(n<0||i==Ue(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return as(a.getBoundingClientRect(),!1)}if(o==null&&i<Ue(r)){let a=r.childNodes[i];if(a.nodeType==1)return as(a.getBoundingClientRect(),!0)}return as(r.getBoundingClientRect(),n>=0)}if(o==null&&i&&(n<0||i==Ue(r))){let a=r.childNodes[i-1],u=a.nodeType==3?Ot(a,Ue(a)-(s?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(u)return br(Ft(u,1),!1)}if(o==null&&i<Ue(r)){let a=r.childNodes[i];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let u=a?a.nodeType==3?Ot(a,0,s?0:1):a.nodeType==1?a:null:null;if(u)return br(Ft(u,-1),!0)}return br(Ft(r.nodeType==3?Ot(r):r,-n),n>=0)}function br(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function as(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function $h(t,e,n){let r=t.state,i=t.root.activeElement;r!=e&&t.updateState(e),i!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),i!=t.dom&&i&&i.focus()}}function Qw(t,e,n){let r=e.selection,i=n=="up"?r.$from:r.$to;return $h(t,e,()=>{let{node:o}=t.docView.domFromPos(i.pos,n=="up"?-1:1);for(;;){let l=t.docView.nearestDesc(o,!0);if(!l)break;if(l.node.isBlock){o=l.contentDOM||l.dom;break}o=l.dom.parentNode}let s=qh(t,i.pos,1);for(let l=o.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=Ot(l,0,l.nodeValue.length).getClientRects();else continue;for(let u=0;u<a.length;u++){let c=a[u];if(c.bottom>c.top+1&&(n=="up"?s.top-c.top>(c.bottom-s.top)*2:c.bottom-s.bottom>(s.bottom-c.top)*2))return!1}}return!0})}const Zw=/[\u0590-\u08ac]/;function ex(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=!i,s=i==r.parent.content.size,l=t.domSelection();return l?!Zw.test(r.parent.textContent)||!l.modify?n=="left"||n=="backward"?o:s:$h(t,e,()=>{let{focusNode:a,focusOffset:u,anchorNode:c,anchorOffset:f}=t.domSelectionRange(),h=l.caretBidiLevel;l.modify("move",n,"character");let p=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:d,focusOffset:m}=t.domSelectionRange(),y=d&&!p.contains(d.nodeType==1?d:d.parentNode)||a==d&&u==m;try{l.collapse(c,f),a&&(a!=c||u!=f)&&l.extend&&l.extend(a,u)}catch{}return h!=null&&(l.caretBidiLevel=h),y}):r.pos==r.start()||r.pos==r.end()}let qu=null,$u=null,Wu=!1;function tx(t,e,n){return qu==e&&$u==n?Wu:(qu=e,$u=n,Wu=n=="up"||n=="down"?Qw(t,e,n):ex(t,e,n))}const Ge=0,Uu=1,pn=2,wt=3;class oi{constructor(e,n,r,i){this.parent=e,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=Ge,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let i=this.children[n];if(i==e)return r;r+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let o,s;if(e==this.contentDOM)o=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.previousSibling}for(;o&&!((s=o.pmViewDesc)&&s.parent==this);)o=o.previousSibling;return o?this.posBeforeChild(s)+s.size:this.posAtStart}else{let o,s;if(e==this.contentDOM)o=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.nextSibling}for(;o&&!((s=o.pmViewDesc)&&s.parent==this);)o=o.nextSibling;return o?this.posBeforeChild(s):this.posAtEnd}let i;if(e==this.dom&&this.contentDOM)i=n>me(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!1;break}if(o.previousSibling)break}if(i==null&&n==e.childNodes.length)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!0;break}if(o.nextSibling)break}}return i??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,i=e;i;i=i.parentNode){let o=this.getDesc(i),s;if(o&&(!n||o.node))if(r&&(s=o.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))r=!1;else return o}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let i=e;i;i=i.parentNode){let o=this.getDesc(i);if(o)return o.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let i=this.children[n],o=r+i.size;if(r==e&&o!=r){for(;!i.border&&i.children.length;)i=i.children[0];return i}if(e<o)return i.descAt(e-r-i.border);r=o}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,i=0;for(let o=0;r<this.children.length;r++){let s=this.children[r],l=o+s.size;if(l>e||s instanceof Uh){i=e-o;break}o=l}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let o;r&&!(o=this.children[r-1]).size&&o instanceof Wh&&o.side>=0;r--);if(n<=0){let o,s=!0;for(;o=r?this.children[r-1]:null,!(!o||o.dom.parentNode==this.contentDOM);r--,s=!1);return o&&n&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,n):{node:this.contentDOM,offset:o?me(o.dom)+1:0}}else{let o,s=!0;for(;o=r<this.children.length?this.children[r]:null,!(!o||o.dom.parentNode==this.contentDOM);r++,s=!1);return o&&s&&!o.border&&!o.domAtom?o.domFromPos(0,n):{node:this.contentDOM,offset:o?me(o.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,o=-1;for(let s=r,l=0;;l++){let a=this.children[l],u=s+a.size;if(i==-1&&e<=u){let c=s+a.border;if(e>=c&&n<=u-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,n,c);e=s;for(let f=l;f>0;f--){let h=this.children[f-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){i=me(h.dom)+1;break}e-=h.size}i==-1&&(i=0)}if(i>-1&&(u>n||l==this.children.length-1)){n=u;for(let c=l+1;c<this.children.length;c++){let f=this.children[c];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){o=me(f.dom);break}n+=f.size}o==-1&&(o=this.contentDOM.childNodes.length);break}s=u}return{node:this.contentDOM,from:e,to:n,fromOffset:i,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,i=!1){let o=Math.min(e,n),s=Math.max(e,n);for(let h=0,p=0;h<this.children.length;h++){let d=this.children[h],m=p+d.size;if(o>p&&s<m)return d.setSelection(e-p-d.border,n-p-d.border,r,i);p=m}let l=this.domFromPos(e,e?-1:1),a=n==e?l:this.domFromPos(n,n?-1:1),u=r.getSelection(),c=!1;if((at||Ae)&&e==n){let{node:h,offset:p}=l;if(h.nodeType==3){if(c=!!(p&&h.nodeValue[p-1]==` |
| 63 |
`),c&&p==h.nodeValue.length)for(let d=h,m;d;d=d.parentNode){if(m=d.nextSibling){m.nodeName=="BR"&&(l=a={node:m.parentNode,offset:me(m)+1});break}let y=d.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let d=h.childNodes[p-1];c=d&&(d.nodeName=="BR"||d.contentEditable=="false")}}if(at&&u.focusNode&&u.focusNode!=a.node&&u.focusNode.nodeType==1){let h=u.focusNode.childNodes[u.focusOffset];h&&h.contentEditable=="false"&&(i=!0)}if(!(i||c&&Ae)&&Cn(l.node,l.offset,u.anchorNode,u.anchorOffset)&&Cn(a.node,a.offset,u.focusNode,u.focusOffset))return;let f=!1;if((u.extend||e==n)&&!c){u.collapse(l.node,l.offset);try{e!=n&&u.extend(a.node,a.offset),f=!0}catch{}}if(!f){if(e>n){let p=l;l=a,a=p}let h=document.createRange();h.setEnd(a.node,a.offset),h.setStart(l.node,l.offset),u.removeAllRanges(),u.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,i=0;i<this.children.length;i++){let o=this.children[i],s=r+o.size;if(r==s?e<=s&&n>=r:e<s&&n>r){let l=r+o.border,a=s-o.border;if(e>=l&&n<=a){this.dirty=e==r||n==s?pn:Uu,e==l&&n==a&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=wt:o.markDirty(e-l,n-l);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?pn:wt}r=s}this.dirty=pn}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?pn:Uu;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class Wh extends oi{constructor(e,n,r,i){let o,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!o)return i;if(o.parent)return o.parent.posBeforeChild(o)})),!n.type.spec.raw){if(s.nodeType!=1){let l=document.createElement("span");l.appendChild(s),s=l}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,o=this}matchesWidget(e){return this.dirty==Ge&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class nx extends oi{constructor(e,n,r,i){super(e,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class On extends oi{constructor(e,n,r,i){super(e,[],r,i),this.mark=n}static create(e,n,r,i){let o=i.nodeViews[n.type.name],s=o&&o(n,i,r);return(!s||!s.dom)&&(s=lr.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new On(e,n,s.dom,s.contentDOM||s.dom)}parseRule(){return this.dirty&wt||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=wt&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=Ge){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Ge}}slice(e,n,r){let i=On.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;n<s&&(o=rl(o,n,s,r)),e>0&&(o=rl(o,0,e,r));for(let l=0;l<o.length;l++)o[l].parent=i;return i.children=o,i}}class Jt extends oi{constructor(e,n,r,i,o,s,l,a,u){super(e,[],o,s),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=l}static create(e,n,r,i,o,s){let l=o.nodeViews[n.type.name],a,u=l&&l(n,o,()=>{if(!a)return s;if(a.parent)return a.parent.posBeforeChild(a)},r,i),c=u&&u.dom,f=u&&u.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:f}=lr.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!f&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let h=c;return c=Yh(c,r,n),u?a=new rx(e,n,r,i,c,f||null,h,u,o,s+1):n.isText?new Ao(e,n,r,i,c,h,o):new Jt(e,n,r,i,c,f||null,h,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>M.empty)}return e}matchesNode(e,n,r){return this.dirty==Ge&&e.eq(this.node)&&nl(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,i=n,o=e.composing?this.localCompositionInfo(e,n):null,s=o&&o.pos>-1?o:null,l=o&&o.pos<0,a=new ox(this,s&&s.node,e);ax(this.node,this.innerDeco,(u,c,f)=>{u.spec.marks?a.syncToMarks(u.spec.marks,r,e):u.type.side>=0&&!f&&a.syncToMarks(c==this.node.childCount?ee.none:this.node.child(c).marks,r,e),a.placeWidget(u,e,i)},(u,c,f,h)=>{a.syncToMarks(u.marks,r,e);let p;a.findNodeMatch(u,c,f,h)||l&&e.state.selection.from>i&&e.state.selection.to<i+u.nodeSize&&(p=a.findIndexWithChild(o.node))>-1&&a.updateNodeAt(u,c,f,p,e)||a.updateNextNode(u,c,f,e,h,i)||a.addNode(u,c,f,e,i),i+=u.nodeSize}),a.syncToMarks([],r,e),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==pn)&&(s&&this.protectLocalComposition(e,s),Jh(this.contentDOM,this.children,e),ir&&ux(this.dom))}localCompositionInfo(e,n){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof X)||r<n||i>n+this.node.content.size)return null;let o=e.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let s=o.nodeValue,l=cx(this.node.content,s,r-n,i-n);return l<0?null:{node:o,pos:l,text:s}}else return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let o=n;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new nx(this,o,n,i);e.input.compositionNodes.push(s),this.children=rl(this.children,r,r+i.length,e,s)}update(e,n,r,i){return this.dirty==wt||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,i),!0)}updateInner(e,n,r,i){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=Ge}updateOuterDeco(e){if(nl(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Kh(this.dom,this.nodeDOM,tl(this.outerDeco,this.node,n),tl(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Ju(t,e,n,r,i){Yh(r,e,t);let o=new Jt(void 0,t,e,n,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class Ao extends Jt{constructor(e,n,r,i,o,s,l){super(e,n,r,i,o,null,s,l,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,i){return this.dirty==wt||this.dirty!=Ge&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Ge||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=Ge,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let i=this.node.cut(e,n),o=document.createTextNode(i.text);return new Ao(this.parent,i,this.outerDeco,this.innerDeco,o,o,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=wt)}get domAtom(){return!1}isText(e){return this.node.text==e}}class Uh extends oi{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Ge&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class rx extends Jt{constructor(e,n,r,i,o,s,l,a,u,c){super(e,n,r,i,o,s,l,u,c),this.spec=a}update(e,n,r,i){if(this.dirty==wt)return!1;if(this.spec.update){let o=this.spec.update(e,n,r);return o&&this.updateInner(e,n,r,i),o}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,i){this.spec.setSelection?this.spec.setSelection(e,n,r):super.setSelection(e,n,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function Jh(t,e,n){let r=t.firstChild,i=!1;for(let o=0;o<e.length;o++){let s=e[o],l=s.dom;if(l.parentNode==t){for(;l!=r;)r=Ku(r),i=!0;r=r.nextSibling}else i=!0,t.insertBefore(l,r);if(s instanceof On){let a=r?r.previousSibling:t.lastChild;Jh(s.contentDOM,s.children,n),r=a?a.nextSibling:t.firstChild}}for(;r;)r=Ku(r),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const zr=function(t){t&&(this.nodeName=t)};zr.prototype=Object.create(null);const dn=[new zr];function tl(t,e,n){if(t.length==0)return dn;let r=n?dn[0]:new zr,i=[r];for(let o=0;o<t.length;o++){let s=t[o].type.attrs;if(s){s.nodeName&&i.push(r=new zr(s.nodeName));for(let l in s){let a=s[l];a!=null&&(n&&i.length==1&&i.push(r=new zr(e.isInline?"span":"div")),l=="class"?r.class=(r.class?r.class+" ":"")+a:l=="style"?r.style=(r.style?r.style+";":"")+a:l!="nodeName"&&(r[l]=a))}}}return i}function Kh(t,e,n,r){if(n==dn&&r==dn)return e;let i=e;for(let o=0;o<r.length;o++){let s=r[o],l=n[o];if(o){let a;l&&l.nodeName==s.nodeName&&i!=t&&(a=i.parentNode)&&a.nodeName.toLowerCase()==s.nodeName||(a=document.createElement(s.nodeName),a.pmIsDeco=!0,a.appendChild(i),l=dn[0]),i=a}ix(i,l||dn[0],s)}return i}function ix(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let o=0;o<r.length;o++)i.indexOf(r[o])==-1&&t.classList.remove(r[o]);for(let o=0;o<i.length;o++)r.indexOf(i[o])==-1&&t.classList.add(i[o]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=r.exec(e.style);)t.style.removeProperty(i[1])}n.style&&(t.style.cssText+=n.style)}}function Yh(t,e,n){return Kh(t,t,dn,tl(e,n,t.nodeType!=1))}function nl(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function Ku(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class ox{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=sx(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r){let i=0,o=this.stack.length>>1,s=Math.min(o,e.length);for(;i<s&&(i==o-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<o;)this.destroyRest(),this.top.dirty=Ge,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let l=-1;for(let a=this.index;a<Math.min(this.index+3,this.top.children.length);a++){let u=this.top.children[a];if(u.matchesMark(e[o])&&!this.isLocked(u.dom)){l=a;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let a=On.create(this.top,e[o],n,r);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,o++}}findNodeMatch(e,n,r,i){let o=-1,s;if(i>=this.preMatch.index&&(s=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&s.matchesNode(e,n,r))o=this.top.children.indexOf(s,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l<a;l++){let u=this.top.children[l];if(u.matchesNode(e,n,r)&&!this.preMatch.matched.has(u)){o=l;break}}return o<0?!1:(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(e,n,r,i,o){let s=this.top.children[i];return s.dirty==wt&&s.dom==s.contentDOM&&(s.dirty=pn),s.update(e,n,r,o)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}e=n}}updateNextNode(e,n,r,i,o,s){for(let l=this.index;l<this.top.children.length;l++){let a=this.top.children[l];if(a instanceof Jt){let u=this.preMatch.matched.get(a);if(u!=null&&u!=o)return!1;let c=a.dom,f,h=this.isLocked(c)&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&a.dirty!=wt&&nl(n,a.outerDeco));if(!h&&a.update(e,n,r,i))return this.destroyBetween(this.index,l),a.dom!=c&&(this.changed=!0),this.index++,!0;if(!h&&(f=this.recreateWrapper(a,e,n,r,i,s)))return this.top.children[this.index]=f,f.contentDOM&&(f.dirty=pn,f.updateChildren(i,s+1),f.dirty=Ge),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,i,o,s){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content))return null;let l=Jt.create(this.top,n,r,i,o,s);if(l.contentDOM){l.children=e.children,e.children=[];for(let a of l.children)a.parent=l}return e.destroy(),l}addNode(e,n,r,i,o){let s=Jt.create(this.top,e,n,r,i,o);s.contentDOM&&s.updateChildren(i,o+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,n,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(e)&&(e==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let o=new Wh(this.top,e,n,r);this.top.children.splice(this.index++,0,o),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof On;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof Ao)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Ae||we)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new Uh(this.top,[],r,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function sx(t,e){let n=e,r=n.children.length,i=t.childCount,o=new Map,s=[];e:for(;i>0;){let l;for(;;)if(r){let u=n.children[r-1];if(u instanceof On)n=u,r=u.children.length;else{l=u,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let a=l.node;if(a){if(a!=t.child(i-1))break;--i,o.set(l,i),s.push(l)}}return{index:i,matched:o,matches:s.reverse()}}function lx(t,e){return t.type.side-e.type.side}function ax(t,e,n,r){let i=e.locals(t),o=0;if(i.length==0){for(let u=0;u<t.childCount;u++){let c=t.child(u);r(c,i,e.forChild(o,c),u),o+=c.nodeSize}return}let s=0,l=[],a=null;for(let u=0;;){let c,f;for(;s<i.length&&i[s].to==o;){let y=i[s++];y.widget&&(c?(f||(f=[c])).push(y):c=y)}if(c)if(f){f.sort(lx);for(let y=0;y<f.length;y++)n(f[y],u,!!a)}else n(c,u,!!a);let h,p;if(a)p=-1,h=a,a=null;else if(u<t.childCount)p=u,h=t.child(u++);else break;for(let y=0;y<l.length;y++)l[y].to<=o&&l.splice(y--,1);for(;s<i.length&&i[s].from<=o&&i[s].to>o;)l.push(i[s++]);let d=o+h.nodeSize;if(h.isText){let y=d;s<i.length&&i[s].from<y&&(y=i[s].from);for(let g=0;g<l.length;g++)l[g].to<y&&(y=l[g].to);y<d&&(a=h.cut(y-o),h=h.cut(0,y-o),d=y,p=-1)}else for(;s<i.length&&i[s].to<d;)s++;let m=h.isInline&&!h.isLeaf?l.filter(y=>!y.inline):l.slice();r(h,m,e.forChild(o,h),p),o=d}}function ux(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function cx(t,e,n,r){for(let i=0,o=0;i<t.childCount&&o<=r;){let s=t.child(i++),l=o;if(o+=s.nodeSize,!s.isText)continue;let a=s.text;for(;i<t.childCount;){let u=t.child(i++);if(o+=u.nodeSize,!u.isText)break;a+=u.text}if(o>=n){if(o>=r&&a.slice(r-e.length-l,r-l)==e)return r-e.length;let u=l<r?a.lastIndexOf(e,r-l-1):-1;if(u>=0&&u+e.length+l>=n)return l+u;if(n==r&&a.length>=r+e.length-l&&a.slice(r-l,r-l+e.length)==e)return r}}return-1}function rl(t,e,n,r,i){let o=[];for(let s=0,l=0;s<t.length;s++){let a=t[s],u=l,c=l+=a.size;u>=n||c<=e?o.push(a):(u<e&&o.push(a.slice(0,e-u,r)),i&&(o.push(i),i=void 0),c>n&&o.push(a.slice(n-u,a.size,r)))}return o}function Ul(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let i=t.docView.nearestDesc(n.focusNode),o=i&&i.size==0,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let l=r.resolve(s),a,u;if(Oo(n)){for(a=l;i&&!i.node;)i=i.parent;let c=i.node;if(i&&c.isAtom&&j.isSelectable(c)&&i.parent&&!(c.isInline&&Pw(n.focusNode,n.focusOffset,i.dom))){let f=i.posBefore;u=new j(s==f?l:r.resolve(f))}}else{let c=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null;a=r.resolve(c)}if(!u){let c=e=="pointer"||t.state.selection.head<l.pos&&!o?1:-1;u=Jl(t,a,l,c)}return u}function Gh(t){return t.editable?t.hasFocus():Qh(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Mt(t,e=!1){let n=t.state.selection;if(Xh(t,n),!!Gh(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&we){let r=t.domSelectionRange(),i=t.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&Cn(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)hx(t);else{let{anchor:r,head:i}=n,o,s;Yu&&!(n instanceof X)&&(n.$from.parent.inlineContent||(o=Gu(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(s=Gu(t,n.to))),t.docView.setSelection(r,i,t.root,e),Yu&&(o&&Xu(o),s&&Xu(s)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&fx(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const Yu=Ae||we&&Bh<63;function Gu(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(Ae&&i&&i.contentEditable=="false")return us(i);if((!i||i.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(i)return us(i);if(o)return us(o)}}function us(t){return t.contentEditable="true",Ae&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function Xu(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function fx(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!Gh(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function hx(t){let e=t.domSelection(),n=document.createRange();if(!e)return;let r=t.cursorWrapper.dom,i=r.nodeName=="IMG";i?n.setStart(r.parentNode,me(r)+1):n.setStart(r,0),n.collapse(!0),e.removeAllRanges(),e.addRange(n),!i&&!t.state.selection.visible&&Pe&&Ut<=11&&(r.disabled=!0,r.disabled=!1)}function Xh(t,e){if(e instanceof j){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Qu(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Qu(t)}function Qu(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Jl(t,e,n,r){return t.someProp("createSelectionBetween",i=>i(t,e,n))||X.between(e,n,r)}function Zu(t){return t.editable&&!t.hasFocus()?!1:Qh(t)}function Qh(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function px(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return Cn(e.node,e.offset,n.anchorNode,n.anchorOffset)}function il(t,e){let{$anchor:n,$head:r}=t.selection,i=e>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return o&&$.findFrom(o,e)}function Bt(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function ec(t,e,n){let r=t.state.selection;if(r instanceof X)if(n.indexOf("s")>-1){let{$head:i}=r,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=t.state.doc.resolve(i.pos+o.nodeSize*(e<0?-1:1));return Bt(t,new X(r.$anchor,s))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let i=il(t.state,e);return i&&i instanceof j?Bt(t,i):!1}else if(!($e&&n.indexOf("m")>-1)){let i=r.$head,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,s;if(!o||o.isText)return!1;let l=e<0?i.pos-o.nodeSize:i.pos;return o.isAtom||(s=t.docView.descAt(l))&&!s.contentDOM?j.isSelectable(o)?Bt(t,new j(e<0?t.state.doc.resolve(i.pos-o.nodeSize):i)):ii?Bt(t,new X(t.state.doc.resolve(e<0?l:l+o.nodeSize))):!1:!1}}else return!1;else{if(r instanceof j&&r.node.isInline)return Bt(t,new X(e>0?r.$to:r.$from));{let i=il(t.state,e);return i?Bt(t,i):!1}}}function ro(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Pr(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function Rn(t,e){return e<0?dx(t):mx(t)}function dx(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i,o,s=!1;for(at&&n.nodeType==1&&r<ro(n)&&Pr(n.childNodes[r],-1)&&(s=!0);;)if(r>0){if(n.nodeType!=1)break;{let l=n.childNodes[r-1];if(Pr(l,-1))i=n,o=--r;else if(l.nodeType==3)n=l,r=n.nodeValue.length;else break}}else{if(Zh(n))break;{let l=n.previousSibling;for(;l&&Pr(l,-1);)i=n.parentNode,o=me(l),l=l.previousSibling;if(l)n=l,r=ro(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}s?ol(t,n,r):i&&ol(t,i,o)}function mx(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i=ro(n),o,s;for(;;)if(r<i){if(n.nodeType!=1)break;let l=n.childNodes[r];if(Pr(l,1))o=n,s=++r;else break}else{if(Zh(n))break;{let l=n.nextSibling;for(;l&&Pr(l,1);)o=l.parentNode,s=me(l)+1,l=l.nextSibling;if(l)n=l,r=0,i=ro(n);else{if(n=n.parentNode,n==t.dom)break;r=i=0}}}o&&ol(t,o,s)}function Zh(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function gx(t,e){for(;t&&e==t.childNodes.length&&!ri(t);)e=me(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function yx(t,e){for(;t&&!e&&!ri(t);)e=me(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function ol(t,e,n){if(e.nodeType!=3){let o,s;(s=gx(e,n))?(e=s,n=0):(o=yx(e,n))&&(e=o,n=o.nodeValue.length)}let r=t.domSelection();if(!r)return;if(Oo(r)){let o=document.createRange();o.setEnd(e,n),o.setStart(e,n),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:i}=t;setTimeout(()=>{t.state==i&&Mt(t)},50)}function tc(t,e){let n=t.state.doc.resolve(e);if(!(we||Lw)&&n.parent.inlineContent){let i=t.coordsAtPos(e);if(e>n.start()){let o=t.coordsAtPos(e-1),s=(o.top+o.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(o.left-i.left)>1)return o.left<i.left?"ltr":"rtl"}if(e<n.end()){let o=t.coordsAtPos(e+1),s=(o.top+o.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(o.left-i.left)>1)return o.left>i.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function nc(t,e,n){let r=t.state.selection;if(r instanceof X&&!r.empty||n.indexOf("s")>-1||$e&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=il(t.state,e);if(s&&s instanceof j)return Bt(t,s)}if(!i.parent.inlineContent){let s=e<0?i:o,l=r instanceof qe?$.near(s,e):$.findFrom(s,e);return l?Bt(t,l):!1}return!1}function rc(t,e){if(!(t.state.selection instanceof X))return!0;let{$head:n,$anchor:r,empty:i}=t.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let s=t.state.tr;return e<0?s.delete(n.pos-o.nodeSize,n.pos):s.delete(n.pos,n.pos+o.nodeSize),t.dispatch(s),!0}return!1}function ic(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function bx(t){if(!Ae||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;ic(t,r,"true"),setTimeout(()=>ic(t,r,"false"),20)}return!1}function wx(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function xx(t,e){let n=e.keyCode,r=wx(e);if(n==8||$e&&n==72&&r=="c")return rc(t,-1)||Rn(t,-1);if(n==46&&!e.shiftKey||$e&&n==68&&r=="c")return rc(t,1)||Rn(t,1);if(n==13||n==27)return!0;if(n==37||$e&&n==66&&r=="c"){let i=n==37?tc(t,t.state.selection.from)=="ltr"?-1:1:-1;return ec(t,i,r)||Rn(t,i)}else if(n==39||$e&&n==70&&r=="c"){let i=n==39?tc(t,t.state.selection.from)=="ltr"?1:-1:1;return ec(t,i,r)||Rn(t,i)}else{if(n==38||$e&&n==80&&r=="c")return nc(t,-1,r)||Rn(t,-1);if(n==40||$e&&n==78&&r=="c")return bx(t)||nc(t,1,r)||Rn(t,1);if(r==($e?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function ep(t,e){t.someProp("transformCopied",p=>{e=p(e,t)});let n=[],{content:r,openStart:i,openEnd:o}=e;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=t.someProp("clipboardSerializer")||lr.fromSchema(t.state.schema),l=sp(),a=l.createElement("div");a.appendChild(s.serializeFragment(r,{document:l}));let u=a.firstChild,c,f=0;for(;u&&u.nodeType==1&&(c=op[u.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){let d=l.createElement(c[p]);for(;a.firstChild;)d.appendChild(a.firstChild);a.appendChild(d),f++}u=a.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${i} ${o}${f?` -${f}`:""} ${JSON.stringify(n)}`);let h=t.someProp("clipboardTextSerializer",p=>p(e,t))||e.content.textBetween(0,e.content.size,` |
| 64 |
|
| 65 |
`);return{dom:a,text:h,slice:e}}function tp(t,e,n,r,i){let o=i.parent.type.spec.code,s,l;if(!n&&!e)return null;let a=e&&(r||o||!n);if(a){if(t.someProp("transformPastedText",h=>{e=h(e,o||r,t)}),o)return e?new R(M.from(t.state.schema.text(e.replace(/\r\n?/g,` |
| 66 |
`))),0,0):R.empty;let f=t.someProp("clipboardTextParser",h=>h(e,i,r,t));if(f)l=f;else{let h=i.marks(),{schema:p}=t.state,d=lr.fromSchema(p);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let y=s.appendChild(document.createElement("p"));m&&y.appendChild(d.serializeNode(p.text(m,h)))})}}else t.someProp("transformPastedHTML",f=>{n=f(n,t)}),s=Sx(n),ii&&Cx(s);let u=s&&s.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let f=+c[3];f>0;f--){let h=s.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;s=h}if(l||(l=(t.someProp("clipboardParser")||t.someProp("domParser")||Wr.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||c),context:i,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!kx.test(h.parentNode.nodeName)?{ignore:!0}:null}})),c)l=Ox(oc(l,+c[1],+c[2]),c[4]);else if(l=R.maxOpen(vx(l.content,i),!0),l.openStart||l.openEnd){let f=0,h=0;for(let p=l.content.firstChild;f<l.openStart&&!p.type.spec.isolating;f++,p=p.firstChild);for(let p=l.content.lastChild;h<l.openEnd&&!p.type.spec.isolating;h++,p=p.lastChild);l=oc(l,f,h)}return t.someProp("transformPasted",f=>{l=f(l,t)}),l}const kx=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function vx(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let i=e.node(n).contentMatchAt(e.index(n)),o,s=[];if(t.forEach(l=>{if(!s)return;let a=i.findWrapping(l.type),u;if(!a)return s=null;if(u=s.length&&o.length&&rp(a,o,l,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=ip(s[s.length-1],o.length));let c=np(l,a);s.push(c),i=i.matchType(c.type),o=a}}),s)return M.from(s)}return t}function np(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,M.from(t));return t}function rp(t,e,n,r,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let o=rp(t,e,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==t.length-1?n.type:t[i+1]))return r.copy(r.content.append(M.from(np(n,t,i+1))))}}function ip(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,ip(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(M.empty,!0);return t.copy(n.append(r))}function sl(t,e,n,r,i,o){let s=e<0?t.firstChild:t.lastChild,l=s.content;return t.childCount>1&&(o=0),i<r-1&&(l=sl(l,e,n,r,i+1,o)),i>=n&&(l=e<0?s.contentMatchAt(0).fillBefore(l,o<=i).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(M.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(l))}function oc(t,e,n){return e<t.openStart&&(t=new R(sl(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new R(sl(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const op={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let sc=null;function sp(){return sc||(sc=document.implementation.createHTMLDocument("title"))}function _x(t){let e=window.trustedTypes;return e?e.createPolicy("detachedDocument",{createHTML:n=>n}).createHTML(t):t}function Sx(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=sp().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),i;if((i=r&&op[r[1].toLowerCase()])&&(t=i.map(o=>"<"+o+">").join("")+t+i.map(o=>"</"+o+">").reverse().join("")),n.innerHTML=_x(t),i)for(let o=0;o<i.length;o++)n=n.querySelector(i[o])||n;return n}function Cx(t){let e=t.querySelectorAll(we?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function Ox(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:i,openStart:o,openEnd:s}=t;for(let l=r.length-2;l>=0;l-=2){let a=n.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;i=M.from(a.create(r[l+1],i)),o++,s++}return new R(i,o,s)}const Ee={},Me={},Ax={touchstart:!0,touchmove:!0};class Ex{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function Mx(t){for(let e in Ee){let n=Ee[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{Nx(t,r)&&!Kl(t,r)&&(t.editable||!(r.type in Me))&&n(t,r)},Ax[e]?{passive:!0}:void 0)}Ae&&t.dom.addEventListener("input",()=>null),ll(t)}function Wt(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function Tx(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function ll(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>Kl(t,r))})}function Kl(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function Nx(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function Dx(t,e){!Kl(t,e)&&Ee[e.type]&&(t.editable||!(e.type in Me))&&Ee[e.type](t,e)}Me.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!ap(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(rt&&we&&n.keyCode==13)))if(t.domObserver.selectionChanged(t.domSelectionRange())?t.domObserver.flush():n.keyCode!=229&&t.domObserver.forceFlush(),ir&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",i=>i(t,un(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||xx(t,n)?n.preventDefault():Wt(t,"key")};Me.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};Me.keypress=(t,e)=>{let n=e;if(ap(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||$e&&n.metaKey)return;if(t.someProp("handleKeyPress",i=>i(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof X)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(n.charCode);!/[\r\n]/.test(i)&&!t.someProp("handleTextInput",o=>o(t,r.$from.pos,r.$to.pos,i))&&t.dispatch(t.state.tr.insertText(i).scrollIntoView()),n.preventDefault()}};function Eo(t){return{left:t.clientX,top:t.clientY}}function Ix(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function Yl(t,e,n,r,i){if(r==-1)return!1;let o=t.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(t.someProp(e,l=>s>o.depth?l(t,n,o.nodeAfter,o.before(s),i,!0):l(t,n,o.node(s),o.before(s),i,!1)))return!0;return!1}function qn(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);n=="pointer"&&r.setMeta("pointer",!0),t.dispatch(r)}function Rx(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&j.isSelectable(r)?(qn(t,new j(n),"pointer"),!0):!1}function zx(t,e){if(e==-1)return!1;let n=t.state.selection,r,i;n instanceof j&&(r=n.node);let o=t.state.doc.resolve(e);for(let s=o.depth+1;s>0;s--){let l=s>o.depth?o.nodeAfter:o.node(s);if(j.isSelectable(l)){r&&n.$from.depth>0&&s>=n.$from.depth&&o.before(n.$from.depth+1)==n.$from.pos?i=o.before(n.$from.depth):i=o.before(s);break}}return i!=null?(qn(t,j.create(t.state.doc,i),"pointer"),!0):!1}function Px(t,e,n,r,i){return Yl(t,"handleClickOn",e,n,r)||t.someProp("handleClick",o=>o(t,e,r))||(i?zx(t,n):Rx(t,n))}function Fx(t,e,n,r){return Yl(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",i=>i(t,e,r))}function Bx(t,e,n,r){return Yl(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",i=>i(t,e,r))||Lx(t,n,r)}function Lx(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(qn(t,X.create(r,0,r.content.size),"pointer"),!0):!1;let i=r.resolve(e);for(let o=i.depth+1;o>0;o--){let s=o>i.depth?i.nodeAfter:i.node(o),l=i.before(o);if(s.inlineContent)qn(t,X.create(r,l+1,l+1+s.content.size),"pointer");else if(j.isSelectable(s))qn(t,j.create(r,l),"pointer");else continue;return!0}}function Gl(t){return io(t)}const lp=$e?"metaKey":"ctrlKey";Ee.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=Gl(t),i=Date.now(),o="singleClick";i-t.input.lastClick.time<500&&Ix(n,t.input.lastClick)&&!n[lp]&&(t.input.lastClick.type=="singleClick"?o="doubleClick":t.input.lastClick.type=="doubleClick"&&(o="tripleClick")),t.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o};let s=t.posAtCoords(Eo(n));s&&(o=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new Vx(t,s,n,!!r)):(o=="doubleClick"?Fx:Bx)(t,s.pos,s.inside,n)?n.preventDefault():Wt(t,"pointer"))};class Vx{constructor(e,n,r,i){this.view=e,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[lp],this.allowDefault=r.shiftKey;let o,s;if(n.inside>-1)o=e.state.doc.nodeAt(n.inside),s=n.inside;else{let c=e.state.doc.resolve(n.pos);o=c.parent,s=c.depth?c.before():0}const l=i?null:r.target,a=l?e.docView.nearestDesc(l,!0):null;this.target=a&&a.dom.nodeType==1?a.dom:null;let{selection:u}=e.state;(r.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||u instanceof j&&u.from<=s&&u.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&at&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Wt(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Mt(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Eo(e))),this.updateAllowDefault(e),this.allowDefault||!n?Wt(this.view,"pointer"):Px(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Ae&&this.mightDrag&&!this.mightDrag.node.isAtom||we&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(qn(this.view,$.near(this.view.state.doc.resolve(n.pos)),"pointer"),e.preventDefault()):Wt(this.view,"pointer")}move(e){this.updateAllowDefault(e),Wt(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}Ee.touchstart=t=>{t.input.lastTouch=Date.now(),Gl(t),Wt(t,"pointer")};Ee.touchmove=t=>{t.input.lastTouch=Date.now(),Wt(t,"pointer")};Ee.contextmenu=t=>Gl(t);function ap(t,e){return t.composing?!0:Ae&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const Hx=rt?5e3:-1;Me.compositionstart=Me.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof X&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),io(t,!0),t.markCursor=null;else if(io(t,!e.selection.empty),at&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let i=r.focusNode,o=r.focusOffset;i&&i.nodeType==1&&o!=0;){let s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(s.nodeType==3){let l=t.domSelection();l&&l.collapse(s,s.nodeValue.length);break}else i=s,o=-1}}t.input.composing=!0}up(t,Hx)};Me.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,up(t,20))};function up(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>io(t),e))}function cp(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=qx());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function jx(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=Rw(e.focusNode,e.focusOffset),r=zw(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,o=t.domObserver.lastChangedTextNode;if(n==o||r==o)return o;if(!i||!i.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function qx(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function io(t,e=!1){if(!(rt&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),cp(t),e||t.docView&&t.docView.dirty){let n=Ul(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!t.state.selection.empty?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function $x(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const Kr=Pe&&Ut<15||ir&&Vw<604;Ee.copy=Me.cut=(t,e)=>{let n=e,r=t.state.selection,i=n.type=="cut";if(r.empty)return;let o=Kr?null:n.clipboardData,s=r.content(),{dom:l,text:a}=ep(t,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",l.innerHTML),o.setData("text/plain",a)):$x(t,l),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function Wx(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function Ux(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Yr(t,r.value,null,i,e):Yr(t,r.textContent,r.innerHTML,i,e)},50)}function Yr(t,e,n,r,i){let o=tp(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",a=>a(t,i,o||R.empty)))return!0;if(!o)return!1;let s=Wx(o),l=s?t.state.tr.replaceSelectionWith(s,r):t.state.tr.replaceSelection(o);return t.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function fp(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Me.paste=(t,e)=>{let n=e;if(t.composing&&!rt)return;let r=Kr?null:n.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&Yr(t,fp(r),r.getData("text/html"),i,n)?n.preventDefault():Ux(t,n)};class hp{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const pp=$e?"altKey":"ctrlKey";Ee.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=t.state.selection,o=i.empty?null:t.posAtCoords(Eo(n)),s;if(!(o&&o.pos>=i.from&&o.pos<=(i instanceof j?i.to-1:i.to))){if(r&&r.mightDrag)s=j.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let f=t.docView.nearestDesc(n.target,!0);f&&f.node.type.spec.draggable&&f!=t.docView&&(s=j.create(t.state.doc,f.posBefore))}}let l=(s||t.state.selection).content(),{dom:a,text:u,slice:c}=ep(t,l);(!n.dataTransfer.files.length||!we||Bh>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Kr?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",Kr||n.dataTransfer.setData("text/plain",u),t.dragging=new hp(c,!n[pp],s)};Ee.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};Me.dragover=Me.dragenter=(t,e)=>e.preventDefault();Me.drop=(t,e)=>{let n=e,r=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let i=t.posAtCoords(Eo(n));if(!i)return;let o=t.state.doc.resolve(i.pos),s=r&&r.slice;s?t.someProp("transformPasted",d=>{s=d(s,t)}):s=tp(t,fp(n.dataTransfer),Kr?null:n.dataTransfer.getData("text/html"),!1,o);let l=!!(r&&!n[pp]);if(t.someProp("handleDrop",d=>d(t,n,s||R.empty,l))){n.preventDefault();return}if(!s)return;n.preventDefault();let a=s?Yb(t.state.doc,o.pos,s):o.pos;a==null&&(a=o.pos);let u=t.state.tr;if(l){let{node:d}=r;d?d.replace(u):u.deleteSelection()}let c=u.mapping.map(a),f=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,h=u.doc;if(f?u.replaceRangeWith(c,c,s.content.firstChild):u.replaceRange(c,c,s),u.doc.eq(h))return;let p=u.doc.resolve(c);if(f&&j.isSelectable(s.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(s.content.firstChild))u.setSelection(new j(p));else{let d=u.mapping.map(a);u.mapping.maps[u.mapping.maps.length-1].forEach((m,y,g,_)=>d=_),u.setSelection(Jl(t,p,u.doc.resolve(d)))}t.focus(),t.dispatch(u.setMeta("uiEvent","drop"))};Ee.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&Mt(t)},20))};Ee.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};Ee.beforeinput=(t,e)=>{if(we&&rt&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",o=>o(t,un(8,"Backspace")))))return;let{$cursor:i}=t.state.selection;i&&i.pos>0&&t.dispatch(t.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let t in Me)Ee[t]=Me[t];function Gr(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class oo{constructor(e,n){this.toDOM=e,this.spec=n||xn,this.side=this.spec.side||0}map(e,n,r,i){let{pos:o,deleted:s}=e.mapResult(n.from+i,this.side<0?-1:1);return s?null:new Ie(o-r,o-r,this)}valid(){return!0}eq(e){return this==e||e instanceof oo&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Gr(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Kt{constructor(e,n){this.attrs=e,this.spec=n||xn}map(e,n,r,i){let o=e.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,s=e.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new Ie(o,s,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Kt&&Gr(this.attrs,e.attrs)&&Gr(this.spec,e.spec)}static is(e){return e.type instanceof Kt}destroy(){}}class Xl{constructor(e,n){this.attrs=e,this.spec=n||xn}map(e,n,r,i){let o=e.mapResult(n.from+i,1);if(o.deleted)return null;let s=e.mapResult(n.to+i,-1);return s.deleted||s.pos<=o.pos?null:new Ie(o.pos-r,s.pos-r,this)}valid(e,n){let{index:r,offset:i}=e.content.findIndex(n.from),o;return i==n.from&&!(o=e.child(r)).isText&&i+o.nodeSize==n.to}eq(e){return this==e||e instanceof Xl&&Gr(this.attrs,e.attrs)&&Gr(this.spec,e.spec)}destroy(){}}class Ie{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new Ie(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new Ie(e,e,new oo(n,r))}static inline(e,n,r,i){return new Ie(e,n,new Kt(r,i))}static node(e,n,r,i){return new Ie(e,n,new Xl(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Kt}get widget(){return this.type instanceof oo}}const Fn=[],xn={};class oe{constructor(e,n){this.local=e.length?e:Fn,this.children=n.length?n:Fn}static create(e,n){return n.length?so(n,e,0,xn):ye}find(e,n,r){let i=[];return this.findInner(e??0,n??1e9,i,0,r),i}findInner(e,n,r,i,o){for(let s=0;s<this.local.length;s++){let l=this.local[s];l.from<=n&&l.to>=e&&(!o||o(l.spec))&&r.push(l.copy(l.from+i,l.to+i))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>e){let l=this.children[s]+1;this.children[s+2].findInner(e-l,n-l,r,i+l,o)}}map(e,n,r){return this==ye||e.maps.length==0?this:this.mapInner(e,n,0,0,r||xn)}mapInner(e,n,r,i,o){let s;for(let l=0;l<this.local.length;l++){let a=this.local[l].map(e,r,i);a&&a.type.valid(n,a)?(s||(s=[])).push(a):o.onRemove&&o.onRemove(this.local[l].spec)}return this.children.length?Jx(this.children,s||[],e,n,r,i,o):s?new oe(s.sort(kn),Fn):ye}add(e,n){return n.length?this==ye?oe.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let i,o=0;e.forEach((l,a)=>{let u=a+r,c;if(c=mp(n,l,u)){for(i||(i=this.children.slice());o<i.length&&i[o]<a;)o+=3;i[o]==a?i[o+2]=i[o+2].addInner(l,c,u+1):i.splice(o,0,a,a+l.nodeSize,so(c,l,u+1,xn)),o+=3}});let s=dp(o?gp(n):n,-r);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||s.splice(l--,1);return new oe(s.length?this.local.concat(s).sort(kn):this.local,i||this.children)}remove(e){return e.length==0||this==ye?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,i=this.local;for(let o=0;o<r.length;o+=3){let s,l=r[o]+n,a=r[o+1]+n;for(let c=0,f;c<e.length;c++)(f=e[c])&&f.from>l&&f.to<a&&(e[c]=null,(s||(s=[])).push(f));if(!s)continue;r==this.children&&(r=this.children.slice());let u=r[o+2].removeInner(s,l+1);u!=ye?r[o+2]=u:(r.splice(o,3),o-=3)}if(i.length){for(let o=0,s;o<e.length;o++)if(s=e[o])for(let l=0;l<i.length;l++)i[l].eq(s,n)&&(i==this.local&&(i=this.local.slice()),i.splice(l--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new oe(i,r):ye}forChild(e,n){if(this==ye)return this;if(n.isLeaf)return oe.empty;let r,i;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=e){this.children[l]==e&&(r=this.children[l+2]);break}let o=e+1,s=o+n.content.size;for(let l=0;l<this.local.length;l++){let a=this.local[l];if(a.from<s&&a.to>o&&a.type instanceof Kt){let u=Math.max(o,a.from)-o,c=Math.min(s,a.to)-o;u<c&&(i||(i=[])).push(a.copy(u,c))}}if(i){let l=new oe(i.sort(kn),Fn);return r?new Vt([l,r]):l}return r||ye}eq(e){if(this==e)return!0;if(!(e instanceof oe)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return Ql(this.localsInner(e))}localsInner(e){if(this==ye)return Fn;if(e.inlineContent||!this.local.some(Kt.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Kt||n.push(this.local[r]);return n}forEachSet(e){e(this)}}oe.empty=new oe([],[]);oe.removeOverlap=Ql;const ye=oe.empty;class Vt{constructor(e){this.members=e}map(e,n){const r=this.members.map(i=>i.map(e,n,xn));return Vt.from(r)}forChild(e,n){if(n.isLeaf)return oe.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(e,n);o!=ye&&(o instanceof Vt?r=r.concat(o.members):r.push(o))}return Vt.from(r)}eq(e){if(!(e instanceof Vt)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let i=0;i<this.members.length;i++){let o=this.members[i].localsInner(e);if(o.length)if(!n)n=o;else{r&&(n=n.slice(),r=!1);for(let s=0;s<o.length;s++)n.push(o[s])}}return n?Ql(r?n:n.sort(kn)):Fn}static from(e){switch(e.length){case 0:return ye;case 1:return e[0];default:return new Vt(e.every(n=>n instanceof oe)?e:e.reduce((n,r)=>n.concat(r instanceof oe?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function Jx(t,e,n,r,i,o,s){let l=t.slice();for(let u=0,c=o;u<n.maps.length;u++){let f=0;n.maps[u].forEach((h,p,d,m)=>{let y=m-d-(p-h);for(let g=0;g<l.length;g+=3){let _=l[g+1];if(_<0||h>_+c-f)continue;let x=l[g]+c-f;p>=x?l[g+1]=h<=x?-2:-1:h>=c&&y&&(l[g]+=y,l[g+1]+=y)}f+=y}),c=n.maps[u].map(c,-1)}let a=!1;for(let u=0;u<l.length;u+=3)if(l[u+1]<0){if(l[u+1]==-2){a=!0,l[u+1]=-1;continue}let c=n.map(t[u]+o),f=c-i;if(f<0||f>=r.content.size){a=!0;continue}let h=n.map(t[u+1]+o,-1),p=h-i,{index:d,offset:m}=r.content.findIndex(f),y=r.maybeChild(d);if(y&&m==f&&m+y.nodeSize==p){let g=l[u+2].mapInner(n,y,c+1,t[u]+o+1,s);g!=ye?(l[u]=f,l[u+1]=p,l[u+2]=g):(l[u+1]=-2,a=!0)}else a=!0}if(a){let u=Kx(l,t,e,n,i,o,s),c=so(u,r,0,s);e=c.local;for(let f=0;f<l.length;f+=3)l[f+1]<0&&(l.splice(f,3),f-=3);for(let f=0,h=0;f<c.children.length;f+=3){let p=c.children[f];for(;h<l.length&&l[h]<p;)h+=3;l.splice(h,0,c.children[f],c.children[f+1],c.children[f+2])}}return new oe(e.sort(kn),l)}function dp(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let i=t[r];n.push(new Ie(i.from+e,i.to+e,i.type))}return n}function Kx(t,e,n,r,i,o,s){function l(a,u){for(let c=0;c<a.local.length;c++){let f=a.local[c].map(r,i,u);f?n.push(f):s.onRemove&&s.onRemove(a.local[c].spec)}for(let c=0;c<a.children.length;c+=3)l(a.children[c+2],a.children[c]+u+1)}for(let a=0;a<t.length;a+=3)t[a+1]==-1&&l(t[a+2],e[a]+o+1);return n}function mp(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,i=null;for(let o=0,s;o<t.length;o++)(s=t[o])&&s.from>n&&s.to<r&&((i||(i=[])).push(s),t[o]=null);return i}function gp(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function so(t,e,n,r){let i=[],o=!1;e.forEach((l,a)=>{let u=mp(t,l,a+n);if(u){o=!0;let c=so(u,l,n+a+1,r);c!=ye&&i.push(a,a+l.nodeSize,c)}});let s=dp(o?gp(t):t,-n).sort(kn);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||(r.onRemove&&r.onRemove(s[l].spec),s.splice(l--,1));return s.length||i.length?new oe(s,i):ye}function kn(t,e){return t.from-e.from||t.to-e.to}function Ql(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let i=n+1;i<e.length;i++){let o=e[i];if(o.from==r.from){o.to!=r.to&&(e==t&&(e=t.slice()),e[i]=o.copy(o.from,r.to),lc(e,i+1,o.copy(r.to,o.to)));continue}else{o.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,o.from),lc(e,i,r.copy(o.from,r.to)));break}}}return e}function lc(t,e,n){for(;e<t.length&&kn(n,t[e])>0;)e++;t.splice(e,0,n)}function cs(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=ye&&e.push(r)}),t.cursorWrapper&&e.push(oe.create(t.state.doc,[t.cursorWrapper.deco])),Vt.from(e)}const Yx={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Gx=Pe&&Ut<=11;class Xx{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Qx{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Xx,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);Pe&&Ut<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),Gx&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Yx)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Zu(this.view)){if(this.suppressingSelectionUpdates)return Mt(this.view);if(Pe&&Ut<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Cn(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let o=e.focusNode;o;o=Jr(o))n.add(o);for(let o=e.anchorNode;o;o=Jr(o))if(n.has(o)){r=o;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}selectionChanged(e){return!this.suppressingSelectionUpdates&&!this.currentSelection.eq(e)&&Zu(this.view)&&!this.ignoreSelectionChange(e)}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),i=this.selectionChanged(r),o=-1,s=-1,l=!1,a=[];if(e.editable)for(let c=0;c<n.length;c++){let f=this.registerMutation(n[c],a);f&&(o=o<0?f.from:Math.min(f.from,o),s=s<0?f.to:Math.max(f.to,s),f.typeOver&&(l=!0))}if(at&&a.length){let c=a.filter(f=>f.nodeName=="BR");if(c.length==2){let[f,h]=c;f.parentNode&&f.parentNode.parentNode==h.parentNode?h.remove():f.remove()}else{let{focusNode:f}=this.currentSelection;for(let h of c){let p=h.parentNode;p&&p.nodeName=="LI"&&(!f||t3(e,f)!=p)&&h.remove()}}}let u=null;o<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Oo(r)&&(u=Ul(e))&&u.eq($.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Mt(e),this.currentSelection.set(r),e.scrollToSelection()):(o>-1||i)&&(o>-1&&(e.docView.markDirty(o,s),Zx(e)),this.handleDOMChange(o,s,l,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Mt(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let c=0;c<e.addedNodes.length;c++){let f=e.addedNodes[c];n.push(f),f.nodeType==3&&(this.lastChangedTextNode=f)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let i=e.previousSibling,o=e.nextSibling;if(Pe&&Ut<=11&&e.addedNodes.length)for(let c=0;c<e.addedNodes.length;c++){let{previousSibling:f,nextSibling:h}=e.addedNodes[c];(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(i=f),(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(o=h)}let s=i&&i.parentNode==e.target?me(i)+1:0,l=r.localPosFromDOM(e.target,s,-1),a=o&&o.parentNode==e.target?me(o):e.target.childNodes.length,u=r.localPosFromDOM(e.target,a,1);return{from:l,to:u}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let ac=new WeakMap,uc=!1;function Zx(t){if(!ac.has(t)&&(ac.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=at,uc)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),uc=!0}}function cc(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return Cn(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function e3(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return cc(t,i)}let n;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?cc(t,n):null}function t3(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function n3(t,e,n){let{node:r,fromOffset:i,toOffset:o,from:s,to:l}=t.docView.parseRange(e,n),a=t.domSelectionRange(),u,c=a.anchorNode;if(c&&t.dom.contains(c.nodeType==1?c:c.parentNode)&&(u=[{node:c,offset:a.anchorOffset}],Oo(a)||u.push({node:a.focusNode,offset:a.focusOffset})),we&&t.input.lastKeyCode===8)for(let y=o;y>i;y--){let g=r.childNodes[y-1],_=g.pmViewDesc;if(g.nodeName=="BR"&&!_){o=y;break}if(!_||_.size)break}let f=t.state.doc,h=t.someProp("domParser")||Wr.fromSchema(t.state.schema),p=f.resolve(s),d=null,m=h.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:i,to:o,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:r3,context:p});if(u&&u[0].pos!=null){let y=u[0].pos,g=u[1]&&u[1].pos;g==null&&(g=y),d={anchor:y+s,head:g+s}}return{doc:m,sel:d,from:s,to:l}}function r3(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(Ae&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||Ae&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const i3=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function o3(t,e,n,r,i){let o=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let E=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,v=Ul(t,E);if(v&&!t.state.selection.eq(v)){if(we&&rt&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",D=>D(t,un(13,"Enter"))))return;let T=t.state.tr.setSelection(v);E=="pointer"?T.setMeta("pointer",!0):E=="key"&&T.scrollIntoView(),o&&T.setMeta("composition",o),t.dispatch(T)}return}let s=t.state.doc.resolve(e),l=s.sharedDepth(n);e=s.before(l+1),n=t.state.doc.resolve(n).after(l+1);let a=t.state.selection,u=n3(t,e,n),c=t.state.doc,f=c.slice(u.from,u.to),h,p;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(h=t.state.selection.to,p="end"):(h=t.state.selection.from,p="start"),t.input.lastKeyCode=null;let d=a3(f.content,u.doc.content,u.from,h,p);if(d&&t.input.domChangeCount++,(ir&&t.input.lastIOSEnter>Date.now()-225||rt)&&i.some(E=>E.nodeType==1&&!i3.test(E.nodeName))&&(!d||d.endA>=d.endB)&&t.someProp("handleKeyDown",E=>E(t,un(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!d)if(r&&a instanceof X&&!a.empty&&a.$head.sameParent(a.$anchor)&&!t.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))d={start:a.from,endA:a.to,endB:a.to};else{if(u.sel){let E=fc(t,t.state.doc,u.sel);if(E&&!E.eq(t.state.selection)){let v=t.state.tr.setSelection(E);o&&v.setMeta("composition",o),t.dispatch(v)}}return}t.state.selection.from<t.state.selection.to&&d.start==d.endB&&t.state.selection instanceof X&&(d.start>t.state.selection.from&&d.start<=t.state.selection.from+2&&t.state.selection.from>=u.from?d.start=t.state.selection.from:d.endA<t.state.selection.to&&d.endA>=t.state.selection.to-2&&t.state.selection.to<=u.to&&(d.endB+=t.state.selection.to-d.endA,d.endA=t.state.selection.to)),Pe&&Ut<=11&&d.endB==d.start+1&&d.endA==d.start&&d.start>u.from&&u.doc.textBetween(d.start-u.from-1,d.start-u.from+1)==" "&&(d.start--,d.endA--,d.endB--);let m=u.doc.resolveNoCache(d.start-u.from),y=u.doc.resolveNoCache(d.endB-u.from),g=c.resolve(d.start),_=m.sameParent(y)&&m.parent.inlineContent&&g.end()>=d.endA,x;if((ir&&t.input.lastIOSEnter>Date.now()-225&&(!_||i.some(E=>E.nodeName=="DIV"||E.nodeName=="P"))||!_&&m.pos<u.doc.content.size&&!m.sameParent(y)&&(x=$.findFrom(u.doc.resolve(m.pos+1),1,!0))&&x.head==y.pos)&&t.someProp("handleKeyDown",E=>E(t,un(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>d.start&&l3(c,d.start,d.endA,m,y)&&t.someProp("handleKeyDown",E=>E(t,un(8,"Backspace")))){rt&&we&&t.domObserver.suppressSelectionUpdates();return}we&&rt&&d.endB==d.start&&(t.input.lastAndroidDelete=Date.now()),rt&&!_&&m.start()!=y.start()&&y.parentOffset==0&&m.depth==y.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==d.endA&&(d.endB-=2,y=u.doc.resolveNoCache(d.endB-u.from),setTimeout(()=>{t.someProp("handleKeyDown",function(E){return E(t,un(13,"Enter"))})},20));let S=d.start,O=d.endA,k,I,B;if(_){if(m.pos==y.pos)Pe&&Ut<=11&&m.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>Mt(t),20)),k=t.state.tr.delete(S,O),I=c.resolve(d.start).marksAcross(c.resolve(d.endA));else if(d.endA==d.endB&&(B=s3(m.parent.content.cut(m.parentOffset,y.parentOffset),g.parent.content.cut(g.parentOffset,d.endA-g.start()))))k=t.state.tr,B.type=="add"?k.addMark(S,O,B.mark):k.removeMark(S,O,B.mark);else if(m.parent.child(m.index()).isText&&m.index()==y.index()-(y.textOffset?0:1)){let E=m.parent.textBetween(m.parentOffset,y.parentOffset);if(t.someProp("handleTextInput",v=>v(t,S,O,E)))return;k=t.state.tr.insertText(E,S,O)}}if(k||(k=t.state.tr.replace(S,O,u.doc.slice(d.start-u.from,d.endB-u.from))),u.sel){let E=fc(t,k.doc,u.sel);E&&!(we&&rt&&t.composing&&E.empty&&(d.start!=d.endB||t.input.lastAndroidDelete<Date.now()-100)&&(E.head==S||E.head==k.mapping.map(O)-1)||Pe&&E.empty&&E.head==S)&&k.setSelection(E)}I&&k.ensureMarks(I),o&&k.setMeta("composition",o),t.dispatch(k.scrollIntoView())}function fc(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:Jl(t,e.resolve(n.anchor),e.resolve(n.head))}function s3(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,i=n,o=r,s,l,a;for(let c=0;c<r.length;c++)i=r[c].removeFromSet(i);for(let c=0;c<n.length;c++)o=n[c].removeFromSet(o);if(i.length==1&&o.length==0)l=i[0],s="add",a=c=>c.mark(l.addToSet(c.marks));else if(i.length==0&&o.length==1)l=o[0],s="remove",a=c=>c.mark(l.removeFromSet(c.marks));else return null;let u=[];for(let c=0;c<e.childCount;c++)u.push(a(e.child(c)));if(M.from(u).eq(t))return{mark:l,type:s}}function l3(t,e,n,r,i){if(n-e<=i.pos-r.pos||fs(r,!0,!1)<i.pos)return!1;let o=t.resolve(e);if(!r.parent.isTextblock){let l=o.nodeAfter;return l!=null&&n==e+l.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=t.resolve(fs(o,!0,!0));return!s.parent.isTextblock||s.pos>n||fs(s,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function fs(t,e,n){let r=t.depth,i=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,i++,e=!1;if(n){let o=t.node(r).maybeChild(t.indexAfter(r));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function a3(t,e,n,r,i){let o=t.findDiffStart(e,n);if(o==null)return null;let{a:s,b:l}=t.findDiffEnd(e,n+t.size,n+e.size);if(i=="end"){let a=Math.max(0,o-Math.min(s,l));r-=s+a-o}if(s<o&&t.size<e.size){let a=r<=o&&r>=s?o-r:0;o-=a,o&&o<e.size&&hc(e.textBetween(o-1,o+1))&&(o+=a?1:-1),l=o+(l-s),s=o}else if(l<o){let a=r<=o&&r>=l?o-r:0;o-=a,o&&o<t.size&&hc(t.textBetween(o-1,o+1))&&(o+=a?1:-1),s=o+(s-l),l=o}return{start:o,endA:s,endB:l}}function hc(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class $8{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Ex,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(yc),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=mc(this),dc(this),this.nodeViews=gc(this),this.docView=Ju(this.state.doc,pc(this),cs(this),this.dom,this),this.domObserver=new Qx(this,(r,i,o,s)=>o3(this,r,i,o,s)),this.domObserver.start(),Mx(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&ll(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(yc),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let i=this.state,o=!1,s=!1;e.storedMarks&&this.composing&&(cp(this),s=!0),this.state=e;let l=i.plugins!=e.plugins||this._props.plugins!=n.plugins;if(l||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=gc(this);c3(p,this.nodeViews)&&(this.nodeViews=p,o=!0)}(l||n.handleDOMEvents!=this._props.handleDOMEvents)&&ll(this),this.editable=mc(this),dc(this);let a=cs(this),u=pc(this),c=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",f=o||!this.docView.matchesNode(e.doc,u,a);(f||!e.selection.eq(i.selection))&&(s=!0);let h=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&qw(this);if(s){this.domObserver.stop();let p=f&&(Pe||we)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&u3(i.selection,e.selection);if(f){let d=we?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=jx(this)),(o||!this.docView.update(e.doc,u,a,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=Ju(e.doc,u,a,this.dom,this)),d&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&px(this))?Mt(this,p):(Xh(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():h&&$w(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof j){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&Hu(this,n.getBoundingClientRect(),e)}else Hu(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}}updateDraggedNode(e,n){let r=e.node,i=-1;if(this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let o=r.from+(this.state.doc.content.size-n.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==r.node&&(i=o)}this.dragging=new hp(e.slice,e.move,i<0?void 0:j.create(this.state.doc,i))}someProp(e,n){let r=this._props&&this._props[e],i;if(r!=null&&(i=n?n(r):r))return i;for(let s=0;s<this.directPlugins.length;s++){let l=this.directPlugins[s].props[e];if(l!=null&&(i=n?n(l):l))return i}let o=this.state.plugins;if(o)for(let s=0;s<o.length;s++){let l=o[s].props[e];if(l!=null&&(i=n?n(l):l))return i}}hasFocus(){if(Pe){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&Ww(this.dom),Mt(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return Gw(this,e)}coordsAtPos(e,n=1){return qh(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let i=this.docView.posFromDOM(e,n,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,n){return tx(this,n||this.state,e)}pasteHTML(e,n){return Yr(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Yr(this,e,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(Tx(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],cs(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Dw())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return Dx(this,e)}dispatch(e){let n=this._props.dispatchTransaction;n?n.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?Ae&&this.root.nodeType===11&&Fw(this.dom.ownerDocument)==this.dom&&e3(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function pc(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[Ie.node(0,t.state.doc.content.size,e)]}function dc(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:Ie.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function mc(t){return!t.someProp("editable",e=>e(t.state)===!1)}function u3(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function gc(t){let e=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=r[i])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function c3(t,e){let n=0,r=0;for(let i in t){if(t[i]!=e[i])return!0;n++}for(let i in e)r++;return n!=r}function yc(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}let f3=t=>crypto.getRandomValues(new Uint8Array(t)),h3=(t,e,n)=>{let r=(2<<Math.log(t.length-1)/Math.LN2)-1,i=-~(1.6*r*e/t.length);return(o=e)=>{let s="";for(;;){let l=n(i),a=i;for(;a--;)if(s+=t[l[a]&r]||"",s.length===o)return s}}},W8=(t,e=21)=>h3(t,e,f3);function Mo(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const p3=[["ß","ss"],["ẞ","Ss"],["ä","ae"],["Ä","Ae"],["ö","oe"],["Ö","Oe"],["ü","ue"],["Ü","Ue"],["À","A"],["Á","A"],["Â","A"],["Ã","A"],["Ä","Ae"],["Å","A"],["Æ","AE"],["Ç","C"],["È","E"],["É","E"],["Ê","E"],["Ë","E"],["Ì","I"],["Í","I"],["Î","I"],["Ï","I"],["Ð","D"],["Ñ","N"],["Ò","O"],["Ó","O"],["Ô","O"],["Õ","O"],["Ö","Oe"],["Ő","O"],["Ø","O"],["Ù","U"],["Ú","U"],["Û","U"],["Ü","Ue"],["Ű","U"],["Ý","Y"],["Þ","TH"],["ß","ss"],["à","a"],["á","a"],["â","a"],["ã","a"],["ä","ae"],["å","a"],["æ","ae"],["ç","c"],["è","e"],["é","e"],["ê","e"],["ë","e"],["ì","i"],["í","i"],["î","i"],["ï","i"],["ð","d"],["ñ","n"],["ò","o"],["ó","o"],["ô","o"],["õ","o"],["ö","oe"],["ő","o"],["ø","o"],["ù","u"],["ú","u"],["û","u"],["ü","ue"],["ű","u"],["ý","y"],["þ","th"],["ÿ","y"],["ẞ","SS"],["à","a"],["À","A"],["á","a"],["Á","A"],["â","a"],["Â","A"],["ã","a"],["Ã","A"],["è","e"],["È","E"],["é","e"],["É","E"],["ê","e"],["Ê","E"],["ì","i"],["Ì","I"],["í","i"],["Í","I"],["ò","o"],["Ò","O"],["ó","o"],["Ó","O"],["ô","o"],["Ô","O"],["õ","o"],["Õ","O"],["ù","u"],["Ù","U"],["ú","u"],["Ú","U"],["ý","y"],["Ý","Y"],["ă","a"],["Ă","A"],["Đ","D"],["đ","d"],["ĩ","i"],["Ĩ","I"],["ũ","u"],["Ũ","U"],["ơ","o"],["Ơ","O"],["ư","u"],["Ư","U"],["ạ","a"],["Ạ","A"],["ả","a"],["Ả","A"],["ấ","a"],["Ấ","A"],["ầ","a"],["Ầ","A"],["ẩ","a"],["Ẩ","A"],["ẫ","a"],["Ẫ","A"],["ậ","a"],["Ậ","A"],["ắ","a"],["Ắ","A"],["ằ","a"],["Ằ","A"],["ẳ","a"],["Ẳ","A"],["ẵ","a"],["Ẵ","A"],["ặ","a"],["Ặ","A"],["ẹ","e"],["Ẹ","E"],["ẻ","e"],["Ẻ","E"],["ẽ","e"],["Ẽ","E"],["ế","e"],["Ế","E"],["ề","e"],["Ề","E"],["ể","e"],["Ể","E"],["ễ","e"],["Ễ","E"],["ệ","e"],["Ệ","E"],["ỉ","i"],["Ỉ","I"],["ị","i"],["Ị","I"],["ọ","o"],["Ọ","O"],["ỏ","o"],["Ỏ","O"],["ố","o"],["Ố","O"],["ồ","o"],["Ồ","O"],["ổ","o"],["Ổ","O"],["ỗ","o"],["Ỗ","O"],["ộ","o"],["Ộ","O"],["ớ","o"],["Ớ","O"],["ờ","o"],["Ờ","O"],["ở","o"],["Ở","O"],["ỡ","o"],["Ỡ","O"],["ợ","o"],["Ợ","O"],["ụ","u"],["Ụ","U"],["ủ","u"],["Ủ","U"],["ứ","u"],["Ứ","U"],["ừ","u"],["Ừ","U"],["ử","u"],["Ử","U"],["ữ","u"],["Ữ","U"],["ự","u"],["Ự","U"],["ỳ","y"],["Ỳ","Y"],["ỵ","y"],["Ỵ","Y"],["ỷ","y"],["Ỷ","Y"],["ỹ","y"],["Ỹ","Y"],["ء","e"],["آ","a"],["أ","a"],["ؤ","w"],["إ","i"],["ئ","y"],["ا","a"],["ب","b"],["ة","t"],["ت","t"],["ث","th"],["ج","j"],["ح","h"],["خ","kh"],["د","d"],["ذ","dh"],["ر","r"],["ز","z"],["س","s"],["ش","sh"],["ص","s"],["ض","d"],["ط","t"],["ظ","z"],["ع","e"],["غ","gh"],["ـ","_"],["ف","f"],["ق","q"],["ك","k"],["ل","l"],["م","m"],["ن","n"],["ه","h"],["و","w"],["ى","a"],["ي","y"],["َ","a"],["ُ","u"],["ِ","i"],["٠","0"],["١","1"],["٢","2"],["٣","3"],["٤","4"],["٥","5"],["٦","6"],["٧","7"],["٨","8"],["٩","9"],["چ","ch"],["ک","k"],["گ","g"],["پ","p"],["ژ","zh"],["ی","y"],["۰","0"],["۱","1"],["۲","2"],["۳","3"],["۴","4"],["۵","5"],["۶","6"],["۷","7"],["۸","8"],["۹","9"],["ټ","p"],["ځ","z"],["څ","c"],["ډ","d"],["ﺫ","d"],["ﺭ","r"],["ړ","r"],["ﺯ","z"],["ږ","g"],["ښ","x"],["ګ","g"],["ڼ","n"],["ۀ","e"],["ې","e"],["ۍ","ai"],["ٹ","t"],["ڈ","d"],["ڑ","r"],["ں","n"],["ہ","h"],["ھ","h"],["ے","e"],["А","A"],["а","a"],["Б","B"],["б","b"],["В","V"],["в","v"],["Г","G"],["г","g"],["Д","D"],["д","d"],["ъе","ye"],["Ъе","Ye"],["ъЕ","yE"],["ЪЕ","YE"],["Е","E"],["е","e"],["Ё","Yo"],["ё","yo"],["Ж","Zh"],["ж","zh"],["З","Z"],["з","z"],["И","I"],["и","i"],["ый","iy"],["Ый","Iy"],["ЫЙ","IY"],["ыЙ","iY"],["Й","Y"],["й","y"],["К","K"],["к","k"],["Л","L"],["л","l"],["М","M"],["м","m"],["Н","N"],["н","n"],["О","O"],["о","o"],["П","P"],["п","p"],["Р","R"],["р","r"],["С","S"],["с","s"],["Т","T"],["т","t"],["У","U"],["у","u"],["Ф","F"],["ф","f"],["Х","Kh"],["х","kh"],["Ц","Ts"],["ц","ts"],["Ч","Ch"],["ч","ch"],["Ш","Sh"],["ш","sh"],["Щ","Sch"],["щ","sch"],["Ъ",""],["ъ",""],["Ы","Y"],["ы","y"],["Ь",""],["ь",""],["Э","E"],["э","e"],["Ю","Yu"],["ю","yu"],["Я","Ya"],["я","ya"],["ă","a"],["Ă","A"],["ș","s"],["Ș","S"],["ț","t"],["Ț","T"],["ţ","t"],["Ţ","T"],["ş","s"],["Ş","S"],["ç","c"],["Ç","C"],["ğ","g"],["Ğ","G"],["ı","i"],["İ","I"],["ա","a"],["Ա","A"],["բ","b"],["Բ","B"],["գ","g"],["Գ","G"],["դ","d"],["Դ","D"],["ե","ye"],["Ե","Ye"],["զ","z"],["Զ","Z"],["է","e"],["Է","E"],["ը","y"],["Ը","Y"],["թ","t"],["Թ","T"],["ժ","zh"],["Ժ","Zh"],["ի","i"],["Ի","I"],["լ","l"],["Լ","L"],["խ","kh"],["Խ","Kh"],["ծ","ts"],["Ծ","Ts"],["կ","k"],["Կ","K"],["հ","h"],["Հ","H"],["ձ","dz"],["Ձ","Dz"],["ղ","gh"],["Ղ","Gh"],["ճ","tch"],["Ճ","Tch"],["մ","m"],["Մ","M"],["յ","y"],["Յ","Y"],["ն","n"],["Ն","N"],["շ","sh"],["Շ","Sh"],["ո","vo"],["Ո","Vo"],["չ","ch"],["Չ","Ch"],["պ","p"],["Պ","P"],["ջ","j"],["Ջ","J"],["ռ","r"],["Ռ","R"],["ս","s"],["Ս","S"],["վ","v"],["Վ","V"],["տ","t"],["Տ","T"],["ր","r"],["Ր","R"],["ց","c"],["Ց","C"],["ու","u"],["ՈՒ","U"],["Ու","U"],["փ","p"],["Փ","P"],["ք","q"],["Ք","Q"],["օ","o"],["Օ","O"],["ֆ","f"],["Ֆ","F"],["և","yev"],["ა","a"],["ბ","b"],["გ","g"],["დ","d"],["ე","e"],["ვ","v"],["ზ","z"],["თ","t"],["ი","i"],["კ","k"],["ლ","l"],["მ","m"],["ნ","n"],["ო","o"],["პ","p"],["ჟ","zh"],["რ","r"],["ს","s"],["ტ","t"],["უ","u"],["ფ","ph"],["ქ","q"],["ღ","gh"],["ყ","k"],["შ","sh"],["ჩ","ch"],["ც","ts"],["ძ","dz"],["წ","ts"],["ჭ","tch"],["ხ","kh"],["ჯ","j"],["ჰ","h"],["č","c"],["ď","d"],["ě","e"],["ň","n"],["ř","r"],["š","s"],["ť","t"],["ů","u"],["ž","z"],["Č","C"],["Ď","D"],["Ě","E"],["Ň","N"],["Ř","R"],["Š","S"],["Ť","T"],["Ů","U"],["Ž","Z"],["ހ","h"],["ށ","sh"],["ނ","n"],["ރ","r"],["ބ","b"],["ޅ","lh"],["ކ","k"],["އ","a"],["ވ","v"],["މ","m"],["ފ","f"],["ދ","dh"],["ތ","th"],["ލ","l"],["ގ","g"],["ޏ","gn"],["ސ","s"],["ޑ","d"],["ޒ","z"],["ޓ","t"],["ޔ","y"],["ޕ","p"],["ޖ","j"],["ޗ","ch"],["ޘ","tt"],["ޙ","hh"],["ޚ","kh"],["ޛ","th"],["ޜ","z"],["ޝ","sh"],["ޞ","s"],["ޟ","d"],["ޠ","t"],["ޡ","z"],["ޢ","a"],["ޣ","gh"],["ޤ","q"],["ޥ","w"],["ަ","a"],["ާ","aa"],["ި","i"],["ީ","ee"],["ު","u"],["ޫ","oo"],["ެ","e"],["ޭ","ey"],["ޮ","o"],["ޯ","oa"],["ް",""],["α","a"],["β","v"],["γ","g"],["δ","d"],["ε","e"],["ζ","z"],["η","i"],["θ","th"],["ι","i"],["κ","k"],["λ","l"],["μ","m"],["ν","n"],["ξ","ks"],["ο","o"],["π","p"],["ρ","r"],["σ","s"],["τ","t"],["υ","y"],["φ","f"],["χ","x"],["ψ","ps"],["ω","o"],["ά","a"],["έ","e"],["ί","i"],["ό","o"],["ύ","y"],["ή","i"],["ώ","o"],["ς","s"],["ϊ","i"],["ΰ","y"],["ϋ","y"],["ΐ","i"],["Α","A"],["Β","B"],["Γ","G"],["Δ","D"],["Ε","E"],["Ζ","Z"],["Η","I"],["Θ","TH"],["Ι","I"],["Κ","K"],["Λ","L"],["Μ","M"],["Ν","N"],["Ξ","KS"],["Ο","O"],["Π","P"],["Ρ","R"],["Σ","S"],["Τ","T"],["Υ","Y"],["Φ","F"],["Χ","X"],["Ψ","PS"],["Ω","O"],["Ά","A"],["Έ","E"],["Ί","I"],["Ό","O"],["Ύ","Y"],["Ή","I"],["Ώ","O"],["Ϊ","I"],["Ϋ","Y"],["ā","a"],["ē","e"],["ģ","g"],["ī","i"],["ķ","k"],["ļ","l"],["ņ","n"],["ū","u"],["Ā","A"],["Ē","E"],["Ģ","G"],["Ī","I"],["Ķ","K"],["Ļ","L"],["Ņ","N"],["Ū","U"],["č","c"],["š","s"],["ž","z"],["Č","C"],["Š","S"],["Ž","Z"],["ą","a"],["č","c"],["ę","e"],["ė","e"],["į","i"],["š","s"],["ų","u"],["ū","u"],["ž","z"],["Ą","A"],["Č","C"],["Ę","E"],["Ė","E"],["Į","I"],["Š","S"],["Ų","U"],["Ū","U"],["Ќ","Kj"],["ќ","kj"],["Љ","Lj"],["љ","lj"],["Њ","Nj"],["њ","nj"],["Тс","Ts"],["тс","ts"],["ą","a"],["ć","c"],["ę","e"],["ł","l"],["ń","n"],["ś","s"],["ź","z"],["ż","z"],["Ą","A"],["Ć","C"],["Ę","E"],["Ł","L"],["Ń","N"],["Ś","S"],["Ź","Z"],["Ż","Z"],["Є","Ye"],["І","I"],["Ї","Yi"],["Ґ","G"],["є","ye"],["і","i"],["ї","yi"],["ґ","g"],["IJ","IJ"],["ij","ij"],["¢","c"],["¥","Y"],["߿","b"],["৳","t"],["૱","Bo"],["฿","B"],["₠","CE"],["₡","C"],["₢","Cr"],["₣","F"],["₥","m"],["₦","N"],["₧","Pt"],["₨","Rs"],["₩","W"],["₫","s"],["€","E"],["₭","K"],["₮","T"],["₯","Dp"],["₰","S"],["₱","P"],["₲","G"],["₳","A"],["₴","S"],["₵","C"],["₶","tt"],["₷","S"],["₸","T"],["₹","R"],["₺","L"],["₽","P"],["₿","B"],["﹩","$"],["¢","c"],["¥","Y"],["₩","W"],["𝐀","A"],["𝐁","B"],["𝐂","C"],["𝐃","D"],["𝐄","E"],["𝐅","F"],["𝐆","G"],["𝐇","H"],["𝐈","I"],["𝐉","J"],["𝐊","K"],["𝐋","L"],["𝐌","M"],["𝐍","N"],["𝐎","O"],["𝐏","P"],["𝐐","Q"],["𝐑","R"],["𝐒","S"],["𝐓","T"],["𝐔","U"],["𝐕","V"],["𝐖","W"],["𝐗","X"],["𝐘","Y"],["𝐙","Z"],["𝐚","a"],["𝐛","b"],["𝐜","c"],["𝐝","d"],["𝐞","e"],["𝐟","f"],["𝐠","g"],["𝐡","h"],["𝐢","i"],["𝐣","j"],["𝐤","k"],["𝐥","l"],["𝐦","m"],["𝐧","n"],["𝐨","o"],["𝐩","p"],["𝐪","q"],["𝐫","r"],["𝐬","s"],["𝐭","t"],["𝐮","u"],["𝐯","v"],["𝐰","w"],["𝐱","x"],["𝐲","y"],["𝐳","z"],["𝐴","A"],["𝐵","B"],["𝐶","C"],["𝐷","D"],["𝐸","E"],["𝐹","F"],["𝐺","G"],["𝐻","H"],["𝐼","I"],["𝐽","J"],["𝐾","K"],["𝐿","L"],["𝑀","M"],["𝑁","N"],["𝑂","O"],["𝑃","P"],["𝑄","Q"],["𝑅","R"],["𝑆","S"],["𝑇","T"],["𝑈","U"],["𝑉","V"],["𝑊","W"],["𝑋","X"],["𝑌","Y"],["𝑍","Z"],["𝑎","a"],["𝑏","b"],["𝑐","c"],["𝑑","d"],["𝑒","e"],["𝑓","f"],["𝑔","g"],["𝑖","i"],["𝑗","j"],["𝑘","k"],["𝑙","l"],["𝑚","m"],["𝑛","n"],["𝑜","o"],["𝑝","p"],["𝑞","q"],["𝑟","r"],["𝑠","s"],["𝑡","t"],["𝑢","u"],["𝑣","v"],["𝑤","w"],["𝑥","x"],["𝑦","y"],["𝑧","z"],["𝑨","A"],["𝑩","B"],["𝑪","C"],["𝑫","D"],["𝑬","E"],["𝑭","F"],["𝑮","G"],["𝑯","H"],["𝑰","I"],["𝑱","J"],["𝑲","K"],["𝑳","L"],["𝑴","M"],["𝑵","N"],["𝑶","O"],["𝑷","P"],["𝑸","Q"],["𝑹","R"],["𝑺","S"],["𝑻","T"],["𝑼","U"],["𝑽","V"],["𝑾","W"],["𝑿","X"],["𝒀","Y"],["𝒁","Z"],["𝒂","a"],["𝒃","b"],["𝒄","c"],["𝒅","d"],["𝒆","e"],["𝒇","f"],["𝒈","g"],["𝒉","h"],["𝒊","i"],["𝒋","j"],["𝒌","k"],["𝒍","l"],["𝒎","m"],["𝒏","n"],["𝒐","o"],["𝒑","p"],["𝒒","q"],["𝒓","r"],["𝒔","s"],["𝒕","t"],["𝒖","u"],["𝒗","v"],["𝒘","w"],["𝒙","x"],["𝒚","y"],["𝒛","z"],["𝒜","A"],["𝒞","C"],["𝒟","D"],["𝒢","g"],["𝒥","J"],["𝒦","K"],["𝒩","N"],["𝒪","O"],["𝒫","P"],["𝒬","Q"],["𝒮","S"],["𝒯","T"],["𝒰","U"],["𝒱","V"],["𝒲","W"],["𝒳","X"],["𝒴","Y"],["𝒵","Z"],["𝒶","a"],["𝒷","b"],["𝒸","c"],["𝒹","d"],["𝒻","f"],["𝒽","h"],["𝒾","i"],["𝒿","j"],["𝓀","h"],["𝓁","l"],["𝓂","m"],["𝓃","n"],["𝓅","p"],["𝓆","q"],["𝓇","r"],["𝓈","s"],["𝓉","t"],["𝓊","u"],["𝓋","v"],["𝓌","w"],["𝓍","x"],["𝓎","y"],["𝓏","z"],["𝓐","A"],["𝓑","B"],["𝓒","C"],["𝓓","D"],["𝓔","E"],["𝓕","F"],["𝓖","G"],["𝓗","H"],["𝓘","I"],["𝓙","J"],["𝓚","K"],["𝓛","L"],["𝓜","M"],["𝓝","N"],["𝓞","O"],["𝓟","P"],["𝓠","Q"],["𝓡","R"],["𝓢","S"],["𝓣","T"],["𝓤","U"],["𝓥","V"],["𝓦","W"],["𝓧","X"],["𝓨","Y"],["𝓩","Z"],["𝓪","a"],["𝓫","b"],["𝓬","c"],["𝓭","d"],["𝓮","e"],["𝓯","f"],["𝓰","g"],["𝓱","h"],["𝓲","i"],["𝓳","j"],["𝓴","k"],["𝓵","l"],["𝓶","m"],["𝓷","n"],["𝓸","o"],["𝓹","p"],["𝓺","q"],["𝓻","r"],["𝓼","s"],["𝓽","t"],["𝓾","u"],["𝓿","v"],["𝔀","w"],["𝔁","x"],["𝔂","y"],["𝔃","z"],["𝔄","A"],["𝔅","B"],["𝔇","D"],["𝔈","E"],["𝔉","F"],["𝔊","G"],["𝔍","J"],["𝔎","K"],["𝔏","L"],["𝔐","M"],["𝔑","N"],["𝔒","O"],["𝔓","P"],["𝔔","Q"],["𝔖","S"],["𝔗","T"],["𝔘","U"],["𝔙","V"],["𝔚","W"],["𝔛","X"],["𝔜","Y"],["𝔞","a"],["𝔟","b"],["𝔠","c"],["𝔡","d"],["𝔢","e"],["𝔣","f"],["𝔤","g"],["𝔥","h"],["𝔦","i"],["𝔧","j"],["𝔨","k"],["𝔩","l"],["𝔪","m"],["𝔫","n"],["𝔬","o"],["𝔭","p"],["𝔮","q"],["𝔯","r"],["𝔰","s"],["𝔱","t"],["𝔲","u"],["𝔳","v"],["𝔴","w"],["𝔵","x"],["𝔶","y"],["𝔷","z"],["𝔸","A"],["𝔹","B"],["𝔻","D"],["𝔼","E"],["𝔽","F"],["𝔾","G"],["𝕀","I"],["𝕁","J"],["𝕂","K"],["𝕃","L"],["𝕄","M"],["𝕆","N"],["𝕊","S"],["𝕋","T"],["𝕌","U"],["𝕍","V"],["𝕎","W"],["𝕏","X"],["𝕐","Y"],["𝕒","a"],["𝕓","b"],["𝕔","c"],["𝕕","d"],["𝕖","e"],["𝕗","f"],["𝕘","g"],["𝕙","h"],["𝕚","i"],["𝕛","j"],["𝕜","k"],["𝕝","l"],["𝕞","m"],["𝕟","n"],["𝕠","o"],["𝕡","p"],["𝕢","q"],["𝕣","r"],["𝕤","s"],["𝕥","t"],["𝕦","u"],["𝕧","v"],["𝕨","w"],["𝕩","x"],["𝕪","y"],["𝕫","z"],["𝕬","A"],["𝕭","B"],["𝕮","C"],["𝕯","D"],["𝕰","E"],["𝕱","F"],["𝕲","G"],["𝕳","H"],["𝕴","I"],["𝕵","J"],["𝕶","K"],["𝕷","L"],["𝕸","M"],["𝕹","N"],["𝕺","O"],["𝕻","P"],["𝕼","Q"],["𝕽","R"],["𝕾","S"],["𝕿","T"],["𝖀","U"],["𝖁","V"],["𝖂","W"],["𝖃","X"],["𝖄","Y"],["𝖅","Z"],["𝖆","a"],["𝖇","b"],["𝖈","c"],["𝖉","d"],["𝖊","e"],["𝖋","f"],["𝖌","g"],["𝖍","h"],["𝖎","i"],["𝖏","j"],["𝖐","k"],["𝖑","l"],["𝖒","m"],["𝖓","n"],["𝖔","o"],["𝖕","p"],["𝖖","q"],["𝖗","r"],["𝖘","s"],["𝖙","t"],["𝖚","u"],["𝖛","v"],["𝖜","w"],["𝖝","x"],["𝖞","y"],["𝖟","z"],["𝖠","A"],["𝖡","B"],["𝖢","C"],["𝖣","D"],["𝖤","E"],["𝖥","F"],["𝖦","G"],["𝖧","H"],["𝖨","I"],["𝖩","J"],["𝖪","K"],["𝖫","L"],["𝖬","M"],["𝖭","N"],["𝖮","O"],["𝖯","P"],["𝖰","Q"],["𝖱","R"],["𝖲","S"],["𝖳","T"],["𝖴","U"],["𝖵","V"],["𝖶","W"],["𝖷","X"],["𝖸","Y"],["𝖹","Z"],["𝖺","a"],["𝖻","b"],["𝖼","c"],["𝖽","d"],["𝖾","e"],["𝖿","f"],["𝗀","g"],["𝗁","h"],["𝗂","i"],["𝗃","j"],["𝗄","k"],["𝗅","l"],["𝗆","m"],["𝗇","n"],["𝗈","o"],["𝗉","p"],["𝗊","q"],["𝗋","r"],["𝗌","s"],["𝗍","t"],["𝗎","u"],["𝗏","v"],["𝗐","w"],["𝗑","x"],["𝗒","y"],["𝗓","z"],["𝗔","A"],["𝗕","B"],["𝗖","C"],["𝗗","D"],["𝗘","E"],["𝗙","F"],["𝗚","G"],["𝗛","H"],["𝗜","I"],["𝗝","J"],["𝗞","K"],["𝗟","L"],["𝗠","M"],["𝗡","N"],["𝗢","O"],["𝗣","P"],["𝗤","Q"],["𝗥","R"],["𝗦","S"],["𝗧","T"],["𝗨","U"],["𝗩","V"],["𝗪","W"],["𝗫","X"],["𝗬","Y"],["𝗭","Z"],["𝗮","a"],["𝗯","b"],["𝗰","c"],["𝗱","d"],["𝗲","e"],["𝗳","f"],["𝗴","g"],["𝗵","h"],["𝗶","i"],["𝗷","j"],["𝗸","k"],["𝗹","l"],["𝗺","m"],["𝗻","n"],["𝗼","o"],["𝗽","p"],["𝗾","q"],["𝗿","r"],["𝘀","s"],["𝘁","t"],["𝘂","u"],["𝘃","v"],["𝘄","w"],["𝘅","x"],["𝘆","y"],["𝘇","z"],["𝘈","A"],["𝘉","B"],["𝘊","C"],["𝘋","D"],["𝘌","E"],["𝘍","F"],["𝘎","G"],["𝘏","H"],["𝘐","I"],["𝘑","J"],["𝘒","K"],["𝘓","L"],["𝘔","M"],["𝘕","N"],["𝘖","O"],["𝘗","P"],["𝘘","Q"],["𝘙","R"],["𝘚","S"],["𝘛","T"],["𝘜","U"],["𝘝","V"],["𝘞","W"],["𝘟","X"],["𝘠","Y"],["𝘡","Z"],["𝘢","a"],["𝘣","b"],["𝘤","c"],["𝘥","d"],["𝘦","e"],["𝘧","f"],["𝘨","g"],["𝘩","h"],["𝘪","i"],["𝘫","j"],["𝘬","k"],["𝘭","l"],["𝘮","m"],["𝘯","n"],["𝘰","o"],["𝘱","p"],["𝘲","q"],["𝘳","r"],["𝘴","s"],["𝘵","t"],["𝘶","u"],["𝘷","v"],["𝘸","w"],["𝘹","x"],["𝘺","y"],["𝘻","z"],["𝘼","A"],["𝘽","B"],["𝘾","C"],["𝘿","D"],["𝙀","E"],["𝙁","F"],["𝙂","G"],["𝙃","H"],["𝙄","I"],["𝙅","J"],["𝙆","K"],["𝙇","L"],["𝙈","M"],["𝙉","N"],["𝙊","O"],["𝙋","P"],["𝙌","Q"],["𝙍","R"],["𝙎","S"],["𝙏","T"],["𝙐","U"],["𝙑","V"],["𝙒","W"],["𝙓","X"],["𝙔","Y"],["𝙕","Z"],["𝙖","a"],["𝙗","b"],["𝙘","c"],["𝙙","d"],["𝙚","e"],["𝙛","f"],["𝙜","g"],["𝙝","h"],["𝙞","i"],["𝙟","j"],["𝙠","k"],["𝙡","l"],["𝙢","m"],["𝙣","n"],["𝙤","o"],["𝙥","p"],["𝙦","q"],["𝙧","r"],["𝙨","s"],["𝙩","t"],["𝙪","u"],["𝙫","v"],["𝙬","w"],["𝙭","x"],["𝙮","y"],["𝙯","z"],["𝙰","A"],["𝙱","B"],["𝙲","C"],["𝙳","D"],["𝙴","E"],["𝙵","F"],["𝙶","G"],["𝙷","H"],["𝙸","I"],["𝙹","J"],["𝙺","K"],["𝙻","L"],["𝙼","M"],["𝙽","N"],["𝙾","O"],["𝙿","P"],["𝚀","Q"],["𝚁","R"],["𝚂","S"],["𝚃","T"],["𝚄","U"],["𝚅","V"],["𝚆","W"],["𝚇","X"],["𝚈","Y"],["𝚉","Z"],["𝚊","a"],["𝚋","b"],["𝚌","c"],["𝚍","d"],["𝚎","e"],["𝚏","f"],["𝚐","g"],["𝚑","h"],["𝚒","i"],["𝚓","j"],["𝚔","k"],["𝚕","l"],["𝚖","m"],["𝚗","n"],["𝚘","o"],["𝚙","p"],["𝚚","q"],["𝚛","r"],["𝚜","s"],["𝚝","t"],["𝚞","u"],["𝚟","v"],["𝚠","w"],["𝚡","x"],["𝚢","y"],["𝚣","z"],["𝚤","l"],["𝚥","j"],["𝛢","A"],["𝛣","B"],["𝛤","G"],["𝛥","D"],["𝛦","E"],["𝛧","Z"],["𝛨","I"],["𝛩","TH"],["𝛪","I"],["𝛫","K"],["𝛬","L"],["𝛭","M"],["𝛮","N"],["𝛯","KS"],["𝛰","O"],["𝛱","P"],["𝛲","R"],["𝛳","TH"],["𝛴","S"],["𝛵","T"],["𝛶","Y"],["𝛷","F"],["𝛸","x"],["𝛹","PS"],["𝛺","O"],["𝛻","D"],["𝛼","a"],["𝛽","b"],["𝛾","g"],["𝛿","d"],["𝜀","e"],["𝜁","z"],["𝜂","i"],["𝜃","th"],["𝜄","i"],["𝜅","k"],["𝜆","l"],["𝜇","m"],["𝜈","n"],["𝜉","ks"],["𝜊","o"],["𝜋","p"],["𝜌","r"],["𝜍","s"],["𝜎","s"],["𝜏","t"],["𝜐","y"],["𝜑","f"],["𝜒","x"],["𝜓","ps"],["𝜔","o"],["𝜕","d"],["𝜖","E"],["𝜗","TH"],["𝜘","K"],["𝜙","f"],["𝜚","r"],["𝜛","p"],["𝜜","A"],["𝜝","V"],["𝜞","G"],["𝜟","D"],["𝜠","E"],["𝜡","Z"],["𝜢","I"],["𝜣","TH"],["𝜤","I"],["𝜥","K"],["𝜦","L"],["𝜧","M"],["𝜨","N"],["𝜩","KS"],["𝜪","O"],["𝜫","P"],["𝜬","S"],["𝜭","TH"],["𝜮","S"],["𝜯","T"],["𝜰","Y"],["𝜱","F"],["𝜲","X"],["𝜳","PS"],["𝜴","O"],["𝜵","D"],["𝜶","a"],["𝜷","v"],["𝜸","g"],["𝜹","d"],["𝜺","e"],["𝜻","z"],["𝜼","i"],["𝜽","th"],["𝜾","i"],["𝜿","k"],["𝝀","l"],["𝝁","m"],["𝝂","n"],["𝝃","ks"],["𝝄","o"],["𝝅","p"],["𝝆","r"],["𝝇","s"],["𝝈","s"],["𝝉","t"],["𝝊","y"],["𝝋","f"],["𝝌","x"],["𝝍","ps"],["𝝎","o"],["𝝏","a"],["𝝐","e"],["𝝑","i"],["𝝒","k"],["𝝓","f"],["𝝔","r"],["𝝕","p"],["𝝖","A"],["𝝗","B"],["𝝘","G"],["𝝙","D"],["𝝚","E"],["𝝛","Z"],["𝝜","I"],["𝝝","TH"],["𝝞","I"],["𝝟","K"],["𝝠","L"],["𝝡","M"],["𝝢","N"],["𝝣","KS"],["𝝤","O"],["𝝥","P"],["𝝦","R"],["𝝧","TH"],["𝝨","S"],["𝝩","T"],["𝝪","Y"],["𝝫","F"],["𝝬","X"],["𝝭","PS"],["𝝮","O"],["𝝯","D"],["𝝰","a"],["𝝱","v"],["𝝲","g"],["𝝳","d"],["𝝴","e"],["𝝵","z"],["𝝶","i"],["𝝷","th"],["𝝸","i"],["𝝹","k"],["𝝺","l"],["𝝻","m"],["𝝼","n"],["𝝽","ks"],["𝝾","o"],["𝝿","p"],["𝞀","r"],["𝞁","s"],["𝞂","s"],["𝞃","t"],["𝞄","y"],["𝞅","f"],["𝞆","x"],["𝞇","ps"],["𝞈","o"],["𝞉","a"],["𝞊","e"],["𝞋","i"],["𝞌","k"],["𝞍","f"],["𝞎","r"],["𝞏","p"],["𝞐","A"],["𝞑","V"],["𝞒","G"],["𝞓","D"],["𝞔","E"],["𝞕","Z"],["𝞖","I"],["𝞗","TH"],["𝞘","I"],["𝞙","K"],["𝞚","L"],["𝞛","M"],["𝞜","N"],["𝞝","KS"],["𝞞","O"],["𝞟","P"],["𝞠","S"],["𝞡","TH"],["𝞢","S"],["𝞣","T"],["𝞤","Y"],["𝞥","F"],["𝞦","X"],["𝞧","PS"],["𝞨","O"],["𝞩","D"],["𝞪","av"],["𝞫","g"],["𝞬","d"],["𝞭","e"],["𝞮","z"],["𝞯","i"],["𝞰","i"],["𝞱","th"],["𝞲","i"],["𝞳","k"],["𝞴","l"],["𝞵","m"],["𝞶","n"],["𝞷","ks"],["𝞸","o"],["𝞹","p"],["𝞺","r"],["𝞻","s"],["𝞼","s"],["𝞽","t"],["𝞾","y"],["𝞿","f"],["𝟀","x"],["𝟁","ps"],["𝟂","o"],["𝟃","a"],["𝟄","e"],["𝟅","i"],["𝟆","k"],["𝟇","f"],["𝟈","r"],["𝟉","p"],["𝟊","F"],["𝟋","f"],["⒜","(a)"],["⒝","(b)"],["⒞","(c)"],["⒟","(d)"],["⒠","(e)"],["⒡","(f)"],["⒢","(g)"],["⒣","(h)"],["⒤","(i)"],["⒥","(j)"],["⒦","(k)"],["⒧","(l)"],["⒨","(m)"],["⒩","(n)"],["⒪","(o)"],["⒫","(p)"],["⒬","(q)"],["⒭","(r)"],["⒮","(s)"],["⒯","(t)"],["⒰","(u)"],["⒱","(v)"],["⒲","(w)"],["⒳","(x)"],["⒴","(y)"],["⒵","(z)"],["Ⓐ","(A)"],["Ⓑ","(B)"],["Ⓒ","(C)"],["Ⓓ","(D)"],["Ⓔ","(E)"],["Ⓕ","(F)"],["Ⓖ","(G)"],["Ⓗ","(H)"],["Ⓘ","(I)"],["Ⓙ","(J)"],["Ⓚ","(K)"],["Ⓛ","(L)"],["Ⓝ","(N)"],["Ⓞ","(O)"],["Ⓟ","(P)"],["Ⓠ","(Q)"],["Ⓡ","(R)"],["Ⓢ","(S)"],["Ⓣ","(T)"],["Ⓤ","(U)"],["Ⓥ","(V)"],["Ⓦ","(W)"],["Ⓧ","(X)"],["Ⓨ","(Y)"],["Ⓩ","(Z)"],["ⓐ","(a)"],["ⓑ","(b)"],["ⓒ","(b)"],["ⓓ","(c)"],["ⓔ","(e)"],["ⓕ","(f)"],["ⓖ","(g)"],["ⓗ","(h)"],["ⓘ","(i)"],["ⓙ","(j)"],["ⓚ","(k)"],["ⓛ","(l)"],["ⓜ","(m)"],["ⓝ","(n)"],["ⓞ","(o)"],["ⓟ","(p)"],["ⓠ","(q)"],["ⓡ","(r)"],["ⓢ","(s)"],["ⓣ","(t)"],["ⓤ","(u)"],["ⓥ","(v)"],["ⓦ","(w)"],["ⓧ","(x)"],["ⓨ","(y)"],["ⓩ","(z)"],["Ċ","C"],["ċ","c"],["Ġ","G"],["ġ","g"],["Ħ","H"],["ħ","h"],["Ż","Z"],["ż","z"],["𝟎","0"],["𝟏","1"],["𝟐","2"],["𝟑","3"],["𝟒","4"],["𝟓","5"],["𝟔","6"],["𝟕","7"],["𝟖","8"],["𝟗","9"],["𝟘","0"],["𝟙","1"],["𝟚","2"],["𝟛","3"],["𝟜","4"],["𝟝","5"],["𝟞","6"],["𝟟","7"],["𝟠","8"],["𝟡","9"],["𝟢","0"],["𝟣","1"],["𝟤","2"],["𝟥","3"],["𝟦","4"],["𝟧","5"],["𝟨","6"],["𝟩","7"],["𝟪","8"],["𝟫","9"],["𝟬","0"],["𝟭","1"],["𝟮","2"],["𝟯","3"],["𝟰","4"],["𝟱","5"],["𝟲","6"],["𝟳","7"],["𝟴","8"],["𝟵","9"],["𝟶","0"],["𝟷","1"],["𝟸","2"],["𝟹","3"],["𝟺","4"],["𝟻","5"],["𝟼","6"],["𝟽","7"],["𝟾","8"],["𝟿","9"],["①","1"],["②","2"],["③","3"],["④","4"],["⑤","5"],["⑥","6"],["⑦","7"],["⑧","8"],["⑨","9"],["⑩","10"],["⑪","11"],["⑫","12"],["⑬","13"],["⑭","14"],["⑮","15"],["⑯","16"],["⑰","17"],["⑱","18"],["⑲","19"],["⑳","20"],["⑴","1"],["⑵","2"],["⑶","3"],["⑷","4"],["⑸","5"],["⑹","6"],["⑺","7"],["⑻","8"],["⑼","9"],["⑽","10"],["⑾","11"],["⑿","12"],["⒀","13"],["⒁","14"],["⒂","15"],["⒃","16"],["⒄","17"],["⒅","18"],["⒆","19"],["⒇","20"],["⒈","1."],["⒉","2."],["⒊","3."],["⒋","4."],["⒌","5."],["⒍","6."],["⒎","7."],["⒏","8."],["⒐","9."],["⒑","10."],["⒒","11."],["⒓","12."],["⒔","13."],["⒕","14."],["⒖","15."],["⒗","16."],["⒘","17."],["⒙","18."],["⒚","19."],["⒛","20."],["⓪","0"],["⓫","11"],["⓬","12"],["⓭","13"],["⓮","14"],["⓯","15"],["⓰","16"],["⓱","17"],["⓲","18"],["⓳","19"],["⓴","20"],["⓵","1"],["⓶","2"],["⓷","3"],["⓸","4"],["⓹","5"],["⓺","6"],["⓻","7"],["⓼","8"],["⓽","9"],["⓾","10"],["⓿","0"],["🙰","&"],["🙱","&"],["🙲","&"],["🙳","&"],["🙴","&"],["🙵","&"],["🙶",'"'],["🙷",'"'],["🙸",'"'],["‽","?!"],["🙹","?!"],["🙺","?!"],["🙻","?!"],["🙼","/"],["🙽","\\"],["🜇","AR"],["🜈","V"],["🜉","V"],["🜆","VR"],["🜅","VF"],["🜩","2"],["🜪","5"],["🝡","f"],["🝢","W"],["🝣","U"],["🝧","V"],["🝨","T"],["🝪","V"],["🝫","MB"],["🝬","VB"],["🝲","3B"],["🝳","3B"],["💯","100"],["🔙","BACK"],["🔚","END"],["🔛","ON!"],["🔜","SOON"],["🔝","TOP"],["🔞","18"],["🔤","abc"],["🔠","ABCD"],["🔡","abcd"],["🔢","1234"],["🔣","T&@%"],["#️⃣","#"],["*️⃣","*"],["0️⃣","0"],["1️⃣","1"],["2️⃣","2"],["3️⃣","3"],["4️⃣","4"],["5️⃣","5"],["6️⃣","6"],["7️⃣","7"],["8️⃣","8"],["9️⃣","9"],["🔟","10"],["🅰️","A"],["🅱️","B"],["🆎","AB"],["🆑","CL"],["🅾️","O"],["🅿","P"],["🆘","SOS"],["🅲","C"],["🅳","D"],["🅴","E"],["🅵","F"],["🅶","G"],["🅷","H"],["🅸","I"],["🅹","J"],["🅺","K"],["🅻","L"],["🅼","M"],["🅽","N"],["🆀","Q"],["🆁","R"],["🆂","S"],["🆃","T"],["🆄","U"],["🆅","V"],["🆆","W"],["🆇","X"],["🆈","Y"],["🆉","Z"]],d3=(t,e)=>{for(const[n,r]of e)t=t.replace(new RegExp(Mo(n),"g"),r);return t};function m3(t,e){if(typeof t!="string")throw new TypeError(`Expected a string, got \`${typeof t}\``);e={customReplacements:[],...e};const n=new Map([...p3,...e.customReplacements]);return t=t.normalize(),t=d3(t,n),t=t.normalize("NFD").replace(/\p{Diacritic}/gu,"").normalize(),t}const g3=[["&"," and "],["🦄"," unicorn "],["♥"," love "]],y3=t=>t.replace(/([A-Z]{2,})(\d+)/g,"$1 $2").replace(/([a-z\d]+)([A-Z]{2,})/g,"$1 $2").replace(/([a-z\d])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-rt-z\d]+)/g,"$1 $2"),b3=(t,e)=>{const n=Mo(e);return t.replace(new RegExp(`${n}{2,}`,"g"),e).replace(new RegExp(`^${n}|${n}$`,"g"),"")},w3=t=>{let e="a-z\\d";if(e+=t.lowercase?"":"A-Z",t.preserveCharacters.length>0)for(const n of t.preserveCharacters){if(n===t.separator)throw new Error(`The separator character \`${t.separator}\` cannot be included in preserved characters: ${t.preserveCharacters}`);e+=Mo(n)}return new RegExp(`[^${e}]+`,"g")};function U8(t,e){if(typeof t!="string")throw new TypeError(`Expected a string, got \`${typeof t}\``);e={separator:"-",lowercase:!0,decamelize:!0,customReplacements:[],preserveLeadingUnderscore:!1,preserveTrailingDash:!1,preserveCharacters:[],...e};const n=e.preserveLeadingUnderscore&&t.startsWith("_"),r=e.preserveTrailingDash&&t.endsWith("-"),i=new Map([...g3,...e.customReplacements]);t=m3(t,{customReplacements:i}),e.decamelize&&(t=y3(t));const o=w3(e);return e.lowercase&&(t=t.toLowerCase()),t=t.replace(/([a-zA-Z\d]+)'([ts])(\s|$)/g,"$1$2$3"),t=t.replace(o,e.separator),t=t.replace(/\\/g,""),e.separator&&(t=b3(t,e.separator)),n&&(t=`_${t}`),r&&(t=`${t}-`),t}function J8(t,e){return function(n,r){let{$from:i,$to:o,node:s}=n.selection;if(s&&s.isBlock||i.depth<2||!i.sameParent(o))return!1;let l=i.node(-1);if(l.type!=t)return!1;if(i.parent.content.size==0&&i.node(-1).childCount==i.indexAfter(-1)){if(i.depth==3||i.node(-3).type!=t||i.index(-2)!=i.node(-2).childCount-1)return!1;if(r){let f=M.empty,h=i.index(-1)?1:i.index(-2)?2:3;for(let g=i.depth-h;g>=i.depth-3;g--)f=M.from(i.node(g).copy(f));let p=i.indexAfter(-1)<i.node(-2).childCount?1:i.indexAfter(-2)<i.node(-3).childCount?2:3;f=f.append(M.from(t.createAndFill()));let d=i.before(i.depth-(h-1)),m=n.tr.replace(d,i.after(-p),new R(f,4-h,0)),y=-1;m.doc.nodesBetween(d,m.doc.content.size,(g,_)=>{if(y>-1)return!1;g.isTextblock&&g.content.size==0&&(y=_+1)}),y>-1&&m.setSelection($.near(m.doc.resolve(y))),r(m.scrollIntoView())}return!0}let a=o.pos==i.end()?l.contentMatchAt(0).defaultType:null,u=n.tr.delete(i.pos,o.pos),c=a?[e?{type:t,attrs:e}:null,{type:a}]:void 0;return Rr(u.doc,i.pos,2,c)?(r&&r(u.split(i.pos,2,c).scrollIntoView()),!0):!1}}function K8(t){return function(e,n){let{$from:r,$to:i}=e.selection,o=r.blockRange(i,s=>s.childCount>0&&s.firstChild.type==t);return o?n?r.node(o.depth-1).type==t?x3(e,n,t,o):k3(e,n,o):!0:!1}}function x3(t,e,n,r){let i=t.tr,o=r.end,s=r.$to.end(r.depth);o<s&&(i.step(new xe(o-1,s,o,s,new R(M.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Ef(i.doc.resolve(r.$from.pos),i.doc.resolve(s),r.depth));const l=_o(r);if(l==null)return!1;i.lift(r,l);let a=i.mapping.map(o,-1)-1;return So(i.doc,a)&&i.join(a),e(i.scrollIntoView()),!0}function k3(t,e,n){let r=t.tr,i=n.parent;for(let p=n.end,d=n.endIndex-1,m=n.startIndex;d>m;d--)p-=i.child(d).nodeSize,r.delete(p-1,p+1);let o=r.doc.resolve(n.start),s=o.nodeAfter;if(r.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let l=n.startIndex==0,a=n.endIndex==i.childCount,u=o.node(-1),c=o.index(-1);if(!u.canReplace(c+(l?0:1),c+1,s.content.append(a?M.empty:M.from(i))))return!1;let f=o.pos,h=f+s.nodeSize;return r.step(new xe(f-(l?1:0),h+(a?1:0),f+1,h-1,new R((l?M.empty:M.from(i.copy(M.empty))).append(a?M.empty:M.from(i.copy(M.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}function Y8(t){return function(e,n){let{$from:r,$to:i}=e.selection,o=r.blockRange(i,u=>u.childCount>0&&u.firstChild.type==t);if(!o)return!1;let s=o.startIndex;if(s==0)return!1;let l=o.parent,a=l.child(s-1);if(a.type!=t)return!1;if(n){let u=a.lastChild&&a.lastChild.type==l.type,c=M.from(u?t.create():null),f=new R(M.from(t.create(null,M.from(l.type.create(null,c)))),u?3:1,0),h=o.start,p=o.end;n(e.tr.step(new xe(h-(u?3:1),p,h,p,f,1,!0)).scrollIntoView())}return!0}}function v3(t){const e=new Map;if(!t||!t.type)throw new Error("mdast-util-definitions expected node");return Pl(t,"definition",function(r){const i=bc(r.identifier);i&&!e.get(i)&&e.set(i,r)}),n;function n(r){const i=bc(r);return e.get(i)}}function bc(t){return String(t||"").toUpperCase()}function G8(){return function(t){const e=v3(t);Pl(t,function(n,r,i){if(n.type==="definition"&&i!==void 0&&typeof r=="number")return i.children.splice(r,1),[Us,r];if(n.type==="imageReference"||n.type==="linkReference"){const o=e(n.identifier);if(o&&i&&typeof r=="number")return i.children[r]=n.type==="imageReference"?{type:"image",url:o.url,title:o.title,alt:n.alt}:{type:"link",url:o.url,title:o.title,children:n.children},[Us,r]}})}}var al,ul;if(typeof WeakMap<"u"){let t=new WeakMap;al=e=>t.get(e),ul=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;al=r=>{for(let i=0;i<t.length;i+=2)if(t[i]==r)return t[i+1]},ul=(r,i)=>(n==10&&(n=0),t[n++]=r,t[n++]=i)}var se=class{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const r=e%this.width,i=e/this.width|0;let o=r+1,s=i+1;for(let l=1;o<this.width&&this.map[e+l]==n;l++)o++;for(let l=1;s<this.height&&this.map[e+this.width*l]==n;l++)s++;return{left:r,top:i,right:o,bottom:s}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){const{left:r,right:i,top:o,bottom:s}=this.findCell(t);return e=="horiz"?(n<0?r==0:i==this.width)?null:this.map[o*this.width+(n<0?r-1:i)]:(n<0?o==0:s==this.height)?null:this.map[r+this.width*(n<0?o-1:s)]}rectBetween(t,e){const{left:n,right:r,top:i,bottom:o}=this.findCell(t),{left:s,right:l,top:a,bottom:u}=this.findCell(e);return{left:Math.min(n,s),top:Math.min(i,a),right:Math.max(r,l),bottom:Math.max(o,u)}}cellsInRect(t){const e=[],n={};for(let r=t.top;r<t.bottom;r++)for(let i=t.left;i<t.right;i++){const o=r*this.width+i,s=this.map[o];n[s]||(n[s]=!0,!(i==t.left&&i&&this.map[o-1]==s||r==t.top&&r&&this.map[o-this.width]==s)&&e.push(s))}return e}positionAt(t,e,n){for(let r=0,i=0;;r++){const o=i+n.child(r).nodeSize;if(r==t){let s=e+t*this.width;const l=(t+1)*this.width;for(;s<l&&this.map[s]<i;)s++;return s==l?o-1:this.map[s]}i=o}}static get(t){return al(t)||ul(t,_3(t))}};function _3(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=S3(t),n=t.childCount,r=[];let i=0,o=null;const s=[];for(let u=0,c=e*n;u<c;u++)r[u]=0;for(let u=0,c=0;u<n;u++){const f=t.child(u);c++;for(let d=0;;d++){for(;i<r.length&&r[i]!=0;)i++;if(d==f.childCount)break;const m=f.child(d),{colspan:y,rowspan:g,colwidth:_}=m.attrs;for(let x=0;x<g;x++){if(x+u>=n){(o||(o=[])).push({type:"overlong_rowspan",pos:c,n:g-x});break}const S=i+x*e;for(let O=0;O<y;O++){r[S+O]==0?r[S+O]=c:(o||(o=[])).push({type:"collision",row:u,pos:c,n:y-O});const k=_&&_[O];if(k){const I=(S+O)%e*2,B=s[I];B==null||B!=k&&s[I+1]==1?(s[I]=k,s[I+1]=1):B==k&&s[I+1]++}}}i+=y,c+=m.nodeSize}const h=(u+1)*e;let p=0;for(;i<h;)r[i++]==0&&p++;p&&(o||(o=[])).push({type:"missing",row:u,n:p}),c++}const l=new se(e,n,r,o);let a=!1;for(let u=0;!a&&u<s.length;u+=2)s[u]!=null&&s[u+1]<n&&(a=!0);return a&&C3(l,s,t),l}function S3(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){const i=t.child(r);let o=0;if(n)for(let s=0;s<r;s++){const l=t.child(s);for(let a=0;a<l.childCount;a++){const u=l.child(a);s+u.attrs.rowspan>r&&(o+=u.attrs.colspan)}}for(let s=0;s<i.childCount;s++){const l=i.child(s);o+=l.attrs.colspan,l.attrs.rowspan>1&&(n=!0)}e==-1?e=o:e!=o&&(e=Math.max(e,o))}return e}function C3(t,e,n){t.problems||(t.problems=[]);const r={};for(let i=0;i<t.map.length;i++){const o=t.map[i];if(r[o])continue;r[o]=!0;const s=n.nodeAt(o);if(!s)throw new RangeError(`No cell with offset ${o} found`);let l=null;const a=s.attrs;for(let u=0;u<a.colspan;u++){const c=(i+u)%t.width,f=e[c*2];f!=null&&(!a.colwidth||a.colwidth[u]!=f)&&((l||(l=O3(a)))[u]=f)}l&&t.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:l})}}function O3(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function wc(t,e){if(typeof t=="string")return{};const n=t.getAttribute("data-colwidth"),r=n&&/^\d+(,\d+)*$/.test(n)?n.split(",").map(s=>Number(s)):null,i=Number(t.getAttribute("colspan")||1),o={colspan:i,rowspan:Number(t.getAttribute("rowspan")||1),colwidth:r&&r.length==i?r:null};for(const s in e){const l=e[s].getFromDOM,a=l&&l(t);a!=null&&(o[s]=a)}return o}function xc(t,e){const n={};t.attrs.colspan!=1&&(n.colspan=t.attrs.colspan),t.attrs.rowspan!=1&&(n.rowspan=t.attrs.rowspan),t.attrs.colwidth&&(n["data-colwidth"]=t.attrs.colwidth.join(","));for(const r in e){const i=e[r].setDOMAttr;i&&i(t.attrs[r],n)}return n}function X8(t){const e=t.cellAttributes||{},n={colspan:{default:1},rowspan:{default:1},colwidth:{default:null}};for(const r in e)n[r]={default:e[r].default};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:t.tableGroup,parseDOM:[{tag:"table"}],toDOM(){return["table",["tbody",0]]}},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM(){return["tr",0]}},table_cell:{content:t.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:r=>wc(r,e)}],toDOM(r){return["td",xc(r,e),0]}},table_header:{content:t.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:r=>wc(r,e)}],toDOM(r){return["th",xc(r,e),0]}}}}function Ze(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const r=t.nodes[n],i=r.spec.tableRole;i&&(e[i]=r)}}return e}var Ht=new ur("selectingCells");function si(t){for(let e=t.depth-1;e>0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function Nt(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if(e.node(n).type.spec.tableRole=="row")return!0;return!1}function To(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const n=si(e.$head)||A3(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function A3(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function cl(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function E3(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function Zl(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function yp(t,e,n){const r=t.node(-1),i=se.get(r),o=t.start(-1),s=i.nextCell(t.pos-o,e,n);return s==null?null:t.node(0).resolve(o+s)}function An(t,e,n=1){const r={...t,colspan:t.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some(i=>i>0)||(r.colwidth=null)),r}function M3(t,e,n=1){const r={...t,colspan:t.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let i=0;i<n;i++)r.colwidth.splice(e,0,0)}return r}function T3(t,e,n){const r=Ze(e.type.schema).header_cell;for(let i=0;i<t.height;i++)if(e.nodeAt(t.map[n+i*t.width]).type!=r)return!1;return!0}var ue=class Ct extends ${constructor(e,n=e){const r=e.node(-1),i=se.get(r),o=e.start(-1),s=i.rectBetween(e.pos-o,n.pos-o),l=e.node(0),a=i.cellsInRect(s).filter(c=>c!=n.pos-o);a.unshift(n.pos-o);const u=a.map(c=>{const f=r.nodeAt(c);if(!f)throw RangeError(`No cell with offset ${c} found`);const h=o+c+1;return new to(l.resolve(h),l.resolve(h+f.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=e,this.$headCell=n}map(e,n){const r=e.resolve(n.map(this.$anchorCell.pos)),i=e.resolve(n.map(this.$headCell.pos));if(cl(r)&&cl(i)&&Zl(r,i)){const o=this.$anchorCell.node(-1)!=r.node(-1);return o&&this.isRowSelection()?Ct.rowSelection(r,i):o&&this.isColSelection()?Ct.colSelection(r,i):new Ct(r,i)}return X.between(r,i)}content(){const e=this.$anchorCell.node(-1),n=se.get(e),r=this.$anchorCell.start(-1),i=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),o={},s=[];for(let a=i.top;a<i.bottom;a++){const u=[];for(let c=a*n.width+i.left,f=i.left;f<i.right;f++,c++){const h=n.map[c];if(o[h])continue;o[h]=!0;const p=n.findCell(h);let d=e.nodeAt(h);if(!d)throw RangeError(`No cell with offset ${h} found`);const m=i.left-p.left,y=p.right-i.right;if(m>0||y>0){let g=d.attrs;if(m>0&&(g=An(g,0,m)),y>0&&(g=An(g,g.colspan-y,y)),p.left<i.left){if(d=d.type.createAndFill(g),!d)throw RangeError(`Could not create cell with attrs ${JSON.stringify(g)}`)}else d=d.type.create(g,d.content)}if(p.top<i.top||p.bottom>i.bottom){const g={...d.attrs,rowspan:Math.min(p.bottom,i.bottom)-Math.max(p.top,i.top)};p.top<i.top?d=d.type.createAndFill(g):d=d.type.create(g,d.content)}u.push(d)}s.push(e.child(a).copy(M.from(u)))}const l=this.isColSelection()&&this.isRowSelection()?e:s;return new R(M.from(l),1,1)}replace(e,n=R.empty){const r=e.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){const{$from:l,$to:a}=i[s],u=e.mapping.slice(r);e.replace(u.map(l.pos),u.map(a.pos),s?R.empty:n)}const o=$.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);o&&e.setSelection(o)}replaceWith(e,n){this.replace(e,new R(M.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),r=se.get(n),i=this.$anchorCell.start(-1),o=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let s=0;s<o.length;s++)e(n.nodeAt(o[s]),i+o[s])}isColSelection(){const e=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(e,n)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,i=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,i)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const r=e.node(-1),i=se.get(r),o=e.start(-1),s=i.findCell(e.pos-o),l=i.findCell(n.pos-o),a=e.node(0);return s.top<=l.top?(s.top>0&&(e=a.resolve(o+i.map[s.left])),l.bottom<i.height&&(n=a.resolve(o+i.map[i.width*(i.height-1)+l.right-1]))):(l.top>0&&(n=a.resolve(o+i.map[l.left])),s.bottom<i.height&&(e=a.resolve(o+i.map[i.width*(i.height-1)+s.right-1]))),new Ct(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=se.get(e),r=this.$anchorCell.start(-1),i=n.colCount(this.$anchorCell.pos-r),o=n.colCount(this.$headCell.pos-r);if(Math.min(i,o)>0)return!1;const s=i+this.$anchorCell.nodeAfter.attrs.colspan,l=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,l)==n.width}eq(e){return e instanceof Ct&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),i=se.get(r),o=e.start(-1),s=i.findCell(e.pos-o),l=i.findCell(n.pos-o),a=e.node(0);return s.left<=l.left?(s.left>0&&(e=a.resolve(o+i.map[s.top*i.width])),l.right<i.width&&(n=a.resolve(o+i.map[i.width*(l.top+1)-1]))):(l.left>0&&(n=a.resolve(o+i.map[l.top*i.width])),s.right<i.width&&(e=a.resolve(o+i.map[i.width*(s.top+1)-1]))),new Ct(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new Ct(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){return new Ct(e.resolve(n),e.resolve(r))}getBookmark(){return new N3(this.$anchorCell.pos,this.$headCell.pos)}};ue.prototype.visible=!1;$.jsonID("cell",ue);var N3=class bp{constructor(e,n){this.anchor=e,this.head=n}map(e){return new bp(e.map(this.anchor),e.map(this.head))}resolve(e){const n=e.resolve(this.anchor),r=e.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&Zl(n,r)?new ue(n,r):$.near(r,1)}};function D3(t){if(!(t.selection instanceof ue))return null;const e=[];return t.selection.forEachCell((n,r)=>{e.push(Ie.node(r,r+n.nodeSize,{class:"selectedCell"}))}),oe.create(t.doc,e)}function I3({$from:t,$to:e}){if(t.pos==e.pos||t.pos<t.pos-6)return!1;let n=t.pos,r=e.pos,i=t.depth;for(;i>=0&&!(t.after(i+1)<t.end(i));i--,n++);for(let o=e.depth;o>=0&&!(e.before(o+1)>e.start(o));o--,r--);return n==r&&/row|table/.test(t.node(i).type.spec.tableRole)}function R3({$from:t,$to:e}){let n,r;for(let i=t.depth;i>0;i--){const o=t.node(i);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){n=o;break}}for(let i=e.depth;i>0;i--){const o=e.node(i);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){r=o;break}}return n!==r&&e.parentOffset===0}function z3(t,e,n){const r=(e||t).selection,i=(e||t).doc;let o,s;if(r instanceof j&&(s=r.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")o=ue.create(i,r.from);else if(s=="row"){const l=i.resolve(r.from+1);o=ue.rowSelection(l,l)}else if(!n){const l=se.get(r.node),a=r.from+1,u=a+l.map[l.width*l.height-1];o=ue.create(i,a+1,u)}}else r instanceof X&&I3(r)?o=X.create(i,r.from):r instanceof X&&R3(r)&&(o=X.create(i,r.$from.start(),r.$from.end()));return o&&(e||(e=t.tr)).setSelection(o),e}var P3=new ur("fix-tables");function wp(t,e,n,r){const i=t.childCount,o=e.childCount;e:for(let s=0,l=0;s<o;s++){const a=e.child(s);for(let u=l,c=Math.min(i,s+3);u<c;u++)if(t.child(u)==a){l=u+1,n+=a.nodeSize;continue e}r(a,n),l<i&&t.child(l).sameMarkup(a)?wp(t.child(l),a,n+1,r):a.nodesBetween(0,a.content.size,r,n+1),n+=a.nodeSize}}function F3(t,e){let n;const r=(i,o)=>{i.type.spec.tableRole=="table"&&(n=B3(t,i,o,n))};return e?e.doc!=t.doc&&wp(e.doc,t.doc,0,r):t.doc.descendants(r),n}function B3(t,e,n,r){const i=se.get(e);if(!i.problems)return r;r||(r=t.tr);const o=[];for(let a=0;a<i.height;a++)o.push(0);for(let a=0;a<i.problems.length;a++){const u=i.problems[a];if(u.type=="collision"){const c=e.nodeAt(u.pos);if(!c)continue;const f=c.attrs;for(let h=0;h<f.rowspan;h++)o[u.row+h]+=u.n;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,An(f,f.colspan-u.n,u.n))}else if(u.type=="missing")o[u.row]+=u.n;else if(u.type=="overlong_rowspan"){const c=e.nodeAt(u.pos);if(!c)continue;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,{...c.attrs,rowspan:c.attrs.rowspan-u.n})}else if(u.type=="colwidth mismatch"){const c=e.nodeAt(u.pos);if(!c)continue;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,{...c.attrs,colwidth:u.colwidth})}}let s,l;for(let a=0;a<o.length;a++)o[a]&&(s==null&&(s=a),l=a);for(let a=0,u=n+1;a<i.height;a++){const c=e.child(a),f=u+c.nodeSize,h=o[a];if(h>0){let p="cell";c.firstChild&&(p=c.firstChild.type.spec.tableRole);const d=[];for(let y=0;y<h;y++){const g=Ze(t.schema)[p].createAndFill();g&&d.push(g)}const m=(a==0||s==a-1)&&l==a?u+1:f-1;r.insert(r.mapping.map(m),d)}u=f}return r.setMeta(P3,{fixTables:!0})}function cr(t){const e=t.selection,n=To(t),r=n.node(-1),i=n.start(-1),o=se.get(r);return{...e instanceof ue?o.rectBetween(e.$anchorCell.pos-i,e.$headCell.pos-i):o.findCell(n.pos-i),tableStart:i,map:o,table:r}}function xp(t,{map:e,tableStart:n,table:r},i){let o=i>0?-1:0;T3(e,r,i+o)&&(o=i==0||i==e.width?null:0);for(let s=0;s<e.height;s++){const l=s*e.width+i;if(i>0&&i<e.width&&e.map[l-1]==e.map[l]){const a=e.map[l],u=r.nodeAt(a);t.setNodeMarkup(t.mapping.map(n+a),null,M3(u.attrs,i-e.colCount(a))),s+=u.attrs.rowspan-1}else{const a=o==null?Ze(r.type.schema).cell:r.nodeAt(e.map[l+o]).type,u=e.positionAt(s,i,r);t.insert(t.mapping.map(n+u),a.createAndFill())}}return t}function Q8(t,e){if(!Nt(t))return!1;if(e){const n=cr(t);e(xp(t.tr,n,n.left))}return!0}function Z8(t,e){if(!Nt(t))return!1;if(e){const n=cr(t);e(xp(t.tr,n,n.right))}return!0}function L3(t,{map:e,table:n,tableStart:r},i){const o=t.mapping.maps.length;for(let s=0;s<e.height;){const l=s*e.width+i,a=e.map[l],u=n.nodeAt(a),c=u.attrs;if(i>0&&e.map[l-1]==a||i<e.width-1&&e.map[l+1]==a)t.setNodeMarkup(t.mapping.slice(o).map(r+a),null,An(c,i-e.colCount(a)));else{const f=t.mapping.slice(o).map(r+a);t.delete(f,f+u.nodeSize)}s+=c.rowspan}}function eS(t,e){if(!Nt(t))return!1;if(e){const n=cr(t),r=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let i=n.right-1;L3(r,n,i),i!=n.left;i--){const o=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!o)throw RangeError("No table found");n.table=o,n.map=se.get(o)}e(r)}return!0}function V3(t,{map:e,table:n,tableStart:r},i){let o=0;for(let u=0;u<i;u++)o+=n.child(u).nodeSize;const s=o+n.child(i).nodeSize,l=t.mapping.maps.length;t.delete(o+r,s+r);const a=new Set;for(let u=0,c=i*e.width;u<e.width;u++,c++){const f=e.map[c];if(!a.has(f)){if(a.add(f),i>0&&f==e.map[c-e.width]){const h=n.nodeAt(f).attrs;t.setNodeMarkup(t.mapping.slice(l).map(f+r),null,{...h,rowspan:h.rowspan-1}),u+=h.colspan-1}else if(i<e.height&&f==e.map[c+e.width]){const h=n.nodeAt(f),p=h.attrs,d=h.type.create({...p,rowspan:h.attrs.rowspan-1},h.content),m=e.positionAt(i+1,u,n);t.insert(t.mapping.slice(l).map(r+m),d),u+=p.colspan-1}}}}function tS(t,e){if(!Nt(t))return!1;if(e){const n=cr(t),r=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let i=n.bottom-1;V3(r,n,i),i!=n.top;i--){const o=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!o)throw RangeError("No table found");n.table=o,n.map=se.get(n.table)}e(r)}return!0}function nS(t,e){return function(n,r){if(!Nt(n))return!1;const i=To(n);if(i.nodeAfter.attrs[t]===e)return!1;if(r){const o=n.tr;n.selection instanceof ue?n.selection.forEachCell((s,l)=>{s.attrs[t]!==e&&o.setNodeMarkup(l,null,{...s.attrs,[t]:e})}):o.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[t]:e}),r(o)}return!0}}function H3(t){return function(e,n){if(!Nt(e))return!1;if(n){const r=Ze(e.schema),i=cr(e),o=e.tr,s=i.map.cellsInRect(t=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:t=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),l=s.map(a=>i.table.nodeAt(a));for(let a=0;a<s.length;a++)l[a].type==r.header_cell&&o.setNodeMarkup(i.tableStart+s[a],r.cell,l[a].attrs);if(o.steps.length==0)for(let a=0;a<s.length;a++)o.setNodeMarkup(i.tableStart+s[a],r.header_cell,l[a].attrs);n(o)}return!0}}function kc(t,e,n){const r=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let i=0;i<r.length;i++){const o=e.table.nodeAt(r[i]);if(o&&o.type!==n.header_cell)return!1}return!0}function ea(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?H3(t):function(n,r){if(!Nt(n))return!1;if(r){const i=Ze(n.schema),o=cr(n),s=n.tr,l=kc("row",o,i),a=kc("column",o,i),c=(t==="column"?l:t==="row"?a:!1)?1:0,f=t=="column"?{left:0,top:c,right:1,bottom:o.map.height}:t=="row"?{left:c,top:0,right:o.map.width,bottom:1}:o,h=t=="column"?a?i.cell:i.header_cell:t=="row"?l?i.cell:i.header_cell:i.cell;o.map.cellsInRect(f).forEach(p=>{const d=p+o.tableStart,m=s.doc.nodeAt(d);m&&s.setNodeMarkup(d,h,m.attrs)}),r(s)}return!0}}ea("row",{useDeprecatedLogic:!0});ea("column",{useDeprecatedLogic:!0});ea("cell",{useDeprecatedLogic:!0});function j3(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let r=t.index(-1)-1,i=t.before();r>=0;r--){const o=t.node(-1).child(r),s=o.lastChild;if(s)return i-1-s.nodeSize;i-=o.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const n=t.node(-1);for(let r=t.indexAfter(-1),i=t.after();r<n.childCount;r++){const o=n.child(r);if(o.childCount)return i+1;i+=o.nodeSize}}return null}function rS(t){return function(e,n){if(!Nt(e))return!1;const r=j3(To(e),t);if(r==null)return!1;if(n){const i=e.doc.resolve(r);n(e.tr.setSelection(X.between(i,E3(i))).scrollIntoView())}return!0}}function iS(t,e){const n=t.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function Si(t,e){const n=t.selection;if(!(n instanceof ue))return!1;if(e){const r=t.tr,i=Ze(t.schema).cell.createAndFill().content;n.forEachCell((o,s)=>{o.content.eq(i)||r.replace(r.mapping.map(s+1),r.mapping.map(s+o.nodeSize-1),new R(i,0,0))}),r.docChanged&&e(r)}return!0}function q3(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:r}=t;for(;e.childCount==1&&(n>0&&r>0||e.child(0).type.spec.tableRole=="table");)n--,r--,e=e.child(0).content;const i=e.child(0),o=i.type.spec.tableRole,s=i.type.schema,l=[];if(o=="row")for(let a=0;a<e.childCount;a++){let u=e.child(a).content;const c=a?0:Math.max(0,n-1),f=a<e.childCount-1?0:Math.max(0,r-1);(c||f)&&(u=fl(Ze(s).row,new R(u,c,f)).content),l.push(u)}else if(o=="cell"||o=="header_cell")l.push(n||r?fl(Ze(s).row,new R(e,n,r)).content:e);else return null;return $3(s,l)}function $3(t,e){const n=[];for(let i=0;i<e.length;i++){const o=e[i];for(let s=o.childCount-1;s>=0;s--){const{rowspan:l,colspan:a}=o.child(s).attrs;for(let u=i;u<i+l;u++)n[u]=(n[u]||0)+a}}let r=0;for(let i=0;i<n.length;i++)r=Math.max(r,n[i]);for(let i=0;i<n.length;i++)if(i>=e.length&&e.push(M.empty),n[i]<r){const o=Ze(t).cell.createAndFill(),s=[];for(let l=n[i];l<r;l++)s.push(o);e[i]=e[i].append(M.from(s))}return{height:e.length,width:r,rows:e}}function fl(t,e){const n=t.createAndFill();return new Ah(n).replace(0,n.content.size,e).doc}function W3({width:t,height:e,rows:n},r,i){if(t!=r){const o=[],s=[];for(let l=0;l<n.length;l++){const a=n[l],u=[];for(let c=o[l]||0,f=0;c<r;f++){let h=a.child(f%a.childCount);c+h.attrs.colspan>r&&(h=h.type.createChecked(An(h.attrs,h.attrs.colspan,c+h.attrs.colspan-r),h.content)),u.push(h),c+=h.attrs.colspan;for(let p=1;p<h.attrs.rowspan;p++)o[l+p]=(o[l+p]||0)+h.attrs.colspan}s.push(M.from(u))}n=s,t=r}if(e!=i){const o=[];for(let s=0,l=0;s<i;s++,l++){const a=[],u=n[l%e];for(let c=0;c<u.childCount;c++){let f=u.child(c);s+f.attrs.rowspan>i&&(f=f.type.create({...f.attrs,rowspan:Math.max(1,i-f.attrs.rowspan)},f.content)),a.push(f)}o.push(M.from(a))}n=o,e=i}return{width:t,height:e,rows:n}}function U3(t,e,n,r,i,o,s){const l=t.doc.type.schema,a=Ze(l);let u,c;if(i>e.width)for(let f=0,h=0;f<e.height;f++){const p=n.child(f);h+=p.nodeSize;const d=[];let m;p.lastChild==null||p.lastChild.type==a.cell?m=u||(u=a.cell.createAndFill()):m=c||(c=a.header_cell.createAndFill());for(let y=e.width;y<i;y++)d.push(m);t.insert(t.mapping.slice(s).map(h-1+r),d)}if(o>e.height){const f=[];for(let d=0,m=(e.height-1)*e.width;d<Math.max(e.width,i);d++){const y=d>=e.width?!1:n.nodeAt(e.map[m+d]).type==a.header_cell;f.push(y?c||(c=a.header_cell.createAndFill()):u||(u=a.cell.createAndFill()))}const h=a.row.create(null,M.from(f)),p=[];for(let d=e.height;d<o;d++)p.push(h);t.insert(t.mapping.slice(s).map(r+n.nodeSize-2),p)}return!!(u||c)}function vc(t,e,n,r,i,o,s,l){if(s==0||s==e.height)return!1;let a=!1;for(let u=i;u<o;u++){const c=s*e.width+u,f=e.map[c];if(e.map[c-e.width]==f){a=!0;const h=n.nodeAt(f),{top:p,left:d}=e.findCell(f);t.setNodeMarkup(t.mapping.slice(l).map(f+r),null,{...h.attrs,rowspan:s-p}),t.insert(t.mapping.slice(l).map(e.positionAt(s,d,n)),h.type.createAndFill({...h.attrs,rowspan:p+h.attrs.rowspan-s})),u+=h.attrs.colspan-1}}return a}function _c(t,e,n,r,i,o,s,l){if(s==0||s==e.width)return!1;let a=!1;for(let u=i;u<o;u++){const c=u*e.width+s,f=e.map[c];if(e.map[c-1]==f){a=!0;const h=n.nodeAt(f),p=e.colCount(f),d=t.mapping.slice(l).map(f+r);t.setNodeMarkup(d,null,An(h.attrs,s-p,h.attrs.colspan-(s-p))),t.insert(d+h.nodeSize,h.type.createAndFill(An(h.attrs,0,s-p))),u+=h.attrs.rowspan-1}}return a}function Sc(t,e,n,r,i){let o=n?t.doc.nodeAt(n-1):t.doc;if(!o)throw new Error("No table found");let s=se.get(o);const{top:l,left:a}=r,u=a+i.width,c=l+i.height,f=t.tr;let h=0;function p(){if(o=n?f.doc.nodeAt(n-1):f.doc,!o)throw new Error("No table found");s=se.get(o),h=f.mapping.maps.length}U3(f,s,o,n,u,c,h)&&p(),vc(f,s,o,n,a,u,l,h)&&p(),vc(f,s,o,n,a,u,c,h)&&p(),_c(f,s,o,n,l,c,a,h)&&p(),_c(f,s,o,n,l,c,u,h)&&p();for(let d=l;d<c;d++){const m=s.positionAt(d,a,o),y=s.positionAt(d,u,o);f.replace(f.mapping.slice(h).map(m+n),f.mapping.slice(h).map(y+n),new R(i.rows[d-l],0,0))}p(),f.setSelection(new ue(f.doc.resolve(n+s.positionAt(l,a,o)),f.doc.resolve(n+s.positionAt(c-1,u-1,o)))),e(f)}var J3=Ph({ArrowLeft:Ci("horiz",-1),ArrowRight:Ci("horiz",1),ArrowUp:Ci("vert",-1),ArrowDown:Ci("vert",1),"Shift-ArrowLeft":Oi("horiz",-1),"Shift-ArrowRight":Oi("horiz",1),"Shift-ArrowUp":Oi("vert",-1),"Shift-ArrowDown":Oi("vert",1),Backspace:Si,"Mod-Backspace":Si,Delete:Si,"Mod-Delete":Si});function Li(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function Ci(t,e){return(n,r,i)=>{if(!i)return!1;const o=n.selection;if(o instanceof ue)return Li(n,r,$.near(o.$headCell,e));if(t!="horiz"&&!o.empty)return!1;const s=kp(i,t,e);if(s==null)return!1;if(t=="horiz")return Li(n,r,$.near(n.doc.resolve(o.head+e),e));{const l=n.doc.resolve(s),a=yp(l,t,e);let u;return a?u=$.near(a,1):e<0?u=$.near(n.doc.resolve(l.before(-1)),-1):u=$.near(n.doc.resolve(l.after(-1)),1),Li(n,r,u)}}}function Oi(t,e){return(n,r,i)=>{if(!i)return!1;const o=n.selection;let s;if(o instanceof ue)s=o;else{const a=kp(i,t,e);if(a==null)return!1;s=new ue(n.doc.resolve(a))}const l=yp(s.$headCell,t,e);return l?Li(n,r,new ue(s.$anchorCell,l)):!1}}function K3(t,e){const n=t.state.doc,r=si(n.resolve(e));return r?(t.dispatch(t.state.tr.setSelection(new ue(r))),!0):!1}function Y3(t,e,n){if(!Nt(t.state))return!1;let r=q3(n);const i=t.state.selection;if(i instanceof ue){r||(r={width:1,height:1,rows:[M.from(fl(Ze(t.state.schema).cell,n))]});const o=i.$anchorCell.node(-1),s=i.$anchorCell.start(-1),l=se.get(o).rectBetween(i.$anchorCell.pos-s,i.$headCell.pos-s);return r=W3(r,l.right-l.left,l.bottom-l.top),Sc(t.state,t.dispatch,s,l,r),!0}else if(r){const o=To(t.state),s=o.start(-1);return Sc(t.state,t.dispatch,s,se.get(o.node(-1)).findCell(o.pos-s),r),!0}else return!1}function G3(t,e){var n;if(e.ctrlKey||e.metaKey)return;const r=Cc(t,e.target);let i;if(e.shiftKey&&t.state.selection instanceof ue)o(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(i=si(t.state.selection.$anchor))!=null&&((n=hs(t,e))==null?void 0:n.pos)!=i.pos)o(i,e),e.preventDefault();else if(!r)return;function o(a,u){let c=hs(t,u);const f=Ht.getState(t.state)==null;if(!c||!Zl(a,c))if(f)c=a;else return;const h=new ue(a,c);if(f||!t.state.selection.eq(h)){const p=t.state.tr.setSelection(h);f&&p.setMeta(Ht,a.pos),t.dispatch(p)}}function s(){t.root.removeEventListener("mouseup",s),t.root.removeEventListener("dragstart",s),t.root.removeEventListener("mousemove",l),Ht.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(Ht,-1))}function l(a){const u=a,c=Ht.getState(t.state);let f;if(c!=null)f=t.state.doc.resolve(c);else if(Cc(t,u.target)!=r&&(f=hs(t,e),!f))return s();f&&o(f,u)}t.root.addEventListener("mouseup",s),t.root.addEventListener("dragstart",s),t.root.addEventListener("mousemove",l)}function kp(t,e,n){if(!(t.state.selection instanceof X))return null;const{$head:r}=t.state.selection;for(let i=r.depth-1;i>=0;i--){const o=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:o.childCount))return null;if(o.type.spec.tableRole=="cell"||o.type.spec.tableRole=="header_cell"){const l=r.before(i),a=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(a)?l:null}}return null}function Cc(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function hs(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?si(t.state.doc.resolve(n.pos)):null}var X3=class{constructor(t,e){this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),hl(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!=this.node.type?!1:(this.node=t,hl(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function hl(t,e,n,r,i,o){var s;let l=0,a=!0,u=e.firstChild;const c=t.firstChild;if(c){for(let f=0,h=0;f<c.childCount;f++){const{colspan:p,colwidth:d}=c.child(f).attrs;for(let m=0;m<p;m++,h++){const y=i==h?o:d&&d[m],g=y?y+"px":"";l+=y||r,y||(a=!1),u?(u.style.width!=g&&(u.style.width=g),u=u.nextSibling):e.appendChild(document.createElement("col")).style.width=g}}for(;u;){const f=u.nextSibling;(s=u.parentNode)==null||s.removeChild(u),u=f}a?(n.style.width=l+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=l+"px")}}var Je=new ur("tableColumnResizing");function oS({handleWidth:t=5,cellMinWidth:e=25,View:n=X3,lastColumnResizable:r=!0}={}){const i=new ar({key:Je,state:{init(o,s){var l,a;const u=(a=(l=i.spec)==null?void 0:l.props)==null?void 0:a.nodeViews,c=Ze(s.schema).table.name;return n&&u&&(u[c]=(f,h)=>new n(f,e,h)),new Q3(-1,!1)},apply(o,s){return s.apply(o)}},props:{attributes:o=>{const s=Je.getState(o);return s&&s.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,s)=>{Z3(o,s,t,e,r)},mouseleave:o=>{e6(o)},mousedown:(o,s)=>{t6(o,s,e)}},decorations:o=>{const s=Je.getState(o);if(s&&s.activeHandle>-1)return l6(o,s.activeHandle)},nodeViews:{}}});return i}var Q3=class Vi{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,r=e.getMeta(Je);if(r&&r.setHandle!=null)return new Vi(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Vi(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&e.docChanged){let i=e.mapping.map(n.activeHandle,-1);return cl(e.doc.resolve(i))||(i=-1),new Vi(i,n.dragging)}return n}};function Z3(t,e,n,r,i){const o=Je.getState(t.state);if(o&&!o.dragging){const s=r6(e.target);let l=-1;if(s){const{left:a,right:u}=s.getBoundingClientRect();e.clientX-a<=n?l=Oc(t,e,"left",n):u-e.clientX<=n&&(l=Oc(t,e,"right",n))}if(l!=o.activeHandle){if(!i&&l!==-1){const a=t.state.doc.resolve(l),u=a.node(-1),c=se.get(u),f=a.start(-1);if(c.colCount(a.pos-f)+a.nodeAfter.attrs.colspan-1==c.width-1)return}vp(t,l)}}}function e6(t){const e=Je.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&vp(t,-1)}function t6(t,e,n){var r;const i=(r=t.dom.ownerDocument.defaultView)!=null?r:window,o=Je.getState(t.state);if(!o||o.activeHandle==-1||o.dragging)return!1;const s=t.state.doc.nodeAt(o.activeHandle),l=n6(t,o.activeHandle,s.attrs);t.dispatch(t.state.tr.setMeta(Je,{setDragging:{startX:e.clientX,startWidth:l}}));function a(c){i.removeEventListener("mouseup",a),i.removeEventListener("mousemove",u);const f=Je.getState(t.state);f!=null&&f.dragging&&(i6(t,f.activeHandle,Ac(f.dragging,c,n)),t.dispatch(t.state.tr.setMeta(Je,{setDragging:null})))}function u(c){if(!c.which)return a(c);const f=Je.getState(t.state);if(f&&f.dragging){const h=Ac(f.dragging,c,n);o6(t,f.activeHandle,h,n)}}return i.addEventListener("mouseup",a),i.addEventListener("mousemove",u),e.preventDefault(),!0}function n6(t,e,{colspan:n,colwidth:r}){const i=r&&r[r.length-1];if(i)return i;const o=t.domAtPos(e);let l=o.node.childNodes[o.offset].offsetWidth,a=n;if(r)for(let u=0;u<n;u++)r[u]&&(l-=r[u],a--);return l/a}function r6(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function Oc(t,e,n,r){const i=n=="right"?-r:r,o=t.posAtCoords({left:e.clientX+i,top:e.clientY});if(!o)return-1;const{pos:s}=o,l=si(t.state.doc.resolve(s));if(!l)return-1;if(n=="right")return l.pos;const a=se.get(l.node(-1)),u=l.start(-1),c=a.map.indexOf(l.pos-u);return c%a.width==0?-1:u+a.map[c-1]}function Ac(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function vp(t,e){t.dispatch(t.state.tr.setMeta(Je,{setHandle:e}))}function i6(t,e,n){const r=t.state.doc.resolve(e),i=r.node(-1),o=se.get(i),s=r.start(-1),l=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,a=t.state.tr;for(let u=0;u<o.height;u++){const c=u*o.width+l;if(u&&o.map[c]==o.map[c-o.width])continue;const f=o.map[c],h=i.nodeAt(f).attrs,p=h.colspan==1?0:l-o.colCount(f);if(h.colwidth&&h.colwidth[p]==n)continue;const d=h.colwidth?h.colwidth.slice():s6(h.colspan);d[p]=n,a.setNodeMarkup(s+f,null,{...h,colwidth:d})}a.docChanged&&t.dispatch(a)}function o6(t,e,n,r){const i=t.state.doc.resolve(e),o=i.node(-1),s=i.start(-1),l=se.get(o).colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1;let a=t.domAtPos(i.start(-1)).node;for(;a&&a.nodeName!="TABLE";)a=a.parentNode;a&&hl(o,a.firstChild,a,r,l,n)}function s6(t){return Array(t).fill(0)}function l6(t,e){const n=[],r=t.doc.resolve(e),i=r.node(-1);if(!i)return oe.empty;const o=se.get(i),s=r.start(-1),l=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1;for(let a=0;a<o.height;a++){const u=l+a*o.width;if((l==o.width-1||o.map[u]!=o.map[u+1])&&(a==0||o.map[u]!=o.map[u-o.width])){const c=o.map[u],f=s+c+i.nodeAt(c).nodeSize-1,h=document.createElement("div");h.className="column-resize-handle",n.push(Ie.widget(f,h))}}return oe.create(t.doc,n)}function sS({allowTableNodeSelection:t=!1}={}){return new ar({key:Ht,state:{init(){return null},apply(e,n){const r=e.getMeta(Ht);if(r!=null)return r==-1?null:r;if(n==null||!e.docChanged)return n;const{deleted:i,pos:o}=e.mapping.mapResult(n);return i?null:o}},props:{decorations:D3,handleDOMEvents:{mousedown:G3},createSelectionBetween(e){return Ht.getState(e.state)!=null?e.state.selection:null},handleTripleClick:K3,handleKeyDown:J3,handlePaste:Y3},appendTransaction(e,n,r){return z3(r,F3(r,n),t)}})}var lo=typeof navigator<"u"?navigator:null,ta=lo&&lo.userAgent||"",a6=/Edge\/(\d+)/.exec(ta),u6=/MSIE \d/.exec(ta),c6=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ta),f6=!!(u6||c6||a6),h6=!f6&&!!lo&&/Apple Computer/.test(lo.vendor),_p=new ur("safari-ime-span"),pl=!1,p6={key:_p,props:{decorations:d6,handleDOMEvents:{compositionstart:()=>{pl=!0},compositionend:()=>{pl=!1}}}};function d6(t){const{$from:e,$to:n,to:r}=t.selection;if(pl&&e.sameParent(n)){const i=Ie.widget(r,m6,{ignoreSelection:!0,key:"safari-ime-span"});return oe.create(t.doc,[i])}}function m6(t){const e=t.dom.ownerDocument.createElement("span");return e.className="ProseMirror-safari-ime-span",e}var lS=new ar(h6?p6:{key:_p});function Ec(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(e);for(;i!==-1;)r++,i=n.indexOf(e,i+e.length);return r}function g6(t,e,n){const i=ko((n||{}).ignore||[]),o=y6(e);let s=-1;for(;++s<o.length;)ih(t,"text",l);function l(u,c){let f=-1,h;for(;++f<c.length;){const p=c[f],d=h?h.children:void 0;if(i(p,d?d.indexOf(p):void 0,h))return;h=p}if(h)return a(u,c)}function a(u,c){const f=c[c.length-1],h=o[s][0],p=o[s][1];let d=0;const y=f.children.indexOf(u);let g=!1,_=[];h.lastIndex=0;let x=h.exec(u.value);for(;x;){const S=x.index,O={index:x.index,input:x.input,stack:[...c,u]};let k=p(...x,O);if(typeof k=="string"&&(k=k.length>0?{type:"text",value:k}:void 0),k===!1?h.lastIndex=S+1:(d!==S&&_.push({type:"text",value:u.value.slice(d,S)}),Array.isArray(k)?_.push(...k):k&&_.push(k),d=S+x[0].length,g=!0),!h.global)break;x=h.exec(u.value)}return g?(d<u.value.length&&_.push({type:"text",value:u.value.slice(d)}),f.children.splice(y,1,..._)):_=[u],y+_.length}}function y6(t){const e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!t[0]||Array.isArray(t[0])?t:[t];let r=-1;for(;++r<n.length;){const i=n[r];e.push([b6(i[0]),w6(i[1])])}return e}function b6(t){return typeof t=="string"?new RegExp(Mo(t),"g"):t}function w6(t){return typeof t=="function"?t:function(){return t}}const ps="phrasing",ds=["autolink","link","image","label"];function x6(){return{transforms:[A6],enter:{literalAutolink:v6,literalAutolinkEmail:ms,literalAutolinkHttp:ms,literalAutolinkWww:ms},exit:{literalAutolink:O6,literalAutolinkEmail:C6,literalAutolinkHttp:_6,literalAutolinkWww:S6}}}function k6(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ps,notInConstruct:ds},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ps,notInConstruct:ds},{character:":",before:"[ps]",after:"\\/",inConstruct:ps,notInConstruct:ds}]}}function v6(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function ms(t){this.config.enter.autolinkProtocol.call(this,t)}function _6(t){this.config.exit.autolinkProtocol.call(this,t)}function S6(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function C6(t){this.config.exit.autolinkEmail.call(this,t)}function O6(t){this.exit(t)}function A6(t){g6(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,E6],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),M6]],{ignore:["link","linkReference"]})}function E6(t,e,n,r,i){let o="";if(!Sp(i)||(/^w/i.test(e)&&(n=e+n,e="",o="http://"),!T6(n)))return!1;const s=N6(n+r);if(!s[0])return!1;const l={type:"link",title:null,url:o+e+s[0],children:[{type:"text",value:e+s[0]}]};return s[1]?[l,{type:"text",value:s[1]}]:l}function M6(t,e,n,r){return!Sp(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function T6(t){const e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function N6(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],r=n.indexOf(")");const i=Ec(t,"(");let o=Ec(t,")");for(;r!==-1&&i>o;)t+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[t,n]}function Sp(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||Sn(n)||wo(n))&&(!e||n!==47)}Cp.peek=j6;function D6(){return{enter:{gfmFootnoteDefinition:R6,gfmFootnoteDefinitionLabelString:z6,gfmFootnoteCall:B6,gfmFootnoteCallString:L6},exit:{gfmFootnoteDefinition:F6,gfmFootnoteDefinitionLabelString:P6,gfmFootnoteCall:H6,gfmFootnoteCallString:V6}}}function I6(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:q6,footnoteReference:Cp}}}function R6(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function z6(){this.buffer()}function P6(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=e,n.identifier=ot(this.sliceSerialize(t)).toLowerCase()}function F6(t){this.exit(t)}function B6(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function L6(){this.buffer()}function V6(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=e,n.identifier=ot(this.sliceSerialize(t)).toLowerCase()}function H6(t){this.exit(t)}function Cp(t,e,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteReference"),l=n.enter("reference");return o+=i.move(n.safe(n.associationId(t),{...i.current(),before:o,after:"]"})),l(),s(),o+=i.move("]"),o}function j6(){return"["}function q6(t,e,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteDefinition"),l=n.enter("label");return o+=i.move(n.safe(n.associationId(t),{...i.current(),before:o,after:"]"})),l(),o+=i.move("]:"+(t.children&&t.children.length>0?" ":"")),i.shift(4),o+=i.move(n.indentLines(n.containerFlow(t,i.current()),$6)),s(),o}function $6(t,e,n){return e===0?t:(n?"":" ")+t}const W6=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Op.peek=G6;function U6(){return{canContainEols:["delete"],enter:{strikethrough:K6},exit:{strikethrough:Y6}}}function J6(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:W6}],handlers:{delete:Op}}}function K6(t){this.enter({type:"delete",children:[]},t)}function Y6(t){this.exit(t)}function Op(t,e,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(t,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function G6(){return"~"}function X6(t,e={}){const n=(e.align||[]).concat(),r=e.stringLength||Z6,i=[],o=[],s=[],l=[];let a=0,u=-1;for(;++u<t.length;){const d=[],m=[];let y=-1;for(t[u].length>a&&(a=t[u].length);++y<t[u].length;){const g=Q6(t[u][y]);if(e.alignDelimiters!==!1){const _=r(g);m[y]=_,(l[y]===void 0||_>l[y])&&(l[y]=_)}d.push(g)}o[u]=d,s[u]=m}let c=-1;if(typeof n=="object"&&"length"in n)for(;++c<a;)i[c]=Mc(n[c]);else{const d=Mc(n);for(;++c<a;)i[c]=d}c=-1;const f=[],h=[];for(;++c<a;){const d=i[c];let m="",y="";d===99?(m=":",y=":"):d===108?m=":":d===114&&(y=":");let g=e.alignDelimiters===!1?1:Math.max(1,l[c]-m.length-y.length);const _=m+"-".repeat(g)+y;e.alignDelimiters!==!1&&(g=m.length+g+y.length,g>l[c]&&(l[c]=g),h[c]=g),f[c]=_}o.splice(1,0,f),s.splice(1,0,h),u=-1;const p=[];for(;++u<o.length;){const d=o[u],m=s[u];c=-1;const y=[];for(;++c<a;){const g=d[c]||"";let _="",x="";if(e.alignDelimiters!==!1){const S=l[c]-(m[c]||0),O=i[c];O===114?_=" ".repeat(S):O===99?S%2?(_=" ".repeat(S/2+.5),x=" ".repeat(S/2-.5)):(_=" ".repeat(S/2),x=_):x=" ".repeat(S)}e.delimiterStart!==!1&&!c&&y.push("|"),e.padding!==!1&&!(e.alignDelimiters===!1&&g==="")&&(e.delimiterStart!==!1||c)&&y.push(" "),e.alignDelimiters!==!1&&y.push(_),y.push(g),e.alignDelimiters!==!1&&y.push(x),e.padding!==!1&&y.push(" "),(e.delimiterEnd!==!1||c!==a-1)&&y.push("|")}p.push(e.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return p.join(` |
| 67 |
`)}function Q6(t){return t==null?"":String(t)}function Z6(t){return t.length}function Mc(t){const e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function ek(){return{enter:{table:tk,tableData:Tc,tableHeader:Tc,tableRow:rk},exit:{codeText:ik,table:nk,tableData:gs,tableHeader:gs,tableRow:gs}}}function tk(t){const e=t._align;this.enter({type:"table",align:e.map(function(n){return n==="none"?null:n}),children:[]},t),this.data.inTable=!0}function nk(t){this.exit(t),this.data.inTable=void 0}function rk(t){this.enter({type:"tableRow",children:[]},t)}function gs(t){this.exit(t)}function Tc(t){this.enter({type:"tableCell",children:[]},t)}function ik(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,ok));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function ok(t,e){return e==="|"?e:t}function sk(t){const e=t||{},n=e.tableCellPadding,r=e.tablePipeAlign,i=e.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` |
| 68 |
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:s,tableCell:a,tableRow:l}};function s(p,d,m,y){return u(c(p,m,y),p.align)}function l(p,d,m,y){const g=f(p,m,y),_=u([g]);return _.slice(0,_.indexOf(` |
| 69 |
`))}function a(p,d,m,y){const g=m.enter("tableCell"),_=m.enter("phrasing"),x=m.containerPhrasing(p,{...y,before:o,after:o});return _(),g(),x}function u(p,d){return X6(p,{align:d,alignDelimiters:r,padding:n,stringLength:i})}function c(p,d,m){const y=p.children;let g=-1;const _=[],x=d.enter("table");for(;++g<y.length;)_[g]=f(y[g],d,m);return x(),_}function f(p,d,m){const y=p.children;let g=-1;const _=[],x=d.enter("tableRow");for(;++g<y.length;)_[g]=a(y[g],p,d,m);return x(),_}function h(p,d,m){let y=Bl.inlineCode(p,d,m);return m.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function lk(){return{exit:{taskListCheckValueChecked:Nc,taskListCheckValueUnchecked:Nc,paragraph:uk}}}function ak(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ck}}}function Nc(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function uk(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=e.children;let o=-1,s;for(;++o<i.length;){const l=i[o];if(l.type==="paragraph"){s=l;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(t)}function ck(t,e,n,r){const i=t.children[0],o=typeof t.checked=="boolean"&&i&&i.type==="paragraph",s="["+(t.checked?"x":" ")+"] ",l=n.createTracker(r);o&&l.move(s);let a=Bl.listItem(t,e,n,{...r,...l.current()});return o&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),a;function u(c){return c+s}}function fk(){return[x6(),D6(),U6(),ek(),lk()]}function hk(t){return{extensions:[k6(),I6(),J6(),sk(t),ak()]}}const pk={tokenize:wk,partial:!0},Ap={tokenize:xk,partial:!0},Ep={tokenize:kk,partial:!0},Mp={tokenize:vk,partial:!0},dk={tokenize:_k,partial:!0},Tp={name:"wwwAutolink",tokenize:yk,previous:Dp},Np={name:"protocolAutolink",tokenize:bk,previous:Ip},Dt={name:"emailAutolink",tokenize:gk,previous:Rp},xt={};function mk(){return{text:xt}}let ln=48;for(;ln<123;)xt[ln]=Dt,ln++,ln===58?ln=65:ln===91&&(ln=97);xt[43]=Dt;xt[45]=Dt;xt[46]=Dt;xt[95]=Dt;xt[72]=[Dt,Np];xt[104]=[Dt,Np];xt[87]=[Dt,Tp];xt[119]=[Dt,Tp];function gk(t,e,n){const r=this;let i,o;return s;function s(f){return!dl(f)||!Rp.call(r,r.previous)||na(r.events)?n(f):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),l(f))}function l(f){return dl(f)?(t.consume(f),l):f===64?(t.consume(f),a):n(f)}function a(f){return f===46?t.check(dk,c,u)(f):f===45||f===95||De(f)?(o=!0,t.consume(f),a):c(f)}function u(f){return t.consume(f),i=!0,a}function c(f){return o&&i&&Oe(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(f)):n(f)}}function yk(t,e,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Dp.call(r,r.previous)||na(r.events)?n(s):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(pk,t.attempt(Ap,t.attempt(Ep,o),n),n)(s))}function o(s){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(s)}}function bk(t,e,n){const r=this;let i="",o=!1;return s;function s(f){return(f===72||f===104)&&Ip.call(r,r.previous)&&!na(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),t.consume(f),l):n(f)}function l(f){if(Oe(f)&&i.length<5)return i+=String.fromCodePoint(f),t.consume(f),l;if(f===58){const h=i.toLowerCase();if(h==="http"||h==="https")return t.consume(f),a}return n(f)}function a(f){return f===47?(t.consume(f),o?u:(o=!0,a)):n(f)}function u(f){return f===null||Zi(f)||te(f)||Sn(f)||wo(f)?n(f):t.attempt(Ap,t.attempt(Ep,c),n)(f)}function c(f){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(f)}}function wk(t,e,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,t.consume(s),i):s===46&&r===3?(t.consume(s),o):n(s)}function o(s){return s===null?n(s):e(s)}}function xk(t,e,n){let r,i,o;return s;function s(u){return u===46||u===95?t.check(Mp,a,l)(u):u===null||te(u)||Sn(u)||u!==45&&wo(u)?a(u):(o=!0,t.consume(u),s)}function l(u){return u===95?r=!0:(i=r,r=void 0),t.consume(u),s}function a(u){return i||r||!o?n(u):e(u)}}function kk(t,e){let n=0,r=0;return i;function i(s){return s===40?(n++,t.consume(s),i):s===41&&r<n?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?t.check(Mp,e,o)(s):s===null||te(s)||Sn(s)?e(s):(t.consume(s),i)}function o(s){return s===41&&r++,t.consume(s),i}}function vk(t,e,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(t.consume(l),r):l===38?(t.consume(l),o):l===93?(t.consume(l),i):l===60||l===null||te(l)||Sn(l)?e(l):n(l)}function i(l){return l===null||l===40||l===91||te(l)||Sn(l)?e(l):r(l)}function o(l){return Oe(l)?s(l):n(l)}function s(l){return l===59?(t.consume(l),r):Oe(l)?(t.consume(l),s):n(l)}}function _k(t,e,n){return r;function r(o){return t.consume(o),i}function i(o){return De(o)?n(o):e(o)}}function Dp(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||te(t)}function Ip(t){return!Oe(t)}function Rp(t){return!(t===47||dl(t))}function dl(t){return t===43||t===45||t===46||t===95||De(t)}function na(t){let e=t.length,n=!1;for(;e--;){const r=t[e][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Sk={tokenize:Dk,partial:!0};function Ck(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Mk,continuation:{tokenize:Tk},exit:Nk}},text:{91:{name:"gfmFootnoteCall",tokenize:Ek},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Ok,resolveTo:Ak}}}}function Ok(t,e,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const a=r.events[i][1];if(a.type==="labelImage"){s=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return l;function l(a){if(!s||!s._balanced)return n(a);const u=ot(r.sliceSerialize({start:s.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(a):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(a),t.exit("gfmFootnoteCallLabelMarker"),e(a))}}function Ak(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},t[t.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},l=[t[n+1],t[n+2],["enter",r,e],t[n+3],t[n+4],["enter",i,e],["exit",i,e],["enter",o,e],["enter",s,e],["exit",s,e],["exit",o,e],t[t.length-2],t[t.length-1],["exit",r,e]];return t.splice(n,t.length-n+1,...l),t}function Ek(t,e,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,s;return l;function l(f){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(f),t.exit("gfmFootnoteCallLabelMarker"),a}function a(f){return f!==94?n(f):(t.enter("gfmFootnoteCallMarker"),t.consume(f),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",u)}function u(f){if(o>999||f===93&&!s||f===null||f===91||te(f))return n(f);if(f===93){t.exit("chunkString");const h=t.exit("gfmFootnoteCallString");return i.includes(ot(r.sliceSerialize(h)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(f),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(f)}return te(f)||(s=!0),o++,t.consume(f),f===92?c:u}function c(f){return f===91||f===92||f===93?(t.consume(f),o++,u):u(f)}}function Mk(t,e,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=0,l;return a;function a(d){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(d),t.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(d){return d===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(d),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",c):n(d)}function c(d){if(s>999||d===93&&!l||d===null||d===91||te(d))return n(d);if(d===93){t.exit("chunkString");const m=t.exit("gfmFootnoteDefinitionLabelString");return o=ot(r.sliceSerialize(m)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(d),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),h}return te(d)||(l=!0),s++,t.consume(d),d===92?f:c}function f(d){return d===91||d===92||d===93?(t.consume(d),s++,c):c(d)}function h(d){return d===58?(t.enter("definitionMarker"),t.consume(d),t.exit("definitionMarker"),i.includes(o)||i.push(o),Q(t,p,"gfmFootnoteDefinitionWhitespace")):n(d)}function p(d){return e(d)}}function Tk(t,e,n){return t.check(ti,e,t.attempt(Sk,e,n))}function Nk(t){t.exit("gfmFootnoteDefinition")}function Dk(t,e,n){const r=this;return Q(t,i,"gfmFootnoteDefinitionIndent",4+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?e(o):n(o)}}function Ik(t){let n=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,l){let a=-1;for(;++a<s.length;)if(s[a][0]==="enter"&&s[a][1].type==="strikethroughSequenceTemporary"&&s[a][1]._close){let u=a;for(;u--;)if(s[u][0]==="exit"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._open&&s[a][1].end.offset-s[a][1].start.offset===s[u][1].end.offset-s[u][1].start.offset){s[a][1].type="strikethroughSequence",s[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},s[u][1].start),end:Object.assign({},s[a][1].end)},f={type:"strikethroughText",start:Object.assign({},s[u][1].end),end:Object.assign({},s[a][1].start)},h=[["enter",c,l],["enter",s[u][1],l],["exit",s[u][1],l],["enter",f,l]],p=l.parser.constructs.insideSpan.null;p&&Ye(h,h.length,0,xo(p,s.slice(u+1,a),l)),Ye(h,h.length,0,[["exit",f,l],["enter",s[a][1],l],["exit",s[a][1],l],["exit",c,l]]),Ye(s,u-1,a-u+3,h),a=u+h.length-2;break}}for(a=-1;++a<s.length;)s[a][1].type==="strikethroughSequenceTemporary"&&(s[a][1].type="data");return s}function o(s,l,a){const u=this.previous,c=this.events;let f=0;return h;function h(d){return u===126&&c[c.length-1][1].type!=="characterEscape"?a(d):(s.enter("strikethroughSequenceTemporary"),p(d))}function p(d){const m=eo(u);if(d===126)return f>1?a(d):(s.consume(d),f++,p);if(f<2&&!n)return a(d);const y=s.exit("strikethroughSequenceTemporary"),g=eo(d);return y._open=!g||g===2&&!!m,y._close=!m||m===2&&!!g,l(d)}}}class Rk{constructor(){this.map=[]}add(e,n,r){zk(this,e,n,r)}consume(e){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];r.push([...e]),e.length=0;let i=r.pop();for(;i;)e.push(...i),i=r.pop();this.map.length=0}}function zk(t,e,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<t.map.length;){if(t.map[i][0]===e){t.map[i][1]+=n,t.map[i][2].push(...r);return}i+=1}t.map.push([e,n,r])}}function Pk(t,e){let n=!1;const r=[];for(;e<t.length;){const i=t[e];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return r}function Fk(){return{flow:{null:{name:"table",tokenize:Bk,resolveAll:Lk}}}}function Bk(t,e,n){const r=this;let i=0,o=0,s;return l;function l(v){let T=r.events.length-1;for(;T>-1;){const W=r.events[T][1].type;if(W==="lineEnding"||W==="linePrefix")T--;else break}const D=T>-1?r.events[T][1].type:null,L=D==="tableHead"||D==="tableRow"?k:a;return L===k&&r.parser.lazy[r.now().line]?n(v):L(v)}function a(v){return t.enter("tableHead"),t.enter("tableRow"),u(v)}function u(v){return v===124||(s=!0,o+=1),c(v)}function c(v){return v===null?n(v):V(v)?o>1?(o=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),p):n(v):U(v)?Q(t,c,"whitespace")(v):(o+=1,s&&(s=!1,i+=1),v===124?(t.enter("tableCellDivider"),t.consume(v),t.exit("tableCellDivider"),s=!0,c):(t.enter("data"),f(v)))}function f(v){return v===null||v===124||te(v)?(t.exit("data"),c(v)):(t.consume(v),v===92?h:f)}function h(v){return v===92||v===124?(t.consume(v),f):f(v)}function p(v){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(v):(t.enter("tableDelimiterRow"),s=!1,U(v)?Q(t,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):d(v))}function d(v){return v===45||v===58?y(v):v===124?(s=!0,t.enter("tableCellDivider"),t.consume(v),t.exit("tableCellDivider"),m):O(v)}function m(v){return U(v)?Q(t,y,"whitespace")(v):y(v)}function y(v){return v===58?(o+=1,s=!0,t.enter("tableDelimiterMarker"),t.consume(v),t.exit("tableDelimiterMarker"),g):v===45?(o+=1,g(v)):v===null||V(v)?S(v):O(v)}function g(v){return v===45?(t.enter("tableDelimiterFiller"),_(v)):O(v)}function _(v){return v===45?(t.consume(v),_):v===58?(s=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(v),t.exit("tableDelimiterMarker"),x):(t.exit("tableDelimiterFiller"),x(v))}function x(v){return U(v)?Q(t,S,"whitespace")(v):S(v)}function S(v){return v===124?d(v):v===null||V(v)?!s||i!==o?O(v):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(v)):O(v)}function O(v){return n(v)}function k(v){return t.enter("tableRow"),I(v)}function I(v){return v===124?(t.enter("tableCellDivider"),t.consume(v),t.exit("tableCellDivider"),I):v===null||V(v)?(t.exit("tableRow"),e(v)):U(v)?Q(t,I,"whitespace")(v):(t.enter("data"),B(v))}function B(v){return v===null||v===124||te(v)?(t.exit("data"),I(v)):(t.consume(v),v===92?E:B)}function E(v){return v===92||v===124?(t.consume(v),B):B(v)}}function Lk(t,e){let n=-1,r=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],l=!1,a=0,u,c,f;const h=new Rk;for(;++n<t.length;){const p=t[n],d=p[1];p[0]==="enter"?d.type==="tableHead"?(l=!1,a!==0&&(Dc(h,e,a,u,c),c=void 0,a=0),u={type:"table",start:Object.assign({},d.start),end:Object.assign({},d.end)},h.add(n,0,[["enter",u,e]])):d.type==="tableRow"||d.type==="tableDelimiterRow"?(r=!0,f=void 0,o=[0,0,0,0],s=[0,n+1,0,0],l&&(l=!1,c={type:"tableBody",start:Object.assign({},d.start),end:Object.assign({},d.end)},h.add(n,0,[["enter",c,e]])),i=d.type==="tableDelimiterRow"?2:c?3:1):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],f=Ai(h,e,o,i,void 0,f),o=[0,0,0,0]),s[2]=n)):d.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],f=Ai(h,e,o,i,void 0,f)),o=s,s=[o[1],n,0,0])):d.type==="tableHead"?(l=!0,a=n):d.type==="tableRow"||d.type==="tableDelimiterRow"?(a=n,o[1]!==0?(s[0]=s[1],f=Ai(h,e,o,i,n,f)):s[1]!==0&&(f=Ai(h,e,s,i,n,f)),i=0):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")&&(s[3]=n)}for(a!==0&&Dc(h,e,a,u,c),h.consume(e.events),n=-1;++n<e.events.length;){const p=e.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=Pk(e.events,n))}return t}function Ai(t,e,n,r,i,o){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(o.end=Object.assign({},Bn(e.events,n[0])),t.add(n[0],0,[["exit",o,e]]));const a=Bn(e.events,n[1]);if(o={type:s,start:Object.assign({},a),end:Object.assign({},a)},t.add(n[1],0,[["enter",o,e]]),n[2]!==0){const u=Bn(e.events,n[2]),c=Bn(e.events,n[3]),f={type:l,start:Object.assign({},u),end:Object.assign({},c)};if(t.add(n[2],0,[["enter",f,e]]),r!==2){const h=e.events[n[2]],p=e.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const d=n[2]+1,m=n[3]-n[2]-1;t.add(d,m,[])}}t.add(n[3]+1,0,[["exit",f,e]])}return i!==void 0&&(o.end=Object.assign({},Bn(e.events,i)),t.add(i,0,[["exit",o,e]]),o=void 0),o}function Dc(t,e,n,r,i){const o=[],s=Bn(e.events,n);i&&(i.end=Object.assign({},s),o.push(["exit",i,e])),r.end=Object.assign({},s),o.push(["exit",r,e]),t.add(n+1,0,o)}function Bn(t,e){const n=t[e],r=n[0]==="enter"?"start":"end";return n[1][r]}const Vk={name:"tasklistCheck",tokenize:jk};function Hk(){return{text:{91:Vk}}}function jk(t,e,n){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(a),t.exit("taskListCheckMarker"),o)}function o(a){return te(a)?(t.enter("taskListCheckValueUnchecked"),t.consume(a),t.exit("taskListCheckValueUnchecked"),s):a===88||a===120?(t.enter("taskListCheckValueChecked"),t.consume(a),t.exit("taskListCheckValueChecked"),s):n(a)}function s(a){return a===93?(t.enter("taskListCheckMarker"),t.consume(a),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),l):n(a)}function l(a){return V(a)?e(a):U(a)?t.check({tokenize:qk},e,n)(a):n(a)}}function qk(t,e,n){return Q(t,r,"whitespace");function r(i){return i===null?n(i):e(i)}}function $k(t){return Vf([mk(),Ck(),Ik(t),Fk(),Hk()])}const Wk={};function aS(t){const e=this,n=t||Wk,r=e.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push($k(n)),o.push(fk()),s.push(hk(n))}var ao=200,fe=function(){};fe.prototype.append=function(e){return e.length?(e=fe.from(e),!this.length&&e||e.length<ao&&this.leafAppend(e)||this.length<ao&&e.leafPrepend(this)||this.appendInner(e)):this};fe.prototype.prepend=function(e){return e.length?fe.from(e).append(this):this};fe.prototype.appendInner=function(e){return new Uk(this,e)};fe.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?fe.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};fe.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};fe.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};fe.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(o,s){return i.push(e(o,s))},n,r),i};fe.from=function(e){return e instanceof fe?e:e&&e.length?new zp(e):fe.empty};var zp=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,o){return i==0&&o==this.length?this:new e(this.values.slice(i,o))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,o,s,l){for(var a=o;a<s;a++)if(i(this.values[a],l+a)===!1)return!1},e.prototype.forEachInvertedInner=function(i,o,s,l){for(var a=o-1;a>=s;a--)if(i(this.values[a],l+a)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=ao)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=ao)return new e(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(fe);fe.empty=new zp([]);var Uk=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,i,o,s){var l=this.left.length;if(i<l&&this.left.forEachInner(r,i,Math.min(o,l),s)===!1||o>l&&this.right.forEachInner(r,Math.max(i-l,0),Math.min(this.length,o)-l,s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,o,s){var l=this.left.length;if(i>l&&this.right.forEachInvertedInner(r,i-l,Math.max(o,l)-l,s+l)===!1||o<l&&this.left.forEachInvertedInner(r,Math.min(i,l),o,s)===!1)return!1},e.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var o=this.left.length;return i<=o?this.left.slice(r,i):r>=o?this.right.slice(r-o,i-o):this.left.slice(r,o).append(this.right.slice(0,i-o))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(fe);const Jk=500;class it{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,o;n&&(i=this.remapping(r,this.items.length),o=i.maps.length);let s=e.tr,l,a,u=[],c=[];return this.items.forEach((f,h)=>{if(!f.step){i||(i=this.remapping(r,h+1),o=i.maps.length),o--,c.push(f);return}if(i){c.push(new pt(f.map));let p=f.step.map(i.slice(o)),d;p&&s.maybeStep(p).doc&&(d=s.mapping.maps[s.mapping.maps.length-1],u.push(new pt(d,void 0,void 0,u.length+c.length))),o--,d&&i.appendMap(d,o)}else s.maybeStep(f.step);if(f.selection)return l=i?f.selection.map(i.slice(o)):f.selection,a=new it(this.items.slice(0,r).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:a,transform:s,selection:l}}addTransform(e,n,r,i){let o=[],s=this.eventCount,l=this.items,a=!i&&l.length?l.get(l.length-1):null;for(let c=0;c<e.steps.length;c++){let f=e.steps[c].invert(e.docs[c]),h=new pt(e.mapping.maps[c],f,n),p;(p=a&&a.merge(h))&&(h=p,c?o.pop():l=l.slice(0,l.length-1)),o.push(h),n&&(s++,n=void 0),i||(a=h)}let u=s-r.depth;return u>Yk&&(l=Kk(l,u),s-=u),new it(l.append(o),s)}remapping(e,n){let r=new Hn;return this.items.forEach((i,o)=>{let s=i.mirrorOffset!=null&&o-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,s)},e,n),r}addMaps(e){return this.eventCount==0?this:new it(this.items.append(e.map(n=>new pt(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),o=e.mapping,s=e.steps.length,l=this.eventCount;this.items.forEach(h=>{h.selection&&l--},i);let a=n;this.items.forEach(h=>{let p=o.getMirror(--a);if(p==null)return;s=Math.min(s,p);let d=o.maps[p];if(h.step){let m=e.steps[p].invert(e.docs[p]),y=h.selection&&h.selection.map(o.slice(a+1,p));y&&l++,r.push(new pt(d,m,y))}else r.push(new pt(d))},i);let u=[];for(let h=n;h<s;h++)u.push(new pt(o.maps[h]));let c=this.items.slice(0,i).append(u).append(r),f=new it(c,l);return f.emptyItemCount()>Jk&&(f=f.compress(this.items.length-r.length)),f}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,i=[],o=0;return this.items.forEach((s,l)=>{if(l>=e)i.push(s),s.selection&&o++;else if(s.step){let a=s.step.map(n.slice(r)),u=a&&a.getMap();if(r--,u&&n.appendMap(u,r),a){let c=s.selection&&s.selection.map(n.slice(r));c&&o++;let f=new pt(u.invert(),a,c),h,p=i.length-1;(h=i.length&&i[p].merge(f))?i[p]=h:i.push(f)}}else s.map&&r--},this.items.length,0),new it(fe.from(i.reverse()),o)}}it.empty=new it(fe.empty,0);function Kk(t,e){let n;return t.forEach((r,i)=>{if(r.selection&&e--==0)return n=i,!1}),t.slice(n)}class pt{constructor(e,n,r,i){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new pt(n.getMap().invert(),n,this.selection)}}}class Lt{constructor(e,n,r,i,o){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const Yk=20;function Gk(t,e,n,r){let i=n.getMeta(vn),o;if(i)return i.historyState;n.getMeta(Zk)&&(t=new Lt(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(s&&s.getMeta(vn))return s.getMeta(vn).redo?new Lt(t.done.addTransform(n,void 0,r,Hi(e)),t.undone,Ic(n.mapping.maps),t.prevTime,t.prevComposition):new Lt(t.done,t.undone.addTransform(n,void 0,r,Hi(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),a=t.prevTime==0||!s&&t.prevComposition!=l&&(t.prevTime<(n.time||0)-r.newGroupDelay||!Xk(n,t.prevRanges)),u=s?ys(t.prevRanges,n.mapping):Ic(n.mapping.maps);return new Lt(t.done.addTransform(n,a?e.selection.getBookmark():void 0,r,Hi(e)),it.empty,u,n.time,l??t.prevComposition)}else return(o=n.getMeta("rebased"))?new Lt(t.done.rebased(n,o),t.undone.rebased(n,o),ys(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Lt(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),ys(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function Xk(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,i)=>{for(let o=0;o<e.length;o+=2)r<=e[o+1]&&i>=e[o]&&(n=!0)}),n}function Ic(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,i,o,s)=>e.push(o,s));return e}function ys(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),o=e.map(t[r+1],-1);i<=o&&n.push(i,o)}return n}function Qk(t,e,n){let r=Hi(e),i=vn.get(e).spec.config,o=(n?t.undone:t.done).popEvent(e,r);if(!o)return null;let s=o.selection.resolve(o.transform.doc),l=(n?t.done:t.undone).addTransform(o.transform,e.selection.getBookmark(),i,r),a=new Lt(n?l:o.remaining,n?o.remaining:l,null,0,-1);return o.transform.setSelection(s).setMeta(vn,{redo:n,historyState:a})}let bs=!1,Rc=null;function Hi(t){let e=t.plugins;if(Rc!=e){bs=!1,Rc=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){bs=!0;break}}return bs}const vn=new ur("history"),Zk=new ur("closeHistory");function uS(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new ar({key:vn,state:{init(){return new Lt(it.empty,it.empty,null,0,-1)},apply(e,n,r){return Gk(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,i=r=="historyUndo"?ev:r=="historyRedo"?tv:null;return i?(n.preventDefault(),i(e.state,e.dispatch)):!1}}}})}function Pp(t,e){return(n,r)=>{let i=vn.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(r){let o=Qk(i,n,t);o&&r(e?o.scrollIntoView():o)}return!0}}const ev=Pp(!1,!0),tv=Pp(!0,!0);var mn,$n;class nv{constructor(e){Ro(this,mn,void 0);Ro(this,$n,new Set);zo(this,mn,e)}get current(){return Tn(this,mn)}set current(e){Tn(this,mn)!=e&&(zo(this,mn,e),Tn(this,$n).forEach(n=>n(e)))}on(e){return Tn(this,$n).add(e),()=>Tn(this,$n).delete(e)}}mn=new WeakMap,$n=new WeakMap;const Fp=t=>new nv(t),ml=Symbol.for("atomico.hooks");globalThis[ml]=globalThis[ml]||{};let or=globalThis[ml];const rv=Symbol.for("Atomico.suspense"),Bp=Symbol.for("Atomico.effect"),iv=Symbol.for("Atomico.layoutEffect"),Lp=Symbol.for("Atomico.insertionEffect"),li=(t,e,n)=>{const{i:r,hooks:i}=or.c,o=i[r]=i[r]||{};return o.value=t(o.value),o.effect=e,o.tag=n,or.c.i++,i[r].value},ov=t=>li((e=Fp(t))=>e),sv=()=>li((t=Fp(or.c.host))=>t),lv=()=>or.c.update,av=(t,e,n=0)=>{let r={},i=!1;const o=()=>i,s=(u,c)=>{for(const f in r){const h=r[f];h.effect&&h.tag===u&&(h.value=h.effect(h.value,c))}};return{load:u=>{or.c={host:e,hooks:r,update:t,i:0,id:n};let c;try{i=!1,c=u()}catch(f){if(f!==rv)throw f;i=!0}finally{or.c=null}return c},cleanEffects:u=>(s(Lp,u),()=>(s(iv,u),()=>{s(Bp,u)})),isSuspense:o}},ai=Symbol.for;function Vp(t,e){const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++){let i=t[r],o=e[r];if(i!==o)return!1}return!0}const Et=t=>typeof t=="function",Fr=t=>typeof t=="object",{isArray:uv}=Array,gl=(t,e)=>(e?t instanceof HTMLStyleElement:!0)&&"hydrate"in((t==null?void 0:t.dataset)||{});function Hp(t,e){let n;const r=i=>{let{length:o}=i;for(let s=0;s<o;s++){const l=i[s];if(l&&Array.isArray(l))r(l);else{const a=typeof l;if(l==null||a==="function"||a==="boolean")continue;a==="string"||a==="number"?(n==null&&(n=""),n+=l):(n!=null&&(e(n),n=null),e(l))}}};r(t),n!=null&&e(n)}const jp=(t,e,n)=>(t.addEventListener(e,n),()=>t.removeEventListener(e,n));let qp=class{constructor(e,n,r){this.message=n,this.target=e,this.value=r}};class cv extends qp{}class fv extends qp{}const uo="Custom",hv=null,pv={true:1,"":1,1:1};function dv(t,e,n,r,i){const{type:o,reflect:s,event:l,value:a,attr:u=gv(e)}=(n==null?void 0:n.name)!=uo&&Fr(n)&&n!=hv?n:{type:n},c=(o==null?void 0:o.name)===uo&&o.map,f=a!=null?o==Function||!Et(a)?()=>a:a:null;Object.defineProperty(t,e,{configurable:!0,set(h){const p=this[e];f&&o!=Boolean&&h==null&&(h=f());const{error:d,value:m}=(c?wv:xv)(o,h);if(d&&m!=null)throw new cv(this,`The value defined for prop '${e}' must be of type '${o.name}'`,m);p!=m&&(this._props[e]=m??void 0,this.update(),l&&mv(this,l),this.updated.then(()=>{s&&(this._ignoreAttr=u,yv(this,o,u,this[e]),this._ignoreAttr=null)}))},get(){return this._props[e]}}),f&&(i[e]=f()),r[u]={prop:e,type:o}}const mv=(t,{type:e,base:n=CustomEvent,...r})=>t.dispatchEvent(new n(e,r)),gv=t=>t.replace(/([A-Z])/g,"-$1").toLowerCase(),yv=(t,e,n,r)=>r==null||e==Boolean&&!r?t.removeAttribute(n):t.setAttribute(n,(e==null?void 0:e.name)===uo&&(e!=null&&e.serialize)?e==null?void 0:e.serialize(r):Fr(r)?JSON.stringify(r):e==Boolean?"":r),bv=(t,e)=>t==Boolean?!!pv[e]:t==Number?Number(e):t==String?e:t==Array||t==Object?JSON.parse(e):t.name==uo?e:new t(e),wv=({map:t},e)=>{try{return{value:t(e),error:!1}}catch{return{value:e,error:!0}}},xv=(t,e)=>t==null||e==null?{value:e,error:!1}:t!=String&&e===""?{value:void 0,error:!1}:t==Object||t==Array||t==Symbol?{value:e,error:{}.toString.call(e)!==`[object ${t.name}]`}:e instanceof t?{value:e,error:t==Number&&Number.isNaN(e.valueOf())}:t==String||t==Number||t==Boolean?{value:e,error:t==Number?typeof e!="number"?!0:Number.isNaN(e):t==String?typeof e!="string":typeof e!="boolean"}:{value:e,error:!0};let kv=0;const vv=t=>{var n;const e=((n=(t==null?void 0:t.dataset)||{})==null?void 0:n.hydrate)||"";return e||"c"+kv++},_v=(t,e=HTMLElement)=>{const n={},r={},i="prototype"in e&&e.prototype instanceof Element,o=i?e:"base"in e?e.base:HTMLElement,{props:s,styles:l}=i?t:e;class a extends o{constructor(){super(),this._setup(),this._render=()=>t({...this._props});for(const c in r)this[c]=r[c]}static get styles(){return[super.styles,l]}async _setup(){if(this._props)return;this._props={};let c,f;this.mounted=new Promise(y=>this.mount=()=>{y(),c!=this.parentNode&&(f!=c?this.unmounted.then(this.update):this.update()),c=this.parentNode}),this.unmounted=new Promise(y=>this.unmount=()=>{y(),(c!=this.parentNode||!this.isConnected)&&(h.cleanEffects(!0)()(),f=this.parentNode,c=null)}),this.symbolId=this.symbolId||Symbol(),this.symbolIdParent=Symbol();const h=av(()=>this.update(),this,vv(this));let p,d=!0;const m=gl(this);this.update=()=>(p||(p=!0,this.updated=(this.updated||this.mounted).then(()=>{try{const y=h.load(this._render),g=h.cleanEffects();return y&&y.render(this,this.symbolId,m),p=!1,d&&!h.isSuspense()&&(d=!1,!m&&Sv(this)),g()}finally{p=!1}}).then(y=>{y&&y()})),this.updated),this.update()}connectedCallback(){this.mount(),super.connectedCallback&&super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),this.unmount()}attributeChangedCallback(c,f,h){if(n[c]){if(c===this._ignoreAttr||f===h)return;const{prop:p,type:d}=n[c];try{this[p]=bv(d,h)}catch{throw new fv(this,`The value defined as attr '${c}' cannot be parsed by type '${d.name}'`,h)}}else super.attributeChangedCallback(c,f,h)}static get props(){return{...super.props,...s}}static get observedAttributes(){const c=super.observedAttributes||[];for(const f in s)dv(this.prototype,f,s[f],n,r);return Object.keys(n).concat(c)}}return a};function Sv(t){const{styles:e}=t.constructor,{shadowRoot:n}=t;if(n&&e.length){const r=[];Hp(e,i=>{i&&(i instanceof Element?n.appendChild(i.cloneNode(!0)):r.push(i))}),r.length&&(n.adoptedStyleSheets=r)}}const $p=t=>(e,n)=>{li(([r,i]=[])=>((i||!i)&&(i&&Vp(i,n)?r=r||!0:(Et(r)&&r(),r=null)),[r,n]),([r,i],o)=>o?(Et(r)&&r(),[]):[r||e(),i],t)},fS=$p(Bp),Cv=$p(Lp);class Ov extends Array{constructor(e,n){let r=!0;const i=o=>{try{n(o,this,r)}finally{r=!1}};super(void 0,i,n),i(e)}}const hS=t=>{const e=lv();return li((n=new Ov(t,(r,i,o)=>{r=Et(r)?r(i[0]):r,r!==i[0]&&(i[0]=r,o||e())}))=>n)},Av=(t,e)=>{const[n]=li(([r,i,o=0]=[])=>((!i||i&&!Vp(i,e))&&(r=t()),[r,e,o]));return n},pS=(t,e)=>Av(()=>t,e),yl=ai("atomico/options");globalThis[yl]=globalThis[yl]||{sheet:!!document.adoptedStyleSheets};const Wp=globalThis[yl];new Promise(t=>{Wp.ssr||(document.readyState==="loading"?jp(document,"DOMContentLoaded",t):t())});const Ev={checked:1,value:1,selected:1},Mv={list:1,type:1,size:1,form:1,width:1,height:1,src:1,href:1,slot:1},Tv={shadowDom:1,staticNode:1,cloneNode:1,children:1,key:1},ji={},bl=[];class wl extends Text{}const Nv=ai("atomico/id"),Br=ai("atomico/type"),ws=ai("atomico/ref"),Up=ai("atomico/vnode"),Dv=()=>{};function Iv(t,e,n){return Kp(this,t,e,n)}const Jp=(t,e,...n)=>{const r=e||ji;let{children:i}=r;if(i=i??(n.length?n:bl),t===Dv)return i;const o=t?t instanceof Node?1:t.prototype instanceof HTMLElement&&2:0;if(o===!1&&t instanceof Function)return t(i!=bl?{children:i,...r}:r);const s=Wp.render||Iv;return{[Br]:Up,type:t,props:r,children:i,key:r.key,shadow:r.shadowDom,static:r.staticNode,raw:o,is:r.is,clone:r.cloneNode,render:s}};function Kp(t,e,n=Nv,r,i){let o;if(e&&e[n]&&e[n].vnode==t||t[Br]!=Up)return e;(t||!e)&&(i=i||t.type=="svg",o=t.type!="host"&&(t.raw==1?(e&&t.clone?e[ws]:e)!=t.type:t.raw==2?!(e instanceof t.type):e?e[ws]||e.localName!=t.type:!e),o&&t.type!=null&&(t.raw==1&&t.clone?(r=!0,e=t.type.cloneNode(!0),e[ws]=t.type):e=t.raw==1?t.type:t.raw==2?new t.type:i?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type,t.is?{is:t.is}:void 0)));const s=e[n]?e[n]:ji,{vnode:l=ji,cycle:a=0}=s;let{fragment:u,handlers:c}=s;const{children:f=bl,props:h=ji}=l;if(c=o?{}:c||{},t.static&&!o)return e;if(t.shadow&&!e.shadowRoot&&e.attachShadow({mode:"open",...t.shadow}),t.props!=h&&Pv(e,h,t.props,c,i),t.children!==f){const p=t.shadow?e.shadowRoot:e;u=zv(t.children,u,p,n,!a&&r,i&&t.type=="foreignObject"?!1:i)}return e[n]={vnode:t,handlers:c,fragment:u,cycle:a+1},e}function Rv(t,e){const n=new wl(""),r=new wl("");let i;if(t[e?"prepend":"append"](n),e){let{lastElementChild:o}=t;for(;o;){const{previousElementSibling:s}=o;if(gl(o,!0)&&!gl(s,!0)){i=o;break}o=s}}return i?i.before(r):t.append(r),{markStart:n,markEnd:r}}function zv(t,e,n,r,i,o){t=t==null?null:uv(t)?t:[t];const s=e||Rv(n,i),{markStart:l,markEnd:a,keyes:u}=s;let c;const f=u&&new Set;let h=l;if(t&&Hp(t,p=>{if(typeof p=="object"&&!p[Br])return;const d=p[Br]&&p.key,m=u&&d!=null&&u.get(d);h!=a&&h===m?f.delete(h):h=h==a?a:h.nextSibling;const y=u?m:h;let g=y;if(p[Br])g=Kp(p,y,r,i,o);else{const _=p+"";!(g instanceof Text)||g instanceof wl?g=new Text(_):g.data!=_&&(g.data=_)}g!=h&&(u&&f.delete(g),!y||u?(n.insertBefore(g,h),u&&h!=a&&f.add(h)):y==a?n.insertBefore(g,a):(n.replaceChild(g,y),h=g)),d!=null&&(c=c||new Map,c.set(d,g))}),h=h==a?a:h.nextSibling,e&&h!=a)for(;h!=a;){const p=h;h=h.nextSibling,p.remove()}return f&&f.forEach(p=>p.remove()),s.keyes=c,s}function Pv(t,e,n,r,i){for(const o in e)!(o in n)&&zc(t,o,e[o],null,i,r);for(const o in n)zc(t,o,e[o],n[o],i,r)}function zc(t,e,n,r,i,o){if(e=e=="class"&&!i?"className":e,n=n??null,r=r??null,e in t&&Ev[e]&&(n=t[e]),!(r===n||Tv[e]||e[0]=="_"))if(t.localName==="slot"&&e==="assignNode"&&"assign"in t)t.assign(r);else if(e[0]=="o"&&e[1]=="n"&&(Et(r)||Et(n)))Fv(t,e.slice(2),r,o);else if(e=="ref")r&&(Et(r)?r(t):r.current=t);else if(e=="style"){const{style:s}=t;n=n||"",r=r||"";const l=Fr(n),a=Fr(r);if(l)for(const u in n)if(a)!(u in r)&&Pc(s,u,null);else break;if(a)for(const u in r){const c=r[u];l&&n[u]===c||Pc(s,u,c)}else s.cssText=r}else{const s=e[0]=="$"?e.slice(1):e;s===e&&(!i&&!Mv[e]&&e in t||Et(r)||Et(n))?t[e]=r??"":r==null?t.removeAttribute(s):t.setAttribute(s,Fr(r)?JSON.stringify(r):r)}}function Fv(t,e,n,r){if(r.handleEvent||(r.handleEvent=i=>r[i.type].call(t,i)),n){if(!r[e]){const i=n.capture||n.once||n.passive?Object.assign({},n):null;t.addEventListener(e,r,i)}r[e]=n}else r[e]&&(t.removeEventListener(e,r),delete r[e])}function Pc(t,e,n){let r="setProperty";n==null&&(r="removeProperty",n=null),~e.indexOf("-")?t[r](e,n):t[e]=n}const Bv=Jp("host",{style:"display: contents"}),Lv="value",Vv=(t,e)=>{const n=sv(),r=ov();Cv(()=>jp(n.current,"ConnectContext",i=>{i.composedPath().at(0)!==i.currentTarget&&t===i.detail.id&&(i.stopPropagation(),i.detail.connect(r))}),[t]),r.current=e},Hv=t=>{const e=_v(({value:n})=>(Vv(e,n),Bv),{props:{value:{type:Object,value:()=>t}}});return e[Lv]=t,e};Hv({dispatch(t,e){}});const jv=0,zn=1,Ei=2,Mi=3,Fc=4,Sr=5,xl=6,Yp=0,qv=2,Gp=3,Xp=4,Qp=Sr,$v=xl,Zp=(t,e,n,r)=>{let i;e[0]=0;for(let o=1;o<e.length;o++){const s=e[o++],l=e[o]?(e[0]|=s?1:2,n[e[o++]]):e[++o];s===Gp?r[0]=l:s===Xp?r[1]=Object.assign(r[1]||{},l):s===Qp?(r[1]=r[1]||{})[e[++o]]=l:s===$v?r[1][e[++o]]+=l+"":s?(i=t.apply(l,Zp(t,l,n,["",null])),r.push(i),l[0]?e[0]|=2:(e[o-2]=Yp,e[o]=i)):r.push(l)}return r},Wv=function(t){let e=zn,n="",r="",i=[0],o,s;const l=a=>{e===zn&&(a||(n=n.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?i.push(Yp,a,n):e===Mi&&(a||n)?(i.push(Gp,a,n),e=Ei):e===Ei&&n==="..."&&a?i.push(Xp,a,0):e===Ei&&n&&!a?i.push(Qp,0,!0,n):e>=Sr&&((n||!a&&e===Sr)&&(i.push(e,0,n,s),e=xl),a&&(i.push(e,a,0,s),e=xl)),n=""};for(let a=0;a<t.length;a++){a&&(e===zn&&l(),l(a));for(let u=0;u<t[a].length;u++)o=t[a][u],e===zn?o==="<"?(l(),i=[i],e=Mi):n+=o:e===Fc?n==="--"&&o===">"?(e=zn,n=""):n=o+n[0]:r?o===r?r="":n+=o:o==='"'||o==="'"?r=o:o===">"?(l(),e=zn):e&&(o==="="?(e=Sr,s=n,n=""):o==="/"&&(e<Sr||t[a][u+1]===">")?(l(),e===Mi&&(i=i[0]),e=i,(i=i[0]).push(qv,0,e),e=jv):o===" "||o===" "||o===` |
| 70 |
`||o==="\r"?(l(),e=Ei):n+=o),e===Mi&&n==="!--"&&(e=Fc,i=i[0])}return l(),i},Uv=new Map;function dS(t){let e=Uv;return e=Zp(Jp,e.get(t)||(e.set(t,e=Wv(t)),e),arguments,[]),e.length>1?e:e[0]}function ed(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=ed(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function mS(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=ed(t))&&(r&&(r+=" "),r+=e);return r}export{ar as $,e_ as A,H_ as B,f8 as C,_8 as D,qc as E,v8 as F,u8 as G,c8 as H,Zv as I,xd as J,i_ as K,Z_ as L,v_ as M,__ as N,i8 as O,n_ as P,s_ as Q,s8 as R,yo as S,E8 as T,Xv as U,P_ as V,z_ as W,o_ as X,M8 as Y,ee as Z,ur as _,C_ as a,ov as a$,j as a0,nn as a1,R8 as a2,D8 as a3,I8 as a4,N8 as a5,q8 as a6,_r as a7,$8 as a8,Wr as a9,B8 as aA,F8 as aB,X8 as aC,lS as aD,oS as aE,sS as aF,rS as aG,Nt as aH,ue as aI,iS as aJ,eS as aK,tS as aL,Q8 as aM,Z8 as aN,cr as aO,nS as aP,aS as aQ,se as aR,uS as aS,ev as aT,tv as aU,lr as aV,A8 as aW,O8 as aX,C8 as aY,_v as aZ,dS as a_,wn as aa,j8 as ab,$l as ac,uw as ad,aw as ae,Th as af,P8 as ag,W8 as ah,R as ai,Ja as aj,Ie as ak,oe as al,be as am,qt as an,M as ao,H8 as ap,V8 as aq,U8 as ar,L8 as as,X as at,$ as au,Y8 as av,K8 as aw,J8 as ax,Pl as ay,G8 as az,W_ as b,hS as b0,fS as b1,mS as b2,sv as b3,Av as b4,Gv as b5,l8 as b6,y8 as b7,z8 as b8,F_ as b9,k_ as bA,V_ as bB,$_ as bC,a8 as bD,p_ as bE,E_ as bF,r8 as bG,j_ as bH,g_ as bI,T_ as bJ,t8 as bK,L_ as bL,vh as bM,pS as bN,lv as bO,h8 as ba,u_ as bb,J_ as bc,b8 as bd,l_ as be,m_ as bf,m8 as bg,n8 as bh,w8 as bi,T8 as bj,x_ as bk,N_ as bl,R_ as bm,B_ as bn,o8 as bo,d8 as bp,U_ as bq,G_ as br,Q_ as bs,g8 as bt,y_ as bu,w_ as bv,e8 as bw,d_ as bx,X_ as by,Y_ as bz,M_ as c,S_ as d,O_ as e,r_ as f,cn as g,q_ as h,co as i,A_ as j,b_ as k,K_ as l,h_ as m,a_ as n,t_ as o,D_ as p,c_ as q,Qv as r,p8 as s,fo as t,Ln as u,x8 as v,k8 as w,f_ as x,S8 as y,I_ as z}; |
| 71 |
|