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=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({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;mW<=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"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=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()\[\]\\.,;:\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&&ce.max?i.push(He(o.messages[f].max,e.fullField,e.max)):l&&a&&(ce.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;x1)&&(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+(e1&&(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>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=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;san},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;/** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, * `reset`, `load`, `error`, and `select`. * * Borrows from Modernizr. * * @param {string} eventNameSuffix Event name, e.g. "click". * @param {?boolean} capture Check if the capture phase is supported. * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT */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{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>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(;ue&&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);oe)for(let o=0,s=0;se&&((sn)&&(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;nthis.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;ithis.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;nr.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=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;li&&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;o0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos=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=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;oe&&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;an.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;nu.createAndFill()));for(let u=0;u=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{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s"+e.indexOf(r.next[s].next);return o}).join(` `)}}_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{t[s].forEach(({term:l,to:a})=>{if(!l)return;let u;for(let c=0;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-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;nr[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-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-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;ie.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{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,` `):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(` `),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!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(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-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{if(o.length||s.marks.length){let l=0,a=0;for(;l=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-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;fc)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(;++ii?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);o0?(Ye(t,t.length,0,e),t):e}const ru={}.hasOwnProperty;function Vf(t){const e={};let n=-1;for(;++n13&&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++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;kx;){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(;++i1&&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;++n0&&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=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 ethis.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=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)):c999||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=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-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(;++n0){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 "),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(;++rs&&(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:` `,encode:["`"],...l.current()})),f()}return c+=l.move(` `),o&&(c+=l.move(o+` `)),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?" ":` `,...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":""))+")"})}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",...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\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-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:` `,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 ]|$)`},{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 *])`},{character:"*",inConstruct:"phrasing",notInConstruct:sn},{atBreak:!0,character:"+",after:`(?:[ \r ])`},{atBreak:!0,character:"-",after:`(?:[ \r -])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r ]|$)`},{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(;++s0&&(l==="\r"||l===` `)&&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 `}return` `}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=u||c+1"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={});as.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(;++e0&&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(s2){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(;++n0){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;ie)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;le)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=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;ro&&a!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;ir.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;mt.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;ct.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=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(rn;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)=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(` `))}})}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=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;r1&&(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;m1||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;m1&&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=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;n1&&(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;r0;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=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(er){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;s0&&(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(oe.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=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.pos0?0:1);i>0?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{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.curSelectionFor0}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;rr.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{let n=t.plugins;for(let r=0;r=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.size1)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{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{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=0;e--){let n=t.node(e);if(t.index(e)+1{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(` `).scrollIntoView()),!0)};function ql(t){for(let e=0;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(){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{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{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{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.poso.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",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;l127)&&(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&&e2),$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.topu.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.leftu.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=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=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=(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=(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(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-1?i:t.docView.posFromDOM(e,n,-1)}function jh(t,e,n){let r=t.childNodes.length;if(r&&n.tope.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=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=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=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;uc.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;nme(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;ne||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=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;cp&&sn){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=r:er){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{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.dirty0&&(o=rl(o,0,e,r));for(let l=0;l{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-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)||rn+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>1,s=Math.min(o,e.length);for(;i-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);l0;){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;uo;)l.push(i[s++]);let d=o+h.nodeSize;if(h.isText){let y=d;s!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=n){if(o>=r&&a.slice(r-e.length-l,r-l)==e)return r-e.length;let u=l=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=n||c<=e?o.push(a):(un&&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{(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&&r0){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{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&&s1)return o.lefti.top&&s1)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,` `);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,` `))),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=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(i1&&(o=0),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 en}).createHTML(t):t}function Sx(t){let e=/^(\s*]*>)*/.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=>"").reverse().join("")),n.innerHTML=_x(t),i)for(let o=0;o=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=e&&(!o||o(l.spec))&&r.push(l.copy(l.from+i,l.to+i))}for(let s=0;se){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{let u=a+r,c;if(c=mp(n,l,u)){for(i||(i=this.children.slice());ol&&f.to=e){this.children[l]==e&&(r=this.children[l+2]);break}let o=e+1,s=o+n.content.size;for(let l=0;lo&&a.type instanceof Kt){let u=Math.max(o,a.from)-o,c=Math.min(s,a.to)-o;ui.map(e,n,xn));return Vt.from(r)}forChild(e,n){if(n.isLeaf)return oe.empty;let r=[];for(let i=0;in instanceof oe)?e:e.reduce((n,r)=>n.concat(r instanceof oe?r:r.members),[]))}}forEachSet(e){for(let n=0;n{let y=m-d-(p-h);for(let g=0;g_+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=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;fn&&s.to{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;l0;)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;ii.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;nthis.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;cf.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)-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;ci;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()-100D(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()-100Date.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.fromt.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-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.posE(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.lastAndroidDeletee.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;cc.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;cn||fs(s,!0,!1)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=s?o-r:0;o-=a,o&&o=l?o-r:0;o-=a,o&&o=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;n0&&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;sn.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<{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){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);om;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(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=n){(o||(o=[])).push({type:"overlong_rowspan",pos:c,n:g-x});break}const S=i+x*e;for(let O=0;Or&&(o+=u.attrs.colspan)}}for(let s=0;s1&&(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;iNumber(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;ic!=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;a0||y>0){let g=d.attrs;if(m>0&&(g=An(g,0,m)),y>0&&(g=An(g,g.colspan-y,y)),p.lefti.bottom){const g={...d.attrs,rowspan:Math.min(p.bottom,i.bottom)-Math.max(p.top,i.top)};p.top0)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.bottom0&&(n=a.resolve(o+i.map[l.left])),s.bottom0)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.right0&&(n=a.resolve(o+i.map[l.top*i.width])),s.right{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=0&&!(t.after(i+1)=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{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;a0){let p="cell";c.firstChild&&(p=c.firstChild.type.spec.tableRole);const d=[];for(let y=0;y0?-1:0;T3(e,r,i+o)&&(o=i==0||i==e.width?null:0);for(let s=0;s0&&i0&&e.map[l-1]==a||i0&&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{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{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()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=0;s--){const{rowspan:l,colspan:a}=o.child(s).attrs;for(let u=i;u=e.length&&e.push(M.empty),n[i]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;pi&&(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;fe.height){const f=[];for(let d=0,m=(e.height-1)*e.width;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{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;fnew 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{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(;++s0?{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?\]}]+$/.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(;++ua&&(a=t[u].length);++yl[y])&&(l[y]=_)}d.push(g)}o[u]=d,s[u]=m}let c=-1;if(typeof n=="object"&&"length"in n)for(;++cl[c]&&(l[c]=g),h[c]=g),f[c]=_}o.splice(1,0,f),s.splice(1,0,h),u=-1;const p=[];for(;++u0&&!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(;++a1?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-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(;++nn[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=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.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 rl&&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=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;cYk&&(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;hJk&&(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[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{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;rtypeof 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(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===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"?(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")?(l(),e===Mi&&(i=i[0]),e=i,(i=i[0]).push(qv,0,e),e=jv):o===" "||o===" "||o===` `||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