| 1 |
var aa=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)};var Pn=(n,e,t)=>(aa(n,e,"read from private field"),t?t.call(n):e.get(n)),Bo=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},Vo=(n,e,t,r)=>(aa(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t);import{r as Be,d as zt,j as Ru,a3 as zu,aw as tp,n as np,u as Fu,m as Ri,s as rp,$ as ca,c as Rn,o as Pu,A as Lu,g as Al,x as z,D as F,F as P,K as M}from"./vue.js?ver=2.10.01";import{h as ip}from"./dayjs.js?ver=2.10.01";function I8(n,e){var t;const r=rp();return Ru(()=>{r.value=n()},{...e,flush:(t=e==null?void 0:e.flush)!=null?t:"sync"}),zu(r)}function cr(n){return tp()?(np(n),!0):!1}function Ue(n){return typeof n=="function"?n():Fu(n)}function op(n){if(!Ri(n))return ca(n);const e=new Proxy({},{get(t,r,i){return Fu(Reflect.get(n.value,r,i))},set(t,r,i){return Ri(n.value[r])&&!Ri(i)?n.value[r].value=i:n.value[r]=i,!0},deleteProperty(t,r){return Reflect.deleteProperty(n.value,r)},has(t,r){return Reflect.has(n.value,r)},ownKeys(){return Object.keys(n.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return ca(e)}function R8(n){return op(Rn(n))}const go=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const sp=n=>typeof n<"u",Bu=n=>n!=null,lp=Object.prototype.toString,ap=n=>lp.call(n)==="[object Object]",z8=(n,e,t)=>Math.min(t,Math.max(e,n)),ut=()=>{},cp=up();function up(){var n,e;return go&&((n=window==null?void 0:window.navigator)==null?void 0:n.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Vu(n,e){function t(...r){return new Promise((i,o)=>{Promise.resolve(n(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(i).catch(o)})}return t}function fp(n,e={}){let t,r,i=ut;const o=l=>{clearTimeout(l),i(),i=ut};return l=>{const a=Ue(n),c=Ue(e.maxWait);return t&&o(t),a<=0||c!==void 0&&c<=0?(r&&(o(r),r=null),Promise.resolve(l())):new Promise((u,f)=>{i=e.rejectOnCancel?f:u,c&&!r&&(r=setTimeout(()=>{t&&o(t),r=null,u(l())},c)),t=setTimeout(()=>{r&&o(r),r=null,u(l())},a)})}}function hp(...n){let e=0,t,r=!0,i=ut,o,s,l,a,c;!Ri(n[0])&&typeof n[0]=="object"?{delay:s,trailing:l=!0,leading:a=!0,rejectOnCancel:c=!1}=n[0]:[s,l=!0,a=!0,c=!1]=n;const u=()=>{t&&(clearTimeout(t),t=void 0,i(),i=ut)};return h=>{const d=Ue(s),p=Date.now()-e,m=()=>o=h();return u(),d<=0?(e=Date.now(),m()):(p>d&&(a||!r)?(e=Date.now(),m()):l&&(o=new Promise((y,g)=>{i=c?g:y,t=setTimeout(()=>{e=Date.now(),r=!0,y(m()),u()},Math.max(0,d-p))})),!a&&!t&&(t=setTimeout(()=>r=!0,d)),r=!1,o)}}function dp(n){return n||Al()}function pp(n,e=200,t={}){return Vu(fp(e,t),n)}function F8(n,e=200,t={}){const r=Be(n.value),i=pp(()=>{r.value=n.value},e,t);return zt(n,()=>i()),r}function P8(n,e=200,t=!1,r=!0,i=!1){return Vu(hp(e,t,r,i),n)}function Hu(n,e=!0,t){dp()?Pu(n,t):e?n():Lu(n)}function L8(n,e,t={}){const{immediate:r=!0}=t,i=Be(!1);let o=null;function s(){o&&(clearTimeout(o),o=null)}function l(){i.value=!1,s()}function a(...c){s(),i.value=!0,o=setTimeout(()=>{i.value=!1,o=null,n(...c)},Ue(e))}return r&&(i.value=!0,go&&a()),cr(l),{isPending:zu(i),start:a,stop:l}}const Pt=go?window:void 0,mp=go?window.document:void 0;function Ee(n){var e;const t=Ue(n);return(e=t==null?void 0:t.$el)!=null?e:t}function kn(...n){let e,t,r,i;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,r,i]=n,e=Pt):[e,t,r,i]=n,!e)return ut;Array.isArray(t)||(t=[t]),Array.isArray(r)||(r=[r]);const o=[],s=()=>{o.forEach(u=>u()),o.length=0},l=(u,f,h,d)=>(u.addEventListener(f,h,d),()=>u.removeEventListener(f,h,d)),a=zt(()=>[Ee(e),Ue(i)],([u,f])=>{if(s(),!u)return;const h=ap(f)?{...f}:f;o.push(...t.flatMap(d=>r.map(p=>l(u,d,p,h))))},{immediate:!0,flush:"post"}),c=()=>{a(),s()};return cr(c),c}let ua=!1;function B8(n,e,t={}){const{window:r=Pt,ignore:i=[],capture:o=!0,detectIframe:s=!1}=t;if(!r)return ut;cp&&!ua&&(ua=!0,Array.from(r.document.body.children).forEach(m=>m.addEventListener("click",ut)),r.document.documentElement.addEventListener("click",ut));let l=!0;const a=m=>Ue(i).some(y=>{if(typeof y=="string")return Array.from(r.document.querySelectorAll(y)).some(g=>g===m.target||m.composedPath().includes(g));{const g=Ee(y);return g&&(m.target===g||m.composedPath().includes(g))}});function c(m){const y=Ue(m);return y&&y.$.subTree.shapeFlag===16}function u(m,y){const g=Ue(m),v=g.$.subTree&&g.$.subTree.children;return v==null||!Array.isArray(v)?!1:v.some(x=>x.el===y.target||y.composedPath().includes(x.el))}const f=m=>{const y=Ee(n);if(m.target!=null&&!(!(y instanceof Element)&&c(n)&&u(n,m))&&!(!y||y===m.target||m.composedPath().includes(y))){if(m.detail===0&&(l=!a(m)),!l){l=!0;return}e(m)}};let h=!1;const d=[kn(r,"click",m=>{h||(h=!0,setTimeout(()=>{h=!1},0),f(m))},{passive:!0,capture:o}),kn(r,"pointerdown",m=>{const y=Ee(n);l=!a(m)&&!!(y&&!m.composedPath().includes(y))},{passive:!0}),s&&kn(r,"blur",m=>{setTimeout(()=>{var y;const g=Ee(n);((y=r.document.activeElement)==null?void 0:y.tagName)==="IFRAME"&&!(g!=null&&g.contains(r.document.activeElement))&&e(m)},0)})].filter(Boolean);return()=>d.forEach(m=>m())}function gp(){const n=Be(!1),e=Al();return e&&Pu(()=>{n.value=!0},e),n}function yo(n){const e=gp();return Rn(()=>(e.value,!!n()))}function V8(n,e,t={}){const{window:r=Pt,...i}=t;let o;const s=yo(()=>r&&"MutationObserver"in r),l=()=>{o&&(o.disconnect(),o=void 0)},a=Rn(()=>{const h=Ue(n),d=(Array.isArray(h)?h:[h]).map(Ee).filter(Bu);return new Set(d)}),c=zt(()=>a.value,h=>{l(),s.value&&h.size&&(o=new MutationObserver(e),h.forEach(d=>o.observe(d,i)))},{immediate:!0,flush:"post"}),u=()=>o==null?void 0:o.takeRecords(),f=()=>{c(),l()};return cr(f),{isSupported:s,stop:f,takeRecords:u}}function yp(n,e={}){const{window:t=Pt}=e,r=yo(()=>t&&"matchMedia"in t&&typeof t.matchMedia=="function");let i;const o=Be(!1),s=c=>{o.value=c.matches},l=()=>{i&&("removeEventListener"in i?i.removeEventListener("change",s):i.removeListener(s))},a=Ru(()=>{r.value&&(l(),i=t.matchMedia(Ue(n)),"addEventListener"in i?i.addEventListener("change",s):i.addListener(s),o.value=i.matches)});return cr(()=>{a(),l(),i=void 0}),o}function bp(n){return JSON.parse(JSON.stringify(n))}function H8(n={}){const{document:e=mp}=n;if(!e)return Be("visible");const t=Be(e.visibilityState);return kn(e,"visibilitychange",()=>{t.value=e.visibilityState}),t}function wp(n,e,t={}){const{window:r=Pt,...i}=t;let o;const s=yo(()=>r&&"ResizeObserver"in r),l=()=>{o&&(o.disconnect(),o=void 0)},a=Rn(()=>{const f=Ue(n);return Array.isArray(f)?f.map(h=>Ee(h)):[Ee(f)]}),c=zt(a,f=>{if(l(),s.value&&r){o=new ResizeObserver(e);for(const h of f)h&&o.observe(h,i)}},{immediate:!0,flush:"post"}),u=()=>{l(),c()};return cr(u),{isSupported:s,stop:u}}function $8(n,e={width:0,height:0},t={}){const{window:r=Pt,box:i="content-box"}=t,o=Rn(()=>{var f,h;return(h=(f=Ee(n))==null?void 0:f.namespaceURI)==null?void 0:h.includes("svg")}),s=Be(e.width),l=Be(e.height),{stop:a}=wp(n,([f])=>{const h=i==="border-box"?f.borderBoxSize:i==="content-box"?f.contentBoxSize:f.devicePixelContentBoxSize;if(r&&o.value){const d=Ee(n);if(d){const p=d.getBoundingClientRect();s.value=p.width,l.value=p.height}}else if(h){const d=Array.isArray(h)?h:[h];s.value=d.reduce((p,{inlineSize:m})=>p+m,0),l.value=d.reduce((p,{blockSize:m})=>p+m,0)}else s.value=f.contentRect.width,l.value=f.contentRect.height},t);Hu(()=>{const f=Ee(n);f&&(s.value="offsetWidth"in f?f.offsetWidth:e.width,l.value="offsetHeight"in f?f.offsetHeight:e.height)});const c=zt(()=>Ee(n),f=>{s.value=f?e.width:0,l.value=f?e.height:0});function u(){a(),c()}return{width:s,height:l,stop:u}}function j8(n,e,t={}){const{root:r,rootMargin:i="0px",threshold:o=0,window:s=Pt,immediate:l=!0}=t,a=yo(()=>s&&"IntersectionObserver"in s),c=Rn(()=>{const p=Ue(n);return(Array.isArray(p)?p:[p]).map(Ee).filter(Bu)});let u=ut;const f=Be(l),h=a.value?zt(()=>[c.value,Ee(r),f.value],([p,m])=>{if(u(),!f.value||!p.length)return;const y=new IntersectionObserver(e,{root:Ee(m),rootMargin:i,threshold:o});p.forEach(g=>g&&y.observe(g)),u=()=>{y.disconnect(),u=ut}},{immediate:l,flush:"post"}):ut,d=()=>{u(),h(),f.value=!1};return cr(d),{isSupported:a,isActive:f,pause(){u(),f.value=!1},resume(){f.value=!0},stop:d}}function q8(n,e,t,r={}){var i,o,s;const{clone:l=!1,passive:a=!1,eventName:c,deep:u=!1,defaultValue:f,shouldEmit:h}=r,d=Al(),p=t||(d==null?void 0:d.emit)||((i=d==null?void 0:d.$emit)==null?void 0:i.bind(d))||((s=(o=d==null?void 0:d.proxy)==null?void 0:o.$emit)==null?void 0:s.bind(d==null?void 0:d.proxy));let m=c;e||(e="modelValue"),m=m||`update:${e.toString()}`;const y=x=>l?typeof l=="function"?l(x):bp(x):x,g=()=>sp(n[e])?y(n[e]):f,v=x=>{h?h(x)&&p(m,x):p(m,x)};if(a){const x=g(),C=Be(x);let O=!1;return zt(()=>n[e],k=>{O||(O=!0,C.value=y(k),Lu(()=>O=!1))}),zt(C,k=>{!O&&(k!==n[e]||u)&&v(k)},{deep:u}),C}else return Rn({get(){return g()},set(x){v(x)}})}function W8(n={}){const{window:e=Pt}=n;if(!e)return Be(!1);const t=Be(e.document.hasFocus());return kn(e,"blur",()=>{t.value=!1}),kn(e,"focus",()=>{t.value=!0}),t}function U8(n={}){const{window:e=Pt,initialWidth:t=Number.POSITIVE_INFINITY,initialHeight:r=Number.POSITIVE_INFINITY,listenOrientation:i=!0,includeScrollbar:o=!0,type:s="inner"}=n,l=Be(t),a=Be(r),c=()=>{e&&(s==="outer"?(l.value=e.outerWidth,a.value=e.outerHeight):o?(l.value=e.innerWidth,a.value=e.innerHeight):(l.value=e.document.documentElement.clientWidth,a.value=e.document.documentElement.clientHeight))};if(c(),Hu(c),kn("resize",c,{passive:!0}),i){const u=yp("(orientation: portrait)");zt(u,()=>c())}return{width:l,height:a}}var Fe="top",rt="bottom",it="right",Pe="left",Ol="auto",ei=[Fe,rt,it,Pe],Xn="start",$r="end",xp="clippingParents",$u="viewport",wr="popper",kp="reference",fa=ei.reduce(function(n,e){return n.concat([e+"-"+Xn,e+"-"+$r])},[]),ju=[].concat(ei,[Ol]).reduce(function(n,e){return n.concat([e,e+"-"+Xn,e+"-"+$r])},[]),Sp="beforeRead",vp="read",Cp="afterRead",Ap="beforeMain",Op="main",Mp="afterMain",Ep="beforeWrite",_p="write",Tp="afterWrite",Np=[Sp,vp,Cp,Ap,Op,Mp,Ep,_p,Tp];function St(n){return n?(n.nodeName||"").toLowerCase():null}function mt(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var e=n.ownerDocument;return e&&e.defaultView||window}return n}function Qn(n){var e=mt(n).Element;return n instanceof e||n instanceof Element}function et(n){var e=mt(n).HTMLElement;return n instanceof e||n instanceof HTMLElement}function Ml(n){if(typeof ShadowRoot>"u")return!1;var e=mt(n).ShadowRoot;return n instanceof e||n instanceof ShadowRoot}function Dp(n){var e=n.state;Object.keys(e.elements).forEach(function(t){var r=e.styles[t]||{},i=e.attributes[t]||{},o=e.elements[t];!et(o)||!St(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 Ip(n){var e=n.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.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]:t[r]),l=s.reduce(function(a,c){return a[c]="",a},{});!et(i)||!St(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(a){i.removeAttribute(a)}))})}}var qu={name:"applyStyles",enabled:!0,phase:"write",fn:Dp,effect:Ip,requires:["computeStyles"]};function kt(n){return n.split("-")[0]}var Sn=Math.max,Ki=Math.min,Zn=Math.round;function er(n,e){e===void 0&&(e=!1);var t=n.getBoundingClientRect(),r=1,i=1;if(et(n)&&e){var o=n.offsetHeight,s=n.offsetWidth;s>0&&(r=Zn(t.width)/s||1),o>0&&(i=Zn(t.height)/o||1)}return{width:t.width/r,height:t.height/i,top:t.top/i,right:t.right/r,bottom:t.bottom/i,left:t.left/r,x:t.left/r,y:t.top/i}}function El(n){var e=er(n),t=n.offsetWidth,r=n.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:n.offsetLeft,y:n.offsetTop,width:t,height:r}}function Wu(n,e){var t=e.getRootNode&&e.getRootNode();if(n.contains(e))return!0;if(t&&Ml(t)){var r=e;do{if(r&&n.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ft(n){return mt(n).getComputedStyle(n)}function Rp(n){return["table","td","th"].indexOf(St(n))>=0}function sn(n){return((Qn(n)?n.ownerDocument:n.document)||window.document).documentElement}function bo(n){return St(n)==="html"?n:n.assignedSlot||n.parentNode||(Ml(n)?n.host:null)||sn(n)}function ha(n){return!et(n)||Ft(n).position==="fixed"?null:n.offsetParent}function zp(n){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,t=navigator.userAgent.indexOf("Trident")!==-1;if(t&&et(n)){var r=Ft(n);if(r.position==="fixed")return null}var i=bo(n);for(Ml(i)&&(i=i.host);et(i)&&["html","body"].indexOf(St(i))<0;){var o=Ft(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 ti(n){for(var e=mt(n),t=ha(n);t&&Rp(t)&&Ft(t).position==="static";)t=ha(t);return t&&(St(t)==="html"||St(t)==="body"&&Ft(t).position==="static")?e:t||zp(n)||e}function _l(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function Er(n,e,t){return Sn(n,Ki(e,t))}function Fp(n,e,t){var r=Er(n,e,t);return r>t?t:r}function Uu(){return{top:0,right:0,bottom:0,left:0}}function Ju(n){return Object.assign({},Uu(),n)}function Ku(n,e){return e.reduce(function(t,r){return t[r]=n,t},{})}var Pp=function(n,e){return n=typeof n=="function"?n(Object.assign({},e.rects,{placement:e.placement})):n,Ju(typeof n!="number"?n:Ku(n,ei))};function Lp(n){var e,t=n.state,r=n.name,i=n.options,o=t.elements.arrow,s=t.modifiersData.popperOffsets,l=kt(t.placement),a=_l(l),c=[Pe,it].indexOf(l)>=0,u=c?"height":"width";if(!(!o||!s)){var f=Pp(i.padding,t),h=El(o),d=a==="y"?Fe:Pe,p=a==="y"?rt:it,m=t.rects.reference[u]+t.rects.reference[a]-s[a]-t.rects.popper[u],y=s[a]-t.rects.reference[a],g=ti(o),v=g?a==="y"?g.clientHeight||0:g.clientWidth||0:0,x=m/2-y/2,C=f[d],O=v-h[u]-f[p],k=v/2-h[u]/2+x,I=Er(C,k,O),L=a;t.modifiersData[r]=(e={},e[L]=I,e.centerOffset=I-k,e)}}function Bp(n){var e=n.state,t=n.options,r=t.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||!Wu(e.elements.popper,i)||(e.elements.arrow=i))}var Vp={name:"arrow",enabled:!0,phase:"main",fn:Lp,effect:Bp,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function tr(n){return n.split("-")[1]}var Hp={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $p(n){var e=n.x,t=n.y,r=window,i=r.devicePixelRatio||1;return{x:Zn(e*i)/i||0,y:Zn(t*i)/i||0}}function da(n){var e,t=n.popper,r=n.popperRect,i=n.placement,o=n.variation,s=n.offsets,l=n.position,a=n.gpuAcceleration,c=n.adaptive,u=n.roundOffsets,f=n.isFixed,h=s.x,d=h===void 0?0:h,p=s.y,m=p===void 0?0:p,y=typeof u=="function"?u({x:d,y:m}):{x:d,y:m};d=y.x,m=y.y;var g=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),x=Pe,C=Fe,O=window;if(c){var k=ti(t),I="clientHeight",L="clientWidth";if(k===mt(t)&&(k=sn(t),Ft(k).position!=="static"&&l==="absolute"&&(I="scrollHeight",L="scrollWidth")),k=k,i===Fe||(i===Pe||i===it)&&o===$r){C=rt;var E=f&&k===O&&O.visualViewport?O.visualViewport.height:k[I];m-=E-r.height,m*=a?1:-1}if(i===Pe||(i===Fe||i===rt)&&o===$r){x=it;var S=f&&k===O&&O.visualViewport?O.visualViewport.width:k[L];d-=S-r.width,d*=a?1:-1}}var T=Object.assign({position:l},c&&Hp),D=u===!0?$p({x:d,y:m}):{x:d,y:m};if(d=D.x,m=D.y,a){var B;return Object.assign({},T,(B={},B[C]=v?"0":"",B[x]=g?"0":"",B.transform=(O.devicePixelRatio||1)<=1?"translate("+d+"px, "+m+"px)":"translate3d("+d+"px, "+m+"px, 0)",B))}return Object.assign({},T,(e={},e[C]=v?m+"px":"",e[x]=g?d+"px":"",e.transform="",e))}function jp(n){var e=n.state,t=n.options,r=t.gpuAcceleration,i=r===void 0?!0:r,o=t.adaptive,s=o===void 0?!0:o,l=t.roundOffsets,a=l===void 0?!0:l,c={placement:kt(e.placement),variation:tr(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,da(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:a})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,da(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var Yu={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:jp,data:{}},bi={passive:!0};function qp(n){var e=n.state,t=n.instance,r=n.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,l=s===void 0?!0:s,a=mt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",t.update,bi)}),l&&a.addEventListener("resize",t.update,bi),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",t.update,bi)}),l&&a.removeEventListener("resize",t.update,bi)}}var Gu={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:qp,data:{}},Wp={left:"right",right:"left",bottom:"top",top:"bottom"};function zi(n){return n.replace(/left|right|bottom|top/g,function(e){return Wp[e]})}var Up={start:"end",end:"start"};function pa(n){return n.replace(/start|end/g,function(e){return Up[e]})}function Tl(n){var e=mt(n),t=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:t,scrollTop:r}}function Nl(n){return er(sn(n)).left+Tl(n).scrollLeft}function Jp(n){var e=mt(n),t=sn(n),r=e.visualViewport,i=t.clientWidth,o=t.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+Nl(n),y:l}}function Kp(n){var e,t=sn(n),r=Tl(n),i=(e=n.ownerDocument)==null?void 0:e.body,o=Sn(t.scrollWidth,t.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Sn(t.scrollHeight,t.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+Nl(n),a=-r.scrollTop;return Ft(i||t).direction==="rtl"&&(l+=Sn(t.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:l,y:a}}function Dl(n){var e=Ft(n),t=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+i+r)}function Xu(n){return["html","body","#document"].indexOf(St(n))>=0?n.ownerDocument.body:et(n)&&Dl(n)?n:Xu(bo(n))}function _r(n,e){var t;e===void 0&&(e=[]);var r=Xu(n),i=r===((t=n.ownerDocument)==null?void 0:t.body),o=mt(r),s=i?[o].concat(o.visualViewport||[],Dl(r)?r:[]):r,l=e.concat(s);return i?l:l.concat(_r(bo(s)))}function Cs(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function Yp(n){var e=er(n);return e.top=e.top+n.clientTop,e.left=e.left+n.clientLeft,e.bottom=e.top+n.clientHeight,e.right=e.left+n.clientWidth,e.width=n.clientWidth,e.height=n.clientHeight,e.x=e.left,e.y=e.top,e}function ma(n,e){return e===$u?Cs(Jp(n)):Qn(e)?Yp(e):Cs(Kp(sn(n)))}function Gp(n){var e=_r(bo(n)),t=["absolute","fixed"].indexOf(Ft(n).position)>=0,r=t&&et(n)?ti(n):n;return Qn(r)?e.filter(function(i){return Qn(i)&&Wu(i,r)&&St(i)!=="body"}):[]}function Xp(n,e,t){var r=e==="clippingParents"?Gp(n):[].concat(e),i=[].concat(r,[t]),o=i[0],s=i.reduce(function(l,a){var c=ma(n,a);return l.top=Sn(c.top,l.top),l.right=Ki(c.right,l.right),l.bottom=Ki(c.bottom,l.bottom),l.left=Sn(c.left,l.left),l},ma(n,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Qu(n){var e=n.reference,t=n.element,r=n.placement,i=r?kt(r):null,o=r?tr(r):null,s=e.x+e.width/2-t.width/2,l=e.y+e.height/2-t.height/2,a;switch(i){case Fe:a={x:s,y:e.y-t.height};break;case rt:a={x:s,y:e.y+e.height};break;case it:a={x:e.x+e.width,y:l};break;case Pe:a={x:e.x-t.width,y:l};break;default:a={x:e.x,y:e.y}}var c=i?_l(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case Xn:a[c]=a[c]-(e[u]/2-t[u]/2);break;case $r:a[c]=a[c]+(e[u]/2-t[u]/2);break}}return a}function jr(n,e){e===void 0&&(e={});var t=e,r=t.placement,i=r===void 0?n.placement:r,o=t.boundary,s=o===void 0?xp:o,l=t.rootBoundary,a=l===void 0?$u:l,c=t.elementContext,u=c===void 0?wr:c,f=t.altBoundary,h=f===void 0?!1:f,d=t.padding,p=d===void 0?0:d,m=Ju(typeof p!="number"?p:Ku(p,ei)),y=u===wr?kp:wr,g=n.rects.popper,v=n.elements[h?y:u],x=Xp(Qn(v)?v:v.contextElement||sn(n.elements.popper),s,a),C=er(n.elements.reference),O=Qu({reference:C,element:g,strategy:"absolute",placement:i}),k=Cs(Object.assign({},g,O)),I=u===wr?k:C,L={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=n.modifiersData.offset;if(u===wr&&E){var S=E[i];Object.keys(L).forEach(function(T){var D=[it,rt].indexOf(T)>=0?1:-1,B=[Fe,rt].indexOf(T)>=0?"y":"x";L[T]+=S[B]*D})}return L}function Qp(n,e){e===void 0&&(e={});var t=e,r=t.placement,i=t.boundary,o=t.rootBoundary,s=t.padding,l=t.flipVariations,a=t.allowedAutoPlacements,c=a===void 0?ju:a,u=tr(r),f=u?l?fa:fa.filter(function(p){return tr(p)===u}):ei,h=f.filter(function(p){return c.indexOf(p)>=0});h.length===0&&(h=f);var d=h.reduce(function(p,m){return p[m]=jr(n,{placement:m,boundary:i,rootBoundary:o,padding:s})[kt(m)],p},{});return Object.keys(d).sort(function(p,m){return d[p]-d[m]})}function Zp(n){if(kt(n)===Ol)return[];var e=zi(n);return[pa(n),e,pa(e)]}function e0(n){var e=n.state,t=n.options,r=n.name;if(!e.modifiersData[r]._skip){for(var i=t.mainAxis,o=i===void 0?!0:i,s=t.altAxis,l=s===void 0?!0:s,a=t.fallbackPlacements,c=t.padding,u=t.boundary,f=t.rootBoundary,h=t.altBoundary,d=t.flipVariations,p=d===void 0?!0:d,m=t.allowedAutoPlacements,y=e.options.placement,g=kt(y),v=g===y,x=a||(v||!p?[zi(y)]:Zp(y)),C=[y].concat(x).reduce(function(ce,de){return ce.concat(kt(de)===Ol?Qp(e,{placement:de,boundary:u,rootBoundary:f,padding:c,flipVariations:p,allowedAutoPlacements:m}):de)},[]),O=e.rects.reference,k=e.rects.popper,I=new Map,L=!0,E=C[0],S=0;S<C.length;S++){var T=C[S],D=kt(T),B=tr(T)===Xn,W=[Fe,rt].indexOf(D)>=0,j=W?"width":"height",J=jr(e,{placement:T,boundary:u,rootBoundary:f,altBoundary:h,padding:c}),K=W?B?it:Pe:B?rt:Fe;O[j]>k[j]&&(K=zi(K));var re=zi(K),ne=[];if(o&&ne.push(J[D]<=0),l&&ne.push(J[K]<=0,J[re]<=0),ne.every(function(ce){return ce})){E=T,L=!1;break}I.set(T,ne)}if(L)for(var b=p?3:1,ve=function(ce){var de=C.find(function(ie){var st=I.get(ie);if(st)return st.slice(0,ce).every(function(Ae){return Ae})});if(de)return E=de,"break"},Ce=b;Ce>0;Ce--){var w=ve(Ce);if(w==="break")break}e.placement!==E&&(e.modifiersData[r]._skip=!0,e.placement=E,e.reset=!0)}}var t0={name:"flip",enabled:!0,phase:"main",fn:e0,requiresIfExists:["offset"],data:{_skip:!1}};function ga(n,e,t){return t===void 0&&(t={x:0,y:0}),{top:n.top-e.height-t.y,right:n.right-e.width+t.x,bottom:n.bottom-e.height+t.y,left:n.left-e.width-t.x}}function ya(n){return[Fe,it,rt,Pe].some(function(e){return n[e]>=0})}function n0(n){var e=n.state,t=n.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,s=jr(e,{elementContext:"reference"}),l=jr(e,{altBoundary:!0}),a=ga(s,r),c=ga(l,i,o),u=ya(a),f=ya(c);e.modifiersData[t]={referenceClippingOffsets:a,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}var r0={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:n0};function i0(n,e,t){var r=kt(n),i=[Pe,Fe].indexOf(r)>=0?-1:1,o=typeof t=="function"?t(Object.assign({},e,{placement:n})):t,s=o[0],l=o[1];return s=s||0,l=(l||0)*i,[Pe,it].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function o0(n){var e=n.state,t=n.options,r=n.name,i=t.offset,o=i===void 0?[0,0]:i,s=ju.reduce(function(u,f){return u[f]=i0(f,e.rects,o),u},{}),l=s[e.placement],a=l.x,c=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=a,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=s}var s0={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:o0};function l0(n){var e=n.state,t=n.name;e.modifiersData[t]=Qu({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var Zu={name:"popperOffsets",enabled:!0,phase:"read",fn:l0,data:{}};function a0(n){return n==="x"?"y":"x"}function c0(n){var e=n.state,t=n.options,r=n.name,i=t.mainAxis,o=i===void 0?!0:i,s=t.altAxis,l=s===void 0?!1:s,a=t.boundary,c=t.rootBoundary,u=t.altBoundary,f=t.padding,h=t.tether,d=h===void 0?!0:h,p=t.tetherOffset,m=p===void 0?0:p,y=jr(e,{boundary:a,rootBoundary:c,padding:f,altBoundary:u}),g=kt(e.placement),v=tr(e.placement),x=!v,C=_l(g),O=a0(C),k=e.modifiersData.popperOffsets,I=e.rects.reference,L=e.rects.popper,E=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,S=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 B,W=C==="y"?Fe:Pe,j=C==="y"?rt:it,J=C==="y"?"height":"width",K=k[C],re=K+y[W],ne=K-y[j],b=d?-L[J]/2:0,ve=v===Xn?I[J]:L[J],Ce=v===Xn?-L[J]:-I[J],w=e.elements.arrow,ce=d&&w?El(w):{width:0,height:0},de=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Uu(),ie=de[W],st=de[j],Ae=Er(0,I[J],ce[J]),Vt=x?I[J]/2-b-Ae-ie-S.mainAxis:ve-Ae-ie-S.mainAxis,Ht=x?-I[J]/2+b+Ae+st+S.mainAxis:Ce+Ae+st+S.mainAxis,$t=e.elements.arrow&&ti(e.elements.arrow),Fo=$t?C==="y"?$t.clientTop||0:$t.clientLeft||0:0,hi=(B=T==null?void 0:T[C])!=null?B:0,Po=K+Vt-hi-Fo,di=K+Ht-hi,pr=Er(d?Ki(re,Po):re,K,d?Sn(ne,di):ne);k[C]=pr,D[C]=pr-K}if(l){var mr,Lo=C==="x"?Fe:Pe,pi=C==="x"?rt:it,gt=k[O],zn=O==="y"?"height":"width",mi=gt+y[Lo],gi=gt-y[pi],gr=[Fe,Pe].indexOf(g)!==-1,yi=(mr=T==null?void 0:T[O])!=null?mr:0,A=gr?mi:gt-I[zn]-L[zn]-yi+S.altAxis,N=gr?gt+I[zn]+L[zn]-yi-S.altAxis:gi,H=d&&gr?Fp(A,gt,N):Er(d?A:mi,gt,d?N:gi);k[O]=H,D[O]=H-gt}e.modifiersData[r]=D}}var u0={name:"preventOverflow",enabled:!0,phase:"main",fn:c0,requiresIfExists:["offset"]};function f0(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function h0(n){return n===mt(n)||!et(n)?Tl(n):f0(n)}function d0(n){var e=n.getBoundingClientRect(),t=Zn(e.width)/n.offsetWidth||1,r=Zn(e.height)/n.offsetHeight||1;return t!==1||r!==1}function p0(n,e,t){t===void 0&&(t=!1);var r=et(e),i=et(e)&&d0(e),o=sn(e),s=er(n,i),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(r||!r&&!t)&&((St(e)!=="body"||Dl(o))&&(l=h0(e)),et(e)?(a=er(e,!0),a.x+=e.clientLeft,a.y+=e.clientTop):o&&(a.x=Nl(o))),{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function m0(n){var e=new Map,t=new Set,r=[];n.forEach(function(o){e.set(o.name,o)});function i(o){t.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!t.has(l)){var a=e.get(l);a&&i(a)}}),r.push(o)}return n.forEach(function(o){t.has(o.name)||i(o)}),r}function g0(n){var e=m0(n);return Np.reduce(function(t,r){return t.concat(e.filter(function(i){return i.phase===r}))},[])}function y0(n){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(n())})})),e}}function b0(n){var e=n.reduce(function(t,r){var i=t[r.name];return t[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,t},{});return Object.keys(e).map(function(t){return e[t]})}var ba={placement:"bottom",modifiers:[],strategy:"absolute"};function wa(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function Il(n){n===void 0&&(n={});var e=n,t=e.defaultModifiers,r=t===void 0?[]:t,i=e.defaultOptions,o=i===void 0?ba:i;return function(s,l,a){a===void 0&&(a=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},ba,o),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},u=[],f=!1,h={state:c,setOptions:function(m){var y=typeof m=="function"?m(c.options):m;p(),c.options=Object.assign({},o,c.options,y),c.scrollParents={reference:Qn(s)?_r(s):s.contextElement?_r(s.contextElement):[],popper:_r(l)};var g=g0(b0([].concat(r,c.options.modifiers)));return c.orderedModifiers=g.filter(function(v){return v.enabled}),d(),h.update()},forceUpdate:function(){if(!f){var m=c.elements,y=m.reference,g=m.popper;if(wa(y,g)){c.rects={reference:p0(y,ti(g),c.options.strategy==="fixed"),popper:El(g)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(L){return c.modifiersData[L.name]=Object.assign({},L.data)});for(var v=0;v<c.orderedModifiers.length;v++){if(c.reset===!0){c.reset=!1,v=-1;continue}var x=c.orderedModifiers[v],C=x.fn,O=x.options,k=O===void 0?{}:O,I=x.name;typeof C=="function"&&(c=C({state:c,options:k,name:I,instance:h})||c)}}}},update:y0(function(){return new Promise(function(m){h.forceUpdate(),m(c)})}),destroy:function(){p(),f=!0}};if(!wa(s,l))return h;h.setOptions(a).then(function(m){!f&&a.onFirstUpdate&&a.onFirstUpdate(m)});function d(){c.orderedModifiers.forEach(function(m){var y=m.name,g=m.options,v=g===void 0?{}:g,x=m.effect;if(typeof x=="function"){var C=x({state:c,name:y,instance:h,options:v}),O=function(){};u.push(C||O)}})}function p(){u.forEach(function(m){return m()}),u=[]}return h}}Il();var w0=[Gu,Zu,Yu,qu];Il({defaultModifiers:w0});var x0=[Gu,Zu,Yu,qu,s0,t0,u0,Vp,r0],J8=Il({defaultModifiers:x0});const xa=Math.min,Tr=Math.max,Yi=Math.round,nn=n=>({x:n,y:n}),k0={left:"right",right:"left",bottom:"top",top:"bottom"},S0={start:"end",end:"start"};function Rl(n,e){return typeof n=="function"?n(e):n}function nr(n){return n.split("-")[0]}function wo(n){return n.split("-")[1]}function v0(n){return n==="x"?"y":"x"}function ef(n){return n==="y"?"height":"width"}function qr(n){return["top","bottom"].includes(nr(n))?"y":"x"}function tf(n){return v0(qr(n))}function C0(n,e,t){t===void 0&&(t=!1);const r=wo(n),i=tf(n),o=ef(i);let s=i==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=Gi(s)),[s,Gi(s)]}function A0(n){const e=Gi(n);return[As(n),e,As(e)]}function As(n){return n.replace(/start|end/g,e=>S0[e])}function O0(n,e,t){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(n){case"top":case"bottom":return t?e?i:r:e?r:i;case"left":case"right":return e?o:s;default:return[]}}function M0(n,e,t,r){const i=wo(n);let o=O0(nr(n),t==="start",r);return i&&(o=o.map(s=>s+"-"+i),e&&(o=o.concat(o.map(As)))),o}function Gi(n){return n.replace(/left|right|bottom|top/g,e=>k0[e])}function E0(n){return{top:0,right:0,bottom:0,left:0,...n}}function _0(n){return typeof n!="number"?E0(n):{top:n,right:n,bottom:n,left:n}}function Xi(n){const{x:e,y:t,width:r,height:i}=n;return{width:r,height:i,top:t,left:e,right:e+r,bottom:t+i,x:e,y:t}}function ka(n,e,t){let{reference:r,floating:i}=n;const o=qr(e),s=tf(e),l=ef(s),a=nr(e),c=o==="y",u=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 d;switch(a){case"top":d={x:u,y:r.y-i.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-i.width,y:f};break;default:d={x:r.x,y:r.y}}switch(wo(e)){case"start":d[s]-=h*(t&&c?-1:1);break;case"end":d[s]+=h*(t&&c?-1:1);break}return d}const T0=async(n,e,t)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=t,l=o.filter(Boolean),a=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:n,floating:e,strategy:i}),{x:u,y:f}=ka(c,r,a),h=r,d={},p=0;for(let m=0;m<l.length;m++){const{name:y,fn:g}=l[m],{x:v,y:x,data:C,reset:O}=await g({x:u,y:f,initialPlacement:r,placement:h,strategy:i,middlewareData:d,rects:c,platform:s,elements:{reference:n,floating:e}});u=v??u,f=x??f,d={...d,[y]:{...d[y],...C}},O&&p<=50&&(p++,typeof O=="object"&&(O.placement&&(h=O.placement),O.rects&&(c=O.rects===!0?await s.getElementRects({reference:n,floating:e,strategy:i}):O.rects),{x:u,y:f}=ka(c,h,a)),m=-1)}return{x:u,y:f,placement:h,strategy:i,middlewareData:d}};async function N0(n,e){var t;e===void 0&&(e={});const{x:r,y:i,platform:o,rects:s,elements:l,strategy:a}=n,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=Rl(e,n),p=_0(d),y=l[h?f==="floating"?"reference":"floating":f],g=Xi(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(y)))==null||t?y:y.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:a})),v=f==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,x=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),C=await(o.isElement==null?void 0:o.isElement(x))?await(o.getScale==null?void 0:o.getScale(x))||{x:1,y:1}:{x:1,y:1},O=Xi(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:x,strategy:a}):v);return{top:(g.top-O.top+p.top)/C.y,bottom:(O.bottom-g.bottom+p.bottom)/C.y,left:(g.left-O.left+p.left)/C.x,right:(O.right-g.right+p.right)/C.x}}const D0=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(e){var t,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:l,platform:a,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...y}=Rl(n,e);if((t=o.arrow)!=null&&t.alignmentOffset)return{};const g=nr(i),v=qr(l),x=nr(l)===l,C=await(a.isRTL==null?void 0:a.isRTL(c.floating)),O=h||(x||!m?[Gi(l)]:A0(l)),k=p!=="none";!h&&k&&O.push(...M0(l,m,p,C));const I=[l,...O],L=await N0(e,y),E=[];let S=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&E.push(L[g]),f){const W=C0(i,s,C);E.push(L[W[0]],L[W[1]])}if(S=[...S,{placement:i,overflows:E}],!E.every(W=>W<=0)){var T,D;const W=(((T=o.flip)==null?void 0:T.index)||0)+1,j=I[W];if(j)return{data:{index:W,overflows:S},reset:{placement:j}};let J=(D=S.filter(K=>K.overflows[0]<=0).sort((K,re)=>K.overflows[1]-re.overflows[1])[0])==null?void 0:D.placement;if(!J)switch(d){case"bestFit":{var B;const K=(B=S.filter(re=>{if(k){const ne=qr(re.placement);return ne===v||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:B[0];K&&(J=K);break}case"initialPlacement":J=l;break}if(i!==J)return{reset:{placement:J}}}return{}}}};async function I0(n,e){const{placement:t,platform:r,elements:i}=n,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=nr(t),l=wo(t),a=qr(t)==="y",c=["left","top"].includes(s)?-1:1,u=o&&a?-1:1,f=Rl(e,n);let{mainAxis:h,crossAxis:d,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return l&&typeof p=="number"&&(d=l==="end"?p*-1:p),a?{x:d*u,y:h*c}:{x:h*c,y:d*u}}const R0=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var t,r;const{x:i,y:o,placement:s,middlewareData:l}=e,a=await I0(e,n);return s===((t=l.offset)==null?void 0:t.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+a.x,y:o+a.y,data:{...a,placement:s}}}}};function ur(n){return nf(n)?(n.nodeName||"").toLowerCase():"#document"}function Je(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function ln(n){var e;return(e=(nf(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function nf(n){return n instanceof Node||n instanceof Je(n).Node}function ht(n){return n instanceof Element||n instanceof Je(n).Element}function vt(n){return n instanceof HTMLElement||n instanceof Je(n).HTMLElement}function Sa(n){return typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Je(n).ShadowRoot}function ni(n){const{overflow:e,overflowX:t,overflowY:r,display:i}=dt(n);return/auto|scroll|overlay|hidden|clip/.test(e+r+t)&&!["inline","contents"].includes(i)}function z0(n){return["table","td","th"].includes(ur(n))}function xo(n){return[":popover-open",":modal"].some(e=>{try{return n.matches(e)}catch{return!1}})}function zl(n){const e=Fl(),t=ht(n)?dt(n):n;return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(t.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(t.contain||"").includes(r))}function F0(n){let e=rn(n);for(;vt(e)&&!rr(e);){if(zl(e))return e;if(xo(e))return null;e=rn(e)}return null}function Fl(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function rr(n){return["html","body","#document"].includes(ur(n))}function dt(n){return Je(n).getComputedStyle(n)}function ko(n){return ht(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function rn(n){if(ur(n)==="html")return n;const e=n.assignedSlot||n.parentNode||Sa(n)&&n.host||ln(n);return Sa(e)?e.host:e}function rf(n){const e=rn(n);return rr(e)?n.ownerDocument?n.ownerDocument.body:n.body:vt(e)&&ni(e)?e:rf(e)}function Os(n,e,t){var r;e===void 0&&(e=[]),t===void 0&&(t=!0);const i=rf(n),o=i===((r=n.ownerDocument)==null?void 0:r.body),s=Je(i);if(o){const l=Ms(s);return e.concat(s,s.visualViewport||[],ni(i)?i:[],l&&t?Os(l):[])}return e.concat(i,Os(i,[],t))}function Ms(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function of(n){const e=dt(n);let t=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=vt(n),o=i?n.offsetWidth:t,s=i?n.offsetHeight:r,l=Yi(t)!==o||Yi(r)!==s;return l&&(t=o,r=s),{width:t,height:r,$:l}}function sf(n){return ht(n)?n:n.contextElement}function Un(n){const e=sf(n);if(!vt(e))return nn(1);const t=e.getBoundingClientRect(),{width:r,height:i,$:o}=of(e);let s=(o?Yi(t.width):t.width)/r,l=(o?Yi(t.height):t.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const P0=nn(0);function lf(n){const e=Je(n);return!Fl()||!e.visualViewport?P0:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function L0(n,e,t){return e===void 0&&(e=!1),!t||e&&t!==Je(n)?!1:e}function Wr(n,e,t,r){e===void 0&&(e=!1),t===void 0&&(t=!1);const i=n.getBoundingClientRect(),o=sf(n);let s=nn(1);e&&(r?ht(r)&&(s=Un(r)):s=Un(n));const l=L0(o,t,r)?lf(o):nn(0);let a=(i.left+l.x)/s.x,c=(i.top+l.y)/s.y,u=i.width/s.x,f=i.height/s.y;if(o){const h=Je(o),d=r&&ht(r)?Je(r):r;let p=h,m=Ms(p);for(;m&&r&&d!==p;){const y=Un(m),g=m.getBoundingClientRect(),v=dt(m),x=g.left+(m.clientLeft+parseFloat(v.paddingLeft))*y.x,C=g.top+(m.clientTop+parseFloat(v.paddingTop))*y.y;a*=y.x,c*=y.y,u*=y.x,f*=y.y,a+=x,c+=C,p=Je(m),m=Ms(p)}}return Xi({width:u,height:f,x:a,y:c})}function B0(n){let{elements:e,rect:t,offsetParent:r,strategy:i}=n;const o=i==="fixed",s=ln(r),l=e?xo(e.floating):!1;if(r===s||l&&o)return t;let a={scrollLeft:0,scrollTop:0},c=nn(1);const u=nn(0),f=vt(r);if((f||!f&&!o)&&((ur(r)!=="body"||ni(s))&&(a=ko(r)),vt(r))){const h=Wr(r);c=Un(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-a.scrollLeft*c.x+u.x,y:t.y*c.y-a.scrollTop*c.y+u.y}}function V0(n){return Array.from(n.getClientRects())}function af(n){return Wr(ln(n)).left+ko(n).scrollLeft}function H0(n){const e=ln(n),t=ko(n),r=n.ownerDocument.body,i=Tr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=Tr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-t.scrollLeft+af(n);const l=-t.scrollTop;return dt(r).direction==="rtl"&&(s+=Tr(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:l}}function $0(n,e){const t=Je(n),r=ln(n),i=t.visualViewport;let o=r.clientWidth,s=r.clientHeight,l=0,a=0;if(i){o=i.width,s=i.height;const c=Fl();(!c||c&&e==="fixed")&&(l=i.offsetLeft,a=i.offsetTop)}return{width:o,height:s,x:l,y:a}}function j0(n,e){const t=Wr(n,!0,e==="fixed"),r=t.top+n.clientTop,i=t.left+n.clientLeft,o=vt(n)?Un(n):nn(1),s=n.clientWidth*o.x,l=n.clientHeight*o.y,a=i*o.x,c=r*o.y;return{width:s,height:l,x:a,y:c}}function va(n,e,t){let r;if(e==="viewport")r=$0(n,t);else if(e==="document")r=H0(ln(n));else if(ht(e))r=j0(e,t);else{const i=lf(n);r={...e,x:e.x-i.x,y:e.y-i.y}}return Xi(r)}function cf(n,e){const t=rn(n);return t===e||!ht(t)||rr(t)?!1:dt(t).position==="fixed"||cf(t,e)}function q0(n,e){const t=e.get(n);if(t)return t;let r=Os(n,[],!1).filter(l=>ht(l)&&ur(l)!=="body"),i=null;const o=dt(n).position==="fixed";let s=o?rn(n):n;for(;ht(s)&&!rr(s);){const l=dt(s),a=zl(s);!a&&l.position==="fixed"&&(i=null),(o?!a&&!i:!a&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||ni(s)&&!a&&cf(n,s))?r=r.filter(u=>u!==s):i=l,s=rn(s)}return e.set(n,r),r}function W0(n){let{element:e,boundary:t,rootBoundary:r,strategy:i}=n;const s=[...t==="clippingAncestors"?xo(e)?[]:q0(e,this._c):[].concat(t),r],l=s[0],a=s.reduce((c,u)=>{const f=va(e,u,i);return c.top=Tr(f.top,c.top),c.right=xa(f.right,c.right),c.bottom=xa(f.bottom,c.bottom),c.left=Tr(f.left,c.left),c},va(e,l,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function U0(n){const{width:e,height:t}=of(n);return{width:e,height:t}}function J0(n,e,t){const r=vt(e),i=ln(e),o=t==="fixed",s=Wr(n,!0,o,e);let l={scrollLeft:0,scrollTop:0};const a=nn(0);if(r||!r&&!o)if((ur(e)!=="body"||ni(i))&&(l=ko(e)),r){const f=Wr(e,!0,o,e);a.x=f.x+e.clientLeft,a.y=f.y+e.clientTop}else i&&(a.x=af(i));const c=s.left+l.scrollLeft-a.x,u=s.top+l.scrollTop-a.y;return{x:c,y:u,width:s.width,height:s.height}}function Ho(n){return dt(n).position==="static"}function Ca(n,e){return!vt(n)||dt(n).position==="fixed"?null:e?e(n):n.offsetParent}function uf(n,e){const t=Je(n);if(xo(n))return t;if(!vt(n)){let i=rn(n);for(;i&&!rr(i);){if(ht(i)&&!Ho(i))return i;i=rn(i)}return t}let r=Ca(n,e);for(;r&&z0(r)&&Ho(r);)r=Ca(r,e);return r&&rr(r)&&Ho(r)&&!zl(r)?t:r||F0(n)||t}const K0=async function(n){const e=this.getOffsetParent||uf,t=this.getDimensions,r=await t(n.floating);return{reference:J0(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Y0(n){return dt(n).direction==="rtl"}const G0={convertOffsetParentRelativeRectToViewportRelativeRect:B0,getDocumentElement:ln,getClippingRect:W0,getOffsetParent:uf,getElementRects:K0,getClientRects:V0,getDimensions:U0,getScale:Un,isElement:ht,isRTL:Y0},K8=R0,Y8=D0,G8=(n,e,t)=>{const r=new Map,i={platform:G0,...t},o={...i.platform,_c:r};return T0(n,e,{...i,platform:o})};/*! Element Plus Icons Vue v2.3.2 */var X0=z({name:"AlarmClock",__name:"alarm-clock",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"}),M("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"})]))}}),X8=X0,Q0=z({name:"ArrowDown",__name:"arrow-down",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.59 30.59 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.59 30.59 0 0 0-42.752 0z"})]))}}),Q8=Q0,Z0=z({name:"ArrowLeftBold",__name:"arrow-left-bold",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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 0"})]))}}),Z8=Z0,em=z({name:"ArrowLeft",__name:"arrow-left",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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.59 30.59 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.59 30.59 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0"})]))}}),eS=em,tm=z({name:"ArrowRightBold",__name:"arrow-right-bold",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M338.752 104.704a64 64 0 0 0 0 90.496l316.8 316.8-316.8 316.8a64 64 0 0 0 90.496 90.496l362.048-362.048a64 64 0 0 0 0-90.496L429.248 104.704a64 64 0 0 0-90.496 0"})]))}}),tS=tm,nm=z({name:"ArrowRight",__name:"arrow-right",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M340.864 149.312a30.59 30.59 0 0 0 0 42.752L652.736 512 340.864 831.872a30.59 30.59 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"})]))}}),nS=nm,rm=z({name:"ArrowUp",__name:"arrow-up",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),rS=rm,im=z({name:"Avatar",__name:"avatar",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M628.736 528.896A416 416 0 0 1 928 928H96a415.87 415.87 0 0 1 299.264-399.104L512 704zM720 304a208 208 0 1 1-416 0 208 208 0 0 1 416 0"})]))}}),iS=im,om=z({name:"Back",__name:"back",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),M("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"})]))}}),oS=om,sm=z({name:"Baseball",__name:"baseball",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M195.2 828.8a448 448 0 1 1 633.6-633.6 448 448 0 0 1-633.6 633.6m45.248-45.248a384 384 0 1 0 543.104-543.104 384 384 0 0 0-543.104 543.104"}),M("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.896M108.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 1737 1737 0 0 1-11.392-65.728"})]))}}),sS=sm,lm=z({name:"Bell",__name:"bell",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M512 64a64 64 0 0 1 64 64v64H448v-64a64 64 0 0 1 64-64"}),M("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"}),M("path",{fill:"currentColor",d:"M96 768h832q32 0 32 32t-32 32H96q-32 0-32-32t32-32m352 128h128a64 64 0 0 1-128 0"})]))}}),lS=lm,am=z({name:"Bottom",__name:"bottom",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),aS=am,cm=z({name:"Calendar",__name:"calendar",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),cS=cm,um=z({name:"CameraFilled",__name:"camera-filled",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),uS=um,fm=z({name:"ChatDotRound",__name:"chat-dot-round",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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.06 461.06 0 0 1-206.912-48.384l-175.616 58.56z"}),M("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"})]))}}),fS=fm,hm=z({name:"ChatDotSquare",__name:"chat-dot-square",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"}),M("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.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"})]))}}),hS=hm,dm=z({name:"Check",__name:"check",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),dS=dm,pm=z({name:"CircleCheckFilled",__name:"circle-check-filled",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),pS=pm,mm=z({name:"CircleCheck",__name:"circle-check",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"}),M("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.752z"})]))}}),mS=mm,gm=z({name:"CircleCloseFilled",__name:"circle-close-filled",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),gS=gm,ym=z({name:"CircleClose",__name:"circle-close",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"}),M("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"})]))}}),yS=ym,bm=z({name:"Clock",__name:"clock",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"}),M("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),M("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),bS=bm,wm=z({name:"CloseBold",__name:"close-bold",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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.496"})]))}}),wS=wm,xm=z({name:"Close",__name:"close",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),xS=xm,km=z({name:"Comment",__name:"comment",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),kS=km,Sm=z({name:"CopyDocument",__name:"copy-document",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"}),M("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"})]))}}),SS=Sm,vm=z({name:"DArrowLeft",__name:"d-arrow-left",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.59 30.59 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.59 30.59 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.672zm256 0a29.12 29.12 0 0 1 41.728 0 30.59 30.59 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.59 30.59 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.672z"})]))}}),vS=vm,Cm=z({name:"DArrowRight",__name:"d-arrow-right",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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.59 30.59 0 0 1 0-42.752L764.736 512 452.864 192a30.59 30.59 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.59 30.59 0 0 1 0-42.752L508.736 512 196.864 192a30.59 30.59 0 0 1 0-42.688"})]))}}),CS=Cm,Am=z({name:"DeleteFilled",__name:"delete-filled",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),AS=Am,Om=z({name:"Delete",__name:"delete",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),OS=Om,Mm=z({name:"Document",__name:"document",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),MS=Mm,Em=z({name:"Download",__name:"download",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),ES=Em,_m=z({name:"EditPen",__name:"edit-pen",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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-112zM104.32 708.8l384-665.024 304.768 175.936L409.152 884.8h.064l-248.448 78.336zm384 254.272v-64h448v64z"})]))}}),_S=_m,Tm=z({name:"Edit",__name:"edit",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"}),M("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"})]))}}),TS=Tm,Nm=z({name:"Expand",__name:"expand",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M128 192h768v128H128zm0 256h512v128H128zm0 256h768v128H128zm576-352 192 160-192 128z"})]))}}),NS=Nm,Dm=z({name:"FullScreen",__name:"full-screen",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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-64zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}}),DS=Dm,Im=z({name:"Guide",__name:"guide",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"}),M("path",{fill:"currentColor",d:"m220.8 256-71.232 80 71.168 80H768V256zm-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.2zm-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"})]))}}),IS=Im,Rm=z({name:"Hide",__name:"hide",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4s-12.8-9.6-22.4-9.6-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 176S0 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.4s3.2 16 9.6 22.4 12.8 9.6 22.4 9.6 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4m-646.4 528Q115.2 579.2 76.8 512q43.2-72 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.4m140.8-96Q352 555.2 352 512c0-44.8 16-83.2 48-112s67.2-48 112-48c28.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.6q-43.2 72-153.6 172.8c-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-176S1024 528 1024 512s-48.001-73.6-134.401-176"}),M("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 112s-67.2 48-112 48"})]))}}),RS=Rm,zm=z({name:"HomeFilled",__name:"home-filled",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M512 128 128 447.936V896h255.936V640H640v256h255.936V447.936z"})]))}}),zS=zm,Fm=z({name:"InfoFilled",__name:"info-filled",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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.99 12.99 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"})]))}}),FS=Fm,Pm=z({name:"Iphone",__name:"iphone",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),PS=Pm,Lm=z({name:"Link",__name:"link",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),LS=Lm,Bm=z({name:"Loading",__name:"loading",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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.248m452.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.248M828.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 0"})]))}}),BS=Bm,Vm=z({name:"Lock",__name:"lock",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"}),M("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"})]))}}),VS=Vm,Hm=z({name:"Memo",__name:"memo",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",viewBox:"0 0 1024 1024"},[M("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"}),M("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"}),M("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"})]))}}),HS=Hm,$m=z({name:"Message",__name:"message",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"}),M("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 224z"})]))}}),$S=$m,jm=z({name:"Money",__name:"money",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M256 640v192h640V384H768v-64h150.976c14.272 0 19.456 1.472 24.64 4.288a29.06 29.06 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.06 29.06 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.06 29.06 0 0 1-12.16-12.096c-2.688-5.184-4.224-10.368-4.224-24.576V640z"}),M("path",{fill:"currentColor",d:"M768 192H128v448h640zm64-22.976v493.952c0 14.272-1.472 19.456-4.288 24.64a29.06 29.06 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.06 29.06 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.06 29.06 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.06 29.06 0 0 1 12.16 12.096c2.752 5.184 4.224 10.368 4.224 24.64z"}),M("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"})]))}}),jS=jm,qm=z({name:"MoreFilled",__name:"more-filled",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),qS=qm,Wm=z({name:"More",__name:"more",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),WS=Wm,Um=z({name:"Notebook",__name:"notebook",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"}),M("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"})]))}}),US=Um,Jm=z({name:"Notification",__name:"notification",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"}),M("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"})]))}}),JS=Jm,Km=z({name:"Operation",__name:"operation",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),KS=Km,Ym=z({name:"PictureFilled",__name:"picture-filled",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),YS=Ym,Gm=z({name:"Picture",__name:"picture",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"}),M("path",{fill:"currentColor",d:"M384 288q64 0 64 64t-64 64-64-64 64-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"})]))}}),GS=Gm,Xm=z({name:"Plus",__name:"plus",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),XS=Xm,Qm=z({name:"Postcard",__name:"postcard",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"}),M("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"})]))}}),QS=Qm,Zm=z({name:"Reading",__name:"reading",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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.36"}),M("path",{fill:"currentColor",d:"M480 192h64v704h-64z"})]))}}),ZS=Zm,e1=z({name:"RefreshLeft",__name:"refresh-left",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),ev=e1,t1=z({name:"RefreshRight",__name:"refresh-right",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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.88"})]))}}),tv=t1,n1=z({name:"ScaleToOriginal",__name:"scale-to-original",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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.12 30.12 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.12 30.12 0 0 0-30.118-30.118m-361.412 0a30.12 30.12 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.12 30.12 0 0 0-30.118-30.118M512 361.412a30.12 30.12 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.12 30.12 0 0 0 512 361.412M512 512a30.12 30.12 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.12 30.12 0 0 0 512 512"})]))}}),nv=n1,r1=z({name:"Search",__name:"search",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),rv=r1,i1=z({name:"SuccessFilled",__name:"success-filled",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),iv=i1,o1=z({name:"Tickets",__name:"tickets",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),ov=o1,s1=z({name:"Timer",__name:"timer",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"}),M("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"}),M("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"})]))}}),sv=s1,l1=z({name:"TopRight",__name:"top-right",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M768 256H353.6a32 32 0 1 1 0-64H800a32 32 0 0 1 32 32v448a32 32 0 0 1-64 0z"}),M("path",{fill:"currentColor",d:"M777.344 201.344a32 32 0 0 1 45.312 45.312l-544 544a32 32 0 0 1-45.312-45.312z"})]))}}),lv=l1,a1=z({name:"Top",__name:"top",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),av=a1,c1=z({name:"UploadFilled",__name:"upload-filled",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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.81 239.81 0 0 1 512 192a239.87 239.87 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"})]))}}),cv=c1,u1=z({name:"User",__name:"user",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),uv=u1,f1=z({name:"VideoPlay",__name:"video-play",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),fv=f1,h1=z({name:"View",__name:"view",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),hv=h1,d1=z({name:"WarningFilled",__name:"warning-filled",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 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"})]))}}),dv=d1,p1=z({name:"ZoomIn",__name:"zoom-in",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),pv=p1,m1=z({name:"ZoomOut",__name:"zoom-out",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("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"})]))}}),mv=m1;function gn(){return gn=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},gn.apply(this,arguments)}function g1(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,Ur(n,e)}function Es(n){return Es=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Es(n)}function Ur(n,e){return Ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Ur(n,e)}function y1(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Fi(n,e,t){return y1()?Fi=Reflect.construct.bind():Fi=function(i,o,s){var l=[null];l.push.apply(l,o);var a=Function.bind.apply(i,l),c=new a;return s&&Ur(c,s.prototype),c},Fi.apply(null,arguments)}function b1(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function _s(n){var e=typeof Map=="function"?new Map:void 0;return _s=function(r){if(r===null||!b1(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 Fi(r,arguments,Es(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Ur(i,r)},_s(n)}var w1=/%[sdj%]/g,x1=function(){};typeof process<"u"&&process.env;function Ts(n){if(!n||!n.length)return null;var e={};return n.forEach(function(t){var r=t.field;e[r]=e[r]||[],e[r].push(t)}),e}function We(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];var i=0,o=t.length;if(typeof n=="function")return n.apply(null,t);if(typeof n=="string"){var s=n.replace(w1,function(l){if(l==="%%")return"%";if(i>=o)return l;switch(l){case"%s":return String(t[i++]);case"%d":return Number(t[i++]);case"%j":try{return JSON.stringify(t[i++])}catch{return"[Circular]"}break;default:return l}});return s}return n}function k1(n){return n==="string"||n==="url"||n==="hex"||n==="email"||n==="date"||n==="pattern"}function fe(n,e){return!!(n==null||e==="array"&&Array.isArray(n)&&!n.length||k1(e)&&typeof n=="string"&&!n)}function S1(n,e,t){var r=[],i=0,o=n.length;function s(l){r.push.apply(r,l||[]),i++,i===o&&t(r)}n.forEach(function(l){e(l,s)})}function Aa(n,e,t){var r=0,i=n.length;function o(s){if(s&&s.length){t(s);return}var l=r;r=r+1,l<i?e(n[l],o):t([])}o([])}function v1(n){var e=[];return Object.keys(n).forEach(function(t){e.push.apply(e,n[t]||[])}),e}var Oa=function(n){g1(e,n);function e(t,r){var i;return i=n.call(this,"Async Validation Error")||this,i.errors=t,i.fields=r,i}return e}(_s(Error));function C1(n,e,t,r,i){if(e.first){var o=new Promise(function(h,d){var p=function(g){return r(g),g.length?d(new Oa(g,Ts(g))):h(i)},m=v1(n);Aa(m,t,p)});return o.catch(function(h){return h}),o}var s=e.firstFields===!0?Object.keys(n):e.firstFields||[],l=Object.keys(n),a=l.length,c=0,u=[],f=new Promise(function(h,d){var p=function(y){if(u.push.apply(u,y),c++,c===a)return r(u),u.length?d(new Oa(u,Ts(u))):h(i)};l.length||(r(u),h(i)),l.forEach(function(m){var y=n[m];s.indexOf(m)!==-1?Aa(y,t,p):S1(y,t,p)})});return f.catch(function(h){return h}),f}function A1(n){return!!(n&&n.message!==void 0)}function O1(n,e){for(var t=n,r=0;r<e.length;r++){if(t==null)return t;t=t[e[r]]}return t}function Ma(n,e){return function(t){var r;return n.fullFields?r=O1(e,n.fullFields):r=e[t.field||n.fullField],A1(t)?(t.field=t.field||n.fullField,t.fieldValue=r,t):{message:typeof t=="function"?t():t,fieldValue:r,field:t.field||n.fullField}}}function Ea(n,e){if(e){for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];typeof r=="object"&&typeof n[t]=="object"?n[t]=gn({},n[t],r):n[t]=r}}return n}var ff=function(e,t,r,i,o,s){e.required&&(!r.hasOwnProperty(e.field)||fe(t,s||e.type))&&i.push(We(o.messages.required,e.fullField))},M1=function(e,t,r,i,o){(/^\s+$/.test(t)||t==="")&&i.push(We(o.messages.whitespace,e.fullField))},wi,E1=function(){if(wi)return wi;var n="[a-fA-F\\d:]",e=function(C){return C&&C.includeBoundaries?"(?:(?<=\\s|^)(?="+n+")|(?<="+n+")(?=\\s|$))":""},t="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",i=(` |
| 2 |
(?: |
| 3 |
(?:`+r+":){7}(?:"+r+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 |
| 4 |
(?:`+r+":){6}(?:"+t+"|:"+r+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4 |
| 5 |
(?:`+r+":){5}(?::"+t+"|(?::"+r+`){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4 |
| 6 |
(?:`+r+":){4}(?:(?::"+r+"){0,1}:"+t+"|(?::"+r+`){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4 |
| 7 |
(?:`+r+":){3}(?:(?::"+r+"){0,2}:"+t+"|(?::"+r+`){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4 |
| 8 |
(?:`+r+":){2}(?:(?::"+r+"){0,3}:"+t+"|(?::"+r+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4 |
| 9 |
(?:`+r+":){1}(?:(?::"+r+"){0,4}:"+t+"|(?::"+r+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 |
| 10 |
(?::(?:(?::`+r+"){0,5}:"+t+"|(?::"+r+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4 |
| 11 |
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1 |
| 12 |
`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),o=new RegExp("(?:^"+t+"$)|(?:^"+i+"$)"),s=new RegExp("^"+t+"$"),l=new RegExp("^"+i+"$"),a=function(C){return C&&C.exact?o:new RegExp("(?:"+e(C)+t+e(C)+")|(?:"+e(C)+i+e(C)+")","g")};a.v4=function(x){return x&&x.exact?s:new RegExp(""+e(x)+t+e(x),"g")},a.v6=function(x){return x&&x.exact?l:new RegExp(""+e(x)+i+e(x),"g")};var c="(?:(?:[a-z]+:)?//)",u="(?:\\S+(?::\\S*)?@)?",f=a.v4().source,h=a.v6().source,d="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",p="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",m="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",y="(?::\\d{2,5})?",g='(?:[/?#][^\\s"]*)?',v="(?:"+c+"|www\\.)"+u+"(?:localhost|"+f+"|"+h+"|"+d+p+m+")"+y+g;return wi=new RegExp("(?:^"+v+"$)","i"),wi},_a={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Sr={integer:function(e){return Sr.number(e)&&parseInt(e,10)===e},float:function(e){return Sr.number(e)&&!Sr.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"&&!Sr.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(_a.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(E1())},hex:function(e){return typeof e=="string"&&!!e.match(_a.hex)}},_1=function(e,t,r,i,o){if(e.required&&t===void 0){ff(e,t,r,i,o);return}var s=["integer","float","array","regexp","object","method","email","number","date","url","hex"],l=e.type;s.indexOf(l)>-1?Sr[l](t)||i.push(We(o.messages.types[l],e.fullField,e.type)):l&&typeof t!==e.type&&i.push(We(o.messages.types[l],e.fullField,e.type))},T1=function(e,t,r,i,o){var s=typeof e.len=="number",l=typeof e.min=="number",a=typeof e.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=t,f=null,h=typeof t=="number",d=typeof t=="string",p=Array.isArray(t);if(h?f="number":d?f="string":p&&(f="array"),!f)return!1;p&&(u=t.length),d&&(u=t.replace(c,"_").length),s?u!==e.len&&i.push(We(o.messages[f].len,e.fullField,e.len)):l&&!a&&u<e.min?i.push(We(o.messages[f].min,e.fullField,e.min)):a&&!l&&u>e.max?i.push(We(o.messages[f].max,e.fullField,e.max)):l&&a&&(u<e.min||u>e.max)&&i.push(We(o.messages[f].range,e.fullField,e.min,e.max))},Ln="enum",N1=function(e,t,r,i,o){e[Ln]=Array.isArray(e[Ln])?e[Ln]:[],e[Ln].indexOf(t)===-1&&i.push(We(o.messages[Ln],e.fullField,e[Ln].join(", ")))},D1=function(e,t,r,i,o){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||i.push(We(o.messages.pattern.mismatch,e.fullField,t,e.pattern));else if(typeof e.pattern=="string"){var s=new RegExp(e.pattern);s.test(t)||i.push(We(o.messages.pattern.mismatch,e.fullField,t,e.pattern))}}},Y={required:ff,whitespace:M1,type:_1,range:T1,enum:N1,pattern:D1},I1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(fe(t,"string")&&!e.required)return r();Y.required(e,t,i,s,o,"string"),fe(t,"string")||(Y.type(e,t,i,s,o),Y.range(e,t,i,s,o),Y.pattern(e,t,i,s,o),e.whitespace===!0&&Y.whitespace(e,t,i,s,o))}r(s)},R1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(fe(t)&&!e.required)return r();Y.required(e,t,i,s,o),t!==void 0&&Y.type(e,t,i,s,o)}r(s)},z1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(t===""&&(t=void 0),fe(t)&&!e.required)return r();Y.required(e,t,i,s,o),t!==void 0&&(Y.type(e,t,i,s,o),Y.range(e,t,i,s,o))}r(s)},F1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(fe(t)&&!e.required)return r();Y.required(e,t,i,s,o),t!==void 0&&Y.type(e,t,i,s,o)}r(s)},P1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(fe(t)&&!e.required)return r();Y.required(e,t,i,s,o),fe(t)||Y.type(e,t,i,s,o)}r(s)},L1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(fe(t)&&!e.required)return r();Y.required(e,t,i,s,o),t!==void 0&&(Y.type(e,t,i,s,o),Y.range(e,t,i,s,o))}r(s)},B1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(fe(t)&&!e.required)return r();Y.required(e,t,i,s,o),t!==void 0&&(Y.type(e,t,i,s,o),Y.range(e,t,i,s,o))}r(s)},V1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(t==null&&!e.required)return r();Y.required(e,t,i,s,o,"array"),t!=null&&(Y.type(e,t,i,s,o),Y.range(e,t,i,s,o))}r(s)},H1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(fe(t)&&!e.required)return r();Y.required(e,t,i,s,o),t!==void 0&&Y.type(e,t,i,s,o)}r(s)},$1="enum",j1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(fe(t)&&!e.required)return r();Y.required(e,t,i,s,o),t!==void 0&&Y[$1](e,t,i,s,o)}r(s)},q1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(fe(t,"string")&&!e.required)return r();Y.required(e,t,i,s,o),fe(t,"string")||Y.pattern(e,t,i,s,o)}r(s)},W1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(fe(t,"date")&&!e.required)return r();if(Y.required(e,t,i,s,o),!fe(t,"date")){var a;t instanceof Date?a=t:a=new Date(t),Y.type(e,a,i,s,o),a&&Y.range(e,a.getTime(),i,s,o)}}r(s)},U1=function(e,t,r,i,o){var s=[],l=Array.isArray(t)?"array":typeof t;Y.required(e,t,i,s,o,l),r(s)},$o=function(e,t,r,i,o){var s=e.type,l=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(fe(t,s)&&!e.required)return r();Y.required(e,t,i,l,o,s),fe(t,s)||Y.type(e,t,i,l,o)}r(l)},J1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(fe(t)&&!e.required)return r();Y.required(e,t,i,s,o)}r(s)},Nr={string:I1,method:R1,number:z1,boolean:F1,regexp:P1,integer:L1,float:B1,array:V1,object:H1,enum:j1,pattern:q1,date:W1,url:$o,hex:$o,email:$o,required:U1,any:J1};function Ns(){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 Ds=Ns(),So=function(){function n(t){this.rules=null,this._messages=Ds,this.define(t)}var e=n.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=Ea(Ns(),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,c=o;if(typeof a=="function"&&(c=a,a={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(null,l),Promise.resolve(l);function u(m){var y=[],g={};function v(C){if(Array.isArray(C)){var O;y=(O=y).concat.apply(O,C)}else y.push(C)}for(var x=0;x<m.length;x++)v(m[x]);y.length?(g=Ts(y),c(y,g)):c(null,l)}if(a.messages){var f=this.messages();f===Ds&&(f=Ns()),Ea(f,a.messages),a.messages=f}else a.messages=this.messages();var h={},d=a.keys||Object.keys(this.rules);d.forEach(function(m){var y=s.rules[m],g=l[m];y.forEach(function(v){var x=v;typeof x.transform=="function"&&(l===r&&(l=gn({},l)),g=l[m]=x.transform(g)),typeof x=="function"?x={validator:x}:x=gn({},x),x.validator=s.getValidationMethod(x),x.validator&&(x.field=m,x.fullField=x.fullField||m,x.type=s.getType(x),h[m]=h[m]||[],h[m].push({rule:x,value:g,source:l,field:m}))})});var p={};return C1(h,a,function(m,y){var g=m.rule,v=(g.type==="object"||g.type==="array")&&(typeof g.fields=="object"||typeof g.defaultField=="object");v=v&&(g.required||!g.required&&m.value),g.field=m.field;function x(k,I){return gn({},I,{fullField:g.fullField+"."+k,fullFields:g.fullFields?[].concat(g.fullFields,[k]):[k]})}function C(k){k===void 0&&(k=[]);var I=Array.isArray(k)?k:[k];!a.suppressWarning&&I.length&&n.warning("async-validator:",I),I.length&&g.message!==void 0&&(I=[].concat(g.message));var L=I.map(Ma(g,l));if(a.first&&L.length)return p[g.field]=1,y(L);if(!v)y(L);else{if(g.required&&!m.value)return g.message!==void 0?L=[].concat(g.message).map(Ma(g,l)):a.error&&(L=[a.error(g,We(a.messages.required,g.field))]),y(L);var E={};g.defaultField&&Object.keys(m.value).map(function(D){E[D]=g.defaultField}),E=gn({},E,m.rule.fields);var S={};Object.keys(E).forEach(function(D){var B=E[D],W=Array.isArray(B)?B:[B];S[D]=W.map(x.bind(null,D))});var T=new n(S);T.messages(a.messages),m.rule.options&&(m.rule.options.messages=a.messages,m.rule.options.error=a.error),T.validate(m.value,m.rule.options||a,function(D){var B=[];L&&L.length&&B.push.apply(B,L),D&&D.length&&B.push.apply(B,D),y(B.length?B:null)})}}var O;if(g.asyncValidator)O=g.asyncValidator(g,m.value,C,m.source,a);else if(g.validator){try{O=g.validator(g,m.value,C,m.source,a)}catch(k){console.error==null||console.error(k),a.suppressValidatorError||setTimeout(function(){throw k},0),C(k.message)}O===!0?C():O===!1?C(typeof g.message=="function"?g.message(g.fullField||g.field):g.message||(g.fullField||g.field)+" fails"):O instanceof Array?C(O):O instanceof Error&&C(O.message)}O&&O.then&&O.then(function(){return C()},function(k){return C(k)})},function(m){u(m)},l)},e.getType=function(r){if(r.type===void 0&&r.pattern instanceof RegExp&&(r.type="pattern"),typeof r.validator!="function"&&r.type&&!Nr.hasOwnProperty(r.type))throw new Error(We("Unknown rule type %s",r.type));return r.type||"string"},e.getValidationMethod=function(r){if(typeof r.validator=="function")return r.validator;var i=Object.keys(r),o=i.indexOf("message");return o!==-1&&i.splice(o,1),i.length===1&&i[0]==="required"?Nr.required:Nr[this.getType(r)]||void 0},n}();So.register=function(e,t){if(typeof t!="function")throw new Error("Cannot register a validator by type, validator is not a function");Nr[e]=t};So.warning=x1;So.messages=Ds;So.validators=Nr;function ye(n,e){K1(n)&&(n="100%");const t=Y1(n);return n=e===360?n:Math.min(e,Math.max(0,parseFloat(n))),t&&(n=parseInt(String(n*e),10)/100),Math.abs(n-e)<1e-6?1:(e===360?n=(n<0?n%e+e:n%e)/parseFloat(String(e)):n=n%e/parseFloat(String(e)),n)}function xi(n){return Math.min(1,Math.max(0,n))}function K1(n){return typeof n=="string"&&n.indexOf(".")!==-1&&parseFloat(n)===1}function Y1(n){return typeof n=="string"&&n.indexOf("%")!==-1}function hf(n){return n=parseFloat(n),(isNaN(n)||n<0||n>1)&&(n=1),n}function ki(n){return Number(n)<=1?`${Number(n)*100}%`:n}function yn(n){return n.length===1?"0"+n:String(n)}function G1(n,e,t){return{r:ye(n,255)*255,g:ye(e,255)*255,b:ye(t,255)*255}}function Ta(n,e,t){n=ye(n,255),e=ye(e,255),t=ye(t,255);const r=Math.max(n,e,t),i=Math.min(n,e,t);let o=0,s=0;const l=(r+i)/2;if(r===i)s=0,o=0;else{const a=r-i;switch(s=l>.5?a/(2-r-i):a/(r+i),r){case n:o=(e-t)/a+(e<t?6:0);break;case e:o=(t-n)/a+2;break;case t:o=(n-e)/a+4;break}o/=6}return{h:o,s,l}}function jo(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*(6*t):t<1/2?e:t<2/3?n+(e-n)*(2/3-t)*6:n}function X1(n,e,t){let r,i,o;if(n=ye(n,360),e=ye(e,100),t=ye(t,100),e===0)i=t,o=t,r=t;else{const s=t<.5?t*(1+e):t+e-t*e,l=2*t-s;r=jo(l,s,n+1/3),i=jo(l,s,n),o=jo(l,s,n-1/3)}return{r:r*255,g:i*255,b:o*255}}function Na(n,e,t){n=ye(n,255),e=ye(e,255),t=ye(t,255);const r=Math.max(n,e,t),i=Math.min(n,e,t);let o=0;const s=r,l=r-i,a=r===0?0:l/r;if(r===i)o=0;else{switch(r){case n:o=(e-t)/l+(e<t?6:0);break;case e:o=(t-n)/l+2;break;case t:o=(n-e)/l+4;break}o/=6}return{h:o,s:a,v:s}}function Q1(n,e,t){n=ye(n,360)*6,e=ye(e,100),t=ye(t,100);const r=Math.floor(n),i=n-r,o=t*(1-e),s=t*(1-i*e),l=t*(1-(1-i)*e),a=r%6,c=[t,s,o,o,l,t][a],u=[l,t,t,s,o,o][a],f=[o,o,l,t,t,s][a];return{r:c*255,g:u*255,b:f*255}}function Da(n,e,t,r){const i=[yn(Math.round(n).toString(16)),yn(Math.round(e).toString(16)),yn(Math.round(t).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function Z1(n,e,t,r,i){const o=[yn(Math.round(n).toString(16)),yn(Math.round(e).toString(16)),yn(Math.round(t).toString(16)),yn(tg(r))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function eg(n,e,t,r){const i=n/100,o=e/100,s=t/100,l=r/100,a=255*(1-i)*(1-l),c=255*(1-o)*(1-l),u=255*(1-s)*(1-l);return{r:a,g:c,b:u}}function Ia(n,e,t){let r=1-n/255,i=1-e/255,o=1-t/255,s=Math.min(r,i,o);return s===1?(r=0,i=0,o=0):(r=(r-s)/(1-s)*100,i=(i-s)/(1-s)*100,o=(o-s)/(1-s)*100),s*=100,{c:Math.round(r),m:Math.round(i),y:Math.round(o),k:Math.round(s)}}function tg(n){return Math.round(parseFloat(n)*255).toString(16)}function Ra(n){return je(n)/255}function je(n){return parseInt(n,16)}function ng(n){return{r:n>>16,g:(n&65280)>>8,b:n&255}}const Is={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 rg(n){let e={r:0,g:0,b:0},t=1,r=null,i=null,o=null,s=!1,l=!1;return typeof n=="string"&&(n=sg(n)),typeof n=="object"&&($e(n.r)&&$e(n.g)&&$e(n.b)?(e=G1(n.r,n.g,n.b),s=!0,l=String(n.r).substr(-1)==="%"?"prgb":"rgb"):$e(n.h)&&$e(n.s)&&$e(n.v)?(r=ki(n.s),i=ki(n.v),e=Q1(n.h,r,i),s=!0,l="hsv"):$e(n.h)&&$e(n.s)&&$e(n.l)?(r=ki(n.s),o=ki(n.l),e=X1(n.h,r,o),s=!0,l="hsl"):$e(n.c)&&$e(n.m)&&$e(n.y)&&$e(n.k)&&(e=eg(n.c,n.m,n.y,n.k),s=!0,l="cmyk"),Object.prototype.hasOwnProperty.call(n,"a")&&(t=n.a)),t=hf(t),{ok:s,format:n.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:t}}const ig="[-\\+]?\\d+%?",og="[-\\+]?\\d*\\.\\d+%?",Yt="(?:"+og+")|(?:"+ig+")",qo="[\\s|\\(]+("+Yt+")[,|\\s]+("+Yt+")[,|\\s]+("+Yt+")\\s*\\)?",Si="[\\s|\\(]+("+Yt+")[,|\\s]+("+Yt+")[,|\\s]+("+Yt+")[,|\\s]+("+Yt+")\\s*\\)?",Ye={CSS_UNIT:new RegExp(Yt),rgb:new RegExp("rgb"+qo),rgba:new RegExp("rgba"+Si),hsl:new RegExp("hsl"+qo),hsla:new RegExp("hsla"+Si),hsv:new RegExp("hsv"+qo),hsva:new RegExp("hsva"+Si),cmyk:new RegExp("cmyk"+Si),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 sg(n){if(n=n.trim().toLowerCase(),n.length===0)return!1;let e=!1;if(Is[n])n=Is[n],e=!0;else if(n==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let t=Ye.rgb.exec(n);return t?{r:t[1],g:t[2],b:t[3]}:(t=Ye.rgba.exec(n),t?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Ye.hsl.exec(n),t?{h:t[1],s:t[2],l:t[3]}:(t=Ye.hsla.exec(n),t?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=Ye.hsv.exec(n),t?{h:t[1],s:t[2],v:t[3]}:(t=Ye.hsva.exec(n),t?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=Ye.cmyk.exec(n),t?{c:t[1],m:t[2],y:t[3],k:t[4]}:(t=Ye.hex8.exec(n),t?{r:je(t[1]),g:je(t[2]),b:je(t[3]),a:Ra(t[4]),format:e?"name":"hex8"}:(t=Ye.hex6.exec(n),t?{r:je(t[1]),g:je(t[2]),b:je(t[3]),format:e?"name":"hex"}:(t=Ye.hex4.exec(n),t?{r:je(t[1]+t[1]),g:je(t[2]+t[2]),b:je(t[3]+t[3]),a:Ra(t[4]+t[4]),format:e?"name":"hex8"}:(t=Ye.hex3.exec(n),t?{r:je(t[1]+t[1]),g:je(t[2]+t[2]),b:je(t[3]+t[3]),format:e?"name":"hex"}:!1))))))))))}function $e(n){return typeof n=="number"?!Number.isNaN(n):Ye.CSS_UNIT.test(n)}class le{constructor(e="",t={}){if(e instanceof le)return e;typeof e=="number"&&(e=ng(e)),this.originalInput=e;const r=rg(e);this.originalInput=e,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=t.format??r.format,this.gradientType=t.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=r.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){const e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3}getLuminance(){const e=this.toRgb();let t,r,i;const o=e.r/255,s=e.g/255,l=e.b/255;return o<=.03928?t=o/12.92:t=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*t+.7152*r+.0722*i}getAlpha(){return this.a}setAlpha(e){return this.a=hf(e),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){const{s:e}=this.toHsl();return e===0}toHsv(){const e=Na(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}}toHsvString(){const e=Na(this.r,this.g,this.b),t=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.v*100);return this.a===1?`hsv(${t}, ${r}%, ${i}%)`:`hsva(${t}, ${r}%, ${i}%, ${this.roundA})`}toHsl(){const e=Ta(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}}toHslString(){const e=Ta(this.r,this.g,this.b),t=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.l*100);return this.a===1?`hsl(${t}, ${r}%, ${i}%)`:`hsla(${t}, ${r}%, ${i}%, ${this.roundA})`}toHex(e=!1){return Da(this.r,this.g,this.b,e)}toHexString(e=!1){return"#"+this.toHex(e)}toHex8(e=!1){return Z1(this.r,this.g,this.b,this.a,e)}toHex8String(e=!1){return"#"+this.toHex8(e)}toHexShortString(e=!1){return this.a===1?this.toHexString(e):this.toHex8String(e)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){const e=Math.round(this.r),t=Math.round(this.g),r=Math.round(this.b);return this.a===1?`rgb(${e}, ${t}, ${r})`:`rgba(${e}, ${t}, ${r}, ${this.roundA})`}toPercentageRgb(){const e=t=>`${Math.round(ye(t,255)*100)}%`;return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}}toPercentageRgbString(){const e=t=>Math.round(ye(t,255)*100);return this.a===1?`rgb(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%)`:`rgba(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%, ${this.roundA})`}toCmyk(){return{...Ia(this.r,this.g,this.b)}}toCmykString(){const{c:e,m:t,y:r,k:i}=Ia(this.r,this.g,this.b);return`cmyk(${e}, ${t}, ${r}, ${i})`}toName(){if(this.a===0)return"transparent";if(this.a<1)return!1;const e="#"+Da(this.r,this.g,this.b,!1);for(const[t,r]of Object.entries(Is))if(e===r)return t;return!1}toString(e){const t=!!e;e=e??this.format;let r=!1;const i=this.a<1&&this.a>=0;return!t&&i&&(e.startsWith("hex")||e==="name")?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()),e==="cmyk"&&(r=this.toCmykString()),r||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new le(this.toString())}lighten(e=10){const t=this.toHsl();return t.l+=e/100,t.l=xi(t.l),new le(t)}brighten(e=10){const t=this.toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(e/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(e/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(e/100)))),new le(t)}darken(e=10){const t=this.toHsl();return t.l-=e/100,t.l=xi(t.l),new le(t)}tint(e=10){return this.mix("white",e)}shade(e=10){return this.mix("black",e)}desaturate(e=10){const t=this.toHsl();return t.s-=e/100,t.s=xi(t.s),new le(t)}saturate(e=10){const t=this.toHsl();return t.s+=e/100,t.s=xi(t.s),new le(t)}greyscale(){return this.desaturate(100)}spin(e){const t=this.toHsl(),r=(t.h+e)%360;return t.h=r<0?360+r:r,new le(t)}mix(e,t=50){const r=this.toRgb(),i=new le(e).toRgb(),o=t/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 le(s)}analogous(e=6,t=30){const r=this.toHsl(),i=360/t,o=[this];for(r.h=(r.h-(i*e>>1)+720)%360;--e;)r.h=(r.h+i)%360,o.push(new le(r));return o}complement(){const e=this.toHsl();return e.h=(e.h+180)%360,new le(e)}monochromatic(e=6){const t=this.toHsv(),{h:r}=t,{s:i}=t;let{v:o}=t;const s=[],l=1/e;for(;e--;)s.push(new le({h:r,s:i,v:o})),o=(o+l)%1;return s}splitcomplement(){const e=this.toHsl(),{h:t}=e;return[this,new le({h:(t+72)%360,s:e.s,l:e.l}),new le({h:(t+216)%360,s:e.s,l:e.l})]}onBackground(e){const t=this.toRgb(),r=new le(e).toRgb(),i=t.a+r.a*(1-t.a);return new le({r:(t.r*t.a+r.r*r.a*(1-t.a))/i,g:(t.g*t.a+r.g*r.a*(1-t.a))/i,b:(t.b*t.a+r.b*r.a*(1-t.a))/i,a:i})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(e){const t=this.toHsl(),{h:r}=t,i=[this],o=360/e;for(let s=1;s<e;s++)i.push(new le({h:(r+s*o)%360,s:t.s,l:t.l}));return i}equals(e){const t=new le(e);return this.format==="cmyk"||t.format==="cmyk"?this.toCmykString()===t.toCmykString():this.toRgbString()===t.toRgbString()}}var za=!1,pn,Rs,zs,Pi,Li,df,Bi,Fs,Ps,Ls,pf,Bs,Vs,mf,gf;function De(){if(!za){za=!0;var n=navigator.userAgent,e=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(n),t=/(Mac OS X)|(Windows)|(Linux)/.exec(n);if(Bs=/\b(iPhone|iP[ao]d)/.exec(n),Vs=/\b(iP[ao]d)/.exec(n),Ls=/Android/i.exec(n),mf=/FBAN\/\w+;/i.exec(n),gf=/Mobile/i.exec(n),pf=!!/Win64/.exec(n),e){pn=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN,pn&&document&&document.documentMode&&(pn=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(n);df=r?parseFloat(r[1])+4:pn,Rs=e[2]?parseFloat(e[2]):NaN,zs=e[3]?parseFloat(e[3]):NaN,Pi=e[4]?parseFloat(e[4]):NaN,Pi?(e=/(?:Chrome\/(\d+\.\d+))/.exec(n),Li=e&&e[1]?parseFloat(e[1]):NaN):Li=NaN}else pn=Rs=zs=Li=Pi=NaN;if(t){if(t[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(n);Bi=i?parseFloat(i[1].replace("_",".")):!0}else Bi=!1;Fs=!!t[2],Ps=!!t[3]}else Bi=Fs=Ps=!1}}var Hs={ie:function(){return De()||pn},ieCompatibilityMode:function(){return De()||df>pn},ie64:function(){return Hs.ie()&&pf},firefox:function(){return De()||Rs},opera:function(){return De()||zs},webkit:function(){return De()||Pi},safari:function(){return Hs.webkit()},chrome:function(){return De()||Li},windows:function(){return De()||Fs},osx:function(){return De()||Bi},linux:function(){return De()||Ps},iphone:function(){return De()||Bs},mobile:function(){return De()||Bs||Vs||Ls||gf},nativeApp:function(){return De()||mf},android:function(){return De()||Ls},ipad:function(){return De()||Vs}},lg=Hs,vi=!!(typeof window<"u"&&window.document&&window.document.createElement),ag={canUseDOM:vi,canUseWorkers:typeof Worker<"u",canUseEventListeners:vi&&!!(window.addEventListener||window.attachEvent),canUseViewport:vi&&!!window.screen,isInWorker:!vi},yf=ag,bf;yf.canUseDOM&&(bf=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function cg(n,e){if(!yf.canUseDOM||e&&!("addEventListener"in document))return!1;var t="on"+n,r=t in document;if(!r){var i=document.createElement("div");i.setAttribute(t,"return;"),r=typeof i[t]=="function"}return!r&&bf&&n==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var ug=cg,Fa=10,Pa=40,La=800;function wf(n){var e=0,t=0,r=0,i=0;return"detail"in n&&(t=n.detail),"wheelDelta"in n&&(t=-n.wheelDelta/120),"wheelDeltaY"in n&&(t=-n.wheelDeltaY/120),"wheelDeltaX"in n&&(e=-n.wheelDeltaX/120),"axis"in n&&n.axis===n.HORIZONTAL_AXIS&&(e=t,t=0),r=e*Fa,i=t*Fa,"deltaY"in n&&(i=n.deltaY),"deltaX"in n&&(r=n.deltaX),(r||i)&&n.deltaMode&&(n.deltaMode==1?(r*=Pa,i*=Pa):(r*=La,i*=La)),r&&!e&&(e=r<1?-1:1),i&&!t&&(t=i<1?-1:1),{spinX:e,spinY:t,pixelX:r,pixelY:i}}wf.getEventType=function(){return lg.firefox()?"DOMMouseScroll":ug("wheel")?"wheel":"mousewheel"};var gv=wf;/** |
| 13 |
* Checks if an event is supported in the current execution environment. |
| 14 |
* |
| 15 |
* NOTE: This will not work correctly for non-generic events such as `change`, |
| 16 |
* `reset`, `load`, `error`, and `select`. |
| 17 |
* |
| 18 |
* Borrows from Modernizr. |
| 19 |
* |
| 20 |
* @param {string} eventNameSuffix Event name, e.g. "click". |
| 21 |
* @param {?boolean} capture Check if the capture phase is supported. |
| 22 |
* @return {boolean} True if the event is supported. |
| 23 |
* @internal |
| 24 |
* @license Modernizr 3.0.0pre (Custom Build) | MIT |
| 25 |
*/var yv=!1,yt=(n=>(n.LOADING="loading",n.LOADED="loaded",n.ERROR="error",n))(yt||{});const fg=typeof window<"u"&&window!==null,hg=gg(),dg=Object.prototype.propertyIsEnumerable,Ba=Object.getOwnPropertySymbols;function Dr(n){return typeof n=="function"||toString.call(n)==="[object Object]"}function pg(n){return typeof n=="object"?n===null:typeof n!="function"}function mg(n){return n!=="__proto__"&&n!=="constructor"&&n!=="prototype"}function gg(){return fg&&"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 yg(n,...e){if(!Dr(n))throw new TypeError("expected the first argument to be an object");if(e.length===0||typeof Symbol!="function"||typeof Ba!="function")return n;for(const t of e){const r=Ba(t);for(const i of r)dg.call(t,i)&&(n[i]=t[i])}return n}function xf(n,...e){let t=0;for(pg(n)&&(n=e[t++]),n||(n={});t<e.length;t++)if(Dr(e[t])){for(const r of Object.keys(e[t]))mg(r)&&(Dr(n[r])&&Dr(e[t][r])?xf(n[r],e[t][r]):n[r]=e[t][r]);yg(n,e[t])}return n}const Va="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",bg="",wg={rootMargin:"0px",threshold:0},Bn="data-lazy-timeout-id";class xg{constructor(e){this.options={loading:Va,error:bg,observerOptions:wg,log:!0,lifecycle:{},logLevel:"error"},this._images=new WeakMap,this.config(e)}config(e={}){xf(this.options,e)}mount(e,t){if(!e)return;const{src:r,loading:i,error:o,lifecycle:s,delay:l}=this._valueFormatter(typeof t=="string"?t:t.value);this._lifecycle(yt.LOADING,s,e),e.setAttribute("src",i||Va),hg||(this.loadImages(e,r,o,s),this._log(()=>{this._logger("Not support IntersectionObserver!")})),this._initIntersectionObserver(e,r,o,s,l)}update(e,t){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 t=="string"?t:t.value);this._initIntersectionObserver(e,r,i,o,s)}unmount(e){var t;e&&((t=this._realObserver(e))==null||t.unobserve(e),this._images.delete(e))}loadImages(e,t,r,i){this._setImageSrc(e,t,r,i)}_setImageSrc(e,t,r,i){e.tagName.toLowerCase()==="img"?(t&&e.getAttribute("src")!==t&&e.setAttribute("src",t),this._listenImageStatus(e,()=>{this._lifecycle(yt.LOADED,i,e)},()=>{var o;e.onload=null,this._lifecycle(yt.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: ${t} `)})})):e.style.backgroundImage=`url('${t}')`}_initIntersectionObserver(e,t,r,i,o){var l;const s=this.options.observerOptions;this._images.set(e,new IntersectionObserver(a=>{Array.prototype.forEach.call(a,c=>{o&&o>0?this._delayedIntersectionCallback(e,c,o,t,r,i):this._intersectionCallback(e,c,t,r,i)})},s)),(l=this._realObserver(e))==null||l.observe(e)}_intersectionCallback(e,t,r,i,o){var s;t.isIntersecting&&((s=this._realObserver(e))==null||s.unobserve(t.target),this._setImageSrc(e,r,i,o))}_delayedIntersectionCallback(e,t,r,i,o,s){if(t.isIntersecting){if(t.target.hasAttribute(Bn))return;const l=setTimeout(()=>{this._intersectionCallback(e,t,i,o,s),t.target.removeAttribute(Bn)},r);t.target.setAttribute(Bn,String(l))}else t.target.hasAttribute(Bn)&&(clearTimeout(Number(t.target.getAttribute(Bn))),t.target.removeAttribute(Bn))}_listenImageStatus(e,t,r){e.onload=t,e.onerror=r}_valueFormatter(e){let t=e,r=this.options.loading,i=this.options.error,o=this.options.lifecycle,s=this.options.delay;return Dr(e)&&(t=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:t,loading:r,error:i,lifecycle:o,delay:s}}_log(e){this.options.log&&e()}_lifecycle(e,t,r){switch(e){case yt.LOADING:r==null||r.setAttribute("lazy",yt.LOADING),t!=null&&t.loading&&t.loading(r);break;case yt.LOADED:r==null||r.setAttribute("lazy",yt.LOADED),t!=null&&t.loaded&&t.loaded(r);break;case yt.ERROR:r==null||r.setAttribute("lazy",yt.ERROR),t!=null&&t.error&&t.error(r);break}}_realObserver(e){return this._images.get(e)}_logger(e,...t){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,t)}}const bv={install(n,e){const t=new xg(e);n.config.globalProperties.$Lazyload=t,n.provide("Lazyload",t),n.directive("lazy",{mounted:t.mount.bind(t),updated:t.update.bind(t),unmounted:t.unmount.bind(t)})}};function pe(n){this.content=n}pe.prototype={constructor:pe,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,i=r.find(n),o=r.content.slice();return i==-1?o.push(t||n,e):(o[i+1]=e,t&&(o[i]=t)),new pe(o)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new pe(t)},addToStart:function(n,e){return new pe([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new pe(t)},addBefore:function(n,e,t){var r=this.remove(e),i=r.content.slice(),o=r.find(n);return i.splice(o==-1?i.length:o,0,e,t),new pe(i)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=pe.from(n),n.size?new pe(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=pe.from(n),n.size?new pe(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=pe.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};pe.from=function(n){if(n instanceof pe)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new pe(e)};function kf(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),o=e.child(r);if(i==o){t+=i.nodeSize;continue}if(!i.sameMarkup(o))return t;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)t++;return t}if(i.content.size||o.content.size){let s=kf(i.content,o.content,t+1);if(s!=null)return s}t+=i.nodeSize}}function Sf(n,e,t,r){for(let i=n.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:t,b:r};let s=n.child(--i),l=e.child(--o),a=s.nodeSize;if(s==l){t-=a,r-=a;continue}if(!s.sameMarkup(l))return{a:t,b:r};if(s.isText&&s.text!=l.text){let c=0,u=Math.min(s.text.length,l.text.length);for(;c<u&&s.text[s.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(s.content.size||l.content.size){let c=Sf(s.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}let _=class Oe{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,i=0,o){for(let s=0,l=0;l<t;s++){let a=this.content[s],c=l+a.nodeSize;if(c>e&&r(a,i+l,o||null,s)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,i+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let o="",s=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(s?s=!1:o+=r),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new Oe(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],i=0;if(t>e)for(let o=0,s=0;s<t;o++){let l=this.content[o],a=s+l.nodeSize;a>e&&((s<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-s),Math.min(l.text.length,t-s)):l=l.cut(Math.max(0,e-s-1),Math.min(l.content.size,t-s-1))),r.push(l),i+=l.nodeSize),s=a}return new Oe(r,i)}cutByIndex(e,t){return e==t?Oe.empty:e==0&&t==this.content.length?this:new Oe(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new Oe(i,o)}addToStart(e){return new Oe([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Oe(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let i=this.content[t];e(i,r,t),r+=i.nodeSize}}findDiffStart(e,t=0){return kf(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Sf(this,e,t,r)}findIndex(e,t=-1){if(e==0)return Ci(0,e);if(e==this.size)return Ci(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=this.child(r),s=i+o.nodeSize;if(s>=e)return s==e||t>0?Ci(r+1,s):Ci(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,t){if(!t)return Oe.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new Oe(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Oe.empty;let t,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(t||(t=e.slice(0,i)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new Oe(t||e,r)}static from(e){if(!e)return Oe.empty;if(e instanceof Oe)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Oe([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};_.empty=new _([],0);const Wo={index:0,offset:0};function Ci(n,e){return Wo.index=n,Wo.offset=e,Wo}function Qi(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Qi(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Qi(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let ee=class $s{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(o)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Qi(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let i=r.create(t.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return $s.none;if(e instanceof $s)return[e];let t=e.slice();return t.sort((r,i)=>r.type.rank-i.type.rank),t}};ee.none=[];class Zi extends Error{}class R{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Cf(this.content,e+this.openStart,t);return r&&new R(r,this.openStart,this.openEnd)}removeBetween(e,t){return new R(vf(this.content,e+this.openStart,t+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,t){if(!t)return R.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new R(_.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)i++;return new R(e,r,i)}}R.empty=new R(_.empty,0,0);function vf(n,e,t){let{index:r,offset:i}=n.findIndex(e),o=n.maybeChild(r),{index:s,offset:l}=n.findIndex(t);if(i==e||o.isText){if(l!=t&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(r,o.copy(vf(o.content,e-i-1,t-i-1)))}function Cf(n,e,t,r){let{index:i,offset:o}=n.findIndex(e),s=n.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=Cf(s.content,e-o-1,t);return l&&n.replaceChild(i,s.copy(l))}function kg(n,e,t){if(t.openStart>n.depth)throw new Zi("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Zi("Inconsistent open depths");return Af(n,e,t,0)}function Af(n,e,t,r){let i=n.index(r),o=n.node(r);if(i==e.index(r)&&r<n.depth-t.openStart){let s=Af(n,e,t,r+1);return o.copy(o.content.replaceChild(i,s))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let s=n.parent,l=s.content;return Cn(s,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:s,end:l}=Sg(t,n);return Cn(o,Mf(n,s,l,e,r))}else return Cn(o,eo(n,e,r))}function Of(n,e){if(!e.type.compatibleContent(n.type))throw new Zi("Cannot join "+e.type.name+" onto "+n.type.name)}function js(n,e,t){let r=n.node(t);return Of(r,e.node(t)),r}function vn(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function Ir(n,e,t,r){let i=(e||n).node(t),o=0,s=e?e.index(t):i.childCount;n&&(o=n.index(t),n.depth>t?o++:n.textOffset&&(vn(n.nodeAfter,r),o++));for(let l=o;l<s;l++)vn(i.child(l),r);e&&e.depth==t&&e.textOffset&&vn(e.nodeBefore,r)}function Cn(n,e){return n.type.checkContent(e),n.copy(e)}function Mf(n,e,t,r,i){let o=n.depth>i&&js(n,e,i+1),s=r.depth>i&&js(t,r,i+1),l=[];return Ir(null,n,i,l),o&&s&&e.index(i)==t.index(i)?(Of(o,s),vn(Cn(o,Mf(n,e,t,r,i+1)),l)):(o&&vn(Cn(o,eo(n,e,i+1)),l),Ir(e,t,i,l),s&&vn(Cn(s,eo(t,r,i+1)),l)),Ir(r,null,i,l),new _(l)}function eo(n,e,t){let r=[];if(Ir(null,n,t,r),n.depth>t){let i=js(n,e,t+1);vn(Cn(i,eo(n,e,t+1)),r)}return Ir(e,null,t,r),new _(r)}function Sg(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let o=t-1;o>=0;o--)i=e.node(o).copy(_.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class Jr{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.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,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return ee.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),i=e.maybeChild(t);if(!r){let l=r;r=i,i=l}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Ef(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,o=t;for(let s=e;;){let{index:l,offset:a}=s.content.findIndex(o),c=o-a;if(r.push(s,l,i+a),!c||(s=s.child(l),s.isText))break;o=c-1,i+=a+1}return new Jr(t,r,o)}static resolveCached(e,t){let r=Ha.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==t)return s}else Ha.set(e,r=new vg);let i=r.elts[r.i]=Jr.resolve(e,t);return r.i=(r.i+1)%Cg,i}}class vg{constructor(){this.elts=[],this.i=0}}const Cg=12,Ha=new WeakMap;class Ef{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Ag=Object.create(null);let An=class qs{constructor(e,t,r,i=ee.none){this.type=e,this.attrs=t,this.marks=i,this.content=r||_.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,i=0){this.content.nodesBetween(e,t,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,i){return this.content.textBetween(e,t,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&Qi(this.attrs,t||e.defaultAttrs||Ag)&&ee.sameSet(this.marks,r||ee.none)}copy(e=null){return e==this.content?this:new qs(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new qs(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return R.empty;let i=this.resolve(e),o=this.resolve(t),s=r?0:i.sharedDepth(t),l=i.start(s),c=i.node(s).content.cut(i.pos-l,o.pos-l);return new R(c,i.depth-s,o.depth-s)}replace(e,t,r){return kg(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(i==e||t.isText)return t;e-=i+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let i=this.content.child(t-1);return{node:i,index:t-1,offset:r-i.nodeSize}}resolve(e){return Jr.resolveCached(this,e)}resolveNoCache(e){return Jr.resolve(this,e)}rangeHasMark(e,t,r){let i=!1;return t>e&&this.nodesBetween(e,t,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()+")"),_f(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=_.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),l=s&&s.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=i;a<o;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,t);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=ee.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!ee.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t 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(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=_.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,i,r);return o.type.checkAttrs(o.attrs),o}};An.prototype.text=void 0;class to extends An{constructor(e,t,r,i){if(super(e,t,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):_f(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new to(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new to(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function _f(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class _n{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Og(e,t);if(r.next==null)return _n.empty;let i=Tf(r);r.next&&r.err("Unexpected trailing text");let o=Ig(Dg(i));return Rg(o,r),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let i=this;for(let o=t;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let i=[this];function o(s,l){let a=s.matchFragment(e,r);if(a&&(!t||a.validEnd))return _.from(l.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:u,next:f}=s.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(f)==-1){i.push(f);let h=o(f,l.concat(u));if(h)return h}}return null}return o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let l=i;l.type;l=l.via)s.push(l.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:l,next:a}=o.next[s];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!i.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:i}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&t(r.next[i].next)}return t(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(` |
| 26 |
`)}}_n.empty=new _n(!0);class Og{constructor(e,t){this.string=e,this.nodeTypes=t,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(n){let e=[];do e.push(Mg(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Mg(n){let e=[];do e.push(Eg(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Eg(n){let e=Ng(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=_g(n,e);else break;return e}function $a(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function _g(n,e){let t=$a(n),r=t;return n.eat(",")&&(n.next!="}"?r=$a(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function Tg(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let i=[];for(let o in t){let s=t[o];s.groups.indexOf(e)>-1&&i.push(s)}return i.length==0&&n.err("No node type or group '"+e+"' found"),i}function Ng(n){if(n.eat("(")){let e=Tf(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=Tg(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Dg(n){let e=[[]];return i(o(n,0),t()),e;function t(){return e.push([])-1}function r(s,l,a){let c={term:a,to:l};return e[s].push(c),c}function i(s,l){s.forEach(a=>a.to=l)}function o(s,l){if(s.type=="choice")return s.exprs.reduce((a,c)=>a.concat(o(c,l)),[]);if(s.type=="seq")for(let a=0;;a++){let c=o(s.exprs[a],l);if(a==s.exprs.length-1)return c;i(c,l=t())}else if(s.type=="star"){let a=t();return r(l,a),i(o(s.expr,a),a),[r(a)]}else if(s.type=="plus"){let a=t();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 c=0;c<s.min;c++){let u=t();i(o(s.expr,a),u),a=u}if(s.max==-1)i(o(s.expr,a),a);else for(let c=s.min;c<s.max;c++){let u=t();r(a,u),i(o(s.expr,a),u),a=u}return[r(a)]}else{if(s.type=="name")return[r(l,void 0,s.value)];throw new Error("Unknown expr type")}}}}function Nf(n,e){return e-n}function ja(n,e){let t=[];return r(e),t.sort(Nf);function r(i){let o=n[i];if(o.length==1&&!o[0].term)return r(o[0].to);t.push(i);for(let s=0;s<o.length;s++){let{term:l,to:a}=o[s];!l&&t.indexOf(a)==-1&&r(a)}}}function Ig(n){let e=Object.create(null);return t(ja(n,0));function t(r){let i=[];r.forEach(s=>{n[s].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u<i.length;u++)i[u][0]==l&&(c=i[u][1]);ja(n,a).forEach(u=>{c||i.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let o=e[r.join(",")]=new _n(r.indexOf(n.length-1)>-1);for(let s=0;s<i.length;s++){let l=i[s][1].sort(Nf);o.next.push({type:i[s][0],next:e[l.join(",")]||t(l)})}return o}}function Rg(n,e){for(let t=0,r=[n];t<r.length;t++){let i=r[t],o=!i.validEnd,s=[];for(let l=0;l<i.next.length;l++){let{type:a,next:c}=i.next[l];s.push(a.name),o&&!(a.isText||a.hasRequiredAttrs())&&(o=!1),r.indexOf(c)==-1&&r.push(c)}o&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Df(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function If(n,e){let t=Object.create(null);for(let r in n){let i=e&&e[r];if(i===void 0){let o=n[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=i}return t}function Rf(n,e,t,r){for(let i in e)if(!(i in n))throw new RangeError(`Unsupported attribute ${i} for ${t} of type ${i}`);for(let i in n){let o=n[i];o.validate&&o.validate(e[i])}}function zf(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new Fg(n,r,e[r]);return t}let qa=class Ff{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=zf(e,r.attrs),this.defaultAttrs=Df(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==_n.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:If(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new An(this,this.computeAttrs(e),_.from(t),ee.setFrom(r))}createChecked(e=null,t,r){return t=_.from(t),this.checkContent(t),new An(this,this.computeAttrs(e),t,ee.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=_.from(t),t.size){let s=this.contentMatch.fillBefore(t);if(!s)return null;t=s.append(t)}let i=this.contentMatch.matchFragment(t),o=i&&i.fillBefore(_.empty,!0);return o?new An(this,e,t.append(o),ee.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){Rf(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:ee.none:e}static compile(e,t){let r=Object.create(null);e.forEach((o,s)=>r[o]=new Ff(o,t,s));let i=t.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 zg(n,e,t){let r=t.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 ${n}, got ${o}`)}}class Fg{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?zg(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class vo{constructor(e,t,r,i){this.name=e,this.rank=t,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,t){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new vo(o,i++,t,s)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){Rf(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class wv{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=pe.from(e.nodes),t.marks=pe.from(e.marks||{}),this.nodes=qa.compile(this.spec.nodes,this),this.marks=vo.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?Wa(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==""?[]:Wa(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,t=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof qa){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(t,r,i)}text(e,t){let r=this.nodes.text;return new to(r,r.defaultAttrs,e,ee.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return An.fromJSON(this,e)}markFromJSON(e){return ee.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Wa(n,e){let t=[];for(let r=0;r<e.length;r++){let i=e[r],o=n.marks[i],s=o;if(o)t.push(o);else for(let l in n.marks){let a=n.marks[l];(i=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(i)>-1)&&t.push(s=a)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function Pg(n){return n.tag!=null}function Lg(n){return n.style!=null}class Kr{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(i=>{if(Pg(i))this.tags.push(i);else if(Lg(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,t={}){let r=new Ja(this,t,!1);return r.addAll(e,ee.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new Ja(this,t,!0);return r.addAll(e,ee.none,t.from,t.to),R.maxOpen(r.finish())}matchTag(e,t,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(Hg(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||t.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(e);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(e,t,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],l=s.style;if(!(l.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(s.getAttrs){let a=s.getAttrs(t);if(a===!1)continue;s.attrs=a||void 0}return s}}}static schemaRules(e){let t=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<t.length;s++){let l=t[s];if((l.priority==null?50:l.priority)<o)break}t.splice(s,0,i)}for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=Ka(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=Ka(s)),s.node||s.ignore||s.mark||(s.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Kr(e,Kr.schemaRules(e)))}}const Pf={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},Bg={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Lf={ol:!0,ul:!0},no=1,ro=2,Rr=4;function Ua(n,e,t){return e!=null?(e?no:0)|(e==="full"?ro:0):n&&n.whitespace=="pre"?no|ro:t&~Rr}class Ai{constructor(e,t,r,i,o,s){this.type=e,this.attrs=t,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=ee.none,this.match=o||(s&Rr?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(_.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);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&no)){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 t=_.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(_.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Pf.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Ja{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0;let i=t.topNode,o,s=Ua(null,t.preserveWhitespace,0)|(r?Rr:0);i?o=new Ai(i.type,i.attrs,ee.none,!0,t.topMatch||i.type.contentMatch,s):r?o=new Ai(null,null,ee.none,!0,null,s):o=new Ai(e.schema.topNodeType,null,ee.none,!0,null,s),this.nodes=[o],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,i=this.top;if(i.options&ro||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i.options&no)i.options&ro?r=r.replace(/\r\n?/g,` |
| 27 |
`):r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let o=i.content[i.content.length-1],s=e.previousSibling;(!o||s&&s.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),t),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let i=e.nodeName.toLowerCase(),o;Lf.hasOwnProperty(i)&&this.parser.normalizeLists&&Vg(e);let s=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,r));if(s?s.ignore:Bg.hasOwnProperty(i))this.findInside(e),this.ignoreFallback(e,t);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,c=this.needsBlock;if(Pf.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,t);return}let u=s&&s.skip?t:this.readStyles(e,t);u&&this.addAll(e,u),l&&this.sync(a),this.needsBlock=c}else{let l=this.readStyles(e,t);l&&this.addElementByRule(e,s,l,s.consuming===!1?o:void 0)}}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(` |
| 28 |
`),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let l=void 0;;){let a=this.parser.matchStyle(o,s,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?t=t.filter(c=>!a.clearMark(c)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,r,i){let o,s;if(t.node)if(s=this.parser.schema.nodes[t.node],s.isLeaf)this.insertNode(s.create(t.attrs),r)||this.leafFallback(e,r);else{let a=this.enter(s,t.attrs||null,r,t.preserveWhitespace);a&&(o=!0,r=a)}else{let a=this.parser.schema.marks[t.mark];r=r.concat(a.create(t.attrs))}let l=this.top;if(s&&s.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,r)}o&&this.sync(l)&&this.open--}addAll(e,t,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,t);this.findAtPoint(e,o)}findPlace(e,t){let r,i;for(let o=this.open;o>=0;o--){let s=this.nodes[o],l=s.findWrapping(e);if(l&&(!r||r.length>l.length)&&(r=l,i=s,!l.length)||s.solid)break}if(!r)return null;this.sync(i);for(let o=0;o<r.length;o++)t=this.enterInner(r[o],null,t,!1);return t}insertNode(e,t){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(t=this.enterInner(i,null,t))}let r=this.findPlace(e,t);if(r){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let o=ee.none;for(let s of r.concat(e.marks))(i.type?i.type.allowsMarkType(s.type):Ya(s.type,e.type))&&(o=s.addToSet(o));return i.content.push(e.mark(o)),!0}return!1}enter(e,t,r,i){let o=this.findPlace(e.create(t),r);return o&&(o=this.enterInner(e,t,r,!0,i)),o}enterInner(e,t,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let l=Ua(e,o,s.options);s.options&Rr&&s.content.length==0&&(l|=Rr);let a=ee.none;return r=r.filter(c=>(s.type?s.type.allowsMarkType(c.type):Ya(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new Ai(e,t,a,i,null,l)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].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 t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&t.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=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 c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=o;a--)if(s(l-1,a))return!0;return!1}else{let u=a>0||a==0&&i?this.nodes[a].type:r&&a>=o?r.node(a-o).type:null;if(!u||u.name!=c&&u.groups.indexOf(c)==-1)return!1;a--}}return!0};return s(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function Vg(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Lf.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function Hg(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function Ka(n){let e={};for(let t in n)e[t]=n[t];return e}function Ya(n,e){let t=e.schema.nodes;for(let r in t){let i=t[r];if(!i.allowsMarkType(n))continue;let o=[],s=l=>{o.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:u}=l.edge(a);if(c==e||o.indexOf(u)<0&&s(u))return!0}};if(s(i.contentMatch))return!0}}class fr{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=Uo(t).createDocumentFragment());let i=r,o=[];return e.forEach(s=>{if(o.length||s.marks.length){let l=0,a=0;for(;l<o.length&&a<s.marks.length;){let c=s.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(o[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<o.length;)i=o.pop()[1];for(;a<s.marks.length;){let c=s.marks[a++],u=this.serializeMark(c,s.isInline,t);u&&(o.push([c,i]),i.appendChild(u.dom),i=u.contentDOM||u.dom)}}i.appendChild(this.serializeNodeInner(s,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:i}=Vi(Uo(t),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,i)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,t,r={}){let i=this.marks[e.type.name];return i&&Vi(Uo(r),i(e,t),null,e.attrs)}static renderSpec(e,t,r=null,i){return Vi(e,t,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new fr(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Ga(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return Ga(e.marks)}}function Ga(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Uo(n){return n.document||window.document}const Xa=new WeakMap;function $g(n){let e=Xa.get(n);return e===void 0&&Xa.set(n,e=jg(n)),e}function jg(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i<r.length;i++)t(r[i]);else for(let i in r)t(r[i])}return t(n),e}function Vi(n,e,t,r){if(typeof e=="string")return{dom:n.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],o;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(o=$g(r))&&o.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=i.indexOf(" ");s>0&&(t=i.slice(0,s),i=i.slice(s+1));let l,a=t?n.createElementNS(t,i):n.createElement(i),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let f in c)if(c[f]!=null){let h=f.indexOf(" ");h>0?a.setAttributeNS(f.slice(0,h),f.slice(h+1),c[f]):a.setAttribute(f,c[f])}}for(let f=u;f<e.length;f++){let h=e[f];if(h===0){if(f<e.length-1||f>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:d,contentDOM:p}=Vi(n,h,t,r);if(a.appendChild(d),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}const qg={};function Pl(n,e){const t=e||qg,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Bf(n,r,i)}function Bf(n,e,t){if(Wg(n)){if("value"in n)return n.type==="html"&&!t?"":n.value;if(e&&"alt"in n&&n.alt)return n.alt;if("children"in n)return Qa(n.children,e,t)}return Array.isArray(n)?Qa(n,e,t):""}function Qa(n,e,t){const r=[];let i=-1;for(;++i<n.length;)r[i]=Bf(n[i],e,t);return r.join("")}function Wg(n){return!!(n&&typeof n=="object")}const Za=document.createElement("i");function Ll(n){const e="&"+n+";";Za.innerHTML=e;const t=Za.textContent;return t.charCodeAt(t.length-1)===59&&n!=="semi"||t===e?!1:t}function tt(n,e,t,r){const i=n.length;let o=0,s;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,t=t>0?t:0,r.length<1e4)s=Array.from(r),s.unshift(e,t),n.splice(...s);else for(t&&n.splice(e,t);o<r.length;)s=r.slice(o,o+1e4),s.unshift(e,0),n.splice(...s),o+=1e4,e+=1e4}function Xe(n,e){return n.length>0?(tt(n,n.length,0,e),n):e}const ec={}.hasOwnProperty;function Vf(n){const e={};let t=-1;for(;++t<n.length;)Ug(e,n[t]);return e}function Ug(n,e){let t;for(t in e){const i=(ec.call(n,t)?n[t]:void 0)||(n[t]={}),o=e[t];let s;if(o)for(s in o){ec.call(i,s)||(i[s]=[]);const l=o[s];Jg(i[s],Array.isArray(l)?l:l?[l]:[])}}}function Jg(n,e){let t=-1;const r=[];for(;++t<e.length;)(e[t].add==="after"?n:r).push(e[t]);tt(n,0,0,r)}function Hf(n,e){const t=Number.parseInt(n,e);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function ft(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Me=an(/[A-Za-z]/),Re=an(/[\dA-Za-z]/),Kg=an(/[#-'*+\--9=?A-Z^-~]/);function io(n){return n!==null&&(n<32||n===127)}const Ws=an(/\d/),Yg=an(/[\dA-Fa-f]/),Gg=an(/[!-/:-@[-`{-~]/);function V(n){return n!==null&&n<-2}function te(n){return n!==null&&(n<0||n===32)}function U(n){return n===-2||n===-1||n===32}const Co=an(/\p{P}|\p{S}/u),Tn=an(/\s/);function an(n){return e;function e(t){return t!==null&&t>-1&&n.test(String.fromCharCode(t))}}function Q(n,e,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(a){return U(a)?(n.enter(t),l(a)):e(a)}function l(a){return U(a)&&o++<i?(n.consume(a),l):(n.exit(t),e(a))}}const Xg={tokenize:Qg};function Qg(n){const e=n.attempt(this.parser.constructs.contentInitial,r,i);let t;return e;function r(l){if(l===null){n.consume(l);return}return n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),Q(n,e,"linePrefix")}function i(l){return n.enter("paragraph"),o(l)}function o(l){const a=n.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=a),t=a,s(l)}function s(l){if(l===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(l);return}return V(l)?(n.consume(l),n.exit("chunkText"),o):(n.consume(l),s)}}const Zg={tokenize:e2},tc={tokenize:t2};function e2(n){const e=this,t=[];let r=0,i,o,s;return l;function l(x){if(r<t.length){const C=t[r];return e.containerState=C[1],n.attempt(C[0].continuation,a,c)(x)}return c(x)}function a(x){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&v();const C=e.events.length;let O=C,k;for(;O--;)if(e.events[O][0]==="exit"&&e.events[O][1].type==="chunkFlow"){k=e.events[O][1].end;break}g(r);let I=C;for(;I<e.events.length;)e.events[I][1].end=Object.assign({},k),I++;return tt(e.events,O+1,0,e.events.slice(C)),e.events.length=I,c(x)}return l(x)}function c(x){if(r===t.length){if(!i)return h(x);if(i.currentConstruct&&i.currentConstruct.concrete)return p(x);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},n.check(tc,u,f)(x)}function u(x){return i&&v(),g(r),h(x)}function f(x){return e.parser.lazy[e.now().line]=r!==t.length,s=e.now().offset,p(x)}function h(x){return e.containerState={},n.attempt(tc,d,p)(x)}function d(x){return r++,t.push([e.currentConstruct,e.containerState]),h(x)}function p(x){if(x===null){i&&v(),g(0),n.consume(x);return}return i=i||e.parser.flow(e.now()),n.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),m(x)}function m(x){if(x===null){y(n.exit("chunkFlow"),!0),g(0),n.consume(x);return}return V(x)?(n.consume(x),y(n.exit("chunkFlow")),r=0,e.interrupt=void 0,l):(n.consume(x),m)}function y(x,C){const O=e.sliceStream(x);if(C&&O.push(null),x.previous=o,o&&(o.next=x),o=x,i.defineSkip(x.start),i.write(O),e.parser.lazy[x.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<s&&(!i.events[k][1].end||i.events[k][1].end.offset>s))return;const I=e.events.length;let L=I,E,S;for(;L--;)if(e.events[L][0]==="exit"&&e.events[L][1].type==="chunkFlow"){if(E){S=e.events[L][1].end;break}E=!0}for(g(r),k=I;k<e.events.length;)e.events[k][1].end=Object.assign({},S),k++;tt(e.events,L+1,0,e.events.slice(I)),e.events.length=k}}function g(x){let C=t.length;for(;C-- >x;){const O=t[C];e.containerState=O[1],O[0].exit.call(e,n)}t.length=x}function v(){i.write([null]),o=void 0,i=void 0,e.containerState._closeFlow=void 0}}function t2(n,e,t){return Q(n,n.attempt(this.parser.constructs.document,e,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function oo(n){if(n===null||te(n)||Tn(n))return 1;if(Co(n))return 2}function Ao(n,e,t){const r=[];let i=-1;for(;++i<n.length;){const o=n[i].resolveAll;o&&!r.includes(o)&&(e=o(e,t),r.push(o))}return e}const Us={name:"attention",tokenize:r2,resolveAll:n2};function n2(n,e){let t=-1,r,i,o,s,l,a,c,u;for(;++t<n.length;)if(n[t][0]==="enter"&&n[t][1].type==="attentionSequence"&&n[t][1]._close){for(r=t;r--;)if(n[r][0]==="exit"&&n[r][1].type==="attentionSequence"&&n[r][1]._open&&e.sliceSerialize(n[r][1]).charCodeAt(0)===e.sliceSerialize(n[t][1]).charCodeAt(0)){if((n[r][1]._close||n[t][1]._open)&&(n[t][1].end.offset-n[t][1].start.offset)%3&&!((n[r][1].end.offset-n[r][1].start.offset+n[t][1].end.offset-n[t][1].start.offset)%3))continue;a=n[r][1].end.offset-n[r][1].start.offset>1&&n[t][1].end.offset-n[t][1].start.offset>1?2:1;const f=Object.assign({},n[r][1].end),h=Object.assign({},n[t][1].start);nc(f,-a),nc(h,a),s={type:a>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},n[r][1].end)},l={type:a>1?"strongSequence":"emphasisSequence",start:Object.assign({},n[t][1].start),end:h},o={type:a>1?"strongText":"emphasisText",start:Object.assign({},n[r][1].end),end:Object.assign({},n[t][1].start)},i={type:a>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},l.end)},n[r][1].end=Object.assign({},s.start),n[t][1].start=Object.assign({},l.end),c=[],n[r][1].end.offset-n[r][1].start.offset&&(c=Xe(c,[["enter",n[r][1],e],["exit",n[r][1],e]])),c=Xe(c,[["enter",i,e],["enter",s,e],["exit",s,e],["enter",o,e]]),c=Xe(c,Ao(e.parser.constructs.insideSpan.null,n.slice(r+1,t),e)),c=Xe(c,[["exit",o,e],["enter",l,e],["exit",l,e],["exit",i,e]]),n[t][1].end.offset-n[t][1].start.offset?(u=2,c=Xe(c,[["enter",n[t][1],e],["exit",n[t][1],e]])):u=0,tt(n,r-1,t-r+3,c),t=r+c.length-u-2;break}}for(t=-1;++t<n.length;)n[t][1].type==="attentionSequence"&&(n[t][1].type="data");return n}function r2(n,e){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=oo(r);let o;return s;function s(a){return o=a,n.enter("attentionSequence"),l(a)}function l(a){if(a===o)return n.consume(a),l;const c=n.exit("attentionSequence"),u=oo(a),f=!u||u===2&&i||t.includes(a),h=!i||i===2&&u||t.includes(r);return c._open=!!(o===42?f:f&&(i||!h)),c._close=!!(o===42?h:h&&(u||!f)),e(a)}}function nc(n,e){n.column+=e,n.offset+=e,n._bufferIndex+=e}const i2={name:"autolink",tokenize:o2};function o2(n,e,t){let r=0;return i;function i(d){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(d),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),o}function o(d){return Me(d)?(n.consume(d),s):d===64?t(d):c(d)}function s(d){return d===43||d===45||d===46||Re(d)?(r=1,l(d)):c(d)}function l(d){return d===58?(n.consume(d),r=0,a):(d===43||d===45||d===46||Re(d))&&r++<32?(n.consume(d),l):(r=0,c(d))}function a(d){return d===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(d),n.exit("autolinkMarker"),n.exit("autolink"),e):d===null||d===32||d===60||io(d)?t(d):(n.consume(d),a)}function c(d){return d===64?(n.consume(d),u):Kg(d)?(n.consume(d),c):t(d)}function u(d){return Re(d)?f(d):t(d)}function f(d){return d===46?(n.consume(d),r=0,u):d===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(d),n.exit("autolinkMarker"),n.exit("autolink"),e):h(d)}function h(d){if((d===45||Re(d))&&r++<63){const p=d===45?h:f;return n.consume(d),p}return t(d)}}const ri={tokenize:s2,partial:!0};function s2(n,e,t){return r;function r(o){return U(o)?Q(n,i,"linePrefix")(o):i(o)}function i(o){return o===null||V(o)?e(o):t(o)}}const $f={name:"blockQuote",tokenize:l2,continuation:{tokenize:a2},exit:c2};function l2(n,e,t){const r=this;return i;function i(s){if(s===62){const l=r.containerState;return l.open||(n.enter("blockQuote",{_container:!0}),l.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(s),n.exit("blockQuoteMarker"),o}return t(s)}function o(s){return U(s)?(n.enter("blockQuotePrefixWhitespace"),n.consume(s),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),e):(n.exit("blockQuotePrefix"),e(s))}}function a2(n,e,t){const r=this;return i;function i(s){return U(s)?Q(n,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return n.attempt($f,e,t)(s)}}function c2(n){n.exit("blockQuote")}const jf={name:"characterEscape",tokenize:u2};function u2(n,e,t){return r;function r(o){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(o),n.exit("escapeMarker"),i}function i(o){return Gg(o)?(n.enter("characterEscapeValue"),n.consume(o),n.exit("characterEscapeValue"),n.exit("characterEscape"),e):t(o)}}const qf={name:"characterReference",tokenize:f2};function f2(n,e,t){const r=this;let i=0,o,s;return l;function l(f){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(f),n.exit("characterReferenceMarker"),a}function a(f){return f===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(f),n.exit("characterReferenceMarkerNumeric"),c):(n.enter("characterReferenceValue"),o=31,s=Re,u(f))}function c(f){return f===88||f===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(f),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),o=6,s=Yg,u):(n.enter("characterReferenceValue"),o=7,s=Ws,u(f))}function u(f){if(f===59&&i){const h=n.exit("characterReferenceValue");return s===Re&&!Ll(r.sliceSerialize(h))?t(f):(n.enter("characterReferenceMarker"),n.consume(f),n.exit("characterReferenceMarker"),n.exit("characterReference"),e)}return s(f)&&i++<o?(n.consume(f),u):t(f)}}const rc={tokenize:d2,partial:!0},ic={name:"codeFenced",tokenize:h2,concrete:!0};function h2(n,e,t){const r=this,i={tokenize:O,partial:!0};let o=0,s=0,l;return a;function a(k){return c(k)}function c(k){const I=r.events[r.events.length-1];return o=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,l=k,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),u(k)}function u(k){return k===l?(s++,n.consume(k),u):s<3?t(k):(n.exit("codeFencedFenceSequence"),U(k)?Q(n,f,"whitespace")(k):f(k))}function f(k){return k===null||V(k)?(n.exit("codeFencedFence"),r.interrupt?e(k):n.check(rc,m,C)(k)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),h(k))}function h(k){return k===null||V(k)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),f(k)):U(k)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),Q(n,d,"whitespace")(k)):k===96&&k===l?t(k):(n.consume(k),h)}function d(k){return k===null||V(k)?f(k):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===null||V(k)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),f(k)):k===96&&k===l?t(k):(n.consume(k),p)}function m(k){return n.attempt(i,C,y)(k)}function y(k){return n.enter("lineEnding"),n.consume(k),n.exit("lineEnding"),g}function g(k){return o>0&&U(k)?Q(n,v,"linePrefix",o+1)(k):v(k)}function v(k){return k===null||V(k)?n.check(rc,m,C)(k):(n.enter("codeFlowValue"),x(k))}function x(k){return k===null||V(k)?(n.exit("codeFlowValue"),v(k)):(n.consume(k),x)}function C(k){return n.exit("codeFenced"),e(k)}function O(k,I,L){let E=0;return S;function S(j){return k.enter("lineEnding"),k.consume(j),k.exit("lineEnding"),T}function T(j){return k.enter("codeFencedFence"),U(j)?Q(k,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):D(j)}function D(j){return j===l?(k.enter("codeFencedFenceSequence"),B(j)):L(j)}function B(j){return j===l?(E++,k.consume(j),B):E>=s?(k.exit("codeFencedFenceSequence"),U(j)?Q(k,W,"whitespace")(j):W(j)):L(j)}function W(j){return j===null||V(j)?(k.exit("codeFencedFence"),I(j)):L(j)}}}function d2(n,e,t){const r=this;return i;function i(s){return s===null?t(s):(n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?t(s):e(s)}}const Jo={name:"codeIndented",tokenize:m2},p2={tokenize:g2,partial:!0};function m2(n,e,t){const r=this;return i;function i(c){return n.enter("codeIndented"),Q(n,o,"linePrefix",4+1)(c)}function o(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?s(c):t(c)}function s(c){return c===null?a(c):V(c)?n.attempt(p2,s,a)(c):(n.enter("codeFlowValue"),l(c))}function l(c){return c===null||V(c)?(n.exit("codeFlowValue"),s(c)):(n.consume(c),l)}function a(c){return n.exit("codeIndented"),e(c)}}function g2(n,e,t){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?t(s):V(s)?(n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),i):Q(n,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):t(s)}}const y2={name:"codeText",tokenize:x2,resolve:b2,previous:w2};function b2(n){let e=n.length-4,t=3,r,i;if((n[t][1].type==="lineEnding"||n[t][1].type==="space")&&(n[e][1].type==="lineEnding"||n[e][1].type==="space")){for(r=t;++r<e;)if(n[r][1].type==="codeTextData"){n[t][1].type="codeTextPadding",n[e][1].type="codeTextPadding",t+=2,e-=2;break}}for(r=t-1,e++;++r<=e;)i===void 0?r!==e&&n[r][1].type!=="lineEnding"&&(i=r):(r===e||n[r][1].type==="lineEnding")&&(n[i][1].type="codeTextData",r!==i+2&&(n[i][1].end=n[r-1][1].end,n.splice(i+2,r-i-2),e-=r-i-2,r=i+2),i=void 0);return n}function w2(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function x2(n,e,t){let r=0,i,o;return s;function s(f){return n.enter("codeText"),n.enter("codeTextSequence"),l(f)}function l(f){return f===96?(n.consume(f),r++,l):(n.exit("codeTextSequence"),a(f))}function a(f){return f===null?t(f):f===32?(n.enter("space"),n.consume(f),n.exit("space"),a):f===96?(o=n.enter("codeTextSequence"),i=0,u(f)):V(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),a):(n.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||V(f)?(n.exit("codeTextData"),a(f)):(n.consume(f),c)}function u(f){return f===96?(n.consume(f),i++,u):i===r?(n.exit("codeTextSequence"),n.exit("codeText"),e(f)):(o.type="codeTextData",c(f))}}class k2{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,t,r){const i=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&xr(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),xr(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),xr(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);xr(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);xr(this.left,t.reverse())}}}function xr(n,e){let t=0;if(e.length<1e4)n.push(...e);else for(;t<e.length;)n.push(...e.slice(t,t+1e4)),t+=1e4}function Wf(n){const e={};let t=-1,r,i,o,s,l,a,c;const u=new k2(n);for(;++t<u.length;){for(;t in e;)t=e[t];if(r=u.get(t),t&&r[1].type==="chunkFlow"&&u.get(t-1)[1].type==="listItemPrefix"&&(a=r[1]._tokenizer.events,o=0,o<a.length&&a[o][1].type==="lineEndingBlank"&&(o+=2),o<a.length&&a[o][1].type==="content"))for(;++o<a.length&&a[o][1].type!=="content";)a[o][1].type==="chunkText"&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,S2(u,t)),t=e[t],c=!0);else if(r[1]._container){for(o=t,i=void 0;o--&&(s=u.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank");)s[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);i&&(r[1].end=Object.assign({},u.get(i)[1].start),l=u.slice(i,t),l.unshift(r),u.splice(i,t-i+1,l))}}return tt(n,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function S2(n,e){const t=n.get(e)[1],r=n.get(e)[2];let i=e-1;const o=[],s=t._tokenizer||r.parser[t.contentType](t.start),l=s.events,a=[],c={};let u,f,h=-1,d=t,p=0,m=0;const y=[m];for(;d;){for(;n.get(++i)[1]!==d;);o.push(i),d._tokenizer||(u=r.sliceStream(d),d.next||u.push(null),f&&s.defineSkip(d.start),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(u),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=d,d=d.next}for(d=t;++h<l.length;)l[h][0]==="exit"&&l[h-1][0]==="enter"&&l[h][1].type===l[h-1][1].type&&l[h][1].start.line!==l[h][1].end.line&&(m=h+1,y.push(m),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(s.events=[],d?(d._tokenizer=void 0,d.previous=void 0):y.pop(),h=y.length;h--;){const g=l.slice(y[h],y[h+1]),v=o.pop();a.push([v,v+g.length-1]),n.splice(v,2,g)}for(a.reverse(),h=-1;++h<a.length;)c[p+a[h][0]]=p+a[h][1],p+=a[h][1]-a[h][0]-1;return c}const v2={tokenize:O2,resolve:A2},C2={tokenize:M2,partial:!0};function A2(n){return Wf(n),n}function O2(n,e){let t;return r;function r(l){return n.enter("content"),t=n.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?o(l):V(l)?n.check(C2,s,o)(l):(n.consume(l),i)}function o(l){return n.exit("chunkContent"),n.exit("content"),e(l)}function s(l){return n.consume(l),n.exit("chunkContent"),t.next=n.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function M2(n,e,t){const r=this;return i;function i(s){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),Q(n,o,"linePrefix")}function o(s){if(s===null||V(s))return t(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?e(s):n.interrupt(r.parser.constructs.flow,t,e)(s)}}function Uf(n,e,t,r,i,o,s,l,a){const c=a||Number.POSITIVE_INFINITY;let u=0;return f;function f(g){return g===60?(n.enter(r),n.enter(i),n.enter(o),n.consume(g),n.exit(o),h):g===null||g===32||g===41||io(g)?t(g):(n.enter(r),n.enter(s),n.enter(l),n.enter("chunkString",{contentType:"string"}),m(g))}function h(g){return g===62?(n.enter(o),n.consume(g),n.exit(o),n.exit(i),n.exit(r),e):(n.enter(l),n.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===62?(n.exit("chunkString"),n.exit(l),h(g)):g===null||g===60||V(g)?t(g):(n.consume(g),g===92?p:d)}function p(g){return g===60||g===62||g===92?(n.consume(g),d):d(g)}function m(g){return!u&&(g===null||g===41||te(g))?(n.exit("chunkString"),n.exit(l),n.exit(s),n.exit(r),e(g)):u<c&&g===40?(n.consume(g),u++,m):g===41?(n.consume(g),u--,m):g===null||g===32||g===40||io(g)?t(g):(n.consume(g),g===92?y:m)}function y(g){return g===40||g===41||g===92?(n.consume(g),m):m(g)}}function Jf(n,e,t,r,i,o){const s=this;let l=0,a;return c;function c(d){return n.enter(r),n.enter(i),n.consume(d),n.exit(i),n.enter(o),u}function u(d){return l>999||d===null||d===91||d===93&&!a||d===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?t(d):d===93?(n.exit(o),n.enter(i),n.consume(d),n.exit(i),n.exit(r),e):V(d)?(n.enter("lineEnding"),n.consume(d),n.exit("lineEnding"),u):(n.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||V(d)||l++>999?(n.exit("chunkString"),u(d)):(n.consume(d),a||(a=!U(d)),d===92?h:f)}function h(d){return d===91||d===92||d===93?(n.consume(d),l++,f):f(d)}}function Kf(n,e,t,r,i,o){let s;return l;function l(h){return h===34||h===39||h===40?(n.enter(r),n.enter(i),n.consume(h),n.exit(i),s=h===40?41:h,a):t(h)}function a(h){return h===s?(n.enter(i),n.consume(h),n.exit(i),n.exit(r),e):(n.enter(o),c(h))}function c(h){return h===s?(n.exit(o),a(s)):h===null?t(h):V(h)?(n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),Q(n,c,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===s||h===null||V(h)?(n.exit("chunkString"),c(h)):(n.consume(h),h===92?f:u)}function f(h){return h===s||h===92?(n.consume(h),u):u(h)}}function zr(n,e){let t;return r;function r(i){return V(i)?(n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),t=!0,r):U(i)?Q(n,r,t?"linePrefix":"lineSuffix")(i):e(i)}}const E2={name:"definition",tokenize:T2},_2={tokenize:N2,partial:!0};function T2(n,e,t){const r=this;let i;return o;function o(d){return n.enter("definition"),s(d)}function s(d){return Jf.call(r,n,l,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function l(d){return i=ft(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(n.enter("definitionMarker"),n.consume(d),n.exit("definitionMarker"),a):t(d)}function a(d){return te(d)?zr(n,c)(d):c(d)}function c(d){return Uf(n,u,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function u(d){return n.attempt(_2,f,f)(d)}function f(d){return U(d)?Q(n,h,"whitespace")(d):h(d)}function h(d){return d===null||V(d)?(n.exit("definition"),r.parser.defined.push(i),e(d)):t(d)}}function N2(n,e,t){return r;function r(l){return te(l)?zr(n,i)(l):t(l)}function i(l){return Kf(n,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return U(l)?Q(n,s,"whitespace")(l):s(l)}function s(l){return l===null||V(l)?e(l):t(l)}}const D2={name:"hardBreakEscape",tokenize:I2};function I2(n,e,t){return r;function r(o){return n.enter("hardBreakEscape"),n.consume(o),i}function i(o){return V(o)?(n.exit("hardBreakEscape"),e(o)):t(o)}}const R2={name:"headingAtx",tokenize:F2,resolve:z2};function z2(n,e){let t=n.length-2,r=3,i,o;return n[r][1].type==="whitespace"&&(r+=2),t-2>r&&n[t][1].type==="whitespace"&&(t-=2),n[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&n[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:n[r][1].start,end:n[t][1].end},o={type:"chunkText",start:n[r][1].start,end:n[t][1].end,contentType:"text"},tt(n,r,t-r+1,[["enter",i,e],["enter",o,e],["exit",o,e],["exit",i,e]])),n}function F2(n,e,t){let r=0;return i;function i(u){return n.enter("atxHeading"),o(u)}function o(u){return n.enter("atxHeadingSequence"),s(u)}function s(u){return u===35&&r++<6?(n.consume(u),s):u===null||te(u)?(n.exit("atxHeadingSequence"),l(u)):t(u)}function l(u){return u===35?(n.enter("atxHeadingSequence"),a(u)):u===null||V(u)?(n.exit("atxHeading"),e(u)):U(u)?Q(n,l,"whitespace")(u):(n.enter("atxHeadingText"),c(u))}function a(u){return u===35?(n.consume(u),a):(n.exit("atxHeadingSequence"),l(u))}function c(u){return u===null||u===35||te(u)?(n.exit("atxHeadingText"),l(u)):(n.consume(u),c)}}const P2=["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"],oc=["pre","script","style","textarea"],L2={name:"htmlFlow",tokenize:$2,resolveTo:H2,concrete:!0},B2={tokenize:q2,partial:!0},V2={tokenize:j2,partial:!0};function H2(n){let e=n.length;for(;e--&&!(n[e][0]==="enter"&&n[e][1].type==="htmlFlow"););return e>1&&n[e-2][1].type==="linePrefix"&&(n[e][1].start=n[e-2][1].start,n[e+1][1].start=n[e-2][1].start,n.splice(e-2,2)),n}function $2(n,e,t){const r=this;let i,o,s,l,a;return c;function c(w){return u(w)}function u(w){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(w),f}function f(w){return w===33?(n.consume(w),h):w===47?(n.consume(w),o=!0,m):w===63?(n.consume(w),i=3,r.interrupt?e:b):Me(w)?(n.consume(w),s=String.fromCharCode(w),y):t(w)}function h(w){return w===45?(n.consume(w),i=2,d):w===91?(n.consume(w),i=5,l=0,p):Me(w)?(n.consume(w),i=4,r.interrupt?e:b):t(w)}function d(w){return w===45?(n.consume(w),r.interrupt?e:b):t(w)}function p(w){const ce="CDATA[";return w===ce.charCodeAt(l++)?(n.consume(w),l===ce.length?r.interrupt?e:D:p):t(w)}function m(w){return Me(w)?(n.consume(w),s=String.fromCharCode(w),y):t(w)}function y(w){if(w===null||w===47||w===62||te(w)){const ce=w===47,de=s.toLowerCase();return!ce&&!o&&oc.includes(de)?(i=1,r.interrupt?e(w):D(w)):P2.includes(s.toLowerCase())?(i=6,ce?(n.consume(w),g):r.interrupt?e(w):D(w)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(w):o?v(w):x(w))}return w===45||Re(w)?(n.consume(w),s+=String.fromCharCode(w),y):t(w)}function g(w){return w===62?(n.consume(w),r.interrupt?e:D):t(w)}function v(w){return U(w)?(n.consume(w),v):S(w)}function x(w){return w===47?(n.consume(w),S):w===58||w===95||Me(w)?(n.consume(w),C):U(w)?(n.consume(w),x):S(w)}function C(w){return w===45||w===46||w===58||w===95||Re(w)?(n.consume(w),C):O(w)}function O(w){return w===61?(n.consume(w),k):U(w)?(n.consume(w),O):x(w)}function k(w){return w===null||w===60||w===61||w===62||w===96?t(w):w===34||w===39?(n.consume(w),a=w,I):U(w)?(n.consume(w),k):L(w)}function I(w){return w===a?(n.consume(w),a=null,E):w===null||V(w)?t(w):(n.consume(w),I)}function L(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||te(w)?O(w):(n.consume(w),L)}function E(w){return w===47||w===62||U(w)?x(w):t(w)}function S(w){return w===62?(n.consume(w),T):t(w)}function T(w){return w===null||V(w)?D(w):U(w)?(n.consume(w),T):t(w)}function D(w){return w===45&&i===2?(n.consume(w),J):w===60&&i===1?(n.consume(w),K):w===62&&i===4?(n.consume(w),ve):w===63&&i===3?(n.consume(w),b):w===93&&i===5?(n.consume(w),ne):V(w)&&(i===6||i===7)?(n.exit("htmlFlowData"),n.check(B2,Ce,B)(w)):w===null||V(w)?(n.exit("htmlFlowData"),B(w)):(n.consume(w),D)}function B(w){return n.check(V2,W,Ce)(w)}function W(w){return n.enter("lineEnding"),n.consume(w),n.exit("lineEnding"),j}function j(w){return w===null||V(w)?B(w):(n.enter("htmlFlowData"),D(w))}function J(w){return w===45?(n.consume(w),b):D(w)}function K(w){return w===47?(n.consume(w),s="",re):D(w)}function re(w){if(w===62){const ce=s.toLowerCase();return oc.includes(ce)?(n.consume(w),ve):D(w)}return Me(w)&&s.length<8?(n.consume(w),s+=String.fromCharCode(w),re):D(w)}function ne(w){return w===93?(n.consume(w),b):D(w)}function b(w){return w===62?(n.consume(w),ve):w===45&&i===2?(n.consume(w),b):D(w)}function ve(w){return w===null||V(w)?(n.exit("htmlFlowData"),Ce(w)):(n.consume(w),ve)}function Ce(w){return n.exit("htmlFlow"),e(w)}}function j2(n,e,t){const r=this;return i;function i(s){return V(s)?(n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),o):t(s)}function o(s){return r.parser.lazy[r.now().line]?t(s):e(s)}}function q2(n,e,t){return r;function r(i){return n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),n.attempt(ri,e,t)}}const W2={name:"htmlText",tokenize:U2};function U2(n,e,t){const r=this;let i,o,s;return l;function l(b){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(b),a}function a(b){return b===33?(n.consume(b),c):b===47?(n.consume(b),O):b===63?(n.consume(b),x):Me(b)?(n.consume(b),L):t(b)}function c(b){return b===45?(n.consume(b),u):b===91?(n.consume(b),o=0,p):Me(b)?(n.consume(b),v):t(b)}function u(b){return b===45?(n.consume(b),d):t(b)}function f(b){return b===null?t(b):b===45?(n.consume(b),h):V(b)?(s=f,K(b)):(n.consume(b),f)}function h(b){return b===45?(n.consume(b),d):f(b)}function d(b){return b===62?J(b):b===45?h(b):f(b)}function p(b){const ve="CDATA[";return b===ve.charCodeAt(o++)?(n.consume(b),o===ve.length?m:p):t(b)}function m(b){return b===null?t(b):b===93?(n.consume(b),y):V(b)?(s=m,K(b)):(n.consume(b),m)}function y(b){return b===93?(n.consume(b),g):m(b)}function g(b){return b===62?J(b):b===93?(n.consume(b),g):m(b)}function v(b){return b===null||b===62?J(b):V(b)?(s=v,K(b)):(n.consume(b),v)}function x(b){return b===null?t(b):b===63?(n.consume(b),C):V(b)?(s=x,K(b)):(n.consume(b),x)}function C(b){return b===62?J(b):x(b)}function O(b){return Me(b)?(n.consume(b),k):t(b)}function k(b){return b===45||Re(b)?(n.consume(b),k):I(b)}function I(b){return V(b)?(s=I,K(b)):U(b)?(n.consume(b),I):J(b)}function L(b){return b===45||Re(b)?(n.consume(b),L):b===47||b===62||te(b)?E(b):t(b)}function E(b){return b===47?(n.consume(b),J):b===58||b===95||Me(b)?(n.consume(b),S):V(b)?(s=E,K(b)):U(b)?(n.consume(b),E):J(b)}function S(b){return b===45||b===46||b===58||b===95||Re(b)?(n.consume(b),S):T(b)}function T(b){return b===61?(n.consume(b),D):V(b)?(s=T,K(b)):U(b)?(n.consume(b),T):E(b)}function D(b){return b===null||b===60||b===61||b===62||b===96?t(b):b===34||b===39?(n.consume(b),i=b,B):V(b)?(s=D,K(b)):U(b)?(n.consume(b),D):(n.consume(b),W)}function B(b){return b===i?(n.consume(b),i=void 0,j):b===null?t(b):V(b)?(s=B,K(b)):(n.consume(b),B)}function W(b){return b===null||b===34||b===39||b===60||b===61||b===96?t(b):b===47||b===62||te(b)?E(b):(n.consume(b),W)}function j(b){return b===47||b===62||te(b)?E(b):t(b)}function J(b){return b===62?(n.consume(b),n.exit("htmlTextData"),n.exit("htmlText"),e):t(b)}function K(b){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(b),n.exit("lineEnding"),re}function re(b){return U(b)?Q(n,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):ne(b)}function ne(b){return n.enter("htmlTextData"),s(b)}}const Bl={name:"labelEnd",tokenize:Q2,resolveTo:X2,resolveAll:G2},J2={tokenize:Z2},K2={tokenize:ey},Y2={tokenize:ty};function G2(n){let e=-1;for(;++e<n.length;){const t=n[e][1];(t.type==="labelImage"||t.type==="labelLink"||t.type==="labelEnd")&&(n.splice(e+1,t.type==="labelImage"?4:2),t.type="data",e++)}return n}function X2(n,e){let t=n.length,r=0,i,o,s,l;for(;t--;)if(i=n[t][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;n[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(n[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=t);const a={type:n[o][1].type==="labelLink"?"link":"image",start:Object.assign({},n[o][1].start),end:Object.assign({},n[n.length-1][1].end)},c={type:"label",start:Object.assign({},n[o][1].start),end:Object.assign({},n[s][1].end)},u={type:"labelText",start:Object.assign({},n[o+r+2][1].end),end:Object.assign({},n[s-2][1].start)};return l=[["enter",a,e],["enter",c,e]],l=Xe(l,n.slice(o+1,o+r+3)),l=Xe(l,[["enter",u,e]]),l=Xe(l,Ao(e.parser.constructs.insideSpan.null,n.slice(o+r+4,s-3),e)),l=Xe(l,[["exit",u,e],n[s-2],n[s-1],["exit",c,e]]),l=Xe(l,n.slice(s+1)),l=Xe(l,[["exit",a,e]]),tt(n,o,n.length,l),n}function Q2(n,e,t){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return l;function l(h){return o?o._inactive?f(h):(s=r.parser.defined.includes(ft(r.sliceSerialize({start:o.end,end:r.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(h),n.exit("labelMarker"),n.exit("labelEnd"),a):t(h)}function a(h){return h===40?n.attempt(J2,u,s?u:f)(h):h===91?n.attempt(K2,u,s?c:f)(h):s?u(h):f(h)}function c(h){return n.attempt(Y2,u,f)(h)}function u(h){return e(h)}function f(h){return o._balanced=!0,t(h)}}function Z2(n,e,t){return r;function r(f){return n.enter("resource"),n.enter("resourceMarker"),n.consume(f),n.exit("resourceMarker"),i}function i(f){return te(f)?zr(n,o)(f):o(f)}function o(f){return f===41?u(f):Uf(n,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return te(f)?zr(n,a)(f):u(f)}function l(f){return t(f)}function a(f){return f===34||f===39||f===40?Kf(n,c,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):u(f)}function c(f){return te(f)?zr(n,u)(f):u(f)}function u(f){return f===41?(n.enter("resourceMarker"),n.consume(f),n.exit("resourceMarker"),n.exit("resource"),e):t(f)}}function ey(n,e,t){const r=this;return i;function i(l){return Jf.call(r,n,o,s,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(ft(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(l):t(l)}function s(l){return t(l)}}function ty(n,e,t){return r;function r(o){return n.enter("reference"),n.enter("referenceMarker"),n.consume(o),n.exit("referenceMarker"),i}function i(o){return o===93?(n.enter("referenceMarker"),n.consume(o),n.exit("referenceMarker"),n.exit("reference"),e):t(o)}}const ny={name:"labelStartImage",tokenize:ry,resolveAll:Bl.resolveAll};function ry(n,e,t){const r=this;return i;function i(l){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(l),n.exit("labelImageMarker"),o}function o(l){return l===91?(n.enter("labelMarker"),n.consume(l),n.exit("labelMarker"),n.exit("labelImage"),s):t(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(l):e(l)}}const iy={name:"labelStartLink",tokenize:oy,resolveAll:Bl.resolveAll};function oy(n,e,t){const r=this;return i;function i(s){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(s),n.exit("labelMarker"),n.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(s):e(s)}}const Ko={name:"lineEnding",tokenize:sy};function sy(n,e){return t;function t(r){return n.enter("lineEnding"),n.consume(r),n.exit("lineEnding"),Q(n,e,"linePrefix")}}const Hi={name:"thematicBreak",tokenize:ly};function ly(n,e,t){let r=0,i;return o;function o(c){return n.enter("thematicBreak"),s(c)}function s(c){return i=c,l(c)}function l(c){return c===i?(n.enter("thematicBreakSequence"),a(c)):r>=3&&(c===null||V(c))?(n.exit("thematicBreak"),e(c)):t(c)}function a(c){return c===i?(n.consume(c),r++,a):(n.exit("thematicBreakSequence"),U(c)?Q(n,l,"whitespace")(c):l(c))}}const Ie={name:"list",tokenize:uy,continuation:{tokenize:fy},exit:dy},ay={tokenize:py,partial:!0},cy={tokenize:hy,partial:!0};function uy(n,e,t){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(d){const p=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:Ws(d)){if(r.containerState.type||(r.containerState.type=p,n.enter(p,{_container:!0})),p==="listUnordered")return n.enter("listItemPrefix"),d===42||d===45?n.check(Hi,t,c)(d):c(d);if(!r.interrupt||d===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),a(d)}return t(d)}function a(d){return Ws(d)&&++s<10?(n.consume(d),a):(!r.interrupt||s<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(n.exit("listItemValue"),c(d)):t(d)}function c(d){return n.enter("listItemMarker"),n.consume(d),n.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,n.check(ri,r.interrupt?t:u,n.attempt(ay,h,f))}function u(d){return r.containerState.initialBlankLine=!0,o++,h(d)}function f(d){return U(d)?(n.enter("listItemPrefixWhitespace"),n.consume(d),n.exit("listItemPrefixWhitespace"),h):t(d)}function h(d){return r.containerState.size=o+r.sliceSerialize(n.exit("listItemPrefix"),!0).length,e(d)}}function fy(n,e,t){const r=this;return r.containerState._closeFlow=void 0,n.check(ri,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Q(n,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,n.attempt(cy,e,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Q(n,n.attempt(Ie,e,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function hy(n,e,t){const r=this;return Q(n,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):t(o)}}function dy(n){n.exit(this.containerState.type)}function py(n,e,t){const r=this;return Q(n,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):t(o)}}const sc={name:"setextUnderline",tokenize:gy,resolveTo:my};function my(n,e){let t=n.length,r,i,o;for(;t--;)if(n[t][0]==="enter"){if(n[t][1].type==="content"){r=t;break}n[t][1].type==="paragraph"&&(i=t)}else n[t][1].type==="content"&&n.splice(t,1),!o&&n[t][1].type==="definition"&&(o=t);const s={type:"setextHeading",start:Object.assign({},n[i][1].start),end:Object.assign({},n[n.length-1][1].end)};return n[i][1].type="setextHeadingText",o?(n.splice(i,0,["enter",s,e]),n.splice(o+1,0,["exit",n[r][1],e]),n[r][1].end=Object.assign({},n[o][1].end)):n[r][1]=s,n.push(["exit",s,e]),n}function gy(n,e,t){const r=this;let i;return o;function o(c){let u=r.events.length,f;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){f=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(n.enter("setextHeadingLine"),i=c,s(c)):t(c)}function s(c){return n.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===i?(n.consume(c),l):(n.exit("setextHeadingLineSequence"),U(c)?Q(n,a,"lineSuffix")(c):a(c))}function a(c){return c===null||V(c)?(n.exit("setextHeadingLine"),e(c)):t(c)}}const yy={tokenize:by};function by(n){const e=this,t=n.attempt(ri,r,n.attempt(this.parser.constructs.flowInitial,i,Q(n,n.attempt(this.parser.constructs.flow,i,n.attempt(v2,i)),"linePrefix")));return t;function r(o){if(o===null){n.consume(o);return}return n.enter("lineEndingBlank"),n.consume(o),n.exit("lineEndingBlank"),e.currentConstruct=void 0,t}function i(o){if(o===null){n.consume(o);return}return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),e.currentConstruct=void 0,t}}const wy={resolveAll:Gf()},xy=Yf("string"),ky=Yf("text");function Yf(n){return{tokenize:e,resolveAll:Gf(n==="text"?Sy:void 0)};function e(t){const r=this,i=this.parser.constructs[n],o=t.attempt(i,s,l);return s;function s(u){return c(u)?o(u):l(u)}function l(u){if(u===null){t.consume(u);return}return t.enter("data"),t.consume(u),a}function a(u){return c(u)?(t.exit("data"),o(u)):(t.consume(u),a)}function c(u){if(u===null)return!0;const f=i[u];let h=-1;if(f)for(;++h<f.length;){const d=f[h];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function Gf(n){return e;function e(t,r){let i=-1,o;for(;++i<=t.length;)o===void 0?t[i]&&t[i][1].type==="data"&&(o=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==o+2&&(t[o][1].end=t[i-1][1].end,t.splice(o+2,i-o-2),i=o+2),o=void 0);return n?n(t,r):t}}function Sy(n,e){let t=0;for(;++t<=n.length;)if((t===n.length||n[t][1].type==="lineEnding")&&n[t-1][1].type==="data"){const r=n[t-1][1],i=e.sliceStream(r);let o=i.length,s=-1,l=0,a;for(;o--;){const c=i[o];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(c===-2)a=!0,l++;else if(c!==-1){o++;break}}if(l){const c={type:t===n.length||a||l<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-l,offset:r.end.offset-l,_index:r.start._index+o,_bufferIndex:o?s:r.start._bufferIndex+s},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(n.splice(t,0,["enter",c,e],["exit",c,e]),t+=2)}t++}return n}function vy(n,e,t){let r=Object.assign(t?Object.assign({},t):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let s=[],l=[];const a={consume:v,enter:x,exit:C,attempt:I(O),check:I(k),interrupt:I(k,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:n,sliceStream:d,sliceSerialize:h,now:p,defineSkip:m,write:f};let u=e.tokenize.call(c,a);return e.resolveAll&&o.push(e),c;function f(T){return s=Xe(s,T),y(),s[s.length-1]!==null?[]:(L(e,0),c.events=Ao(o,c.events,c),c.events)}function h(T,D){return Ay(d(T),D)}function d(T){return Cy(s,T)}function p(){const{line:T,column:D,offset:B,_index:W,_bufferIndex:j}=r;return{line:T,column:D,offset:B,_index:W,_bufferIndex:j}}function m(T){i[T.line]=T.column,S()}function y(){let T;for(;r._index<s.length;){const D=s[r._index];if(typeof D=="string")for(T=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===T&&r._bufferIndex<D.length;)g(D.charCodeAt(r._bufferIndex));else g(D)}}function g(T){u=u(T)}function v(T){V(T)?(r.line++,r.column=1,r.offset+=T===-3?2:1,S()):T!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=T}function x(T,D){const B=D||{};return B.type=T,B.start=p(),c.events.push(["enter",B,c]),l.push(B),B}function C(T){const D=l.pop();return D.end=p(),c.events.push(["exit",D,c]),D}function O(T,D){L(T,D.from)}function k(T,D){D.restore()}function I(T,D){return B;function B(W,j,J){let K,re,ne,b;return Array.isArray(W)?Ce(W):"tokenize"in W?Ce([W]):ve(W);function ve(ie){return st;function st(Ae){const Vt=Ae!==null&&ie[Ae],Ht=Ae!==null&&ie.null,$t=[...Array.isArray(Vt)?Vt:Vt?[Vt]:[],...Array.isArray(Ht)?Ht:Ht?[Ht]:[]];return Ce($t)(Ae)}}function Ce(ie){return K=ie,re=0,ie.length===0?J:w(ie[re])}function w(ie){return st;function st(Ae){return b=E(),ne=ie,ie.partial||(c.currentConstruct=ie),ie.name&&c.parser.constructs.disable.null.includes(ie.name)?de():ie.tokenize.call(D?Object.assign(Object.create(c),D):c,a,ce,de)(Ae)}}function ce(ie){return T(ne,b),j}function de(ie){return b.restore(),++re<K.length?w(K[re]):J}}}function L(T,D){T.resolveAll&&!o.includes(T)&&o.push(T),T.resolve&&tt(c.events,D,c.events.length-D,T.resolve(c.events.slice(D),c)),T.resolveTo&&(c.events=T.resolveTo(c.events,c))}function E(){const T=p(),D=c.previous,B=c.currentConstruct,W=c.events.length,j=Array.from(l);return{restore:J,from:W};function J(){r=T,c.previous=D,c.currentConstruct=B,c.events.length=W,l=j,S()}}function S(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Cy(n,e){const t=e.start._index,r=e.start._bufferIndex,i=e.end._index,o=e.end._bufferIndex;let s;if(t===i)s=[n[t].slice(r,o)];else{if(s=n.slice(t,i),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}o>0&&s.push(n[i].slice(0,o))}return s}function Ay(n,e){let t=-1;const r=[];let i;for(;++t<n.length;){const o=n[t];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=` |
| 29 |
`;break}case-3:{s=`\r |
| 30 |
`;break}case-2:{s=e?" ":" ";break}case-1:{if(!e&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}const Oy={42:Ie,43:Ie,45:Ie,48:Ie,49:Ie,50:Ie,51:Ie,52:Ie,53:Ie,54:Ie,55:Ie,56:Ie,57:Ie,62:$f},My={91:E2},Ey={[-2]:Jo,[-1]:Jo,32:Jo},_y={35:R2,42:Hi,45:[sc,Hi],60:L2,61:sc,95:Hi,96:ic,126:ic},Ty={38:qf,92:jf},Ny={[-5]:Ko,[-4]:Ko,[-3]:Ko,33:ny,38:qf,42:Us,60:[i2,W2],91:iy,92:[D2,jf],93:Bl,95:Us,96:y2},Dy={null:[Us,wy]},Iy={null:[42,95]},Ry={null:[]},zy=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Iy,contentInitial:My,disable:Ry,document:Oy,flow:_y,flowInitial:Ey,insideSpan:Dy,string:Ty,text:Ny},Symbol.toStringTag,{value:"Module"}));function Fy(n){const t=Vf([zy,...(n||{}).extensions||[]]),r={defined:[],lazy:{},constructs:t,content:i(Xg),document:i(Zg),flow:i(yy),string:i(xy),text:i(ky)};return r;function i(o){return s;function s(l){return vy(r,o,l)}}}function Py(n){for(;!Wf(n););return n}const lc=/[\0\t\n\r]/g;function Ly(){let n=1,e="",t=!0,r;return i;function i(o,s,l){const a=[];let c,u,f,h,d;for(o=e+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),f=0,e="",t&&(o.charCodeAt(0)===65279&&f++,t=void 0);f<o.length;){if(lc.lastIndex=f,c=lc.exec(o),h=c&&c.index!==void 0?c.index:o.length,d=o.charCodeAt(h),!c){e=o.slice(f);break}if(d===10&&f===h&&r)a.push(-3),r=void 0;else switch(r&&(a.push(-5),r=void 0),f<h&&(a.push(o.slice(f,h)),n+=h-f),d){case 0:{a.push(65533),n++;break}case 9:{for(u=Math.ceil(n/4)*4,a.push(-2);n++<u;)a.push(-1);break}case 10:{a.push(-4),n=1;break}default:r=!0,n=1}f=h+1}return l&&(r&&a.push(-5),e&&a.push(e),a.push(null)),a}}const By=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Xf(n){return n.replace(By,Vy)}function Vy(n,e,t){if(e)return e;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),o=i===120||i===88;return Hf(t.slice(o?2:1),o?16:10)}return Ll(t)||n}function Fr(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?ac(n.position):"start"in n||"end"in n?ac(n):"line"in n||"column"in n?Js(n):""}function Js(n){return cc(n&&n.line)+":"+cc(n&&n.column)}function ac(n){return Js(n&&n.start)+"-"+Js(n&&n.end)}function cc(n){return n&&typeof n=="number"?n:1}const Qf={}.hasOwnProperty;function Hy(n,e,t){return typeof e!="string"&&(t=e,e=void 0),$y(t)(Py(Fy(t).document().write(Ly()(n,e,!0))))}function $y(n){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(pi),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(di),blockQuote:o(Ht),characterEscape:E,characterReference:E,codeFenced:o($t),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o($t,s),codeText:o(Fo,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(hi),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(Po),hardBreakEscape:o(pr),hardBreakTrailing:o(pr),htmlFlow:o(mr,s),htmlFlowData:E,htmlText:o(mr,s),htmlTextData:E,image:o(Lo),label:s,link:o(pi),listItem:o(zn),listItemValue:h,listOrdered:o(gt,f),listUnordered:o(gt),paragraph:o(mi),reference:w,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(di),strong:o(gi),thematicBreak:o(yi)},exit:{atxHeading:a(),atxHeadingSequence:O,autolink:a(),autolinkEmail:Vt,autolinkProtocol:Ae,blockQuote:a(),characterEscapeValue:S,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:ie,characterReference:st,codeFenced:a(y),codeFencedFence:m,codeFencedFenceInfo:d,codeFencedFenceMeta:p,codeFlowValue:S,codeIndented:a(g),codeText:a(j),codeTextData:S,data:S,definition:a(),definitionDestinationString:C,definitionLabelString:v,definitionTitleString:x,emphasis:a(),hardBreakEscape:a(D),hardBreakTrailing:a(D),htmlFlow:a(B),htmlFlowData:S,htmlText:a(W),htmlTextData:S,image:a(K),label:ne,labelText:re,lineEnding:T,link:a(J),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:ce,resourceDestinationString:b,resourceTitleString:ve,resource:Ce,setextHeading:a(L),setextHeadingLineSequence:I,setextHeadingText:k,strong:a(),thematicBreak:a()}};Zf(e,(n||{}).mdastExtensions||[]);const t={};return r;function r(A){let N={type:"root",children:[]};const H={stack:[N],tokenStack:[],config:e,enter:l,exit:c,buffer:s,resume:u,data:t},G=[];let Z=-1;for(;++Z<A.length;)if(A[Z][1].type==="listOrdered"||A[Z][1].type==="listUnordered")if(A[Z][0]==="enter")G.push(Z);else{const lt=G.pop();Z=i(A,lt,Z)}for(Z=-1;++Z<A.length;){const lt=e[A[Z][0]];Qf.call(lt,A[Z][1].type)&<[A[Z][1].type].call(Object.assign({sliceSerialize:A[Z][2].sliceSerialize},H),A[Z][1])}if(H.tokenStack.length>0){const lt=H.tokenStack[H.tokenStack.length-1];(lt[1]||uc).call(H,void 0,lt[0])}for(N.position={start:jt(A.length>0?A[0][1].start:{line:1,column:1,offset:0}),end:jt(A.length>0?A[A.length-2][1].end:{line:1,column:1,offset:0})},Z=-1;++Z<e.transforms.length;)N=e.transforms[Z](N)||N;return N}function i(A,N,H){let G=N-1,Z=-1,lt=!1,fn,Mt,yr,br;for(;++G<=H;){const He=A[G];switch(He[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{He[0]==="enter"?Z++:Z--,br=void 0;break}case"lineEndingBlank":{He[0]==="enter"&&(fn&&!br&&!Z&&!yr&&(yr=G),br=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:br=void 0}if(!Z&&He[0]==="enter"&&He[1].type==="listItemPrefix"||Z===-1&&He[0]==="exit"&&(He[1].type==="listUnordered"||He[1].type==="listOrdered")){if(fn){let Fn=G;for(Mt=void 0;Fn--;){const Et=A[Fn];if(Et[1].type==="lineEnding"||Et[1].type==="lineEndingBlank"){if(Et[0]==="exit")continue;Mt&&(A[Mt][1].type="lineEndingBlank",lt=!0),Et[1].type="lineEnding",Mt=Fn}else if(!(Et[1].type==="linePrefix"||Et[1].type==="blockQuotePrefix"||Et[1].type==="blockQuotePrefixWhitespace"||Et[1].type==="blockQuoteMarker"||Et[1].type==="listItemIndent"))break}yr&&(!Mt||yr<Mt)&&(fn._spread=!0),fn.end=Object.assign({},Mt?A[Mt][1].start:He[1].end),A.splice(Mt||G,0,["exit",fn,He[2]]),G++,H++}if(He[1].type==="listItemPrefix"){const Fn={type:"listItem",_spread:!1,start:Object.assign({},He[1].start),end:void 0};fn=Fn,A.splice(G,0,["enter",Fn,He[2]]),G++,H++,yr=void 0,br=!0}}}return A[N][1]._spread=lt,H}function o(A,N){return H;function H(G){l.call(this,A(G),G),N&&N.call(this,G)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(A,N,H){this.stack[this.stack.length-1].children.push(A),this.stack.push(A),this.tokenStack.push([N,H]),A.position={start:jt(N.start),end:void 0}}function a(A){return N;function N(H){A&&A.call(this,H),c.call(this,H)}}function c(A,N){const H=this.stack.pop(),G=this.tokenStack.pop();if(G)G[0].type!==A.type&&(N?N.call(this,A,G[0]):(G[1]||uc).call(this,A,G[0]));else throw new Error("Cannot close `"+A.type+"` ("+Fr({start:A.start,end:A.end})+"): it’s not open");H.position.end=jt(A.end)}function u(){return Pl(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function h(A){if(this.data.expectingFirstListItemValue){const N=this.stack[this.stack.length-2];N.start=Number.parseInt(this.sliceSerialize(A),10),this.data.expectingFirstListItemValue=void 0}}function d(){const A=this.resume(),N=this.stack[this.stack.length-1];N.lang=A}function p(){const A=this.resume(),N=this.stack[this.stack.length-1];N.meta=A}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const A=this.resume(),N=this.stack[this.stack.length-1];N.value=A.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const A=this.resume(),N=this.stack[this.stack.length-1];N.value=A.replace(/(\r?\n|\r)$/g,"")}function v(A){const N=this.resume(),H=this.stack[this.stack.length-1];H.label=N,H.identifier=ft(this.sliceSerialize(A)).toLowerCase()}function x(){const A=this.resume(),N=this.stack[this.stack.length-1];N.title=A}function C(){const A=this.resume(),N=this.stack[this.stack.length-1];N.url=A}function O(A){const N=this.stack[this.stack.length-1];if(!N.depth){const H=this.sliceSerialize(A).length;N.depth=H}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function I(A){const N=this.stack[this.stack.length-1];N.depth=this.sliceSerialize(A).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function E(A){const H=this.stack[this.stack.length-1].children;let G=H[H.length-1];(!G||G.type!=="text")&&(G=gr(),G.position={start:jt(A.start),end:void 0},H.push(G)),this.stack.push(G)}function S(A){const N=this.stack.pop();N.value+=this.sliceSerialize(A),N.position.end=jt(A.end)}function T(A){const N=this.stack[this.stack.length-1];if(this.data.atHardBreak){const H=N.children[N.children.length-1];H.position.end=jt(A.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(N.type)&&(E.call(this,A),S.call(this,A))}function D(){this.data.atHardBreak=!0}function B(){const A=this.resume(),N=this.stack[this.stack.length-1];N.value=A}function W(){const A=this.resume(),N=this.stack[this.stack.length-1];N.value=A}function j(){const A=this.resume(),N=this.stack[this.stack.length-1];N.value=A}function J(){const A=this.stack[this.stack.length-1];if(this.data.inReference){const N=this.data.referenceType||"shortcut";A.type+="Reference",A.referenceType=N,delete A.url,delete A.title}else delete A.identifier,delete A.label;this.data.referenceType=void 0}function K(){const A=this.stack[this.stack.length-1];if(this.data.inReference){const N=this.data.referenceType||"shortcut";A.type+="Reference",A.referenceType=N,delete A.url,delete A.title}else delete A.identifier,delete A.label;this.data.referenceType=void 0}function re(A){const N=this.sliceSerialize(A),H=this.stack[this.stack.length-2];H.label=Xf(N),H.identifier=ft(N).toLowerCase()}function ne(){const A=this.stack[this.stack.length-1],N=this.resume(),H=this.stack[this.stack.length-1];if(this.data.inReference=!0,H.type==="link"){const G=A.children;H.children=G}else H.alt=N}function b(){const A=this.resume(),N=this.stack[this.stack.length-1];N.url=A}function ve(){const A=this.resume(),N=this.stack[this.stack.length-1];N.title=A}function Ce(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function ce(A){const N=this.resume(),H=this.stack[this.stack.length-1];H.label=N,H.identifier=ft(this.sliceSerialize(A)).toLowerCase(),this.data.referenceType="full"}function de(A){this.data.characterReferenceType=A.type}function ie(A){const N=this.sliceSerialize(A),H=this.data.characterReferenceType;let G;H?(G=Hf(N,H==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):G=Ll(N);const Z=this.stack[this.stack.length-1];Z.value+=G}function st(A){const N=this.stack.pop();N.position.end=jt(A.end)}function Ae(A){S.call(this,A);const N=this.stack[this.stack.length-1];N.url=this.sliceSerialize(A)}function Vt(A){S.call(this,A);const N=this.stack[this.stack.length-1];N.url="mailto:"+this.sliceSerialize(A)}function Ht(){return{type:"blockquote",children:[]}}function $t(){return{type:"code",lang:null,meta:null,value:""}}function Fo(){return{type:"inlineCode",value:""}}function hi(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Po(){return{type:"emphasis",children:[]}}function di(){return{type:"heading",depth:0,children:[]}}function pr(){return{type:"break"}}function mr(){return{type:"html",value:""}}function Lo(){return{type:"image",title:null,url:"",alt:null}}function pi(){return{type:"link",title:null,url:"",children:[]}}function gt(A){return{type:"list",ordered:A.type==="listOrdered",start:null,spread:A._spread,children:[]}}function zn(A){return{type:"listItem",spread:A._spread,checked:null,children:[]}}function mi(){return{type:"paragraph",children:[]}}function gi(){return{type:"strong",children:[]}}function gr(){return{type:"text",value:""}}function yi(){return{type:"thematicBreak"}}}function jt(n){return{line:n.line,column:n.column,offset:n.offset}}function Zf(n,e){let t=-1;for(;++t<e.length;){const r=e[t];Array.isArray(r)?Zf(n,r):jy(n,r)}}function jy(n,e){let t;for(t in e)if(Qf.call(e,t))switch(t){case"canContainEols":{const r=e[t];r&&n[t].push(...r);break}case"transforms":{const r=e[t];r&&n[t].push(...r);break}case"enter":case"exit":{const r=e[t];r&&Object.assign(n[t],r);break}}}function uc(n,e){throw n?new Error("Cannot close `"+n.type+"` ("+Fr({start:n.start,end:n.end})+"): a different token (`"+e.type+"`, "+Fr({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Fr({start:e.start,end:e.end})+") is still open")}function xv(n){const e=this;e.parser=t;function t(r){return Hy(r,{...e.data("settings"),...n,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}const fc={}.hasOwnProperty;function qy(n,e){const t=e||{};function r(i,...o){let s=r.invalid;const l=r.handlers;if(i&&fc.call(i,n)){const a=String(i[n]);s=fc.call(l,a)?l[a]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=t.handlers||{},r.invalid=t.invalid,r.unknown=t.unknown,r}const Wy={}.hasOwnProperty;function eh(n,e){let t=-1,r;if(e.extensions)for(;++t<e.extensions.length;)eh(n,e.extensions[t]);for(r in e)if(Wy.call(e,r))switch(r){case"extensions":break;case"unsafe":{hc(n[r],e[r]);break}case"join":{hc(n[r],e[r]);break}case"handlers":{Uy(n[r],e[r]);break}default:n.options[r]=e[r]}return n}function hc(n,e){e&&n.push(...e)}function Uy(n,e){e&&Object.assign(n,e)}function Jy(n,e,t,r){const i=t.enter("blockquote"),o=t.createTracker(r);o.move("> "),o.shift(2);const s=t.indentLines(t.containerFlow(n,o.current()),Ky);return i(),s}function Ky(n,e,t){return">"+(t?"":" ")+n}function th(n,e){return dc(n,e.inConstruct,!0)&&!dc(n,e.notInConstruct,!1)}function dc(n,e,t){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return t;let r=-1;for(;++r<e.length;)if(n.includes(e[r]))return!0;return!1}function pc(n,e,t,r){let i=-1;for(;++i<t.unsafe.length;)if(t.unsafe[i].character===` |
| 31 |
`&&th(t.stack,t.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\ |
| 32 |
`}function Yy(n,e){const t=String(n);let r=t.indexOf(e),i=r,o=0,s=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+e.length,r=t.indexOf(e,i);return s}function Ks(n,e){return!!(e.options.fences===!1&&n.value&&!n.lang&&/[^ \r\n]/.test(n.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(n.value))}function Gy(n){const e=n.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function Xy(n,e,t,r){const i=Gy(t),o=n.value||"",s=i==="`"?"GraveAccent":"Tilde";if(Ks(n,t)){const f=t.enter("codeIndented"),h=t.indentLines(o,Qy);return f(),h}const l=t.createTracker(r),a=i.repeat(Math.max(Yy(o,i)+1,3)),c=t.enter("codeFenced");let u=l.move(a);if(n.lang){const f=t.enter(`codeFencedLang${s}`);u+=l.move(t.safe(n.lang,{before:u,after:" ",encode:["`"],...l.current()})),f()}if(n.lang&&n.meta){const f=t.enter(`codeFencedMeta${s}`);u+=l.move(" "),u+=l.move(t.safe(n.meta,{before:u,after:` |
| 33 |
`,encode:["`"],...l.current()})),f()}return u+=l.move(` |
| 34 |
`),o&&(u+=l.move(o+` |
| 35 |
`)),u+=l.move(a),c(),u}function Qy(n,e,t){return(t?"":" ")+n}function Vl(n){const e=n.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function Zy(n,e,t,r){const i=Vl(t),o=i==='"'?"Quote":"Apostrophe",s=t.enter("definition");let l=t.enter("label");const a=t.createTracker(r);let c=a.move("[");return c+=a.move(t.safe(t.associationId(n),{before:c,after:"]",...a.current()})),c+=a.move("]: "),l(),!n.url||/[\0- \u007F]/.test(n.url)?(l=t.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(t.safe(n.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=t.enter("destinationRaw"),c+=a.move(t.safe(n.url,{before:c,after:n.title?" ":` |
| 36 |
`,...a.current()}))),l(),n.title&&(l=t.enter(`title${o}`),c+=a.move(" "+i),c+=a.move(t.safe(n.title,{before:c,after:i,...a.current()})),c+=a.move(i),l()),s(),c}function e4(n){const e=n.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}nh.peek=t4;function nh(n,e,t,r){const i=e4(t),o=t.enter("emphasis"),s=t.createTracker(r);let l=s.move(i);return l+=s.move(t.containerPhrasing(n,{before:l,after:i,...s.current()})),l+=s.move(i),o(),l}function t4(n,e,t){return t.options.emphasis||"*"}const Oo=function(n){if(n==null)return o4;if(typeof n=="function")return Mo(n);if(typeof n=="object")return Array.isArray(n)?n4(n):r4(n);if(typeof n=="string")return i4(n);throw new Error("Expected function, string, or object as test")};function n4(n){const e=[];let t=-1;for(;++t<n.length;)e[t]=Oo(n[t]);return Mo(r);function r(...i){let o=-1;for(;++o<e.length;)if(e[o].apply(this,i))return!0;return!1}}function r4(n){const e=n;return Mo(t);function t(r){const i=r;let o;for(o in n)if(i[o]!==e[o])return!1;return!0}}function i4(n){return Mo(e);function e(t){return t&&t.type===n}}function Mo(n){return e;function e(t,r,i){return!!(s4(t)&&n.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function o4(){return!0}function s4(n){return n!==null&&typeof n=="object"&&"type"in n}const rh=[],l4=!0,Ys=!1,Gs="skip";function ih(n,e,t,r){let i;typeof e=="function"&&typeof t!="function"?(r=t,t=e):i=e;const o=Oo(i),s=r?-1:1;l(n,void 0,[])();function l(a,c,u){const f=a&&typeof a=="object"?a:{};if(typeof f.type=="string"){const d=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(a.type+(d?"<"+d+">":""))+")"})}return h;function h(){let d=rh,p,m,y;if((!e||o(a,c,u[u.length-1]||void 0))&&(d=a4(t(a,u)),d[0]===Ys))return d;if("children"in a&&a.children){const g=a;if(g.children&&d[0]!==Gs)for(m=(r?g.children.length:-1)+s,y=u.concat(g);m>-1&&m<g.children.length;){const v=g.children[m];if(p=l(v,m,y)(),p[0]===Ys)return p;m=typeof p[1]=="number"?p[1]:m+s}}return d}}}function a4(n){return Array.isArray(n)?n:typeof n=="number"?[l4,n]:n==null?rh:[n]}function Hl(n,e,t,r){let i,o,s;typeof e=="function"&&typeof t!="function"?(o=void 0,s=e,i=t):(o=e,s=t,i=r),ih(n,o,l,i);function l(a,c){const u=c[c.length-1],f=u?u.children.indexOf(a):void 0;return s(a,f,u)}}function oh(n,e){let t=!1;return Hl(n,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,Ys}),!!((!n.depth||n.depth<3)&&Pl(n)&&(e.options.setext||t))}function c4(n,e,t,r){const i=Math.max(Math.min(6,n.depth||1),1),o=t.createTracker(r);if(oh(n,t)){const u=t.enter("headingSetext"),f=t.enter("phrasing"),h=t.containerPhrasing(n,{...o.current(),before:` |
| 37 |
`,after:` |
| 38 |
`});return f(),u(),h+` |
| 39 |
`+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(` |
| 40 |
`))+1))}const s="#".repeat(i),l=t.enter("headingAtx"),a=t.enter("phrasing");o.move(s+" ");let c=t.containerPhrasing(n,{before:"# ",after:` |
| 41 |
`,...o.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?s+" "+c:s,t.options.closeAtx&&(c+=" "+s),a(),l(),c}sh.peek=u4;function sh(n){return n.value||""}function u4(){return"<"}lh.peek=f4;function lh(n,e,t,r){const i=Vl(t),o=i==='"'?"Quote":"Apostrophe",s=t.enter("image");let l=t.enter("label");const a=t.createTracker(r);let c=a.move("![");return c+=a.move(t.safe(n.alt,{before:c,after:"]",...a.current()})),c+=a.move("]("),l(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(l=t.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(t.safe(n.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=t.enter("destinationRaw"),c+=a.move(t.safe(n.url,{before:c,after:n.title?" ":")",...a.current()}))),l(),n.title&&(l=t.enter(`title${o}`),c+=a.move(" "+i),c+=a.move(t.safe(n.title,{before:c,after:i,...a.current()})),c+=a.move(i),l()),c+=a.move(")"),s(),c}function f4(){return"!"}ah.peek=h4;function ah(n,e,t,r){const i=n.referenceType,o=t.enter("imageReference");let s=t.enter("label");const l=t.createTracker(r);let a=l.move("![");const c=t.safe(n.alt,{before:a,after:"]",...l.current()});a+=l.move(c+"]["),s();const u=t.stack;t.stack=[],s=t.enter("reference");const f=t.safe(t.associationId(n),{before:a,after:"]",...l.current()});return s(),t.stack=u,o(),i==="full"||!c||c!==f?a+=l.move(f+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function h4(){return"!"}ch.peek=d4;function ch(n,e,t){let r=n.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<t.unsafe.length;){const s=t.unsafe[o],l=t.compilePattern(s);let a;if(s.atBreak)for(;a=l.exec(r);){let c=a.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(a.index+1)}}return i+r+i}function d4(){return"`"}function uh(n,e){const t=Pl(n);return!!(!e.options.resourceLink&&n.url&&!n.title&&n.children&&n.children.length===1&&n.children[0].type==="text"&&(t===n.url||"mailto:"+t===n.url)&&/^[a-z][a-z+.-]+:/i.test(n.url)&&!/[\0- <>\u007F]/.test(n.url))}fh.peek=p4;function fh(n,e,t,r){const i=Vl(t),o=i==='"'?"Quote":"Apostrophe",s=t.createTracker(r);let l,a;if(uh(n,t)){const u=t.stack;t.stack=[],l=t.enter("autolink");let f=s.move("<");return f+=s.move(t.containerPhrasing(n,{before:f,after:">",...s.current()})),f+=s.move(">"),l(),t.stack=u,f}l=t.enter("link"),a=t.enter("label");let c=s.move("[");return c+=s.move(t.containerPhrasing(n,{before:c,after:"](",...s.current()})),c+=s.move("]("),a(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(a=t.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(t.safe(n.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(a=t.enter("destinationRaw"),c+=s.move(t.safe(n.url,{before:c,after:n.title?" ":")",...s.current()}))),a(),n.title&&(a=t.enter(`title${o}`),c+=s.move(" "+i),c+=s.move(t.safe(n.title,{before:c,after:i,...s.current()})),c+=s.move(i),a()),c+=s.move(")"),l(),c}function p4(n,e,t){return uh(n,t)?"<":"["}hh.peek=m4;function hh(n,e,t,r){const i=n.referenceType,o=t.enter("linkReference");let s=t.enter("label");const l=t.createTracker(r);let a=l.move("[");const c=t.containerPhrasing(n,{before:a,after:"]",...l.current()});a+=l.move(c+"]["),s();const u=t.stack;t.stack=[],s=t.enter("reference");const f=t.safe(t.associationId(n),{before:a,after:"]",...l.current()});return s(),t.stack=u,o(),i==="full"||!c||c!==f?a+=l.move(f+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function m4(){return"["}function $l(n){const e=n.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function g4(n){const e=$l(n),t=n.options.bulletOther;if(!t)return e==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+t+"`) to be different");return t}function y4(n){const e=n.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function dh(n){const e=n.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function b4(n,e,t,r){const i=t.enter("list"),o=t.bulletCurrent;let s=n.ordered?y4(t):$l(t);const l=n.ordered?s==="."?")":".":g4(t);let a=e&&t.bulletLastUsed?s===t.bulletLastUsed:!1;if(!n.ordered){const u=n.children?n.children[0]:void 0;if((s==="*"||s==="-")&&u&&(!u.children||!u.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(a=!0),dh(t)===s&&u){let f=-1;for(;++f<n.children.length;){const h=n.children[f];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){a=!0;break}}}}a&&(s=l),t.bulletCurrent=s;const c=t.containerFlow(n,r);return t.bulletLastUsed=s,t.bulletCurrent=o,i(),c}function w4(n){const e=n.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function x4(n,e,t,r){const i=w4(t);let o=t.bulletCurrent||$l(t);e&&e.type==="list"&&e.ordered&&(o=(typeof e.start=="number"&&e.start>-1?e.start:1)+(t.options.incrementListMarker===!1?0:e.children.indexOf(n))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(e&&e.type==="list"&&e.spread||n.spread))&&(s=Math.ceil(s/4)*4);const l=t.createTracker(r);l.move(o+" ".repeat(s-o.length)),l.shift(s);const a=t.enter("listItem"),c=t.indentLines(t.containerFlow(n,l.current()),u);return a(),c;function u(f,h,d){return h?(d?"":" ".repeat(s))+f:(d?o:o+" ".repeat(s-o.length))+f}}function k4(n,e,t,r){const i=t.enter("paragraph"),o=t.enter("phrasing"),s=t.containerPhrasing(n,r);return o(),i(),s}const S4=Oo(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function v4(n,e,t,r){return(n.children.some(function(s){return S4(s)})?t.containerPhrasing:t.containerFlow).call(t,n,r)}function C4(n){const e=n.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}ph.peek=A4;function ph(n,e,t,r){const i=C4(t),o=t.enter("strong"),s=t.createTracker(r);let l=s.move(i+i);return l+=s.move(t.containerPhrasing(n,{before:l,after:i,...s.current()})),l+=s.move(i+i),o(),l}function A4(n,e,t){return t.options.strong||"*"}function O4(n,e,t,r){return t.safe(n.value,r)}function M4(n){const e=n.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 E4(n,e,t){const r=(dh(t)+(t.options.ruleSpaces?" ":"")).repeat(M4(t));return t.options.ruleSpaces?r.slice(0,-1):r}const jl={blockquote:Jy,break:pc,code:Xy,definition:Zy,emphasis:nh,hardBreak:pc,heading:c4,html:sh,image:lh,imageReference:ah,inlineCode:ch,link:fh,linkReference:hh,list:b4,listItem:x4,paragraph:k4,root:v4,strong:ph,text:O4,thematicBreak:E4},_4=[T4];function T4(n,e,t,r){if(e.type==="code"&&Ks(e,r)&&(n.type==="list"||n.type===e.type&&Ks(n,r)))return!1;if("spread"in t&&typeof t.spread=="boolean")return n.type==="paragraph"&&(n.type===e.type||e.type==="definition"||e.type==="heading"&&oh(e,r))?void 0:t.spread?1:0}const hn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],N4=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:` |
| 42 |
`,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:hn},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r |
| 43 |
]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:hn},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r |
| 44 |
*])`},{character:"*",inConstruct:"phrasing",notInConstruct:hn},{atBreak:!0,character:"+",after:`(?:[ \r |
| 45 |
])`},{atBreak:!0,character:"-",after:`(?:[ \r |
| 46 |
-])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r |
| 47 |
]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:hn},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:hn},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:hn},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:hn},{atBreak:!0,character:"~"}];function D4(n){return n.label||!n.identifier?n.label||"":Xf(n.identifier)}function I4(n){if(!n._compiled){const e=(n.atBreak?"[\\r\\n][\\t ]*":"")+(n.before?"(?:"+n.before+")":"");n._compiled=new RegExp((e?"("+e+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(n.character)?"\\":"")+n.character+(n.after?"(?:"+n.after+")":""),"g")}return n._compiled}function R4(n,e,t){const r=e.indexStack,i=n.children||[],o=[];let s=-1,l=t.before;r.push(-1);let a=e.createTracker(t);for(;++s<i.length;){const c=i[s];let u;if(r[r.length-1]=s,s+1<i.length){let f=e.handle.handlers[i[s+1].type];f&&f.peek&&(f=f.peek),u=f?f(i[s+1],n,e,{before:"",after:"",...a.current()}).charAt(0):""}else u=t.after;o.length>0&&(l==="\r"||l===` |
| 48 |
`)&&c.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),l=" ",a=e.createTracker(t),a.move(o.join(""))),o.push(a.move(e.handle(c,n,e,{...a.current(),before:l,after:u}))),l=o[o.length-1].slice(-1)}return r.pop(),o.join("")}function z4(n,e,t){const r=e.indexStack,i=n.children||[],o=e.createTracker(t),s=[];let l=-1;for(r.push(-1);++l<i.length;){const a=i[l];r[r.length-1]=l,s.push(o.move(e.handle(a,n,e,{before:` |
| 49 |
`,after:` |
| 50 |
`,...o.current()}))),a.type!=="list"&&(e.bulletLastUsed=void 0),l<i.length-1&&s.push(o.move(F4(a,i[l+1],n,e)))}return r.pop(),s.join("")}function F4(n,e,t,r){let i=r.join.length;for(;i--;){const o=r.join[i](n,e,t,r);if(o===!0||o===1)break;if(typeof o=="number")return` |
| 51 |
`.repeat(1+o);if(o===!1)return` |
| 52 |
|
| 53 |
<!----> |
| 54 |
|
| 55 |
`}return` |
| 56 |
|
| 57 |
`}const P4=/\r?\n|\r/g;function L4(n,e){const t=[];let r=0,i=0,o;for(;o=P4.exec(n);)s(n.slice(r,o.index)),t.push(o[0]),r=o.index+o[0].length,i++;return s(n.slice(r)),t.join("");function s(l){t.push(e(l,i,!l))}}function B4(n,e,t){const r=(t.before||"")+(e||"")+(t.after||""),i=[],o=[],s={};let l=-1;for(;++l<n.unsafe.length;){const u=n.unsafe[l];if(!th(n.stack,u))continue;const f=n.compilePattern(u);let h;for(;h=f.exec(r);){const d="before"in u||!!u.atBreak,p="after"in u,m=h.index+(d?h[1].length:0);i.includes(m)?(s[m].before&&!d&&(s[m].before=!1),s[m].after&&!p&&(s[m].after=!1)):(i.push(m),s[m]={before:d,after:p})}}i.sort(V4);let a=t.before?t.before.length:0;const c=r.length-(t.after?t.after.length:0);for(l=-1;++l<i.length;){const u=i[l];u<a||u>=c||u+1<c&&i[l+1]===u+1&&s[u].after&&!s[u+1].before&&!s[u+1].after||i[l-1]===u-1&&s[u].before&&!s[u-1].before&&!s[u-1].after||(a!==u&&o.push(mc(r.slice(a,u),"\\")),a=u,/[!-/:-@[-`{-~]/.test(r.charAt(u))&&(!t.encode||!t.encode.includes(r.charAt(u)))?o.push("\\"):(o.push("&#x"+r.charCodeAt(u).toString(16).toUpperCase()+";"),a++))}return o.push(mc(r.slice(a,c),t.after)),o.join("")}function V4(n,e){return n-e}function mc(n,e){const t=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],o=n+e;let s=-1,l=0,a;for(;a=t.exec(o);)r.push(a.index);for(;++s<r.length;)l!==r[s]&&i.push(n.slice(l,r[s])),i.push("\\"),l=r[s];return i.push(n.slice(l)),i.join("")}function H4(n){const e=n||{},t=e.now||{};let r=e.lineShift||0,i=t.line||1,o=t.column||1;return{move:a,current:s,shift:l};function s(){return{now:{line:i,column:o},lineShift:r}}function l(c){r+=c}function a(c){const u=c||"",f=u.split(/\r?\n|\r/g),h=f[f.length-1];return i+=f.length-1,o=f.length===1?o+h.length:1+h.length+r,u}}function $4(n,e={}){const t={enter:i,indentLines:L4,associationId:D4,containerPhrasing:U4,containerFlow:J4,createTracker:H4,compilePattern:I4,safe:K4,stack:[],unsafe:[...N4],join:[..._4],handlers:{...jl},options:{},indexStack:[],handle:void 0};eh(t,e),t.options.tightDefinitions&&t.join.push(W4),t.handle=qy("type",{invalid:j4,unknown:q4,handlers:t.handlers});let r=t.handle(n,void 0,t,{before:` |
| 58 |
`,after:` |
| 59 |
`,now:{line:1,column:1},lineShift:0});return r&&r.charCodeAt(r.length-1)!==10&&r.charCodeAt(r.length-1)!==13&&(r+=` |
| 60 |
`),r;function i(o){return t.stack.push(o),s;function s(){t.stack.pop()}}}function j4(n){throw new Error("Cannot handle value `"+n+"`, expected node")}function q4(n){const e=n;throw new Error("Cannot handle unknown node `"+e.type+"`")}function W4(n,e){if(n.type==="definition"&&n.type===e.type)return 0}function U4(n,e){return R4(n,this,e)}function J4(n,e){return z4(n,this,e)}function K4(n,e){return B4(this,n,e)}function kv(n){const e=this;e.compiler=t;function t(r){return $4(r,{...e.data("settings"),...n,extensions:e.data("toMarkdownExtensions")||[]})}}function gc(n){if(n)throw n}var $i=Object.prototype.hasOwnProperty,mh=Object.prototype.toString,yc=Object.defineProperty,bc=Object.getOwnPropertyDescriptor,wc=function(e){return typeof Array.isArray=="function"?Array.isArray(e):mh.call(e)==="[object Array]"},xc=function(e){if(!e||mh.call(e)!=="[object Object]")return!1;var t=$i.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&$i.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!t&&!r)return!1;var i;for(i in e);return typeof i>"u"||$i.call(e,i)},kc=function(e,t){yc&&t.name==="__proto__"?yc(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Sc=function(e,t){if(t==="__proto__")if($i.call(e,t)){if(bc)return bc(e,t).value}else return;return e[t]},Y4=function n(){var e,t,r,i,o,s,l=arguments[0],a=1,c=arguments.length,u=!1;for(typeof l=="boolean"&&(u=l,l=arguments[1]||{},a=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});a<c;++a)if(e=arguments[a],e!=null)for(t in e)r=Sc(l,t),i=Sc(e,t),l!==i&&(u&&i&&(xc(i)||(o=wc(i)))?(o?(o=!1,s=r&&wc(r)?r:[]):s=r&&xc(r)?r:{},kc(l,{name:t,newValue:n(u,s,i)})):typeof i<"u"&&kc(l,{name:t,newValue:i}));return l};const Yo=ip(Y4);function Xs(n){if(typeof n!="object"||n===null)return!1;const e=Object.getPrototypeOf(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function G4(){const n=[],e={run:t,use:r};return e;function t(...i){let o=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...i);function l(a,...c){const u=n[++o];let f=-1;if(a){s(a);return}for(;++f<i.length;)(c[f]===null||c[f]===void 0)&&(c[f]=i[f]);i=c,u?X4(u,l)(...c):s(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return n.push(i),e}}function X4(n,e){let t;return r;function r(...s){const l=n.length>s.length;let a;l&&s.push(i);try{a=n.apply(this,s)}catch(c){const u=c;if(l&&t)throw u;return i(u)}l||(a&&a.then&&typeof a.then=="function"?a.then(o,i):a instanceof Error?i(a):o(a))}function i(s,...l){t||(t=!0,e(s,...l))}function o(s){i(null,s)}}class Ve extends Error{constructor(e,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",o={},s=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof 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=Fr(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}}Ve.prototype.file="";Ve.prototype.name="";Ve.prototype.reason="";Ve.prototype.message="";Ve.prototype.stack="";Ve.prototype.column=void 0;Ve.prototype.line=void 0;Ve.prototype.ancestors=void 0;Ve.prototype.cause=void 0;Ve.prototype.fatal=void 0;Ve.prototype.place=void 0;Ve.prototype.ruleId=void 0;Ve.prototype.source=void 0;const bt={basename:Q4,dirname:Z4,extname:eb,join:tb,sep:"/"};function Q4(n,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');ii(n);let t=0,r=-1,i=n.length,o;if(e===void 0||e.length===0||e.length>n.length){for(;i--;)if(n.codePointAt(i)===47){if(o){t=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":n.slice(t,r)}if(e===n)return"";let s=-1,l=e.length-1;for(;i--;)if(n.codePointAt(i)===47){if(o){t=i+1;break}}else s<0&&(o=!0,s=i+1),l>-1&&(n.codePointAt(i)===e.codePointAt(l--)?l<0&&(r=i):(l=-1,r=s));return t===r?r=s:r<0&&(r=n.length),n.slice(t,r)}function Z4(n){if(ii(n),n.length===0)return".";let e=-1,t=n.length,r;for(;--t;)if(n.codePointAt(t)===47){if(r){e=t;break}}else r||(r=!0);return e<0?n.codePointAt(0)===47?"/":".":e===1&&n.codePointAt(0)===47?"//":n.slice(0,e)}function eb(n){ii(n);let e=n.length,t=-1,r=0,i=-1,o=0,s;for(;e--;){const l=n.codePointAt(e);if(l===47){if(s){r=e+1;break}continue}t<0&&(s=!0,t=e+1),l===46?i<0?i=e:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||t<0||o===0||o===1&&i===t-1&&i===r+1?"":n.slice(i,t)}function tb(...n){let e=-1,t;for(;++e<n.length;)ii(n[e]),n[e]&&(t=t===void 0?n[e]:t+"/"+n[e]);return t===void 0?".":nb(t)}function nb(n){ii(n);const e=n.codePointAt(0)===47;let t=rb(n,!e);return t.length===0&&!e&&(t="."),t.length>0&&n.codePointAt(n.length-1)===47&&(t+="/"),e?"/"+t:t}function rb(n,e){let t="",r=0,i=-1,o=0,s=-1,l,a;for(;++s<=n.length;){if(s<n.length)l=n.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(i===s-1||o===1))if(i!==s-1&&o===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(a=t.lastIndexOf("/"),a!==t.length-1){a<0?(t="",r=0):(t=t.slice(0,a),r=t.length-1-t.lastIndexOf("/")),i=s,o=0;continue}}else if(t.length>0){t="",r=0,i=s,o=0;continue}}e&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+n.slice(i+1,s):t=n.slice(i+1,s),r=s-i-1;i=s,o=0}else l===46&&o>-1?o++:o=-1}return t}function ii(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const ib={cwd:ob};function ob(){return"/"}function Qs(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function sb(n){if(typeof n=="string")n=new URL(n);else if(!Qs(n)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(n.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return lb(n)}function lb(n){if(n.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=n.pathname;let t=-1;for(;++t<e.length;)if(e.codePointAt(t)===37&&e.codePointAt(t+1)===50){const r=e.codePointAt(t+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(e)}const Go=["history","path","basename","stem","extname","dirname"];class ab{constructor(e){let t;e?Qs(e)?t={path:e}:typeof e=="string"||cb(e)?t={value:e}:t=e:t={},this.cwd="cwd"in t?"":ib.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Go.length;){const o=Go[r];o in t&&t[o]!==void 0&&t[o]!==null&&(this[o]=o==="history"?[...t[o]]:t[o])}let i;for(i in t)Go.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?bt.basename(this.path):void 0}set basename(e){Qo(e,"basename"),Xo(e,"basename"),this.path=bt.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?bt.dirname(this.path):void 0}set dirname(e){vc(this.basename,"dirname"),this.path=bt.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?bt.extname(this.path):void 0}set extname(e){if(Xo(e,"extname"),vc(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=bt.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Qs(e)&&(e=sb(e)),Qo(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?bt.basename(this.path,this.extname):void 0}set stem(e){Qo(e,"stem"),Xo(e,"stem"),this.path=bt.join(this.dirname||"",e+(this.extname||""))}fail(e,t,r){const i=this.message(e,t,r);throw i.fatal=!0,i}info(e,t,r){const i=this.message(e,t,r);return i.fatal=void 0,i}message(e,t,r){const i=new Ve(e,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function Xo(n,e){if(n&&n.includes(bt.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+bt.sep+"`")}function Qo(n,e){if(!n)throw new Error("`"+e+"` cannot be empty")}function vc(n,e){if(!n)throw new Error("Setting `"+e+"` requires `path` to be set too")}function cb(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const ub=function(n){const r=this.constructor.prototype,i=r[n],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},fb={}.hasOwnProperty;class ql extends ub{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=G4()}copy(){const e=new ql;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];e.use(...r)}return e.data(Yo(!0,{},this.namespace)),e}data(e,t){return typeof e=="string"?arguments.length===2?(ts("data",this.frozen),this.namespace[e]=t,this):fb.call(this.namespace,e)&&this.namespace[e]||void 0:e?(ts("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(e,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=Oi(e),r=this.parser||this.Parser;return Zo("parse",r),r(String(t),t)}process(e,t){const r=this;return this.freeze(),Zo("process",this.parser||this.Parser),es("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(o,s){const l=Oi(e),a=r.parse(l);r.run(a,l,function(u,f,h){if(u||!f||!h)return c(u);const d=f,p=r.stringify(d,h);db(p)?h.value=p:h.result=p,c(u,h)});function c(u,f){u||!f?s(u):o?o(f):t(void 0,f)}}}processSync(e){let t=!1,r;return this.freeze(),Zo("processSync",this.parser||this.Parser),es("processSync",this.compiler||this.Compiler),this.process(e,i),Ac("processSync","process",t),r;function i(o,s){t=!0,gc(o),r=s}}run(e,t,r){Cc(e),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?o(void 0,r):new Promise(o);function o(s,l){const a=Oi(t);i.run(e,a,c);function c(u,f,h){const d=f||e;u?l(u):s?s(d):r(void 0,d,h)}}}runSync(e,t){let r=!1,i;return this.run(e,t,o),Ac("runSync","run",r),i;function o(s,l){gc(s),i=l,r=!0}}stringify(e,t){this.freeze();const r=Oi(t),i=this.compiler||this.Compiler;return es("stringify",i),Cc(e),i(e,r)}use(e,...t){const r=this.attachers,i=this.namespace;if(ts("use",this.frozen),e!=null)if(typeof e=="function")a(e,t);else if(typeof e=="object")Array.isArray(e)?l(e):s(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function o(c){if(typeof c=="function")a(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...f]=c;a(u,f)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(c.plugins),c.settings&&(i.settings=Yo(!0,i.settings,c.settings))}function l(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const f=c[u];o(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function a(c,u){let f=-1,h=-1;for(;++f<r.length;)if(r[f][0]===c){h=f;break}if(h===-1)r.push([c,...u]);else if(u.length>0){let[d,...p]=u;const m=r[h][1];Xs(m)&&Xs(d)&&(d=Yo(!0,m,d)),r[h]=[c,d,...p]}}}}const Sv=new ql().freeze();function Zo(n,e){if(typeof e!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function es(n,e){if(typeof e!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function ts(n,e){if(e)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Cc(n){if(!Xs(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function Ac(n,e,t){if(!t)throw new Error("`"+n+"` finished async. Use `"+e+"` instead")}function Oi(n){return hb(n)?n:new ab(n)}function hb(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function db(n){return typeof n=="string"||pb(n)}function pb(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const gh=65535,yh=Math.pow(2,16);function mb(n,e){return n+e*yh}function Oc(n){return n&gh}function gb(n){return(n-(n&gh))/yh}const bh=1,wh=2,ji=4,xh=8;class Zs{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&xh)>0}get deletedBefore(){return(this.delInfo&(bh|ji))>0}get deletedAfter(){return(this.delInfo&(wh|ji))>0}get deletedAcross(){return(this.delInfo&ji)>0}}class qe{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&qe.empty)return qe.empty}recover(e){let t=0,r=Oc(e);if(!this.inverted)for(let i=0;i<r;i++)t+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+t+gb(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?i:0);if(a>e)break;let c=this.ranges[l+o],u=this.ranges[l+s],f=a+c;if(e<=f){let h=c?e==a?-1:e==f?1:t:t,d=a+i+(h<0?0:u);if(r)return d;let p=e==(t<0?a:f)?null:mb(l/3,e-a),m=e==a?wh:e==f?bh:ji;return(t<0?e!=a:e!=f)&&(m|=xh),new Zs(d,m,p)}i+=u-c}return r?e+i:new Zs(e+i,0,null)}touches(e,t){let r=0,i=Oc(t),o=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let c=this.ranges[l+o],u=a+c;if(e<=u&&l==i*3)return!0;r+=this.ranges[l+s]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],l=s-(this.inverted?o:0),a=s+(this.inverted?0:o),c=this.ranges[i+t],u=this.ranges[i+r];e(l,l+c,a,a+u),o+=u-c}}invert(){return new qe(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?qe.empty:new qe(e<0?[0,-e,0]:[0,0,e])}}qe.empty=new qe([]);class Jn{constructor(e=[],t,r=0,i=e.length){this.maps=e,this.mirror=t,this.from=r,this.to=i}slice(e=0,t=this.maps.length){return new Jn(this.maps,this.mirror,e,t)}copy(){return new Jn(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),t!=null&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,r=this.maps.length;t<e.maps.length;t++){let i=e.getMirror(t);this.appendMap(e.maps[t],i!=null&&i<t?r+i:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this.maps.length+e.maps.length;t>=0;t--){let i=e.getMirror(t);this.appendMap(e.maps[t].invert(),i!=null&&i>t?r-i-1:void 0)}}invert(){let e=new Jn;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this.maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this.maps[o],l=s.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(o);if(a!=null&&a>o&&a<this.to){o=a,e=this.maps[a].recover(l.recover);continue}}i|=l.delInfo,e=l.pos}return r?e:new Zs(e,i,null)}}const ns=Object.create(null);class Se{getMap(){return qe.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=ns[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in ns)throw new RangeError("Duplicate use of step JSON ID "+e);return ns[e]=t,t.prototype.jsonID=e,t}}class ae{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new ae(e,null)}static fail(e){return new ae(null,e)}static fromReplace(e,t,r,i){try{return ae.ok(e.replace(t,r,i))}catch(o){if(o instanceof Zi)return ae.fail(o.message);throw o}}}function Wl(n,e,t){let r=[];for(let i=0;i<n.childCount;i++){let o=n.child(i);o.content.size&&(o=o.copy(Wl(o.content,e,o))),o.isInline&&(o=e(o,t,i)),r.push(o)}return _.fromArray(r)}class Gt extends Se{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new R(Wl(t.content,(s,l)=>!s.isAtom||!l.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),t.openStart,t.openEnd);return ae.fromReplace(e,this.from,this.to,o)}invert(){return new xt(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Gt(t.pos,r.pos,this.mark)}merge(e){return e instanceof Gt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Gt(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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Gt(t.from,t.to,e.markFromJSON(t.mark))}}Se.jsonID("addMark",Gt);class xt extends Se{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new R(Wl(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return ae.fromReplace(e,this.from,this.to,r)}invert(){return new Gt(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new xt(t.pos,r.pos,this.mark)}merge(e){return e instanceof xt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new xt(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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new xt(t.from,t.to,e.markFromJSON(t.mark))}}Se.jsonID("removeMark",xt);class Xt extends Se{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return ae.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return ae.fromReplace(e,this.pos,this.pos+1,new R(_.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let i=0;i<t.marks.length;i++)if(!t.marks[i].isInSet(r))return new Xt(this.pos,t.marks[i]);return new Xt(this.pos,this.mark)}}return new ir(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Xt(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Xt(t.pos,e.markFromJSON(t.mark))}}Se.jsonID("addNodeMark",Xt);class ir extends Se{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return ae.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return ae.fromReplace(e,this.pos,this.pos+1,new R(_.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new Xt(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ir(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new ir(t.pos,e.markFromJSON(t.mark))}}Se.jsonID("removeNodeMark",ir);class we extends Se{constructor(e,t,r,i=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=i}apply(e){return this.structure&&el(e,this.from,this.to)?ae.fail("Structure replace would overwrite content"):ae.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new qe([this.from,this.to-this.from,this.slice.size])}invert(e){return new we(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new we(t.pos,Math.max(t.pos,r.pos),this.slice)}merge(e){if(!(e instanceof we)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?R.empty:new R(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new we(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?R.empty:new R(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new we(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new we(t.from,t.to,R.fromJSON(e,t.slice),!!t.structure)}}Se.jsonID("replace",we);class ke extends Se{constructor(e,t,r,i,o,s,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=l}apply(e){if(this.structure&&(el(e,this.from,this.gapFrom)||el(e,this.gapTo,this.to)))return ae.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return ae.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?ae.fromReplace(e,this.from,this.to,r):ae.fail("Content does not fit in gap")}getMap(){return new qe([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new ke(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||i<t.pos||o>r.pos?null:new ke(t.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,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ke(t.from,t.to,t.gapFrom,t.gapTo,R.fromJSON(e,t.slice),t.insert,!!t.structure)}}Se.jsonID("replaceAround",ke);function el(n,e,t){let r=n.resolve(e),i=t-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 yb(n,e,t,r){let i=[],o=[],s,l;n.doc.nodesBetween(e,t,(a,c,u)=>{if(!a.isInline)return;let f=a.marks;if(!r.isInSet(f)&&u.type.allowsMarkType(r.type)){let h=Math.max(c,e),d=Math.min(c+a.nodeSize,t),p=r.addToSet(f);for(let m=0;m<f.length;m++)f[m].isInSet(p)||(s&&s.to==h&&s.mark.eq(f[m])?s.to=d:i.push(s=new xt(h,d,f[m])));l&&l.to==h?l.to=d:o.push(l=new Gt(h,d,r))}}),i.forEach(a=>n.step(a)),o.forEach(a=>n.step(a))}function bb(n,e,t,r){let i=[],o=0;n.doc.nodesBetween(e,t,(s,l)=>{if(!s.isInline)return;o++;let a=null;if(r instanceof vo){let c=s.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(s.marks)&&(a=[r]):a=s.marks;if(a&&a.length){let c=Math.min(l+s.nodeSize,t);for(let u=0;u<a.length;u++){let f=a[u],h;for(let d=0;d<i.length;d++){let p=i[d];p.step==o-1&&f.eq(i[d].style)&&(h=p)}h?(h.to=c,h.step=o):i.push({style:f,from:Math.max(l,e),to:c,step:o})}}}),i.forEach(s=>n.step(new xt(s.from,s.to,s.style)))}function kh(n,e,t,r=t.contentMatch,i=!0){let o=n.doc.nodeAt(e),s=[],l=e+1;for(let a=0;a<o.childCount;a++){let c=o.child(a),u=l+c.nodeSize,f=r.matchType(c.type);if(!f)s.push(new we(l,u,R.empty));else{r=f;for(let h=0;h<c.marks.length;h++)t.allowsMarkType(c.marks[h].type)||n.step(new xt(l,u,c.marks[h]));if(i&&c.isText&&t.whitespace!="pre"){let h,d=/\r?\n|\r/g,p;for(;h=d.exec(c.text);)p||(p=new R(_.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),s.push(new we(l+h.index,l+h.index+h[0].length,p))}}l=u}if(!r.validEnd){let a=r.fillBefore(_.empty,!0);n.replace(l,l,new R(a,0,0))}for(let a=s.length-1;a>=0;a--)n.step(s[a])}function wb(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Eo(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth;;--r){let i=n.$from.node(r),o=n.$from.index(r),s=n.$to.indexAfter(r);if(r<n.depth&&i.canReplace(o,s,t))return r;if(r==0||i.type.spec.isolating||!wb(i,o,s))break}return null}function xb(n,e,t){let{$from:r,$to:i,depth:o}=e,s=r.before(o+1),l=i.after(o+1),a=s,c=l,u=_.empty,f=0;for(let p=o,m=!1;p>t;p--)m||r.index(p)>0?(m=!0,u=_.from(r.node(p).copy(u)),f++):a--;let h=_.empty,d=0;for(let p=o,m=!1;p>t;p--)m||i.after(p+1)<i.end(p)?(m=!0,h=_.from(i.node(p).copy(h)),d++):c++;n.step(new ke(a,c,s,l,new R(u.append(h),f,d),u.size-f,!0))}function Sh(n,e,t=null,r=n){let i=kb(n,e),o=i&&Sb(r,e);return o?i.map(Mc).concat({type:e,attrs:t}).concat(o.map(Mc)):null}function Mc(n){return{type:n,attrs:null}}function kb(n,e){let{parent:t,startIndex:r,endIndex:i}=n,o=t.contentMatchAt(r).findWrapping(e);if(!o)return null;let s=o.length?o[0]:e;return t.canReplaceWith(r,i,s)?o:null}function Sb(n,e){let{parent:t,startIndex:r,endIndex:i}=n,o=t.child(r),s=e.contentMatch.findWrapping(o.type);if(!s)return null;let a=(s.length?s[s.length-1]:e).contentMatch;for(let c=r;a&&c<i;c++)a=a.matchType(t.child(c).type);return!a||!a.validEnd?null:s}function vb(n,e,t){let r=_.empty;for(let s=t.length-1;s>=0;s--){if(r.size){let l=t[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=_.from(t[s].type.create(t[s].attrs,r))}let i=e.start,o=e.end;n.step(new ke(i,o,i,o,new R(r,0,0),t.length,!0))}function Cb(n,e,t,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=n.steps.length;n.doc.nodesBetween(e,t,(s,l)=>{let a=typeof i=="function"?i(s):i;if(s.isTextblock&&!s.hasMarkup(r,a)&&Mb(n.doc,n.mapping.slice(o).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let d=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);d&&!p?c=!1:!d&&p&&(c=!0)}c===!1&&Ob(n,s,l,o),kh(n,n.mapping.slice(o).map(l,1),r,void 0,c===null);let u=n.mapping.slice(o),f=u.map(l,1),h=u.map(l+s.nodeSize,1);return n.step(new ke(f,h,f+1,h-1,new R(_.from(r.create(a,null,s.marks)),0,0),1,!0)),c===!0&&Ab(n,s,l,o),!1}})}function Ab(n,e,t,r){e.forEach((i,o)=>{if(i.isText){let s,l=/\r?\n|\r/g;for(;s=l.exec(i.text);){let a=n.mapping.slice(r).map(t+1+o+s.index);n.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function Ob(n,e,t,r){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=n.mapping.slice(r).map(t+1+o);n.replaceWith(s,s+1,e.type.schema.text(` |
| 61 |
`))}})}function Mb(n,e,t){let r=n.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,t)}function Eb(n,e,t,r,i){let o=n.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");t||(t=o.type);let s=t.create(r,null,i||o.marks);if(o.isLeaf)return n.replaceWith(e,e+o.nodeSize,s);if(!t.validContent(o.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new ke(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new R(_.from(s),0,0),1,!0))}function Pr(n,e,t=1,r){let i=n.resolve(e),o=i.depth-t,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 c=i.depth-1,u=t-2;c>o;c--,u--){let f=i.node(c),h=i.index(c);if(f.type.spec.isolating)return!1;let d=f.content.cutByIndex(h,f.childCount),p=r&&r[u+1];p&&(d=d.replaceChild(0,p.type.create(p.attrs)));let m=r&&r[u]||f;if(!f.canReplace(h+1,f.childCount)||!m.type.validContent(d))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 _b(n,e,t=1,r){let i=n.doc.resolve(e),o=_.empty,s=_.empty;for(let l=i.depth,a=i.depth-t,c=t-1;l>a;l--,c--){o=_.from(i.node(l).copy(o));let u=r&&r[c];s=_.from(u?u.type.create(u.attrs,s):i.node(l).copy(s))}n.step(new we(e,e,new R(o.append(s),t,t),!0))}function _o(n,e){let t=n.resolve(e),r=t.index();return Tb(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function Tb(n,e){return!!(n&&e&&!n.isLeaf&&n.canAppend(e))}function Nb(n,e,t){let r=new we(e-t,e+t,R.empty,!0);n.step(r)}function Db(n,e,t){let r=n.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),t))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,t))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,t))return r.after(i+1);if(o<r.node(i).childCount)return null}return null}function Ib(n,e,t){let r=n.resolve(e);if(!t.content.size)return e;let i=t.content;for(let o=0;o<t.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(t.openStart==0&&t.size?2:1);o++)for(let s=r.depth;s>=0;s--){let l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,a=r.index(s)+(l>0?1:0),c=r.node(s),u=!1;if(o==1)u=c.canReplace(a,a,i);else{let f=c.contentMatchAt(a).findWrapping(i.firstChild.type);u=f&&c.canReplaceWith(a,a,f[0])}if(u)return l==0?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function Ul(n,e,t=e,r=R.empty){if(e==t&&!r.size)return null;let i=n.resolve(e),o=n.resolve(t);return vh(i,o,r)?new we(e,t,r):new Rb(i,o,r).fit()}function vh(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}class Rb{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=_.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=_.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=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 ke(r.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||r.pos!=this.$to.pos?new we(r.pos,i.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<e;r++){let o=t.firstChild;if(t.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){e=r;break}t=o.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=rs(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:c}=this.frontier[l],u,f=null;if(t==1&&(s?c.matchType(s.type)||(f=c.fillBefore(_.from(s),!1)):o&&a.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:l,parent:o,inject:f};if(t==2&&s&&(u=c.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:l,parent:o,wrap:u};if(o&&c.matchType(o.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=rs(e,t);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new R(e,t+1,Math.max(r,i.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=rs(e,t);if(i.childCount<=1&&t>0){let o=e.size-t<=t+i.size;this.unplaced=new R(vr(e,t-1,1),t-1,o?t-1:r)}else this.unplaced=new R(vr(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:i,wrap:o}){for(;this.depth>t;)this.closeFrontierNode();if(o)for(let m=0;m<o.length;m++)this.openFrontierNode(o[m]);let s=this.unplaced,l=r?r.content:s.content,a=s.openStart-e,c=0,u=[],{match:f,type:h}=this.frontier[t];if(i){for(let m=0;m<i.childCount;m++)u.push(i.child(m));f=f.matchFragment(i)}let d=l.size+e-(s.content.size-s.openEnd);for(;c<l.childCount;){let m=l.child(c),y=f.matchType(m.type);if(!y)break;c++,(c>1||a==0||m.content.size)&&(f=y,u.push(Ch(m.mark(h.allowedMarks(m.marks)),c==1?a:0,c==l.childCount?d:-1)))}let p=c==l.childCount;p||(d=-1),this.placed=Cr(this.placed,t,_.from(u)),this.frontier[t].match=f,p&&d<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,y=l;m<d;m++){let g=y.lastChild;this.frontier.push({type:g.type,match:g.contentMatchAt(g.childCount)}),y=g.content}this.unplaced=p?e==0?R.empty:new R(vr(s.content,e-1,1),e-1,d<0?s.openEnd:e-1):new R(vr(s.content,e,c),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!is(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:i}=this.frontier[t],o=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),s=is(e,t,i,r,o);if(s){for(let l=t-1;l>=0;l--){let{match:a,type:c}=this.frontier[l],u=is(e,l,c,a,!0);if(!u||u.childCount)continue e}return{depth:t,fit:s,move:o?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=Cr(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.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,t=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=Cr(this.placed,this.depth,_.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(_.empty,!0);t.childCount&&(this.placed=Cr(this.placed,this.frontier.length,t))}}function vr(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(vr(n.firstChild.content,e-1,t)))}function Cr(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(Cr(n.lastChild.content,e-1,t)))}function rs(n,e){for(let t=0;t<e;t++)n=n.firstChild.content;return n}function Ch(n,e,t){if(e<=0)return n;let r=n.content;return e>1&&(r=r.replaceChild(0,Ch(r.firstChild,e-1,r.childCount==1?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(_.empty,!0)))),n.copy(r)}function is(n,e,t,r,i){let o=n.node(e),s=i?n.indexAfter(e):n.index(e);if(s==o.childCount&&!t.compatibleContent(o.type))return null;let l=r.fillBefore(o.content,!0,s);return l&&!zb(t,o.content,s)?l:null}function zb(n,e,t){for(let r=t;r<e.childCount;r++)if(!n.allowsMarks(e.child(r).marks))return!0;return!1}function Fb(n){return n.spec.defining||n.spec.definingForContent}function Pb(n,e,t,r){if(!r.size)return n.deleteRange(e,t);let i=n.doc.resolve(e),o=n.doc.resolve(t);if(vh(i,o,r))return n.step(new we(e,t,r));let s=Oh(i,n.doc.resolve(t));s[s.length-1]==0&&s.pop();let l=-(i.depth+1);s.unshift(l);for(let h=i.depth,d=i.pos-1;h>0;h--,d--){let p=i.node(h).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;s.indexOf(h)>-1?l=h:i.before(h)==d&&s.splice(1,0,-h)}let a=s.indexOf(l),c=[],u=r.openStart;for(let h=r.content,d=0;;d++){let p=h.firstChild;if(c.push(p),d==r.openStart)break;h=p.content}for(let h=u-1;h>=0;h--){let d=c[h],p=Fb(d.type);if(p&&!d.sameMarkup(i.node(Math.abs(l)-1)))u=h;else if(p||!d.type.isTextblock)break}for(let h=r.openStart;h>=0;h--){let d=(h+u+1)%(r.openStart+1),p=c[d];if(p)for(let m=0;m<s.length;m++){let y=s[(m+a)%s.length],g=!0;y<0&&(g=!1,y=-y);let v=i.node(y-1),x=i.index(y-1);if(v.canReplaceWith(x,x,p.type,p.marks))return n.replace(i.before(y),g?o.after(y):t,new R(Ah(r.content,0,r.openStart,d),d,r.openEnd))}}let f=n.steps.length;for(let h=s.length-1;h>=0&&(n.replace(e,t,r),!(n.steps.length>f));h--){let d=s[h];d<0||(e=i.before(d),t=o.after(d))}}function Ah(n,e,t,r,i){if(e<t){let o=n.firstChild;n=n.replaceChild(0,o.copy(Ah(o.content,e+1,t,r,o)))}if(e>r){let o=i.contentMatchAt(0),s=o.fillBefore(n).append(n);n=s.append(o.matchFragment(s).fillBefore(_.empty,!0))}return n}function Lb(n,e,t,r){if(!r.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let i=Db(n.doc,e,r.type);i!=null&&(e=t=i)}n.replaceRange(e,t,new R(_.from(r),0,0))}function Bb(n,e,t){let r=n.doc.resolve(e),i=n.doc.resolve(t),o=Oh(r,i);for(let s=0;s<o.length;s++){let l=o[s],a=s==o.length-1;if(a&&l==0||r.node(l).type.contentMatch.validEnd)return n.delete(r.start(l),i.end(l));if(l>0&&(a||r.node(l-1).canReplace(r.index(l-1),i.indexAfter(l-1))))return n.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&&t>r.end(s)&&i.end(s)-t!=i.depth-s)return n.delete(r.before(s),t);n.delete(e,t)}function Oh(n,e){let t=[],r=Math.min(n.depth,e.depth);for(let i=r;i>=0;i--){let o=n.start(i);if(o<n.pos-(n.depth-i)||e.end(i)>e.pos+(e.depth-i)||n.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(o==e.start(i)||i==n.depth&&i==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==o-1)&&t.push(i)}return t}class Kn extends Se{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return ae.fail("No node at attribute step's position");let r=Object.create(null);for(let o in t.attrs)r[o]=t.attrs[o];r[this.attr]=this.value;let i=t.type.create(r,null,t.marks);return ae.fromReplace(e,this.pos,this.pos+1,new R(_.from(i),0,t.isLeaf?0:1))}getMap(){return qe.empty}invert(e){return new Kn(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Kn(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Kn(t.pos,t.attr,t.value)}}Se.jsonID("attr",Kn);class Yr extends Se{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let i in e.attrs)t[i]=e.attrs[i];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return ae.ok(r)}getMap(){return qe.empty}invert(e){return new Yr(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Yr(t.attr,t.value)}}Se.jsonID("docAttr",Yr);let or=class extends Error{};or=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t};or.prototype=Object.create(Error.prototype);or.prototype.constructor=or;or.prototype.name="TransformError";class Mh{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Jn}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new or(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,r=R.empty){let i=Ul(this.doc,e,t,r);return i&&this.step(i),this}replaceWith(e,t,r){return this.replace(e,t,new R(_.from(r),0,0))}delete(e,t){return this.replace(e,t,R.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return Pb(this,e,t,r),this}replaceRangeWith(e,t,r){return Lb(this,e,t,r),this}deleteRange(e,t){return Bb(this,e,t),this}lift(e,t){return xb(this,e,t),this}join(e,t=1){return Nb(this,e,t),this}wrap(e,t){return vb(this,e,t),this}setBlockType(e,t=e,r,i=null){return Cb(this,e,t,r,i),this}setNodeMarkup(e,t,r=null,i){return Eb(this,e,t,r,i),this}setNodeAttribute(e,t,r){return this.step(new Kn(e,t,r)),this}setDocAttribute(e,t){return this.step(new Yr(e,t)),this}addNodeMark(e,t){return this.step(new Xt(e,t)),this}removeNodeMark(e,t){if(!(t instanceof ee)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(t=t.isInSet(r.marks),!t)return this}return this.step(new ir(e,t)),this}split(e,t=1,r){return _b(this,e,t,r),this}addMark(e,t,r){return yb(this,e,t,r),this}removeMark(e,t,r){return bb(this,e,t,r),this}clearIncompatible(e,t,r){return kh(this,e,t,r),this}}const ss=Object.create(null);class q{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new so(e.min(t),e.max(t))]}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 t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=R.empty){let r=t.content.lastChild,i=null;for(let l=0;l<t.openEnd;l++)i=r,r=r.lastChild;let o=e.steps.length,s=this.ranges;for(let l=0;l<s.length;l++){let{$from:a,$to:c}=s[l],u=e.mapping.slice(o);e.replaceRange(u.map(a.pos),u.map(c.pos),l?R.empty:t),l==0&&Tc(e,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,t){let r=e.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:s,$to:l}=i[o],a=e.mapping.slice(r),c=a.map(s.pos),u=a.map(l.pos);o?e.deleteRange(c,u):(e.replaceRangeWith(c,u,t),Tc(e,r,t.isInline?-1:1))}}static findFrom(e,t,r=!1){let i=e.parent.inlineContent?new X(e):jn(e.node(0),e.parent,e.pos,e.index(),t,r);if(i)return i;for(let o=e.depth-1;o>=0;o--){let s=t<0?jn(e.node(0),e.node(o),e.before(o+1),e.index(o),t,r):jn(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,r);if(s)return s}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Ke(e.node(0))}static atStart(e){return jn(e,e,0,0,1)||new Ke(e)}static atEnd(e){return jn(e,e,e.content.size,e.childCount,-1)||new Ke(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=ss[t.type];if(!r)throw new RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in ss)throw new RangeError("Duplicate use of selection JSON ID "+e);return ss[e]=t,t.prototype.jsonID=e,t}getBookmark(){return X.between(this.$anchor,this.$head).getBookmark()}}q.prototype.visible=!0;class so{constructor(e,t){this.$from=e,this.$to=t}}let Ec=!1;function _c(n){!Ec&&!n.parent.inlineContent&&(Ec=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class X extends q{constructor(e,t=e){_c(e),_c(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return q.near(r);let i=e.resolve(t.map(this.anchor));return new X(i.parent.inlineContent?i:r,r)}replace(e,t=R.empty){if(super.replace(e,t),t==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 To(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new X(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let i=e.resolve(t);return new this(i,r==t?i:e.resolve(r))}static between(e,t,r){let i=e.pos-t.pos;if((!r||i)&&(r=i>=0?1:-1),!t.parent.inlineContent){let o=q.findFrom(t,r,!0)||q.findFrom(t,-r,!0);if(o)t=o.$head;else return q.near(t,r)}return e.parent.inlineContent||(i==0?e=t:(e=(q.findFrom(e,-r,!0)||q.findFrom(e,r,!0)).$anchor,e.pos<t.pos!=i<0&&(e=t))),new X(e,t)}}q.jsonID("text",X);class To{constructor(e,t){this.anchor=e,this.head=t}map(e){return new To(e.map(this.anchor),e.map(this.head))}resolve(e){return X.between(e.resolve(this.anchor),e.resolve(this.head))}}class $ extends q{constructor(e){let t=e.nodeAfter,r=e.node(0).resolve(e.pos+t.nodeSize);super(e,r),this.node=t}map(e,t){let{deleted:r,pos:i}=t.mapResult(this.anchor),o=e.resolve(i);return r?q.near(o):new $(o)}content(){return new R(_.from(this.node),0,0)}eq(e){return e instanceof $&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Jl(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new $(e.resolve(t.anchor))}static create(e,t){return new $(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}$.prototype.visible=!1;q.jsonID("node",$);class Jl{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:r}=e.mapResult(this.anchor);return t?new To(r,r):new Jl(r)}resolve(e){let t=e.resolve(this.anchor),r=t.nodeAfter;return r&&$.isSelectable(r)?new $(t):q.near(t)}}class Ke extends q{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=R.empty){if(t==R.empty){e.delete(0,e.doc.content.size);let r=q.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new Ke(e)}map(e){return new Ke(e)}eq(e){return e instanceof Ke}getBookmark(){return Vb}}q.jsonID("all",Ke);const Vb={map(){return this},resolve(n){return new Ke(n)}};function jn(n,e,t,r,i,o=!1){if(e.inlineContent)return X.create(n,t);for(let s=r-(i>0?0:1);i>0?s<e.childCount:s>=0;s+=i){let l=e.child(s);if(l.isAtom){if(!o&&$.isSelectable(l))return $.create(n,t-(i<0?l.nodeSize:0))}else{let a=jn(n,l,t+i,i<0?l.childCount:0,i,o);if(a)return a}t+=l.nodeSize*i}return null}function Tc(n,e,t){let r=n.steps.length-1;if(r<e)return;let i=n.steps[r];if(!(i instanceof we||i instanceof ke))return;let o=n.mapping.maps[r],s;o.forEach((l,a,c,u)=>{s==null&&(s=u)}),n.setSelection(q.near(n.doc.resolve(s),t))}const Nc=1,Mi=2,Dc=4;class Hb extends Mh{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|Nc)&~Mi,this.storedMarks=null,this}get selectionSet(){return(this.updated&Nc)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Mi,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&Mi)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~Mi,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;return t&&(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,t,r){let i=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(r==null&&(r=t),r=r??t,!e)return this.deleteRange(t,r);let o=this.storedMarks;if(!o){let s=this.doc.resolve(t);o=r==t?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(t,r,i.text(e,o)),this.selection.empty||this.setSelection(q.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,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|=Dc,this}get scrolledIntoView(){return(this.updated&Dc)>0}}function Ic(n,e){return!e||!n?n:n.bind(e)}class Ar{constructor(e,t,r){this.name=e,this.init=Ic(t.init,r),this.apply=Ic(t.apply,r)}}const $b=[new Ar("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new Ar("selection",{init(n,e){return n.selection||q.atStart(e.doc)},apply(n){return n.selection}}),new Ar("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,r){return r.selection.$cursor?n.storedMarks:null}}),new Ar("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}})];class ls{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=$b.slice(),t&&t.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 Ar(r.key,r.spec.state,r))})}}class Or{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,t=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=t){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],r=this.applyInner(e),i=null;for(;;){let o=!1;for(let s=0;s<this.config.plugins.length;s++){let l=this.config.plugins[s];if(l.spec.appendTransaction){let a=i?i[s].n:0,c=i?i[s].state:this,u=a<t.length&&l.spec.appendTransaction.call(l,a?t.slice(a):t,c,r);if(u&&r.filterTransaction(u,s)){if(u.setMeta("appendedTransaction",e),!i){i=[];for(let f=0;f<this.config.plugins.length;f++)i.push(f<s?{state:r,n:t.length}:{state:this,n:0})}t.push(u),r=r.applyInner(u),o=!0}i&&(i[s]={state:r,n:t.length})}}if(!o)return{state:r,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new Or(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let o=r[i];t[o.name]=o.apply(e,this[o.name],this,t)}return t}get tr(){return new Hb(this)}static create(e){let t=new ls(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Or(t);for(let i=0;i<t.fields.length;i++)r[t.fields[i].name]=t.fields[i].init(e,r);return r}reconfigure(e){let t=new ls(this.schema,e.plugins),r=t.fields,i=new Or(t);for(let o=0;o<r.length;o++){let s=r[o].name;i[s]=this.hasOwnProperty(s)?this[s]:r[o].init(e,i)}return i}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[r],o=i.spec.state;o&&o.toJSON&&(t[r]=o.toJSON.call(i,this[i.key]))}return t}static fromJSON(e,t,r){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new ls(e.schema,e.plugins),o=new Or(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=An.fromJSON(e.schema,t.doc);else if(s.name=="selection")o.selection=q.fromJSON(o.doc,t.selection);else if(s.name=="storedMarks")t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],c=a.spec.state;if(a.key==s.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(t,l)){o[s.name]=c.fromJSON.call(a,e,t[l],o);return}}o[s.name]=s.init(e,o)}}),o}}function Eh(n,e,t){for(let r in n){let i=n[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=Eh(i,e,{})),t[r]=i}return t}class oi{constructor(e){this.spec=e,this.props={},e.props&&Eh(e.props,this,this.props),this.key=e.key?e.key.key:_h("plugin")}getState(e){return e[this.key]}}const as=Object.create(null);function _h(n){return n in as?n+"$"+ ++as[n]:(as[n]=0,n+"$")}class hr{constructor(e="key"){this.key=_h(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}class cn{constructor(e,t,r={}){this.match=e,this.match=e,this.handler=typeof t=="string"?jb(t):t,this.undoable=r.undoable!==!1,this.inCode=r.inCode||!1}}function jb(n){return function(e,t,r,i){let o=n;if(t[1]){let s=t[0].lastIndexOf(t[1]);o+=t[0].slice(s+t[1].length),r+=s;let l=r-i;l>0&&(o=t[0].slice(s-l,s)+o,r=i)}return e.tr.insertText(o,r,i)}}const vv=(n,e)=>{let t=n.plugins;for(let r=0;r<t.length;r++){let i=t[r],o;if(i.spec.isInputRules&&(o=i.getState(n))){if(e){let s=n.tr,l=o.transform;for(let a=l.steps.length-1;a>=0;a--)s.step(l.steps[a].invert(l.docs[a]));if(o.text){let a=s.doc.resolve(o.from).marks();s.replaceWith(o.from,o.to,n.schema.text(o.text,a))}else s.delete(o.from,o.to);e(s)}return!0}}return!1};new cn(/--$/,"—");new cn(/\.\.\.$/,"…");new cn(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“");new cn(/"$/,"”");new cn(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘");new cn(/'$/,"’");function Cv(n,e,t=null,r){return new cn(n,(i,o,s,l)=>{let a=t instanceof Function?t(o):t,c=i.tr.delete(s,l),u=c.doc.resolve(s),f=u.blockRange(),h=f&&Sh(f,e,a);if(!h)return null;c.wrap(f,h);let d=c.doc.resolve(s-1).nodeBefore;return d&&d.type==e&&_o(c.doc,s-1)&&(!r||r(o,d))&&c.join(s-1),c})}function Av(n,e,t=null){return new cn(n,(r,i,o,s)=>{let l=r.doc.resolve(o),a=t instanceof Function?t(i):t;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=(n,e)=>n.selection.empty?!1:(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);function qb(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("backward",n):t.parentOffset>0)?null:t}const Wb=(n,e,t)=>{let r=qb(n,t);if(!r)return!1;let i=Nh(r);if(!i){let s=r.blockRange(),l=s&&Eo(s);return l==null?!1:(e&&e(n.tr.lift(s,l).scrollIntoView()),!0)}let o=i.nodeBefore;if(Ih(n,i,e,-1))return!0;if(r.parent.content.size==0&&(sr(o,"end")||$.isSelectable(o)))for(let s=r.depth;;s--){let l=Ul(n.doc,r.before(s),r.after(s),R.empty);if(l&&l.slice.size<l.to-l.from){if(e){let a=n.tr.step(l);a.setSelection(sr(o,"end")?q.findFrom(a.doc.resolve(a.mapping.map(i.pos,-1)),-1):$.create(a.doc,i.pos-o.nodeSize)),e(a.scrollIntoView())}return!0}if(s==1||r.node(s-1).childCount>1)break}return o.isAtom&&i.depth==r.depth-1?(e&&e(n.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0):!1};function sr(n,e,t=!1){for(let r=n;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(t&&r.childCount!=1)return!1}return!1}const Ub=(n,e,t)=>{let{$head:r,empty:i}=n.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("backward",n):r.parentOffset>0)return!1;o=Nh(r)}let s=o&&o.nodeBefore;return!s||!$.isSelectable(s)?!1:(e&&e(n.tr.setSelection($.create(n.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)};function Nh(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}function Jb(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("forward",n):t.parentOffset<t.parent.content.size)?null:t}const Kb=(n,e,t)=>{let r=Jb(n,t);if(!r)return!1;let i=Dh(r);if(!i)return!1;let o=i.nodeAfter;if(Ih(n,i,e,1))return!0;if(r.parent.content.size==0&&(sr(o,"start")||$.isSelectable(o))){let s=Ul(n.doc,r.before(),r.after(),R.empty);if(s&&s.slice.size<s.to-s.from){if(e){let l=n.tr.step(s);l.setSelection(sr(o,"start")?q.findFrom(l.doc.resolve(l.mapping.map(i.pos)),1):$.create(l.doc,l.mapping.map(i.pos))),e(l.scrollIntoView())}return!0}}return o.isAtom&&i.depth==r.depth-1?(e&&e(n.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0):!1},Yb=(n,e,t)=>{let{$head:r,empty:i}=n.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("forward",n):r.parentOffset<r.parent.content.size)return!1;o=Dh(r)}let s=o&&o.nodeAfter;return!s||!$.isSelectable(s)?!1:(e&&e(n.tr.setSelection($.create(n.doc,o.pos)).scrollIntoView()),!0)};function Dh(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){let t=n.node(e);if(n.index(e)+1<t.childCount)return n.doc.resolve(n.after(e+1));if(t.type.spec.isolating)break}return null}const Gb=(n,e)=>{let{$head:t,$anchor:r}=n.selection;return!t.parent.type.spec.code||!t.sameParent(r)?!1:(e&&e(n.tr.insertText(` |
| 62 |
`).scrollIntoView()),!0)};function Kl(n){for(let e=0;e<n.edgeCount;e++){let{type:t}=n.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}const Xb=(n,e)=>{let{$head:t,$anchor:r}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(r))return!1;let i=t.node(-1),o=t.indexAfter(-1),s=Kl(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(e){let l=t.after(),a=n.tr.replaceWith(l,l,s.createAndFill());a.setSelection(q.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},Qb=(n,e)=>{let t=n.selection,{$from:r,$to:i}=t;if(t instanceof Ke||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=Kl(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let s=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,l=n.tr.insert(s,o.createAndFill());l.setSelection(X.create(l.doc,s+1)),e(l.scrollIntoView())}return!0},Zb=(n,e)=>{let{$cursor:t}=n.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let o=t.before();if(Pr(n.doc,o))return e&&e(n.tr.split(o).scrollIntoView()),!0}let r=t.blockRange(),i=r&&Eo(r);return i==null?!1:(e&&e(n.tr.lift(r,i).scrollIntoView()),!0)};function ew(n){return(e,t)=>{let{$from:r,$to:i}=e.selection;if(e.selection instanceof $&&e.selection.node.isBlock)return!r.parentOffset||!Pr(e.doc,r.pos)?!1:(t&&t(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(t){let o=i.parentOffset==i.parent.content.size,s=e.tr;(e.selection instanceof X||e.selection instanceof Ke)&&s.deleteSelection();let l=r.depth==0?null:Kl(r.node(-1).contentMatchAt(r.indexAfter(-1))),a=n&&n(i.parent,o,r),c=a?[a]:o&&l?[{type:l}]:void 0,u=Pr(s.doc,s.mapping.map(r.pos),1,c);if(!c&&!u&&Pr(s.doc,s.mapping.map(r.pos),1,l?[{type:l}]:void 0)&&(l&&(c=[{type:l}]),u=!0),u&&(s.split(s.mapping.map(r.pos),1,c),!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)}t(s.scrollIntoView())}return!0}}const tw=ew(),nw=(n,e)=>(e&&e(n.tr.setSelection(new Ke(n.doc))),!0);function rw(n,e,t){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)?(t&&t(n.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(o,o+1)||!(i.isTextblock||_o(n.doc,e.pos))?!1:(t&&t(n.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),!0)}function Ih(n,e,t,r){let i=e.nodeBefore,o=e.nodeAfter,s,l,a=i.type.spec.isolating||o.type.spec.isolating;if(!a&&rw(n,e,t))return!0;let c=!a&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(s=(l=i.contentMatchAt(i.childCount)).findWrapping(o.type))&&l.matchType(s[0]||o.type).validEnd){if(t){let d=e.pos+o.nodeSize,p=_.empty;for(let g=s.length-1;g>=0;g--)p=_.from(s[g].create(null,p));p=_.from(i.copy(p));let m=n.tr.step(new ke(e.pos-1,d,e.pos,d,new R(p,1,0),s.length,!0)),y=d+2*s.length;_o(m.doc,y)&&m.join(y),t(m.scrollIntoView())}return!0}let u=o.type.spec.isolating||r>0&&a?null:q.findFrom(e,1),f=u&&u.$from.blockRange(u.$to),h=f&&Eo(f);if(h!=null&&h>=e.depth)return t&&t(n.tr.lift(f,h).scrollIntoView()),!0;if(c&&sr(o,"start",!0)&&sr(i,"end")){let d=i,p=[];for(;p.push(d),!d.isTextblock;)d=d.lastChild;let m=o,y=1;for(;!m.isTextblock;m=m.firstChild)y++;if(d.canReplace(d.childCount,d.childCount,m.content)){if(t){let g=_.empty;for(let x=p.length-1;x>=0;x--)g=_.from(p[x].copy(g));let v=n.tr.step(new ke(e.pos-p.length,e.pos+o.nodeSize,e.pos+y,e.pos+o.nodeSize-y,new R(g,p.length,0),0,!0));t(v.scrollIntoView())}return!0}}return!1}function Rh(n){return function(e,t){let r=e.selection,i=n<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return i.node(o).isTextblock?(t&&t(e.tr.setSelection(X.create(e.doc,n<0?i.start(o):i.end(o)))),!0):!1}}const iw=Rh(-1),ow=Rh(1);function Ov(n,e=null){return function(t,r){let{$from:i,$to:o}=t.selection,s=i.blockRange(o),l=s&&Sh(s,n,e);return l?(r&&r(t.tr.wrap(s,l).scrollIntoView()),!0):!1}}function Mv(n,e=null){return function(t,r){let i=!1;for(let o=0;o<t.selection.ranges.length&&!i;o++){let{$from:{pos:s},$to:{pos:l}}=t.selection.ranges[o];t.doc.nodesBetween(s,l,(a,c)=>{if(i)return!1;if(!(!a.isTextblock||a.hasMarkup(n,e)))if(a.type==n)i=!0;else{let u=t.doc.resolve(c),f=u.index();i=u.parent.canReplaceWith(f,f+1,n)}})}if(!i)return!1;if(r){let o=t.tr;for(let s=0;s<t.selection.ranges.length;s++){let{$from:{pos:l},$to:{pos:a}}=t.selection.ranges[s];o.setBlockType(l,a,n,e)}r(o.scrollIntoView())}return!0}}function sw(n,e,t,r){for(let i=0;i<e.length;i++){let{$from:o,$to:s}=e[i],l=o.depth==0?n.inlineContent&&n.type.allowsMarkType(t):!1;if(n.nodesBetween(o.pos,s.pos,(a,c)=>{if(l||!r&&a.isAtom&&a.isInline&&c>=o.pos&&c+a.nodeSize<=s.pos)return!1;l=a.inlineContent&&a.type.allowsMarkType(t)}),l)return!0}return!1}function lw(n){let e=[];for(let t=0;t<n.length;t++){let{$from:r,$to:i}=n[t];r.doc.nodesBetween(r.pos,i.pos,(o,s)=>{if(o.isAtom&&o.content.size&&o.isInline&&s>=r.pos&&s+o.nodeSize<=i.pos)return s+1>r.pos&&e.push(new so(r,r.doc.resolve(s+1))),r=r.doc.resolve(s+1+o.content.size),!1}),r.pos<i.pos&&e.push(new so(r,i))}return e}function Ev(n,e=null,t){let r=(t&&t.removeWhenPresent)!==!1,i=(t&&t.enterInlineAtoms)!==!1;return function(o,s){let{empty:l,$cursor:a,ranges:c}=o.selection;if(l&&!a||!sw(o.doc,c,n,i))return!1;if(s)if(a)n.isInSet(o.storedMarks||a.marks())?s(o.tr.removeStoredMark(n)):s(o.tr.addStoredMark(n.create(e)));else{let u,f=o.tr;i||(c=lw(c)),r?u=!c.some(h=>o.doc.rangeHasMark(h.$from.pos,h.$to.pos,n)):u=!c.every(h=>{let d=!1;return f.doc.nodesBetween(h.$from.pos,h.$to.pos,(p,m,y)=>{if(d)return!1;d=!n.isInSet(p.marks)&&!!y&&y.type.allowsMarkType(n)&&!(p.isText&&/^\s*$/.test(p.textBetween(Math.max(0,h.$from.pos-m),Math.min(p.nodeSize,h.$to.pos-m))))}),!d});for(let h=0;h<c.length;h++){let{$from:d,$to:p}=c[h];if(!u)f.removeMark(d.pos,p.pos,n);else{let m=d.pos,y=p.pos,g=d.nodeAfter,v=p.nodeBefore,x=g&&g.isText?/^\s*/.exec(g.text)[0].length:0,C=v&&v.isText?/\s*$/.exec(v.text)[0].length:0;m+x<y&&(m+=x,y-=C),f.addMark(m,y,n.create(e))}}s(f.scrollIntoView())}return!0}}function Yl(...n){return function(e,t,r){for(let i=0;i<n.length;i++)if(n[i](e,t,r))return!0;return!1}}let cs=Yl(Th,Wb,Ub),Rc=Yl(Th,Kb,Yb);const Dt={Enter:Yl(Gb,Qb,Zb,tw),"Mod-Enter":Xb,Backspace:cs,"Mod-Backspace":cs,"Shift-Backspace":cs,Delete:Rc,"Mod-Delete":Rc,"Mod-a":nw},zh={"Ctrl-h":Dt.Backspace,"Alt-Backspace":Dt["Mod-Backspace"],"Ctrl-d":Dt.Delete,"Ctrl-Alt-Backspace":Dt["Mod-Delete"],"Alt-Delete":Dt["Mod-Delete"],"Alt-d":Dt["Mod-Delete"],"Ctrl-a":iw,"Ctrl-e":ow};for(let n in Dt)zh[n]=Dt[n];const aw=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1,_v=aw?zh:Dt;var on={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},lo={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},cw=typeof navigator<"u"&&/Mac/.test(navigator.platform),uw=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var me=0;me<10;me++)on[48+me]=on[96+me]=String(me);for(var me=1;me<=24;me++)on[me+111]="F"+me;for(var me=65;me<=90;me++)on[me]=String.fromCharCode(me+32),lo[me]=String.fromCharCode(me);for(var us in on)lo.hasOwnProperty(us)||(lo[us]=on[us]);function fw(n){var e=cw&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||uw&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?lo:on)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}const hw=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function dw(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let r,i,o,s;for(let l=0;l<e.length-1;l++){let a=e[l];if(/^(cmd|meta|m)$/i.test(a))s=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))i=!0;else if(/^s(hift)?$/i.test(a))o=!0;else if(/^mod$/i.test(a))hw?s=!0:i=!0;else throw new Error("Unrecognized modifier name: "+a)}return r&&(t="Alt-"+t),i&&(t="Ctrl-"+t),s&&(t="Meta-"+t),o&&(t="Shift-"+t),t}function pw(n){let e=Object.create(null);for(let t in n)e[dw(t)]=n[t];return e}function fs(n,e,t=!0){return e.altKey&&(n="Alt-"+n),e.ctrlKey&&(n="Ctrl-"+n),e.metaKey&&(n="Meta-"+n),t&&e.shiftKey&&(n="Shift-"+n),n}function Tv(n){return new oi({props:{handleKeyDown:Fh(n)}})}function Fh(n){let e=pw(n);return function(t,r){let i=fw(r),o,s=e[fs(i,r)];if(s&&s(t.state,t.dispatch,t))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let l=e[fs(i,r,!1)];if(l&&l(t.state,t.dispatch,t))return!0}if((r.shiftKey||r.altKey||r.metaKey||i.charCodeAt(0)>127)&&(o=on[r.keyCode])&&o!=i){let l=e[fs(o,r)];if(l&&l(t.state,t.dispatch,t))return!0}}return!1}}const ge=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},Gr=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e};let tl=null;const Nt=function(n,e,t){let r=tl||(tl=document.createRange());return r.setEnd(n,t??n.nodeValue.length),r.setStart(n,e||0),r},mw=function(){tl=null},Nn=function(n,e,t,r){return t&&(zc(n,e,t,r,-1)||zc(n,e,t,r,1))},gw=/^(img|br|input|textarea|hr)$/i;function zc(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:Qe(n))){let o=n.parentNode;if(!o||o.nodeType!=1||si(n)||gw.test(n.nodeName)||n.contentEditable=="false")return!1;e=ge(n)+(i<0?0:1),n=o}else if(n.nodeType==1){if(n=n.childNodes[e+(i<0?-1:0)],n.contentEditable=="false")return!1;e=i<0?Qe(n):0}else return!1}}function Qe(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function yw(n,e){for(;;){if(n.nodeType==3&&e)return n;if(n.nodeType==1&&e>0){if(n.contentEditable=="false")return null;n=n.childNodes[e-1],e=Qe(n)}else if(n.parentNode&&!si(n))e=ge(n),n=n.parentNode;else return null}}function bw(n,e){for(;;){if(n.nodeType==3&&e<n.nodeValue.length)return n;if(n.nodeType==1&&e<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[e],e=0}else if(n.parentNode&&!si(n))e=ge(n)+1,n=n.parentNode;else return null}}function ww(n,e,t){for(let r=e==0,i=e==Qe(n);r||i;){if(n==t)return!0;let o=ge(n);if(n=n.parentNode,!n)return!1;r=r&&o==0,i=i&&o==Qe(n)}}function si(n){let e;for(let t=n;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==n||e.contentDOM==n)}const No=function(n){return n.focusNode&&Nn(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function mn(n,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=n,t.key=t.code=e,t}function xw(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function kw(n,e,t){if(n.caretPositionFromPoint)try{let r=n.caretPositionFromPoint(e,t);if(r)return{node:r.offsetNode,offset:Math.min(Qe(r.offsetNode),r.offset)}}catch{}if(n.caretRangeFromPoint){let r=n.caretRangeFromPoint(e,t);if(r)return{node:r.startContainer,offset:Math.min(Qe(r.startContainer),r.startOffset)}}}const Ct=typeof navigator<"u"?navigator:null,Fc=typeof document<"u"?document:null,un=Ct&&Ct.userAgent||"",nl=/Edge\/(\d+)/.exec(un),Ph=/MSIE \d/.exec(un),rl=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(un),Le=!!(Ph||rl||nl),Zt=Ph?document.documentMode:rl?+rl[1]:nl?+nl[1]:0,pt=!Le&&/gecko\/(\d+)/i.test(un);pt&&+(/Firefox\/(\d+)/.exec(un)||[0,0])[1];const il=!Le&&/Chrome\/(\d+)/.exec(un),xe=!!il,Lh=il?+il[1]:0,_e=!Le&&!!Ct&&/Apple Computer/.test(Ct.vendor),lr=_e&&(/Mobile\/\w+/.test(un)||!!Ct&&Ct.maxTouchPoints>2),Ge=lr||(Ct?/Mac/.test(Ct.platform):!1),Sw=Ct?/Win/.test(Ct.platform):!1,at=/Android \d/.test(un),li=!!Fc&&"webkitFontSmoothing"in Fc.documentElement.style,vw=li?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Cw(n){let e=n.defaultView&&n.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function _t(n,e){return typeof n=="number"?n:n[e]}function Aw(n){let e=n.getBoundingClientRect(),t=e.width/n.offsetWidth||1,r=e.height/n.offsetHeight||1;return{left:e.left,right:e.left+n.clientWidth*t,top:e.top,bottom:e.top+n.clientHeight*r}}function Pc(n,e,t){let r=n.someProp("scrollThreshold")||0,i=n.someProp("scrollMargin")||5,o=n.dom.ownerDocument;for(let s=t||n.dom;s;s=Gr(s)){if(s.nodeType!=1)continue;let l=s,a=l==o.body,c=a?Cw(o):Aw(l),u=0,f=0;if(e.top<c.top+_t(r,"top")?f=-(c.top-e.top+_t(i,"top")):e.bottom>c.bottom-_t(r,"bottom")&&(f=e.bottom-e.top>c.bottom-c.top?e.top+_t(i,"top")-c.top:e.bottom-c.bottom+_t(i,"bottom")),e.left<c.left+_t(r,"left")?u=-(c.left-e.left+_t(i,"left")):e.right>c.right-_t(r,"right")&&(u=e.right-c.right+_t(i,"right")),u||f)if(a)o.defaultView.scrollBy(u,f);else{let h=l.scrollLeft,d=l.scrollTop;f&&(l.scrollTop+=f),u&&(l.scrollLeft+=u);let p=l.scrollLeft-h,m=l.scrollTop-d;e={left:e.left-p,top:e.top-m,right:e.right-p,bottom:e.bottom-m}}if(a||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function Ow(n){let e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top),r,i;for(let o=(e.left+e.right)/2,s=t+1;s<Math.min(innerHeight,e.bottom);s+=5){let l=n.root.elementFromPoint(o,s);if(!l||l==n.dom||!n.dom.contains(l))continue;let a=l.getBoundingClientRect();if(a.top>=t-20){r=l,i=a.top;break}}return{refDOM:r,refTop:i,stack:Bh(n.dom)}}function Bh(n){let e=[],t=n.ownerDocument;for(let r=n;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=t);r=Gr(r));return e}function Mw({refDOM:n,refTop:e,stack:t}){let r=n?n.getBoundingClientRect().top:0;Vh(t,r==0?0:r-e)}function Vh(n,e){for(let t=0;t<n.length;t++){let{dom:r,top:i,left:o}=n[t];r.scrollTop!=i+e&&(r.scrollTop=i+e),r.scrollLeft!=o&&(r.scrollLeft=o)}}let Vn=null;function Ew(n){if(n.setActive)return n.setActive();if(Vn)return n.focus(Vn);let e=Bh(n);n.focus(Vn==null?{get preventScroll(){return Vn={preventScroll:!0},!0}}:void 0),Vn||(Vn=!1,Vh(e,0))}function Hh(n,e){let t,r=2e8,i,o=0,s=e.top,l=e.top,a,c;for(let u=n.firstChild,f=0;u;u=u.nextSibling,f++){let h;if(u.nodeType==1)h=u.getClientRects();else if(u.nodeType==3)h=Nt(u).getClientRects();else continue;for(let d=0;d<h.length;d++){let p=h[d];if(p.top<=s&&p.bottom>=l){s=Math.max(p.bottom,s),l=Math.min(p.top,l);let m=p.left>e.left?p.left-e.left:p.right<e.left?e.left-p.right:0;if(m<r){t=u,r=m,i=m&&t.nodeType==3?{left:p.right<e.left?p.right:p.left,top:e.top}:e,u.nodeType==1&&m&&(o=f+(e.left>=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!a&&p.left<=e.left&&p.right>=e.left&&(a=u,c={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!t&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(o=f+1)}}return!t&&a&&(t=a,i=c,r=0),t&&t.nodeType==3?_w(t,i):!t||r&&t.nodeType==1?{node:n,offset:o}:Hh(t,i)}function _w(n,e){let t=n.nodeValue.length,r=document.createRange();for(let i=0;i<t;i++){r.setEnd(n,i+1),r.setStart(n,i);let o=qt(r,1);if(o.top!=o.bottom&&Gl(e,o))return{node:n,offset:i+(e.left>=(o.left+o.right)/2?1:0)}}return{node:n,offset:0}}function Gl(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function Tw(n,e){let t=n.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left<n.getBoundingClientRect().left?t:n}function Nw(n,e,t){let{node:r,offset:i}=Hh(e,t),o=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();o=s.left!=s.right&&t.left>(s.left+s.right)/2?1:-1}return n.docView.posFromDOM(r,i,o)}function Dw(n,e,t,r){let i=-1;for(let o=e,s=!1;o!=n.dom;){let l=n.docView.nearestDesc(o,!0);if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)){let a=l.dom.getBoundingClientRect();if(l.node.isBlock&&l.parent&&(!s&&a.left>r.left||a.top>r.top?i=l.posBefore:(!s&&a.right<r.left||a.bottom<r.top)&&(i=l.posAfter),s=!0),!l.contentDOM&&i<0&&!l.node.isText)return(l.node.isBlock?r.top<(a.top+a.bottom)/2:r.left<(a.left+a.right)/2)?l.posBefore:l.posAfter}o=l.dom.parentNode}return i>-1?i:n.docView.posFromDOM(e,t,-1)}function $h(n,e,t){let r=n.childNodes.length;if(r&&t.top<t.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-t.top)/(t.bottom-t.top))-2)),o=i;;){let s=n.childNodes[o];if(s.nodeType==1){let l=s.getClientRects();for(let a=0;a<l.length;a++){let c=l[a];if(Gl(e,c))return $h(s,e,c)}}if((o=(o+1)%r)==i)break}return n}function Iw(n,e){let t=n.dom.ownerDocument,r,i=0,o=kw(t,e.left,e.top);o&&({node:r,offset:i}=o);let s=(n.root.elementFromPoint?n.root:t).elementFromPoint(e.left,e.top),l;if(!s||!n.dom.contains(s.nodeType!=1?s.parentNode:s)){let c=n.dom.getBoundingClientRect();if(!Gl(e,c)||(s=$h(n.dom,e,c),!s))return null}if(_e)for(let c=s;r&&c;c=Gr(c))c.draggable&&(r=void 0);if(s=Tw(s,e),r){if(pt&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let u=r.childNodes[i],f;u.nodeName=="IMG"&&(f=u.getBoundingClientRect()).right<=e.left&&f.bottom>e.top&&i++}let c;li&&i&&r.nodeType==1&&(c=r.childNodes[i-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&i--,r==n.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=n.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(l=Dw(n,r,i,e))}l==null&&(l=Nw(n,s,e));let a=n.docView.nearestDesc(s,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function Lc(n){return n.top<n.bottom||n.left<n.right}function qt(n,e){let t=n.getClientRects();if(t.length){let r=t[e<0?0:t.length-1];if(Lc(r))return r}return Array.prototype.find.call(t,Lc)||n.getBoundingClientRect()}const Rw=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function jh(n,e,t){let{node:r,offset:i,atom:o}=n.docView.domFromPos(e,t<0?-1:1),s=li||pt;if(r.nodeType==3)if(s&&(Rw.test(r.nodeValue)||(t<0?!i:i==r.nodeValue.length))){let a=qt(Nt(r,i,i),t);if(pt&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let c=qt(Nt(r,i-1,i-1),-1);if(c.top==a.top){let u=qt(Nt(r,i,i+1),-1);if(u.top!=a.top)return kr(u,u.left<c.left)}}return a}else{let a=i,c=i,u=t<0?1:-1;return t<0&&!i?(c++,u=-1):t>=0&&i==r.nodeValue.length?(a--,u=1):t<0?a--:c++,kr(qt(Nt(r,a,c),u),u<0)}if(!n.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&i&&(t<0||i==Qe(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return hs(a.getBoundingClientRect(),!1)}if(o==null&&i<Qe(r)){let a=r.childNodes[i];if(a.nodeType==1)return hs(a.getBoundingClientRect(),!0)}return hs(r.getBoundingClientRect(),t>=0)}if(o==null&&i&&(t<0||i==Qe(r))){let a=r.childNodes[i-1],c=a.nodeType==3?Nt(a,Qe(a)-(s?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(c)return kr(qt(c,1),!1)}if(o==null&&i<Qe(r)){let a=r.childNodes[i];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let c=a?a.nodeType==3?Nt(a,0,s?0:1):a.nodeType==1?a:null:null;if(c)return kr(qt(c,-1),!0)}return kr(qt(r.nodeType==3?Nt(r):r,-t),t>=0)}function kr(n,e){if(n.width==0)return n;let t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function hs(n,e){if(n.height==0)return n;let t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function qh(n,e,t){let r=n.state,i=n.root.activeElement;r!=e&&n.updateState(e),i!=n.dom&&n.focus();try{return t()}finally{r!=e&&n.updateState(r),i!=n.dom&&i&&i.focus()}}function zw(n,e,t){let r=e.selection,i=t=="up"?r.$from:r.$to;return qh(n,e,()=>{let{node:o}=n.docView.domFromPos(i.pos,t=="up"?-1:1);for(;;){let l=n.docView.nearestDesc(o,!0);if(!l)break;if(l.node.isBlock){o=l.contentDOM||l.dom;break}o=l.dom.parentNode}let s=jh(n,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=Nt(l,0,l.nodeValue.length).getClientRects();else continue;for(let c=0;c<a.length;c++){let u=a[c];if(u.bottom>u.top+1&&(t=="up"?s.top-u.top>(u.bottom-s.top)*2:u.bottom-s.bottom>(s.bottom-u.top)*2))return!1}}return!0})}const Fw=/[\u0590-\u08ac]/;function Pw(n,e,t){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=!i,s=i==r.parent.content.size,l=n.domSelection();return l?!Fw.test(r.parent.textContent)||!l.modify?t=="left"||t=="backward"?o:s:qh(n,e,()=>{let{focusNode:a,focusOffset:c,anchorNode:u,anchorOffset:f}=n.domSelectionRange(),h=l.caretBidiLevel;l.modify("move",t,"character");let d=r.depth?n.docView.domAfterPos(r.before()):n.dom,{focusNode:p,focusOffset:m}=n.domSelectionRange(),y=p&&!d.contains(p.nodeType==1?p:p.parentNode)||a==p&&c==m;try{l.collapse(u,f),a&&(a!=u||c!=f)&&l.extend&&l.extend(a,c)}catch{}return h!=null&&(l.caretBidiLevel=h),y}):r.pos==r.start()||r.pos==r.end()}let Bc=null,Vc=null,Hc=!1;function Lw(n,e,t){return Bc==e&&Vc==t?Hc:(Bc=e,Vc=t,Hc=t=="up"||t=="down"?zw(n,e,t):Pw(n,e,t))}const nt=0,$c=1,bn=2,At=3;class ai{constructor(e,t,r,i){this.parent=e,this.children=t,this.dom=r,this.contentDOM=i,this.dirty=nt,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,r=this.posAtStart;;t++){let i=this.children[t];if(i==e)return r;r+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let o,s;if(e==this.contentDOM)o=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.previousSibling}for(;o&&!((s=o.pmViewDesc)&&s.parent==this);)o=o.previousSibling;return o?this.posBeforeChild(s)+s.size:this.posAtStart}else{let o,s;if(e==this.contentDOM)o=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.nextSibling}for(;o&&!((s=o.pmViewDesc)&&s.parent==this);)o=o.nextSibling;return o?this.posBeforeChild(s):this.posAtEnd}let i;if(e==this.dom&&this.contentDOM)i=t>ge(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(t==0)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!1;break}if(o.previousSibling)break}if(i==null&&t==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,t=!1){for(let r=!0,i=e;i;i=i.parentNode){let o=this.getDesc(i),s;if(o&&(!t||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 t=e.pmViewDesc;for(let r=t;r;r=r.parent)if(r==this)return t}posFromDOM(e,t,r){for(let i=e;i;i=i.parentNode){let o=this.getDesc(i);if(o)return o.localPosFromDOM(e,t,r)}return-1}descAt(e){for(let t=0,r=0;t<this.children.length;t++){let i=this.children[t],o=r+i.size;if(r==e&&o!=r){for(;!i.border&&i.children.length;)i=i.children[0];return i}if(e<o)return i.descAt(e-r-i.border);r=o}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,i=0;for(let o=0;r<this.children.length;r++){let s=this.children[r],l=o+s.size;if(l>e||s instanceof Uh){i=e-o;break}o=l}if(i)return this.children[r].domFromPos(i-this.children[r].border,t);for(let o;r&&!(o=this.children[r-1]).size&&o instanceof Wh&&o.side>=0;r--);if(t<=0){let o,s=!0;for(;o=r?this.children[r-1]:null,!(!o||o.dom.parentNode==this.contentDOM);r--,s=!1);return o&&t&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,t):{node:this.contentDOM,offset:o?ge(o.dom)+1:0}}else{let o,s=!0;for(;o=r<this.children.length?this.children[r]:null,!(!o||o.dom.parentNode==this.contentDOM);r++,s=!1);return o&&s&&!o.border&&!o.domAtom?o.domFromPos(0,t):{node:this.contentDOM,offset:o?ge(o.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,o=-1;for(let s=r,l=0;;l++){let a=this.children[l],c=s+a.size;if(i==-1&&e<=c){let u=s+a.border;if(e>=u&&t<=c-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,t,u);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=ge(h.dom)+1;break}e-=h.size}i==-1&&(i=0)}if(i>-1&&(c>t||l==this.children.length-1)){t=c;for(let u=l+1;u<this.children.length;u++){let f=this.children[u];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){o=ge(f.dom);break}t+=f.size}o==-1&&(o=this.contentDOM.childNodes.length);break}s=c}return{node:this.contentDOM,from:e,to:t,fromOffset:i,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:r}=this.domFromPos(e,0);if(t.nodeType!=1||r==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[r]}setSelection(e,t,r,i=!1){let o=Math.min(e,t),s=Math.max(e,t);for(let h=0,d=0;h<this.children.length;h++){let p=this.children[h],m=d+p.size;if(o>d&&s<m)return p.setSelection(e-d-p.border,t-d-p.border,r,i);d=m}let l=this.domFromPos(e,e?-1:1),a=t==e?l:this.domFromPos(t,t?-1:1),c=r.getSelection(),u=!1;if((pt||_e)&&e==t){let{node:h,offset:d}=l;if(h.nodeType==3){if(u=!!(d&&h.nodeValue[d-1]==` |
| 63 |
`),u&&d==h.nodeValue.length)for(let p=h,m;p;p=p.parentNode){if(m=p.nextSibling){m.nodeName=="BR"&&(l=a={node:m.parentNode,offset:ge(m)+1});break}let y=p.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let p=h.childNodes[d-1];u=p&&(p.nodeName=="BR"||p.contentEditable=="false")}}if(pt&&c.focusNode&&c.focusNode!=a.node&&c.focusNode.nodeType==1){let h=c.focusNode.childNodes[c.focusOffset];h&&h.contentEditable=="false"&&(i=!0)}if(!(i||u&&_e)&&Nn(l.node,l.offset,c.anchorNode,c.anchorOffset)&&Nn(a.node,a.offset,c.focusNode,c.focusOffset))return;let f=!1;if((c.extend||e==t)&&!u){c.collapse(l.node,l.offset);try{e!=t&&c.extend(a.node,a.offset),f=!0}catch{}}if(!f){if(e>t){let d=l;l=a,a=d}let h=document.createRange();h.setEnd(a.node,a.offset),h.setStart(l.node,l.offset),c.removeAllRanges(),c.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,t){for(let r=0,i=0;i<this.children.length;i++){let o=this.children[i],s=r+o.size;if(r==s?e<=s&&t>=r:e<s&&t>r){let l=r+o.border,a=s-o.border;if(e>=l&&t<=a){this.dirty=e==r||t==s?bn:$c,e==l&&t==a&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=At:o.markDirty(e-l,t-l);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?bn:At}r=s}this.dirty=bn}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let r=e==1?bn:$c;t.dirty<r&&(t.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class Wh extends ai{constructor(e,t,r,i){let o,s=t.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!o)return i;if(o.parent)return o.parent.posBeforeChild(o)})),!t.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=t,this.widget=t,o=this}matchesWidget(e){return this.dirty==nt&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(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 Bw extends ai{constructor(e,t,r,i){super(e,[],t,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Dn extends ai{constructor(e,t,r,i){super(e,[],r,i),this.mark=t}static create(e,t,r,i){let o=i.nodeViews[t.type.name],s=o&&o(t,i,r);return(!s||!s.dom)&&(s=fr.renderSpec(document,t.type.spec.toDOM(t,r),null,t.attrs)),new Dn(e,t,s.dom,s.contentDOM||s.dom)}parseRule(){return this.dirty&At||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=At&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=nt){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=nt}}slice(e,t,r){let i=Dn.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;t<s&&(o=ll(o,t,s,r)),e>0&&(o=ll(o,0,e,r));for(let l=0;l<o.length;l++)o[l].parent=i;return i.children=o,i}}class en extends ai{constructor(e,t,r,i,o,s,l,a,c){super(e,[],o,s),this.node=t,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=l}static create(e,t,r,i,o,s){let l=o.nodeViews[t.type.name],a,c=l&&l(t,o,()=>{if(!a)return s;if(a.parent)return a.parent.posBeforeChild(a)},r,i),u=c&&c.dom,f=c&&c.contentDOM;if(t.isText){if(!u)u=document.createTextNode(t.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:f}=fr.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));!f&&!t.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),t.type.spec.draggable&&(u.draggable=!0));let h=u;return u=Yh(u,r,t),c?a=new Vw(e,t,r,i,u,f||null,h,c,o,s+1):t.isText?new Do(e,t,r,i,u,h,o):new en(e,t,r,i,u,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 t=this.children.length-1;t>=0;t--){let r=this.children[t];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>_.empty)}return e}matchesNode(e,t,r){return this.dirty==nt&&e.eq(this.node)&&sl(t,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let r=this.node.inlineContent,i=t,o=e.composing?this.localCompositionInfo(e,t):null,s=o&&o.pos>-1?o:null,l=o&&o.pos<0,a=new $w(this,s&&s.node,e);Ww(this.node,this.innerDeco,(c,u,f)=>{c.spec.marks?a.syncToMarks(c.spec.marks,r,e):c.type.side>=0&&!f&&a.syncToMarks(u==this.node.childCount?ee.none:this.node.child(u).marks,r,e),a.placeWidget(c,e,i)},(c,u,f,h)=>{a.syncToMarks(c.marks,r,e);let d;a.findNodeMatch(c,u,f,h)||l&&e.state.selection.from>i&&e.state.selection.to<i+c.nodeSize&&(d=a.findIndexWithChild(o.node))>-1&&a.updateNodeAt(c,u,f,d,e)||a.updateNextNode(c,u,f,e,h,i)||a.addNode(c,u,f,e,i),i+=c.nodeSize}),a.syncToMarks([],r,e),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==bn)&&(s&&this.protectLocalComposition(e,s),Jh(this.contentDOM,this.children,e),lr&&Uw(this.dom))}localCompositionInfo(e,t){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof X)||r<t||i>t+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=Jw(this.node.content,s,r-t,i-t);return l<0?null:{node:o,pos:l,text:s}}else return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:r,text:i}){if(this.getDesc(t))return;let o=t;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 Bw(this,o,t,i);e.input.compositionNodes.push(s),this.children=ll(this.children,r,r+i.length,e,s)}update(e,t,r,i){return this.dirty==At||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,r,i),!0)}updateInner(e,t,r,i){this.updateOuterDeco(t),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=nt}updateOuterDeco(e){if(sl(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Kh(this.dom,this.nodeDOM,ol(this.outerDeco,this.node,t),ol(e,this.node,t)),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 jc(n,e,t,r,i){Yh(r,e,n);let o=new en(void 0,n,e,t,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class Do extends en{constructor(e,t,r,i,o,s,l){super(e,t,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,t,r,i){return this.dirty==At||this.dirty!=nt&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=nt||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=nt,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,r){let i=this.node.cut(e,t),o=document.createTextNode(i.text);return new Do(this.parent,i,this.outerDeco,this.innerDeco,o,o,r)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=At)}get domAtom(){return!1}isText(e){return this.node.text==e}}class Uh extends ai{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==nt&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class Vw extends en{constructor(e,t,r,i,o,s,l,a,c,u){super(e,t,r,i,o,s,l,c,u),this.spec=a}update(e,t,r,i){if(this.dirty==At)return!1;if(this.spec.update){let o=this.spec.update(e,t,r);return o&&this.updateInner(e,t,r,i),o}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,r,i){this.spec.setSelection?this.spec.setSelection(e,t,r):super.setSelection(e,t,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(n,e,t){let r=n.firstChild,i=!1;for(let o=0;o<e.length;o++){let s=e[o],l=s.dom;if(l.parentNode==n){for(;l!=r;)r=qc(r),i=!0;r=r.nextSibling}else i=!0,n.insertBefore(l,r);if(s instanceof Dn){let a=r?r.previousSibling:n.lastChild;Jh(s.contentDOM,s.children,t),r=a?a.nextSibling:n.firstChild}}for(;r;)r=qc(r),i=!0;i&&t.trackWrites==n&&(t.trackWrites=null)}const Lr=function(n){n&&(this.nodeName=n)};Lr.prototype=Object.create(null);const wn=[new Lr];function ol(n,e,t){if(n.length==0)return wn;let r=t?wn[0]:new Lr,i=[r];for(let o=0;o<n.length;o++){let s=n[o].type.attrs;if(s){s.nodeName&&i.push(r=new Lr(s.nodeName));for(let l in s){let a=s[l];a!=null&&(t&&i.length==1&&i.push(r=new Lr(e.isInline?"span":"div")),l=="class"?r.class=(r.class?r.class+" ":"")+a:l=="style"?r.style=(r.style?r.style+";":"")+a:l!="nodeName"&&(r[l]=a))}}}return i}function Kh(n,e,t,r){if(t==wn&&r==wn)return e;let i=e;for(let o=0;o<r.length;o++){let s=r[o],l=t[o];if(o){let a;l&&l.nodeName==s.nodeName&&i!=n&&(a=i.parentNode)&&a.nodeName.toLowerCase()==s.nodeName||(a=document.createElement(s.nodeName),a.pmIsDeco=!0,a.appendChild(i),l=wn[0]),i=a}Hw(i,l||wn[0],s)}return i}function Hw(n,e,t){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in t)&&n.removeAttribute(r);for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&t[r]!=e[r]&&n.setAttribute(r,t[r]);if(e.class!=t.class){let r=e.class?e.class.split(" ").filter(Boolean):[],i=t.class?t.class.split(" ").filter(Boolean):[];for(let o=0;o<r.length;o++)i.indexOf(r[o])==-1&&n.classList.remove(r[o]);for(let o=0;o<i.length;o++)r.indexOf(i[o])==-1&&n.classList.add(i[o]);n.classList.length==0&&n.removeAttribute("class")}if(e.style!=t.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=r.exec(e.style);)n.style.removeProperty(i[1])}t.style&&(n.style.cssText+=t.style)}}function Yh(n,e,t){return Kh(n,n,wn,ol(e,t,n.nodeType!=1))}function sl(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(!n[t].type.eq(e[t].type))return!1;return!0}function qc(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class $w{constructor(e,t,r){this.lock=t,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=jw(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let r=e;r<t;r++)this.top.children[r].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,r){let i=0,o=this.stack.length>>1,s=Math.min(o,e.length);for(;i<s&&(i==o-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<o;)this.destroyRest(),this.top.dirty=nt,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let l=-1;for(let a=this.index;a<Math.min(this.index+3,this.top.children.length);a++){let c=this.top.children[a];if(c.matchesMark(e[o])&&!this.isLocked(c.dom)){l=a;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let a=Dn.create(this.top,e[o],t,r);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,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,t,r))o=this.top.children.indexOf(s,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l<a;l++){let c=this.top.children[l];if(c.matchesNode(e,t,r)&&!this.preMatch.matched.has(c)){o=l;break}}return o<0?!1:(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(e,t,r,i,o){let s=this.top.children[i];return s.dirty==At&&s.dom==s.contentDOM&&(s.dirty=bn),s.update(e,t,r,o)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}e=t}}updateNextNode(e,t,r,i,o,s){for(let l=this.index;l<this.top.children.length;l++){let a=this.top.children[l];if(a instanceof en){let c=this.preMatch.matched.get(a);if(c!=null&&c!=o)return!1;let u=a.dom,f,h=this.isLocked(u)&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&a.dirty!=At&&sl(t,a.outerDeco));if(!h&&a.update(e,t,r,i))return this.destroyBetween(this.index,l),a.dom!=u&&(this.changed=!0),this.index++,!0;if(!h&&(f=this.recreateWrapper(a,e,t,r,i,s)))return this.top.children[this.index]=f,f.contentDOM&&(f.dirty=bn,f.updateChildren(i,s+1),f.dirty=nt),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,r,i,o,s){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content))return null;let l=en.create(this.top,t,r,i,o,s);if(l.contentDOM){l.children=e.children,e.children=[];for(let a of l.children)a.parent=l}return e.destroy(),l}addNode(e,t,r,i,o){let s=en.create(this.top,e,t,r,i,o);s.contentDOM&&s.updateChildren(i,o+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,t,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(e)&&(e==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let o=new Wh(this.top,e,t,r);this.top.children.splice(this.index++,0,o),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof Dn;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof Do)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((_e||xe)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new Uh(this.top,[],r,null);t!=this.top?t.children.push(i):t.children.splice(this.index++,0,i),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function jw(n,e){let t=e,r=t.children.length,i=n.childCount,o=new Map,s=[];e:for(;i>0;){let l;for(;;)if(r){let c=t.children[r-1];if(c instanceof Dn)t=c,r=c.children.length;else{l=c,r--;break}}else{if(t==e)break e;r=t.parent.children.indexOf(t),t=t.parent}let a=l.node;if(a){if(a!=n.child(i-1))break;--i,o.set(l,i),s.push(l)}}return{index:i,matched:o,matches:s.reverse()}}function qw(n,e){return n.type.side-e.type.side}function Ww(n,e,t,r){let i=e.locals(n),o=0;if(i.length==0){for(let c=0;c<n.childCount;c++){let u=n.child(c);r(u,i,e.forChild(o,u),c),o+=u.nodeSize}return}let s=0,l=[],a=null;for(let c=0;;){let u,f;for(;s<i.length&&i[s].to==o;){let y=i[s++];y.widget&&(u?(f||(f=[u])).push(y):u=y)}if(u)if(f){f.sort(qw);for(let y=0;y<f.length;y++)t(f[y],c,!!a)}else t(u,c,!!a);let h,d;if(a)d=-1,h=a,a=null;else if(c<n.childCount)d=c,h=n.child(c++);else break;for(let y=0;y<l.length;y++)l[y].to<=o&&l.splice(y--,1);for(;s<i.length&&i[s].from<=o&&i[s].to>o;)l.push(i[s++]);let p=o+h.nodeSize;if(h.isText){let y=p;s<i.length&&i[s].from<y&&(y=i[s].from);for(let g=0;g<l.length;g++)l[g].to<y&&(y=l[g].to);y<p&&(a=h.cut(y-o),h=h.cut(0,y-o),p=y,d=-1)}else for(;s<i.length&&i[s].to<p;)s++;let m=h.isInline&&!h.isLeaf?l.filter(y=>!y.inline):l.slice();r(h,m,e.forChild(o,h),d),o=p}}function Uw(n){if(n.nodeName=="UL"||n.nodeName=="OL"){let e=n.style.cssText;n.style.cssText=e+"; list-style: square !important",window.getComputedStyle(n).listStyle,n.style.cssText=e}}function Jw(n,e,t,r){for(let i=0,o=0;i<n.childCount&&o<=r;){let s=n.child(i++),l=o;if(o+=s.nodeSize,!s.isText)continue;let a=s.text;for(;i<n.childCount;){let c=n.child(i++);if(o+=c.nodeSize,!c.isText)break;a+=c.text}if(o>=t){if(o>=r&&a.slice(r-e.length-l,r-l)==e)return r-e.length;let c=l<r?a.lastIndexOf(e,r-l-1):-1;if(c>=0&&c+e.length+l>=t)return l+c;if(t==r&&a.length>=r+e.length-l&&a.slice(r-l,r-l+e.length)==e)return r}}return-1}function ll(n,e,t,r,i){let o=[];for(let s=0,l=0;s<n.length;s++){let a=n[s],c=l,u=l+=a.size;c>=t||u<=e?o.push(a):(c<e&&o.push(a.slice(0,e-c,r)),i&&(o.push(i),i=void 0),u>t&&o.push(a.slice(t-c,a.size,r)))}return o}function Xl(n,e=null){let t=n.domSelectionRange(),r=n.state.doc;if(!t.focusNode)return null;let i=n.docView.nearestDesc(t.focusNode),o=i&&i.size==0,s=n.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(s<0)return null;let l=r.resolve(s),a,c;if(No(t)){for(a=l;i&&!i.node;)i=i.parent;let u=i.node;if(i&&u.isAtom&&$.isSelectable(u)&&i.parent&&!(u.isInline&&ww(t.focusNode,t.focusOffset,i.dom))){let f=i.posBefore;c=new $(s==f?l:r.resolve(f))}}else{let u=n.docView.posFromDOM(t.anchorNode,t.anchorOffset,1);if(u<0)return null;a=r.resolve(u)}if(!c){let u=e=="pointer"||n.state.selection.head<l.pos&&!o?1:-1;c=Ql(n,a,l,u)}return c}function Gh(n){return n.editable?n.hasFocus():Qh(n)&&document.activeElement&&document.activeElement.contains(n.dom)}function Rt(n,e=!1){let t=n.state.selection;if(Xh(n,t),!!Gh(n)){if(!e&&n.input.mouseDown&&n.input.mouseDown.allowDefault&&xe){let r=n.domSelectionRange(),i=n.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&Nn(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){n.input.mouseDown.delayedSelectionSync=!0,n.domObserver.setCurSelection();return}}if(n.domObserver.disconnectSelection(),n.cursorWrapper)Yw(n);else{let{anchor:r,head:i}=t,o,s;Wc&&!(t instanceof X)&&(t.$from.parent.inlineContent||(o=Uc(n,t.from)),!t.empty&&!t.$from.parent.inlineContent&&(s=Uc(n,t.to))),n.docView.setSelection(r,i,n.root,e),Wc&&(o&&Jc(o),s&&Jc(s)),t.visible?n.dom.classList.remove("ProseMirror-hideselection"):(n.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&Kw(n))}n.domObserver.setCurSelection(),n.domObserver.connectSelection()}}const Wc=_e||xe&&Lh<63;function Uc(n,e){let{node:t,offset:r}=n.docView.domFromPos(e,0),i=r<t.childNodes.length?t.childNodes[r]:null,o=r?t.childNodes[r-1]:null;if(_e&&i&&i.contentEditable=="false")return ds(i);if((!i||i.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(i)return ds(i);if(o)return ds(o)}}function ds(n){return n.contentEditable="true",_e&&n.draggable&&(n.draggable=!1,n.wasDraggable=!0),n}function Jc(n){n.contentEditable="false",n.wasDraggable&&(n.draggable=!0,n.wasDraggable=null)}function Kw(n){let e=n.dom.ownerDocument;e.removeEventListener("selectionchange",n.input.hideSelectionGuard);let t=n.domSelectionRange(),r=t.anchorNode,i=t.anchorOffset;e.addEventListener("selectionchange",n.input.hideSelectionGuard=()=>{(t.anchorNode!=r||t.anchorOffset!=i)&&(e.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!Gh(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}function Yw(n){let e=n.domSelection(),t=document.createRange();if(!e)return;let r=n.cursorWrapper.dom,i=r.nodeName=="IMG";i?t.setStart(r.parentNode,ge(r)+1):t.setStart(r,0),t.collapse(!0),e.removeAllRanges(),e.addRange(t),!i&&!n.state.selection.visible&&Le&&Zt<=11&&(r.disabled=!0,r.disabled=!1)}function Xh(n,e){if(e instanceof $){let t=n.docView.descAt(e.from);t!=n.lastSelectedViewDesc&&(Kc(n),t&&t.selectNode(),n.lastSelectedViewDesc=t)}else Kc(n)}function Kc(n){n.lastSelectedViewDesc&&(n.lastSelectedViewDesc.parent&&n.lastSelectedViewDesc.deselectNode(),n.lastSelectedViewDesc=void 0)}function Ql(n,e,t,r){return n.someProp("createSelectionBetween",i=>i(n,e,t))||X.between(e,t,r)}function Yc(n){return n.editable&&!n.hasFocus()?!1:Qh(n)}function Qh(n){let e=n.domSelectionRange();if(!e.anchorNode)return!1;try{return n.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(n.editable||n.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function Gw(n){let e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.domSelectionRange();return Nn(e.node,e.offset,t.anchorNode,t.anchorOffset)}function al(n,e){let{$anchor:t,$head:r}=n.selection,i=e>0?t.max(r):t.min(r),o=i.parent.inlineContent?i.depth?n.doc.resolve(e>0?i.after():i.before()):null:i;return o&&q.findFrom(o,e)}function Wt(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function Gc(n,e,t){let r=n.state.selection;if(r instanceof X)if(t.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=n.state.doc.resolve(i.pos+o.nodeSize*(e<0?-1:1));return Wt(n,new X(r.$anchor,s))}else if(r.empty){if(n.endOfTextblock(e>0?"forward":"backward")){let i=al(n.state,e);return i&&i instanceof $?Wt(n,i):!1}else if(!(Ge&&t.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=n.docView.descAt(l))&&!s.contentDOM?$.isSelectable(o)?Wt(n,new $(e<0?n.state.doc.resolve(i.pos-o.nodeSize):i)):li?Wt(n,new X(n.state.doc.resolve(e<0?l:l+o.nodeSize))):!1:!1}}else return!1;else{if(r instanceof $&&r.node.isInline)return Wt(n,new X(e>0?r.$to:r.$from));{let i=al(n.state,e);return i?Wt(n,i):!1}}}function ao(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Br(n,e){let t=n.pmViewDesc;return t&&t.size==0&&(e<0||n.nextSibling||n.nodeName!="BR")}function Hn(n,e){return e<0?Xw(n):Qw(n)}function Xw(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let i,o,s=!1;for(pt&&t.nodeType==1&&r<ao(t)&&Br(t.childNodes[r],-1)&&(s=!0);;)if(r>0){if(t.nodeType!=1)break;{let l=t.childNodes[r-1];if(Br(l,-1))i=t,o=--r;else if(l.nodeType==3)t=l,r=t.nodeValue.length;else break}}else{if(Zh(t))break;{let l=t.previousSibling;for(;l&&Br(l,-1);)i=t.parentNode,o=ge(l),l=l.previousSibling;if(l)t=l,r=ao(t);else{if(t=t.parentNode,t==n.dom)break;r=0}}}s?cl(n,t,r):i&&cl(n,i,o)}function Qw(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let i=ao(t),o,s;for(;;)if(r<i){if(t.nodeType!=1)break;let l=t.childNodes[r];if(Br(l,1))o=t,s=++r;else break}else{if(Zh(t))break;{let l=t.nextSibling;for(;l&&Br(l,1);)o=l.parentNode,s=ge(l)+1,l=l.nextSibling;if(l)t=l,r=0,i=ao(t);else{if(t=t.parentNode,t==n.dom)break;r=i=0}}}o&&cl(n,o,s)}function Zh(n){let e=n.pmViewDesc;return e&&e.node&&e.node.isBlock}function Zw(n,e){for(;n&&e==n.childNodes.length&&!si(n);)e=ge(n)+1,n=n.parentNode;for(;n&&e<n.childNodes.length;){let t=n.childNodes[e];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;n=t,e=0}}function ex(n,e){for(;n&&!e&&!si(n);)e=ge(n),n=n.parentNode;for(;n&&e;){let t=n.childNodes[e-1];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;n=t,e=n.childNodes.length}}function cl(n,e,t){if(e.nodeType!=3){let o,s;(s=Zw(e,t))?(e=s,t=0):(o=ex(e,t))&&(e=o,t=o.nodeValue.length)}let r=n.domSelection();if(!r)return;if(No(r)){let o=document.createRange();o.setEnd(e,t),o.setStart(e,t),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(e,t);n.domObserver.setCurSelection();let{state:i}=n;setTimeout(()=>{n.state==i&&Rt(n)},50)}function Xc(n,e){let t=n.state.doc.resolve(e);if(!(xe||Sw)&&t.parent.inlineContent){let i=n.coordsAtPos(e);if(e>t.start()){let o=n.coordsAtPos(e-1),s=(o.top+o.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(o.left-i.left)>1)return o.left<i.left?"ltr":"rtl"}if(e<t.end()){let o=n.coordsAtPos(e+1),s=(o.top+o.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(o.left-i.left)>1)return o.left>i.left?"ltr":"rtl"}}return getComputedStyle(n.dom).direction=="rtl"?"rtl":"ltr"}function Qc(n,e,t){let r=n.state.selection;if(r instanceof X&&!r.empty||t.indexOf("s")>-1||Ge&&t.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let s=al(n.state,e);if(s&&s instanceof $)return Wt(n,s)}if(!i.parent.inlineContent){let s=e<0?i:o,l=r instanceof Ke?q.near(s,e):q.findFrom(s,e);return l?Wt(n,l):!1}return!1}function Zc(n,e){if(!(n.state.selection instanceof X))return!0;let{$head:t,$anchor:r,empty:i}=n.state.selection;if(!t.sameParent(r))return!0;if(!i)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(o&&!o.isText){let s=n.state.tr;return e<0?s.delete(t.pos-o.nodeSize,t.pos):s.delete(t.pos,t.pos+o.nodeSize),n.dispatch(s),!0}return!1}function eu(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function tx(n){if(!_e||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;eu(n,r,"true"),setTimeout(()=>eu(n,r,"false"),20)}return!1}function nx(n){let e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}function rx(n,e){let t=e.keyCode,r=nx(e);if(t==8||Ge&&t==72&&r=="c")return Zc(n,-1)||Hn(n,-1);if(t==46&&!e.shiftKey||Ge&&t==68&&r=="c")return Zc(n,1)||Hn(n,1);if(t==13||t==27)return!0;if(t==37||Ge&&t==66&&r=="c"){let i=t==37?Xc(n,n.state.selection.from)=="ltr"?-1:1:-1;return Gc(n,i,r)||Hn(n,i)}else if(t==39||Ge&&t==70&&r=="c"){let i=t==39?Xc(n,n.state.selection.from)=="ltr"?1:-1:1;return Gc(n,i,r)||Hn(n,i)}else{if(t==38||Ge&&t==80&&r=="c")return Qc(n,-1,r)||Hn(n,-1);if(t==40||Ge&&t==78&&r=="c")return tx(n)||Qc(n,1,r)||Hn(n,1);if(r==(Ge?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function ed(n,e){n.someProp("transformCopied",d=>{e=d(e,n)});let t=[],{content:r,openStart:i,openEnd:o}=e;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let d=r.firstChild;t.push(d.type.name,d.attrs!=d.type.defaultAttrs?d.attrs:null),r=d.content}let s=n.someProp("clipboardSerializer")||fr.fromSchema(n.state.schema),l=sd(),a=l.createElement("div");a.appendChild(s.serializeFragment(r,{document:l}));let c=a.firstChild,u,f=0;for(;c&&c.nodeType==1&&(u=od[c.nodeName.toLowerCase()]);){for(let d=u.length-1;d>=0;d--){let p=l.createElement(u[d]);for(;a.firstChild;)p.appendChild(a.firstChild);a.appendChild(p),f++}c=a.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${o}${f?` -${f}`:""} ${JSON.stringify(t)}`);let h=n.someProp("clipboardTextSerializer",d=>d(e,n))||e.content.textBetween(0,e.content.size,` |
| 64 |
|
| 65 |
`);return{dom:a,text:h,slice:e}}function td(n,e,t,r,i){let o=i.parent.type.spec.code,s,l;if(!t&&!e)return null;let a=e&&(r||o||!t);if(a){if(n.someProp("transformPastedText",h=>{e=h(e,o||r,n)}),o)return e?new R(_.from(n.state.schema.text(e.replace(/\r\n?/g,` |
| 66 |
`))),0,0):R.empty;let f=n.someProp("clipboardTextParser",h=>h(e,i,r,n));if(f)l=f;else{let h=i.marks(),{schema:d}=n.state,p=fr.fromSchema(d);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let y=s.appendChild(document.createElement("p"));m&&y.appendChild(p.serializeNode(d.text(m,h)))})}}else n.someProp("transformPastedHTML",f=>{t=f(t,n)}),s=lx(t),li&&ax(s);let c=s&&s.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let f=+u[3];f>0;f--){let h=s.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;s=h}if(l||(l=(n.someProp("clipboardParser")||n.someProp("domParser")||Kr.fromSchema(n.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||u),context:i,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!ix.test(h.parentNode.nodeName)?{ignore:!0}:null}})),u)l=cx(tu(l,+u[1],+u[2]),u[4]);else if(l=R.maxOpen(ox(l.content,i),!0),l.openStart||l.openEnd){let f=0,h=0;for(let d=l.content.firstChild;f<l.openStart&&!d.type.spec.isolating;f++,d=d.firstChild);for(let d=l.content.lastChild;h<l.openEnd&&!d.type.spec.isolating;h++,d=d.lastChild);l=tu(l,f,h)}return n.someProp("transformPasted",f=>{l=f(l,n)}),l}const ix=/^(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 ox(n,e){if(n.childCount<2)return n;for(let t=e.depth;t>=0;t--){let i=e.node(t).contentMatchAt(e.index(t)),o,s=[];if(n.forEach(l=>{if(!s)return;let a=i.findWrapping(l.type),c;if(!a)return s=null;if(c=s.length&&o.length&&rd(a,o,l,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=id(s[s.length-1],o.length));let u=nd(l,a);s.push(u),i=i.matchType(u.type),o=a}}),s)return _.from(s)}return n}function nd(n,e,t=0){for(let r=e.length-1;r>=t;r--)n=e[r].create(null,_.from(n));return n}function rd(n,e,t,r,i){if(i<n.length&&i<e.length&&n[i]==e[i]){let o=rd(n,e,t,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==n.length-1?t.type:n[i+1]))return r.copy(r.content.append(_.from(nd(t,n,i+1))))}}function id(n,e){if(e==0)return n;let t=n.content.replaceChild(n.childCount-1,id(n.lastChild,e-1)),r=n.contentMatchAt(n.childCount).fillBefore(_.empty,!0);return n.copy(t.append(r))}function ul(n,e,t,r,i,o){let s=e<0?n.firstChild:n.lastChild,l=s.content;return n.childCount>1&&(o=0),i<r-1&&(l=ul(l,e,t,r,i+1,o)),i>=t&&(l=e<0?s.contentMatchAt(0).fillBefore(l,o<=i).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(_.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,s.copy(l))}function tu(n,e,t){return e<n.openStart&&(n=new R(ul(n.content,-1,e,n.openStart,0,n.openEnd),e,n.openEnd)),t<n.openEnd&&(n=new R(ul(n.content,1,t,n.openEnd,0,0),n.openStart,t)),n}const od={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let nu=null;function sd(){return nu||(nu=document.implementation.createHTMLDocument("title"))}function sx(n){let e=window.trustedTypes;return e?e.createPolicy("detachedDocument",{createHTML:t=>t}).createHTML(n):n}function lx(n){let e=/^(\s*<meta [^>]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let t=sd().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n),i;if((i=r&&od[r[1].toLowerCase()])&&(n=i.map(o=>"<"+o+">").join("")+n+i.map(o=>"</"+o+">").reverse().join("")),t.innerHTML=sx(n),i)for(let o=0;o<i.length;o++)t=t.querySelector(i[o])||t;return t}function ax(n){let e=n.querySelectorAll(xe?"span:not([class]):not([style])":"span.Apple-converted-space");for(let t=0;t<e.length;t++){let r=e[t];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(n.ownerDocument.createTextNode(" "),r)}}function cx(n,e){if(!n.size)return n;let t=n.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return n}let{content:i,openStart:o,openEnd:s}=n;for(let l=r.length-2;l>=0;l-=2){let a=t.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;i=_.from(a.create(r[l+1],i)),o++,s++}return new R(i,o,s)}const Te={},Ne={},ux={touchstart:!0,touchmove:!0};class fx{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 hx(n){for(let e in Te){let t=Te[e];n.dom.addEventListener(e,n.input.eventHandlers[e]=r=>{px(n,r)&&!Zl(n,r)&&(n.editable||!(r.type in Ne))&&t(n,r)},ux[e]?{passive:!0}:void 0)}_e&&n.dom.addEventListener("input",()=>null),fl(n)}function Qt(n,e){n.input.lastSelectionOrigin=e,n.input.lastSelectionTime=Date.now()}function dx(n){n.domObserver.stop();for(let e in n.input.eventHandlers)n.dom.removeEventListener(e,n.input.eventHandlers[e]);clearTimeout(n.input.composingTimeout),clearTimeout(n.input.lastIOSEnterFallbackTimeout)}function fl(n){n.someProp("handleDOMEvents",e=>{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=r=>Zl(n,r))})}function Zl(n,e){return n.someProp("handleDOMEvents",t=>{let r=t[e.type];return r?r(n,e)||e.defaultPrevented:!1})}function px(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=n.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function mx(n,e){!Zl(n,e)&&Te[e.type]&&(n.editable||!(e.type in Ne))&&Te[e.type](n,e)}Ne.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=t.keyCode==16||t.shiftKey,!ad(n,t)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!(at&&xe&&t.keyCode==13)))if(n.domObserver.selectionChanged(n.domSelectionRange())?n.domObserver.flush():t.keyCode!=229&&n.domObserver.forceFlush(),lr&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let r=Date.now();n.input.lastIOSEnter=r,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==r&&(n.someProp("handleKeyDown",i=>i(n,mn(13,"Enter"))),n.input.lastIOSEnter=0)},200)}else n.someProp("handleKeyDown",r=>r(n,t))||rx(n,t)?t.preventDefault():Qt(n,"key")};Ne.keyup=(n,e)=>{e.keyCode==16&&(n.input.shiftKey=!1)};Ne.keypress=(n,e)=>{let t=e;if(ad(n,t)||!t.charCode||t.ctrlKey&&!t.altKey||Ge&&t.metaKey)return;if(n.someProp("handleKeyPress",i=>i(n,t))){t.preventDefault();return}let r=n.state.selection;if(!(r instanceof X)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(t.charCode);!/[\r\n]/.test(i)&&!n.someProp("handleTextInput",o=>o(n,r.$from.pos,r.$to.pos,i))&&n.dispatch(n.state.tr.insertText(i).scrollIntoView()),t.preventDefault()}};function Io(n){return{left:n.clientX,top:n.clientY}}function gx(n,e){let t=e.x-n.clientX,r=e.y-n.clientY;return t*t+r*r<100}function ea(n,e,t,r,i){if(r==-1)return!1;let o=n.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(n.someProp(e,l=>s>o.depth?l(n,t,o.nodeAfter,o.before(s),i,!0):l(n,t,o.node(s),o.before(s),i,!1)))return!0;return!1}function Yn(n,e,t){if(n.focused||n.focus(),n.state.selection.eq(e))return;let r=n.state.tr.setSelection(e);t=="pointer"&&r.setMeta("pointer",!0),n.dispatch(r)}function yx(n,e){if(e==-1)return!1;let t=n.state.doc.resolve(e),r=t.nodeAfter;return r&&r.isAtom&&$.isSelectable(r)?(Yn(n,new $(t),"pointer"),!0):!1}function bx(n,e){if(e==-1)return!1;let t=n.state.selection,r,i;t instanceof $&&(r=t.node);let o=n.state.doc.resolve(e);for(let s=o.depth+1;s>0;s--){let l=s>o.depth?o.nodeAfter:o.node(s);if($.isSelectable(l)){r&&t.$from.depth>0&&s>=t.$from.depth&&o.before(t.$from.depth+1)==t.$from.pos?i=o.before(t.$from.depth):i=o.before(s);break}}return i!=null?(Yn(n,$.create(n.state.doc,i),"pointer"),!0):!1}function wx(n,e,t,r,i){return ea(n,"handleClickOn",e,t,r)||n.someProp("handleClick",o=>o(n,e,r))||(i?bx(n,t):yx(n,t))}function xx(n,e,t,r){return ea(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",i=>i(n,e,r))}function kx(n,e,t,r){return ea(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",i=>i(n,e,r))||Sx(n,t,r)}function Sx(n,e,t){if(t.button!=0)return!1;let r=n.state.doc;if(e==-1)return r.inlineContent?(Yn(n,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)Yn(n,X.create(r,l+1,l+1+s.content.size),"pointer");else if($.isSelectable(s))Yn(n,$.create(r,l),"pointer");else continue;return!0}}function ta(n){return co(n)}const ld=Ge?"metaKey":"ctrlKey";Te.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let r=ta(n),i=Date.now(),o="singleClick";i-n.input.lastClick.time<500&&gx(t,n.input.lastClick)&&!t[ld]&&(n.input.lastClick.type=="singleClick"?o="doubleClick":n.input.lastClick.type=="doubleClick"&&(o="tripleClick")),n.input.lastClick={time:i,x:t.clientX,y:t.clientY,type:o};let s=n.posAtCoords(Io(t));s&&(o=="singleClick"?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new vx(n,s,t,!!r)):(o=="doubleClick"?xx:kx)(n,s.pos,s.inside,t)?t.preventDefault():Qt(n,"pointer"))};class vx{constructor(e,t,r,i){this.view=e,this.pos=t,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[ld],this.allowDefault=r.shiftKey;let o,s;if(t.inside>-1)o=e.state.doc.nodeAt(t.inside),s=t.inside;else{let u=e.state.doc.resolve(t.pos);o=u.parent,s=u.depth?u.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:c}=e.state;(r.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||c instanceof $&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&pt&&!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)),Qt(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(()=>Rt(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Io(e))),this.updateAllowDefault(e),this.allowDefault||!t?Qt(this.view,"pointer"):wx(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||_e&&this.mightDrag&&!this.mightDrag.node.isAtom||xe&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Yn(this.view,q.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):Qt(this.view,"pointer")}move(e){this.updateAllowDefault(e),Qt(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)}}Te.touchstart=n=>{n.input.lastTouch=Date.now(),ta(n),Qt(n,"pointer")};Te.touchmove=n=>{n.input.lastTouch=Date.now(),Qt(n,"pointer")};Te.contextmenu=n=>ta(n);function ad(n,e){return n.composing?!0:_e&&Math.abs(e.timeStamp-n.input.compositionEndedAt)<500?(n.input.compositionEndedAt=-2e8,!0):!1}const Cx=at?5e3:-1;Ne.compositionstart=Ne.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:e}=n,t=e.selection.$to;if(e.selection instanceof X&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))n.markCursor=n.state.storedMarks||t.marks(),co(n,!0),n.markCursor=null;else if(co(n,!e.selection.empty),pt&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let r=n.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=n.domSelection();l&&l.collapse(s,s.nodeValue.length);break}else i=s,o=-1}}n.input.composing=!0}cd(n,Cx)};Ne.compositionend=(n,e)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=e.timeStamp,n.input.compositionPendingChanges=n.domObserver.pendingRecords().length?n.input.compositionID:0,n.input.compositionNode=null,n.input.compositionPendingChanges&&Promise.resolve().then(()=>n.domObserver.flush()),n.input.compositionID++,cd(n,20))};function cd(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>co(n),e))}function ud(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=Ox());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function Ax(n){let e=n.domSelectionRange();if(!e.focusNode)return null;let t=yw(e.focusNode,e.focusOffset),r=bw(e.focusNode,e.focusOffset);if(t&&r&&t!=r){let i=r.pmViewDesc,o=n.domObserver.lastChangedTextNode;if(t==o||r==o)return o;if(!i||!i.isText(r.nodeValue))return r;if(n.input.compositionNode==r){let s=t.pmViewDesc;if(!(!s||!s.isText(t.nodeValue)))return r}}return t||r}function Ox(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}function co(n,e=!1){if(!(at&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),ud(n),e||n.docView&&n.docView.dirty){let t=Xl(n);return t&&!t.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(t)):(n.markCursor||e)&&!n.state.selection.empty?n.dispatch(n.state.tr.deleteSelection()):n.updateState(n.state),!0}return!1}}function Mx(n,e){if(!n.dom.parentNode)return;let t=n.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(e),n.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}const Xr=Le&&Zt<15||lr&&vw<604;Te.copy=Ne.cut=(n,e)=>{let t=e,r=n.state.selection,i=t.type=="cut";if(r.empty)return;let o=Xr?null:t.clipboardData,s=r.content(),{dom:l,text:a}=ed(n,s);o?(t.preventDefault(),o.clearData(),o.setData("text/html",l.innerHTML),o.setData("text/plain",a)):Mx(n,l),i&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function Ex(n){return n.openStart==0&&n.openEnd==0&&n.content.childCount==1?n.content.firstChild:null}function _x(n,e){if(!n.dom.parentNode)return;let t=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,r=n.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=n.input.shiftKey&&n.input.lastKeyCode!=45;setTimeout(()=>{n.focus(),r.parentNode&&r.parentNode.removeChild(r),t?Qr(n,r.value,null,i,e):Qr(n,r.textContent,r.innerHTML,i,e)},50)}function Qr(n,e,t,r,i){let o=td(n,e,t,r,n.state.selection.$from);if(n.someProp("handlePaste",a=>a(n,i,o||R.empty)))return!0;if(!o)return!1;let s=Ex(o),l=s?n.state.tr.replaceSelectionWith(s,r):n.state.tr.replaceSelection(o);return n.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function fd(n){let e=n.getData("text/plain")||n.getData("Text");if(e)return e;let t=n.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}Ne.paste=(n,e)=>{let t=e;if(n.composing&&!at)return;let r=Xr?null:t.clipboardData,i=n.input.shiftKey&&n.input.lastKeyCode!=45;r&&Qr(n,fd(r),r.getData("text/html"),i,t)?t.preventDefault():_x(n,t)};class hd{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}}const dd=Ge?"altKey":"ctrlKey";Te.dragstart=(n,e)=>{let t=e,r=n.input.mouseDown;if(r&&r.done(),!t.dataTransfer)return;let i=n.state.selection,o=i.empty?null:n.posAtCoords(Io(t)),s;if(!(o&&o.pos>=i.from&&o.pos<=(i instanceof $?i.to-1:i.to))){if(r&&r.mightDrag)s=$.create(n.state.doc,r.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let f=n.docView.nearestDesc(t.target,!0);f&&f.node.type.spec.draggable&&f!=n.docView&&(s=$.create(n.state.doc,f.posBefore))}}let l=(s||n.state.selection).content(),{dom:a,text:c,slice:u}=ed(n,l);(!t.dataTransfer.files.length||!xe||Lh>120)&&t.dataTransfer.clearData(),t.dataTransfer.setData(Xr?"Text":"text/html",a.innerHTML),t.dataTransfer.effectAllowed="copyMove",Xr||t.dataTransfer.setData("text/plain",c),n.dragging=new hd(u,!t[dd],s)};Te.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)};Ne.dragover=Ne.dragenter=(n,e)=>e.preventDefault();Ne.drop=(n,e)=>{let t=e,r=n.dragging;if(n.dragging=null,!t.dataTransfer)return;let i=n.posAtCoords(Io(t));if(!i)return;let o=n.state.doc.resolve(i.pos),s=r&&r.slice;s?n.someProp("transformPasted",p=>{s=p(s,n)}):s=td(n,fd(t.dataTransfer),Xr?null:t.dataTransfer.getData("text/html"),!1,o);let l=!!(r&&!t[dd]);if(n.someProp("handleDrop",p=>p(n,t,s||R.empty,l))){t.preventDefault();return}if(!s)return;t.preventDefault();let a=s?Ib(n.state.doc,o.pos,s):o.pos;a==null&&(a=o.pos);let c=n.state.tr;if(l){let{node:p}=r;p?p.replace(c):c.deleteSelection()}let u=c.mapping.map(a),f=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,h=c.doc;if(f?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(h))return;let d=c.doc.resolve(u);if(f&&$.isSelectable(s.content.firstChild)&&d.nodeAfter&&d.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new $(d));else{let p=c.mapping.map(a);c.mapping.maps[c.mapping.maps.length-1].forEach((m,y,g,v)=>p=v),c.setSelection(Ql(n,d,c.doc.resolve(p)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))};Te.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&Rt(n)},20))};Te.blur=(n,e)=>{let t=e;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),t.relatedTarget&&n.dom.contains(t.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)};Te.beforeinput=(n,e)=>{if(xe&&at&&e.inputType=="deleteContentBackward"){n.domObserver.flushSoon();let{domChangeCount:r}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=r||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",o=>o(n,mn(8,"Backspace")))))return;let{$cursor:i}=n.state.selection;i&&i.pos>0&&n.dispatch(n.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let n in Ne)Te[n]=Ne[n];function Zr(n,e){if(n==e)return!0;for(let t in n)if(n[t]!==e[t])return!1;for(let t in e)if(!(t in n))return!1;return!0}class uo{constructor(e,t){this.toDOM=e,this.spec=t||On,this.side=this.spec.side||0}map(e,t,r,i){let{pos:o,deleted:s}=e.mapResult(t.from+i,this.side<0?-1:1);return s?null:new ze(o-r,o-r,this)}valid(){return!0}eq(e){return this==e||e instanceof uo&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Zr(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class tn{constructor(e,t){this.attrs=e,this.spec=t||On}map(e,t,r,i){let o=e.map(t.from+i,this.spec.inclusiveStart?-1:1)-r,s=e.map(t.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new ze(o,s,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof tn&&Zr(this.attrs,e.attrs)&&Zr(this.spec,e.spec)}static is(e){return e.type instanceof tn}destroy(){}}class na{constructor(e,t){this.attrs=e,this.spec=t||On}map(e,t,r,i){let o=e.mapResult(t.from+i,1);if(o.deleted)return null;let s=e.mapResult(t.to+i,-1);return s.deleted||s.pos<=o.pos?null:new ze(o.pos-r,s.pos-r,this)}valid(e,t){let{index:r,offset:i}=e.content.findIndex(t.from),o;return i==t.from&&!(o=e.child(r)).isText&&i+o.nodeSize==t.to}eq(e){return this==e||e instanceof na&&Zr(this.attrs,e.attrs)&&Zr(this.spec,e.spec)}destroy(){}}class ze{constructor(e,t,r){this.from=e,this.to=t,this.type=r}copy(e,t){return new ze(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,r){return this.type.map(e,this,t,r)}static widget(e,t,r){return new ze(e,e,new uo(t,r))}static inline(e,t,r,i){return new ze(e,t,new tn(r,i))}static node(e,t,r,i){return new ze(e,t,new na(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof tn}get widget(){return this.type instanceof uo}}const qn=[],On={};class oe{constructor(e,t){this.local=e.length?e:qn,this.children=t.length?t:qn}static create(e,t){return t.length?fo(t,e,0,On):be}find(e,t,r){let i=[];return this.findInner(e??0,t??1e9,i,0,r),i}findInner(e,t,r,i,o){for(let s=0;s<this.local.length;s++){let l=this.local[s];l.from<=t&&l.to>=e&&(!o||o(l.spec))&&r.push(l.copy(l.from+i,l.to+i))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<t&&this.children[s+1]>e){let l=this.children[s]+1;this.children[s+2].findInner(e-l,t-l,r,i+l,o)}}map(e,t,r){return this==be||e.maps.length==0?this:this.mapInner(e,t,0,0,r||On)}mapInner(e,t,r,i,o){let s;for(let l=0;l<this.local.length;l++){let a=this.local[l].map(e,r,i);a&&a.type.valid(t,a)?(s||(s=[])).push(a):o.onRemove&&o.onRemove(this.local[l].spec)}return this.children.length?Tx(this.children,s||[],e,t,r,i,o):s?new oe(s.sort(Mn),qn):be}add(e,t){return t.length?this==be?oe.create(e,t):this.addInner(e,t,0):this}addInner(e,t,r){let i,o=0;e.forEach((l,a)=>{let c=a+r,u;if(u=md(t,l,c)){for(i||(i=this.children.slice());o<i.length&&i[o]<a;)o+=3;i[o]==a?i[o+2]=i[o+2].addInner(l,u,c+1):i.splice(o,0,a,a+l.nodeSize,fo(u,l,c+1,On)),o+=3}});let s=pd(o?gd(t):t,-r);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||s.splice(l--,1);return new oe(s.length?this.local.concat(s).sort(Mn):this.local,i||this.children)}remove(e){return e.length==0||this==be?this:this.removeInner(e,0)}removeInner(e,t){let r=this.children,i=this.local;for(let o=0;o<r.length;o+=3){let s,l=r[o]+t,a=r[o+1]+t;for(let u=0,f;u<e.length;u++)(f=e[u])&&f.from>l&&f.to<a&&(e[u]=null,(s||(s=[])).push(f));if(!s)continue;r==this.children&&(r=this.children.slice());let c=r[o+2].removeInner(s,l+1);c!=be?r[o+2]=c:(r.splice(o,3),o-=3)}if(i.length){for(let o=0,s;o<e.length;o++)if(s=e[o])for(let l=0;l<i.length;l++)i[l].eq(s,t)&&(i==this.local&&(i=this.local.slice()),i.splice(l--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new oe(i,r):be}forChild(e,t){if(this==be)return this;if(t.isLeaf)return oe.empty;let r,i;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=e){this.children[l]==e&&(r=this.children[l+2]);break}let o=e+1,s=o+t.content.size;for(let l=0;l<this.local.length;l++){let a=this.local[l];if(a.from<s&&a.to>o&&a.type instanceof tn){let c=Math.max(o,a.from)-o,u=Math.min(s,a.to)-o;c<u&&(i||(i=[])).push(a.copy(c,u))}}if(i){let l=new oe(i.sort(Mn),qn);return r?new Jt([l,r]):l}return r||be}eq(e){if(this==e)return!0;if(!(e instanceof oe)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return ra(this.localsInner(e))}localsInner(e){if(this==be)return qn;if(e.inlineContent||!this.local.some(tn.is))return this.local;let t=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof tn||t.push(this.local[r]);return t}forEachSet(e){e(this)}}oe.empty=new oe([],[]);oe.removeOverlap=ra;const be=oe.empty;class Jt{constructor(e){this.members=e}map(e,t){const r=this.members.map(i=>i.map(e,t,On));return Jt.from(r)}forChild(e,t){if(t.isLeaf)return oe.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(e,t);o!=be&&(o instanceof Jt?r=r.concat(o.members):r.push(o))}return Jt.from(r)}eq(e){if(!(e instanceof Jt)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,r=!0;for(let i=0;i<this.members.length;i++){let o=this.members[i].localsInner(e);if(o.length)if(!t)t=o;else{r&&(t=t.slice(),r=!1);for(let s=0;s<o.length;s++)t.push(o[s])}}return t?ra(r?t:t.sort(Mn)):qn}static from(e){switch(e.length){case 0:return be;case 1:return e[0];default:return new Jt(e.every(t=>t instanceof oe)?e:e.reduce((t,r)=>t.concat(r instanceof oe?r:r.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}}function Tx(n,e,t,r,i,o,s){let l=n.slice();for(let c=0,u=o;c<t.maps.length;c++){let f=0;t.maps[c].forEach((h,d,p,m)=>{let y=m-p-(d-h);for(let g=0;g<l.length;g+=3){let v=l[g+1];if(v<0||h>v+u-f)continue;let x=l[g]+u-f;d>=x?l[g+1]=h<=x?-2:-1:h>=u&&y&&(l[g]+=y,l[g+1]+=y)}f+=y}),u=t.maps[c].map(u,-1)}let a=!1;for(let c=0;c<l.length;c+=3)if(l[c+1]<0){if(l[c+1]==-2){a=!0,l[c+1]=-1;continue}let u=t.map(n[c]+o),f=u-i;if(f<0||f>=r.content.size){a=!0;continue}let h=t.map(n[c+1]+o,-1),d=h-i,{index:p,offset:m}=r.content.findIndex(f),y=r.maybeChild(p);if(y&&m==f&&m+y.nodeSize==d){let g=l[c+2].mapInner(t,y,u+1,n[c]+o+1,s);g!=be?(l[c]=f,l[c+1]=d,l[c+2]=g):(l[c+1]=-2,a=!0)}else a=!0}if(a){let c=Nx(l,n,e,t,i,o,s),u=fo(c,r,0,s);e=u.local;for(let f=0;f<l.length;f+=3)l[f+1]<0&&(l.splice(f,3),f-=3);for(let f=0,h=0;f<u.children.length;f+=3){let d=u.children[f];for(;h<l.length&&l[h]<d;)h+=3;l.splice(h,0,u.children[f],u.children[f+1],u.children[f+2])}}return new oe(e.sort(Mn),l)}function pd(n,e){if(!e||!n.length)return n;let t=[];for(let r=0;r<n.length;r++){let i=n[r];t.push(new ze(i.from+e,i.to+e,i.type))}return t}function Nx(n,e,t,r,i,o,s){function l(a,c){for(let u=0;u<a.local.length;u++){let f=a.local[u].map(r,i,c);f?t.push(f):s.onRemove&&s.onRemove(a.local[u].spec)}for(let u=0;u<a.children.length;u+=3)l(a.children[u+2],a.children[u]+c+1)}for(let a=0;a<n.length;a+=3)n[a+1]==-1&&l(n[a+2],e[a]+o+1);return t}function md(n,e,t){if(e.isLeaf)return null;let r=t+e.nodeSize,i=null;for(let o=0,s;o<n.length;o++)(s=n[o])&&s.from>t&&s.to<r&&((i||(i=[])).push(s),n[o]=null);return i}function gd(n){let e=[];for(let t=0;t<n.length;t++)n[t]!=null&&e.push(n[t]);return e}function fo(n,e,t,r){let i=[],o=!1;e.forEach((l,a)=>{let c=md(n,l,a+t);if(c){o=!0;let u=fo(c,l,t+a+1,r);u!=be&&i.push(a,a+l.nodeSize,u)}});let s=pd(o?gd(n):n,-t).sort(Mn);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||(r.onRemove&&r.onRemove(s[l].spec),s.splice(l--,1));return s.length||i.length?new oe(s,i):be}function Mn(n,e){return n.from-e.from||n.to-e.to}function ra(n){let e=n;for(let t=0;t<e.length-1;t++){let r=e[t];if(r.from!=r.to)for(let i=t+1;i<e.length;i++){let o=e[i];if(o.from==r.from){o.to!=r.to&&(e==n&&(e=n.slice()),e[i]=o.copy(o.from,r.to),ru(e,i+1,o.copy(r.to,o.to)));continue}else{o.from<r.to&&(e==n&&(e=n.slice()),e[t]=r.copy(r.from,o.from),ru(e,i,r.copy(o.from,r.to)));break}}}return e}function ru(n,e,t){for(;e<n.length&&Mn(t,n[e])>0;)e++;n.splice(e,0,t)}function ps(n){let e=[];return n.someProp("decorations",t=>{let r=t(n.state);r&&r!=be&&e.push(r)}),n.cursorWrapper&&e.push(oe.create(n.state.doc,[n.cursorWrapper.deco])),Jt.from(e)}const Dx={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Ix=Le&&Zt<=11;class Rx{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 zx{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Rx,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);Le&&Zt<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),Ix&&(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,Dx)),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 t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Yc(this.view)){if(this.suppressingSelectionUpdates)return Rt(this.view);if(Le&&Zt<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Nn(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 t=new Set,r;for(let o=e.focusNode;o;o=Gr(o))t.add(o);for(let o=e.anchorNode;o;o=Gr(o))if(t.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)&&Yc(this.view)&&!this.ignoreSelectionChange(e)}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let r=e.domSelectionRange(),i=this.selectionChanged(r),o=-1,s=-1,l=!1,a=[];if(e.editable)for(let u=0;u<t.length;u++){let f=this.registerMutation(t[u],a);f&&(o=o<0?f.from:Math.min(f.from,o),s=s<0?f.to:Math.max(f.to,s),f.typeOver&&(l=!0))}if(pt&&a.length){let u=a.filter(f=>f.nodeName=="BR");if(u.length==2){let[f,h]=u;f.parentNode&&f.parentNode.parentNode==h.parentNode?h.remove():f.remove()}else{let{focusNode:f}=this.currentSelection;for(let h of u){let d=h.parentNode;d&&d.nodeName=="LI"&&(!f||Lx(e,f)!=d)&&h.remove()}}}let c=null;o<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&No(r)&&(c=Xl(e))&&c.eq(q.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Rt(e),this.currentSelection.set(r),e.scrollToSelection()):(o>-1||i)&&(o>-1&&(e.docView.markDirty(o,s),Fx(e)),this.handleDOMChange(o,s,l,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Rt(e),this.currentSelection.set(r))}registerMutation(e,t){if(t.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 u=0;u<e.addedNodes.length;u++){let f=e.addedNodes[u];t.push(f),f.nodeType==3&&(this.lastChangedTextNode=f)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let i=e.previousSibling,o=e.nextSibling;if(Le&&Zt<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:f,nextSibling:h}=e.addedNodes[u];(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(i=f),(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(o=h)}let s=i&&i.parentNode==e.target?ge(i)+1:0,l=r.localPosFromDOM(e.target,s,-1),a=o&&o.parentNode==e.target?ge(o):e.target.childNodes.length,c=r.localPosFromDOM(e.target,a,1);return{from:l,to:c}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let iu=new WeakMap,ou=!1;function Fx(n){if(!iu.has(n)&&(iu.set(n,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace)!==-1)){if(n.requiresGeckoHackNode=pt,ou)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),ou=!0}}function su(n,e){let t=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,s=n.domAtPos(n.state.selection.anchor);return Nn(s.node,s.offset,i,o)&&([t,r,i,o]=[i,o,t,r]),{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:o}}function Px(n,e){if(e.getComposedRanges){let i=e.getComposedRanges(n.root)[0];if(i)return su(n,i)}let t;function r(i){i.preventDefault(),i.stopImmediatePropagation(),t=i.getTargetRanges()[0]}return n.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),n.dom.removeEventListener("beforeinput",r,!0),t?su(n,t):null}function Lx(n,e){for(let t=e.parentNode;t&&t!=n.dom;t=t.parentNode){let r=n.docView.nearestDesc(t,!0);if(r&&r.node.isBlock)return t}return null}function Bx(n,e,t){let{node:r,fromOffset:i,toOffset:o,from:s,to:l}=n.docView.parseRange(e,t),a=n.domSelectionRange(),c,u=a.anchorNode;if(u&&n.dom.contains(u.nodeType==1?u:u.parentNode)&&(c=[{node:u,offset:a.anchorOffset}],No(a)||c.push({node:a.focusNode,offset:a.focusOffset})),xe&&n.input.lastKeyCode===8)for(let y=o;y>i;y--){let g=r.childNodes[y-1],v=g.pmViewDesc;if(g.nodeName=="BR"&&!v){o=y;break}if(!v||v.size)break}let f=n.state.doc,h=n.someProp("domParser")||Kr.fromSchema(n.state.schema),d=f.resolve(s),p=null,m=h.parse(r,{topNode:d.parent,topMatch:d.parent.contentMatchAt(d.index()),topOpen:!0,from:i,to:o,preserveWhitespace:d.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:Vx,context:d});if(c&&c[0].pos!=null){let y=c[0].pos,g=c[1]&&c[1].pos;g==null&&(g=y),p={anchor:y+s,head:g+s}}return{doc:m,sel:p,from:s,to:l}}function Vx(n){let e=n.pmViewDesc;if(e)return e.parseRule();if(n.nodeName=="BR"&&n.parentNode){if(_e&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(n.parentNode.lastChild==n||_e&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if(n.nodeName=="IMG"&&n.getAttribute("mark-placeholder"))return{ignore:!0};return null}const Hx=/^(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 $x(n,e,t,r,i){let o=n.input.compositionPendingChanges||(n.composing?n.input.compositionID:0);if(n.input.compositionPendingChanges=0,e<0){let E=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,S=Xl(n,E);if(S&&!n.state.selection.eq(S)){if(xe&&at&&n.input.lastKeyCode===13&&Date.now()-100<n.input.lastKeyCodeTime&&n.someProp("handleKeyDown",D=>D(n,mn(13,"Enter"))))return;let T=n.state.tr.setSelection(S);E=="pointer"?T.setMeta("pointer",!0):E=="key"&&T.scrollIntoView(),o&&T.setMeta("composition",o),n.dispatch(T)}return}let s=n.state.doc.resolve(e),l=s.sharedDepth(t);e=s.before(l+1),t=n.state.doc.resolve(t).after(l+1);let a=n.state.selection,c=Bx(n,e,t),u=n.state.doc,f=u.slice(c.from,c.to),h,d;n.input.lastKeyCode===8&&Date.now()-100<n.input.lastKeyCodeTime?(h=n.state.selection.to,d="end"):(h=n.state.selection.from,d="start"),n.input.lastKeyCode=null;let p=Wx(f.content,c.doc.content,c.from,h,d);if(p&&n.input.domChangeCount++,(lr&&n.input.lastIOSEnter>Date.now()-225||at)&&i.some(E=>E.nodeType==1&&!Hx.test(E.nodeName))&&(!p||p.endA>=p.endB)&&n.someProp("handleKeyDown",E=>E(n,mn(13,"Enter")))){n.input.lastIOSEnter=0;return}if(!p)if(r&&a instanceof X&&!a.empty&&a.$head.sameParent(a.$anchor)&&!n.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))p={start:a.from,endA:a.to,endB:a.to};else{if(c.sel){let E=lu(n,n.state.doc,c.sel);if(E&&!E.eq(n.state.selection)){let S=n.state.tr.setSelection(E);o&&S.setMeta("composition",o),n.dispatch(S)}}return}n.state.selection.from<n.state.selection.to&&p.start==p.endB&&n.state.selection instanceof X&&(p.start>n.state.selection.from&&p.start<=n.state.selection.from+2&&n.state.selection.from>=c.from?p.start=n.state.selection.from:p.endA<n.state.selection.to&&p.endA>=n.state.selection.to-2&&n.state.selection.to<=c.to&&(p.endB+=n.state.selection.to-p.endA,p.endA=n.state.selection.to)),Le&&Zt<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>c.from&&c.doc.textBetween(p.start-c.from-1,p.start-c.from+1)==" "&&(p.start--,p.endA--,p.endB--);let m=c.doc.resolveNoCache(p.start-c.from),y=c.doc.resolveNoCache(p.endB-c.from),g=u.resolve(p.start),v=m.sameParent(y)&&m.parent.inlineContent&&g.end()>=p.endA,x;if((lr&&n.input.lastIOSEnter>Date.now()-225&&(!v||i.some(E=>E.nodeName=="DIV"||E.nodeName=="P"))||!v&&m.pos<c.doc.content.size&&!m.sameParent(y)&&(x=q.findFrom(c.doc.resolve(m.pos+1),1,!0))&&x.head==y.pos)&&n.someProp("handleKeyDown",E=>E(n,mn(13,"Enter")))){n.input.lastIOSEnter=0;return}if(n.state.selection.anchor>p.start&&qx(u,p.start,p.endA,m,y)&&n.someProp("handleKeyDown",E=>E(n,mn(8,"Backspace")))){at&&xe&&n.domObserver.suppressSelectionUpdates();return}xe&&at&&p.endB==p.start&&(n.input.lastAndroidDelete=Date.now()),at&&!v&&m.start()!=y.start()&&y.parentOffset==0&&m.depth==y.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==p.endA&&(p.endB-=2,y=c.doc.resolveNoCache(p.endB-c.from),setTimeout(()=>{n.someProp("handleKeyDown",function(E){return E(n,mn(13,"Enter"))})},20));let C=p.start,O=p.endA,k,I,L;if(v){if(m.pos==y.pos)Le&&Zt<=11&&m.parentOffset==0&&(n.domObserver.suppressSelectionUpdates(),setTimeout(()=>Rt(n),20)),k=n.state.tr.delete(C,O),I=u.resolve(p.start).marksAcross(u.resolve(p.endA));else if(p.endA==p.endB&&(L=jx(m.parent.content.cut(m.parentOffset,y.parentOffset),g.parent.content.cut(g.parentOffset,p.endA-g.start()))))k=n.state.tr,L.type=="add"?k.addMark(C,O,L.mark):k.removeMark(C,O,L.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(n.someProp("handleTextInput",S=>S(n,C,O,E)))return;k=n.state.tr.insertText(E,C,O)}}if(k||(k=n.state.tr.replace(C,O,c.doc.slice(p.start-c.from,p.endB-c.from))),c.sel){let E=lu(n,k.doc,c.sel);E&&!(xe&&at&&n.composing&&E.empty&&(p.start!=p.endB||n.input.lastAndroidDelete<Date.now()-100)&&(E.head==C||E.head==k.mapping.map(O)-1)||Le&&E.empty&&E.head==C)&&k.setSelection(E)}I&&k.ensureMarks(I),o&&k.setMeta("composition",o),n.dispatch(k.scrollIntoView())}function lu(n,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:Ql(n,e.resolve(t.anchor),e.resolve(t.head))}function jx(n,e){let t=n.firstChild.marks,r=e.firstChild.marks,i=t,o=r,s,l,a;for(let u=0;u<r.length;u++)i=r[u].removeFromSet(i);for(let u=0;u<t.length;u++)o=t[u].removeFromSet(o);if(i.length==1&&o.length==0)l=i[0],s="add",a=u=>u.mark(l.addToSet(u.marks));else if(i.length==0&&o.length==1)l=o[0],s="remove",a=u=>u.mark(l.removeFromSet(u.marks));else return null;let c=[];for(let u=0;u<e.childCount;u++)c.push(a(e.child(u)));if(_.from(c).eq(n))return{mark:l,type:s}}function qx(n,e,t,r,i){if(t-e<=i.pos-r.pos||ms(r,!0,!1)<i.pos)return!1;let o=n.resolve(e);if(!r.parent.isTextblock){let l=o.nodeAfter;return l!=null&&t==e+l.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=n.resolve(ms(o,!0,!0));return!s.parent.isTextblock||s.pos>t||ms(s,!0,!1)<t?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function ms(n,e,t){let r=n.depth,i=e?n.end():n.pos;for(;r>0&&(e||n.indexAfter(r)==n.node(r).childCount);)r--,i++,e=!1;if(t){let o=n.node(r).maybeChild(n.indexAfter(r));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function Wx(n,e,t,r,i){let o=n.findDiffStart(e,t);if(o==null)return null;let{a:s,b:l}=n.findDiffEnd(e,t+n.size,t+e.size);if(i=="end"){let a=Math.max(0,o-Math.min(s,l));r-=s+a-o}if(s<o&&n.size<e.size){let a=r<=o&&r>=s?o-r:0;o-=a,o&&o<e.size&&au(e.textBetween(o-1,o+1))&&(o+=a?1:-1),l=o+(l-s),s=o}else if(l<o){let a=r<=o&&r>=l?o-r:0;o-=a,o&&o<n.size&&au(n.textBetween(o-1,o+1))&&(o+=a?1:-1),s=o+(s-l),l=o}return{start:o,endA:s,endB:l}}function au(n){if(n.length!=2)return!1;let e=n.charCodeAt(0),t=n.charCodeAt(1);return e>=56320&&e<=57343&&t>=55296&&t<=56319}class Nv{constructor(e,t){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 fx,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(du),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=fu(this),uu(this),this.nodeViews=hu(this),this.docView=jc(this.state.doc,cu(this),ps(this),this.dom,this),this.domObserver=new zx(this,(r,i,o,s)=>$x(this,r,i,o,s)),this.domObserver.start(),hx(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 t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&fl(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(du),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let r in this._props)t[r]=this._props[r];t.state=this.state;for(let r in e)t[r]=e[r];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var r;let i=this.state,o=!1,s=!1;e.storedMarks&&this.composing&&(ud(this),s=!0),this.state=e;let l=i.plugins!=e.plugins||this._props.plugins!=t.plugins;if(l||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let d=hu(this);Jx(d,this.nodeViews)&&(this.nodeViews=d,o=!0)}(l||t.handleDOMEvents!=this._props.handleDOMEvents)&&fl(this),this.editable=fu(this),uu(this);let a=ps(this),c=cu(this),u=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",f=o||!this.docView.matchesNode(e.doc,c,a);(f||!e.selection.eq(i.selection))&&(s=!0);let h=u=="preserve"&&s&&this.dom.style.overflowAnchor==null&&Ow(this);if(s){this.domObserver.stop();let d=f&&(Le||xe)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&Ux(i.selection,e.selection);if(f){let p=xe?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Ax(this)),(o||!this.docView.update(e.doc,c,a,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=jc(e.doc,c,a,this.dom,this)),p&&!this.trackWrites&&(d=!0)}d||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Gw(this))?Rt(this,d):(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),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():h&&Mw(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof $){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&Pc(this,t.getBoundingClientRect(),e)}else Pc(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 t=0;t<this.directPlugins.length;t++){let r=this.directPlugins[t];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let r=this.state.plugins[t];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let r=this.pluginViews[t];r.update&&r.update(this,e)}}updateDraggedNode(e,t){let r=e.node,i=-1;if(this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let o=r.from+(this.state.doc.content.size-t.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==r.node&&(i=o)}this.dragging=new hd(e.slice,e.move,i<0?void 0:$.create(this.state.doc,i))}someProp(e,t){let r=this._props&&this._props[e],i;if(r!=null&&(i=t?t(r):r))return i;for(let s=0;s<this.directPlugins.length;s++){let l=this.directPlugins[s].props[e];if(l!=null&&(i=t?t(l):l))return i}let o=this.state.plugins;if(o)for(let s=0;s<o.length;s++){let l=o[s].props[e];if(l!=null&&(i=t?t(l):l))return i}}hasFocus(){if(Le){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&Ew(this.dom),Rt(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let t=this.dom.parentNode;t;t=t.parentNode)if(t.nodeType==9||t.nodeType==11&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return Iw(this,e)}coordsAtPos(e,t=1){return jh(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,r=-1){let i=this.docView.posFromDOM(e,t,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,t){return Lw(this,t||this.state,e)}pasteHTML(e,t){return Qr(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return Qr(this,e,null,!0,t||new ClipboardEvent("paste"))}destroy(){this.docView&&(dx(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],ps(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,mw())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return mx(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?_e&&this.root.nodeType===11&&xw(this.dom.ownerDocument)==this.dom&&Px(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function cu(n){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(n.editable),n.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(n.state)),t)for(let r in t)r=="class"?e.class+=" "+t[r]:r=="style"?e.style=(e.style?e.style+";":"")+t[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(t[r]))}),e.translate||(e.translate="no"),[ze.node(0,n.state.doc.content.size,e)]}function uu(n){if(n.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),n.cursorWrapper={dom:e,deco:ze.widget(n.state.selection.from,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function fu(n){return!n.someProp("editable",e=>e(n.state)===!1)}function Ux(n,e){let t=Math.min(n.$anchor.sharedDepth(n.head),e.$anchor.sharedDepth(e.head));return n.$anchor.start(t)!=e.$anchor.start(t)}function hu(n){let e=Object.create(null);function t(r){for(let i in r)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=r[i])}return n.someProp("nodeViews",t),n.someProp("markViews",t),e}function Jx(n,e){let t=0,r=0;for(let i in n){if(n[i]!=e[i])return!0;t++}for(let i in e)r++;return t!=r}function du(n){if(n.spec.state||n.spec.filterTransaction||n.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}let Kx=n=>crypto.getRandomValues(new Uint8Array(n)),Yx=(n,e,t)=>{let r=(2<<Math.log2(n.length-1))-1,i=-~(1.6*r*e/n.length);return(o=e)=>{let s="";for(;;){let l=t(i),a=i|0;for(;a--;)if(s+=n[l[a]&r]||"",s.length>=o)return s}}},Dv=(n,e=21)=>Yx(n,e|0,Kx);function Ro(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Gx=[["ß","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"]],Xx=(n,e)=>{for(const[t,r]of e)n=n.replace(new RegExp(Ro(t),"g"),r);return n};function Qx(n,e){if(typeof n!="string")throw new TypeError(`Expected a string, got \`${typeof n}\``);e={customReplacements:[],...e};const t=new Map([...Gx,...e.customReplacements]);return n=n.normalize(),n=Xx(n,t),n=n.normalize("NFD").replace(/\p{Diacritic}/gu,"").normalize(),n}const Zx=[["&"," and "],["🦄"," unicorn "],["♥"," love "]],e3=n=>n.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"),t3=(n,e)=>{const t=Ro(e);return n.replace(new RegExp(`${t}{2,}`,"g"),e).replace(new RegExp(`^${t}|${t}$`,"g"),"")},n3=n=>{let e="a-z\\d";if(e+=n.lowercase?"":"A-Z",n.preserveCharacters.length>0)for(const t of n.preserveCharacters){if(t===n.separator)throw new Error(`The separator character \`${n.separator}\` cannot be included in preserved characters: ${n.preserveCharacters}`);e+=Ro(t)}return new RegExp(`[^${e}]+`,"g")};function Iv(n,e){if(typeof n!="string")throw new TypeError(`Expected a string, got \`${typeof n}\``);e={separator:"-",lowercase:!0,decamelize:!0,customReplacements:[],preserveLeadingUnderscore:!1,preserveTrailingDash:!1,preserveCharacters:[],...e};const t=e.preserveLeadingUnderscore&&n.startsWith("_"),r=e.preserveTrailingDash&&n.endsWith("-"),i=new Map([...Zx,...e.customReplacements]);n=Qx(n,{customReplacements:i}),e.decamelize&&(n=e3(n));const o=n3(e);return e.lowercase&&(n=n.toLowerCase()),n=n.replace(/([a-zA-Z\d]+)'([ts])(\s|$)/g,"$1$2$3"),n=n.replace(o,e.separator),n=n.replace(/\\/g,""),e.separator&&(n=t3(n,e.separator)),t&&(n=`_${n}`),r&&(n=`${n}-`),n}function Rv(n,e){return function(t,r){let{$from:i,$to:o,node:s}=t.selection;if(s&&s.isBlock||i.depth<2||!i.sameParent(o))return!1;let l=i.node(-1);if(l.type!=n)return!1;if(i.parent.content.size==0&&i.node(-1).childCount==i.indexAfter(-1)){if(i.depth==3||i.node(-3).type!=n||i.index(-2)!=i.node(-2).childCount-1)return!1;if(r){let f=_.empty,h=i.index(-1)?1:i.index(-2)?2:3;for(let g=i.depth-h;g>=i.depth-3;g--)f=_.from(i.node(g).copy(f));let d=i.indexAfter(-1)<i.node(-2).childCount?1:i.indexAfter(-2)<i.node(-3).childCount?2:3;f=f.append(_.from(n.createAndFill()));let p=i.before(i.depth-(h-1)),m=t.tr.replace(p,i.after(-d),new R(f,4-h,0)),y=-1;m.doc.nodesBetween(p,m.doc.content.size,(g,v)=>{if(y>-1)return!1;g.isTextblock&&g.content.size==0&&(y=v+1)}),y>-1&&m.setSelection(q.near(m.doc.resolve(y))),r(m.scrollIntoView())}return!0}let a=o.pos==i.end()?l.contentMatchAt(0).defaultType:null,c=t.tr.delete(i.pos,o.pos),u=a?[e?{type:n,attrs:e}:null,{type:a}]:void 0;return Pr(c.doc,i.pos,2,u)?(r&&r(c.split(i.pos,2,u).scrollIntoView()),!0):!1}}function zv(n){return function(e,t){let{$from:r,$to:i}=e.selection,o=r.blockRange(i,s=>s.childCount>0&&s.firstChild.type==n);return o?t?r.node(o.depth-1).type==n?r3(e,t,n,o):i3(e,t,o):!0:!1}}function r3(n,e,t,r){let i=n.tr,o=r.end,s=r.$to.end(r.depth);o<s&&(i.step(new ke(o-1,s,o,s,new R(_.from(t.create(null,r.parent.copy())),1,0),1,!0)),r=new Ef(i.doc.resolve(r.$from.pos),i.doc.resolve(s),r.depth));const l=Eo(r);if(l==null)return!1;i.lift(r,l);let a=i.mapping.map(o,-1)-1;return _o(i.doc,a)&&i.join(a),e(i.scrollIntoView()),!0}function i3(n,e,t){let r=n.tr,i=t.parent;for(let d=t.end,p=t.endIndex-1,m=t.startIndex;p>m;p--)d-=i.child(p).nodeSize,r.delete(d-1,d+1);let o=r.doc.resolve(t.start),s=o.nodeAfter;if(r.mapping.map(t.end)!=t.start+o.nodeAfter.nodeSize)return!1;let l=t.startIndex==0,a=t.endIndex==i.childCount,c=o.node(-1),u=o.index(-1);if(!c.canReplace(u+(l?0:1),u+1,s.content.append(a?_.empty:_.from(i))))return!1;let f=o.pos,h=f+s.nodeSize;return r.step(new ke(f-(l?1:0),h+(a?1:0),f+1,h-1,new R((l?_.empty:_.from(i.copy(_.empty))).append(a?_.empty:_.from(i.copy(_.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}function Fv(n){return function(e,t){let{$from:r,$to:i}=e.selection,o=r.blockRange(i,c=>c.childCount>0&&c.firstChild.type==n);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!=n)return!1;if(t){let c=a.lastChild&&a.lastChild.type==l.type,u=_.from(c?n.create():null),f=new R(_.from(n.create(null,_.from(l.type.create(null,u)))),c?3:1,0),h=o.start,d=o.end;t(e.tr.step(new ke(h-(c?3:1),d,h,d,f,1,!0)).scrollIntoView())}return!0}}function o3(n){const e=new Map;if(!n||!n.type)throw new Error("mdast-util-definitions expected node");return Hl(n,"definition",function(r){const i=pu(r.identifier);i&&!e.get(i)&&e.set(i,r)}),t;function t(r){const i=pu(r);return e.get(i)}}function pu(n){return String(n||"").toUpperCase()}function Pv(){return function(n){const e=o3(n);Hl(n,function(t,r,i){if(t.type==="definition"&&i!==void 0&&typeof r=="number")return i.children.splice(r,1),[Gs,r];if(t.type==="imageReference"||t.type==="linkReference"){const o=e(t.identifier);if(o&&i&&typeof r=="number")return i.children[r]=t.type==="imageReference"?{type:"image",url:o.url,title:o.title,alt:t.alt}:{type:"link",url:o.url,title:o.title,children:t.children},[Gs,r]}})}}var hl,dl;if(typeof WeakMap<"u"){let n=new WeakMap;hl=e=>n.get(e),dl=(e,t)=>(n.set(e,t),t)}else{const n=[];let t=0;hl=r=>{for(let i=0;i<n.length;i+=2)if(n[i]==r)return n[i+1]},dl=(r,i)=>(t==10&&(t=0),n[t++]=r,n[t++]=i)}var se=class{constructor(n,e,t,r){this.width=n,this.height=e,this.map=t,this.problems=r}findCell(n){for(let e=0;e<this.map.length;e++){const t=this.map[e];if(t!=n)continue;const r=e%this.width,i=e/this.width|0;let o=r+1,s=i+1;for(let l=1;o<this.width&&this.map[e+l]==t;l++)o++;for(let l=1;s<this.height&&this.map[e+this.width*l]==t;l++)s++;return{left:r,top:i,right:o,bottom:s}}throw new RangeError(`No cell with offset ${n} found`)}colCount(n){for(let e=0;e<this.map.length;e++)if(this.map[e]==n)return e%this.width;throw new RangeError(`No cell with offset ${n} found`)}nextCell(n,e,t){const{left:r,right:i,top:o,bottom:s}=this.findCell(n);return e=="horiz"?(t<0?r==0:i==this.width)?null:this.map[o*this.width+(t<0?r-1:i)]:(t<0?o==0:s==this.height)?null:this.map[r+this.width*(t<0?o-1:s)]}rectBetween(n,e){const{left:t,right:r,top:i,bottom:o}=this.findCell(n),{left:s,right:l,top:a,bottom:c}=this.findCell(e);return{left:Math.min(t,s),top:Math.min(i,a),right:Math.max(r,l),bottom:Math.max(o,c)}}cellsInRect(n){const e=[],t={};for(let r=n.top;r<n.bottom;r++)for(let i=n.left;i<n.right;i++){const o=r*this.width+i,s=this.map[o];t[s]||(t[s]=!0,!(i==n.left&&i&&this.map[o-1]==s||r==n.top&&r&&this.map[o-this.width]==s)&&e.push(s))}return e}positionAt(n,e,t){for(let r=0,i=0;;r++){const o=i+t.child(r).nodeSize;if(r==n){let s=e+n*this.width;const l=(n+1)*this.width;for(;s<l&&this.map[s]<i;)s++;return s==l?o-1:this.map[s]}i=o}}static get(n){return hl(n)||dl(n,s3(n))}};function s3(n){if(n.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+n.type.name);const e=l3(n),t=n.childCount,r=[];let i=0,o=null;const s=[];for(let c=0,u=e*t;c<u;c++)r[c]=0;for(let c=0,u=0;c<t;c++){const f=n.child(c);u++;for(let p=0;;p++){for(;i<r.length&&r[i]!=0;)i++;if(p==f.childCount)break;const m=f.child(p),{colspan:y,rowspan:g,colwidth:v}=m.attrs;for(let x=0;x<g;x++){if(x+c>=t){(o||(o=[])).push({type:"overlong_rowspan",pos:u,n:g-x});break}const C=i+x*e;for(let O=0;O<y;O++){r[C+O]==0?r[C+O]=u:(o||(o=[])).push({type:"collision",row:c,pos:u,n:y-O});const k=v&&v[O];if(k){const I=(C+O)%e*2,L=s[I];L==null||L!=k&&s[I+1]==1?(s[I]=k,s[I+1]=1):L==k&&s[I+1]++}}}i+=y,u+=m.nodeSize}const h=(c+1)*e;let d=0;for(;i<h;)r[i++]==0&&d++;d&&(o||(o=[])).push({type:"missing",row:c,n:d}),u++}const l=new se(e,t,r,o);let a=!1;for(let c=0;!a&&c<s.length;c+=2)s[c]!=null&&s[c+1]<t&&(a=!0);return a&&a3(l,s,n),l}function l3(n){let e=-1,t=!1;for(let r=0;r<n.childCount;r++){const i=n.child(r);let o=0;if(t)for(let s=0;s<r;s++){const l=n.child(s);for(let a=0;a<l.childCount;a++){const c=l.child(a);s+c.attrs.rowspan>r&&(o+=c.attrs.colspan)}}for(let s=0;s<i.childCount;s++){const l=i.child(s);o+=l.attrs.colspan,l.attrs.rowspan>1&&(t=!0)}e==-1?e=o:e!=o&&(e=Math.max(e,o))}return e}function a3(n,e,t){n.problems||(n.problems=[]);const r={};for(let i=0;i<n.map.length;i++){const o=n.map[i];if(r[o])continue;r[o]=!0;const s=t.nodeAt(o);if(!s)throw new RangeError(`No cell with offset ${o} found`);let l=null;const a=s.attrs;for(let c=0;c<a.colspan;c++){const u=(i+c)%n.width,f=e[u*2];f!=null&&(!a.colwidth||a.colwidth[c]!=f)&&((l||(l=c3(a)))[c]=f)}l&&n.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:l})}}function c3(n){if(n.colwidth)return n.colwidth.slice();const e=[];for(let t=0;t<n.colspan;t++)e.push(0);return e}function mu(n,e){if(typeof n=="string")return{};const t=n.getAttribute("data-colwidth"),r=t&&/^\d+(,\d+)*$/.test(t)?t.split(",").map(s=>Number(s)):null,i=Number(n.getAttribute("colspan")||1),o={colspan:i,rowspan:Number(n.getAttribute("rowspan")||1),colwidth:r&&r.length==i?r:null};for(const s in e){const l=e[s].getFromDOM,a=l&&l(n);a!=null&&(o[s]=a)}return o}function gu(n,e){const t={};n.attrs.colspan!=1&&(t.colspan=n.attrs.colspan),n.attrs.rowspan!=1&&(t.rowspan=n.attrs.rowspan),n.attrs.colwidth&&(t["data-colwidth"]=n.attrs.colwidth.join(","));for(const r in e){const i=e[r].setDOMAttr;i&&i(n.attrs[r],t)}return t}function Lv(n){const e=n.cellAttributes||{},t={colspan:{default:1},rowspan:{default:1},colwidth:{default:null}};for(const r in e)t[r]={default:e[r].default};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:n.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:n.cellContent,attrs:t,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:r=>mu(r,e)}],toDOM(r){return["td",gu(r,e),0]}},table_header:{content:n.cellContent,attrs:t,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:r=>mu(r,e)}],toDOM(r){return["th",gu(r,e),0]}}}}function ot(n){let e=n.cached.tableNodeTypes;if(!e){e=n.cached.tableNodeTypes={};for(const t in n.nodes){const r=n.nodes[t],i=r.spec.tableRole;i&&(e[i]=r)}}return e}var Kt=new hr("selectingCells");function ci(n){for(let e=n.depth-1;e>0;e--)if(n.node(e).type.spec.tableRole=="row")return n.node(0).resolve(n.before(e+1));return null}function Lt(n){const e=n.selection.$head;for(let t=e.depth;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return!0;return!1}function zo(n){const e=n.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 t=ci(e.$head)||u3(e.$head);if(t)return t;throw new RangeError(`No cell found around position ${e.head}`)}function u3(n){for(let e=n.nodeAfter,t=n.pos;e;e=e.firstChild,t++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return n.doc.resolve(t)}for(let e=n.nodeBefore,t=n.pos;e;e=e.lastChild,t--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return n.doc.resolve(t-e.nodeSize)}}function pl(n){return n.parent.type.spec.tableRole=="row"&&!!n.nodeAfter}function f3(n){return n.node(0).resolve(n.pos+n.nodeAfter.nodeSize)}function ia(n,e){return n.depth==e.depth&&n.pos>=e.start(-1)&&n.pos<=e.end(-1)}function yd(n,e,t){const r=n.node(-1),i=se.get(r),o=n.start(-1),s=i.nextCell(n.pos-o,e,t);return s==null?null:n.node(0).resolve(o+s)}function In(n,e,t=1){const r={...n,colspan:n.colspan-t};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,t),r.colwidth.some(i=>i>0)||(r.colwidth=null)),r}function h3(n,e,t=1){const r={...n,colspan:n.colspan+t};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let i=0;i<t;i++)r.colwidth.splice(e,0,0)}return r}function d3(n,e,t){const r=ot(e.type.schema).header_cell;for(let i=0;i<n.height;i++)if(e.nodeAt(n.map[t+i*n.width]).type!=r)return!1;return!0}var ue=class Tt extends q{constructor(e,t=e){const r=e.node(-1),i=se.get(r),o=e.start(-1),s=i.rectBetween(e.pos-o,t.pos-o),l=e.node(0),a=i.cellsInRect(s).filter(u=>u!=t.pos-o);a.unshift(t.pos-o);const c=a.map(u=>{const f=r.nodeAt(u);if(!f)throw RangeError(`No cell with offset ${u} found`);const h=o+u+1;return new so(l.resolve(h),l.resolve(h+f.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=t}map(e,t){const r=e.resolve(t.map(this.$anchorCell.pos)),i=e.resolve(t.map(this.$headCell.pos));if(pl(r)&&pl(i)&&ia(r,i)){const o=this.$anchorCell.node(-1)!=r.node(-1);return o&&this.isRowSelection()?Tt.rowSelection(r,i):o&&this.isColSelection()?Tt.colSelection(r,i):new Tt(r,i)}return X.between(r,i)}content(){const e=this.$anchorCell.node(-1),t=se.get(e),r=this.$anchorCell.start(-1),i=t.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),o={},s=[];for(let a=i.top;a<i.bottom;a++){const c=[];for(let u=a*t.width+i.left,f=i.left;f<i.right;f++,u++){const h=t.map[u];if(o[h])continue;o[h]=!0;const d=t.findCell(h);let p=e.nodeAt(h);if(!p)throw RangeError(`No cell with offset ${h} found`);const m=i.left-d.left,y=d.right-i.right;if(m>0||y>0){let g=p.attrs;if(m>0&&(g=In(g,0,m)),y>0&&(g=In(g,g.colspan-y,y)),d.left<i.left){if(p=p.type.createAndFill(g),!p)throw RangeError(`Could not create cell with attrs ${JSON.stringify(g)}`)}else p=p.type.create(g,p.content)}if(d.top<i.top||d.bottom>i.bottom){const g={...p.attrs,rowspan:Math.min(d.bottom,i.bottom)-Math.max(d.top,i.top)};d.top<i.top?p=p.type.createAndFill(g):p=p.type.create(g,p.content)}c.push(p)}s.push(e.child(a).copy(_.from(c)))}const l=this.isColSelection()&&this.isRowSelection()?e:s;return new R(_.from(l),1,1)}replace(e,t=R.empty){const r=e.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){const{$from:l,$to:a}=i[s],c=e.mapping.slice(r);e.replace(c.map(l.pos),c.map(a.pos),s?R.empty:t)}const o=q.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);o&&e.setSelection(o)}replaceWith(e,t){this.replace(e,new R(_.from(t),0,0))}forEachCell(e){const t=this.$anchorCell.node(-1),r=se.get(t),i=this.$anchorCell.start(-1),o=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let s=0;s<o.length;s++)e(t.nodeAt(o[s]),i+o[s])}isColSelection(){const e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,i=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,i)==this.$headCell.node(-1).childCount}static colSelection(e,t=e){const r=e.node(-1),i=se.get(r),o=e.start(-1),s=i.findCell(e.pos-o),l=i.findCell(t.pos-o),a=e.node(0);return s.top<=l.top?(s.top>0&&(e=a.resolve(o+i.map[s.left])),l.bottom<i.height&&(t=a.resolve(o+i.map[i.width*(i.height-1)+l.right-1]))):(l.top>0&&(t=a.resolve(o+i.map[l.left])),s.bottom<i.height&&(e=a.resolve(o+i.map[i.width*(i.height-1)+s.right-1]))),new Tt(e,t)}isRowSelection(){const e=this.$anchorCell.node(-1),t=se.get(e),r=this.$anchorCell.start(-1),i=t.colCount(this.$anchorCell.pos-r),o=t.colCount(this.$headCell.pos-r);if(Math.min(i,o)>0)return!1;const s=i+this.$anchorCell.nodeAfter.attrs.colspan,l=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,l)==t.width}eq(e){return e instanceof Tt&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,t=e){const r=e.node(-1),i=se.get(r),o=e.start(-1),s=i.findCell(e.pos-o),l=i.findCell(t.pos-o),a=e.node(0);return s.left<=l.left?(s.left>0&&(e=a.resolve(o+i.map[s.top*i.width])),l.right<i.width&&(t=a.resolve(o+i.map[i.width*(l.top+1)-1]))):(l.left>0&&(t=a.resolve(o+i.map[l.top*i.width])),s.right<i.width&&(e=a.resolve(o+i.map[i.width*(s.top+1)-1]))),new Tt(e,t)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,t){return new Tt(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){return new Tt(e.resolve(t),e.resolve(r))}getBookmark(){return new p3(this.$anchorCell.pos,this.$headCell.pos)}};ue.prototype.visible=!1;q.jsonID("cell",ue);var p3=class bd{constructor(e,t){this.anchor=e,this.head=t}map(e){return new bd(e.map(this.anchor),e.map(this.head))}resolve(e){const t=e.resolve(this.anchor),r=e.resolve(this.head);return t.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&t.index()<t.parent.childCount&&r.index()<r.parent.childCount&&ia(t,r)?new ue(t,r):q.near(r,1)}};function m3(n){if(!(n.selection instanceof ue))return null;const e=[];return n.selection.forEachCell((t,r)=>{e.push(ze.node(r,r+t.nodeSize,{class:"selectedCell"}))}),oe.create(n.doc,e)}function g3({$from:n,$to:e}){if(n.pos==e.pos||n.pos<n.pos-6)return!1;let t=n.pos,r=e.pos,i=n.depth;for(;i>=0&&!(n.after(i+1)<n.end(i));i--,t++);for(let o=e.depth;o>=0&&!(e.before(o+1)>e.start(o));o--,r--);return t==r&&/row|table/.test(n.node(i).type.spec.tableRole)}function y3({$from:n,$to:e}){let t,r;for(let i=n.depth;i>0;i--){const o=n.node(i);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){t=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 t!==r&&e.parentOffset===0}function b3(n,e,t){const r=(e||n).selection,i=(e||n).doc;let o,s;if(r instanceof $&&(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(!t){const l=se.get(r.node),a=r.from+1,c=a+l.map[l.width*l.height-1];o=ue.create(i,a+1,c)}}else r instanceof X&&g3(r)?o=X.create(i,r.from):r instanceof X&&y3(r)&&(o=X.create(i,r.$from.start(),r.$from.end()));return o&&(e||(e=n.tr)).setSelection(o),e}var w3=new hr("fix-tables");function wd(n,e,t,r){const i=n.childCount,o=e.childCount;e:for(let s=0,l=0;s<o;s++){const a=e.child(s);for(let c=l,u=Math.min(i,s+3);c<u;c++)if(n.child(c)==a){l=c+1,t+=a.nodeSize;continue e}r(a,t),l<i&&n.child(l).sameMarkup(a)?wd(n.child(l),a,t+1,r):a.nodesBetween(0,a.content.size,r,t+1),t+=a.nodeSize}}function x3(n,e){let t;const r=(i,o)=>{i.type.spec.tableRole=="table"&&(t=k3(n,i,o,t))};return e?e.doc!=n.doc&&wd(e.doc,n.doc,0,r):n.doc.descendants(r),t}function k3(n,e,t,r){const i=se.get(e);if(!i.problems)return r;r||(r=n.tr);const o=[];for(let a=0;a<i.height;a++)o.push(0);for(let a=0;a<i.problems.length;a++){const c=i.problems[a];if(c.type=="collision"){const u=e.nodeAt(c.pos);if(!u)continue;const f=u.attrs;for(let h=0;h<f.rowspan;h++)o[c.row+h]+=c.n;r.setNodeMarkup(r.mapping.map(t+1+c.pos),null,In(f,f.colspan-c.n,c.n))}else if(c.type=="missing")o[c.row]+=c.n;else if(c.type=="overlong_rowspan"){const u=e.nodeAt(c.pos);if(!u)continue;r.setNodeMarkup(r.mapping.map(t+1+c.pos),null,{...u.attrs,rowspan:u.attrs.rowspan-c.n})}else if(c.type=="colwidth mismatch"){const u=e.nodeAt(c.pos);if(!u)continue;r.setNodeMarkup(r.mapping.map(t+1+c.pos),null,{...u.attrs,colwidth:c.colwidth})}}let s,l;for(let a=0;a<o.length;a++)o[a]&&(s==null&&(s=a),l=a);for(let a=0,c=t+1;a<i.height;a++){const u=e.child(a),f=c+u.nodeSize,h=o[a];if(h>0){let d="cell";u.firstChild&&(d=u.firstChild.type.spec.tableRole);const p=[];for(let y=0;y<h;y++){const g=ot(n.schema)[d].createAndFill();g&&p.push(g)}const m=(a==0||s==a-1)&&l==a?c+1:f-1;r.insert(r.mapping.map(m),p)}c=f}return r.setMeta(w3,{fixTables:!0})}function dr(n){const e=n.selection,t=zo(n),r=t.node(-1),i=t.start(-1),o=se.get(r);return{...e instanceof ue?o.rectBetween(e.$anchorCell.pos-i,e.$headCell.pos-i):o.findCell(t.pos-i),tableStart:i,map:o,table:r}}function xd(n,{map:e,tableStart:t,table:r},i){let o=i>0?-1:0;d3(e,r,i+o)&&(o=i==0||i==e.width?null:0);for(let s=0;s<e.height;s++){const l=s*e.width+i;if(i>0&&i<e.width&&e.map[l-1]==e.map[l]){const a=e.map[l],c=r.nodeAt(a);n.setNodeMarkup(n.mapping.map(t+a),null,h3(c.attrs,i-e.colCount(a))),s+=c.attrs.rowspan-1}else{const a=o==null?ot(r.type.schema).cell:r.nodeAt(e.map[l+o]).type,c=e.positionAt(s,i,r);n.insert(n.mapping.map(t+c),a.createAndFill())}}return n}function Bv(n,e){if(!Lt(n))return!1;if(e){const t=dr(n);e(xd(n.tr,t,t.left))}return!0}function Vv(n,e){if(!Lt(n))return!1;if(e){const t=dr(n);e(xd(n.tr,t,t.right))}return!0}function S3(n,{map:e,table:t,tableStart:r},i){const o=n.mapping.maps.length;for(let s=0;s<e.height;){const l=s*e.width+i,a=e.map[l],c=t.nodeAt(a),u=c.attrs;if(i>0&&e.map[l-1]==a||i<e.width-1&&e.map[l+1]==a)n.setNodeMarkup(n.mapping.slice(o).map(r+a),null,In(u,i-e.colCount(a)));else{const f=n.mapping.slice(o).map(r+a);n.delete(f,f+c.nodeSize)}s+=u.rowspan}}function Hv(n,e){if(!Lt(n))return!1;if(e){const t=dr(n),r=n.tr;if(t.left==0&&t.right==t.map.width)return!1;for(let i=t.right-1;S3(r,t,i),i!=t.left;i--){const o=t.tableStart?r.doc.nodeAt(t.tableStart-1):r.doc;if(!o)throw RangeError("No table found");t.table=o,t.map=se.get(o)}e(r)}return!0}function v3(n,{map:e,table:t,tableStart:r},i){let o=0;for(let c=0;c<i;c++)o+=t.child(c).nodeSize;const s=o+t.child(i).nodeSize,l=n.mapping.maps.length;n.delete(o+r,s+r);const a=new Set;for(let c=0,u=i*e.width;c<e.width;c++,u++){const f=e.map[u];if(!a.has(f)){if(a.add(f),i>0&&f==e.map[u-e.width]){const h=t.nodeAt(f).attrs;n.setNodeMarkup(n.mapping.slice(l).map(f+r),null,{...h,rowspan:h.rowspan-1}),c+=h.colspan-1}else if(i<e.height&&f==e.map[u+e.width]){const h=t.nodeAt(f),d=h.attrs,p=h.type.create({...d,rowspan:h.attrs.rowspan-1},h.content),m=e.positionAt(i+1,c,t);n.insert(n.mapping.slice(l).map(r+m),p),c+=d.colspan-1}}}}function $v(n,e){if(!Lt(n))return!1;if(e){const t=dr(n),r=n.tr;if(t.top==0&&t.bottom==t.map.height)return!1;for(let i=t.bottom-1;v3(r,t,i),i!=t.top;i--){const o=t.tableStart?r.doc.nodeAt(t.tableStart-1):r.doc;if(!o)throw RangeError("No table found");t.table=o,t.map=se.get(t.table)}e(r)}return!0}function jv(n,e){return function(t,r){if(!Lt(t))return!1;const i=zo(t);if(i.nodeAfter.attrs[n]===e)return!1;if(r){const o=t.tr;t.selection instanceof ue?t.selection.forEachCell((s,l)=>{s.attrs[n]!==e&&o.setNodeMarkup(l,null,{...s.attrs,[n]:e})}):o.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[n]:e}),r(o)}return!0}}function C3(n){return function(e,t){if(!Lt(e))return!1;if(t){const r=ot(e.schema),i=dr(e),o=e.tr,s=i.map.cellsInRect(n=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:n=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),l=s.map(a=>i.table.nodeAt(a));for(let a=0;a<s.length;a++)l[a].type==r.header_cell&&o.setNodeMarkup(i.tableStart+s[a],r.cell,l[a].attrs);if(o.steps.length==0)for(let a=0;a<s.length;a++)o.setNodeMarkup(i.tableStart+s[a],r.header_cell,l[a].attrs);t(o)}return!0}}function yu(n,e,t){const r=e.map.cellsInRect({left:0,top:0,right:n=="row"?e.map.width:1,bottom:n=="column"?e.map.height:1});for(let i=0;i<r.length;i++){const o=e.table.nodeAt(r[i]);if(o&&o.type!==t.header_cell)return!1}return!0}function oa(n,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?C3(n):function(t,r){if(!Lt(t))return!1;if(r){const i=ot(t.schema),o=dr(t),s=t.tr,l=yu("row",o,i),a=yu("column",o,i),u=(n==="column"?l:n==="row"?a:!1)?1:0,f=n=="column"?{left:0,top:u,right:1,bottom:o.map.height}:n=="row"?{left:u,top:0,right:o.map.width,bottom:1}:o,h=n=="column"?a?i.cell:i.header_cell:n=="row"?l?i.cell:i.header_cell:i.cell;o.map.cellsInRect(f).forEach(d=>{const p=d+o.tableStart,m=s.doc.nodeAt(p);m&&s.setNodeMarkup(p,h,m.attrs)}),r(s)}return!0}}oa("row",{useDeprecatedLogic:!0});oa("column",{useDeprecatedLogic:!0});oa("cell",{useDeprecatedLogic:!0});function A3(n,e){if(e<0){const t=n.nodeBefore;if(t)return n.pos-t.nodeSize;for(let r=n.index(-1)-1,i=n.before();r>=0;r--){const o=n.node(-1).child(r),s=o.lastChild;if(s)return i-1-s.nodeSize;i-=o.nodeSize}}else{if(n.index()<n.parent.childCount-1)return n.pos+n.nodeAfter.nodeSize;const t=n.node(-1);for(let r=n.indexAfter(-1),i=n.after();r<t.childCount;r++){const o=t.child(r);if(o.childCount)return i+1;i+=o.nodeSize}}return null}function qv(n){return function(e,t){if(!Lt(e))return!1;const r=A3(zo(e),n);if(r==null)return!1;if(t){const i=e.doc.resolve(r);t(e.tr.setSelection(X.between(i,f3(i))).scrollIntoView())}return!0}}function Wv(n,e){const t=n.selection.$anchor;for(let r=t.depth;r>0;r--)if(t.node(r).type.spec.tableRole=="table")return e&&e(n.tr.delete(t.before(r),t.after(r)).scrollIntoView()),!0;return!1}function Ei(n,e){const t=n.selection;if(!(t instanceof ue))return!1;if(e){const r=n.tr,i=ot(n.schema).cell.createAndFill().content;t.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 O3(n){if(!n.size)return null;let{content:e,openStart:t,openEnd:r}=n;for(;e.childCount==1&&(t>0&&r>0||e.child(0).type.spec.tableRole=="table");)t--,r--,e=e.child(0).content;const i=e.child(0),o=i.type.spec.tableRole,s=i.type.schema,l=[];if(o=="row")for(let a=0;a<e.childCount;a++){let c=e.child(a).content;const u=a?0:Math.max(0,t-1),f=a<e.childCount-1?0:Math.max(0,r-1);(u||f)&&(c=ml(ot(s).row,new R(c,u,f)).content),l.push(c)}else if(o=="cell"||o=="header_cell")l.push(t||r?ml(ot(s).row,new R(e,t,r)).content:e);else return null;return M3(s,l)}function M3(n,e){const t=[];for(let i=0;i<e.length;i++){const o=e[i];for(let s=o.childCount-1;s>=0;s--){const{rowspan:l,colspan:a}=o.child(s).attrs;for(let c=i;c<i+l;c++)t[c]=(t[c]||0)+a}}let r=0;for(let i=0;i<t.length;i++)r=Math.max(r,t[i]);for(let i=0;i<t.length;i++)if(i>=e.length&&e.push(_.empty),t[i]<r){const o=ot(n).cell.createAndFill(),s=[];for(let l=t[i];l<r;l++)s.push(o);e[i]=e[i].append(_.from(s))}return{height:e.length,width:r,rows:e}}function ml(n,e){const t=n.createAndFill();return new Mh(t).replace(0,t.content.size,e).doc}function E3({width:n,height:e,rows:t},r,i){if(n!=r){const o=[],s=[];for(let l=0;l<t.length;l++){const a=t[l],c=[];for(let u=o[l]||0,f=0;u<r;f++){let h=a.child(f%a.childCount);u+h.attrs.colspan>r&&(h=h.type.createChecked(In(h.attrs,h.attrs.colspan,u+h.attrs.colspan-r),h.content)),c.push(h),u+=h.attrs.colspan;for(let d=1;d<h.attrs.rowspan;d++)o[l+d]=(o[l+d]||0)+h.attrs.colspan}s.push(_.from(c))}t=s,n=r}if(e!=i){const o=[];for(let s=0,l=0;s<i;s++,l++){const a=[],c=t[l%e];for(let u=0;u<c.childCount;u++){let f=c.child(u);s+f.attrs.rowspan>i&&(f=f.type.create({...f.attrs,rowspan:Math.max(1,i-f.attrs.rowspan)},f.content)),a.push(f)}o.push(_.from(a))}t=o,e=i}return{width:n,height:e,rows:t}}function _3(n,e,t,r,i,o,s){const l=n.doc.type.schema,a=ot(l);let c,u;if(i>e.width)for(let f=0,h=0;f<e.height;f++){const d=t.child(f);h+=d.nodeSize;const p=[];let m;d.lastChild==null||d.lastChild.type==a.cell?m=c||(c=a.cell.createAndFill()):m=u||(u=a.header_cell.createAndFill());for(let y=e.width;y<i;y++)p.push(m);n.insert(n.mapping.slice(s).map(h-1+r),p)}if(o>e.height){const f=[];for(let p=0,m=(e.height-1)*e.width;p<Math.max(e.width,i);p++){const y=p>=e.width?!1:t.nodeAt(e.map[m+p]).type==a.header_cell;f.push(y?u||(u=a.header_cell.createAndFill()):c||(c=a.cell.createAndFill()))}const h=a.row.create(null,_.from(f)),d=[];for(let p=e.height;p<o;p++)d.push(h);n.insert(n.mapping.slice(s).map(r+t.nodeSize-2),d)}return!!(c||u)}function bu(n,e,t,r,i,o,s,l){if(s==0||s==e.height)return!1;let a=!1;for(let c=i;c<o;c++){const u=s*e.width+c,f=e.map[u];if(e.map[u-e.width]==f){a=!0;const h=t.nodeAt(f),{top:d,left:p}=e.findCell(f);n.setNodeMarkup(n.mapping.slice(l).map(f+r),null,{...h.attrs,rowspan:s-d}),n.insert(n.mapping.slice(l).map(e.positionAt(s,p,t)),h.type.createAndFill({...h.attrs,rowspan:d+h.attrs.rowspan-s})),c+=h.attrs.colspan-1}}return a}function wu(n,e,t,r,i,o,s,l){if(s==0||s==e.width)return!1;let a=!1;for(let c=i;c<o;c++){const u=c*e.width+s,f=e.map[u];if(e.map[u-1]==f){a=!0;const h=t.nodeAt(f),d=e.colCount(f),p=n.mapping.slice(l).map(f+r);n.setNodeMarkup(p,null,In(h.attrs,s-d,h.attrs.colspan-(s-d))),n.insert(p+h.nodeSize,h.type.createAndFill(In(h.attrs,0,s-d))),c+=h.attrs.rowspan-1}}return a}function xu(n,e,t,r,i){let o=t?n.doc.nodeAt(t-1):n.doc;if(!o)throw new Error("No table found");let s=se.get(o);const{top:l,left:a}=r,c=a+i.width,u=l+i.height,f=n.tr;let h=0;function d(){if(o=t?f.doc.nodeAt(t-1):f.doc,!o)throw new Error("No table found");s=se.get(o),h=f.mapping.maps.length}_3(f,s,o,t,c,u,h)&&d(),bu(f,s,o,t,a,c,l,h)&&d(),bu(f,s,o,t,a,c,u,h)&&d(),wu(f,s,o,t,l,u,a,h)&&d(),wu(f,s,o,t,l,u,c,h)&&d();for(let p=l;p<u;p++){const m=s.positionAt(p,a,o),y=s.positionAt(p,c,o);f.replace(f.mapping.slice(h).map(m+t),f.mapping.slice(h).map(y+t),new R(i.rows[p-l],0,0))}d(),f.setSelection(new ue(f.doc.resolve(t+s.positionAt(l,a,o)),f.doc.resolve(t+s.positionAt(u-1,c-1,o)))),e(f)}var T3=Fh({ArrowLeft:_i("horiz",-1),ArrowRight:_i("horiz",1),ArrowUp:_i("vert",-1),ArrowDown:_i("vert",1),"Shift-ArrowLeft":Ti("horiz",-1),"Shift-ArrowRight":Ti("horiz",1),"Shift-ArrowUp":Ti("vert",-1),"Shift-ArrowDown":Ti("vert",1),Backspace:Ei,"Mod-Backspace":Ei,Delete:Ei,"Mod-Delete":Ei});function qi(n,e,t){return t.eq(n.selection)?!1:(e&&e(n.tr.setSelection(t).scrollIntoView()),!0)}function _i(n,e){return(t,r,i)=>{if(!i)return!1;const o=t.selection;if(o instanceof ue)return qi(t,r,q.near(o.$headCell,e));if(n!="horiz"&&!o.empty)return!1;const s=kd(i,n,e);if(s==null)return!1;if(n=="horiz")return qi(t,r,q.near(t.doc.resolve(o.head+e),e));{const l=t.doc.resolve(s),a=yd(l,n,e);let c;return a?c=q.near(a,1):e<0?c=q.near(t.doc.resolve(l.before(-1)),-1):c=q.near(t.doc.resolve(l.after(-1)),1),qi(t,r,c)}}}function Ti(n,e){return(t,r,i)=>{if(!i)return!1;const o=t.selection;let s;if(o instanceof ue)s=o;else{const a=kd(i,n,e);if(a==null)return!1;s=new ue(t.doc.resolve(a))}const l=yd(s.$headCell,n,e);return l?qi(t,r,new ue(s.$anchorCell,l)):!1}}function N3(n,e){const t=n.state.doc,r=ci(t.resolve(e));return r?(n.dispatch(n.state.tr.setSelection(new ue(r))),!0):!1}function D3(n,e,t){if(!Lt(n.state))return!1;let r=O3(t);const i=n.state.selection;if(i instanceof ue){r||(r={width:1,height:1,rows:[_.from(ml(ot(n.state.schema).cell,t))]});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=E3(r,l.right-l.left,l.bottom-l.top),xu(n.state,n.dispatch,s,l,r),!0}else if(r){const o=zo(n.state),s=o.start(-1);return xu(n.state,n.dispatch,s,se.get(o.node(-1)).findCell(o.pos-s),r),!0}else return!1}function I3(n,e){var t;if(e.ctrlKey||e.metaKey)return;const r=ku(n,e.target);let i;if(e.shiftKey&&n.state.selection instanceof ue)o(n.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(i=ci(n.state.selection.$anchor))!=null&&((t=gs(n,e))==null?void 0:t.pos)!=i.pos)o(i,e),e.preventDefault();else if(!r)return;function o(a,c){let u=gs(n,c);const f=Kt.getState(n.state)==null;if(!u||!ia(a,u))if(f)u=a;else return;const h=new ue(a,u);if(f||!n.state.selection.eq(h)){const d=n.state.tr.setSelection(h);f&&d.setMeta(Kt,a.pos),n.dispatch(d)}}function s(){n.root.removeEventListener("mouseup",s),n.root.removeEventListener("dragstart",s),n.root.removeEventListener("mousemove",l),Kt.getState(n.state)!=null&&n.dispatch(n.state.tr.setMeta(Kt,-1))}function l(a){const c=a,u=Kt.getState(n.state);let f;if(u!=null)f=n.state.doc.resolve(u);else if(ku(n,c.target)!=r&&(f=gs(n,e),!f))return s();f&&o(f,c)}n.root.addEventListener("mouseup",s),n.root.addEventListener("dragstart",s),n.root.addEventListener("mousemove",l)}function kd(n,e,t){if(!(n.state.selection instanceof X))return null;const{$head:r}=n.state.selection;for(let i=r.depth-1;i>=0;i--){const o=r.node(i);if((t<0?r.index(i):r.indexAfter(i))!=(t<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"?t>0?"down":"up":t>0?"right":"left";return n.endOfTextblock(a)?l:null}}return null}function ku(n,e){for(;e&&e!=n.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function gs(n,e){const t=n.posAtCoords({left:e.clientX,top:e.clientY});return t&&t?ci(n.state.doc.resolve(t.pos)):null}var R3=class{constructor(n,e){this.node=n,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")),gl(n,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(n){return n.type!=this.node.type?!1:(this.node=n,gl(n,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(n){return n.type=="attributes"&&(n.target==this.table||this.colgroup.contains(n.target))}};function gl(n,e,t,r,i,o){var s;let l=0,a=!0,c=e.firstChild;const u=n.firstChild;if(u){for(let f=0,h=0;f<u.childCount;f++){const{colspan:d,colwidth:p}=u.child(f).attrs;for(let m=0;m<d;m++,h++){const y=i==h?o:p&&p[m],g=y?y+"px":"";l+=y||r,y||(a=!1),c?(c.style.width!=g&&(c.style.width=g),c=c.nextSibling):e.appendChild(document.createElement("col")).style.width=g}}for(;c;){const f=c.nextSibling;(s=c.parentNode)==null||s.removeChild(c),c=f}a?(t.style.width=l+"px",t.style.minWidth=""):(t.style.width="",t.style.minWidth=l+"px")}}var Ze=new hr("tableColumnResizing");function Uv({handleWidth:n=5,cellMinWidth:e=25,View:t=R3,lastColumnResizable:r=!0}={}){const i=new oi({key:Ze,state:{init(o,s){var l,a;const c=(a=(l=i.spec)==null?void 0:l.props)==null?void 0:a.nodeViews,u=ot(s.schema).table.name;return t&&c&&(c[u]=(f,h)=>new t(f,e,h)),new z3(-1,!1)},apply(o,s){return s.apply(o)}},props:{attributes:o=>{const s=Ze.getState(o);return s&&s.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,s)=>{F3(o,s,n,e,r)},mouseleave:o=>{P3(o)},mousedown:(o,s)=>{L3(o,s,e)}},decorations:o=>{const s=Ze.getState(o);if(s&&s.activeHandle>-1)return q3(o,s.activeHandle)},nodeViews:{}}});return i}var z3=class Wi{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(e){const t=this,r=e.getMeta(Ze);if(r&&r.setHandle!=null)return new Wi(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Wi(t.activeHandle,r.setDragging);if(t.activeHandle>-1&&e.docChanged){let i=e.mapping.map(t.activeHandle,-1);return pl(e.doc.resolve(i))||(i=-1),new Wi(i,t.dragging)}return t}};function F3(n,e,t,r,i){const o=Ze.getState(n.state);if(o&&!o.dragging){const s=V3(e.target);let l=-1;if(s){const{left:a,right:c}=s.getBoundingClientRect();e.clientX-a<=t?l=Su(n,e,"left",t):c-e.clientX<=t&&(l=Su(n,e,"right",t))}if(l!=o.activeHandle){if(!i&&l!==-1){const a=n.state.doc.resolve(l),c=a.node(-1),u=se.get(c),f=a.start(-1);if(u.colCount(a.pos-f)+a.nodeAfter.attrs.colspan-1==u.width-1)return}Sd(n,l)}}}function P3(n){const e=Ze.getState(n.state);e&&e.activeHandle>-1&&!e.dragging&&Sd(n,-1)}function L3(n,e,t){var r;const i=(r=n.dom.ownerDocument.defaultView)!=null?r:window,o=Ze.getState(n.state);if(!o||o.activeHandle==-1||o.dragging)return!1;const s=n.state.doc.nodeAt(o.activeHandle),l=B3(n,o.activeHandle,s.attrs);n.dispatch(n.state.tr.setMeta(Ze,{setDragging:{startX:e.clientX,startWidth:l}}));function a(u){i.removeEventListener("mouseup",a),i.removeEventListener("mousemove",c);const f=Ze.getState(n.state);f!=null&&f.dragging&&(H3(n,f.activeHandle,vu(f.dragging,u,t)),n.dispatch(n.state.tr.setMeta(Ze,{setDragging:null})))}function c(u){if(!u.which)return a(u);const f=Ze.getState(n.state);if(f&&f.dragging){const h=vu(f.dragging,u,t);$3(n,f.activeHandle,h,t)}}return i.addEventListener("mouseup",a),i.addEventListener("mousemove",c),e.preventDefault(),!0}function B3(n,e,{colspan:t,colwidth:r}){const i=r&&r[r.length-1];if(i)return i;const o=n.domAtPos(e);let l=o.node.childNodes[o.offset].offsetWidth,a=t;if(r)for(let c=0;c<t;c++)r[c]&&(l-=r[c],a--);return l/a}function V3(n){for(;n&&n.nodeName!="TD"&&n.nodeName!="TH";)n=n.classList&&n.classList.contains("ProseMirror")?null:n.parentNode;return n}function Su(n,e,t,r){const i=t=="right"?-r:r,o=n.posAtCoords({left:e.clientX+i,top:e.clientY});if(!o)return-1;const{pos:s}=o,l=ci(n.state.doc.resolve(s));if(!l)return-1;if(t=="right")return l.pos;const a=se.get(l.node(-1)),c=l.start(-1),u=a.map.indexOf(l.pos-c);return u%a.width==0?-1:c+a.map[u-1]}function vu(n,e,t){const r=e.clientX-n.startX;return Math.max(t,n.startWidth+r)}function Sd(n,e){n.dispatch(n.state.tr.setMeta(Ze,{setHandle:e}))}function H3(n,e,t){const r=n.state.doc.resolve(e),i=r.node(-1),o=se.get(i),s=r.start(-1),l=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,a=n.state.tr;for(let c=0;c<o.height;c++){const u=c*o.width+l;if(c&&o.map[u]==o.map[u-o.width])continue;const f=o.map[u],h=i.nodeAt(f).attrs,d=h.colspan==1?0:l-o.colCount(f);if(h.colwidth&&h.colwidth[d]==t)continue;const p=h.colwidth?h.colwidth.slice():j3(h.colspan);p[d]=t,a.setNodeMarkup(s+f,null,{...h,colwidth:p})}a.docChanged&&n.dispatch(a)}function $3(n,e,t,r){const i=n.state.doc.resolve(e),o=i.node(-1),s=i.start(-1),l=se.get(o).colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1;let a=n.domAtPos(i.start(-1)).node;for(;a&&a.nodeName!="TABLE";)a=a.parentNode;a&&gl(o,a.firstChild,a,r,l,t)}function j3(n){return Array(n).fill(0)}function q3(n,e){const t=[],r=n.doc.resolve(e),i=r.node(-1);if(!i)return oe.empty;const o=se.get(i),s=r.start(-1),l=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1;for(let a=0;a<o.height;a++){const c=l+a*o.width;if((l==o.width-1||o.map[c]!=o.map[c+1])&&(a==0||o.map[c]!=o.map[c-o.width])){const u=o.map[c],f=s+u+i.nodeAt(u).nodeSize-1,h=document.createElement("div");h.className="column-resize-handle",t.push(ze.widget(f,h))}}return oe.create(n.doc,t)}function Jv({allowTableNodeSelection:n=!1}={}){return new oi({key:Kt,state:{init(){return null},apply(e,t){const r=e.getMeta(Kt);if(r!=null)return r==-1?null:r;if(t==null||!e.docChanged)return t;const{deleted:i,pos:o}=e.mapping.mapResult(t);return i?null:o}},props:{decorations:m3,handleDOMEvents:{mousedown:I3},createSelectionBetween(e){return Kt.getState(e.state)!=null?e.state.selection:null},handleTripleClick:N3,handleKeyDown:T3,handlePaste:D3},appendTransaction(e,t,r){return b3(r,x3(r,t),n)}})}var ho=typeof navigator<"u"?navigator:null,sa=ho&&ho.userAgent||"",W3=/Edge\/(\d+)/.exec(sa),U3=/MSIE \d/.exec(sa),J3=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(sa),K3=!!(U3||J3||W3),Y3=!K3&&!!ho&&/Apple Computer/.test(ho.vendor),vd=new hr("safari-ime-span"),yl=!1,G3={key:vd,props:{decorations:X3,handleDOMEvents:{compositionstart:()=>{yl=!0},compositionend:()=>{yl=!1}}}};function X3(n){const{$from:e,$to:t,to:r}=n.selection;if(yl&&e.sameParent(t)){const i=ze.widget(r,Q3,{ignoreSelection:!0,key:"safari-ime-span"});return oe.create(n.doc,[i])}}function Q3(n){const e=n.dom.ownerDocument.createElement("span");return e.className="ProseMirror-safari-ime-span",e}var Kv=new oi(Y3?G3:{key:vd});function Cu(n,e){const t=String(n);if(typeof e!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(e);for(;i!==-1;)r++,i=t.indexOf(e,i+e.length);return r}function Z3(n,e,t){const i=Oo((t||{}).ignore||[]),o=e6(e);let s=-1;for(;++s<o.length;)ih(n,"text",l);function l(c,u){let f=-1,h;for(;++f<u.length;){const d=u[f],p=h?h.children:void 0;if(i(d,p?p.indexOf(d):void 0,h))return;h=d}if(h)return a(c,u)}function a(c,u){const f=u[u.length-1],h=o[s][0],d=o[s][1];let p=0;const y=f.children.indexOf(c);let g=!1,v=[];h.lastIndex=0;let x=h.exec(c.value);for(;x;){const C=x.index,O={index:x.index,input:x.input,stack:[...u,c]};let k=d(...x,O);if(typeof k=="string"&&(k=k.length>0?{type:"text",value:k}:void 0),k===!1?h.lastIndex=C+1:(p!==C&&v.push({type:"text",value:c.value.slice(p,C)}),Array.isArray(k)?v.push(...k):k&&v.push(k),p=C+x[0].length,g=!0),!h.global)break;x=h.exec(c.value)}return g?(p<c.value.length&&v.push({type:"text",value:c.value.slice(p)}),f.children.splice(y,1,...v)):v=[c],y+v.length}}function e6(n){const e=[];if(!Array.isArray(n))throw new TypeError("Expected find and replace tuple or list of tuples");const t=!n[0]||Array.isArray(n[0])?n:[n];let r=-1;for(;++r<t.length;){const i=t[r];e.push([t6(i[0]),n6(i[1])])}return e}function t6(n){return typeof n=="string"?new RegExp(Ro(n),"g"):n}function n6(n){return typeof n=="function"?n:function(){return n}}const ys="phrasing",bs=["autolink","link","image","label"];function r6(){return{transforms:[u6],enter:{literalAutolink:o6,literalAutolinkEmail:ws,literalAutolinkHttp:ws,literalAutolinkWww:ws},exit:{literalAutolink:c6,literalAutolinkEmail:a6,literalAutolinkHttp:s6,literalAutolinkWww:l6}}}function i6(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ys,notInConstruct:bs},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ys,notInConstruct:bs},{character:":",before:"[ps]",after:"\\/",inConstruct:ys,notInConstruct:bs}]}}function o6(n){this.enter({type:"link",title:null,url:"",children:[]},n)}function ws(n){this.config.enter.autolinkProtocol.call(this,n)}function s6(n){this.config.exit.autolinkProtocol.call(this,n)}function l6(n){this.config.exit.data.call(this,n);const e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(n)}function a6(n){this.config.exit.autolinkEmail.call(this,n)}function c6(n){this.exit(n)}function u6(n){Z3(n,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,f6],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,h6]],{ignore:["link","linkReference"]})}function f6(n,e,t,r,i){let o="";if(!Cd(i)||(/^w/i.test(e)&&(t=e+t,e="",o="http://"),!d6(t)))return!1;const s=p6(t+r);if(!s[0])return!1;const l={type:"link",title:null,url:o+e+s[0],children:[{type:"text",value:e+s[0]}]};return s[1]?[l,{type:"text",value:s[1]}]:l}function h6(n,e,t,r){return!Cd(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+t,children:[{type:"text",value:e+"@"+t}]}}function d6(n){const e=n.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function p6(n){const e=/[!"&'),.:;<>?\]}]+$/.exec(n);if(!e)return[n,void 0];n=n.slice(0,e.index);let t=e[0],r=t.indexOf(")");const i=Cu(n,"(");let o=Cu(n,")");for(;r!==-1&&i>o;)n+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),o++;return[n,t]}function Cd(n,e){const t=n.input.charCodeAt(n.index-1);return(n.index===0||Tn(t)||Co(t))&&(!e||t!==47)}Ad.peek=A6;function m6(){return{enter:{gfmFootnoteDefinition:y6,gfmFootnoteDefinitionLabelString:b6,gfmFootnoteCall:k6,gfmFootnoteCallString:S6},exit:{gfmFootnoteDefinition:x6,gfmFootnoteDefinitionLabelString:w6,gfmFootnoteCall:C6,gfmFootnoteCallString:v6}}}function g6(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:O6,footnoteReference:Ad}}}function y6(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function b6(){this.buffer()}function w6(n){const e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.label=e,t.identifier=ft(this.sliceSerialize(n)).toLowerCase()}function x6(n){this.exit(n)}function k6(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function S6(){this.buffer()}function v6(n){const e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.label=e,t.identifier=ft(this.sliceSerialize(n)).toLowerCase()}function C6(n){this.exit(n)}function Ad(n,e,t,r){const i=t.createTracker(r);let o=i.move("[^");const s=t.enter("footnoteReference"),l=t.enter("reference");return o+=i.move(t.safe(t.associationId(n),{...i.current(),before:o,after:"]"})),l(),s(),o+=i.move("]"),o}function A6(){return"["}function O6(n,e,t,r){const i=t.createTracker(r);let o=i.move("[^");const s=t.enter("footnoteDefinition"),l=t.enter("label");return o+=i.move(t.safe(t.associationId(n),{...i.current(),before:o,after:"]"})),l(),o+=i.move("]:"+(n.children&&n.children.length>0?" ":"")),i.shift(4),o+=i.move(t.indentLines(t.containerFlow(n,i.current()),M6)),s(),o}function M6(n,e,t){return e===0?n:(t?"":" ")+n}const E6=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Od.peek=I6;function _6(){return{canContainEols:["delete"],enter:{strikethrough:N6},exit:{strikethrough:D6}}}function T6(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:E6}],handlers:{delete:Od}}}function N6(n){this.enter({type:"delete",children:[]},n)}function D6(n){this.exit(n)}function Od(n,e,t,r){const i=t.createTracker(r),o=t.enter("strikethrough");let s=i.move("~~");return s+=t.containerPhrasing(n,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function I6(){return"~"}function R6(n,e={}){const t=(e.align||[]).concat(),r=e.stringLength||F6,i=[],o=[],s=[],l=[];let a=0,c=-1;for(;++c<n.length;){const p=[],m=[];let y=-1;for(n[c].length>a&&(a=n[c].length);++y<n[c].length;){const g=z6(n[c][y]);if(e.alignDelimiters!==!1){const v=r(g);m[y]=v,(l[y]===void 0||v>l[y])&&(l[y]=v)}p.push(g)}o[c]=p,s[c]=m}let u=-1;if(typeof t=="object"&&"length"in t)for(;++u<a;)i[u]=Au(t[u]);else{const p=Au(t);for(;++u<a;)i[u]=p}u=-1;const f=[],h=[];for(;++u<a;){const p=i[u];let m="",y="";p===99?(m=":",y=":"):p===108?m=":":p===114&&(y=":");let g=e.alignDelimiters===!1?1:Math.max(1,l[u]-m.length-y.length);const v=m+"-".repeat(g)+y;e.alignDelimiters!==!1&&(g=m.length+g+y.length,g>l[u]&&(l[u]=g),h[u]=g),f[u]=v}o.splice(1,0,f),s.splice(1,0,h),c=-1;const d=[];for(;++c<o.length;){const p=o[c],m=s[c];u=-1;const y=[];for(;++u<a;){const g=p[u]||"";let v="",x="";if(e.alignDelimiters!==!1){const C=l[u]-(m[u]||0),O=i[u];O===114?v=" ".repeat(C):O===99?C%2?(v=" ".repeat(C/2+.5),x=" ".repeat(C/2-.5)):(v=" ".repeat(C/2),x=v):x=" ".repeat(C)}e.delimiterStart!==!1&&!u&&y.push("|"),e.padding!==!1&&!(e.alignDelimiters===!1&&g==="")&&(e.delimiterStart!==!1||u)&&y.push(" "),e.alignDelimiters!==!1&&y.push(v),y.push(g),e.alignDelimiters!==!1&&y.push(x),e.padding!==!1&&y.push(" "),(e.delimiterEnd!==!1||u!==a-1)&&y.push("|")}d.push(e.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return d.join(` |
| 67 |
`)}function z6(n){return n==null?"":String(n)}function F6(n){return n.length}function Au(n){const e=typeof n=="string"?n.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function P6(){return{enter:{table:L6,tableData:Ou,tableHeader:Ou,tableRow:V6},exit:{codeText:H6,table:B6,tableData:xs,tableHeader:xs,tableRow:xs}}}function L6(n){const e=n._align;this.enter({type:"table",align:e.map(function(t){return t==="none"?null:t}),children:[]},n),this.data.inTable=!0}function B6(n){this.exit(n),this.data.inTable=void 0}function V6(n){this.enter({type:"tableRow",children:[]},n)}function xs(n){this.exit(n)}function Ou(n){this.enter({type:"tableCell",children:[]},n)}function H6(n){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,$6));const t=this.stack[this.stack.length-1];t.type,t.value=e,this.exit(n)}function $6(n,e){return e==="|"?e:n}function j6(n){const e=n||{},t=e.tableCellPadding,r=e.tablePipeAlign,i=e.stringLength,o=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` |
| 68 |
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:s,tableCell:a,tableRow:l}};function s(d,p,m,y){return c(u(d,m,y),d.align)}function l(d,p,m,y){const g=f(d,m,y),v=c([g]);return v.slice(0,v.indexOf(` |
| 69 |
`))}function a(d,p,m,y){const g=m.enter("tableCell"),v=m.enter("phrasing"),x=m.containerPhrasing(d,{...y,before:o,after:o});return v(),g(),x}function c(d,p){return R6(d,{align:p,alignDelimiters:r,padding:t,stringLength:i})}function u(d,p,m){const y=d.children;let g=-1;const v=[],x=p.enter("table");for(;++g<y.length;)v[g]=f(y[g],p,m);return x(),v}function f(d,p,m){const y=d.children;let g=-1;const v=[],x=p.enter("tableRow");for(;++g<y.length;)v[g]=a(y[g],d,p,m);return x(),v}function h(d,p,m){let y=jl.inlineCode(d,p,m);return m.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function q6(){return{exit:{taskListCheckValueChecked:Mu,taskListCheckValueUnchecked:Mu,paragraph:U6}}}function W6(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:J6}}}function Mu(n){const e=this.stack[this.stack.length-2];e.type,e.checked=n.type==="taskListCheckValueChecked"}function U6(n){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const t=this.stack[this.stack.length-1];t.type;const r=t.children[0];if(r&&r.type==="text"){const i=e.children;let o=-1,s;for(;++o<i.length;){const l=i[o];if(l.type==="paragraph"){s=l;break}}s===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(n)}function J6(n,e,t,r){const i=n.children[0],o=typeof n.checked=="boolean"&&i&&i.type==="paragraph",s="["+(n.checked?"x":" ")+"] ",l=t.createTracker(r);o&&l.move(s);let a=jl.listItem(n,e,t,{...r,...l.current()});return o&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),a;function c(u){return u+s}}function K6(){return[r6(),m6(),_6(),P6(),q6()]}function Y6(n){return{extensions:[i6(),g6(),T6(),j6(n),W6()]}}const G6={tokenize:nk,partial:!0},Md={tokenize:rk,partial:!0},Ed={tokenize:ik,partial:!0},_d={tokenize:ok,partial:!0},X6={tokenize:sk,partial:!0},Td={name:"wwwAutolink",tokenize:ek,previous:Dd},Nd={name:"protocolAutolink",tokenize:tk,previous:Id},Bt={name:"emailAutolink",tokenize:Z6,previous:Rd},Ot={};function Q6(){return{text:Ot}}let dn=48;for(;dn<123;)Ot[dn]=Bt,dn++,dn===58?dn=65:dn===91&&(dn=97);Ot[43]=Bt;Ot[45]=Bt;Ot[46]=Bt;Ot[95]=Bt;Ot[72]=[Bt,Nd];Ot[104]=[Bt,Nd];Ot[87]=[Bt,Td];Ot[119]=[Bt,Td];function Z6(n,e,t){const r=this;let i,o;return s;function s(f){return!bl(f)||!Rd.call(r,r.previous)||la(r.events)?t(f):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),l(f))}function l(f){return bl(f)?(n.consume(f),l):f===64?(n.consume(f),a):t(f)}function a(f){return f===46?n.check(X6,u,c)(f):f===45||f===95||Re(f)?(o=!0,n.consume(f),a):u(f)}function c(f){return n.consume(f),i=!0,a}function u(f){return o&&i&&Me(r.previous)?(n.exit("literalAutolinkEmail"),n.exit("literalAutolink"),e(f)):t(f)}}function ek(n,e,t){const r=this;return i;function i(s){return s!==87&&s!==119||!Dd.call(r,r.previous)||la(r.events)?t(s):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(G6,n.attempt(Md,n.attempt(Ed,o),t),t)(s))}function o(s){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),e(s)}}function tk(n,e,t){const r=this;let i="",o=!1;return s;function s(f){return(f===72||f===104)&&Id.call(r,r.previous)&&!la(r.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),n.consume(f),l):t(f)}function l(f){if(Me(f)&&i.length<5)return i+=String.fromCodePoint(f),n.consume(f),l;if(f===58){const h=i.toLowerCase();if(h==="http"||h==="https")return n.consume(f),a}return t(f)}function a(f){return f===47?(n.consume(f),o?c:(o=!0,a)):t(f)}function c(f){return f===null||io(f)||te(f)||Tn(f)||Co(f)?t(f):n.attempt(Md,n.attempt(Ed,u),t)(f)}function u(f){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),e(f)}}function nk(n,e,t){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,n.consume(s),i):s===46&&r===3?(n.consume(s),o):t(s)}function o(s){return s===null?t(s):e(s)}}function rk(n,e,t){let r,i,o;return s;function s(c){return c===46||c===95?n.check(_d,a,l)(c):c===null||te(c)||Tn(c)||c!==45&&Co(c)?a(c):(o=!0,n.consume(c),s)}function l(c){return c===95?r=!0:(i=r,r=void 0),n.consume(c),s}function a(c){return i||r||!o?t(c):e(c)}}function ik(n,e){let t=0,r=0;return i;function i(s){return s===40?(t++,n.consume(s),i):s===41&&r<t?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?n.check(_d,e,o)(s):s===null||te(s)||Tn(s)?e(s):(n.consume(s),i)}function o(s){return s===41&&r++,n.consume(s),i}}function ok(n,e,t){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(n.consume(l),r):l===38?(n.consume(l),o):l===93?(n.consume(l),i):l===60||l===null||te(l)||Tn(l)?e(l):t(l)}function i(l){return l===null||l===40||l===91||te(l)||Tn(l)?e(l):r(l)}function o(l){return Me(l)?s(l):t(l)}function s(l){return l===59?(n.consume(l),r):Me(l)?(n.consume(l),s):t(l)}}function sk(n,e,t){return r;function r(o){return n.consume(o),i}function i(o){return Re(o)?t(o):e(o)}}function Dd(n){return n===null||n===40||n===42||n===95||n===91||n===93||n===126||te(n)}function Id(n){return!Me(n)}function Rd(n){return!(n===47||bl(n))}function bl(n){return n===43||n===45||n===46||n===95||Re(n)}function la(n){let e=n.length,t=!1;for(;e--;){const r=n[e][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return n.length>0&&!t&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const lk={tokenize:mk,partial:!0};function ak(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:hk,continuation:{tokenize:dk},exit:pk}},text:{91:{name:"gfmFootnoteCall",tokenize:fk},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ck,resolveTo:uk}}}}function ck(n,e,t){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 t(a);const c=ft(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!o.includes(c.slice(1))?t(a):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(a),n.exit("gfmFootnoteCallLabelMarker"),e(a))}}function uk(n,e){let t=n.length;for(;t--;)if(n[t][1].type==="labelImage"&&n[t][0]==="enter"){n[t][1];break}n[t+1][1].type="data",n[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},n[t+3][1].start),end:Object.assign({},n[n.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},n[t+3][1].end),end:Object.assign({},n[t+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},n[n.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},l=[n[t+1],n[t+2],["enter",r,e],n[t+3],n[t+4],["enter",i,e],["exit",i,e],["enter",o,e],["enter",s,e],["exit",s,e],["exit",o,e],n[n.length-2],n[n.length-1],["exit",r,e]];return n.splice(t,n.length-t+1,...l),n}function fk(n,e,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,s;return l;function l(f){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(f),n.exit("gfmFootnoteCallLabelMarker"),a}function a(f){return f!==94?t(f):(n.enter("gfmFootnoteCallMarker"),n.consume(f),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",c)}function c(f){if(o>999||f===93&&!s||f===null||f===91||te(f))return t(f);if(f===93){n.exit("chunkString");const h=n.exit("gfmFootnoteCallString");return i.includes(ft(r.sliceSerialize(h)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(f),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),e):t(f)}return te(f)||(s=!0),o++,n.consume(f),f===92?u:c}function u(f){return f===91||f===92||f===93?(n.consume(f),o++,c):c(f)}}function hk(n,e,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=0,l;return a;function a(p){return n.enter("gfmFootnoteDefinition")._container=!0,n.enter("gfmFootnoteDefinitionLabel"),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(p),n.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(p){return p===94?(n.enter("gfmFootnoteDefinitionMarker"),n.consume(p),n.exit("gfmFootnoteDefinitionMarker"),n.enter("gfmFootnoteDefinitionLabelString"),n.enter("chunkString").contentType="string",u):t(p)}function u(p){if(s>999||p===93&&!l||p===null||p===91||te(p))return t(p);if(p===93){n.exit("chunkString");const m=n.exit("gfmFootnoteDefinitionLabelString");return o=ft(r.sliceSerialize(m)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(p),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),h}return te(p)||(l=!0),s++,n.consume(p),p===92?f:u}function f(p){return p===91||p===92||p===93?(n.consume(p),s++,u):u(p)}function h(p){return p===58?(n.enter("definitionMarker"),n.consume(p),n.exit("definitionMarker"),i.includes(o)||i.push(o),Q(n,d,"gfmFootnoteDefinitionWhitespace")):t(p)}function d(p){return e(p)}}function dk(n,e,t){return n.check(ri,e,n.attempt(lk,e,t))}function pk(n){n.exit("gfmFootnoteDefinition")}function mk(n,e,t){const r=this;return Q(n,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):t(o)}}function gk(n){let t=(n||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,l){let a=-1;for(;++a<s.length;)if(s[a][0]==="enter"&&s[a][1].type==="strikethroughSequenceTemporary"&&s[a][1]._close){let c=a;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[a][1].end.offset-s[a][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[a][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[a][1].end)},f={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[a][1].start)},h=[["enter",u,l],["enter",s[c][1],l],["exit",s[c][1],l],["enter",f,l]],d=l.parser.constructs.insideSpan.null;d&&tt(h,h.length,0,Ao(d,s.slice(c+1,a),l)),tt(h,h.length,0,[["exit",f,l],["enter",s[a][1],l],["exit",s[a][1],l],["exit",u,l]]),tt(s,c-1,a-c+3,h),a=c+h.length-2;break}}for(a=-1;++a<s.length;)s[a][1].type==="strikethroughSequenceTemporary"&&(s[a][1].type="data");return s}function o(s,l,a){const c=this.previous,u=this.events;let f=0;return h;function h(p){return c===126&&u[u.length-1][1].type!=="characterEscape"?a(p):(s.enter("strikethroughSequenceTemporary"),d(p))}function d(p){const m=oo(c);if(p===126)return f>1?a(p):(s.consume(p),f++,d);if(f<2&&!t)return a(p);const y=s.exit("strikethroughSequenceTemporary"),g=oo(p);return y._open=!g||g===2&&!!m,y._close=!m||m===2&&!!g,l(p)}}}class yk{constructor(){this.map=[]}add(e,t,r){bk(this,e,t,r)}consume(e){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];r.push([...e]),e.length=0;let i=r.pop();for(;i;)e.push(...i),i=r.pop();this.map.length=0}}function bk(n,e,t,r){let i=0;if(!(t===0&&r.length===0)){for(;i<n.map.length;){if(n.map[i][0]===e){n.map[i][1]+=t,n.map[i][2].push(...r);return}i+=1}n.map.push([e,t,r])}}function wk(n,e){let t=!1;const r=[];for(;e<n.length;){const i=n[e];if(t){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(n[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(n[e-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(t=!0);e+=1}return r}function xk(){return{flow:{null:{name:"table",tokenize:kk,resolveAll:Sk}}}}function kk(n,e,t){const r=this;let i=0,o=0,s;return l;function l(S){let T=r.events.length-1;for(;T>-1;){const W=r.events[T][1].type;if(W==="lineEnding"||W==="linePrefix")T--;else break}const D=T>-1?r.events[T][1].type:null,B=D==="tableHead"||D==="tableRow"?k:a;return B===k&&r.parser.lazy[r.now().line]?t(S):B(S)}function a(S){return n.enter("tableHead"),n.enter("tableRow"),c(S)}function c(S){return S===124||(s=!0,o+=1),u(S)}function u(S){return S===null?t(S):V(S)?o>1?(o=0,r.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(S),n.exit("lineEnding"),d):t(S):U(S)?Q(n,u,"whitespace")(S):(o+=1,s&&(s=!1,i+=1),S===124?(n.enter("tableCellDivider"),n.consume(S),n.exit("tableCellDivider"),s=!0,u):(n.enter("data"),f(S)))}function f(S){return S===null||S===124||te(S)?(n.exit("data"),u(S)):(n.consume(S),S===92?h:f)}function h(S){return S===92||S===124?(n.consume(S),f):f(S)}function d(S){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(S):(n.enter("tableDelimiterRow"),s=!1,U(S)?Q(n,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):p(S))}function p(S){return S===45||S===58?y(S):S===124?(s=!0,n.enter("tableCellDivider"),n.consume(S),n.exit("tableCellDivider"),m):O(S)}function m(S){return U(S)?Q(n,y,"whitespace")(S):y(S)}function y(S){return S===58?(o+=1,s=!0,n.enter("tableDelimiterMarker"),n.consume(S),n.exit("tableDelimiterMarker"),g):S===45?(o+=1,g(S)):S===null||V(S)?C(S):O(S)}function g(S){return S===45?(n.enter("tableDelimiterFiller"),v(S)):O(S)}function v(S){return S===45?(n.consume(S),v):S===58?(s=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(S),n.exit("tableDelimiterMarker"),x):(n.exit("tableDelimiterFiller"),x(S))}function x(S){return U(S)?Q(n,C,"whitespace")(S):C(S)}function C(S){return S===124?p(S):S===null||V(S)?!s||i!==o?O(S):(n.exit("tableDelimiterRow"),n.exit("tableHead"),e(S)):O(S)}function O(S){return t(S)}function k(S){return n.enter("tableRow"),I(S)}function I(S){return S===124?(n.enter("tableCellDivider"),n.consume(S),n.exit("tableCellDivider"),I):S===null||V(S)?(n.exit("tableRow"),e(S)):U(S)?Q(n,I,"whitespace")(S):(n.enter("data"),L(S))}function L(S){return S===null||S===124||te(S)?(n.exit("data"),I(S)):(n.consume(S),S===92?E:L)}function E(S){return S===92||S===124?(n.consume(S),L):L(S)}}function Sk(n,e){let t=-1,r=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],l=!1,a=0,c,u,f;const h=new yk;for(;++t<n.length;){const d=n[t],p=d[1];d[0]==="enter"?p.type==="tableHead"?(l=!1,a!==0&&(Eu(h,e,a,c,u),u=void 0,a=0),c={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(t,0,[["enter",c,e]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(r=!0,f=void 0,o=[0,0,0,0],s=[0,t+1,0,0],l&&(l=!1,u={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(t,0,[["enter",u,e]])),i=p.type==="tableDelimiterRow"?2:u?3:1):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],f=Ni(h,e,o,i,void 0,f),o=[0,0,0,0]),s[2]=t)):p.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],f=Ni(h,e,o,i,void 0,f)),o=s,s=[o[1],t,0,0])):p.type==="tableHead"?(l=!0,a=t):p.type==="tableRow"||p.type==="tableDelimiterRow"?(a=t,o[1]!==0?(s[0]=s[1],f=Ni(h,e,o,i,t,f)):s[1]!==0&&(f=Ni(h,e,s,i,t,f)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(s[3]=t)}for(a!==0&&Eu(h,e,a,c,u),h.consume(e.events),t=-1;++t<e.events.length;){const d=e.events[t];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=wk(e.events,t))}return n}function Ni(n,e,t,r,i,o){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";t[0]!==0&&(o.end=Object.assign({},Wn(e.events,t[0])),n.add(t[0],0,[["exit",o,e]]));const a=Wn(e.events,t[1]);if(o={type:s,start:Object.assign({},a),end:Object.assign({},a)},n.add(t[1],0,[["enter",o,e]]),t[2]!==0){const c=Wn(e.events,t[2]),u=Wn(e.events,t[3]),f={type:l,start:Object.assign({},c),end:Object.assign({},u)};if(n.add(t[2],0,[["enter",f,e]]),r!==2){const h=e.events[t[2]],d=e.events[t[3]];if(h[1].end=Object.assign({},d[1].end),h[1].type="chunkText",h[1].contentType="text",t[3]>t[2]+1){const p=t[2]+1,m=t[3]-t[2]-1;n.add(p,m,[])}}n.add(t[3]+1,0,[["exit",f,e]])}return i!==void 0&&(o.end=Object.assign({},Wn(e.events,i)),n.add(i,0,[["exit",o,e]]),o=void 0),o}function Eu(n,e,t,r,i){const o=[],s=Wn(e.events,t);i&&(i.end=Object.assign({},s),o.push(["exit",i,e])),r.end=Object.assign({},s),o.push(["exit",r,e]),n.add(t+1,0,o)}function Wn(n,e){const t=n[e],r=t[0]==="enter"?"start":"end";return t[1][r]}const vk={name:"tasklistCheck",tokenize:Ak};function Ck(){return{text:{91:vk}}}function Ak(n,e,t){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(a):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(a),n.exit("taskListCheckMarker"),o)}function o(a){return te(a)?(n.enter("taskListCheckValueUnchecked"),n.consume(a),n.exit("taskListCheckValueUnchecked"),s):a===88||a===120?(n.enter("taskListCheckValueChecked"),n.consume(a),n.exit("taskListCheckValueChecked"),s):t(a)}function s(a){return a===93?(n.enter("taskListCheckMarker"),n.consume(a),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),l):t(a)}function l(a){return V(a)?e(a):U(a)?n.check({tokenize:Ok},e,t)(a):t(a)}}function Ok(n,e,t){return Q(n,r,"whitespace");function r(i){return i===null?t(i):e(i)}}function Mk(n){return Vf([Q6(),ak(),gk(n),xk(),Ck()])}const Ek={};function Yv(n){const e=this,t=n||Ek,r=e.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Mk(t)),o.push(K6()),s.push(Y6(t))}var po=200,he=function(){};he.prototype.append=function(e){return e.length?(e=he.from(e),!this.length&&e||e.length<po&&this.leafAppend(e)||this.length<po&&e.leafPrepend(this)||this.appendInner(e)):this};he.prototype.prepend=function(e){return e.length?he.from(e).append(this):this};he.prototype.appendInner=function(e){return new _k(this,e)};he.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?he.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))};he.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};he.prototype.forEach=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length),t<=r?this.forEachInner(e,t,r,0):this.forEachInvertedInner(e,t,r,0)};he.prototype.map=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(o,s){return i.push(e(o,s))},t,r),i};he.from=function(e){return e instanceof he?e:e&&e.length?new zd(e):he.empty};var zd=function(n){function e(r){n.call(this),this.values=r}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,o){return i==0&&o==this.length?this:new e(this.values.slice(i,o))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,o,s,l){for(var a=o;a<s;a++)if(i(this.values[a],l+a)===!1)return!1},e.prototype.forEachInvertedInner=function(i,o,s,l){for(var a=o-1;a>=s;a--)if(i(this.values[a],l+a)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=po)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=po)return new e(i.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(he);he.empty=new zd([]);var _k=function(n){function e(t,r){n.call(this),this.left=t,this.right=r,this.length=t.length+r.length,this.depth=Math.max(t.depth,r.depth)+1}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,i,o,s){var l=this.left.length;if(i<l&&this.left.forEachInner(r,i,Math.min(o,l),s)===!1||o>l&&this.right.forEachInner(r,Math.max(i-l,0),Math.min(this.length,o)-l,s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,o,s){var l=this.left.length;if(i>l&&this.right.forEachInvertedInner(r,i-l,Math.max(o,l)-l,s+l)===!1||o<l&&this.left.forEachInvertedInner(r,Math.min(i,l),o,s)===!1)return!1},e.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var o=this.left.length;return i<=o?this.left.slice(r,i):r>=o?this.right.slice(r-o,i-o):this.left.slice(r,o).append(this.right.slice(0,i-o))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(he);const Tk=500;class ct{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){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;t&&(i=this.remapping(r,this.items.length),o=i.maps.length);let s=e.tr,l,a,c=[],u=[];return this.items.forEach((f,h)=>{if(!f.step){i||(i=this.remapping(r,h+1),o=i.maps.length),o--,u.push(f);return}if(i){u.push(new wt(f.map));let d=f.step.map(i.slice(o)),p;d&&s.maybeStep(d).doc&&(p=s.mapping.maps[s.mapping.maps.length-1],c.push(new wt(p,void 0,void 0,c.length+u.length))),o--,p&&i.appendMap(p,o)}else s.maybeStep(f.step);if(f.selection)return l=i?f.selection.map(i.slice(o)):f.selection,a=new ct(this.items.slice(0,r).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:a,transform:s,selection:l}}addTransform(e,t,r,i){let o=[],s=this.eventCount,l=this.items,a=!i&&l.length?l.get(l.length-1):null;for(let u=0;u<e.steps.length;u++){let f=e.steps[u].invert(e.docs[u]),h=new wt(e.mapping.maps[u],f,t),d;(d=a&&a.merge(h))&&(h=d,u?o.pop():l=l.slice(0,l.length-1)),o.push(h),t&&(s++,t=void 0),i||(a=h)}let c=s-r.depth;return c>Dk&&(l=Nk(l,c),s-=c),new ct(l.append(o),s)}remapping(e,t){let r=new Jn;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,t),r}addMaps(e){return this.eventCount==0?this:new ct(this.items.append(e.map(t=>new wt(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-t),o=e.mapping,s=e.steps.length,l=this.eventCount;this.items.forEach(h=>{h.selection&&l--},i);let a=t;this.items.forEach(h=>{let d=o.getMirror(--a);if(d==null)return;s=Math.min(s,d);let p=o.maps[d];if(h.step){let m=e.steps[d].invert(e.docs[d]),y=h.selection&&h.selection.map(o.slice(a+1,d));y&&l++,r.push(new wt(p,m,y))}else r.push(new wt(p))},i);let c=[];for(let h=t;h<s;h++)c.push(new wt(o.maps[h]));let u=this.items.slice(0,i).append(c).append(r),f=new ct(u,l);return f.emptyItemCount()>Tk&&(f=f.compress(this.items.length-r.length)),f}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),r=t.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(t.slice(r)),c=a&&a.getMap();if(r--,c&&t.appendMap(c,r),a){let u=s.selection&&s.selection.map(t.slice(r));u&&o++;let f=new wt(c.invert(),a,u),h,d=i.length-1;(h=i.length&&i[d].merge(f))?i[d]=h:i.push(f)}}else s.map&&r--},this.items.length,0),new ct(he.from(i.reverse()),o)}}ct.empty=new ct(he.empty,0);function Nk(n,e){let t;return n.forEach((r,i)=>{if(r.selection&&e--==0)return t=i,!1}),n.slice(t)}class wt{constructor(e,t,r,i){this.map=e,this.step=t,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new wt(t.getMap().invert(),t,this.selection)}}}class Ut{constructor(e,t,r,i,o){this.done=e,this.undone=t,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const Dk=20;function Ik(n,e,t,r){let i=t.getMeta(En),o;if(i)return i.historyState;t.getMeta(Fk)&&(n=new Ut(n.done,n.undone,null,0,-1));let s=t.getMeta("appendedTransaction");if(t.steps.length==0)return n;if(s&&s.getMeta(En))return s.getMeta(En).redo?new Ut(n.done.addTransform(t,void 0,r,Ui(e)),n.undone,_u(t.mapping.maps),n.prevTime,n.prevComposition):new Ut(n.done,n.undone.addTransform(t,void 0,r,Ui(e)),null,n.prevTime,n.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let l=t.getMeta("composition"),a=n.prevTime==0||!s&&n.prevComposition!=l&&(n.prevTime<(t.time||0)-r.newGroupDelay||!Rk(t,n.prevRanges)),c=s?ks(n.prevRanges,t.mapping):_u(t.mapping.maps);return new Ut(n.done.addTransform(t,a?e.selection.getBookmark():void 0,r,Ui(e)),ct.empty,c,t.time,l??n.prevComposition)}else return(o=t.getMeta("rebased"))?new Ut(n.done.rebased(t,o),n.undone.rebased(t,o),ks(n.prevRanges,t.mapping),n.prevTime,n.prevComposition):new Ut(n.done.addMaps(t.mapping.maps),n.undone.addMaps(t.mapping.maps),ks(n.prevRanges,t.mapping),n.prevTime,n.prevComposition)}function Rk(n,e){if(!e)return!1;if(!n.docChanged)return!0;let t=!1;return n.mapping.maps[0].forEach((r,i)=>{for(let o=0;o<e.length;o+=2)r<=e[o+1]&&i>=e[o]&&(t=!0)}),t}function _u(n){let e=[];for(let t=n.length-1;t>=0&&e.length==0;t--)n[t].forEach((r,i,o,s)=>e.push(o,s));return e}function ks(n,e){if(!n)return null;let t=[];for(let r=0;r<n.length;r+=2){let i=e.map(n[r],1),o=e.map(n[r+1],-1);i<=o&&t.push(i,o)}return t}function zk(n,e,t){let r=Ui(e),i=En.get(e).spec.config,o=(t?n.undone:n.done).popEvent(e,r);if(!o)return null;let s=o.selection.resolve(o.transform.doc),l=(t?n.done:n.undone).addTransform(o.transform,e.selection.getBookmark(),i,r),a=new Ut(t?l:o.remaining,t?o.remaining:l,null,0,-1);return o.transform.setSelection(s).setMeta(En,{redo:t,historyState:a})}let Ss=!1,Tu=null;function Ui(n){let e=n.plugins;if(Tu!=e){Ss=!1,Tu=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){Ss=!0;break}}return Ss}const En=new hr("history"),Fk=new hr("closeHistory");function Gv(n={}){return n={depth:n.depth||100,newGroupDelay:n.newGroupDelay||500},new oi({key:En,state:{init(){return new Ut(ct.empty,ct.empty,null,0,-1)},apply(e,t,r){return Ik(t,r,e,n)}},config:n,props:{handleDOMEvents:{beforeinput(e,t){let r=t.inputType,i=r=="historyUndo"?Pk:r=="historyRedo"?Lk:null;return i?(t.preventDefault(),i(e.state,e.dispatch)):!1}}}})}function Fd(n,e){return(t,r)=>{let i=En.getState(t);if(!i||(n?i.undone:i.done).eventCount==0)return!1;if(r){let o=zk(i,t,n);o&&r(e?o.scrollIntoView():o)}return!0}}const Pk=Fd(!1,!0),Lk=Fd(!0,!0);var xn,Gn;class Bk{constructor(e){Bo(this,xn,void 0);Bo(this,Gn,new Set);Vo(this,xn,e)}get current(){return Pn(this,xn)}set current(e){Pn(this,xn)!=e&&(Vo(this,xn,e),Pn(this,Gn).forEach(t=>t(e)))}on(e){return Pn(this,Gn).add(e),()=>Pn(this,Gn).delete(e)}}xn=new WeakMap,Gn=new WeakMap;const Pd=n=>new Bk(n),wl=Symbol.for("atomico.hooks");globalThis[wl]=globalThis[wl]||{};let ar=globalThis[wl];const Vk=Symbol.for("Atomico.suspense"),Ld=Symbol.for("Atomico.effect"),Hk=Symbol.for("Atomico.layoutEffect"),Bd=Symbol.for("Atomico.insertionEffect"),ui=(n,e,t)=>{const{i:r,hooks:i}=ar.c,o=i[r]=i[r]||{};return o.value=n(o.value),o.effect=e,o.tag=t,ar.c.i++,i[r].value},$k=n=>ui((e=Pd(n))=>e),jk=()=>ui((n=Pd(ar.c.host))=>n),qk=()=>ar.c.update,Wk=(n,e,t=0)=>{let r={},i=!1;const o=()=>i,s=(c,u)=>{for(const f in r){const h=r[f];h.effect&&h.tag===c&&(h.value=h.effect(h.value,u))}};return{load:c=>{ar.c={host:e,hooks:r,update:n,i:0,id:t};let u;try{i=!1,u=c()}catch(f){if(f!==Vk)throw f;i=!0}finally{ar.c=null}return u},cleanEffects:c=>(s(Bd,c),()=>(s(Hk,c),()=>{s(Ld,c)})),isSuspense:o}},fi=Symbol.for;function Vd(n,e){const t=n.length;if(t!==e.length)return!1;for(let r=0;r<t;r++){let i=n[r],o=e[r];if(i!==o)return!1}return!0}const It=n=>typeof n=="function",Vr=n=>typeof n=="object",{isArray:Uk}=Array,xl=(n,e)=>(e?n instanceof HTMLStyleElement:!0)&&"hydrate"in((n==null?void 0:n.dataset)||{});function Hd(n,e){let t;const r=i=>{let{length:o}=i;for(let s=0;s<o;s++){const l=i[s];if(l&&Array.isArray(l))r(l);else{const a=typeof l;if(l==null||a==="function"||a==="boolean")continue;a==="string"||a==="number"?(t==null&&(t=""),t+=l):(t!=null&&(e(t),t=null),e(l))}}};r(n),t!=null&&e(t)}const $d=(n,e,t)=>(n.addEventListener(e,t),()=>n.removeEventListener(e,t));let jd=class{constructor(e,t,r){this.message=t,this.target=e,this.value=r}};class Jk extends jd{}class Kk extends jd{}const mo="Custom",Yk=null,Gk={true:1,"":1,1:1};function Xk(n,e,t,r,i){const{type:o,reflect:s,event:l,value:a,attr:c=Zk(e)}=(t==null?void 0:t.name)!=mo&&Vr(t)&&t!=Yk?t:{type:t},u=(o==null?void 0:o.name)===mo&&o.map,f=a!=null?o==Function||!It(a)?()=>a:a:null;Object.defineProperty(n,e,{configurable:!0,set(h){const d=this[e];f&&o!=Boolean&&h==null&&(h=f());const{error:p,value:m}=(u?n8:r8)(o,h);if(p&&m!=null)throw new Jk(this,`The value defined for prop '${e}' must be of type '${o.name}'`,m);d!=m&&(this._props[e]=m??void 0,this.update(),l&&Qk(this,l),this.updated.then(()=>{s&&(this._ignoreAttr=c,e8(this,o,c,this[e]),this._ignoreAttr=null)}))},get(){return this._props[e]}}),f&&(i[e]=f()),r[c]={prop:e,type:o}}const Qk=(n,{type:e,base:t=CustomEvent,...r})=>n.dispatchEvent(new t(e,r)),Zk=n=>n.replace(/([A-Z])/g,"-$1").toLowerCase(),e8=(n,e,t,r)=>r==null||e==Boolean&&!r?n.removeAttribute(t):n.setAttribute(t,(e==null?void 0:e.name)===mo&&(e!=null&&e.serialize)?e==null?void 0:e.serialize(r):Vr(r)?JSON.stringify(r):e==Boolean?"":r),t8=(n,e)=>n==Boolean?!!Gk[e]:n==Number?Number(e):n==String?e:n==Array||n==Object?JSON.parse(e):n.name==mo?e:new n(e),n8=({map:n},e)=>{try{return{value:n(e),error:!1}}catch{return{value:e,error:!0}}},r8=(n,e)=>n==null||e==null?{value:e,error:!1}:n!=String&&e===""?{value:void 0,error:!1}:n==Object||n==Array||n==Symbol?{value:e,error:{}.toString.call(e)!==`[object ${n.name}]`}:e instanceof n?{value:e,error:n==Number&&Number.isNaN(e.valueOf())}:n==String||n==Number||n==Boolean?{value:e,error:n==Number?typeof e!="number"?!0:Number.isNaN(e):n==String?typeof e!="string":typeof e!="boolean"}:{value:e,error:!0};let i8=0;const o8=n=>{var t;const e=((t=(n==null?void 0:n.dataset)||{})==null?void 0:t.hydrate)||"";return e||"c"+i8++},s8=(n,e=HTMLElement)=>{const t={},r={},i="prototype"in e&&e.prototype instanceof Element,o=i?e:"base"in e?e.base:HTMLElement,{props:s,styles:l}=i?n:e;class a extends o{constructor(){super(),this._setup(),this._render=()=>n({...this._props});for(const u in r)this[u]=r[u]}static get styles(){return[super.styles,l]}async _setup(){if(this._props)return;this._props={};let u,f;this.mounted=new Promise(y=>this.mount=()=>{y(),u!=this.parentNode&&(f!=u?this.unmounted.then(this.update):this.update()),u=this.parentNode}),this.unmounted=new Promise(y=>this.unmount=()=>{y(),(u!=this.parentNode||!this.isConnected)&&(h.cleanEffects(!0)()(),f=this.parentNode,u=null)}),this.symbolId=this.symbolId||Symbol(),this.symbolIdParent=Symbol();const h=Wk(()=>this.update(),this,o8(this));let d,p=!0;const m=xl(this);this.update=()=>(d||(d=!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),d=!1,p&&!h.isSuspense()&&(p=!1,!m&&l8(this)),g()}finally{d=!1}}).then(y=>{y&&y()})),this.updated),this.update()}connectedCallback(){this.mount(),super.connectedCallback&&super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),this.unmount()}attributeChangedCallback(u,f,h){if(t[u]){if(u===this._ignoreAttr||f===h)return;const{prop:d,type:p}=t[u];try{this[d]=t8(p,h)}catch{throw new Kk(this,`The value defined as attr '${u}' cannot be parsed by type '${p.name}'`,h)}}else super.attributeChangedCallback(u,f,h)}static get props(){return{...super.props,...s}}static get observedAttributes(){const u=super.observedAttributes||[];for(const f in s)Xk(this.prototype,f,s[f],t,r);return Object.keys(t).concat(u)}}return a};function l8(n){const{styles:e}=n.constructor,{shadowRoot:t}=n;if(t&&e.length){const r=[];Hd(e,i=>{i&&(i instanceof Element?t.appendChild(i.cloneNode(!0)):r.push(i))}),r.length&&(t.adoptedStyleSheets=r)}}const qd=n=>(e,t)=>{ui(([r,i]=[])=>((i||!i)&&(i&&Vd(i,t)?r=r||!0:(It(r)&&r(),r=null)),[r,t]),([r,i],o)=>o?(It(r)&&r(),[]):[r||e(),i],n)},Qv=qd(Ld),a8=qd(Bd);class c8 extends Array{constructor(e,t){let r=!0;const i=o=>{try{t(o,this,r)}finally{r=!1}};super(void 0,i,t),i(e)}}const Zv=n=>{const e=qk();return ui((t=new c8(n,(r,i,o)=>{r=It(r)?r(i[0]):r,r!==i[0]&&(i[0]=r,o||e())}))=>t)},u8=(n,e)=>{const[t]=ui(([r,i,o=0]=[])=>((!i||i&&!Vd(i,e))&&(r=n()),[r,e,o]));return t},eC=(n,e)=>u8(()=>n,e),kl=fi("atomico/options");globalThis[kl]=globalThis[kl]||{sheet:!!document.adoptedStyleSheets};const Wd=globalThis[kl];new Promise(n=>{Wd.ssr||(document.readyState==="loading"?$d(document,"DOMContentLoaded",n):n())});const f8={checked:1,value:1,selected:1},h8={list:1,type:1,size:1,form:1,width:1,height:1,src:1,href:1,slot:1},d8={shadowDom:1,staticNode:1,cloneNode:1,children:1,key:1},Ji={},Sl=[];class vl extends Text{}const p8=fi("atomico/id"),Hr=fi("atomico/type"),vs=fi("atomico/ref"),Ud=fi("atomico/vnode"),m8=()=>{};function g8(n,e,t){return Kd(this,n,e,t)}const Jd=(n,e,...t)=>{const r=e||Ji;let{children:i}=r;if(i=i??(t.length?t:Sl),n===m8)return i;const o=n?n instanceof Node?1:n.prototype instanceof HTMLElement&&2:0;if(o===!1&&n instanceof Function)return n(i!=Sl?{children:i,...r}:r);const s=Wd.render||g8;return{[Hr]:Ud,type:n,props:r,children:i,key:r.key,shadow:r.shadowDom,static:r.staticNode,raw:o,is:r.is,clone:r.cloneNode,render:s}};function Kd(n,e,t=p8,r,i){let o;if(e&&e[t]&&e[t].vnode==n||n[Hr]!=Ud)return e;(n||!e)&&(i=i||n.type=="svg",o=n.type!="host"&&(n.raw==1?(e&&n.clone?e[vs]:e)!=n.type:n.raw==2?!(e instanceof n.type):e?e[vs]||e.localName!=n.type:!e),o&&n.type!=null&&(n.raw==1&&n.clone?(r=!0,e=n.type.cloneNode(!0),e[vs]=n.type):e=n.raw==1?n.type:n.raw==2?new n.type:i?document.createElementNS("http://www.w3.org/2000/svg",n.type):document.createElement(n.type,n.is?{is:n.is}:void 0)));const s=e[t]?e[t]:Ji,{vnode:l=Ji,cycle:a=0}=s;let{fragment:c,handlers:u}=s;const{children:f=Sl,props:h=Ji}=l;if(u=o?{}:u||{},n.static&&!o)return e;if(n.shadow&&!e.shadowRoot&&e.attachShadow({mode:"open",...n.shadow}),n.props!=h&&w8(e,h,n.props,u,i),n.children!==f){const d=n.shadow?e.shadowRoot:e;c=b8(n.children,c,d,t,!a&&r,i&&n.type=="foreignObject"?!1:i)}return e[t]={vnode:n,handlers:u,fragment:c,cycle:a+1},e}function y8(n,e){const t=new vl(""),r=new vl("");let i;if(n[e?"prepend":"append"](t),e){let{lastElementChild:o}=n;for(;o;){const{previousElementSibling:s}=o;if(xl(o,!0)&&!xl(s,!0)){i=o;break}o=s}}return i?i.before(r):n.append(r),{markStart:t,markEnd:r}}function b8(n,e,t,r,i,o){n=n==null?null:Uk(n)?n:[n];const s=e||y8(t,i),{markStart:l,markEnd:a,keyes:c}=s;let u;const f=c&&new Set;let h=l;if(n&&Hd(n,d=>{if(typeof d=="object"&&!d[Hr])return;const p=d[Hr]&&d.key,m=c&&p!=null&&c.get(p);h!=a&&h===m?f.delete(h):h=h==a?a:h.nextSibling;const y=c?m:h;let g=y;if(d[Hr])g=Kd(d,y,r,i,o);else{const v=d+"";!(g instanceof Text)||g instanceof vl?g=new Text(v):g.data!=v&&(g.data=v)}g!=h&&(c&&f.delete(g),!y||c?(t.insertBefore(g,h),c&&h!=a&&f.add(h)):y==a?t.insertBefore(g,a):(t.replaceChild(g,y),h=g)),p!=null&&(u=u||new Map,u.set(p,g))}),h=h==a?a:h.nextSibling,e&&h!=a)for(;h!=a;){const d=h;h=h.nextSibling,d.remove()}return f&&f.forEach(d=>d.remove()),s.keyes=u,s}function w8(n,e,t,r,i){for(const o in e)!(o in t)&&Nu(n,o,e[o],null,i,r);for(const o in t)Nu(n,o,e[o],t[o],i,r)}function Nu(n,e,t,r,i,o){if(e=e=="class"&&!i?"className":e,t=t??null,r=r??null,e in n&&f8[e]&&(t=n[e]),!(r===t||d8[e]||e[0]=="_"))if(n.localName==="slot"&&e==="assignNode"&&"assign"in n)n.assign(r);else if(e[0]=="o"&&e[1]=="n"&&(It(r)||It(t)))x8(n,e.slice(2),r,o);else if(e=="ref")r&&(It(r)?r(n):r.current=n);else if(e=="style"){const{style:s}=n;t=t||"",r=r||"";const l=Vr(t),a=Vr(r);if(l)for(const c in t)if(a)!(c in r)&&Du(s,c,null);else break;if(a)for(const c in r){const u=r[c];l&&t[c]===u||Du(s,c,u)}else s.cssText=r}else{const s=e[0]=="$"?e.slice(1):e;s===e&&(!i&&!h8[e]&&e in n||It(r)||It(t))?n[e]=r??"":r==null?n.removeAttribute(s):n.setAttribute(s,Vr(r)?JSON.stringify(r):r)}}function x8(n,e,t,r){if(r.handleEvent||(r.handleEvent=i=>r[i.type].call(n,i)),t){if(!r[e]){const i=t.capture||t.once||t.passive?Object.assign({},t):null;n.addEventListener(e,r,i)}r[e]=t}else r[e]&&(n.removeEventListener(e,r),delete r[e])}function Du(n,e,t){let r="setProperty";t==null&&(r="removeProperty",t=null),~e.indexOf("-")?n[r](e,t):n[e]=t}const k8=Jd("host",{style:"display: contents"}),S8="value",v8=(n,e)=>{const t=jk(),r=$k();a8(()=>$d(t.current,"ConnectContext",i=>{i.composedPath().at(0)!==i.currentTarget&&n===i.detail.id&&(i.stopPropagation(),i.detail.connect(r))}),[n]),r.current=e},C8=n=>{const e=s8(({value:t})=>(v8(e,t),k8),{props:{value:{type:Object,value:()=>n}}});return e[S8]=n,e};C8({dispatch(n,e){}});const A8=0,$n=1,Di=2,Ii=3,Iu=4,Mr=5,Cl=6,Yd=0,O8=2,Gd=3,Xd=4,Qd=Mr,M8=Cl,Zd=(n,e,t,r)=>{let i;e[0]=0;for(let o=1;o<e.length;o++){const s=e[o++],l=e[o]?(e[0]|=s?1:2,t[e[o++]]):e[++o];s===Gd?r[0]=l:s===Xd?r[1]=Object.assign(r[1]||{},l):s===Qd?(r[1]=r[1]||{})[e[++o]]=l:s===M8?r[1][e[++o]]+=l+"":s?(i=n.apply(l,Zd(n,l,t,["",null])),r.push(i),l[0]?e[0]|=2:(e[o-2]=Yd,e[o]=i)):r.push(l)}return r},E8=function(n){let e=$n,t="",r="",i=[0],o,s;const l=a=>{e===$n&&(a||(t=t.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?i.push(Yd,a,t):e===Ii&&(a||t)?(i.push(Gd,a,t),e=Di):e===Di&&t==="..."&&a?i.push(Xd,a,0):e===Di&&t&&!a?i.push(Qd,0,!0,t):e>=Mr&&((t||!a&&e===Mr)&&(i.push(e,0,t,s),e=Cl),a&&(i.push(e,a,0,s),e=Cl)),t=""};for(let a=0;a<n.length;a++){a&&(e===$n&&l(),l(a));for(let c=0;c<n[a].length;c++)o=n[a][c],e===$n?o==="<"?(l(),i=[i],e=Ii):t+=o:e===Iu?t==="--"&&o===">"?(e=$n,t=""):t=o+t[0]:r?o===r?r="":t+=o:o==='"'||o==="'"?r=o:o===">"?(l(),e=$n):e&&(o==="="?(e=Mr,s=t,t=""):o==="/"&&(e<Mr||n[a][c+1]===">")?(l(),e===Ii&&(i=i[0]),e=i,(i=i[0]).push(O8,0,e),e=A8):o===" "||o===" "||o===` |
| 70 |
`||o==="\r"?(l(),e=Di):t+=o),e===Ii&&t==="!--"&&(e=Iu,i=i[0])}return l(),i},_8=new Map;function tC(n){let e=_8;return e=Zd(Jd,e.get(n)||(e.set(n,e=E8(n)),e),arguments,[]),e.length>1?e:e[0]}function ep(n){var e,t,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var i=n.length;for(e=0;e<i;e++)n[e]&&(t=ep(n[e]))&&(r&&(r+=" "),r+=t)}else for(t in n)n[t]&&(r&&(r+=" "),r+=t);return r}function nC(){for(var n,e,t=0,r="",i=arguments.length;t<i;t++)(n=arguments[t])&&(e=ep(n))&&(r&&(r+=" "),r+=e);return r}export{XS as $,R8 as A,vS as B,eS as C,nS as D,ju as E,CS as F,L8 as G,U8 as H,z8 as I,DS as J,nv as K,mv as L,pv as M,ev as N,tv as O,P8 as P,j8 as Q,qS as R,So as S,le as T,dS as U,pS as V,YS as W,H8 as X,gv as Y,W8 as Z,$8 as _,kn as a,fr as a$,MS as a0,OS as a1,q8 as a2,ee as a3,hr as a4,oi as a5,$ as a6,cn as a7,Sv as a8,xv as a9,q as aA,Fv as aB,zv as aC,Rv as aD,Hl as aE,Pv as aF,Av as aG,Cv as aH,Lv as aI,Kv as aJ,Uv as aK,Jv as aL,qv as aM,Lt as aN,ue as aO,Wv as aP,Hv as aQ,$v as aR,Bv as aS,Vv as aT,dr as aU,jv as aV,Yv as aW,se as aX,Gv as aY,Pk as aZ,Lk as a_,kv as aa,wv as ab,Tv as ac,Or as ad,Nv as ae,Kr as af,An as ag,_v as ah,Yl as ai,Ub as aj,Wb as ak,Th as al,vv as am,Dv as an,R as ao,qa as ap,ze as aq,oe as ar,we as as,Gt as at,_ as au,Ev as av,Mv as aw,Iv as ax,Ov as ay,X as az,xS as b,G8 as b0,Y8 as b1,K8 as b2,s8 as b3,tC as b4,$k as b5,Zv as b6,Qv as b7,nC as b8,jk as b9,jS as bA,av as bB,aS as bC,uS as bD,WS as bE,oS as bF,$S as bG,VS as bH,hS as bI,NS as bJ,zS as bK,ZS as bL,iS as bM,wS as bN,KS as bO,IS as bP,kS as bQ,US as bR,TS as bS,Sh as bT,eC as bU,qk as bV,u8 as ba,yv as bb,lS as bc,QS as bd,cv as be,_S as bf,ES as bg,rv as bh,Z8 as bi,LS as bj,lv as bk,tS as bl,uv as bm,X8 as bn,sS as bo,sv as bp,JS as bq,fv as br,bv as bs,fS as bt,SS as bu,AS as bv,GS as bw,ov as bx,PS as by,HS as bz,I8 as c,FS as d,gS as e,mS as f,yS as g,Ee as h,go as i,RS as j,bS as k,BS as l,cS as m,rS as n,B8 as o,Q8 as p,V8 as q,F8 as r,iv as s,cr as t,wp as u,hv as v,dv as w,cp as x,J8 as y,pp as z}; |
| 71 |
|