@kokimin/vue-framework 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index-D-WRsztv.js +3431 -0
- package/dist/index.es.js +39934 -40
- package/dist/index.umd.js +791 -1
- package/dist/style.css +6 -1
- package/package.json +23 -2
package/dist/index.umd.js
CHANGED
|
@@ -1 +1,791 @@
|
|
|
1
|
-
(function(s,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],r):(s=typeof globalThis<"u"?globalThis:s||self,r(s.common={},s.Vue))})(this,function(s,r){"use strict";const c=(t,n)=>{const e=t.__vccOpts||t;for(const[o,a]of n)e[o]=a;return e},d={name:"KButton",props:{type:{type:String,default:"primary"}}};function l(t,n,e,o,a,u){return r.openBlock(),r.createElementBlock("button",{class:r.normalizeClass(["k-button",e.type]),onClick:n[0]||(n[0]=I=>t.$emit("click"))},[n[1]||(n[1]=r.createTextVNode(" aaa ",-1)),r.renderSlot(t.$slots,"default")],2)}const p=c(d,[["render",l]]),_={name:"KText"},m={class:"k-text"};function b(t,n,e,o,a,u){return r.openBlock(),r.createElementBlock("span",m,[r.renderSlot(t.$slots,"default")])}const i=c(_,[["render",b]]);(function(t,n){for(var e=f,o=t();;)try{var a=-parseInt(e(226))/1*(-parseInt(e(228))/2)+-parseInt(e(223))/3*(-parseInt(e(232))/4)+-parseInt(e(222))/5*(parseInt(e(227))/6)+-parseInt(e(225))/7+parseInt(e(231))/8*(parseInt(e(233))/9)+parseInt(e(224))/10+-parseInt(e(235))/11*(parseInt(e(234))/12);if(a===n)break;o.push(o.shift())}catch{o.push(o.shift())}})(x,262498);function x(){var t=["132913oLFMUF","25590OeXygt","189rMtWUH","3948140wzMUcE","1736483bCxFhF","32759OpTgWA","198lWcSRo","20sRKqpc","KButton","component","8Nxwsjr","19052KGFuuH","284049gyAHlP","372WFWbvp"];return x=function(){return t},x()}function f(t,n){t=t-222;var e=x(),o=e[t];return o}const $={install(t){var n=f;t.component(n(229),p),t[n(230)]("KText",i)}};s.KButton=p,s.KText=i,s.default=$,Object.defineProperties(s,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(y,dn){typeof exports=="object"&&typeof module<"u"?module.exports=dn(require("vue"),require("@vuepic/vue-datepicker")):typeof define=="function"&&define.amd?define(["vue","@vuepic/vue-datepicker"],dn):(y=typeof globalThis<"u"?globalThis:y||self,y.common=dn(y.Vue,y.VueDatePicker))})(this,function(y,dn){"use strict";var W4e=Object.defineProperty;var j4e=(y,dn,rs)=>dn in y?W4e(y,dn,{enumerable:!0,configurable:!0,writable:!0,value:rs}):y[dn]=rs;var Yr=(y,dn,rs)=>j4e(y,typeof dn!="symbol"?dn+"":dn,rs);function rs(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const Ep=rs(y),o0=(t,e)=>{const r=t.__vccOpts||t;for(const[n,i]of e)r[n]=i;return r},KN={name:"KButton",props:{type:{type:String,default:"primary"}}};function YN(t,e,r,n,i,o){return y.openBlock(),y.createElementBlock("button",{class:y.normalizeClass(["k-button",r.type]),onClick:e[0]||(e[0]=a=>t.$emit("click"))},[e[1]||(e[1]=y.createTextVNode(" aaa ",-1)),y.renderSlot(t.$slots,"default")],2)}const XN=Object.freeze(Object.defineProperty({__proto__:null,default:o0(KN,[["render",YN]])},Symbol.toStringTag,{value:"Module"})),JN={name:"KText"},ZN={class:"k-text"};function QN(t,e,r,n,i,o){return y.openBlock(),y.createElementBlock("span",ZN,[y.renderSlot(t.$slots,"default")])}const e2=Object.freeze(Object.defineProperty({__proto__:null,default:o0(JN,[["render",QN]])},Symbol.toStringTag,{value:"Module"})),El={__name:"element-button",props:{theme:{type:String,default:""},className:{type:String,default:"btn"},addClass:{type:String,default:""},size:{type:String,default:"sm"}},emits:["click"],setup(t,{emit:e}){const r=e;return(n,i)=>(y.openBlock(),y.createElementBlock("button",{type:"button",class:y.normalizeClass([t.className,t.theme,t.addClass,t.size]),onClick:i[0]||(i[0]=o=>r("click"))},[y.renderSlot(n.$slots,"default")],2))}},t2=Object.freeze(Object.defineProperty({__proto__:null,default:El},Symbol.toStringTag,{value:"Module"}));var Xr="top",Mn="bottom",Nn="right",Jr="left",xp="auto",xl=[Xr,Mn,Nn,Jr],ns="start",Cl="end",r2="clippingParents",a0="viewport",kl="popper",n2="reference",s0=xl.reduce(function(t,e){return t.concat([e+"-"+ns,e+"-"+Cl])},[]),l0=[].concat(xl,[xp]).reduce(function(t,e){return t.concat([e,e+"-"+ns,e+"-"+Cl])},[]),i2="beforeRead",o2="read",a2="afterRead",s2="beforeMain",l2="main",u2="afterMain",c2="beforeWrite",f2="write",d2="afterWrite",p2=[i2,o2,a2,s2,l2,u2,c2,f2,d2];function vi(t){return t?(t.nodeName||"").toLowerCase():null}function pn(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function oa(t){var e=pn(t).Element;return t instanceof e||t instanceof Element}function Ln(t){var e=pn(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Cp(t){if(typeof ShadowRoot>"u")return!1;var e=pn(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function h2(t){var e=t.state;Object.keys(e.elements).forEach(function(r){var n=e.styles[r]||{},i=e.attributes[r]||{},o=e.elements[r];!Ln(o)||!vi(o)||(Object.assign(o.style,n),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function v2(t){var e=t.state,r={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,r.popper),e.styles=r,e.elements.arrow&&Object.assign(e.elements.arrow.style,r.arrow),function(){Object.keys(e.elements).forEach(function(n){var i=e.elements[n],o=e.attributes[n]||{},a=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:r[n]),s=a.reduce(function(u,f){return u[f]="",u},{});!Ln(i)||!vi(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(u){i.removeAttribute(u)}))})}}const m2={name:"applyStyles",enabled:!0,phase:"write",fn:h2,effect:v2,requires:["computeStyles"]};function mi(t){return t.split("-")[0]}var aa=Math.max,lc=Math.min,is=Math.round;function kp(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function u0(){return!/^((?!chrome|android).)*safari/i.test(kp())}function as(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!1);var n=t.getBoundingClientRect(),i=1,o=1;e&&Ln(t)&&(i=t.offsetWidth>0&&is(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&is(n.height)/t.offsetHeight||1);var a=oa(t)?pn(t):window,s=a.visualViewport,u=!u0()&&r,f=(n.left+(u&&s?s.offsetLeft:0))/i,d=(n.top+(u&&s?s.offsetTop:0))/o,p=n.width/i,v=n.height/o;return{width:p,height:v,top:d,right:f+p,bottom:d+v,left:f,x:f,y:d}}function Tp(t){var e=as(t),r=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-r)<=1&&(r=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:r,height:n}}function c0(t,e){var r=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(r&&Cp(r)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function $i(t){return pn(t).getComputedStyle(t)}function g2(t){return["table","td","th"].indexOf(vi(t))>=0}function go(t){return((oa(t)?t.ownerDocument:t.document)||window.document).documentElement}function uc(t){return vi(t)==="html"?t:t.assignedSlot||t.parentNode||(Cp(t)?t.host:null)||go(t)}function f0(t){return!Ln(t)||$i(t).position==="fixed"?null:t.offsetParent}function y2(t){var e=/firefox/i.test(kp()),r=/Trident/i.test(kp());if(r&&Ln(t)){var n=$i(t);if(n.position==="fixed")return null}var i=uc(t);for(Cp(i)&&(i=i.host);Ln(i)&&["html","body"].indexOf(vi(i))<0;){var o=$i(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 Tl(t){for(var e=pn(t),r=f0(t);r&&g2(r)&&$i(r).position==="static";)r=f0(r);return r&&(vi(r)==="html"||vi(r)==="body"&&$i(r).position==="static")?e:r||y2(t)||e}function Sp(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Sl(t,e,r){return aa(t,lc(e,r))}function b2(t,e,r){var n=Sl(t,e,r);return n>r?r:n}function d0(){return{top:0,right:0,bottom:0,left:0}}function p0(t){return Object.assign({},d0(),t)}function h0(t,e){return e.reduce(function(r,n){return r[n]=t,r},{})}var w2=function(e,r){return e=typeof e=="function"?e(Object.assign({},r.rects,{placement:r.placement})):e,p0(typeof e!="number"?e:h0(e,xl))};function E2(t){var e,r=t.state,n=t.name,i=t.options,o=r.elements.arrow,a=r.modifiersData.popperOffsets,s=mi(r.placement),u=Sp(s),f=[Jr,Nn].indexOf(s)>=0,d=f?"height":"width";if(!(!o||!a)){var p=w2(i.padding,r),v=Tp(o),m=u==="y"?Xr:Jr,g=u==="y"?Mn:Nn,E=r.rects.reference[d]+r.rects.reference[u]-a[u]-r.rects.popper[d],w=a[u]-r.rects.reference[u],x=Tl(o),k=x?u==="y"?x.clientHeight||0:x.clientWidth||0:0,_=E/2-w/2,O=p[m],N=k-v[d]-p[g],L=k/2-v[d]/2+_,A=Sl(O,L,N),P=u;r.modifiersData[n]=(e={},e[P]=A,e.centerOffset=A-L,e)}}function x2(t){var e=t.state,r=t.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||c0(e.elements.popper,i)&&(e.elements.arrow=i))}const C2={name:"arrow",enabled:!0,phase:"main",fn:E2,effect:x2,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ss(t){return t.split("-")[1]}var k2={top:"auto",right:"auto",bottom:"auto",left:"auto"};function T2(t,e){var r=t.x,n=t.y,i=e.devicePixelRatio||1;return{x:is(r*i)/i||0,y:is(n*i)/i||0}}function v0(t){var e,r=t.popper,n=t.popperRect,i=t.placement,o=t.variation,a=t.offsets,s=t.position,u=t.gpuAcceleration,f=t.adaptive,d=t.roundOffsets,p=t.isFixed,v=a.x,m=v===void 0?0:v,g=a.y,E=g===void 0?0:g,w=typeof d=="function"?d({x:m,y:E}):{x:m,y:E};m=w.x,E=w.y;var x=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),_=Jr,O=Xr,N=window;if(f){var L=Tl(r),A="clientHeight",P="clientWidth";if(L===pn(r)&&(L=go(r),$i(L).position!=="static"&&s==="absolute"&&(A="scrollHeight",P="scrollWidth")),L=L,i===Xr||(i===Jr||i===Nn)&&o===Cl){O=Mn;var U=p&&L===N&&N.visualViewport?N.visualViewport.height:L[A];E-=U-n.height,E*=u?1:-1}if(i===Jr||(i===Xr||i===Mn)&&o===Cl){_=Nn;var J=p&&L===N&&N.visualViewport?N.visualViewport.width:L[P];m-=J-n.width,m*=u?1:-1}}var re=Object.assign({position:s},f&&k2),Se=d===!0?T2({x:m,y:E},pn(r)):{x:m,y:E};if(m=Se.x,E=Se.y,u){var Fe;return Object.assign({},re,(Fe={},Fe[O]=k?"0":"",Fe[_]=x?"0":"",Fe.transform=(N.devicePixelRatio||1)<=1?"translate("+m+"px, "+E+"px)":"translate3d("+m+"px, "+E+"px, 0)",Fe))}return Object.assign({},re,(e={},e[O]=k?E+"px":"",e[_]=x?m+"px":"",e.transform="",e))}function S2(t){var e=t.state,r=t.options,n=r.gpuAcceleration,i=n===void 0?!0:n,o=r.adaptive,a=o===void 0?!0:o,s=r.roundOffsets,u=s===void 0?!0:s,f={placement:mi(e.placement),variation:ss(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,v0(Object.assign({},f,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:u})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,v0(Object.assign({},f,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const _2={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:S2,data:{}};var cc={passive:!0};function O2(t){var e=t.state,r=t.instance,n=t.options,i=n.scroll,o=i===void 0?!0:i,a=n.resize,s=a===void 0?!0:a,u=pn(e.elements.popper),f=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&f.forEach(function(d){d.addEventListener("scroll",r.update,cc)}),s&&u.addEventListener("resize",r.update,cc),function(){o&&f.forEach(function(d){d.removeEventListener("scroll",r.update,cc)}),s&&u.removeEventListener("resize",r.update,cc)}}const A2={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:O2,data:{}};var M2={left:"right",right:"left",bottom:"top",top:"bottom"};function fc(t){return t.replace(/left|right|bottom|top/g,function(e){return M2[e]})}var N2={start:"end",end:"start"};function m0(t){return t.replace(/start|end/g,function(e){return N2[e]})}function _p(t){var e=pn(t),r=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:r,scrollTop:n}}function Op(t){return as(go(t)).left+_p(t).scrollLeft}function L2(t,e){var r=pn(t),n=go(t),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,u=0;if(i){o=i.width,a=i.height;var f=u0();(f||!f&&e==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:o,height:a,x:s+Op(t),y:u}}function D2(t){var e,r=go(t),n=_p(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=aa(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=aa(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+Op(t),u=-n.scrollTop;return $i(i||r).direction==="rtl"&&(s+=aa(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:u}}function Ap(t){var e=$i(t),r=e.overflow,n=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function g0(t){return["html","body","#document"].indexOf(vi(t))>=0?t.ownerDocument.body:Ln(t)&&Ap(t)?t:g0(uc(t))}function _l(t,e){var r;e===void 0&&(e=[]);var n=g0(t),i=n===((r=t.ownerDocument)==null?void 0:r.body),o=pn(n),a=i?[o].concat(o.visualViewport||[],Ap(n)?n:[]):n,s=e.concat(a);return i?s:s.concat(_l(uc(a)))}function Mp(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function I2(t,e){var r=as(t,!1,e==="fixed");return r.top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r}function y0(t,e,r){return e===a0?Mp(L2(t,r)):oa(e)?I2(e,r):Mp(D2(go(t)))}function R2(t){var e=_l(uc(t)),r=["absolute","fixed"].indexOf($i(t).position)>=0,n=r&&Ln(t)?Tl(t):t;return oa(n)?e.filter(function(i){return oa(i)&&c0(i,n)&&vi(i)!=="body"}):[]}function P2(t,e,r,n){var i=e==="clippingParents"?R2(t):[].concat(e),o=[].concat(i,[r]),a=o[0],s=o.reduce(function(u,f){var d=y0(t,f,n);return u.top=aa(d.top,u.top),u.right=lc(d.right,u.right),u.bottom=lc(d.bottom,u.bottom),u.left=aa(d.left,u.left),u},y0(t,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function b0(t){var e=t.reference,r=t.element,n=t.placement,i=n?mi(n):null,o=n?ss(n):null,a=e.x+e.width/2-r.width/2,s=e.y+e.height/2-r.height/2,u;switch(i){case Xr:u={x:a,y:e.y-r.height};break;case Mn:u={x:a,y:e.y+e.height};break;case Nn:u={x:e.x+e.width,y:s};break;case Jr:u={x:e.x-r.width,y:s};break;default:u={x:e.x,y:e.y}}var f=i?Sp(i):null;if(f!=null){var d=f==="y"?"height":"width";switch(o){case ns:u[f]=u[f]-(e[d]/2-r[d]/2);break;case Cl:u[f]=u[f]+(e[d]/2-r[d]/2);break}}return u}function Ol(t,e){e===void 0&&(e={});var r=e,n=r.placement,i=n===void 0?t.placement:n,o=r.strategy,a=o===void 0?t.strategy:o,s=r.boundary,u=s===void 0?r2:s,f=r.rootBoundary,d=f===void 0?a0:f,p=r.elementContext,v=p===void 0?kl:p,m=r.altBoundary,g=m===void 0?!1:m,E=r.padding,w=E===void 0?0:E,x=p0(typeof w!="number"?w:h0(w,xl)),k=v===kl?n2:kl,_=t.rects.popper,O=t.elements[g?k:v],N=P2(oa(O)?O:O.contextElement||go(t.elements.popper),u,d,a),L=as(t.elements.reference),A=b0({reference:L,element:_,placement:i}),P=Mp(Object.assign({},_,A)),U=v===kl?P:L,J={top:N.top-U.top+x.top,bottom:U.bottom-N.bottom+x.bottom,left:N.left-U.left+x.left,right:U.right-N.right+x.right},re=t.modifiersData.offset;if(v===kl&&re){var Se=re[i];Object.keys(J).forEach(function(Fe){var ce=[Nn,Mn].indexOf(Fe)>=0?1:-1,le=[Xr,Mn].indexOf(Fe)>=0?"y":"x";J[Fe]+=Se[le]*ce})}return J}function B2(t,e){e===void 0&&(e={});var r=e,n=r.placement,i=r.boundary,o=r.rootBoundary,a=r.padding,s=r.flipVariations,u=r.allowedAutoPlacements,f=u===void 0?l0:u,d=ss(n),p=d?s?s0:s0.filter(function(g){return ss(g)===d}):xl,v=p.filter(function(g){return f.indexOf(g)>=0});v.length===0&&(v=p);var m=v.reduce(function(g,E){return g[E]=Ol(t,{placement:E,boundary:i,rootBoundary:o,padding:a})[mi(E)],g},{});return Object.keys(m).sort(function(g,E){return m[g]-m[E]})}function $2(t){if(mi(t)===xp)return[];var e=fc(t);return[m0(t),e,m0(e)]}function F2(t){var e=t.state,r=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,s=a===void 0?!0:a,u=r.fallbackPlacements,f=r.padding,d=r.boundary,p=r.rootBoundary,v=r.altBoundary,m=r.flipVariations,g=m===void 0?!0:m,E=r.allowedAutoPlacements,w=e.options.placement,x=mi(w),k=x===w,_=u||(k||!g?[fc(w)]:$2(w)),O=[w].concat(_).reduce(function(we,De){return we.concat(mi(De)===xp?B2(e,{placement:De,boundary:d,rootBoundary:p,padding:f,flipVariations:g,allowedAutoPlacements:E}):De)},[]),N=e.rects.reference,L=e.rects.popper,A=new Map,P=!0,U=O[0],J=0;J<O.length;J++){var re=O[J],Se=mi(re),Fe=ss(re)===ns,ce=[Xr,Mn].indexOf(Se)>=0,le=ce?"width":"height",Z=Ol(e,{placement:re,boundary:d,rootBoundary:p,altBoundary:v,padding:f}),j=ce?Fe?Nn:Jr:Fe?Mn:Xr;N[le]>L[le]&&(j=fc(j));var ue=fc(j),ye=[];if(o&&ye.push(Z[Se]<=0),s&&ye.push(Z[j]<=0,Z[ue]<=0),ye.every(function(we){return we})){U=re,P=!1;break}A.set(re,ye)}if(P)for(var ve=g?3:1,ke=function(De){var pe=O.find(function(F){var G=A.get(F);if(G)return G.slice(0,De).every(function(K){return K})});if(pe)return U=pe,"break"},Te=ve;Te>0;Te--){var We=ke(Te);if(We==="break")break}e.placement!==U&&(e.modifiersData[n]._skip=!0,e.placement=U,e.reset=!0)}}const H2={name:"flip",enabled:!0,phase:"main",fn:F2,requiresIfExists:["offset"],data:{_skip:!1}};function w0(t,e,r){return r===void 0&&(r={x:0,y:0}),{top:t.top-e.height-r.y,right:t.right-e.width+r.x,bottom:t.bottom-e.height+r.y,left:t.left-e.width-r.x}}function E0(t){return[Xr,Nn,Mn,Jr].some(function(e){return t[e]>=0})}function U2(t){var e=t.state,r=t.name,n=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,a=Ol(e,{elementContext:"reference"}),s=Ol(e,{altBoundary:!0}),u=w0(a,n),f=w0(s,i,o),d=E0(u),p=E0(f);e.modifiersData[r]={referenceClippingOffsets:u,popperEscapeOffsets:f,isReferenceHidden:d,hasPopperEscaped:p},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}const z2={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:U2};function q2(t,e,r){var n=mi(t),i=[Jr,Xr].indexOf(n)>=0?-1:1,o=typeof r=="function"?r(Object.assign({},e,{placement:t})):r,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Jr,Nn].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}function V2(t){var e=t.state,r=t.options,n=t.name,i=r.offset,o=i===void 0?[0,0]:i,a=l0.reduce(function(d,p){return d[p]=q2(p,e.rects,o),d},{}),s=a[e.placement],u=s.x,f=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=f),e.modifiersData[n]=a}const W2={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:V2};function j2(t){var e=t.state,r=t.name;e.modifiersData[r]=b0({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const G2={name:"popperOffsets",enabled:!0,phase:"read",fn:j2,data:{}};function K2(t){return t==="x"?"y":"x"}function Y2(t){var e=t.state,r=t.options,n=t.name,i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,s=a===void 0?!1:a,u=r.boundary,f=r.rootBoundary,d=r.altBoundary,p=r.padding,v=r.tether,m=v===void 0?!0:v,g=r.tetherOffset,E=g===void 0?0:g,w=Ol(e,{boundary:u,rootBoundary:f,padding:p,altBoundary:d}),x=mi(e.placement),k=ss(e.placement),_=!k,O=Sp(x),N=K2(O),L=e.modifiersData.popperOffsets,A=e.rects.reference,P=e.rects.popper,U=typeof E=="function"?E(Object.assign({},e.rects,{placement:e.placement})):E,J=typeof U=="number"?{mainAxis:U,altAxis:U}:Object.assign({mainAxis:0,altAxis:0},U),re=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,Se={x:0,y:0};if(L){if(o){var Fe,ce=O==="y"?Xr:Jr,le=O==="y"?Mn:Nn,Z=O==="y"?"height":"width",j=L[O],ue=j+w[ce],ye=j-w[le],ve=m?-P[Z]/2:0,ke=k===ns?A[Z]:P[Z],Te=k===ns?-P[Z]:-A[Z],We=e.elements.arrow,we=m&&We?Tp(We):{width:0,height:0},De=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:d0(),pe=De[ce],F=De[le],G=Sl(0,A[Z],we[Z]),K=_?A[Z]/2-ve-G-pe-J.mainAxis:ke-G-pe-J.mainAxis,te=_?-A[Z]/2+ve+G+F+J.mainAxis:Te+G+F+J.mainAxis,ne=e.elements.arrow&&Tl(e.elements.arrow),he=ne?O==="y"?ne.clientTop||0:ne.clientLeft||0:0,Ne=(Fe=re==null?void 0:re[O])!=null?Fe:0,Xe=j+K-Ne-he,ot=j+te-Ne,sr=Sl(m?lc(ue,Xe):ue,j,m?aa(ye,ot):ye);L[O]=sr,Se[O]=sr-j}if(s){var Ft,D=O==="x"?Xr:Jr,R=O==="x"?Mn:Nn,X=L[N],fe=N==="y"?"height":"width",Ke=X+w[D],et=X-w[R],je=[Xr,Jr].indexOf(x)!==-1,V=(Ft=re==null?void 0:re[N])!=null?Ft:0,se=je?Ke:X-A[fe]-P[fe]-V+J.altAxis,Ue=je?X+A[fe]+P[fe]-V-J.altAxis:et,at=m&&je?b2(se,X,Ue):Sl(m?se:Ke,X,m?Ue:et);L[N]=at,Se[N]=at-X}e.modifiersData[n]=Se}}const X2={name:"preventOverflow",enabled:!0,phase:"main",fn:Y2,requiresIfExists:["offset"]};function J2(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Z2(t){return t===pn(t)||!Ln(t)?_p(t):J2(t)}function Q2(t){var e=t.getBoundingClientRect(),r=is(e.width)/t.offsetWidth||1,n=is(e.height)/t.offsetHeight||1;return r!==1||n!==1}function eL(t,e,r){r===void 0&&(r=!1);var n=Ln(e),i=Ln(e)&&Q2(e),o=go(e),a=as(t,i,r),s={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(n||!n&&!r)&&((vi(e)!=="body"||Ap(o))&&(s=Z2(e)),Ln(e)?(u=as(e,!0),u.x+=e.clientLeft,u.y+=e.clientTop):o&&(u.x=Op(o))),{x:a.left+s.scrollLeft-u.x,y:a.top+s.scrollTop-u.y,width:a.width,height:a.height}}function tL(t){var e=new Map,r=new Set,n=[];t.forEach(function(o){e.set(o.name,o)});function i(o){r.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!r.has(s)){var u=e.get(s);u&&i(u)}}),n.push(o)}return t.forEach(function(o){r.has(o.name)||i(o)}),n}function rL(t){var e=tL(t);return p2.reduce(function(r,n){return r.concat(e.filter(function(i){return i.phase===n}))},[])}function nL(t){var e;return function(){return e||(e=new Promise(function(r){Promise.resolve().then(function(){e=void 0,r(t())})})),e}}function iL(t){var e=t.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(e).map(function(r){return e[r]})}var x0={placement:"bottom",modifiers:[],strategy:"absolute"};function C0(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function oL(t){t===void 0&&(t={});var e=t,r=e.defaultModifiers,n=r===void 0?[]:r,i=e.defaultOptions,o=i===void 0?x0:i;return function(s,u,f){f===void 0&&(f=o);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},x0,o),modifiersData:{},elements:{reference:s,popper:u},attributes:{},styles:{}},p=[],v=!1,m={state:d,setOptions:function(x){var k=typeof x=="function"?x(d.options):x;E(),d.options=Object.assign({},o,d.options,k),d.scrollParents={reference:oa(s)?_l(s):s.contextElement?_l(s.contextElement):[],popper:_l(u)};var _=rL(iL([].concat(n,d.options.modifiers)));return d.orderedModifiers=_.filter(function(O){return O.enabled}),g(),m.update()},forceUpdate:function(){if(!v){var x=d.elements,k=x.reference,_=x.popper;if(C0(k,_)){d.rects={reference:eL(k,Tl(_),d.options.strategy==="fixed"),popper:Tp(_)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(J){return d.modifiersData[J.name]=Object.assign({},J.data)});for(var O=0;O<d.orderedModifiers.length;O++){if(d.reset===!0){d.reset=!1,O=-1;continue}var N=d.orderedModifiers[O],L=N.fn,A=N.options,P=A===void 0?{}:A,U=N.name;typeof L=="function"&&(d=L({state:d,options:P,name:U,instance:m})||d)}}}},update:nL(function(){return new Promise(function(w){m.forceUpdate(),w(d)})}),destroy:function(){E(),v=!0}};if(!C0(s,u))return m;m.setOptions(f).then(function(w){!v&&f.onFirstUpdate&&f.onFirstUpdate(w)});function g(){d.orderedModifiers.forEach(function(w){var x=w.name,k=w.options,_=k===void 0?{}:k,O=w.effect;if(typeof O=="function"){var N=O({state:d,name:x,instance:m,options:_}),L=function(){};p.push(N||L)}})}function E(){p.forEach(function(w){return w()}),p=[]}return m}}var aL=[A2,G2,_2,m2,W2,H2,X2,C2,z2],sL=oL({defaultModifiers:aL});function lL(t){return y.getCurrentScope()?(y.onScopeDispose(t),!0):!1}function dc(t){return typeof t=="function"?t():y.unref(t)}const k0=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const uL=Object.prototype.toString,cL=t=>uL.call(t)==="[object Object]",ls=()=>{},fL=dL();function dL(){var t,e;return k0&&((t=window==null?void 0:window.navigator)==null?void 0:t.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 pL(t,e){function r(...n){return new Promise((i,o)=>{Promise.resolve(t(()=>e.apply(this,n),{fn:e,thisArg:this,args:n})).then(i).catch(o)})}return r}function hL(t,e={}){let r,n,i=ls;const o=s=>{clearTimeout(s),i(),i=ls};return s=>{const u=dc(t),f=dc(e.maxWait);return r&&o(r),u<=0||f!==void 0&&f<=0?(n&&(o(n),n=null),Promise.resolve(s())):new Promise((d,p)=>{i=e.rejectOnCancel?p:d,f&&!n&&(n=setTimeout(()=>{r&&o(r),n=null,d(s())},f)),r=setTimeout(()=>{n&&o(n),n=null,d(s())},u)})}}function T0(t,e=200,r={}){return pL(hL(e,r),t)}function Al(t){var e;const r=dc(t);return(e=r==null?void 0:r.$el)!=null?e:r}const S0=k0?window:void 0;function Np(...t){let e,r,n,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([r,n,i]=t,e=S0):[e,r,n,i]=t,!e)return ls;Array.isArray(r)||(r=[r]),Array.isArray(n)||(n=[n]);const o=[],a=()=>{o.forEach(d=>d()),o.length=0},s=(d,p,v,m)=>(d.addEventListener(p,v,m),()=>d.removeEventListener(p,v,m)),u=y.watch(()=>[Al(e),dc(i)],([d,p])=>{if(a(),!d)return;const v=cL(p)?{...p}:p;o.push(...r.flatMap(m=>n.map(g=>s(d,m,g,v))))},{immediate:!0,flush:"post"}),f=()=>{u(),a()};return lL(f),f}let _0=!1;function vL(t,e,r={}){const{window:n=S0,ignore:i=[],capture:o=!0,detectIframe:a=!1}=r;if(!n)return ls;fL&&!_0&&(_0=!0,Array.from(n.document.body.children).forEach(v=>v.addEventListener("click",ls)),n.document.documentElement.addEventListener("click",ls));let s=!0;const u=v=>i.some(m=>{if(typeof m=="string")return Array.from(n.document.querySelectorAll(m)).some(g=>g===v.target||v.composedPath().includes(g));{const g=Al(m);return g&&(v.target===g||v.composedPath().includes(g))}}),d=[Np(n,"click",v=>{const m=Al(t);if(!(!m||m===v.target||v.composedPath().includes(m))){if(v.detail===0&&(s=!u(v)),!s){s=!0;return}e(v)}},{passive:!0,capture:o}),Np(n,"pointerdown",v=>{const m=Al(t);s=!u(v)&&!!(m&&!v.composedPath().includes(m))},{passive:!0}),a&&Np(n,"blur",v=>{setTimeout(()=>{var m;const g=Al(t);((m=n.document.activeElement)==null?void 0:m.tagName)==="IFRAME"&&!(g!=null&&g.contains(n.document.activeElement))&&e(v)},0)})].filter(Boolean);return()=>d.forEach(v=>v())}const O0={modifiers:[{name:"offset",options:{offset:[0,12]}},{name:"preventOverflow",options:{padding:8}},{name:"flip",options:{fallbackPlacements:["top","bottom","left","right"]}},{name:"arrow",options:{element:":scope > .popper-content > [data-popper-arrow]"}}]},mL=function(t={},e={}){const r={...t,...e},n=[];for(const[i,o]of Object.entries(r))n.push(`${i}: ${o};`);return n.join(" ")},A0={top:"translateY(-7px)",bottom:"translateY(7px)",left:"translateX(-7px)",right:"translateX(7px)"},M0={top:"bottom center",bottom:"top center",left:"center right",right:"center left"},gL=function(t={}){const r={...{placement:"bottom",hover:!1,disableClickOutside:!1,openDelay:0,closeDelay:0,showArrow:!0,strategy:"absolute",interactive:!1,animation:"shift-in",animationDuration:300,popperOptions:{},modifiers:[],onOpened:()=>{},onClosed:()=>{},onTransition:()=>{}},...t},n=y.ref(void 0),i=y.ref(void 0),o=y.ref(void 0),a=y.ref(!1),s=y.ref(!1),u=y.ref(!1),f=y.ref(r.placement||"top"),d=y.computed(()=>{let{modifiers:P}=O0;return r.modifiers&&(P=[...P,...r.modifiers]),{...O0,strategy:r.strategy,placement:r.placement,modifiers:P,...r.popperOptions}}),p=function(){return r.hover===!1||r.interactive===!1?r.closeDelay:r.closeDelay===0?150:r.closeDelay},v=T0(async()=>{var U;const P=await((U=o.value)==null?void 0:U.update());f.value=(P==null?void 0:P.placement)||r.placement||"top",a.value=!0},r.openDelay),m=T0(()=>{if(r.hover===!1||r.interactive===!1){a.value=!1;return}s.value===!1&&u.value===!1&&(a.value=!1)},p()),g=(P="")=>{let U=P;if(P===""&&(U=a.value?"close":"open"),U==="open"){v();return}m()},E=(P="",U="")=>{r.hover!==!1&&(U==="trigger"?s.value=P==="open":u.value=P==="open",g(P))},w=function(P,U){const{slots:J}=U;return y.h("div",{class:"trigger-element",ref:n,ariaDescribedby:"tooltip",onMouseenter:()=>E("open","trigger"),onMouseleave:()=>E("close","trigger"),onFocus:()=>E("open"),onClick:()=>g()},J.default?J.default():"")},x=y.computed(()=>{const{animation:P}=r;if(P==="none")return{outer:"",inner:""};let U=P;return P==="fade-slide"&&(U="shift-in"),{outer:"fade",inner:U}}),k=y.computed(()=>{const{animationDuration:P}=r;if(!Array.isArray(P)){const re=P||300;return{enter:`${re/1e3}s`,leave:`${re/1e3}s`}}const[U,J]=P;return{enter:`${U/1e3}s`,leave:`${J/1e3}s`}}),_=y.computed(()=>{const P=Object.keys(A0).find(U=>f.value.startsWith(U));return P!==void 0?A0[P]:"translate(0, 0)"}),O=y.computed(()=>{const P=Object.keys(M0).find(U=>f.value.startsWith(U));return P!==void 0?M0[P]:"center center"}),N=y.computed(()=>{if(o.value===void 0)return"";const P={"--vue-popper-enter-duration":k.value.enter,"--vue-popper-leave-duration":k.value.leave,"--vue-popper-shift-transform":_.value,"--vue-popper-scale-transform-origin":O.value},U=o.value.state.styles.popper;return mL(U,P)}),L=(P,U)=>{r.onTransition!==void 0&&r.onTransition(P,U)},A=function(P,U){const{slots:J}=U;return y.h(y.Transition,{name:x.value.outer},{default:()=>y.withDirectives(y.h("div",{class:"popper-content-wrapper",ref:i,style:N.value,onMouseleave:()=>{r.hover===!1||r.interactive===!1||E("close","tooltip")},onMouseenter:()=>{r.hover===!1||r.interactive===!1||E("open","tooltip")}},[y.h(y.Transition,{name:x.value.inner,"data-placement":f.value,"data-name":x.value.inner,onBeforeEnter(re){L("before-enter",re)},onEnter(re){x.value.inner==="shift-out"&&(re.style.animation=`shift-out ${k.value.enter}`),L("enter",re)},onAfterEnter(re){x.value.inner==="shift-out"&&(re.style.transform=_.value),L("after-enter",re)},onBeforeLeave(re){x.value.inner==="shift-out"&&(re.style.transform=_.value,re.style.animation=""),L("before-leave",re)},onLeave(re){x.value.inner==="shift-out"&&(re.style.transform="translate(0, 0)"),L("leave",re)},onAfterLeave(re){x.value.inner==="shift-out"&&(re.style.transform="translate(0, 0)"),L("after-leave",re)}},{default:()=>y.withDirectives(y.h("div",{class:"popper-content"},[J.default?J.default():"",y.h("div",{"data-popper-arrow":!0,style:r.showArrow===!0?"display: block":"display: none"})]),[[y.vShow,a.value===!0]])})]),[[y.vShow,a.value===!0]])})};return vL(n,()=>{r.disableClickOutside!==!0&&g("close")},{ignore:[i]}),y.onMounted(()=>{n.value!==void 0&&i.value!==void 0&&(o.value=sL(n.value,i.value,d.value))}),y.onUnmounted(()=>{var P;(P=o.value)==null||P.destroy(),o.value=void 0}),y.watch(a,P=>{var U;if(P===!1){r.onClosed!==void 0&&r.onClosed();return}r.onOpened!==void 0&&r.onOpened(),(U=o.value)==null||U.update()}),{triggerElement:w,tooltipElement:A,popperInstance:o,toggleTooltip:g,isOpened:y.computed(()=>a.value)}},yL={class:"popper-container"},bL=y.defineComponent({__name:"VuePopper",props:{hover:{type:Boolean,default:!1},disableClickOutside:{type:Boolean,default:!1},openDelay:{type:Number,default:0,validator:t=>t>=0?!0:(console.warn("@kalimahapps/vue-popper: openDelay must be a positive number"),!1)},closeDelay:{type:Number,default:0,validator:t=>t>=0?!0:(console.warn("@kalimahapps/vue-popper: closeDelay must be a positive number"),!1)},showArrow:{type:Boolean,default:!0},interactive:{type:Boolean,default:!1},strategy:{type:String,default:"absolute"},placement:{type:String,default:"top"},modifiers:{type:Array,default:()=>[]},animation:{type:String,default:"shift-in"},animationDuration:{type:[Number,Array],default:300,validator(t){return Array.isArray(t)?t.every(e=>typeof e=="number"&&e>=0):typeof t=="number"&&t>=0}},popperOptions:{type:Object,default:()=>({})}},emits:["opened","closed","transition"],setup(t,{expose:e,emit:r}){const n=t,i=r;Object.keys(n.popperOptions).length>0&&console.warn("@kalimahapps/vue-popper: popperOptions is deprecated. Use the individual props instead.");const{popperInstance:o,triggerElement:a,tooltipElement:s,isOpened:u,toggleTooltip:f}=gL({hover:n.hover,disableClickOutside:n.disableClickOutside,openDelay:n.openDelay,closeDelay:n.closeDelay,showArrow:n.showArrow,strategy:n.strategy,modifiers:n.modifiers,animation:n.animation,placement:n.placement,interactive:n.interactive,animationDuration:n.animationDuration,onTransition:(d,p)=>{i("transition",d,p)},onOpened:()=>{i("opened")},onClosed:()=>{i("closed")}});return e({popper:o,isOpened:y.computed(()=>u.value),toggleTooltip:f}),(d,p)=>(y.openBlock(),y.createElementBlock("div",yL,[(y.openBlock(),y.createBlock(y.resolveDynamicComponent(y.unref(a)),null,{default:y.withCtx(()=>[y.renderSlot(d.$slots,"default")]),_:3})),(y.openBlock(),y.createBlock(y.resolveDynamicComponent(y.unref(s)),null,{default:y.withCtx(()=>[y.renderSlot(d.$slots,"content")]),_:3}))]))}}),Ml={__name:"element-tooltip",props:{msg:{type:String,default:""},isHover:{type:Boolean,default:!0},placement:{type:String,default:"top"},className:{type:String,default:""}},setup(t){return(e,r)=>(y.openBlock(),y.createBlock(y.unref(bL),{hover:t.isHover,placement:t.placement,class:y.normalizeClass(t.className)},y.createSlots({default:y.withCtx(()=>[y.renderSlot(e.$slots,"default")]),_:2},[e.$slots.detailBody?{name:"content",fn:y.withCtx(()=>[y.renderSlot(e.$slots,"detailBody")]),key:"0"}:{name:"content",fn:y.withCtx(()=>[y.createTextVNode(y.toDisplayString(t.msg),1)]),key:"1"}]),1032,["hover","placement","class"]))}},wL=Object.freeze(Object.defineProperty({__proto__:null,default:Ml},Symbol.toStringTag,{value:"Module"}));function pc(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var EL=typeof global=="object"&&global&&global.Object===Object&&global,xL=typeof self=="object"&&self&&self.Object===Object&&self,N0=EL||xL||Function("return this")(),Lp=function(){return N0.Date.now()},CL=/\s/;function kL(t){for(var e=t.length;e--&&CL.test(t.charAt(e)););return e}var TL=/^\s+/;function SL(t){return t&&t.slice(0,kL(t)+1).replace(TL,"")}var hc=N0.Symbol,L0=Object.prototype,_L=L0.hasOwnProperty,OL=L0.toString,Nl=hc?hc.toStringTag:void 0;function AL(t){var e=_L.call(t,Nl),r=t[Nl];try{t[Nl]=void 0;var n=!0}catch{}var i=OL.call(t);return n&&(e?t[Nl]=r:delete t[Nl]),i}var ML=Object.prototype,NL=ML.toString;function LL(t){return NL.call(t)}var DL="[object Null]",IL="[object Undefined]",D0=hc?hc.toStringTag:void 0;function RL(t){return t==null?t===void 0?IL:DL:D0&&D0 in Object(t)?AL(t):LL(t)}function PL(t){return t!=null&&typeof t=="object"}var BL="[object Symbol]";function $L(t){return typeof t=="symbol"||PL(t)&&RL(t)==BL}var I0=NaN,FL=/^[-+]0x[0-9a-f]+$/i,HL=/^0b[01]+$/i,UL=/^0o[0-7]+$/i,zL=parseInt;function R0(t){if(typeof t=="number")return t;if($L(t))return I0;if(pc(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=pc(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=SL(t);var r=HL.test(t);return r||UL.test(t)?zL(t.slice(2),r?2:8):FL.test(t)?I0:+t}var qL="Expected a function",VL=Math.max,WL=Math.min;function vc(t,e,r){var n,i,o,a,s,u,f=0,d=!1,p=!1,v=!0;if(typeof t!="function")throw new TypeError(qL);e=R0(e)||0,pc(r)&&(d=!!r.leading,p="maxWait"in r,o=p?VL(R0(r.maxWait)||0,e):o,v="trailing"in r?!!r.trailing:v);function m(L){var A=n,P=i;return n=i=void 0,f=L,a=t.apply(P,A),a}function g(L){return f=L,s=setTimeout(x,e),d?m(L):a}function E(L){var A=L-u,P=L-f,U=e-A;return p?WL(U,o-P):U}function w(L){var A=L-u,P=L-f;return u===void 0||A>=e||A<0||p&&P>=o}function x(){var L=Lp();if(w(L))return k(L);s=setTimeout(x,E(L))}function k(L){return s=void 0,v&&n?m(L):(n=i=void 0,a)}function _(){s!==void 0&&clearTimeout(s),f=0,n=u=i=s=void 0}function O(){return s===void 0?a:k(Lp())}function N(){var L=Lp(),A=w(L);if(n=arguments,i=this,u=L,A){if(s===void 0)return g(u);if(p)return clearTimeout(s),s=setTimeout(x,e),m(u)}return s===void 0&&(s=setTimeout(x,e)),a}return N.cancel=_,N.flush=O,N}var jL="Expected a function";function GL(t,e,r){var n=!0,i=!0;if(typeof t!="function")throw new TypeError(jL);return pc(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),vc(t,e,{leading:n,maxWait:e,trailing:i})}var us=function(){return us=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},us.apply(this,arguments)};function P0(t){return!t||!t.ownerDocument||!t.ownerDocument.defaultView?window:t.ownerDocument.defaultView}function B0(t){return!t||!t.ownerDocument?document:t.ownerDocument}var $0=function(t){var e={},r=Array.prototype.reduce.call(t,function(n,i){var o=i.name.match(/data-simplebar-(.+)/);if(o){var a=o[1].replace(/\W+(.)/g,function(s,u){return u.toUpperCase()});switch(i.value){case"true":n[a]=!0;break;case"false":n[a]=!1;break;case void 0:n[a]=!0;break;default:n[a]=i.value}}return n},e);return r};function F0(t,e){var r;t&&(r=t.classList).add.apply(r,e.split(" "))}function H0(t,e){t&&e.split(" ").forEach(function(r){t.classList.remove(r)})}function U0(t){return".".concat(t.split(" ").join("."))}var Dp=!!(typeof window<"u"&&window.document&&window.document.createElement),KL=Object.freeze({__proto__:null,addClasses:F0,canUseDOM:Dp,classNamesToQuery:U0,getElementDocument:B0,getElementWindow:P0,getOptions:$0,removeClasses:H0}),cs=null,z0=null;Dp&&window.addEventListener("resize",function(){z0!==window.devicePixelRatio&&(z0=window.devicePixelRatio,cs=null)});function q0(){if(cs===null){if(typeof document>"u")return cs=0,cs;var t=document.body,e=document.createElement("div");e.classList.add("simplebar-hide-scrollbar"),t.appendChild(e);var r=e.getBoundingClientRect().right;t.removeChild(e),cs=r}return cs}var yo=P0,Ip=B0,YL=$0,bo=F0,wo=H0,Zr=U0,Ll=function(){function t(e,r){r===void 0&&(r={});var n=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var i=yo(n.el);n.scrollXTicking||(i.requestAnimationFrame(n.scrollX),n.scrollXTicking=!0),n.scrollYTicking||(i.requestAnimationFrame(n.scrollY),n.scrollYTicking=!0),n.isScrolling||(n.isScrolling=!0,bo(n.el,n.classNames.scrolling)),n.showScrollbar("x"),n.showScrollbar("y"),n.onStopScrolling()},this.scrollX=function(){n.axis.x.isOverflowing&&n.positionScrollbar("x"),n.scrollXTicking=!1},this.scrollY=function(){n.axis.y.isOverflowing&&n.positionScrollbar("y"),n.scrollYTicking=!1},this._onStopScrolling=function(){wo(n.el,n.classNames.scrolling),n.options.autoHide&&(n.hideScrollbar("x"),n.hideScrollbar("y")),n.isScrolling=!1},this.onMouseEnter=function(){n.isMouseEntering||(bo(n.el,n.classNames.mouseEntered),n.showScrollbar("x"),n.showScrollbar("y"),n.isMouseEntering=!0),n.onMouseEntered()},this._onMouseEntered=function(){wo(n.el,n.classNames.mouseEntered),n.options.autoHide&&(n.hideScrollbar("x"),n.hideScrollbar("y")),n.isMouseEntering=!1},this._onMouseMove=function(i){n.mouseX=i.clientX,n.mouseY=i.clientY,(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&n.onMouseMoveForAxis("x"),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&n.onMouseMoveForAxis("y")},this.onMouseLeave=function(){n.onMouseMove.cancel(),(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&n.onMouseLeaveForAxis("x"),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&n.onMouseLeaveForAxis("y"),n.mouseX=-1,n.mouseY=-1},this._onWindowResize=function(){n.scrollbarWidth=n.getScrollbarWidth(),n.hideNativeScrollbar()},this.onPointerEvent=function(i){if(!(!n.axis.x.track.el||!n.axis.y.track.el||!n.axis.x.scrollbar.el||!n.axis.y.scrollbar.el)){var o,a;n.axis.x.track.rect=n.axis.x.track.el.getBoundingClientRect(),n.axis.y.track.rect=n.axis.y.track.el.getBoundingClientRect(),(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&(o=n.isWithinBounds(n.axis.x.track.rect)),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&(a=n.isWithinBounds(n.axis.y.track.rect)),(o||a)&&(i.stopPropagation(),i.type==="pointerdown"&&i.pointerType!=="touch"&&(o&&(n.axis.x.scrollbar.rect=n.axis.x.scrollbar.el.getBoundingClientRect(),n.isWithinBounds(n.axis.x.scrollbar.rect)?n.onDragStart(i,"x"):n.onTrackClick(i,"x")),a&&(n.axis.y.scrollbar.rect=n.axis.y.scrollbar.el.getBoundingClientRect(),n.isWithinBounds(n.axis.y.scrollbar.rect)?n.onDragStart(i,"y"):n.onTrackClick(i,"y"))))}},this.drag=function(i){var o,a,s,u,f,d,p,v,m,g,E;if(!(!n.draggedAxis||!n.contentWrapperEl)){var w,x=n.axis[n.draggedAxis].track,k=(a=(o=x.rect)===null||o===void 0?void 0:o[n.axis[n.draggedAxis].sizeAttr])!==null&&a!==void 0?a:0,_=n.axis[n.draggedAxis].scrollbar,O=(u=(s=n.contentWrapperEl)===null||s===void 0?void 0:s[n.axis[n.draggedAxis].scrollSizeAttr])!==null&&u!==void 0?u:0,N=parseInt((d=(f=n.elStyles)===null||f===void 0?void 0:f[n.axis[n.draggedAxis].sizeAttr])!==null&&d!==void 0?d:"0px",10);i.preventDefault(),i.stopPropagation(),n.draggedAxis==="y"?w=i.pageY:w=i.pageX;var L=w-((v=(p=x.rect)===null||p===void 0?void 0:p[n.axis[n.draggedAxis].offsetAttr])!==null&&v!==void 0?v:0)-n.axis[n.draggedAxis].dragOffset;L=n.draggedAxis==="x"&&n.isRtl?((g=(m=x.rect)===null||m===void 0?void 0:m[n.axis[n.draggedAxis].sizeAttr])!==null&&g!==void 0?g:0)-_.size-L:L;var A=L/(k-_.size),P=A*(O-N);n.draggedAxis==="x"&&n.isRtl&&(P=!((E=t.getRtlHelpers())===null||E===void 0)&&E.isScrollingToNegative?-P:P),n.contentWrapperEl[n.axis[n.draggedAxis].scrollOffsetAttr]=P}},this.onEndDrag=function(i){n.isDragging=!1;var o=Ip(n.el),a=yo(n.el);i.preventDefault(),i.stopPropagation(),wo(n.el,n.classNames.dragging),n.onStopScrolling(),o.removeEventListener("mousemove",n.drag,!0),o.removeEventListener("mouseup",n.onEndDrag,!0),n.removePreventClickId=a.setTimeout(function(){o.removeEventListener("click",n.preventClick,!0),o.removeEventListener("dblclick",n.preventClick,!0),n.removePreventClickId=null})},this.preventClick=function(i){i.preventDefault(),i.stopPropagation()},this.el=e,this.options=us(us({},t.defaultOptions),r),this.classNames=us(us({},t.defaultOptions.classNames),r.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=GL(this._onMouseMove,64),this.onWindowResize=vc(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=vc(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=vc(this._onMouseEntered,this.stopScrollDelay),this.init()}return t.getRtlHelpers=function(){if(t.rtlHelpers)return t.rtlHelpers;var e=document.createElement("div");e.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var r=e.firstElementChild,n=r==null?void 0:r.firstElementChild;if(!n)return null;document.body.appendChild(r),r.scrollLeft=0;var i=t.getOffset(r),o=t.getOffset(n);r.scrollLeft=-999;var a=t.getOffset(n);return document.body.removeChild(r),t.rtlHelpers={isScrollOriginAtZero:i.left!==o.left,isScrollingToNegative:o.left!==a.left},t.rtlHelpers},t.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:q0()}catch{return q0()}},t.getOffset=function(e){var r=e.getBoundingClientRect(),n=Ip(e),i=yo(e);return{top:r.top+(i.pageYOffset||n.documentElement.scrollTop),left:r.left+(i.pageXOffset||n.documentElement.scrollLeft)}},t.prototype.init=function(){Dp&&(this.initDOM(),this.rtlHelpers=t.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.prototype.initDOM=function(){var e,r;this.wrapperEl=this.el.querySelector(Zr(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(Zr(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(Zr(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(Zr(this.classNames.offset)),this.maskEl=this.el.querySelector(Zr(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,Zr(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(Zr(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(Zr(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(Zr(this.classNames.track)).concat(Zr(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(Zr(this.classNames.track)).concat(Zr(this.classNames.vertical))),this.axis.x.scrollbar.el=((e=this.axis.x.track.el)===null||e===void 0?void 0:e.querySelector(Zr(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((r=this.axis.y.track.el)===null||r===void 0?void 0:r.querySelector(Zr(this.classNames.scrollbar)))||null,this.options.autoHide||(bo(this.axis.x.scrollbar.el,this.classNames.visible),bo(this.axis.y.scrollbar.el,this.classNames.visible))},t.prototype.initListeners=function(){var e=this,r,n=yo(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(r=this.contentWrapperEl)===null||r===void 0||r.addEventListener("scroll",this.onScroll),n.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var i=!1,o=n.ResizeObserver||ResizeObserver;this.resizeObserver=new o(function(){i&&n.requestAnimationFrame(function(){e.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),n.requestAnimationFrame(function(){i=!0})}this.mutationObserver=new n.MutationObserver(function(){n.requestAnimationFrame(function(){e.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},t.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var e=yo(this.el);this.elStyles=e.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var r=this.contentEl.offsetWidth,n=this.heightAutoObserverEl.offsetHeight<=1,i=this.heightAutoObserverEl.offsetWidth<=1||r>0,o=this.contentWrapperEl.offsetWidth,a=this.elStyles.overflowX,s=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var u=this.contentEl.scrollHeight,f=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=n?"auto":"100%",this.placeholderEl.style.width=i?"".concat(r||f,"px"):"auto",this.placeholderEl.style.height="".concat(u,"px");var d=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=r!==0&&f>r,this.axis.y.isOverflowing=u>d,this.axis.x.isOverflowing=a==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=s==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var p=this.axis.x.isOverflowing?this.scrollbarWidth:0,v=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&f>o-v,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&u>d-p,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},t.prototype.getScrollbarSize=function(e){var r,n;if(e===void 0&&(e="y"),!this.axis[e].isOverflowing||!this.contentEl)return 0;var i=this.contentEl[this.axis[e].scrollSizeAttr],o=(n=(r=this.axis[e].track.el)===null||r===void 0?void 0:r[this.axis[e].offsetSizeAttr])!==null&&n!==void 0?n:0,a=o/i,s;return s=Math.max(~~(a*o),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(s=Math.min(s,this.options.scrollbarMaxSize)),s},t.prototype.positionScrollbar=function(e){var r,n,i;e===void 0&&(e="y");var o=this.axis[e].scrollbar;if(!(!this.axis[e].isOverflowing||!this.contentWrapperEl||!o.el||!this.elStyles)){var a=this.contentWrapperEl[this.axis[e].scrollSizeAttr],s=((r=this.axis[e].track.el)===null||r===void 0?void 0:r[this.axis[e].offsetSizeAttr])||0,u=parseInt(this.elStyles[this.axis[e].sizeAttr],10),f=this.contentWrapperEl[this.axis[e].scrollOffsetAttr];f=e==="x"&&this.isRtl&&(!((n=t.getRtlHelpers())===null||n===void 0)&&n.isScrollOriginAtZero)?-f:f,e==="x"&&this.isRtl&&(f=!((i=t.getRtlHelpers())===null||i===void 0)&&i.isScrollingToNegative?f:-f);var d=f/(a-u),p=~~((s-o.size)*d);p=e==="x"&&this.isRtl?-p+(s-o.size):p,o.el.style.transform=e==="x"?"translate3d(".concat(p,"px, 0, 0)"):"translate3d(0, ".concat(p,"px, 0)")}},t.prototype.toggleTrackVisibility=function(e){e===void 0&&(e="y");var r=this.axis[e].track.el,n=this.axis[e].scrollbar.el;!r||!n||!this.contentWrapperEl||(this.axis[e].isOverflowing||this.axis[e].forceVisible?(r.style.visibility="visible",this.contentWrapperEl.style[this.axis[e].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(e))):(r.style.visibility="hidden",this.contentWrapperEl.style[this.axis[e].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(e))),this.axis[e].isOverflowing?n.style.display="block":n.style.display="none")},t.prototype.showScrollbar=function(e){e===void 0&&(e="y"),this.axis[e].isOverflowing&&!this.axis[e].scrollbar.isVisible&&(bo(this.axis[e].scrollbar.el,this.classNames.visible),this.axis[e].scrollbar.isVisible=!0)},t.prototype.hideScrollbar=function(e){e===void 0&&(e="y"),!this.isDragging&&this.axis[e].isOverflowing&&this.axis[e].scrollbar.isVisible&&(wo(this.axis[e].scrollbar.el,this.classNames.visible),this.axis[e].scrollbar.isVisible=!1)},t.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},t.prototype.onMouseMoveForAxis=function(e){e===void 0&&(e="y");var r=this.axis[e];!r.track.el||!r.scrollbar.el||(r.track.rect=r.track.el.getBoundingClientRect(),r.scrollbar.rect=r.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(r.track.rect)?(this.showScrollbar(e),bo(r.track.el,this.classNames.hover),this.isWithinBounds(r.scrollbar.rect)?bo(r.scrollbar.el,this.classNames.hover):wo(r.scrollbar.el,this.classNames.hover)):(wo(r.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(e)))},t.prototype.onMouseLeaveForAxis=function(e){e===void 0&&(e="y"),wo(this.axis[e].track.el,this.classNames.hover),wo(this.axis[e].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(e)},t.prototype.onDragStart=function(e,r){var n;r===void 0&&(r="y"),this.isDragging=!0;var i=Ip(this.el),o=yo(this.el),a=this.axis[r].scrollbar,s=r==="y"?e.pageY:e.pageX;this.axis[r].dragOffset=s-(((n=a.rect)===null||n===void 0?void 0:n[this.axis[r].offsetAttr])||0),this.draggedAxis=r,bo(this.el,this.classNames.dragging),i.addEventListener("mousemove",this.drag,!0),i.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(i.addEventListener("click",this.preventClick,!0),i.addEventListener("dblclick",this.preventClick,!0)):(o.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.prototype.onTrackClick=function(e,r){var n=this,i,o,a,s;r===void 0&&(r="y");var u=this.axis[r];if(!(!this.options.clickOnTrack||!u.scrollbar.el||!this.contentWrapperEl)){e.preventDefault();var f=yo(this.el);this.axis[r].scrollbar.rect=u.scrollbar.el.getBoundingClientRect();var d=this.axis[r].scrollbar,p=(o=(i=d.rect)===null||i===void 0?void 0:i[this.axis[r].offsetAttr])!==null&&o!==void 0?o:0,v=parseInt((s=(a=this.elStyles)===null||a===void 0?void 0:a[this.axis[r].sizeAttr])!==null&&s!==void 0?s:"0px",10),m=this.contentWrapperEl[this.axis[r].scrollOffsetAttr],g=r==="y"?this.mouseY-p:this.mouseX-p,E=g<0?-1:1,w=E===-1?m-v:m+v,x=40,k=function(){n.contentWrapperEl&&(E===-1?m>w&&(m-=x,n.contentWrapperEl[n.axis[r].scrollOffsetAttr]=m,f.requestAnimationFrame(k)):m<w&&(m+=x,n.contentWrapperEl[n.axis[r].scrollOffsetAttr]=m,f.requestAnimationFrame(k)))};k()}},t.prototype.getContentElement=function(){return this.contentEl},t.prototype.getScrollElement=function(){return this.contentWrapperEl},t.prototype.removeListeners=function(){var e=yo(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},t.prototype.unMount=function(){this.removeListeners()},t.prototype.isWithinBounds=function(e){return this.mouseX>=e.left&&this.mouseX<=e.left+e.width&&this.mouseY>=e.top&&this.mouseY<=e.top+e.height},t.prototype.findChild=function(e,r){var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;return Array.prototype.filter.call(e.children,function(i){return n.call(i,r)})[0]},t.rtlHelpers=null,t.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},t.getOptions=YL,t.helpers=KL,t}(),sa=function(){return sa=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},sa.apply(this,arguments)},XL={beforeUnmount:"beforeUnmount"},Dl;function JL(t){var e,r=t.h,n=t.emit,i=t.slots,o=t.props,a=function(u){return n("scroll",u)},s=sa(sa({},Ll.defaultOptions.classNames),o.classNames);return r("div",sa({ref:"element"},{"data-simplebar":"init"}),[r("div",{class:s.wrapper},[r("div",{class:s.heightAutoObserverWrapperEl},[r("div",{class:s.heightAutoObserverEl})]),r("div",{class:s.mask},[r("div",{class:s.offset},[r("div",sa(sa({},{onScroll:a,class:s.contentWrapper,tabIndex:o.tabIndex||Ll.defaultOptions.tabIndex,role:"region","aria-label":o.ariaLabel||Ll.defaultOptions.ariaLabel}),{ref:"scrollElement"}),[r("div",{class:s.contentEl,ref:"contentElement"},(e=i.default)===null||e===void 0?void 0:e.call(i))])])]),r("div",{class:s.placeholder})]),r("div",{class:"".concat(s.track," simplebar-horizontal")},[r("div",{class:s.scrollbar})]),r("div",{class:"".concat(s.track," simplebar-vertical")},[r("div",{class:s.scrollbar})])])}var ZL=y.defineComponent((Dl={name:"simplebar-vue",props:{autoHide:{type:Boolean,default:void 0},classNames:Object,forceVisible:{type:[Boolean,String],validator:function(t){return typeof t=="boolean"||t==="x"||t==="y"},default:void 0},ariaLabel:String,tabIndex:Number,direction:{type:String,validator:function(t){return t==="ltr"||t==="rtl"}},timeout:Number,clickOnTrack:{type:Boolean,default:void 0},scrollbarMinSize:Number,scrollbarMaxSize:Number},emits:["scroll"],data:function(){return{}},mounted:function(){for(var t=Ll.getOptions(this.$refs.element.attributes),e=0,r=Object.entries(this.$props);e<r.length;e++){var n=r[e],i=n[0],o=n[1];o!=null&&typeof o!="function"&&(t[i]=o)}this.SimpleBar=new Ll(this.$refs.element,t),this.scrollElement=this.$refs.scrollElement,this.contentElement=this.$refs.contentElement}},Dl[XL.beforeUnmount]=function(){var t;(t=this.SimpleBar)===null||t===void 0||t.unMount(),this.SimpleBar=void 0},Dl.methods={recalculate:function(){var t;(t=this.SimpleBar)===null||t===void 0||t.recalculate()}},Dl.render=function(t){var e=this;return JL({h:typeof t=="function"?t:y.h,emit:function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.$emit.apply(e,r)},slots:this.$slots,props:this.$props})},Dl));const QL=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"element-scroll",setup(t){return(e,r)=>(y.openBlock(),y.createBlock(y.unref(ZL),null,{default:y.withCtx(()=>[y.renderSlot(e.$slots,"default")]),_:3}))}}},Symbol.toStringTag,{value:"Module"}));var mc=V0;function V0(t,e){t=t-422;var r=gc(),n=r[t];return n}(function(t,e){for(var r=V0,n=t();;)try{var i=-parseInt(r(424))/1*(parseInt(r(437))/2)+parseInt(r(435))/3+parseInt(r(429))/4+-parseInt(r(434))/5+-parseInt(r(426))/6*(parseInt(r(432))/7)+-parseInt(r(431))/8+-parseInt(r(441))/9*(-parseInt(r(440))/10);if(i===e)break;n.push(n.shift())}catch{n.push(n.shift())}})(gc,662526);var Jn=typeof globalThis!==mc(422)?globalThis:typeof window<"u"?window:typeof global!==mc(422)?global:typeof self!==mc(422)?self:{};function Rp(t){var e=mc;return t&&t.__esModule&&Object.prototype[e(433)][e(439)](t,e(443))?t.default:t}function gc(){var t=["prototype","53223TIMZoi","function","47274PDLFqE","apply","__esModule","2573708JUKFpz","construct","338392dWVuaZ","147eKdUHe","hasOwnProperty","3033230COLQbY","3549798Ecucyx","length","30twHeRy","get","call","20fIdlDJ","2018619dPMhZm","defineProperty","default","undefined"];return gc=function(){return t},gc()}var yc={exports:{}};/**
|
|
2
|
+
* @license
|
|
3
|
+
* Lodash <https://lodash.com/>
|
|
4
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
5
|
+
* Released under MIT license <https://lodash.com/license>
|
|
6
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
7
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
8
|
+
*/yc.exports,function(t,e){(function(){var r,n="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",f=500,d="__lodash_placeholder__",p=1,v=2,m=4,g=1,E=2,w=1,x=2,k=4,_=8,O=16,N=32,L=64,A=128,P=256,U=512,J=30,re="...",Se=800,Fe=16,ce=1,le=2,Z=3,j=1/0,ue=9007199254740991,ye=17976931348623157e292,ve=NaN,ke=4294967295,Te=ke-1,We=ke>>>1,we=[["ary",A],["bind",w],["bindKey",x],["curry",_],["curryRight",O],["flip",U],["partial",N],["partialRight",L],["rearg",P]],De="[object Arguments]",pe="[object Array]",F="[object AsyncFunction]",G="[object Boolean]",K="[object Date]",te="[object DOMException]",ne="[object Error]",he="[object Function]",Ne="[object GeneratorFunction]",Xe="[object Map]",ot="[object Number]",sr="[object Null]",Ft="[object Object]",D="[object Promise]",R="[object Proxy]",X="[object RegExp]",fe="[object Set]",Ke="[object String]",et="[object Symbol]",je="[object Undefined]",V="[object WeakMap]",se="[object WeakSet]",Ue="[object ArrayBuffer]",at="[object DataView]",Wr="[object Float32Array]",zn="[object Float64Array]",Yt="[object Int8Array]",Rr="[object Int16Array]",oo="[object Int32Array]",Cn="[object Uint8Array]",Fu="[object Uint8ClampedArray]",Hu="[object Uint16Array]",Ii="[object Uint32Array]",Yo=/\b__p \+= '';/g,Ug=/\b(__p \+=) '' \+/g,Uu=/(__e\(.*?\)|\b__t\)) \+\n'';/g,zu=/&(?:amp|lt|gt|quot|#39);/g,qu=/[&<>"']/g,ol=RegExp(zu.source),Vu=RegExp(qu.source),zg=/<%-([\s\S]+?)%>/g,li=/<%([\s\S]+?)%>/g,Wu=/<%=([\s\S]+?)%>/g,Ad=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Md=/^\w*$/,qg=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ao=/[\\^$.*+?()[\]{}|]/g,ui=RegExp(ao.source),al=/^\s+/,Nd=/\s/,Ld=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Vg=/\{\n\/\* \[wrapped with (.+)\] \*/,Le=/,? & /,H=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,de=/[()=,{}\[\]\/\s]/,Oe=/\\(\\)?/g,mt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Xt=/\w*$/,lr=/^[-+]0x[0-9a-f]+$/i,ur=/^0b[01]+$/i,ci=/^\[object .+?Constructor\]$/,ja=/^0o[0-7]+$/i,Dd=/^(?:0|[1-9]\d*)$/,Wg=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ju=/($^)/,BPe=/['\n\r\u2028\u2029\\]/g,Id="\\ud800-\\udfff",$Pe="\\u0300-\\u036f",FPe="\\ufe20-\\ufe2f",HPe="\\u20d0-\\u20ff",xA=$Pe+FPe+HPe,CA="\\u2700-\\u27bf",kA="a-z\\xdf-\\xf6\\xf8-\\xff",UPe="\\xac\\xb1\\xd7\\xf7",zPe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",qPe="\\u2000-\\u206f",VPe=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",TA="A-Z\\xc0-\\xd6\\xd8-\\xde",SA="\\ufe0e\\ufe0f",_A=UPe+zPe+qPe+VPe,jg="['’]",WPe="["+Id+"]",OA="["+_A+"]",Rd="["+xA+"]",AA="\\d+",jPe="["+CA+"]",MA="["+kA+"]",NA="[^"+Id+_A+AA+CA+kA+TA+"]",Gg="\\ud83c[\\udffb-\\udfff]",GPe="(?:"+Rd+"|"+Gg+")",LA="[^"+Id+"]",Kg="(?:\\ud83c[\\udde6-\\uddff]){2}",Yg="[\\ud800-\\udbff][\\udc00-\\udfff]",sl="["+TA+"]",DA="\\u200d",IA="(?:"+MA+"|"+NA+")",KPe="(?:"+sl+"|"+NA+")",RA="(?:"+jg+"(?:d|ll|m|re|s|t|ve))?",PA="(?:"+jg+"(?:D|LL|M|RE|S|T|VE))?",BA=GPe+"?",$A="["+SA+"]?",YPe="(?:"+DA+"(?:"+[LA,Kg,Yg].join("|")+")"+$A+BA+")*",XPe="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",JPe="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",FA=$A+BA+YPe,ZPe="(?:"+[jPe,Kg,Yg].join("|")+")"+FA,QPe="(?:"+[LA+Rd+"?",Rd,Kg,Yg,WPe].join("|")+")",eBe=RegExp(jg,"g"),tBe=RegExp(Rd,"g"),Xg=RegExp(Gg+"(?="+Gg+")|"+QPe+FA,"g"),rBe=RegExp([sl+"?"+MA+"+"+RA+"(?="+[OA,sl,"$"].join("|")+")",KPe+"+"+PA+"(?="+[OA,sl+IA,"$"].join("|")+")",sl+"?"+IA+"+"+RA,sl+"+"+PA,JPe,XPe,AA,ZPe].join("|"),"g"),nBe=RegExp("["+DA+Id+xA+SA+"]"),iBe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,oBe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],aBe=-1,kt={};kt[Wr]=kt[zn]=kt[Yt]=kt[Rr]=kt[oo]=kt[Cn]=kt[Fu]=kt[Hu]=kt[Ii]=!0,kt[De]=kt[pe]=kt[Ue]=kt[G]=kt[at]=kt[K]=kt[ne]=kt[he]=kt[Xe]=kt[ot]=kt[Ft]=kt[X]=kt[fe]=kt[Ke]=kt[V]=!1;var Ct={};Ct[De]=Ct[pe]=Ct[Ue]=Ct[at]=Ct[G]=Ct[K]=Ct[Wr]=Ct[zn]=Ct[Yt]=Ct[Rr]=Ct[oo]=Ct[Xe]=Ct[ot]=Ct[Ft]=Ct[X]=Ct[fe]=Ct[Ke]=Ct[et]=Ct[Cn]=Ct[Fu]=Ct[Hu]=Ct[Ii]=!0,Ct[ne]=Ct[he]=Ct[V]=!1;var sBe={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},lBe={"&":"&","<":"<",">":">",'"':""","'":"'"},uBe={"&":"&","<":"<",">":">",""":'"',"'":"'"},cBe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},fBe=parseFloat,dBe=parseInt,HA=typeof Jn=="object"&&Jn&&Jn.Object===Object&&Jn,pBe=typeof self=="object"&&self&&self.Object===Object&&self,wr=HA||pBe||Function("return this")(),Jg=e&&!e.nodeType&&e,Ga=Jg&&!0&&t&&!t.nodeType&&t,UA=Ga&&Ga.exports===Jg,Zg=UA&&HA.process,qn=function(){try{var B=Ga&&Ga.require&&Ga.require("util").types;return B||Zg&&Zg.binding&&Zg.binding("util")}catch{}}(),zA=qn&&qn.isArrayBuffer,qA=qn&&qn.isDate,VA=qn&&qn.isMap,WA=qn&&qn.isRegExp,jA=qn&&qn.isSet,GA=qn&&qn.isTypedArray;function kn(B,Y,z){switch(z.length){case 0:return B.call(Y);case 1:return B.call(Y,z[0]);case 2:return B.call(Y,z[0],z[1]);case 3:return B.call(Y,z[0],z[1],z[2])}return B.apply(Y,z)}function hBe(B,Y,z,Ee){for(var ze=-1,pt=B==null?0:B.length;++ze<pt;){var Jt=B[ze];Y(Ee,Jt,z(Jt),B)}return Ee}function Vn(B,Y){for(var z=-1,Ee=B==null?0:B.length;++z<Ee&&Y(B[z],z,B)!==!1;);return B}function vBe(B,Y){for(var z=B==null?0:B.length;z--&&Y(B[z],z,B)!==!1;);return B}function KA(B,Y){for(var z=-1,Ee=B==null?0:B.length;++z<Ee;)if(!Y(B[z],z,B))return!1;return!0}function Xo(B,Y){for(var z=-1,Ee=B==null?0:B.length,ze=0,pt=[];++z<Ee;){var Jt=B[z];Y(Jt,z,B)&&(pt[ze++]=Jt)}return pt}function Pd(B,Y){var z=B==null?0:B.length;return!!z&&ll(B,Y,0)>-1}function Qg(B,Y,z){for(var Ee=-1,ze=B==null?0:B.length;++Ee<ze;)if(z(Y,B[Ee]))return!0;return!1}function _t(B,Y){for(var z=-1,Ee=B==null?0:B.length,ze=Array(Ee);++z<Ee;)ze[z]=Y(B[z],z,B);return ze}function Jo(B,Y){for(var z=-1,Ee=Y.length,ze=B.length;++z<Ee;)B[ze+z]=Y[z];return B}function ey(B,Y,z,Ee){var ze=-1,pt=B==null?0:B.length;for(Ee&&pt&&(z=B[++ze]);++ze<pt;)z=Y(z,B[ze],ze,B);return z}function mBe(B,Y,z,Ee){var ze=B==null?0:B.length;for(Ee&&ze&&(z=B[--ze]);ze--;)z=Y(z,B[ze],ze,B);return z}function ty(B,Y){for(var z=-1,Ee=B==null?0:B.length;++z<Ee;)if(Y(B[z],z,B))return!0;return!1}var gBe=ry("length");function yBe(B){return B.split("")}function bBe(B){return B.match(H)||[]}function YA(B,Y,z){var Ee;return z(B,function(ze,pt,Jt){if(Y(ze,pt,Jt))return Ee=pt,!1}),Ee}function Bd(B,Y,z,Ee){for(var ze=B.length,pt=z+(Ee?1:-1);Ee?pt--:++pt<ze;)if(Y(B[pt],pt,B))return pt;return-1}function ll(B,Y,z){return Y===Y?NBe(B,Y,z):Bd(B,XA,z)}function wBe(B,Y,z,Ee){for(var ze=z-1,pt=B.length;++ze<pt;)if(Ee(B[ze],Y))return ze;return-1}function XA(B){return B!==B}function JA(B,Y){var z=B==null?0:B.length;return z?iy(B,Y)/z:ve}function ry(B){return function(Y){return Y==null?r:Y[B]}}function ny(B){return function(Y){return B==null?r:B[Y]}}function ZA(B,Y,z,Ee,ze){return ze(B,function(pt,Jt,wt){z=Ee?(Ee=!1,pt):Y(z,pt,Jt,wt)}),z}function EBe(B,Y){var z=B.length;for(B.sort(Y);z--;)B[z]=B[z].value;return B}function iy(B,Y){for(var z,Ee=-1,ze=B.length;++Ee<ze;){var pt=Y(B[Ee]);pt!==r&&(z=z===r?pt:z+pt)}return z}function oy(B,Y){for(var z=-1,Ee=Array(B);++z<B;)Ee[z]=Y(z);return Ee}function xBe(B,Y){return _t(Y,function(z){return[z,B[z]]})}function QA(B){return B&&B.slice(0,nM(B)+1).replace(al,"")}function Tn(B){return function(Y){return B(Y)}}function ay(B,Y){return _t(Y,function(z){return B[z]})}function Gu(B,Y){return B.has(Y)}function eM(B,Y){for(var z=-1,Ee=B.length;++z<Ee&&ll(Y,B[z],0)>-1;);return z}function tM(B,Y){for(var z=B.length;z--&&ll(Y,B[z],0)>-1;);return z}function CBe(B,Y){for(var z=B.length,Ee=0;z--;)B[z]===Y&&++Ee;return Ee}var kBe=ny(sBe),TBe=ny(lBe);function SBe(B){return"\\"+cBe[B]}function _Be(B,Y){return B==null?r:B[Y]}function ul(B){return nBe.test(B)}function OBe(B){return iBe.test(B)}function ABe(B){for(var Y,z=[];!(Y=B.next()).done;)z.push(Y.value);return z}function sy(B){var Y=-1,z=Array(B.size);return B.forEach(function(Ee,ze){z[++Y]=[ze,Ee]}),z}function rM(B,Y){return function(z){return B(Y(z))}}function Zo(B,Y){for(var z=-1,Ee=B.length,ze=0,pt=[];++z<Ee;){var Jt=B[z];(Jt===Y||Jt===d)&&(B[z]=d,pt[ze++]=z)}return pt}function $d(B){var Y=-1,z=Array(B.size);return B.forEach(function(Ee){z[++Y]=Ee}),z}function MBe(B){var Y=-1,z=Array(B.size);return B.forEach(function(Ee){z[++Y]=[Ee,Ee]}),z}function NBe(B,Y,z){for(var Ee=z-1,ze=B.length;++Ee<ze;)if(B[Ee]===Y)return Ee;return-1}function LBe(B,Y,z){for(var Ee=z+1;Ee--;)if(B[Ee]===Y)return Ee;return Ee}function cl(B){return ul(B)?IBe(B):gBe(B)}function fi(B){return ul(B)?RBe(B):yBe(B)}function nM(B){for(var Y=B.length;Y--&&Nd.test(B.charAt(Y)););return Y}var DBe=ny(uBe);function IBe(B){for(var Y=Xg.lastIndex=0;Xg.test(B);)++Y;return Y}function RBe(B){return B.match(Xg)||[]}function PBe(B){return B.match(rBe)||[]}var BBe=function B(Y){Y=Y==null?wr:fl.defaults(wr.Object(),Y,fl.pick(wr,oBe));var z=Y.Array,Ee=Y.Date,ze=Y.Error,pt=Y.Function,Jt=Y.Math,wt=Y.Object,ly=Y.RegExp,$Be=Y.String,Wn=Y.TypeError,Fd=z.prototype,FBe=pt.prototype,dl=wt.prototype,Hd=Y["__core-js_shared__"],Ud=FBe.toString,yt=dl.hasOwnProperty,HBe=0,iM=function(){var l=/[^.]+$/.exec(Hd&&Hd.keys&&Hd.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),zd=dl.toString,UBe=Ud.call(wt),zBe=wr._,qBe=ly("^"+Ud.call(yt).replace(ao,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qd=UA?Y.Buffer:r,Qo=Y.Symbol,Vd=Y.Uint8Array,oM=qd?qd.allocUnsafe:r,Wd=rM(wt.getPrototypeOf,wt),aM=wt.create,sM=dl.propertyIsEnumerable,jd=Fd.splice,lM=Qo?Qo.isConcatSpreadable:r,Ku=Qo?Qo.iterator:r,Ka=Qo?Qo.toStringTag:r,Gd=function(){try{var l=Qa(wt,"defineProperty");return l({},"",{}),l}catch{}}(),VBe=Y.clearTimeout!==wr.clearTimeout&&Y.clearTimeout,WBe=Ee&&Ee.now!==wr.Date.now&&Ee.now,jBe=Y.setTimeout!==wr.setTimeout&&Y.setTimeout,Kd=Jt.ceil,Yd=Jt.floor,uy=wt.getOwnPropertySymbols,GBe=qd?qd.isBuffer:r,uM=Y.isFinite,KBe=Fd.join,YBe=rM(wt.keys,wt),Zt=Jt.max,Pr=Jt.min,XBe=Ee.now,JBe=Y.parseInt,cM=Jt.random,ZBe=Fd.reverse,cy=Qa(Y,"DataView"),Yu=Qa(Y,"Map"),fy=Qa(Y,"Promise"),pl=Qa(Y,"Set"),Xu=Qa(Y,"WeakMap"),Ju=Qa(wt,"create"),Xd=Xu&&new Xu,hl={},QBe=es(cy),e$e=es(Yu),t$e=es(fy),r$e=es(pl),n$e=es(Xu),Jd=Qo?Qo.prototype:r,Zu=Jd?Jd.valueOf:r,fM=Jd?Jd.toString:r;function T(l){if(Lt(l)&&!qe(l)&&!(l instanceof tt)){if(l instanceof jn)return l;if(yt.call(l,"__wrapped__"))return dN(l)}return new jn(l)}var vl=function(){function l(){}return function(c){if(!Nt(c))return{};if(aM)return aM(c);l.prototype=c;var h=new l;return l.prototype=r,h}}();function Zd(){}function jn(l,c){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!c,this.__index__=0,this.__values__=r}T.templateSettings={escape:zg,evaluate:li,interpolate:Wu,variable:"",imports:{_:T}},T.prototype=Zd.prototype,T.prototype.constructor=T,jn.prototype=vl(Zd.prototype),jn.prototype.constructor=jn;function tt(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ke,this.__views__=[]}function i$e(){var l=new tt(this.__wrapped__);return l.__actions__=ln(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=ln(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=ln(this.__views__),l}function o$e(){if(this.__filtered__){var l=new tt(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function a$e(){var l=this.__wrapped__.value(),c=this.__dir__,h=qe(l),b=c<0,C=h?l.length:0,S=yFe(0,C,this.__views__),M=S.start,I=S.end,$=I-M,Q=b?I:M-1,ee=this.__iteratees__,ie=ee.length,me=0,Ae=Pr($,this.__takeCount__);if(!h||!b&&C==$&&Ae==$)return RM(l,this.__actions__);var Re=[];e:for(;$--&&me<Ae;){Q+=c;for(var Ye=-1,Pe=l[Q];++Ye<ie;){var Qe=ee[Ye],nt=Qe.iteratee,On=Qe.type,Kr=nt(Pe);if(On==le)Pe=Kr;else if(!Kr){if(On==ce)continue e;break e}}Re[me++]=Pe}return Re}tt.prototype=vl(Zd.prototype),tt.prototype.constructor=tt;function Ya(l){var c=-1,h=l==null?0:l.length;for(this.clear();++c<h;){var b=l[c];this.set(b[0],b[1])}}function s$e(){this.__data__=Ju?Ju(null):{},this.size=0}function l$e(l){var c=this.has(l)&&delete this.__data__[l];return this.size-=c?1:0,c}function u$e(l){var c=this.__data__;if(Ju){var h=c[l];return h===u?r:h}return yt.call(c,l)?c[l]:r}function c$e(l){var c=this.__data__;return Ju?c[l]!==r:yt.call(c,l)}function f$e(l,c){var h=this.__data__;return this.size+=this.has(l)?0:1,h[l]=Ju&&c===r?u:c,this}Ya.prototype.clear=s$e,Ya.prototype.delete=l$e,Ya.prototype.get=u$e,Ya.prototype.has=c$e,Ya.prototype.set=f$e;function so(l){var c=-1,h=l==null?0:l.length;for(this.clear();++c<h;){var b=l[c];this.set(b[0],b[1])}}function d$e(){this.__data__=[],this.size=0}function p$e(l){var c=this.__data__,h=Qd(c,l);if(h<0)return!1;var b=c.length-1;return h==b?c.pop():jd.call(c,h,1),--this.size,!0}function h$e(l){var c=this.__data__,h=Qd(c,l);return h<0?r:c[h][1]}function v$e(l){return Qd(this.__data__,l)>-1}function m$e(l,c){var h=this.__data__,b=Qd(h,l);return b<0?(++this.size,h.push([l,c])):h[b][1]=c,this}so.prototype.clear=d$e,so.prototype.delete=p$e,so.prototype.get=h$e,so.prototype.has=v$e,so.prototype.set=m$e;function lo(l){var c=-1,h=l==null?0:l.length;for(this.clear();++c<h;){var b=l[c];this.set(b[0],b[1])}}function g$e(){this.size=0,this.__data__={hash:new Ya,map:new(Yu||so),string:new Ya}}function y$e(l){var c=fp(this,l).delete(l);return this.size-=c?1:0,c}function b$e(l){return fp(this,l).get(l)}function w$e(l){return fp(this,l).has(l)}function E$e(l,c){var h=fp(this,l),b=h.size;return h.set(l,c),this.size+=h.size==b?0:1,this}lo.prototype.clear=g$e,lo.prototype.delete=y$e,lo.prototype.get=b$e,lo.prototype.has=w$e,lo.prototype.set=E$e;function Xa(l){var c=-1,h=l==null?0:l.length;for(this.__data__=new lo;++c<h;)this.add(l[c])}function x$e(l){return this.__data__.set(l,u),this}function C$e(l){return this.__data__.has(l)}Xa.prototype.add=Xa.prototype.push=x$e,Xa.prototype.has=C$e;function di(l){var c=this.__data__=new so(l);this.size=c.size}function k$e(){this.__data__=new so,this.size=0}function T$e(l){var c=this.__data__,h=c.delete(l);return this.size=c.size,h}function S$e(l){return this.__data__.get(l)}function _$e(l){return this.__data__.has(l)}function O$e(l,c){var h=this.__data__;if(h instanceof so){var b=h.__data__;if(!Yu||b.length<i-1)return b.push([l,c]),this.size=++h.size,this;h=this.__data__=new lo(b)}return h.set(l,c),this.size=h.size,this}di.prototype.clear=k$e,di.prototype.delete=T$e,di.prototype.get=S$e,di.prototype.has=_$e,di.prototype.set=O$e;function dM(l,c){var h=qe(l),b=!h&&ts(l),C=!h&&!b&&ia(l),S=!h&&!b&&!C&&bl(l),M=h||b||C||S,I=M?oy(l.length,$Be):[],$=I.length;for(var Q in l)(c||yt.call(l,Q))&&!(M&&(Q=="length"||C&&(Q=="offset"||Q=="parent")||S&&(Q=="buffer"||Q=="byteLength"||Q=="byteOffset")||po(Q,$)))&&I.push(Q);return I}function pM(l){var c=l.length;return c?l[xy(0,c-1)]:r}function A$e(l,c){return dp(ln(l),Ja(c,0,l.length))}function M$e(l){return dp(ln(l))}function dy(l,c,h){(h!==r&&!pi(l[c],h)||h===r&&!(c in l))&&uo(l,c,h)}function Qu(l,c,h){var b=l[c];(!(yt.call(l,c)&&pi(b,h))||h===r&&!(c in l))&&uo(l,c,h)}function Qd(l,c){for(var h=l.length;h--;)if(pi(l[h][0],c))return h;return-1}function N$e(l,c,h,b){return ea(l,function(C,S,M){c(b,C,h(C),M)}),b}function hM(l,c){return l&&Pi(c,cr(c),l)}function L$e(l,c){return l&&Pi(c,cn(c),l)}function uo(l,c,h){c=="__proto__"&&Gd?Gd(l,c,{configurable:!0,enumerable:!0,value:h,writable:!0}):l[c]=h}function py(l,c){for(var h=-1,b=c.length,C=z(b),S=l==null;++h<b;)C[h]=S?r:Gy(l,c[h]);return C}function Ja(l,c,h){return l===l&&(h!==r&&(l=l<=h?l:h),c!==r&&(l=l>=c?l:c)),l}function Gn(l,c,h,b,C,S){var M,I=c&p,$=c&v,Q=c&m;if(h&&(M=C?h(l,b,C,S):h(l)),M!==r)return M;if(!Nt(l))return l;var ee=qe(l);if(ee){if(M=wFe(l),!I)return ln(l,M)}else{var ie=Br(l),me=ie==he||ie==Ne;if(ia(l))return $M(l,I);if(ie==Ft||ie==De||me&&!C){if(M=$||me?{}:nN(l),!I)return $?uFe(l,L$e(M,l)):lFe(l,hM(M,l))}else{if(!Ct[ie])return C?l:{};M=EFe(l,ie,I)}}S||(S=new di);var Ae=S.get(l);if(Ae)return Ae;S.set(l,M),LN(l)?l.forEach(function(Pe){M.add(Gn(Pe,c,h,Pe,l,S))}):MN(l)&&l.forEach(function(Pe,Qe){M.set(Qe,Gn(Pe,c,h,Qe,l,S))});var Re=Q?$?Dy:Ly:$?cn:cr,Ye=ee?r:Re(l);return Vn(Ye||l,function(Pe,Qe){Ye&&(Qe=Pe,Pe=l[Qe]),Qu(M,Qe,Gn(Pe,c,h,Qe,l,S))}),M}function D$e(l){var c=cr(l);return function(h){return vM(h,l,c)}}function vM(l,c,h){var b=h.length;if(l==null)return!b;for(l=wt(l);b--;){var C=h[b],S=c[C],M=l[C];if(M===r&&!(C in l)||!S(M))return!1}return!0}function mM(l,c,h){if(typeof l!="function")throw new Wn(a);return ac(function(){l.apply(r,h)},c)}function ec(l,c,h,b){var C=-1,S=Pd,M=!0,I=l.length,$=[],Q=c.length;if(!I)return $;h&&(c=_t(c,Tn(h))),b?(S=Qg,M=!1):c.length>=i&&(S=Gu,M=!1,c=new Xa(c));e:for(;++C<I;){var ee=l[C],ie=h==null?ee:h(ee);if(ee=b||ee!==0?ee:0,M&&ie===ie){for(var me=Q;me--;)if(c[me]===ie)continue e;$.push(ee)}else S(c,ie,b)||$.push(ee)}return $}var ea=qM(Ri),gM=qM(vy,!0);function I$e(l,c){var h=!0;return ea(l,function(b,C,S){return h=!!c(b,C,S),h}),h}function ep(l,c,h){for(var b=-1,C=l.length;++b<C;){var S=l[b],M=c(S);if(M!=null&&(I===r?M===M&&!_n(M):h(M,I)))var I=M,$=S}return $}function R$e(l,c,h,b){var C=l.length;for(h=Ge(h),h<0&&(h=-h>C?0:C+h),b=b===r||b>C?C:Ge(b),b<0&&(b+=C),b=h>b?0:IN(b);h<b;)l[h++]=c;return l}function yM(l,c){var h=[];return ea(l,function(b,C,S){c(b,C,S)&&h.push(b)}),h}function Er(l,c,h,b,C){var S=-1,M=l.length;for(h||(h=CFe),C||(C=[]);++S<M;){var I=l[S];c>0&&h(I)?c>1?Er(I,c-1,h,b,C):Jo(C,I):b||(C[C.length]=I)}return C}var hy=VM(),bM=VM(!0);function Ri(l,c){return l&&hy(l,c,cr)}function vy(l,c){return l&&bM(l,c,cr)}function tp(l,c){return Xo(c,function(h){return ho(l[h])})}function Za(l,c){c=ra(c,l);for(var h=0,b=c.length;l!=null&&h<b;)l=l[Bi(c[h++])];return h&&h==b?l:r}function wM(l,c,h){var b=c(l);return qe(l)?b:Jo(b,h(l))}function jr(l){return l==null?l===r?je:sr:Ka&&Ka in wt(l)?gFe(l):MFe(l)}function my(l,c){return l>c}function P$e(l,c){return l!=null&&yt.call(l,c)}function B$e(l,c){return l!=null&&c in wt(l)}function $$e(l,c,h){return l>=Pr(c,h)&&l<Zt(c,h)}function gy(l,c,h){for(var b=h?Qg:Pd,C=l[0].length,S=l.length,M=S,I=z(S),$=1/0,Q=[];M--;){var ee=l[M];M&&c&&(ee=_t(ee,Tn(c))),$=Pr(ee.length,$),I[M]=!h&&(c||C>=120&&ee.length>=120)?new Xa(M&&ee):r}ee=l[0];var ie=-1,me=I[0];e:for(;++ie<C&&Q.length<$;){var Ae=ee[ie],Re=c?c(Ae):Ae;if(Ae=h||Ae!==0?Ae:0,!(me?Gu(me,Re):b(Q,Re,h))){for(M=S;--M;){var Ye=I[M];if(!(Ye?Gu(Ye,Re):b(l[M],Re,h)))continue e}me&&me.push(Re),Q.push(Ae)}}return Q}function F$e(l,c,h,b){return Ri(l,function(C,S,M){c(b,h(C),S,M)}),b}function tc(l,c,h){c=ra(c,l),l=sN(l,c);var b=l==null?l:l[Bi(Yn(c))];return b==null?r:kn(b,l,h)}function EM(l){return Lt(l)&&jr(l)==De}function H$e(l){return Lt(l)&&jr(l)==Ue}function U$e(l){return Lt(l)&&jr(l)==K}function rc(l,c,h,b,C){return l===c?!0:l==null||c==null||!Lt(l)&&!Lt(c)?l!==l&&c!==c:z$e(l,c,h,b,rc,C)}function z$e(l,c,h,b,C,S){var M=qe(l),I=qe(c),$=M?pe:Br(l),Q=I?pe:Br(c);$=$==De?Ft:$,Q=Q==De?Ft:Q;var ee=$==Ft,ie=Q==Ft,me=$==Q;if(me&&ia(l)){if(!ia(c))return!1;M=!0,ee=!1}if(me&&!ee)return S||(S=new di),M||bl(l)?eN(l,c,h,b,C,S):vFe(l,c,$,h,b,C,S);if(!(h&g)){var Ae=ee&&yt.call(l,"__wrapped__"),Re=ie&&yt.call(c,"__wrapped__");if(Ae||Re){var Ye=Ae?l.value():l,Pe=Re?c.value():c;return S||(S=new di),C(Ye,Pe,h,b,S)}}return me?(S||(S=new di),mFe(l,c,h,b,C,S)):!1}function q$e(l){return Lt(l)&&Br(l)==Xe}function yy(l,c,h,b){var C=h.length,S=C,M=!b;if(l==null)return!S;for(l=wt(l);C--;){var I=h[C];if(M&&I[2]?I[1]!==l[I[0]]:!(I[0]in l))return!1}for(;++C<S;){I=h[C];var $=I[0],Q=l[$],ee=I[1];if(M&&I[2]){if(Q===r&&!($ in l))return!1}else{var ie=new di;if(b)var me=b(Q,ee,$,l,c,ie);if(!(me===r?rc(ee,Q,g|E,b,ie):me))return!1}}return!0}function xM(l){if(!Nt(l)||TFe(l))return!1;var c=ho(l)?qBe:ci;return c.test(es(l))}function V$e(l){return Lt(l)&&jr(l)==X}function W$e(l){return Lt(l)&&Br(l)==fe}function j$e(l){return Lt(l)&&yp(l.length)&&!!kt[jr(l)]}function CM(l){return typeof l=="function"?l:l==null?fn:typeof l=="object"?qe(l)?SM(l[0],l[1]):TM(l):WN(l)}function by(l){if(!oc(l))return YBe(l);var c=[];for(var h in wt(l))yt.call(l,h)&&h!="constructor"&&c.push(h);return c}function G$e(l){if(!Nt(l))return AFe(l);var c=oc(l),h=[];for(var b in l)b=="constructor"&&(c||!yt.call(l,b))||h.push(b);return h}function wy(l,c){return l<c}function kM(l,c){var h=-1,b=un(l)?z(l.length):[];return ea(l,function(C,S,M){b[++h]=c(C,S,M)}),b}function TM(l){var c=Ry(l);return c.length==1&&c[0][2]?oN(c[0][0],c[0][1]):function(h){return h===l||yy(h,l,c)}}function SM(l,c){return By(l)&&iN(c)?oN(Bi(l),c):function(h){var b=Gy(h,l);return b===r&&b===c?Ky(h,l):rc(c,b,g|E)}}function rp(l,c,h,b,C){l!==c&&hy(c,function(S,M){if(C||(C=new di),Nt(S))K$e(l,c,M,h,rp,b,C);else{var I=b?b(Fy(l,M),S,M+"",l,c,C):r;I===r&&(I=S),dy(l,M,I)}},cn)}function K$e(l,c,h,b,C,S,M){var I=Fy(l,h),$=Fy(c,h),Q=M.get($);if(Q){dy(l,h,Q);return}var ee=S?S(I,$,h+"",l,c,M):r,ie=ee===r;if(ie){var me=qe($),Ae=!me&&ia($),Re=!me&&!Ae&&bl($);ee=$,me||Ae||Re?qe(I)?ee=I:Ht(I)?ee=ln(I):Ae?(ie=!1,ee=$M($,!0)):Re?(ie=!1,ee=FM($,!0)):ee=[]:sc($)||ts($)?(ee=I,ts(I)?ee=RN(I):(!Nt(I)||ho(I))&&(ee=nN($))):ie=!1}ie&&(M.set($,ee),C(ee,$,b,S,M),M.delete($)),dy(l,h,ee)}function _M(l,c){var h=l.length;if(h)return c+=c<0?h:0,po(c,h)?l[c]:r}function OM(l,c,h){c.length?c=_t(c,function(S){return qe(S)?function(M){return Za(M,S.length===1?S[0]:S)}:S}):c=[fn];var b=-1;c=_t(c,Tn(Ie()));var C=kM(l,function(S,M,I){var $=_t(c,function(Q){return Q(S)});return{criteria:$,index:++b,value:S}});return EBe(C,function(S,M){return sFe(S,M,h)})}function Y$e(l,c){return AM(l,c,function(h,b){return Ky(l,b)})}function AM(l,c,h){for(var b=-1,C=c.length,S={};++b<C;){var M=c[b],I=Za(l,M);h(I,M)&&nc(S,ra(M,l),I)}return S}function X$e(l){return function(c){return Za(c,l)}}function Ey(l,c,h,b){var C=b?wBe:ll,S=-1,M=c.length,I=l;for(l===c&&(c=ln(c)),h&&(I=_t(l,Tn(h)));++S<M;)for(var $=0,Q=c[S],ee=h?h(Q):Q;($=C(I,ee,$,b))>-1;)I!==l&&jd.call(I,$,1),jd.call(l,$,1);return l}function MM(l,c){for(var h=l?c.length:0,b=h-1;h--;){var C=c[h];if(h==b||C!==S){var S=C;po(C)?jd.call(l,C,1):Ty(l,C)}}return l}function xy(l,c){return l+Yd(cM()*(c-l+1))}function J$e(l,c,h,b){for(var C=-1,S=Zt(Kd((c-l)/(h||1)),0),M=z(S);S--;)M[b?S:++C]=l,l+=h;return M}function Cy(l,c){var h="";if(!l||c<1||c>ue)return h;do c%2&&(h+=l),c=Yd(c/2),c&&(l+=l);while(c);return h}function Je(l,c){return Hy(aN(l,c,fn),l+"")}function Z$e(l){return pM(wl(l))}function Q$e(l,c){var h=wl(l);return dp(h,Ja(c,0,h.length))}function nc(l,c,h,b){if(!Nt(l))return l;c=ra(c,l);for(var C=-1,S=c.length,M=S-1,I=l;I!=null&&++C<S;){var $=Bi(c[C]),Q=h;if($==="__proto__"||$==="constructor"||$==="prototype")return l;if(C!=M){var ee=I[$];Q=b?b(ee,$,I):r,Q===r&&(Q=Nt(ee)?ee:po(c[C+1])?[]:{})}Qu(I,$,Q),I=I[$]}return l}var NM=Xd?function(l,c){return Xd.set(l,c),l}:fn,eFe=Gd?function(l,c){return Gd(l,"toString",{configurable:!0,enumerable:!1,value:Xy(c),writable:!0})}:fn;function tFe(l){return dp(wl(l))}function Kn(l,c,h){var b=-1,C=l.length;c<0&&(c=-c>C?0:C+c),h=h>C?C:h,h<0&&(h+=C),C=c>h?0:h-c>>>0,c>>>=0;for(var S=z(C);++b<C;)S[b]=l[b+c];return S}function rFe(l,c){var h;return ea(l,function(b,C,S){return h=c(b,C,S),!h}),!!h}function np(l,c,h){var b=0,C=l==null?b:l.length;if(typeof c=="number"&&c===c&&C<=We){for(;b<C;){var S=b+C>>>1,M=l[S];M!==null&&!_n(M)&&(h?M<=c:M<c)?b=S+1:C=S}return C}return ky(l,c,fn,h)}function ky(l,c,h,b){var C=0,S=l==null?0:l.length;if(S===0)return 0;c=h(c);for(var M=c!==c,I=c===null,$=_n(c),Q=c===r;C<S;){var ee=Yd((C+S)/2),ie=h(l[ee]),me=ie!==r,Ae=ie===null,Re=ie===ie,Ye=_n(ie);if(M)var Pe=b||Re;else Q?Pe=Re&&(b||me):I?Pe=Re&&me&&(b||!Ae):$?Pe=Re&&me&&!Ae&&(b||!Ye):Ae||Ye?Pe=!1:Pe=b?ie<=c:ie<c;Pe?C=ee+1:S=ee}return Pr(S,Te)}function LM(l,c){for(var h=-1,b=l.length,C=0,S=[];++h<b;){var M=l[h],I=c?c(M):M;if(!h||!pi(I,$)){var $=I;S[C++]=M===0?0:M}}return S}function DM(l){return typeof l=="number"?l:_n(l)?ve:+l}function Sn(l){if(typeof l=="string")return l;if(qe(l))return _t(l,Sn)+"";if(_n(l))return fM?fM.call(l):"";var c=l+"";return c=="0"&&1/l==-j?"-0":c}function ta(l,c,h){var b=-1,C=Pd,S=l.length,M=!0,I=[],$=I;if(h)M=!1,C=Qg;else if(S>=i){var Q=c?null:pFe(l);if(Q)return $d(Q);M=!1,C=Gu,$=new Xa}else $=c?[]:I;e:for(;++b<S;){var ee=l[b],ie=c?c(ee):ee;if(ee=h||ee!==0?ee:0,M&&ie===ie){for(var me=$.length;me--;)if($[me]===ie)continue e;c&&$.push(ie),I.push(ee)}else C($,ie,h)||($!==I&&$.push(ie),I.push(ee))}return I}function Ty(l,c){return c=ra(c,l),l=sN(l,c),l==null||delete l[Bi(Yn(c))]}function IM(l,c,h,b){return nc(l,c,h(Za(l,c)),b)}function ip(l,c,h,b){for(var C=l.length,S=b?C:-1;(b?S--:++S<C)&&c(l[S],S,l););return h?Kn(l,b?0:S,b?S+1:C):Kn(l,b?S+1:0,b?C:S)}function RM(l,c){var h=l;return h instanceof tt&&(h=h.value()),ey(c,function(b,C){return C.func.apply(C.thisArg,Jo([b],C.args))},h)}function Sy(l,c,h){var b=l.length;if(b<2)return b?ta(l[0]):[];for(var C=-1,S=z(b);++C<b;)for(var M=l[C],I=-1;++I<b;)I!=C&&(S[C]=ec(S[C]||M,l[I],c,h));return ta(Er(S,1),c,h)}function PM(l,c,h){for(var b=-1,C=l.length,S=c.length,M={};++b<C;){var I=b<S?c[b]:r;h(M,l[b],I)}return M}function _y(l){return Ht(l)?l:[]}function Oy(l){return typeof l=="function"?l:fn}function ra(l,c){return qe(l)?l:By(l,c)?[l]:fN(gt(l))}var nFe=Je;function na(l,c,h){var b=l.length;return h=h===r?b:h,!c&&h>=b?l:Kn(l,c,h)}var BM=VBe||function(l){return wr.clearTimeout(l)};function $M(l,c){if(c)return l.slice();var h=l.length,b=oM?oM(h):new l.constructor(h);return l.copy(b),b}function Ay(l){var c=new l.constructor(l.byteLength);return new Vd(c).set(new Vd(l)),c}function iFe(l,c){var h=c?Ay(l.buffer):l.buffer;return new l.constructor(h,l.byteOffset,l.byteLength)}function oFe(l){var c=new l.constructor(l.source,Xt.exec(l));return c.lastIndex=l.lastIndex,c}function aFe(l){return Zu?wt(Zu.call(l)):{}}function FM(l,c){var h=c?Ay(l.buffer):l.buffer;return new l.constructor(h,l.byteOffset,l.length)}function HM(l,c){if(l!==c){var h=l!==r,b=l===null,C=l===l,S=_n(l),M=c!==r,I=c===null,$=c===c,Q=_n(c);if(!I&&!Q&&!S&&l>c||S&&M&&$&&!I&&!Q||b&&M&&$||!h&&$||!C)return 1;if(!b&&!S&&!Q&&l<c||Q&&h&&C&&!b&&!S||I&&h&&C||!M&&C||!$)return-1}return 0}function sFe(l,c,h){for(var b=-1,C=l.criteria,S=c.criteria,M=C.length,I=h.length;++b<M;){var $=HM(C[b],S[b]);if($){if(b>=I)return $;var Q=h[b];return $*(Q=="desc"?-1:1)}}return l.index-c.index}function UM(l,c,h,b){for(var C=-1,S=l.length,M=h.length,I=-1,$=c.length,Q=Zt(S-M,0),ee=z($+Q),ie=!b;++I<$;)ee[I]=c[I];for(;++C<M;)(ie||C<S)&&(ee[h[C]]=l[C]);for(;Q--;)ee[I++]=l[C++];return ee}function zM(l,c,h,b){for(var C=-1,S=l.length,M=-1,I=h.length,$=-1,Q=c.length,ee=Zt(S-I,0),ie=z(ee+Q),me=!b;++C<ee;)ie[C]=l[C];for(var Ae=C;++$<Q;)ie[Ae+$]=c[$];for(;++M<I;)(me||C<S)&&(ie[Ae+h[M]]=l[C++]);return ie}function ln(l,c){var h=-1,b=l.length;for(c||(c=z(b));++h<b;)c[h]=l[h];return c}function Pi(l,c,h,b){var C=!h;h||(h={});for(var S=-1,M=c.length;++S<M;){var I=c[S],$=b?b(h[I],l[I],I,h,l):r;$===r&&($=l[I]),C?uo(h,I,$):Qu(h,I,$)}return h}function lFe(l,c){return Pi(l,Py(l),c)}function uFe(l,c){return Pi(l,tN(l),c)}function op(l,c){return function(h,b){var C=qe(h)?hBe:N$e,S=c?c():{};return C(h,l,Ie(b,2),S)}}function ml(l){return Je(function(c,h){var b=-1,C=h.length,S=C>1?h[C-1]:r,M=C>2?h[2]:r;for(S=l.length>3&&typeof S=="function"?(C--,S):r,M&&Gr(h[0],h[1],M)&&(S=C<3?r:S,C=1),c=wt(c);++b<C;){var I=h[b];I&&l(c,I,b,S)}return c})}function qM(l,c){return function(h,b){if(h==null)return h;if(!un(h))return l(h,b);for(var C=h.length,S=c?C:-1,M=wt(h);(c?S--:++S<C)&&b(M[S],S,M)!==!1;);return h}}function VM(l){return function(c,h,b){for(var C=-1,S=wt(c),M=b(c),I=M.length;I--;){var $=M[l?I:++C];if(h(S[$],$,S)===!1)break}return c}}function cFe(l,c,h){var b=c&w,C=ic(l);function S(){var M=this&&this!==wr&&this instanceof S?C:l;return M.apply(b?h:this,arguments)}return S}function WM(l){return function(c){c=gt(c);var h=ul(c)?fi(c):r,b=h?h[0]:c.charAt(0),C=h?na(h,1).join(""):c.slice(1);return b[l]()+C}}function gl(l){return function(c){return ey(qN(zN(c).replace(eBe,"")),l,"")}}function ic(l){return function(){var c=arguments;switch(c.length){case 0:return new l;case 1:return new l(c[0]);case 2:return new l(c[0],c[1]);case 3:return new l(c[0],c[1],c[2]);case 4:return new l(c[0],c[1],c[2],c[3]);case 5:return new l(c[0],c[1],c[2],c[3],c[4]);case 6:return new l(c[0],c[1],c[2],c[3],c[4],c[5]);case 7:return new l(c[0],c[1],c[2],c[3],c[4],c[5],c[6])}var h=vl(l.prototype),b=l.apply(h,c);return Nt(b)?b:h}}function fFe(l,c,h){var b=ic(l);function C(){for(var S=arguments.length,M=z(S),I=S,$=yl(C);I--;)M[I]=arguments[I];var Q=S<3&&M[0]!==$&&M[S-1]!==$?[]:Zo(M,$);if(S-=Q.length,S<h)return XM(l,c,ap,C.placeholder,r,M,Q,r,r,h-S);var ee=this&&this!==wr&&this instanceof C?b:l;return kn(ee,this,M)}return C}function jM(l){return function(c,h,b){var C=wt(c);if(!un(c)){var S=Ie(h,3);c=cr(c),h=function(I){return S(C[I],I,C)}}var M=l(c,h,b);return M>-1?C[S?c[M]:M]:r}}function GM(l){return fo(function(c){var h=c.length,b=h,C=jn.prototype.thru;for(l&&c.reverse();b--;){var S=c[b];if(typeof S!="function")throw new Wn(a);if(C&&!M&&cp(S)=="wrapper")var M=new jn([],!0)}for(b=M?b:h;++b<h;){S=c[b];var I=cp(S),$=I=="wrapper"?Iy(S):r;$&&$y($[0])&&$[1]==(A|_|N|P)&&!$[4].length&&$[9]==1?M=M[cp($[0])].apply(M,$[3]):M=S.length==1&&$y(S)?M[I]():M.thru(S)}return function(){var Q=arguments,ee=Q[0];if(M&&Q.length==1&&qe(ee))return M.plant(ee).value();for(var ie=0,me=h?c[ie].apply(this,Q):ee;++ie<h;)me=c[ie].call(this,me);return me}})}function ap(l,c,h,b,C,S,M,I,$,Q){var ee=c&A,ie=c&w,me=c&x,Ae=c&(_|O),Re=c&U,Ye=me?r:ic(l);function Pe(){for(var Qe=arguments.length,nt=z(Qe),On=Qe;On--;)nt[On]=arguments[On];if(Ae)var Kr=yl(Pe),An=CBe(nt,Kr);if(b&&(nt=UM(nt,b,C,Ae)),S&&(nt=zM(nt,S,M,Ae)),Qe-=An,Ae&&Qe<Q){var Ut=Zo(nt,Kr);return XM(l,c,ap,Pe.placeholder,h,nt,Ut,I,$,Q-Qe)}var hi=ie?h:this,mo=me?hi[l]:l;return Qe=nt.length,I?nt=NFe(nt,I):Re&&Qe>1&&nt.reverse(),ee&&$<Qe&&(nt.length=$),this&&this!==wr&&this instanceof Pe&&(mo=Ye||ic(mo)),mo.apply(hi,nt)}return Pe}function KM(l,c){return function(h,b){return F$e(h,l,c(b),{})}}function sp(l,c){return function(h,b){var C;if(h===r&&b===r)return c;if(h!==r&&(C=h),b!==r){if(C===r)return b;typeof h=="string"||typeof b=="string"?(h=Sn(h),b=Sn(b)):(h=DM(h),b=DM(b)),C=l(h,b)}return C}}function My(l){return fo(function(c){return c=_t(c,Tn(Ie())),Je(function(h){var b=this;return l(c,function(C){return kn(C,b,h)})})})}function lp(l,c){c=c===r?" ":Sn(c);var h=c.length;if(h<2)return h?Cy(c,l):c;var b=Cy(c,Kd(l/cl(c)));return ul(c)?na(fi(b),0,l).join(""):b.slice(0,l)}function dFe(l,c,h,b){var C=c&w,S=ic(l);function M(){for(var I=-1,$=arguments.length,Q=-1,ee=b.length,ie=z(ee+$),me=this&&this!==wr&&this instanceof M?S:l;++Q<ee;)ie[Q]=b[Q];for(;$--;)ie[Q++]=arguments[++I];return kn(me,C?h:this,ie)}return M}function YM(l){return function(c,h,b){return b&&typeof b!="number"&&Gr(c,h,b)&&(h=b=r),c=vo(c),h===r?(h=c,c=0):h=vo(h),b=b===r?c<h?1:-1:vo(b),J$e(c,h,b,l)}}function up(l){return function(c,h){return typeof c=="string"&&typeof h=="string"||(c=Xn(c),h=Xn(h)),l(c,h)}}function XM(l,c,h,b,C,S,M,I,$,Q){var ee=c&_,ie=ee?M:r,me=ee?r:M,Ae=ee?S:r,Re=ee?r:S;c|=ee?N:L,c&=~(ee?L:N),c&k||(c&=-4);var Ye=[l,c,C,Ae,ie,Re,me,I,$,Q],Pe=h.apply(r,Ye);return $y(l)&&lN(Pe,Ye),Pe.placeholder=b,uN(Pe,l,c)}function Ny(l){var c=Jt[l];return function(h,b){if(h=Xn(h),b=b==null?0:Pr(Ge(b),292),b&&uM(h)){var C=(gt(h)+"e").split("e"),S=c(C[0]+"e"+(+C[1]+b));return C=(gt(S)+"e").split("e"),+(C[0]+"e"+(+C[1]-b))}return c(h)}}var pFe=pl&&1/$d(new pl([,-0]))[1]==j?function(l){return new pl(l)}:Qy;function JM(l){return function(c){var h=Br(c);return h==Xe?sy(c):h==fe?MBe(c):xBe(c,l(c))}}function co(l,c,h,b,C,S,M,I){var $=c&x;if(!$&&typeof l!="function")throw new Wn(a);var Q=b?b.length:0;if(Q||(c&=-97,b=C=r),M=M===r?M:Zt(Ge(M),0),I=I===r?I:Ge(I),Q-=C?C.length:0,c&L){var ee=b,ie=C;b=C=r}var me=$?r:Iy(l),Ae=[l,c,h,b,C,ee,ie,S,M,I];if(me&&OFe(Ae,me),l=Ae[0],c=Ae[1],h=Ae[2],b=Ae[3],C=Ae[4],I=Ae[9]=Ae[9]===r?$?0:l.length:Zt(Ae[9]-Q,0),!I&&c&(_|O)&&(c&=-25),!c||c==w)var Re=cFe(l,c,h);else c==_||c==O?Re=fFe(l,c,I):(c==N||c==(w|N))&&!C.length?Re=dFe(l,c,h,b):Re=ap.apply(r,Ae);var Ye=me?NM:lN;return uN(Ye(Re,Ae),l,c)}function ZM(l,c,h,b){return l===r||pi(l,dl[h])&&!yt.call(b,h)?c:l}function QM(l,c,h,b,C,S){return Nt(l)&&Nt(c)&&(S.set(c,l),rp(l,c,r,QM,S),S.delete(c)),l}function hFe(l){return sc(l)?r:l}function eN(l,c,h,b,C,S){var M=h&g,I=l.length,$=c.length;if(I!=$&&!(M&&$>I))return!1;var Q=S.get(l),ee=S.get(c);if(Q&&ee)return Q==c&&ee==l;var ie=-1,me=!0,Ae=h&E?new Xa:r;for(S.set(l,c),S.set(c,l);++ie<I;){var Re=l[ie],Ye=c[ie];if(b)var Pe=M?b(Ye,Re,ie,c,l,S):b(Re,Ye,ie,l,c,S);if(Pe!==r){if(Pe)continue;me=!1;break}if(Ae){if(!ty(c,function(Qe,nt){if(!Gu(Ae,nt)&&(Re===Qe||C(Re,Qe,h,b,S)))return Ae.push(nt)})){me=!1;break}}else if(!(Re===Ye||C(Re,Ye,h,b,S))){me=!1;break}}return S.delete(l),S.delete(c),me}function vFe(l,c,h,b,C,S,M){switch(h){case at:if(l.byteLength!=c.byteLength||l.byteOffset!=c.byteOffset)return!1;l=l.buffer,c=c.buffer;case Ue:return!(l.byteLength!=c.byteLength||!S(new Vd(l),new Vd(c)));case G:case K:case ot:return pi(+l,+c);case ne:return l.name==c.name&&l.message==c.message;case X:case Ke:return l==c+"";case Xe:var I=sy;case fe:var $=b&g;if(I||(I=$d),l.size!=c.size&&!$)return!1;var Q=M.get(l);if(Q)return Q==c;b|=E,M.set(l,c);var ee=eN(I(l),I(c),b,C,S,M);return M.delete(l),ee;case et:if(Zu)return Zu.call(l)==Zu.call(c)}return!1}function mFe(l,c,h,b,C,S){var M=h&g,I=Ly(l),$=I.length,Q=Ly(c),ee=Q.length;if($!=ee&&!M)return!1;for(var ie=$;ie--;){var me=I[ie];if(!(M?me in c:yt.call(c,me)))return!1}var Ae=S.get(l),Re=S.get(c);if(Ae&&Re)return Ae==c&&Re==l;var Ye=!0;S.set(l,c),S.set(c,l);for(var Pe=M;++ie<$;){me=I[ie];var Qe=l[me],nt=c[me];if(b)var On=M?b(nt,Qe,me,c,l,S):b(Qe,nt,me,l,c,S);if(!(On===r?Qe===nt||C(Qe,nt,h,b,S):On)){Ye=!1;break}Pe||(Pe=me=="constructor")}if(Ye&&!Pe){var Kr=l.constructor,An=c.constructor;Kr!=An&&"constructor"in l&&"constructor"in c&&!(typeof Kr=="function"&&Kr instanceof Kr&&typeof An=="function"&&An instanceof An)&&(Ye=!1)}return S.delete(l),S.delete(c),Ye}function fo(l){return Hy(aN(l,r,vN),l+"")}function Ly(l){return wM(l,cr,Py)}function Dy(l){return wM(l,cn,tN)}var Iy=Xd?function(l){return Xd.get(l)}:Qy;function cp(l){for(var c=l.name+"",h=hl[c],b=yt.call(hl,c)?h.length:0;b--;){var C=h[b],S=C.func;if(S==null||S==l)return C.name}return c}function yl(l){var c=yt.call(T,"placeholder")?T:l;return c.placeholder}function Ie(){var l=T.iteratee||Jy;return l=l===Jy?CM:l,arguments.length?l(arguments[0],arguments[1]):l}function fp(l,c){var h=l.__data__;return kFe(c)?h[typeof c=="string"?"string":"hash"]:h.map}function Ry(l){for(var c=cr(l),h=c.length;h--;){var b=c[h],C=l[b];c[h]=[b,C,iN(C)]}return c}function Qa(l,c){var h=_Be(l,c);return xM(h)?h:r}function gFe(l){var c=yt.call(l,Ka),h=l[Ka];try{l[Ka]=r;var b=!0}catch{}var C=zd.call(l);return b&&(c?l[Ka]=h:delete l[Ka]),C}var Py=uy?function(l){return l==null?[]:(l=wt(l),Xo(uy(l),function(c){return sM.call(l,c)}))}:e0,tN=uy?function(l){for(var c=[];l;)Jo(c,Py(l)),l=Wd(l);return c}:e0,Br=jr;(cy&&Br(new cy(new ArrayBuffer(1)))!=at||Yu&&Br(new Yu)!=Xe||fy&&Br(fy.resolve())!=D||pl&&Br(new pl)!=fe||Xu&&Br(new Xu)!=V)&&(Br=function(l){var c=jr(l),h=c==Ft?l.constructor:r,b=h?es(h):"";if(b)switch(b){case QBe:return at;case e$e:return Xe;case t$e:return D;case r$e:return fe;case n$e:return V}return c});function yFe(l,c,h){for(var b=-1,C=h.length;++b<C;){var S=h[b],M=S.size;switch(S.type){case"drop":l+=M;break;case"dropRight":c-=M;break;case"take":c=Pr(c,l+M);break;case"takeRight":l=Zt(l,c-M);break}}return{start:l,end:c}}function bFe(l){var c=l.match(Vg);return c?c[1].split(Le):[]}function rN(l,c,h){c=ra(c,l);for(var b=-1,C=c.length,S=!1;++b<C;){var M=Bi(c[b]);if(!(S=l!=null&&h(l,M)))break;l=l[M]}return S||++b!=C?S:(C=l==null?0:l.length,!!C&&yp(C)&&po(M,C)&&(qe(l)||ts(l)))}function wFe(l){var c=l.length,h=new l.constructor(c);return c&&typeof l[0]=="string"&&yt.call(l,"index")&&(h.index=l.index,h.input=l.input),h}function nN(l){return typeof l.constructor=="function"&&!oc(l)?vl(Wd(l)):{}}function EFe(l,c,h){var b=l.constructor;switch(c){case Ue:return Ay(l);case G:case K:return new b(+l);case at:return iFe(l,h);case Wr:case zn:case Yt:case Rr:case oo:case Cn:case Fu:case Hu:case Ii:return FM(l,h);case Xe:return new b;case ot:case Ke:return new b(l);case X:return oFe(l);case fe:return new b;case et:return aFe(l)}}function xFe(l,c){var h=c.length;if(!h)return l;var b=h-1;return c[b]=(h>1?"& ":"")+c[b],c=c.join(h>2?", ":" "),l.replace(Ld,`{
|
|
9
|
+
/* [wrapped with `+c+`] */
|
|
10
|
+
`)}function CFe(l){return qe(l)||ts(l)||!!(lM&&l&&l[lM])}function po(l,c){var h=typeof l;return c=c??ue,!!c&&(h=="number"||h!="symbol"&&Dd.test(l))&&l>-1&&l%1==0&&l<c}function Gr(l,c,h){if(!Nt(h))return!1;var b=typeof c;return(b=="number"?un(h)&&po(c,h.length):b=="string"&&c in h)?pi(h[c],l):!1}function By(l,c){if(qe(l))return!1;var h=typeof l;return h=="number"||h=="symbol"||h=="boolean"||l==null||_n(l)?!0:Md.test(l)||!Ad.test(l)||c!=null&&l in wt(c)}function kFe(l){var c=typeof l;return c=="string"||c=="number"||c=="symbol"||c=="boolean"?l!=="__proto__":l===null}function $y(l){var c=cp(l),h=T[c];if(typeof h!="function"||!(c in tt.prototype))return!1;if(l===h)return!0;var b=Iy(h);return!!b&&l===b[0]}function TFe(l){return!!iM&&iM in l}var SFe=Hd?ho:t0;function oc(l){var c=l&&l.constructor,h=typeof c=="function"&&c.prototype||dl;return l===h}function iN(l){return l===l&&!Nt(l)}function oN(l,c){return function(h){return h==null?!1:h[l]===c&&(c!==r||l in wt(h))}}function _Fe(l){var c=mp(l,function(b){return h.size===f&&h.clear(),b}),h=c.cache;return c}function OFe(l,c){var h=l[1],b=c[1],C=h|b,S=C<(w|x|A),M=b==A&&h==_||b==A&&h==P&&l[7].length<=c[8]||b==(A|P)&&c[7].length<=c[8]&&h==_;if(!(S||M))return l;b&w&&(l[2]=c[2],C|=h&w?0:k);var I=c[3];if(I){var $=l[3];l[3]=$?UM($,I,c[4]):I,l[4]=$?Zo(l[3],d):c[4]}return I=c[5],I&&($=l[5],l[5]=$?zM($,I,c[6]):I,l[6]=$?Zo(l[5],d):c[6]),I=c[7],I&&(l[7]=I),b&A&&(l[8]=l[8]==null?c[8]:Pr(l[8],c[8])),l[9]==null&&(l[9]=c[9]),l[0]=c[0],l[1]=C,l}function AFe(l){var c=[];if(l!=null)for(var h in wt(l))c.push(h);return c}function MFe(l){return zd.call(l)}function aN(l,c,h){return c=Zt(c===r?l.length-1:c,0),function(){for(var b=arguments,C=-1,S=Zt(b.length-c,0),M=z(S);++C<S;)M[C]=b[c+C];C=-1;for(var I=z(c+1);++C<c;)I[C]=b[C];return I[c]=h(M),kn(l,this,I)}}function sN(l,c){return c.length<2?l:Za(l,Kn(c,0,-1))}function NFe(l,c){for(var h=l.length,b=Pr(c.length,h),C=ln(l);b--;){var S=c[b];l[b]=po(S,h)?C[S]:r}return l}function Fy(l,c){if(!(c==="constructor"&&typeof l[c]=="function")&&c!="__proto__")return l[c]}var lN=cN(NM),ac=jBe||function(l,c){return wr.setTimeout(l,c)},Hy=cN(eFe);function uN(l,c,h){var b=c+"";return Hy(l,xFe(b,LFe(bFe(b),h)))}function cN(l){var c=0,h=0;return function(){var b=XBe(),C=Fe-(b-h);if(h=b,C>0){if(++c>=Se)return arguments[0]}else c=0;return l.apply(r,arguments)}}function dp(l,c){var h=-1,b=l.length,C=b-1;for(c=c===r?b:c;++h<c;){var S=xy(h,C),M=l[S];l[S]=l[h],l[h]=M}return l.length=c,l}var fN=_Fe(function(l){var c=[];return l.charCodeAt(0)===46&&c.push(""),l.replace(qg,function(h,b,C,S){c.push(C?S.replace(Oe,"$1"):b||h)}),c});function Bi(l){if(typeof l=="string"||_n(l))return l;var c=l+"";return c=="0"&&1/l==-j?"-0":c}function es(l){if(l!=null){try{return Ud.call(l)}catch{}try{return l+""}catch{}}return""}function LFe(l,c){return Vn(we,function(h){var b="_."+h[0];c&h[1]&&!Pd(l,b)&&l.push(b)}),l.sort()}function dN(l){if(l instanceof tt)return l.clone();var c=new jn(l.__wrapped__,l.__chain__);return c.__actions__=ln(l.__actions__),c.__index__=l.__index__,c.__values__=l.__values__,c}function DFe(l,c,h){(h?Gr(l,c,h):c===r)?c=1:c=Zt(Ge(c),0);var b=l==null?0:l.length;if(!b||c<1)return[];for(var C=0,S=0,M=z(Kd(b/c));C<b;)M[S++]=Kn(l,C,C+=c);return M}function IFe(l){for(var c=-1,h=l==null?0:l.length,b=0,C=[];++c<h;){var S=l[c];S&&(C[b++]=S)}return C}function RFe(){var l=arguments.length;if(!l)return[];for(var c=z(l-1),h=arguments[0],b=l;b--;)c[b-1]=arguments[b];return Jo(qe(h)?ln(h):[h],Er(c,1))}var PFe=Je(function(l,c){return Ht(l)?ec(l,Er(c,1,Ht,!0)):[]}),BFe=Je(function(l,c){var h=Yn(c);return Ht(h)&&(h=r),Ht(l)?ec(l,Er(c,1,Ht,!0),Ie(h,2)):[]}),$Fe=Je(function(l,c){var h=Yn(c);return Ht(h)&&(h=r),Ht(l)?ec(l,Er(c,1,Ht,!0),r,h):[]});function FFe(l,c,h){var b=l==null?0:l.length;return b?(c=h||c===r?1:Ge(c),Kn(l,c<0?0:c,b)):[]}function HFe(l,c,h){var b=l==null?0:l.length;return b?(c=h||c===r?1:Ge(c),c=b-c,Kn(l,0,c<0?0:c)):[]}function UFe(l,c){return l&&l.length?ip(l,Ie(c,3),!0,!0):[]}function zFe(l,c){return l&&l.length?ip(l,Ie(c,3),!0):[]}function qFe(l,c,h,b){var C=l==null?0:l.length;return C?(h&&typeof h!="number"&&Gr(l,c,h)&&(h=0,b=C),R$e(l,c,h,b)):[]}function pN(l,c,h){var b=l==null?0:l.length;if(!b)return-1;var C=h==null?0:Ge(h);return C<0&&(C=Zt(b+C,0)),Bd(l,Ie(c,3),C)}function hN(l,c,h){var b=l==null?0:l.length;if(!b)return-1;var C=b-1;return h!==r&&(C=Ge(h),C=h<0?Zt(b+C,0):Pr(C,b-1)),Bd(l,Ie(c,3),C,!0)}function vN(l){var c=l==null?0:l.length;return c?Er(l,1):[]}function VFe(l){var c=l==null?0:l.length;return c?Er(l,j):[]}function WFe(l,c){var h=l==null?0:l.length;return h?(c=c===r?1:Ge(c),Er(l,c)):[]}function jFe(l){for(var c=-1,h=l==null?0:l.length,b={};++c<h;){var C=l[c];b[C[0]]=C[1]}return b}function mN(l){return l&&l.length?l[0]:r}function GFe(l,c,h){var b=l==null?0:l.length;if(!b)return-1;var C=h==null?0:Ge(h);return C<0&&(C=Zt(b+C,0)),ll(l,c,C)}function KFe(l){var c=l==null?0:l.length;return c?Kn(l,0,-1):[]}var YFe=Je(function(l){var c=_t(l,_y);return c.length&&c[0]===l[0]?gy(c):[]}),XFe=Je(function(l){var c=Yn(l),h=_t(l,_y);return c===Yn(h)?c=r:h.pop(),h.length&&h[0]===l[0]?gy(h,Ie(c,2)):[]}),JFe=Je(function(l){var c=Yn(l),h=_t(l,_y);return c=typeof c=="function"?c:r,c&&h.pop(),h.length&&h[0]===l[0]?gy(h,r,c):[]});function ZFe(l,c){return l==null?"":KBe.call(l,c)}function Yn(l){var c=l==null?0:l.length;return c?l[c-1]:r}function QFe(l,c,h){var b=l==null?0:l.length;if(!b)return-1;var C=b;return h!==r&&(C=Ge(h),C=C<0?Zt(b+C,0):Pr(C,b-1)),c===c?LBe(l,c,C):Bd(l,XA,C,!0)}function e3e(l,c){return l&&l.length?_M(l,Ge(c)):r}var t3e=Je(gN);function gN(l,c){return l&&l.length&&c&&c.length?Ey(l,c):l}function r3e(l,c,h){return l&&l.length&&c&&c.length?Ey(l,c,Ie(h,2)):l}function n3e(l,c,h){return l&&l.length&&c&&c.length?Ey(l,c,r,h):l}var i3e=fo(function(l,c){var h=l==null?0:l.length,b=py(l,c);return MM(l,_t(c,function(C){return po(C,h)?+C:C}).sort(HM)),b});function o3e(l,c){var h=[];if(!(l&&l.length))return h;var b=-1,C=[],S=l.length;for(c=Ie(c,3);++b<S;){var M=l[b];c(M,b,l)&&(h.push(M),C.push(b))}return MM(l,C),h}function Uy(l){return l==null?l:ZBe.call(l)}function a3e(l,c,h){var b=l==null?0:l.length;return b?(h&&typeof h!="number"&&Gr(l,c,h)?(c=0,h=b):(c=c==null?0:Ge(c),h=h===r?b:Ge(h)),Kn(l,c,h)):[]}function s3e(l,c){return np(l,c)}function l3e(l,c,h){return ky(l,c,Ie(h,2))}function u3e(l,c){var h=l==null?0:l.length;if(h){var b=np(l,c);if(b<h&&pi(l[b],c))return b}return-1}function c3e(l,c){return np(l,c,!0)}function f3e(l,c,h){return ky(l,c,Ie(h,2),!0)}function d3e(l,c){var h=l==null?0:l.length;if(h){var b=np(l,c,!0)-1;if(pi(l[b],c))return b}return-1}function p3e(l){return l&&l.length?LM(l):[]}function h3e(l,c){return l&&l.length?LM(l,Ie(c,2)):[]}function v3e(l){var c=l==null?0:l.length;return c?Kn(l,1,c):[]}function m3e(l,c,h){return l&&l.length?(c=h||c===r?1:Ge(c),Kn(l,0,c<0?0:c)):[]}function g3e(l,c,h){var b=l==null?0:l.length;return b?(c=h||c===r?1:Ge(c),c=b-c,Kn(l,c<0?0:c,b)):[]}function y3e(l,c){return l&&l.length?ip(l,Ie(c,3),!1,!0):[]}function b3e(l,c){return l&&l.length?ip(l,Ie(c,3)):[]}var w3e=Je(function(l){return ta(Er(l,1,Ht,!0))}),E3e=Je(function(l){var c=Yn(l);return Ht(c)&&(c=r),ta(Er(l,1,Ht,!0),Ie(c,2))}),x3e=Je(function(l){var c=Yn(l);return c=typeof c=="function"?c:r,ta(Er(l,1,Ht,!0),r,c)});function C3e(l){return l&&l.length?ta(l):[]}function k3e(l,c){return l&&l.length?ta(l,Ie(c,2)):[]}function T3e(l,c){return c=typeof c=="function"?c:r,l&&l.length?ta(l,r,c):[]}function zy(l){if(!(l&&l.length))return[];var c=0;return l=Xo(l,function(h){if(Ht(h))return c=Zt(h.length,c),!0}),oy(c,function(h){return _t(l,ry(h))})}function yN(l,c){if(!(l&&l.length))return[];var h=zy(l);return c==null?h:_t(h,function(b){return kn(c,r,b)})}var S3e=Je(function(l,c){return Ht(l)?ec(l,c):[]}),_3e=Je(function(l){return Sy(Xo(l,Ht))}),O3e=Je(function(l){var c=Yn(l);return Ht(c)&&(c=r),Sy(Xo(l,Ht),Ie(c,2))}),A3e=Je(function(l){var c=Yn(l);return c=typeof c=="function"?c:r,Sy(Xo(l,Ht),r,c)}),M3e=Je(zy);function N3e(l,c){return PM(l||[],c||[],Qu)}function L3e(l,c){return PM(l||[],c||[],nc)}var D3e=Je(function(l){var c=l.length,h=c>1?l[c-1]:r;return h=typeof h=="function"?(l.pop(),h):r,yN(l,h)});function bN(l){var c=T(l);return c.__chain__=!0,c}function I3e(l,c){return c(l),l}function pp(l,c){return c(l)}var R3e=fo(function(l){var c=l.length,h=c?l[0]:0,b=this.__wrapped__,C=function(S){return py(S,l)};return c>1||this.__actions__.length||!(b instanceof tt)||!po(h)?this.thru(C):(b=b.slice(h,+h+(c?1:0)),b.__actions__.push({func:pp,args:[C],thisArg:r}),new jn(b,this.__chain__).thru(function(S){return c&&!S.length&&S.push(r),S}))});function P3e(){return bN(this)}function B3e(){return new jn(this.value(),this.__chain__)}function $3e(){this.__values__===r&&(this.__values__=DN(this.value()));var l=this.__index__>=this.__values__.length,c=l?r:this.__values__[this.__index__++];return{done:l,value:c}}function F3e(){return this}function H3e(l){for(var c,h=this;h instanceof Zd;){var b=dN(h);b.__index__=0,b.__values__=r,c?C.__wrapped__=b:c=b;var C=b;h=h.__wrapped__}return C.__wrapped__=l,c}function U3e(){var l=this.__wrapped__;if(l instanceof tt){var c=l;return this.__actions__.length&&(c=new tt(this)),c=c.reverse(),c.__actions__.push({func:pp,args:[Uy],thisArg:r}),new jn(c,this.__chain__)}return this.thru(Uy)}function z3e(){return RM(this.__wrapped__,this.__actions__)}var q3e=op(function(l,c,h){yt.call(l,h)?++l[h]:uo(l,h,1)});function V3e(l,c,h){var b=qe(l)?KA:I$e;return h&&Gr(l,c,h)&&(c=r),b(l,Ie(c,3))}function W3e(l,c){var h=qe(l)?Xo:yM;return h(l,Ie(c,3))}var j3e=jM(pN),G3e=jM(hN);function K3e(l,c){return Er(hp(l,c),1)}function Y3e(l,c){return Er(hp(l,c),j)}function X3e(l,c,h){return h=h===r?1:Ge(h),Er(hp(l,c),h)}function wN(l,c){var h=qe(l)?Vn:ea;return h(l,Ie(c,3))}function EN(l,c){var h=qe(l)?vBe:gM;return h(l,Ie(c,3))}var J3e=op(function(l,c,h){yt.call(l,h)?l[h].push(c):uo(l,h,[c])});function Z3e(l,c,h,b){l=un(l)?l:wl(l),h=h&&!b?Ge(h):0;var C=l.length;return h<0&&(h=Zt(C+h,0)),bp(l)?h<=C&&l.indexOf(c,h)>-1:!!C&&ll(l,c,h)>-1}var Q3e=Je(function(l,c,h){var b=-1,C=typeof c=="function",S=un(l)?z(l.length):[];return ea(l,function(M){S[++b]=C?kn(c,M,h):tc(M,c,h)}),S}),eHe=op(function(l,c,h){uo(l,h,c)});function hp(l,c){var h=qe(l)?_t:kM;return h(l,Ie(c,3))}function tHe(l,c,h,b){return l==null?[]:(qe(c)||(c=c==null?[]:[c]),h=b?r:h,qe(h)||(h=h==null?[]:[h]),OM(l,c,h))}var rHe=op(function(l,c,h){l[h?0:1].push(c)},function(){return[[],[]]});function nHe(l,c,h){var b=qe(l)?ey:ZA,C=arguments.length<3;return b(l,Ie(c,4),h,C,ea)}function iHe(l,c,h){var b=qe(l)?mBe:ZA,C=arguments.length<3;return b(l,Ie(c,4),h,C,gM)}function oHe(l,c){var h=qe(l)?Xo:yM;return h(l,gp(Ie(c,3)))}function aHe(l){var c=qe(l)?pM:Z$e;return c(l)}function sHe(l,c,h){(h?Gr(l,c,h):c===r)?c=1:c=Ge(c);var b=qe(l)?A$e:Q$e;return b(l,c)}function lHe(l){var c=qe(l)?M$e:tFe;return c(l)}function uHe(l){if(l==null)return 0;if(un(l))return bp(l)?cl(l):l.length;var c=Br(l);return c==Xe||c==fe?l.size:by(l).length}function cHe(l,c,h){var b=qe(l)?ty:rFe;return h&&Gr(l,c,h)&&(c=r),b(l,Ie(c,3))}var fHe=Je(function(l,c){if(l==null)return[];var h=c.length;return h>1&&Gr(l,c[0],c[1])?c=[]:h>2&&Gr(c[0],c[1],c[2])&&(c=[c[0]]),OM(l,Er(c,1),[])}),vp=WBe||function(){return wr.Date.now()};function dHe(l,c){if(typeof c!="function")throw new Wn(a);return l=Ge(l),function(){if(--l<1)return c.apply(this,arguments)}}function xN(l,c,h){return c=h?r:c,c=l&&c==null?l.length:c,co(l,A,r,r,r,r,c)}function CN(l,c){var h;if(typeof c!="function")throw new Wn(a);return l=Ge(l),function(){return--l>0&&(h=c.apply(this,arguments)),l<=1&&(c=r),h}}var qy=Je(function(l,c,h){var b=w;if(h.length){var C=Zo(h,yl(qy));b|=N}return co(l,b,c,h,C)}),kN=Je(function(l,c,h){var b=w|x;if(h.length){var C=Zo(h,yl(kN));b|=N}return co(c,b,l,h,C)});function TN(l,c,h){c=h?r:c;var b=co(l,_,r,r,r,r,r,c);return b.placeholder=TN.placeholder,b}function SN(l,c,h){c=h?r:c;var b=co(l,O,r,r,r,r,r,c);return b.placeholder=SN.placeholder,b}function _N(l,c,h){var b,C,S,M,I,$,Q=0,ee=!1,ie=!1,me=!0;if(typeof l!="function")throw new Wn(a);c=Xn(c)||0,Nt(h)&&(ee=!!h.leading,ie="maxWait"in h,S=ie?Zt(Xn(h.maxWait)||0,c):S,me="trailing"in h?!!h.trailing:me);function Ae(Ut){var hi=b,mo=C;return b=C=r,Q=Ut,M=l.apply(mo,hi),M}function Re(Ut){return Q=Ut,I=ac(Qe,c),ee?Ae(Ut):M}function Ye(Ut){var hi=Ut-$,mo=Ut-Q,jN=c-hi;return ie?Pr(jN,S-mo):jN}function Pe(Ut){var hi=Ut-$,mo=Ut-Q;return $===r||hi>=c||hi<0||ie&&mo>=S}function Qe(){var Ut=vp();if(Pe(Ut))return nt(Ut);I=ac(Qe,Ye(Ut))}function nt(Ut){return I=r,me&&b?Ae(Ut):(b=C=r,M)}function On(){I!==r&&BM(I),Q=0,b=$=C=I=r}function Kr(){return I===r?M:nt(vp())}function An(){var Ut=vp(),hi=Pe(Ut);if(b=arguments,C=this,$=Ut,hi){if(I===r)return Re($);if(ie)return BM(I),I=ac(Qe,c),Ae($)}return I===r&&(I=ac(Qe,c)),M}return An.cancel=On,An.flush=Kr,An}var pHe=Je(function(l,c){return mM(l,1,c)}),hHe=Je(function(l,c,h){return mM(l,Xn(c)||0,h)});function vHe(l){return co(l,U)}function mp(l,c){if(typeof l!="function"||c!=null&&typeof c!="function")throw new Wn(a);var h=function(){var b=arguments,C=c?c.apply(this,b):b[0],S=h.cache;if(S.has(C))return S.get(C);var M=l.apply(this,b);return h.cache=S.set(C,M)||S,M};return h.cache=new(mp.Cache||lo),h}mp.Cache=lo;function gp(l){if(typeof l!="function")throw new Wn(a);return function(){var c=arguments;switch(c.length){case 0:return!l.call(this);case 1:return!l.call(this,c[0]);case 2:return!l.call(this,c[0],c[1]);case 3:return!l.call(this,c[0],c[1],c[2])}return!l.apply(this,c)}}function mHe(l){return CN(2,l)}var gHe=nFe(function(l,c){c=c.length==1&&qe(c[0])?_t(c[0],Tn(Ie())):_t(Er(c,1),Tn(Ie()));var h=c.length;return Je(function(b){for(var C=-1,S=Pr(b.length,h);++C<S;)b[C]=c[C].call(this,b[C]);return kn(l,this,b)})}),Vy=Je(function(l,c){var h=Zo(c,yl(Vy));return co(l,N,r,c,h)}),ON=Je(function(l,c){var h=Zo(c,yl(ON));return co(l,L,r,c,h)}),yHe=fo(function(l,c){return co(l,P,r,r,r,c)});function bHe(l,c){if(typeof l!="function")throw new Wn(a);return c=c===r?c:Ge(c),Je(l,c)}function wHe(l,c){if(typeof l!="function")throw new Wn(a);return c=c==null?0:Zt(Ge(c),0),Je(function(h){var b=h[c],C=na(h,0,c);return b&&Jo(C,b),kn(l,this,C)})}function EHe(l,c,h){var b=!0,C=!0;if(typeof l!="function")throw new Wn(a);return Nt(h)&&(b="leading"in h?!!h.leading:b,C="trailing"in h?!!h.trailing:C),_N(l,c,{leading:b,maxWait:c,trailing:C})}function xHe(l){return xN(l,1)}function CHe(l,c){return Vy(Oy(c),l)}function kHe(){if(!arguments.length)return[];var l=arguments[0];return qe(l)?l:[l]}function THe(l){return Gn(l,m)}function SHe(l,c){return c=typeof c=="function"?c:r,Gn(l,m,c)}function _He(l){return Gn(l,p|m)}function OHe(l,c){return c=typeof c=="function"?c:r,Gn(l,p|m,c)}function AHe(l,c){return c==null||vM(l,c,cr(c))}function pi(l,c){return l===c||l!==l&&c!==c}var MHe=up(my),NHe=up(function(l,c){return l>=c}),ts=EM(function(){return arguments}())?EM:function(l){return Lt(l)&&yt.call(l,"callee")&&!sM.call(l,"callee")},qe=z.isArray,LHe=zA?Tn(zA):H$e;function un(l){return l!=null&&yp(l.length)&&!ho(l)}function Ht(l){return Lt(l)&&un(l)}function DHe(l){return l===!0||l===!1||Lt(l)&&jr(l)==G}var ia=GBe||t0,IHe=qA?Tn(qA):U$e;function RHe(l){return Lt(l)&&l.nodeType===1&&!sc(l)}function PHe(l){if(l==null)return!0;if(un(l)&&(qe(l)||typeof l=="string"||typeof l.splice=="function"||ia(l)||bl(l)||ts(l)))return!l.length;var c=Br(l);if(c==Xe||c==fe)return!l.size;if(oc(l))return!by(l).length;for(var h in l)if(yt.call(l,h))return!1;return!0}function BHe(l,c){return rc(l,c)}function $He(l,c,h){h=typeof h=="function"?h:r;var b=h?h(l,c):r;return b===r?rc(l,c,r,h):!!b}function Wy(l){if(!Lt(l))return!1;var c=jr(l);return c==ne||c==te||typeof l.message=="string"&&typeof l.name=="string"&&!sc(l)}function FHe(l){return typeof l=="number"&&uM(l)}function ho(l){if(!Nt(l))return!1;var c=jr(l);return c==he||c==Ne||c==F||c==R}function AN(l){return typeof l=="number"&&l==Ge(l)}function yp(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=ue}function Nt(l){var c=typeof l;return l!=null&&(c=="object"||c=="function")}function Lt(l){return l!=null&&typeof l=="object"}var MN=VA?Tn(VA):q$e;function HHe(l,c){return l===c||yy(l,c,Ry(c))}function UHe(l,c,h){return h=typeof h=="function"?h:r,yy(l,c,Ry(c),h)}function zHe(l){return NN(l)&&l!=+l}function qHe(l){if(SFe(l))throw new ze(o);return xM(l)}function VHe(l){return l===null}function WHe(l){return l==null}function NN(l){return typeof l=="number"||Lt(l)&&jr(l)==ot}function sc(l){if(!Lt(l)||jr(l)!=Ft)return!1;var c=Wd(l);if(c===null)return!0;var h=yt.call(c,"constructor")&&c.constructor;return typeof h=="function"&&h instanceof h&&Ud.call(h)==UBe}var jy=WA?Tn(WA):V$e;function jHe(l){return AN(l)&&l>=-ue&&l<=ue}var LN=jA?Tn(jA):W$e;function bp(l){return typeof l=="string"||!qe(l)&&Lt(l)&&jr(l)==Ke}function _n(l){return typeof l=="symbol"||Lt(l)&&jr(l)==et}var bl=GA?Tn(GA):j$e;function GHe(l){return l===r}function KHe(l){return Lt(l)&&Br(l)==V}function YHe(l){return Lt(l)&&jr(l)==se}var XHe=up(wy),JHe=up(function(l,c){return l<=c});function DN(l){if(!l)return[];if(un(l))return bp(l)?fi(l):ln(l);if(Ku&&l[Ku])return ABe(l[Ku]());var c=Br(l),h=c==Xe?sy:c==fe?$d:wl;return h(l)}function vo(l){if(!l)return l===0?l:0;if(l=Xn(l),l===j||l===-j){var c=l<0?-1:1;return c*ye}return l===l?l:0}function Ge(l){var c=vo(l),h=c%1;return c===c?h?c-h:c:0}function IN(l){return l?Ja(Ge(l),0,ke):0}function Xn(l){if(typeof l=="number")return l;if(_n(l))return ve;if(Nt(l)){var c=typeof l.valueOf=="function"?l.valueOf():l;l=Nt(c)?c+"":c}if(typeof l!="string")return l===0?l:+l;l=QA(l);var h=ur.test(l);return h||ja.test(l)?dBe(l.slice(2),h?2:8):lr.test(l)?ve:+l}function RN(l){return Pi(l,cn(l))}function ZHe(l){return l?Ja(Ge(l),-ue,ue):l===0?l:0}function gt(l){return l==null?"":Sn(l)}var QHe=ml(function(l,c){if(oc(c)||un(c)){Pi(c,cr(c),l);return}for(var h in c)yt.call(c,h)&&Qu(l,h,c[h])}),PN=ml(function(l,c){Pi(c,cn(c),l)}),wp=ml(function(l,c,h,b){Pi(c,cn(c),l,b)}),eUe=ml(function(l,c,h,b){Pi(c,cr(c),l,b)}),tUe=fo(py);function rUe(l,c){var h=vl(l);return c==null?h:hM(h,c)}var nUe=Je(function(l,c){l=wt(l);var h=-1,b=c.length,C=b>2?c[2]:r;for(C&&Gr(c[0],c[1],C)&&(b=1);++h<b;)for(var S=c[h],M=cn(S),I=-1,$=M.length;++I<$;){var Q=M[I],ee=l[Q];(ee===r||pi(ee,dl[Q])&&!yt.call(l,Q))&&(l[Q]=S[Q])}return l}),iUe=Je(function(l){return l.push(r,QM),kn(BN,r,l)});function oUe(l,c){return YA(l,Ie(c,3),Ri)}function aUe(l,c){return YA(l,Ie(c,3),vy)}function sUe(l,c){return l==null?l:hy(l,Ie(c,3),cn)}function lUe(l,c){return l==null?l:bM(l,Ie(c,3),cn)}function uUe(l,c){return l&&Ri(l,Ie(c,3))}function cUe(l,c){return l&&vy(l,Ie(c,3))}function fUe(l){return l==null?[]:tp(l,cr(l))}function dUe(l){return l==null?[]:tp(l,cn(l))}function Gy(l,c,h){var b=l==null?r:Za(l,c);return b===r?h:b}function pUe(l,c){return l!=null&&rN(l,c,P$e)}function Ky(l,c){return l!=null&&rN(l,c,B$e)}var hUe=KM(function(l,c,h){c!=null&&typeof c.toString!="function"&&(c=zd.call(c)),l[c]=h},Xy(fn)),vUe=KM(function(l,c,h){c!=null&&typeof c.toString!="function"&&(c=zd.call(c)),yt.call(l,c)?l[c].push(h):l[c]=[h]},Ie),mUe=Je(tc);function cr(l){return un(l)?dM(l):by(l)}function cn(l){return un(l)?dM(l,!0):G$e(l)}function gUe(l,c){var h={};return c=Ie(c,3),Ri(l,function(b,C,S){uo(h,c(b,C,S),b)}),h}function yUe(l,c){var h={};return c=Ie(c,3),Ri(l,function(b,C,S){uo(h,C,c(b,C,S))}),h}var bUe=ml(function(l,c,h){rp(l,c,h)}),BN=ml(function(l,c,h,b){rp(l,c,h,b)}),wUe=fo(function(l,c){var h={};if(l==null)return h;var b=!1;c=_t(c,function(S){return S=ra(S,l),b||(b=S.length>1),S}),Pi(l,Dy(l),h),b&&(h=Gn(h,p|v|m,hFe));for(var C=c.length;C--;)Ty(h,c[C]);return h});function EUe(l,c){return $N(l,gp(Ie(c)))}var xUe=fo(function(l,c){return l==null?{}:Y$e(l,c)});function $N(l,c){if(l==null)return{};var h=_t(Dy(l),function(b){return[b]});return c=Ie(c),AM(l,h,function(b,C){return c(b,C[0])})}function CUe(l,c,h){c=ra(c,l);var b=-1,C=c.length;for(C||(C=1,l=r);++b<C;){var S=l==null?r:l[Bi(c[b])];S===r&&(b=C,S=h),l=ho(S)?S.call(l):S}return l}function kUe(l,c,h){return l==null?l:nc(l,c,h)}function TUe(l,c,h,b){return b=typeof b=="function"?b:r,l==null?l:nc(l,c,h,b)}var FN=JM(cr),HN=JM(cn);function SUe(l,c,h){var b=qe(l),C=b||ia(l)||bl(l);if(c=Ie(c,4),h==null){var S=l&&l.constructor;C?h=b?new S:[]:Nt(l)?h=ho(S)?vl(Wd(l)):{}:h={}}return(C?Vn:Ri)(l,function(M,I,$){return c(h,M,I,$)}),h}function _Ue(l,c){return l==null?!0:Ty(l,c)}function OUe(l,c,h){return l==null?l:IM(l,c,Oy(h))}function AUe(l,c,h,b){return b=typeof b=="function"?b:r,l==null?l:IM(l,c,Oy(h),b)}function wl(l){return l==null?[]:ay(l,cr(l))}function MUe(l){return l==null?[]:ay(l,cn(l))}function NUe(l,c,h){return h===r&&(h=c,c=r),h!==r&&(h=Xn(h),h=h===h?h:0),c!==r&&(c=Xn(c),c=c===c?c:0),Ja(Xn(l),c,h)}function LUe(l,c,h){return c=vo(c),h===r?(h=c,c=0):h=vo(h),l=Xn(l),$$e(l,c,h)}function DUe(l,c,h){if(h&&typeof h!="boolean"&&Gr(l,c,h)&&(c=h=r),h===r&&(typeof c=="boolean"?(h=c,c=r):typeof l=="boolean"&&(h=l,l=r)),l===r&&c===r?(l=0,c=1):(l=vo(l),c===r?(c=l,l=0):c=vo(c)),l>c){var b=l;l=c,c=b}if(h||l%1||c%1){var C=cM();return Pr(l+C*(c-l+fBe("1e-"+((C+"").length-1))),c)}return xy(l,c)}var IUe=gl(function(l,c,h){return c=c.toLowerCase(),l+(h?UN(c):c)});function UN(l){return Yy(gt(l).toLowerCase())}function zN(l){return l=gt(l),l&&l.replace(Wg,kBe).replace(tBe,"")}function RUe(l,c,h){l=gt(l),c=Sn(c);var b=l.length;h=h===r?b:Ja(Ge(h),0,b);var C=h;return h-=c.length,h>=0&&l.slice(h,C)==c}function PUe(l){return l=gt(l),l&&Vu.test(l)?l.replace(qu,TBe):l}function BUe(l){return l=gt(l),l&&ui.test(l)?l.replace(ao,"\\$&"):l}var $Ue=gl(function(l,c,h){return l+(h?"-":"")+c.toLowerCase()}),FUe=gl(function(l,c,h){return l+(h?" ":"")+c.toLowerCase()}),HUe=WM("toLowerCase");function UUe(l,c,h){l=gt(l),c=Ge(c);var b=c?cl(l):0;if(!c||b>=c)return l;var C=(c-b)/2;return lp(Yd(C),h)+l+lp(Kd(C),h)}function zUe(l,c,h){l=gt(l),c=Ge(c);var b=c?cl(l):0;return c&&b<c?l+lp(c-b,h):l}function qUe(l,c,h){l=gt(l),c=Ge(c);var b=c?cl(l):0;return c&&b<c?lp(c-b,h)+l:l}function VUe(l,c,h){return h||c==null?c=0:c&&(c=+c),JBe(gt(l).replace(al,""),c||0)}function WUe(l,c,h){return(h?Gr(l,c,h):c===r)?c=1:c=Ge(c),Cy(gt(l),c)}function jUe(){var l=arguments,c=gt(l[0]);return l.length<3?c:c.replace(l[1],l[2])}var GUe=gl(function(l,c,h){return l+(h?"_":"")+c.toLowerCase()});function KUe(l,c,h){return h&&typeof h!="number"&&Gr(l,c,h)&&(c=h=r),h=h===r?ke:h>>>0,h?(l=gt(l),l&&(typeof c=="string"||c!=null&&!jy(c))&&(c=Sn(c),!c&&ul(l))?na(fi(l),0,h):l.split(c,h)):[]}var YUe=gl(function(l,c,h){return l+(h?" ":"")+Yy(c)});function XUe(l,c,h){return l=gt(l),h=h==null?0:Ja(Ge(h),0,l.length),c=Sn(c),l.slice(h,h+c.length)==c}function JUe(l,c,h){var b=T.templateSettings;h&&Gr(l,c,h)&&(c=r),l=gt(l),c=wp({},c,b,ZM);var C=wp({},c.imports,b.imports,ZM),S=cr(C),M=ay(C,S),I,$,Q=0,ee=c.interpolate||ju,ie="__p += '",me=ly((c.escape||ju).source+"|"+ee.source+"|"+(ee===Wu?mt:ju).source+"|"+(c.evaluate||ju).source+"|$","g"),Ae="//# sourceURL="+(yt.call(c,"sourceURL")?(c.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++aBe+"]")+`
|
|
11
|
+
`;l.replace(me,function(Pe,Qe,nt,On,Kr,An){return nt||(nt=On),ie+=l.slice(Q,An).replace(BPe,SBe),Qe&&(I=!0,ie+=`' +
|
|
12
|
+
__e(`+Qe+`) +
|
|
13
|
+
'`),Kr&&($=!0,ie+=`';
|
|
14
|
+
`+Kr+`;
|
|
15
|
+
__p += '`),nt&&(ie+=`' +
|
|
16
|
+
((__t = (`+nt+`)) == null ? '' : __t) +
|
|
17
|
+
'`),Q=An+Pe.length,Pe}),ie+=`';
|
|
18
|
+
`;var Re=yt.call(c,"variable")&&c.variable;if(!Re)ie=`with (obj) {
|
|
19
|
+
`+ie+`
|
|
20
|
+
}
|
|
21
|
+
`;else if(de.test(Re))throw new ze(s);ie=($?ie.replace(Yo,""):ie).replace(Ug,"$1").replace(Uu,"$1;"),ie="function("+(Re||"obj")+`) {
|
|
22
|
+
`+(Re?"":`obj || (obj = {});
|
|
23
|
+
`)+"var __t, __p = ''"+(I?", __e = _.escape":"")+($?`, __j = Array.prototype.join;
|
|
24
|
+
function print() { __p += __j.call(arguments, '') }
|
|
25
|
+
`:`;
|
|
26
|
+
`)+ie+`return __p
|
|
27
|
+
}`;var Ye=VN(function(){return pt(S,Ae+"return "+ie).apply(r,M)});if(Ye.source=ie,Wy(Ye))throw Ye;return Ye}function ZUe(l){return gt(l).toLowerCase()}function QUe(l){return gt(l).toUpperCase()}function e4e(l,c,h){if(l=gt(l),l&&(h||c===r))return QA(l);if(!l||!(c=Sn(c)))return l;var b=fi(l),C=fi(c),S=eM(b,C),M=tM(b,C)+1;return na(b,S,M).join("")}function t4e(l,c,h){if(l=gt(l),l&&(h||c===r))return l.slice(0,nM(l)+1);if(!l||!(c=Sn(c)))return l;var b=fi(l),C=tM(b,fi(c))+1;return na(b,0,C).join("")}function r4e(l,c,h){if(l=gt(l),l&&(h||c===r))return l.replace(al,"");if(!l||!(c=Sn(c)))return l;var b=fi(l),C=eM(b,fi(c));return na(b,C).join("")}function n4e(l,c){var h=J,b=re;if(Nt(c)){var C="separator"in c?c.separator:C;h="length"in c?Ge(c.length):h,b="omission"in c?Sn(c.omission):b}l=gt(l);var S=l.length;if(ul(l)){var M=fi(l);S=M.length}if(h>=S)return l;var I=h-cl(b);if(I<1)return b;var $=M?na(M,0,I).join(""):l.slice(0,I);if(C===r)return $+b;if(M&&(I+=$.length-I),jy(C)){if(l.slice(I).search(C)){var Q,ee=$;for(C.global||(C=ly(C.source,gt(Xt.exec(C))+"g")),C.lastIndex=0;Q=C.exec(ee);)var ie=Q.index;$=$.slice(0,ie===r?I:ie)}}else if(l.indexOf(Sn(C),I)!=I){var me=$.lastIndexOf(C);me>-1&&($=$.slice(0,me))}return $+b}function i4e(l){return l=gt(l),l&&ol.test(l)?l.replace(zu,DBe):l}var o4e=gl(function(l,c,h){return l+(h?" ":"")+c.toUpperCase()}),Yy=WM("toUpperCase");function qN(l,c,h){return l=gt(l),c=h?r:c,c===r?OBe(l)?PBe(l):bBe(l):l.match(c)||[]}var VN=Je(function(l,c){try{return kn(l,r,c)}catch(h){return Wy(h)?h:new ze(h)}}),a4e=fo(function(l,c){return Vn(c,function(h){h=Bi(h),uo(l,h,qy(l[h],l))}),l});function s4e(l){var c=l==null?0:l.length,h=Ie();return l=c?_t(l,function(b){if(typeof b[1]!="function")throw new Wn(a);return[h(b[0]),b[1]]}):[],Je(function(b){for(var C=-1;++C<c;){var S=l[C];if(kn(S[0],this,b))return kn(S[1],this,b)}})}function l4e(l){return D$e(Gn(l,p))}function Xy(l){return function(){return l}}function u4e(l,c){return l==null||l!==l?c:l}var c4e=GM(),f4e=GM(!0);function fn(l){return l}function Jy(l){return CM(typeof l=="function"?l:Gn(l,p))}function d4e(l){return TM(Gn(l,p))}function p4e(l,c){return SM(l,Gn(c,p))}var h4e=Je(function(l,c){return function(h){return tc(h,l,c)}}),v4e=Je(function(l,c){return function(h){return tc(l,h,c)}});function Zy(l,c,h){var b=cr(c),C=tp(c,b);h==null&&!(Nt(c)&&(C.length||!b.length))&&(h=c,c=l,l=this,C=tp(c,cr(c)));var S=!(Nt(h)&&"chain"in h)||!!h.chain,M=ho(l);return Vn(C,function(I){var $=c[I];l[I]=$,M&&(l.prototype[I]=function(){var Q=this.__chain__;if(S||Q){var ee=l(this.__wrapped__),ie=ee.__actions__=ln(this.__actions__);return ie.push({func:$,args:arguments,thisArg:l}),ee.__chain__=Q,ee}return $.apply(l,Jo([this.value()],arguments))})}),l}function m4e(){return wr._===this&&(wr._=zBe),this}function Qy(){}function g4e(l){return l=Ge(l),Je(function(c){return _M(c,l)})}var y4e=My(_t),b4e=My(KA),w4e=My(ty);function WN(l){return By(l)?ry(Bi(l)):X$e(l)}function E4e(l){return function(c){return l==null?r:Za(l,c)}}var x4e=YM(),C4e=YM(!0);function e0(){return[]}function t0(){return!1}function k4e(){return{}}function T4e(){return""}function S4e(){return!0}function _4e(l,c){if(l=Ge(l),l<1||l>ue)return[];var h=ke,b=Pr(l,ke);c=Ie(c),l-=ke;for(var C=oy(b,c);++h<l;)c(h);return C}function O4e(l){return qe(l)?_t(l,Bi):_n(l)?[l]:ln(fN(gt(l)))}function A4e(l){var c=++HBe;return gt(l)+c}var M4e=sp(function(l,c){return l+c},0),N4e=Ny("ceil"),L4e=sp(function(l,c){return l/c},1),D4e=Ny("floor");function I4e(l){return l&&l.length?ep(l,fn,my):r}function R4e(l,c){return l&&l.length?ep(l,Ie(c,2),my):r}function P4e(l){return JA(l,fn)}function B4e(l,c){return JA(l,Ie(c,2))}function $4e(l){return l&&l.length?ep(l,fn,wy):r}function F4e(l,c){return l&&l.length?ep(l,Ie(c,2),wy):r}var H4e=sp(function(l,c){return l*c},1),U4e=Ny("round"),z4e=sp(function(l,c){return l-c},0);function q4e(l){return l&&l.length?iy(l,fn):0}function V4e(l,c){return l&&l.length?iy(l,Ie(c,2)):0}return T.after=dHe,T.ary=xN,T.assign=QHe,T.assignIn=PN,T.assignInWith=wp,T.assignWith=eUe,T.at=tUe,T.before=CN,T.bind=qy,T.bindAll=a4e,T.bindKey=kN,T.castArray=kHe,T.chain=bN,T.chunk=DFe,T.compact=IFe,T.concat=RFe,T.cond=s4e,T.conforms=l4e,T.constant=Xy,T.countBy=q3e,T.create=rUe,T.curry=TN,T.curryRight=SN,T.debounce=_N,T.defaults=nUe,T.defaultsDeep=iUe,T.defer=pHe,T.delay=hHe,T.difference=PFe,T.differenceBy=BFe,T.differenceWith=$Fe,T.drop=FFe,T.dropRight=HFe,T.dropRightWhile=UFe,T.dropWhile=zFe,T.fill=qFe,T.filter=W3e,T.flatMap=K3e,T.flatMapDeep=Y3e,T.flatMapDepth=X3e,T.flatten=vN,T.flattenDeep=VFe,T.flattenDepth=WFe,T.flip=vHe,T.flow=c4e,T.flowRight=f4e,T.fromPairs=jFe,T.functions=fUe,T.functionsIn=dUe,T.groupBy=J3e,T.initial=KFe,T.intersection=YFe,T.intersectionBy=XFe,T.intersectionWith=JFe,T.invert=hUe,T.invertBy=vUe,T.invokeMap=Q3e,T.iteratee=Jy,T.keyBy=eHe,T.keys=cr,T.keysIn=cn,T.map=hp,T.mapKeys=gUe,T.mapValues=yUe,T.matches=d4e,T.matchesProperty=p4e,T.memoize=mp,T.merge=bUe,T.mergeWith=BN,T.method=h4e,T.methodOf=v4e,T.mixin=Zy,T.negate=gp,T.nthArg=g4e,T.omit=wUe,T.omitBy=EUe,T.once=mHe,T.orderBy=tHe,T.over=y4e,T.overArgs=gHe,T.overEvery=b4e,T.overSome=w4e,T.partial=Vy,T.partialRight=ON,T.partition=rHe,T.pick=xUe,T.pickBy=$N,T.property=WN,T.propertyOf=E4e,T.pull=t3e,T.pullAll=gN,T.pullAllBy=r3e,T.pullAllWith=n3e,T.pullAt=i3e,T.range=x4e,T.rangeRight=C4e,T.rearg=yHe,T.reject=oHe,T.remove=o3e,T.rest=bHe,T.reverse=Uy,T.sampleSize=sHe,T.set=kUe,T.setWith=TUe,T.shuffle=lHe,T.slice=a3e,T.sortBy=fHe,T.sortedUniq=p3e,T.sortedUniqBy=h3e,T.split=KUe,T.spread=wHe,T.tail=v3e,T.take=m3e,T.takeRight=g3e,T.takeRightWhile=y3e,T.takeWhile=b3e,T.tap=I3e,T.throttle=EHe,T.thru=pp,T.toArray=DN,T.toPairs=FN,T.toPairsIn=HN,T.toPath=O4e,T.toPlainObject=RN,T.transform=SUe,T.unary=xHe,T.union=w3e,T.unionBy=E3e,T.unionWith=x3e,T.uniq=C3e,T.uniqBy=k3e,T.uniqWith=T3e,T.unset=_Ue,T.unzip=zy,T.unzipWith=yN,T.update=OUe,T.updateWith=AUe,T.values=wl,T.valuesIn=MUe,T.without=S3e,T.words=qN,T.wrap=CHe,T.xor=_3e,T.xorBy=O3e,T.xorWith=A3e,T.zip=M3e,T.zipObject=N3e,T.zipObjectDeep=L3e,T.zipWith=D3e,T.entries=FN,T.entriesIn=HN,T.extend=PN,T.extendWith=wp,Zy(T,T),T.add=M4e,T.attempt=VN,T.camelCase=IUe,T.capitalize=UN,T.ceil=N4e,T.clamp=NUe,T.clone=THe,T.cloneDeep=_He,T.cloneDeepWith=OHe,T.cloneWith=SHe,T.conformsTo=AHe,T.deburr=zN,T.defaultTo=u4e,T.divide=L4e,T.endsWith=RUe,T.eq=pi,T.escape=PUe,T.escapeRegExp=BUe,T.every=V3e,T.find=j3e,T.findIndex=pN,T.findKey=oUe,T.findLast=G3e,T.findLastIndex=hN,T.findLastKey=aUe,T.floor=D4e,T.forEach=wN,T.forEachRight=EN,T.forIn=sUe,T.forInRight=lUe,T.forOwn=uUe,T.forOwnRight=cUe,T.get=Gy,T.gt=MHe,T.gte=NHe,T.has=pUe,T.hasIn=Ky,T.head=mN,T.identity=fn,T.includes=Z3e,T.indexOf=GFe,T.inRange=LUe,T.invoke=mUe,T.isArguments=ts,T.isArray=qe,T.isArrayBuffer=LHe,T.isArrayLike=un,T.isArrayLikeObject=Ht,T.isBoolean=DHe,T.isBuffer=ia,T.isDate=IHe,T.isElement=RHe,T.isEmpty=PHe,T.isEqual=BHe,T.isEqualWith=$He,T.isError=Wy,T.isFinite=FHe,T.isFunction=ho,T.isInteger=AN,T.isLength=yp,T.isMap=MN,T.isMatch=HHe,T.isMatchWith=UHe,T.isNaN=zHe,T.isNative=qHe,T.isNil=WHe,T.isNull=VHe,T.isNumber=NN,T.isObject=Nt,T.isObjectLike=Lt,T.isPlainObject=sc,T.isRegExp=jy,T.isSafeInteger=jHe,T.isSet=LN,T.isString=bp,T.isSymbol=_n,T.isTypedArray=bl,T.isUndefined=GHe,T.isWeakMap=KHe,T.isWeakSet=YHe,T.join=ZFe,T.kebabCase=$Ue,T.last=Yn,T.lastIndexOf=QFe,T.lowerCase=FUe,T.lowerFirst=HUe,T.lt=XHe,T.lte=JHe,T.max=I4e,T.maxBy=R4e,T.mean=P4e,T.meanBy=B4e,T.min=$4e,T.minBy=F4e,T.stubArray=e0,T.stubFalse=t0,T.stubObject=k4e,T.stubString=T4e,T.stubTrue=S4e,T.multiply=H4e,T.nth=e3e,T.noConflict=m4e,T.noop=Qy,T.now=vp,T.pad=UUe,T.padEnd=zUe,T.padStart=qUe,T.parseInt=VUe,T.random=DUe,T.reduce=nHe,T.reduceRight=iHe,T.repeat=WUe,T.replace=jUe,T.result=CUe,T.round=U4e,T.runInContext=B,T.sample=aHe,T.size=uHe,T.snakeCase=GUe,T.some=cHe,T.sortedIndex=s3e,T.sortedIndexBy=l3e,T.sortedIndexOf=u3e,T.sortedLastIndex=c3e,T.sortedLastIndexBy=f3e,T.sortedLastIndexOf=d3e,T.startCase=YUe,T.startsWith=XUe,T.subtract=z4e,T.sum=q4e,T.sumBy=V4e,T.template=JUe,T.times=_4e,T.toFinite=vo,T.toInteger=Ge,T.toLength=IN,T.toLower=ZUe,T.toNumber=Xn,T.toSafeInteger=ZHe,T.toString=gt,T.toUpper=QUe,T.trim=e4e,T.trimEnd=t4e,T.trimStart=r4e,T.truncate=n4e,T.unescape=i4e,T.uniqueId=A4e,T.upperCase=o4e,T.upperFirst=Yy,T.each=wN,T.eachRight=EN,T.first=mN,Zy(T,function(){var l={};return Ri(T,function(c,h){yt.call(T.prototype,h)||(l[h]=c)}),l}(),{chain:!1}),T.VERSION=n,Vn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){T[l].placeholder=T}),Vn(["drop","take"],function(l,c){tt.prototype[l]=function(h){h=h===r?1:Zt(Ge(h),0);var b=this.__filtered__&&!c?new tt(this):this.clone();return b.__filtered__?b.__takeCount__=Pr(h,b.__takeCount__):b.__views__.push({size:Pr(h,ke),type:l+(b.__dir__<0?"Right":"")}),b},tt.prototype[l+"Right"]=function(h){return this.reverse()[l](h).reverse()}}),Vn(["filter","map","takeWhile"],function(l,c){var h=c+1,b=h==ce||h==Z;tt.prototype[l]=function(C){var S=this.clone();return S.__iteratees__.push({iteratee:Ie(C,3),type:h}),S.__filtered__=S.__filtered__||b,S}}),Vn(["head","last"],function(l,c){var h="take"+(c?"Right":"");tt.prototype[l]=function(){return this[h](1).value()[0]}}),Vn(["initial","tail"],function(l,c){var h="drop"+(c?"":"Right");tt.prototype[l]=function(){return this.__filtered__?new tt(this):this[h](1)}}),tt.prototype.compact=function(){return this.filter(fn)},tt.prototype.find=function(l){return this.filter(l).head()},tt.prototype.findLast=function(l){return this.reverse().find(l)},tt.prototype.invokeMap=Je(function(l,c){return typeof l=="function"?new tt(this):this.map(function(h){return tc(h,l,c)})}),tt.prototype.reject=function(l){return this.filter(gp(Ie(l)))},tt.prototype.slice=function(l,c){l=Ge(l);var h=this;return h.__filtered__&&(l>0||c<0)?new tt(h):(l<0?h=h.takeRight(-l):l&&(h=h.drop(l)),c!==r&&(c=Ge(c),h=c<0?h.dropRight(-c):h.take(c-l)),h)},tt.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},tt.prototype.toArray=function(){return this.take(ke)},Ri(tt.prototype,function(l,c){var h=/^(?:filter|find|map|reject)|While$/.test(c),b=/^(?:head|last)$/.test(c),C=T[b?"take"+(c=="last"?"Right":""):c],S=b||/^find/.test(c);C&&(T.prototype[c]=function(){var M=this.__wrapped__,I=b?[1]:arguments,$=M instanceof tt,Q=I[0],ee=$||qe(M),ie=function(Qe){var nt=C.apply(T,Jo([Qe],I));return b&&me?nt[0]:nt};ee&&h&&typeof Q=="function"&&Q.length!=1&&($=ee=!1);var me=this.__chain__,Ae=!!this.__actions__.length,Re=S&&!me,Ye=$&&!Ae;if(!S&&ee){M=Ye?M:new tt(this);var Pe=l.apply(M,I);return Pe.__actions__.push({func:pp,args:[ie],thisArg:r}),new jn(Pe,me)}return Re&&Ye?l.apply(this,I):(Pe=this.thru(ie),Re?b?Pe.value()[0]:Pe.value():Pe)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(l){var c=Fd[l],h=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",b=/^(?:pop|shift)$/.test(l);T.prototype[l]=function(){var C=arguments;if(b&&!this.__chain__){var S=this.value();return c.apply(qe(S)?S:[],C)}return this[h](function(M){return c.apply(qe(M)?M:[],C)})}}),Ri(tt.prototype,function(l,c){var h=T[c];if(h){var b=h.name+"";yt.call(hl,b)||(hl[b]=[]),hl[b].push({name:c,func:h})}}),hl[ap(r,x).name]=[{name:"wrapper",func:r}],tt.prototype.clone=i$e,tt.prototype.reverse=o$e,tt.prototype.value=a$e,T.prototype.at=R3e,T.prototype.chain=P3e,T.prototype.commit=B3e,T.prototype.next=$3e,T.prototype.plant=H3e,T.prototype.reverse=U3e,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=z3e,T.prototype.first=T.prototype.head,Ku&&(T.prototype[Ku]=F3e),T},fl=BBe();Ga?((Ga.exports=fl)._=fl,Jg._=fl):wr._=fl}).call(Jn)}(yc,yc.exports);var eD=yc.exports;const Ot=Rp(eD);var bc,tD=new Uint8Array(16);function W0(){if(!bc&&(bc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!bc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bc(tD)}const rD=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function j0(t){return typeof t=="string"&&rD.test(t)}for(var fr=[],Pp=0;Pp<256;++Pp)fr.push((Pp+256).toString(16).substr(1));function Bp(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(fr[t[e+0]]+fr[t[e+1]]+fr[t[e+2]]+fr[t[e+3]]+"-"+fr[t[e+4]]+fr[t[e+5]]+"-"+fr[t[e+6]]+fr[t[e+7]]+"-"+fr[t[e+8]]+fr[t[e+9]]+"-"+fr[t[e+10]]+fr[t[e+11]]+fr[t[e+12]]+fr[t[e+13]]+fr[t[e+14]]+fr[t[e+15]]).toLowerCase();if(!j0(r))throw TypeError("Stringified UUID is invalid");return r}var G0,$p,Fp=0,Hp=0;function nD(t,e,r){var n=e&&r||0,i=e||new Array(16);t=t||{};var o=t.node||G0,a=t.clockseq!==void 0?t.clockseq:$p;if(o==null||a==null){var s=t.random||(t.rng||W0)();o==null&&(o=G0=[s[0]|1,s[1],s[2],s[3],s[4],s[5]]),a==null&&(a=$p=(s[6]<<8|s[7])&16383)}var u=t.msecs!==void 0?t.msecs:Date.now(),f=t.nsecs!==void 0?t.nsecs:Hp+1,d=u-Fp+(f-Hp)/1e4;if(d<0&&t.clockseq===void 0&&(a=a+1&16383),(d<0||u>Fp)&&t.nsecs===void 0&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Fp=u,Hp=f,$p=a,u+=122192928e5;var p=((u&268435455)*1e4+f)%4294967296;i[n++]=p>>>24&255,i[n++]=p>>>16&255,i[n++]=p>>>8&255,i[n++]=p&255;var v=u/4294967296*1e4&268435455;i[n++]=v>>>8&255,i[n++]=v&255,i[n++]=v>>>24&15|16,i[n++]=v>>>16&255,i[n++]=a>>>8|128,i[n++]=a&255;for(var m=0;m<6;++m)i[n+m]=o[m];return e||Bp(i)}function iD(t){if(!j0(t))throw TypeError("Invalid UUID");var e,r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}function oD(t){t=unescape(encodeURIComponent(t));for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}var aD="6ba7b810-9dad-11d1-80b4-00c04fd430c8",sD="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function K0(t,e,r){function n(i,o,a,s){if(typeof i=="string"&&(i=oD(i)),typeof o=="string"&&(o=iD(o)),o.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var u=new Uint8Array(16+i.length);if(u.set(o),u.set(i,o.length),u=r(u),u[6]=u[6]&15|e,u[8]=u[8]&63|128,a){s=s||0;for(var f=0;f<16;++f)a[s+f]=u[f];return a}return Bp(u)}try{n.name=t}catch{}return n.DNS=aD,n.URL=sD,n}function lD(t){if(typeof t=="string"){var e=unescape(encodeURIComponent(t));t=new Uint8Array(e.length);for(var r=0;r<e.length;++r)t[r]=e.charCodeAt(r)}return uD(cD(fD(t),t.length*8))}function uD(t){for(var e=[],r=t.length*32,n="0123456789abcdef",i=0;i<r;i+=8){var o=t[i>>5]>>>i%32&255,a=parseInt(n.charAt(o>>>4&15)+n.charAt(o&15),16);e.push(a)}return e}function Y0(t){return(t+64>>>9<<4)+14+1}function cD(t,e){t[e>>5]|=128<<e%32,t[Y0(e)-1]=e;for(var r=1732584193,n=-271733879,i=-1732584194,o=271733878,a=0;a<t.length;a+=16){var s=r,u=n,f=i,d=o;r=xr(r,n,i,o,t[a],7,-680876936),o=xr(o,r,n,i,t[a+1],12,-389564586),i=xr(i,o,r,n,t[a+2],17,606105819),n=xr(n,i,o,r,t[a+3],22,-1044525330),r=xr(r,n,i,o,t[a+4],7,-176418897),o=xr(o,r,n,i,t[a+5],12,1200080426),i=xr(i,o,r,n,t[a+6],17,-1473231341),n=xr(n,i,o,r,t[a+7],22,-45705983),r=xr(r,n,i,o,t[a+8],7,1770035416),o=xr(o,r,n,i,t[a+9],12,-1958414417),i=xr(i,o,r,n,t[a+10],17,-42063),n=xr(n,i,o,r,t[a+11],22,-1990404162),r=xr(r,n,i,o,t[a+12],7,1804603682),o=xr(o,r,n,i,t[a+13],12,-40341101),i=xr(i,o,r,n,t[a+14],17,-1502002290),n=xr(n,i,o,r,t[a+15],22,1236535329),r=Cr(r,n,i,o,t[a+1],5,-165796510),o=Cr(o,r,n,i,t[a+6],9,-1069501632),i=Cr(i,o,r,n,t[a+11],14,643717713),n=Cr(n,i,o,r,t[a],20,-373897302),r=Cr(r,n,i,o,t[a+5],5,-701558691),o=Cr(o,r,n,i,t[a+10],9,38016083),i=Cr(i,o,r,n,t[a+15],14,-660478335),n=Cr(n,i,o,r,t[a+4],20,-405537848),r=Cr(r,n,i,o,t[a+9],5,568446438),o=Cr(o,r,n,i,t[a+14],9,-1019803690),i=Cr(i,o,r,n,t[a+3],14,-187363961),n=Cr(n,i,o,r,t[a+8],20,1163531501),r=Cr(r,n,i,o,t[a+13],5,-1444681467),o=Cr(o,r,n,i,t[a+2],9,-51403784),i=Cr(i,o,r,n,t[a+7],14,1735328473),n=Cr(n,i,o,r,t[a+12],20,-1926607734),r=kr(r,n,i,o,t[a+5],4,-378558),o=kr(o,r,n,i,t[a+8],11,-2022574463),i=kr(i,o,r,n,t[a+11],16,1839030562),n=kr(n,i,o,r,t[a+14],23,-35309556),r=kr(r,n,i,o,t[a+1],4,-1530992060),o=kr(o,r,n,i,t[a+4],11,1272893353),i=kr(i,o,r,n,t[a+7],16,-155497632),n=kr(n,i,o,r,t[a+10],23,-1094730640),r=kr(r,n,i,o,t[a+13],4,681279174),o=kr(o,r,n,i,t[a],11,-358537222),i=kr(i,o,r,n,t[a+3],16,-722521979),n=kr(n,i,o,r,t[a+6],23,76029189),r=kr(r,n,i,o,t[a+9],4,-640364487),o=kr(o,r,n,i,t[a+12],11,-421815835),i=kr(i,o,r,n,t[a+15],16,530742520),n=kr(n,i,o,r,t[a+2],23,-995338651),r=Tr(r,n,i,o,t[a],6,-198630844),o=Tr(o,r,n,i,t[a+7],10,1126891415),i=Tr(i,o,r,n,t[a+14],15,-1416354905),n=Tr(n,i,o,r,t[a+5],21,-57434055),r=Tr(r,n,i,o,t[a+12],6,1700485571),o=Tr(o,r,n,i,t[a+3],10,-1894986606),i=Tr(i,o,r,n,t[a+10],15,-1051523),n=Tr(n,i,o,r,t[a+1],21,-2054922799),r=Tr(r,n,i,o,t[a+8],6,1873313359),o=Tr(o,r,n,i,t[a+15],10,-30611744),i=Tr(i,o,r,n,t[a+6],15,-1560198380),n=Tr(n,i,o,r,t[a+13],21,1309151649),r=Tr(r,n,i,o,t[a+4],6,-145523070),o=Tr(o,r,n,i,t[a+11],10,-1120210379),i=Tr(i,o,r,n,t[a+2],15,718787259),n=Tr(n,i,o,r,t[a+9],21,-343485551),r=Eo(r,s),n=Eo(n,u),i=Eo(i,f),o=Eo(o,d)}return[r,n,i,o]}function fD(t){if(t.length===0)return[];for(var e=t.length*8,r=new Uint32Array(Y0(e)),n=0;n<e;n+=8)r[n>>5]|=(t[n/8]&255)<<n%32;return r}function Eo(t,e){var r=(t&65535)+(e&65535),n=(t>>16)+(e>>16)+(r>>16);return n<<16|r&65535}function dD(t,e){return t<<e|t>>>32-e}function wc(t,e,r,n,i,o){return Eo(dD(Eo(Eo(e,t),Eo(n,o)),i),r)}function xr(t,e,r,n,i,o,a){return wc(e&r|~e&n,t,e,i,o,a)}function Cr(t,e,r,n,i,o,a){return wc(e&n|r&~n,t,e,i,o,a)}function kr(t,e,r,n,i,o,a){return wc(e^r^n,t,e,i,o,a)}function Tr(t,e,r,n,i,o,a){return wc(r^(e|~n),t,e,i,o,a)}var pD=K0("v3",48,lD);function hD(t,e,r){t=t||{};var n=t.random||(t.rng||W0)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(var i=0;i<16;++i)e[r+i]=n[i];return e}return Bp(n)}function vD(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:return e^r^n;case 2:return e&r^e&n^r&n;case 3:return e^r^n}}function Up(t,e){return t<<e|t>>>32-e}function mD(t){var e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){var n=unescape(encodeURIComponent(t));t=[];for(var i=0;i<n.length;++i)t.push(n.charCodeAt(i))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);for(var o=t.length/4+2,a=Math.ceil(o/16),s=new Array(a),u=0;u<a;++u){for(var f=new Uint32Array(16),d=0;d<16;++d)f[d]=t[u*64+d*4]<<24|t[u*64+d*4+1]<<16|t[u*64+d*4+2]<<8|t[u*64+d*4+3];s[u]=f}s[a-1][14]=(t.length-1)*8/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=(t.length-1)*8&4294967295;for(var p=0;p<a;++p){for(var v=new Uint32Array(80),m=0;m<16;++m)v[m]=s[p][m];for(var g=16;g<80;++g)v[g]=Up(v[g-3]^v[g-8]^v[g-14]^v[g-16],1);for(var E=r[0],w=r[1],x=r[2],k=r[3],_=r[4],O=0;O<80;++O){var N=Math.floor(O/20),L=Up(E,5)+vD(N,w,x,k)+_+e[N]+v[O]>>>0;_=k,k=x,x=Up(w,30)>>>0,w=E,E=L}r[0]=r[0]+E>>>0,r[1]=r[1]+w>>>0,r[2]=r[2]+x>>>0,r[3]=r[3]+k>>>0,r[4]=r[4]+_>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var gD=K0("v5",80,mD),yD={v1:nD,v3:pD,v4:hD,v5:gD};function bD(t,e,r){return t===t&&(r!==void 0&&(t=t<=r?t:r),e!==void 0&&(t=t>=e?t:e)),t}var wD=bD,ED=/\s/;function xD(t){for(var e=t.length;e--&&ED.test(t.charAt(e)););return e}var CD=xD,kD=CD,TD=/^\s+/;function SD(t){return t&&t.slice(0,kD(t)+1).replace(TD,"")}var _D=SD;function OD(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var zp=OD,AD=typeof Jn=="object"&&Jn&&Jn.Object===Object&&Jn,MD=AD,ND=MD,LD=typeof self=="object"&&self&&self.Object===Object&&self,DD=ND||LD||Function("return this")(),ID=DD,RD=ID,PD=RD.Symbol,X0=PD,J0=X0,Z0=Object.prototype,BD=Z0.hasOwnProperty,$D=Z0.toString,Il=J0?J0.toStringTag:void 0;function FD(t){var e=BD.call(t,Il),r=t[Il];try{t[Il]=void 0;var n=!0}catch{}var i=$D.call(t);return n&&(e?t[Il]=r:delete t[Il]),i}var HD=FD,UD=Object.prototype,zD=UD.toString;function qD(t){return zD.call(t)}var VD=qD,Q0=X0,WD=HD,jD=VD,GD="[object Null]",KD="[object Undefined]",eb=Q0?Q0.toStringTag:void 0;function YD(t){return t==null?t===void 0?KD:GD:eb&&eb in Object(t)?WD(t):jD(t)}var tb=YD;function XD(t){return t!=null&&typeof t=="object"}var JD=XD,ZD=tb,QD=JD,eI="[object Symbol]";function tI(t){return typeof t=="symbol"||QD(t)&&ZD(t)==eI}var rI=tI,nI=_D,rb=zp,iI=rI,nb=NaN,oI=/^[-+]0x[0-9a-f]+$/i,aI=/^0b[01]+$/i,sI=/^0o[0-7]+$/i,lI=parseInt;function uI(t){if(typeof t=="number")return t;if(iI(t))return nb;if(rb(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=rb(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=nI(t);var r=aI.test(t);return r||sI.test(t)?lI(t.slice(2),r?2:8):oI.test(t)?nb:+t}var qp=uI,cI=wD,Vp=qp;function fI(t,e,r){return r===void 0&&(r=e,e=void 0),r!==void 0&&(r=Vp(r),r=r===r?r:0),e!==void 0&&(e=Vp(e),e=e===e?e:0),cI(Vp(t),e,r)}var dI=fI,pI=Math.max,hI=Math.min;function vI(t,e,r){return t>=hI(e,r)&&t<pI(e,r)}var mI=vI,gI=qp,ib=1/0,yI=17976931348623157e292;function bI(t){if(!t)return t===0?t:0;if(t=gI(t),t===ib||t===-ib){var e=t<0?-1:1;return e*yI}return t===t?t:0}var ob=bI,wI=mI,ab=ob,EI=qp;function xI(t,e,r){return e=ab(e),r===void 0?(r=e,e=0):r=ab(r),t=EI(t),wI(t,e,r)}var CI=xI,kI=Math.floor,TI=Math.random;function SI(t,e){return t+kI(TI()*(e-t+1))}var _I=SI;function OI(t,e){return t===e||t!==t&&e!==e}var AI=OI,MI=tb,NI=zp,LI="[object AsyncFunction]",DI="[object Function]",II="[object GeneratorFunction]",RI="[object Proxy]";function PI(t){if(!NI(t))return!1;var e=MI(t);return e==DI||e==II||e==LI||e==RI}var BI=PI,$I=9007199254740991;function FI(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=$I}var HI=FI,UI=BI,zI=HI;function qI(t){return t!=null&&zI(t.length)&&!UI(t)}var VI=qI,WI=9007199254740991,jI=/^(?:0|[1-9]\d*)$/;function GI(t,e){var r=typeof t;return e=e??WI,!!e&&(r=="number"||r!="symbol"&&jI.test(t))&&t>-1&&t%1==0&&t<e}var KI=GI,YI=AI,XI=VI,JI=KI,ZI=zp;function QI(t,e,r){if(!ZI(r))return!1;var n=typeof e;return(n=="number"?XI(r)&&JI(e,r.length):n=="string"&&e in r)?YI(r[e],t):!1}var eR=QI,tR=_I,rR=eR,sb=ob,nR=parseFloat,iR=Math.min,oR=Math.random;function aR(t,e,r){if(r&&typeof r!="boolean"&&rR(t,e,r)&&(e=r=void 0),r===void 0&&(typeof e=="boolean"?(r=e,e=void 0):typeof t=="boolean"&&(r=t,t=void 0)),t===void 0&&e===void 0?(t=0,e=1):(t=sb(t),e===void 0?(e=t,t=0):e=sb(e)),t>e){var n=t;t=e,e=n}if(r||t%1||e%1){var i=oR();return iR(t+i*(e-t+nR("1e-"+((i+"").length-1))),e)}return tR(t,e)}var sR=aR,lR={clamp:dI,inRange:CI,random:sR},lb={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(Jn,function(){var r=1e3,n=6e4,i=36e5,o="millisecond",a="second",s="minute",u="hour",f="day",d="week",p="month",v="quarter",m="year",g="date",E="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(ce){var le=["th","st","nd","rd"],Z=ce%100;return"["+ce+(le[(Z-20)%10]||le[Z]||le[0])+"]"}},_=function(ce,le,Z){var j=String(ce);return!j||j.length>=le?ce:""+Array(le+1-j.length).join(Z)+ce},O={s:_,z:function(ce){var le=-ce.utcOffset(),Z=Math.abs(le),j=Math.floor(Z/60),ue=Z%60;return(le<=0?"+":"-")+_(j,2,"0")+":"+_(ue,2,"0")},m:function ce(le,Z){if(le.date()<Z.date())return-ce(Z,le);var j=12*(Z.year()-le.year())+(Z.month()-le.month()),ue=le.clone().add(j,p),ye=Z-ue<0,ve=le.clone().add(j+(ye?-1:1),p);return+(-(j+(Z-ue)/(ye?ue-ve:ve-ue))||0)},a:function(ce){return ce<0?Math.ceil(ce)||0:Math.floor(ce)},p:function(ce){return{M:p,y:m,w:d,d:f,D:g,h:u,m:s,s:a,ms:o,Q:v}[ce]||String(ce||"").toLowerCase().replace(/s$/,"")},u:function(ce){return ce===void 0}},N="en",L={};L[N]=k;var A="$isDayjsObject",P=function(ce){return ce instanceof Se||!(!ce||!ce[A])},U=function ce(le,Z,j){var ue;if(!le)return N;if(typeof le=="string"){var ye=le.toLowerCase();L[ye]&&(ue=ye),Z&&(L[ye]=Z,ue=ye);var ve=le.split("-");if(!ue&&ve.length>1)return ce(ve[0])}else{var ke=le.name;L[ke]=le,ue=ke}return!j&&ue&&(N=ue),ue||!j&&N},J=function(ce,le){if(P(ce))return ce.clone();var Z=typeof le=="object"?le:{};return Z.date=ce,Z.args=arguments,new Se(Z)},re=O;re.l=U,re.i=P,re.w=function(ce,le){return J(ce,{locale:le.$L,utc:le.$u,x:le.$x,$offset:le.$offset})};var Se=function(){function ce(Z){this.$L=U(Z.locale,null,!0),this.parse(Z),this.$x=this.$x||Z.x||{},this[A]=!0}var le=ce.prototype;return le.parse=function(Z){this.$d=function(j){var ue=j.date,ye=j.utc;if(ue===null)return new Date(NaN);if(re.u(ue))return new Date;if(ue instanceof Date)return new Date(ue);if(typeof ue=="string"&&!/Z$/i.test(ue)){var ve=ue.match(w);if(ve){var ke=ve[2]-1||0,Te=(ve[7]||"0").substring(0,3);return ye?new Date(Date.UTC(ve[1],ke,ve[3]||1,ve[4]||0,ve[5]||0,ve[6]||0,Te)):new Date(ve[1],ke,ve[3]||1,ve[4]||0,ve[5]||0,ve[6]||0,Te)}}return new Date(ue)}(Z),this.init()},le.init=function(){var Z=this.$d;this.$y=Z.getFullYear(),this.$M=Z.getMonth(),this.$D=Z.getDate(),this.$W=Z.getDay(),this.$H=Z.getHours(),this.$m=Z.getMinutes(),this.$s=Z.getSeconds(),this.$ms=Z.getMilliseconds()},le.$utils=function(){return re},le.isValid=function(){return this.$d.toString()!==E},le.isSame=function(Z,j){var ue=J(Z);return this.startOf(j)<=ue&&ue<=this.endOf(j)},le.isAfter=function(Z,j){return J(Z)<this.startOf(j)},le.isBefore=function(Z,j){return this.endOf(j)<J(Z)},le.$g=function(Z,j,ue){return re.u(Z)?this[j]:this.set(ue,Z)},le.unix=function(){return Math.floor(this.valueOf()/1e3)},le.valueOf=function(){return this.$d.getTime()},le.startOf=function(Z,j){var ue=this,ye=!!re.u(j)||j,ve=re.p(Z),ke=function(K,te){var ne=re.w(ue.$u?Date.UTC(ue.$y,te,K):new Date(ue.$y,te,K),ue);return ye?ne:ne.endOf(f)},Te=function(K,te){return re.w(ue.toDate()[K].apply(ue.toDate("s"),(ye?[0,0,0,0]:[23,59,59,999]).slice(te)),ue)},We=this.$W,we=this.$M,De=this.$D,pe="set"+(this.$u?"UTC":"");switch(ve){case m:return ye?ke(1,0):ke(31,11);case p:return ye?ke(1,we):ke(0,we+1);case d:var F=this.$locale().weekStart||0,G=(We<F?We+7:We)-F;return ke(ye?De-G:De+(6-G),we);case f:case g:return Te(pe+"Hours",0);case u:return Te(pe+"Minutes",1);case s:return Te(pe+"Seconds",2);case a:return Te(pe+"Milliseconds",3);default:return this.clone()}},le.endOf=function(Z){return this.startOf(Z,!1)},le.$set=function(Z,j){var ue,ye=re.p(Z),ve="set"+(this.$u?"UTC":""),ke=(ue={},ue[f]=ve+"Date",ue[g]=ve+"Date",ue[p]=ve+"Month",ue[m]=ve+"FullYear",ue[u]=ve+"Hours",ue[s]=ve+"Minutes",ue[a]=ve+"Seconds",ue[o]=ve+"Milliseconds",ue)[ye],Te=ye===f?this.$D+(j-this.$W):j;if(ye===p||ye===m){var We=this.clone().set(g,1);We.$d[ke](Te),We.init(),this.$d=We.set(g,Math.min(this.$D,We.daysInMonth())).$d}else ke&&this.$d[ke](Te);return this.init(),this},le.set=function(Z,j){return this.clone().$set(Z,j)},le.get=function(Z){return this[re.p(Z)]()},le.add=function(Z,j){var ue,ye=this;Z=Number(Z);var ve=re.p(j),ke=function(we){var De=J(ye);return re.w(De.date(De.date()+Math.round(we*Z)),ye)};if(ve===p)return this.set(p,this.$M+Z);if(ve===m)return this.set(m,this.$y+Z);if(ve===f)return ke(1);if(ve===d)return ke(7);var Te=(ue={},ue[s]=n,ue[u]=i,ue[a]=r,ue)[ve]||1,We=this.$d.getTime()+Z*Te;return re.w(We,this)},le.subtract=function(Z,j){return this.add(-1*Z,j)},le.format=function(Z){var j=this,ue=this.$locale();if(!this.isValid())return ue.invalidDate||E;var ye=Z||"YYYY-MM-DDTHH:mm:ssZ",ve=re.z(this),ke=this.$H,Te=this.$m,We=this.$M,we=ue.weekdays,De=ue.months,pe=ue.meridiem,F=function(te,ne,he,Ne){return te&&(te[ne]||te(j,ye))||he[ne].slice(0,Ne)},G=function(te){return re.s(ke%12||12,te,"0")},K=pe||function(te,ne,he){var Ne=te<12?"AM":"PM";return he?Ne.toLowerCase():Ne};return ye.replace(x,function(te,ne){return ne||function(he){switch(he){case"YY":return String(j.$y).slice(-2);case"YYYY":return re.s(j.$y,4,"0");case"M":return We+1;case"MM":return re.s(We+1,2,"0");case"MMM":return F(ue.monthsShort,We,De,3);case"MMMM":return F(De,We);case"D":return j.$D;case"DD":return re.s(j.$D,2,"0");case"d":return String(j.$W);case"dd":return F(ue.weekdaysMin,j.$W,we,2);case"ddd":return F(ue.weekdaysShort,j.$W,we,3);case"dddd":return we[j.$W];case"H":return String(ke);case"HH":return re.s(ke,2,"0");case"h":return G(1);case"hh":return G(2);case"a":return K(ke,Te,!0);case"A":return K(ke,Te,!1);case"m":return String(Te);case"mm":return re.s(Te,2,"0");case"s":return String(j.$s);case"ss":return re.s(j.$s,2,"0");case"SSS":return re.s(j.$ms,3,"0");case"Z":return ve}return null}(te)||ve.replace(":","")})},le.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},le.diff=function(Z,j,ue){var ye,ve=this,ke=re.p(j),Te=J(Z),We=(Te.utcOffset()-this.utcOffset())*n,we=this-Te,De=function(){return re.m(ve,Te)};switch(ke){case m:ye=De()/12;break;case p:ye=De();break;case v:ye=De()/3;break;case d:ye=(we-We)/6048e5;break;case f:ye=(we-We)/864e5;break;case u:ye=we/i;break;case s:ye=we/n;break;case a:ye=we/r;break;default:ye=we}return ue?ye:re.a(ye)},le.daysInMonth=function(){return this.endOf(p).$D},le.$locale=function(){return L[this.$L]},le.locale=function(Z,j){if(!Z)return this.$L;var ue=this.clone(),ye=U(Z,j,!0);return ye&&(ue.$L=ye),ue},le.clone=function(){return re.w(this.$d,this)},le.toDate=function(){return new Date(this.valueOf())},le.toJSON=function(){return this.isValid()?this.toISOString():null},le.toISOString=function(){return this.$d.toISOString()},le.toString=function(){return this.$d.toUTCString()},ce}(),Fe=Se.prototype;return J.prototype=Fe,[["$ms",o],["$s",a],["$m",s],["$H",u],["$W",f],["$M",p],["$y",m],["$D",g]].forEach(function(ce){Fe[ce[1]]=function(le){return this.$g(le,ce[0],ce[1])}}),J.extend=function(ce,le){return ce.$i||(ce(le,Se,J),ce.$i=!0),J},J.locale=U,J.isDayjs=P,J.unix=function(ce){return J(1e3*ce)},J.en=L[N],J.Ls=L,J.p={},J})})(lb);var uR=lb.exports;const la=Rp(uR);var ub={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(Jn,function(){var r="month",n="quarter";return function(i,o){var a=o.prototype;a.quarter=function(f){return this.$utils().u(f)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(f-1))};var s=a.add;a.add=function(f,d){return f=Number(f),this.$utils().p(d)===n?this.add(3*f,r):s.bind(this)(f,d)};var u=a.startOf;a.startOf=function(f,d){var p=this.$utils(),v=!!p.u(d)||d;if(p.p(f)===n){var m=this.quarter()-1;return v?this.month(3*m).startOf(r).startOf("day"):this.month(3*m+2).endOf(r).endOf("day")}return u.bind(this)(f,d)}}})})(ub);var cR=ub.exports;const fR=Rp(cR);/*!
|
|
28
|
+
* sweetalert2 v11.26.10
|
|
29
|
+
* Released under the MIT License.
|
|
30
|
+
*/function cb(t,e,r){if(typeof t=="function"?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}function dR(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fb(t,e){return t.get(cb(t,e))}function pR(t,e,r){dR(t,e),e.set(t,r)}function hR(t,e,r){return t.set(cb(t,e),r),r}const vR=100,Me={},mR=()=>{Me.previousActiveElement instanceof HTMLElement?(Me.previousActiveElement.focus(),Me.previousActiveElement=null):document.body&&document.body.focus()},gR=t=>new Promise(e=>{if(!t)return e();const r=window.scrollX,n=window.scrollY;Me.restoreFocusTimeout=setTimeout(()=>{mR(),e()},vR),window.scrollTo(r,n)}),db="swal2-",W=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error","draggable","dragging"].reduce((t,e)=>(t[e]=db+e,t),{}),Ec=["success","warning","info","question","error"].reduce((t,e)=>(t[e]=db+e,t),{}),pb="SweetAlert2:",Wp=t=>t.charAt(0).toUpperCase()+t.slice(1),$r=t=>{console.warn(`${pb} ${typeof t=="object"?t.join(" "):t}`)},ua=t=>{console.error(`${pb} ${t}`)},hb=[],yR=t=>{hb.includes(t)||(hb.push(t),$r(t))},vb=(t,e=null)=>{yR(`"${t}" is deprecated and will be removed in the next major release.${e?` Use "${e}" instead.`:""}`)},xc=t=>typeof t=="function"?t():t,jp=t=>t&&typeof t.toPromise=="function",Rl=t=>jp(t)?t.toPromise():Promise.resolve(t),Gp=t=>t&&Promise.resolve(t)===t,Fr=()=>document.body.querySelector(`.${W.container}`),Pl=t=>{const e=Fr();return e?e.querySelector(t):null},hn=t=>Pl(`.${t}`),ut=()=>hn(W.popup),fs=()=>hn(W.icon),bR=()=>hn(W["icon-content"]),mb=()=>hn(W.title),Kp=()=>hn(W["html-container"]),gb=()=>hn(W.image),Yp=()=>hn(W["progress-steps"]),Cc=()=>hn(W["validation-message"]),gi=()=>Pl(`.${W.actions} .${W.confirm}`),ds=()=>Pl(`.${W.actions} .${W.cancel}`),ca=()=>Pl(`.${W.actions} .${W.deny}`),wR=()=>hn(W["input-label"]),ps=()=>Pl(`.${W.loader}`),Bl=()=>hn(W.actions),yb=()=>hn(W.footer),kc=()=>hn(W["timer-progress-bar"]),Xp=()=>hn(W.close),ER=`
|
|
31
|
+
a[href],
|
|
32
|
+
area[href],
|
|
33
|
+
input:not([disabled]),
|
|
34
|
+
select:not([disabled]),
|
|
35
|
+
textarea:not([disabled]),
|
|
36
|
+
button:not([disabled]),
|
|
37
|
+
iframe,
|
|
38
|
+
object,
|
|
39
|
+
embed,
|
|
40
|
+
[tabindex="0"],
|
|
41
|
+
[contenteditable],
|
|
42
|
+
audio[controls],
|
|
43
|
+
video[controls],
|
|
44
|
+
summary
|
|
45
|
+
`,Jp=()=>{const t=ut();if(!t)return[];const e=t.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),r=Array.from(e).sort((o,a)=>{const s=parseInt(o.getAttribute("tabindex")||"0"),u=parseInt(a.getAttribute("tabindex")||"0");return s>u?1:s<u?-1:0}),n=t.querySelectorAll(ER),i=Array.from(n).filter(o=>o.getAttribute("tabindex")!=="-1");return[...new Set(r.concat(i))].filter(o=>Qr(o))},Zp=()=>Fi(document.body,W.shown)&&!Fi(document.body,W["toast-shown"])&&!Fi(document.body,W["no-backdrop"]),Tc=()=>{const t=ut();return t?Fi(t,W.toast):!1},xR=()=>{const t=ut();return t?t.hasAttribute("data-loading"):!1},vn=(t,e)=>{if(t.textContent="",e){const n=new DOMParser().parseFromString(e,"text/html"),i=n.querySelector("head");i&&Array.from(i.childNodes).forEach(a=>{t.appendChild(a)});const o=n.querySelector("body");o&&Array.from(o.childNodes).forEach(a=>{a instanceof HTMLVideoElement||a instanceof HTMLAudioElement?t.appendChild(a.cloneNode(!0)):t.appendChild(a)})}},Fi=(t,e)=>{if(!e)return!1;const r=e.split(/\s+/);for(let n=0;n<r.length;n++)if(!t.classList.contains(r[n]))return!1;return!0},CR=(t,e)=>{Array.from(t.classList).forEach(r=>{!Object.values(W).includes(r)&&!Object.values(Ec).includes(r)&&!Object.values(e.showClass||{}).includes(r)&&t.classList.remove(r)})},mn=(t,e,r)=>{if(CR(t,e),!e.customClass)return;const n=e.customClass[r];if(n){if(typeof n!="string"&&!n.forEach){$r(`Invalid type of customClass.${r}! Expected string or iterable object, got "${typeof n}"`);return}dt(t,n)}},Sc=(t,e)=>{if(!e)return null;switch(e){case"select":case"textarea":case"file":return t.querySelector(`.${W.popup} > .${W[e]}`);case"checkbox":return t.querySelector(`.${W.popup} > .${W.checkbox} input`);case"radio":return t.querySelector(`.${W.popup} > .${W.radio} input:checked`)||t.querySelector(`.${W.popup} > .${W.radio} input:first-child`);case"range":return t.querySelector(`.${W.popup} > .${W.range} input`);default:return t.querySelector(`.${W.popup} > .${W.input}`)}},bb=t=>{if(t.focus(),t.type!=="file"){const e=t.value;t.value="",t.value=e}},wb=(t,e,r)=>{!t||!e||(typeof e=="string"&&(e=e.split(/\s+/).filter(Boolean)),e.forEach(n=>{Array.isArray(t)?t.forEach(i=>{r?i.classList.add(n):i.classList.remove(n)}):r?t.classList.add(n):t.classList.remove(n)}))},dt=(t,e)=>{wb(t,e,!0)},Dn=(t,e)=>{wb(t,e,!1)},xo=(t,e)=>{const r=Array.from(t.children);for(let n=0;n<r.length;n++){const i=r[n];if(i instanceof HTMLElement&&Fi(i,e))return i}},fa=(t,e,r)=>{r===`${parseInt(`${r}`)}`&&(r=parseInt(r)),r||parseInt(`${r}`)===0?t.style.setProperty(e,typeof r=="number"?`${r}px`:r):t.style.removeProperty(e)},Qt=(t,e="flex")=>{t&&(t.style.display=e)},Sr=t=>{t&&(t.style.display="none")},Qp=(t,e="block")=>{t&&new MutationObserver(()=>{$l(t,t.innerHTML,e)}).observe(t,{childList:!0,subtree:!0})},Eb=(t,e,r,n)=>{const i=t.querySelector(e);i&&i.style.setProperty(r,n)},$l=(t,e,r="flex")=>{e?Qt(t,r):Sr(t)},Qr=t=>!!(t&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)),kR=()=>!Qr(gi())&&!Qr(ca())&&!Qr(ds()),eh=t=>t.scrollHeight>t.clientHeight,TR=(t,e)=>{let r=t;for(;r&&r!==e;){if(eh(r))return!0;r=r.parentElement}return!1},xb=t=>{const e=window.getComputedStyle(t),r=parseFloat(e.getPropertyValue("animation-duration")||"0"),n=parseFloat(e.getPropertyValue("transition-duration")||"0");return r>0||n>0},th=(t,e=!1)=>{const r=kc();r&&Qr(r)&&(e&&(r.style.transition="none",r.style.width="100%"),setTimeout(()=>{r.style.transition=`width ${t/1e3}s linear`,r.style.width="0%"},10))},SR=()=>{const t=kc();if(!t)return;const e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";const r=parseInt(window.getComputedStyle(t).width),n=e/r*100;t.style.width=`${n}%`},_R=()=>typeof window>"u"||typeof document>"u",OR=`
|
|
46
|
+
<div aria-labelledby="${W.title}" aria-describedby="${W["html-container"]}" class="${W.popup}" tabindex="-1">
|
|
47
|
+
<button type="button" class="${W.close}"></button>
|
|
48
|
+
<ul class="${W["progress-steps"]}"></ul>
|
|
49
|
+
<div class="${W.icon}"></div>
|
|
50
|
+
<img class="${W.image}" />
|
|
51
|
+
<h2 class="${W.title}" id="${W.title}"></h2>
|
|
52
|
+
<div class="${W["html-container"]}" id="${W["html-container"]}"></div>
|
|
53
|
+
<input class="${W.input}" id="${W.input}" />
|
|
54
|
+
<input type="file" class="${W.file}" />
|
|
55
|
+
<div class="${W.range}">
|
|
56
|
+
<input type="range" />
|
|
57
|
+
<output></output>
|
|
58
|
+
</div>
|
|
59
|
+
<select class="${W.select}" id="${W.select}"></select>
|
|
60
|
+
<div class="${W.radio}"></div>
|
|
61
|
+
<label class="${W.checkbox}">
|
|
62
|
+
<input type="checkbox" id="${W.checkbox}" />
|
|
63
|
+
<span class="${W.label}"></span>
|
|
64
|
+
</label>
|
|
65
|
+
<textarea class="${W.textarea}" id="${W.textarea}"></textarea>
|
|
66
|
+
<div class="${W["validation-message"]}" id="${W["validation-message"]}"></div>
|
|
67
|
+
<div class="${W.actions}">
|
|
68
|
+
<div class="${W.loader}"></div>
|
|
69
|
+
<button type="button" class="${W.confirm}"></button>
|
|
70
|
+
<button type="button" class="${W.deny}"></button>
|
|
71
|
+
<button type="button" class="${W.cancel}"></button>
|
|
72
|
+
</div>
|
|
73
|
+
<div class="${W.footer}"></div>
|
|
74
|
+
<div class="${W["timer-progress-bar-container"]}">
|
|
75
|
+
<div class="${W["timer-progress-bar"]}"></div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
`.replace(/(^|\n)\s*/g,""),AR=()=>{const t=Fr();return t?(t.remove(),Dn([document.documentElement,document.body],[W["no-backdrop"],W["toast-shown"],W["has-column"]]),!0):!1},da=()=>{Me.currentInstance.resetValidationMessage()},MR=()=>{const t=ut(),e=xo(t,W.input),r=xo(t,W.file),n=t.querySelector(`.${W.range} input`),i=t.querySelector(`.${W.range} output`),o=xo(t,W.select),a=t.querySelector(`.${W.checkbox} input`),s=xo(t,W.textarea);e.oninput=da,r.onchange=da,o.onchange=da,a.onchange=da,s.oninput=da,n.oninput=()=>{da(),i.value=n.value},n.onchange=()=>{da(),i.value=n.value}},NR=t=>typeof t=="string"?document.querySelector(t):t,LR=t=>{const e=ut();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")},DR=t=>{window.getComputedStyle(t).direction==="rtl"&&(dt(Fr(),W.rtl),Me.isRTL=!0)},IR=t=>{const e=AR();if(_R()){ua("SweetAlert2 requires document to initialize");return}const r=document.createElement("div");r.className=W.container,e&&dt(r,W["no-transition"]),vn(r,OR),r.dataset.swal2Theme=t.theme;const n=NR(t.target);n.appendChild(r),t.topLayer&&(r.setAttribute("popover",""),r.showPopover()),LR(t),DR(n),MR()},rh=(t,e)=>{t instanceof HTMLElement?e.appendChild(t):typeof t=="object"?RR(t,e):t&&vn(e,t)},RR=(t,e)=>{t.jquery?PR(e,t):vn(e,t.toString())},PR=(t,e)=>{if(t.textContent="",0 in e)for(let r=0;r in e;r++)t.appendChild(e[r].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},BR=(t,e)=>{const r=Bl(),n=ps();!r||!n||(!e.showConfirmButton&&!e.showDenyButton&&!e.showCancelButton?Sr(r):Qt(r),mn(r,e,"actions"),$R(r,n,e),vn(n,e.loaderHtml||""),mn(n,e,"loader"))};function $R(t,e,r){const n=gi(),i=ca(),o=ds();!n||!i||!o||(ih(n,"confirm",r),ih(i,"deny",r),ih(o,"cancel",r),FR(n,i,o,r),r.reverseButtons&&(r.toast?(t.insertBefore(o,n),t.insertBefore(i,n)):(t.insertBefore(o,e),t.insertBefore(i,e),t.insertBefore(n,e))))}function FR(t,e,r,n){if(!n.buttonsStyling){Dn([t,e,r],W.styled);return}dt([t,e,r],W.styled),n.confirmButtonColor&&t.style.setProperty("--swal2-confirm-button-background-color",n.confirmButtonColor),n.denyButtonColor&&e.style.setProperty("--swal2-deny-button-background-color",n.denyButtonColor),n.cancelButtonColor&&r.style.setProperty("--swal2-cancel-button-background-color",n.cancelButtonColor),nh(t),nh(e),nh(r)}function nh(t){const e=window.getComputedStyle(t);if(e.getPropertyValue("--swal2-action-button-focus-box-shadow"))return;const r=e.backgroundColor.replace(/rgba?\((\d+), (\d+), (\d+).*/,"rgba($1, $2, $3, 0.5)");t.style.setProperty("--swal2-action-button-focus-box-shadow",e.getPropertyValue("--swal2-outline").replace(/ rgba\(.*/,` ${r}`))}function ih(t,e,r){const n=Wp(e);$l(t,r[`show${n}Button`],"inline-block"),vn(t,r[`${e}ButtonText`]||""),t.setAttribute("aria-label",r[`${e}ButtonAriaLabel`]||""),t.className=W[e],mn(t,r,`${e}Button`)}const HR=(t,e)=>{const r=Xp();r&&(vn(r,e.closeButtonHtml||""),mn(r,e,"closeButton"),$l(r,e.showCloseButton),r.setAttribute("aria-label",e.closeButtonAriaLabel||""))},UR=(t,e)=>{const r=Fr();r&&(zR(r,e.backdrop),qR(r,e.position),VR(r,e.grow),mn(r,e,"container"))};function zR(t,e){typeof e=="string"?t.style.background=e:e||dt([document.documentElement,document.body],W["no-backdrop"])}function qR(t,e){e&&(e in W?dt(t,W[e]):($r('The "position" parameter is not valid, defaulting to "center"'),dt(t,W.center)))}function VR(t,e){e&&dt(t,W[`grow-${e}`])}var Et={innerParams:new WeakMap,domCache:new WeakMap};const WR=["input","file","range","select","radio","checkbox","textarea"],jR=(t,e)=>{const r=ut();if(!r)return;const n=Et.innerParams.get(t),i=!n||e.input!==n.input;WR.forEach(o=>{const a=xo(r,W[o]);a&&(YR(o,e.inputAttributes),a.className=W[o],i&&Sr(a))}),e.input&&(i&&GR(e),XR(e))},GR=t=>{if(!t.input)return;if(!Dt[t.input]){ua(`Unexpected type of input! Expected ${Object.keys(Dt).join(" | ")}, got "${t.input}"`);return}const e=Cb(t.input);if(!e)return;const r=Dt[t.input](e,t);Qt(e),t.inputAutoFocus&&setTimeout(()=>{bb(r)})},KR=t=>{for(let e=0;e<t.attributes.length;e++){const r=t.attributes[e].name;["id","type","value","style"].includes(r)||t.removeAttribute(r)}},YR=(t,e)=>{const r=ut();if(!r)return;const n=Sc(r,t);if(n){KR(n);for(const i in e)n.setAttribute(i,e[i])}},XR=t=>{if(!t.input)return;const e=Cb(t.input);e&&mn(e,t,"input")},oh=(t,e)=>{!t.placeholder&&e.inputPlaceholder&&(t.placeholder=e.inputPlaceholder)},Fl=(t,e,r)=>{if(r.inputLabel){const n=document.createElement("label"),i=W["input-label"];n.setAttribute("for",t.id),n.className=i,typeof r.customClass=="object"&&dt(n,r.customClass.inputLabel),n.innerText=r.inputLabel,e.insertAdjacentElement("beforebegin",n)}},Cb=t=>{const e=ut();if(e)return xo(e,W[t]||W.input)},_c=(t,e)=>{["string","number"].includes(typeof e)?t.value=`${e}`:Gp(e)||$r(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof e}"`)},Dt={};Dt.text=Dt.email=Dt.password=Dt.number=Dt.tel=Dt.url=Dt.search=Dt.date=Dt["datetime-local"]=Dt.time=Dt.week=Dt.month=(t,e)=>(_c(t,e.inputValue),Fl(t,t,e),oh(t,e),t.type=e.input,t),Dt.file=(t,e)=>(Fl(t,t,e),oh(t,e),t),Dt.range=(t,e)=>{const r=t.querySelector("input"),n=t.querySelector("output");return _c(r,e.inputValue),r.type=e.input,_c(n,e.inputValue),Fl(r,t,e),t},Dt.select=(t,e)=>{if(t.textContent="",e.inputPlaceholder){const r=document.createElement("option");vn(r,e.inputPlaceholder),r.value="",r.disabled=!0,r.selected=!0,t.appendChild(r)}return Fl(t,t,e),t},Dt.radio=t=>(t.textContent="",t),Dt.checkbox=(t,e)=>{const r=Sc(ut(),"checkbox");r.value="1",r.checked=!!e.inputValue;const n=t.querySelector("span");return vn(n,e.inputPlaceholder||e.inputLabel),r},Dt.textarea=(t,e)=>{_c(t,e.inputValue),oh(t,e),Fl(t,t,e);const r=n=>parseInt(window.getComputedStyle(n).marginLeft)+parseInt(window.getComputedStyle(n).marginRight);return setTimeout(()=>{if("MutationObserver"in window){const n=parseInt(window.getComputedStyle(ut()).width),i=()=>{if(!document.body.contains(t))return;const o=t.offsetWidth+r(t);o>n?ut().style.width=`${o}px`:fa(ut(),"width",e.width)};new MutationObserver(i).observe(t,{attributes:!0,attributeFilter:["style"]})}}),t};const JR=(t,e)=>{const r=Kp();r&&(Qp(r),mn(r,e,"htmlContainer"),e.html?(rh(e.html,r),Qt(r,"block")):e.text?(r.textContent=e.text,Qt(r,"block")):Sr(r),jR(t,e))},ZR=(t,e)=>{const r=yb();r&&(Qp(r),$l(r,!!e.footer,"block"),e.footer&&rh(e.footer,r),mn(r,e,"footer"))},QR=(t,e)=>{const r=Et.innerParams.get(t),n=fs();if(!n)return;if(r&&e.icon===r.icon){Sb(n,e),kb(n,e);return}if(!e.icon&&!e.iconHtml){Sr(n);return}if(e.icon&&Object.keys(Ec).indexOf(e.icon)===-1){ua(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${e.icon}"`),Sr(n);return}Qt(n),Sb(n,e),kb(n,e),dt(n,e.showClass&&e.showClass.icon),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",Tb)},kb=(t,e)=>{for(const[r,n]of Object.entries(Ec))e.icon!==r&&Dn(t,n);dt(t,e.icon&&Ec[e.icon]),rP(t,e),Tb(),mn(t,e,"icon")},Tb=()=>{const t=ut();if(!t)return;const e=window.getComputedStyle(t).getPropertyValue("background-color"),r=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let n=0;n<r.length;n++)r[n].style.backgroundColor=e},eP=t=>`
|
|
79
|
+
${t.animation?'<div class="swal2-success-circular-line-left"></div>':""}
|
|
80
|
+
<span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
|
|
81
|
+
<div class="swal2-success-ring"></div>
|
|
82
|
+
${t.animation?'<div class="swal2-success-fix"></div>':""}
|
|
83
|
+
${t.animation?'<div class="swal2-success-circular-line-right"></div>':""}
|
|
84
|
+
`,tP=`
|
|
85
|
+
<span class="swal2-x-mark">
|
|
86
|
+
<span class="swal2-x-mark-line-left"></span>
|
|
87
|
+
<span class="swal2-x-mark-line-right"></span>
|
|
88
|
+
</span>
|
|
89
|
+
`,Sb=(t,e)=>{if(!e.icon&&!e.iconHtml)return;let r=t.innerHTML,n="";e.iconHtml?n=_b(e.iconHtml):e.icon==="success"?(n=eP(e),r=r.replace(/ style=".*?"/g,"")):e.icon==="error"?n=tP:e.icon&&(n=_b({question:"?",warning:"!",info:"i"}[e.icon])),r.trim()!==n.trim()&&vn(t,n)},rP=(t,e)=>{if(e.iconColor){t.style.color=e.iconColor,t.style.borderColor=e.iconColor;for(const r of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])Eb(t,r,"background-color",e.iconColor);Eb(t,".swal2-success-ring","border-color",e.iconColor)}},_b=t=>`<div class="${W["icon-content"]}">${t}</div>`,nP=(t,e)=>{const r=gb();if(r){if(!e.imageUrl){Sr(r);return}Qt(r,""),r.setAttribute("src",e.imageUrl),r.setAttribute("alt",e.imageAlt||""),fa(r,"width",e.imageWidth),fa(r,"height",e.imageHeight),r.className=W.image,mn(r,e,"image")}};let ah=!1,Ob=0,Ab=0,Mb=0,Nb=0;const iP=t=>{t.addEventListener("mousedown",Oc),document.body.addEventListener("mousemove",Ac),t.addEventListener("mouseup",Mc),t.addEventListener("touchstart",Oc),document.body.addEventListener("touchmove",Ac),t.addEventListener("touchend",Mc)},oP=t=>{t.removeEventListener("mousedown",Oc),document.body.removeEventListener("mousemove",Ac),t.removeEventListener("mouseup",Mc),t.removeEventListener("touchstart",Oc),document.body.removeEventListener("touchmove",Ac),t.removeEventListener("touchend",Mc)},Oc=t=>{const e=ut();if(t.target===e||fs().contains(t.target)){ah=!0;const r=Lb(t);Ob=r.clientX,Ab=r.clientY,Mb=parseInt(e.style.insetInlineStart)||0,Nb=parseInt(e.style.insetBlockStart)||0,dt(e,"swal2-dragging")}},Ac=t=>{const e=ut();if(ah){let{clientX:r,clientY:n}=Lb(t);const i=r-Ob;e.style.insetInlineStart=`${Mb+(Me.isRTL?-i:i)}px`,e.style.insetBlockStart=`${Nb+(n-Ab)}px`}},Mc=()=>{const t=ut();ah=!1,Dn(t,"swal2-dragging")},Lb=t=>{let e=0,r=0;return t.type.startsWith("mouse")?(e=t.clientX,r=t.clientY):t.type.startsWith("touch")&&(e=t.touches[0].clientX,r=t.touches[0].clientY),{clientX:e,clientY:r}},aP=(t,e)=>{const r=Fr(),n=ut();if(!(!r||!n)){if(e.toast){fa(r,"width",e.width),n.style.width="100%";const i=ps();i&&n.insertBefore(i,fs())}else fa(n,"width",e.width);fa(n,"padding",e.padding),e.color&&(n.style.color=e.color),e.background&&(n.style.background=e.background),Sr(Cc()),sP(n,e),e.draggable&&!e.toast?(dt(n,W.draggable),iP(n)):(Dn(n,W.draggable),oP(n))}},sP=(t,e)=>{const r=e.showClass||{};t.className=`${W.popup} ${Qr(t)?r.popup:""}`,e.toast?(dt([document.documentElement,document.body],W["toast-shown"]),dt(t,W.toast)):dt(t,W.modal),mn(t,e,"popup"),typeof e.customClass=="string"&&dt(t,e.customClass),e.icon&&dt(t,W[`icon-${e.icon}`])},lP=(t,e)=>{const r=Yp();if(!r)return;const{progressSteps:n,currentProgressStep:i}=e;if(!n||n.length===0||i===void 0){Sr(r);return}Qt(r),r.textContent="",i>=n.length&&$r("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),n.forEach((o,a)=>{const s=uP(o);if(r.appendChild(s),a===i&&dt(s,W["active-progress-step"]),a!==n.length-1){const u=cP(e);r.appendChild(u)}})},uP=t=>{const e=document.createElement("li");return dt(e,W["progress-step"]),vn(e,t),e},cP=t=>{const e=document.createElement("li");return dt(e,W["progress-step-line"]),t.progressStepsDistance&&fa(e,"width",t.progressStepsDistance),e},fP=(t,e)=>{const r=mb();r&&(Qp(r),$l(r,!!(e.title||e.titleText),"block"),e.title&&rh(e.title,r),e.titleText&&(r.innerText=e.titleText),mn(r,e,"title"))},Db=(t,e)=>{aP(t,e),UR(t,e),lP(t,e),QR(t,e),nP(t,e),fP(t,e),HR(t,e),JR(t,e),BR(t,e),ZR(t,e);const r=ut();typeof e.didRender=="function"&&r&&e.didRender(r),Me.eventEmitter.emit("didRender",r)},dP=()=>Qr(ut()),Ib=()=>{var t;return(t=gi())===null||t===void 0?void 0:t.click()},pP=()=>{var t;return(t=ca())===null||t===void 0?void 0:t.click()},hP=()=>{var t;return(t=ds())===null||t===void 0?void 0:t.click()},hs=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Rb=t=>{t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1)},vP=(t,e,r)=>{Rb(t),e.toast||(t.keydownHandler=n=>gP(e,n,r),t.keydownTarget=e.keydownListenerCapture?window:ut(),t.keydownListenerCapture=e.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)},sh=(t,e)=>{var r;const n=Jp();if(n.length){t=t+e,t===-2&&(t=n.length-1),t===n.length?t=0:t===-1&&(t=n.length-1),n[t].focus();return}(r=ut())===null||r===void 0||r.focus()},Pb=["ArrowRight","ArrowDown"],mP=["ArrowLeft","ArrowUp"],gP=(t,e,r)=>{t&&(e.isComposing||e.keyCode===229||(t.stopKeydownPropagation&&e.stopPropagation(),e.key==="Enter"?yP(e,t):e.key==="Tab"?bP(e):[...Pb,...mP].includes(e.key)?wP(e.key):e.key==="Escape"&&EP(e,t,r)))},yP=(t,e)=>{if(!xc(e.allowEnterKey))return;const r=Sc(ut(),e.input);if(t.target&&r&&t.target instanceof HTMLElement&&t.target.outerHTML===r.outerHTML){if(["textarea","file"].includes(e.input))return;Ib(),t.preventDefault()}},bP=t=>{const e=t.target,r=Jp();let n=-1;for(let i=0;i<r.length;i++)if(e===r[i]){n=i;break}t.shiftKey?sh(n,-1):sh(n,1),t.stopPropagation(),t.preventDefault()},wP=t=>{const e=Bl(),r=gi(),n=ca(),i=ds();if(!e||!r||!n||!i)return;const o=[r,n,i];if(document.activeElement instanceof HTMLElement&&!o.includes(document.activeElement))return;const a=Pb.includes(t)?"nextElementSibling":"previousElementSibling";let s=document.activeElement;if(s){for(let u=0;u<e.children.length;u++){if(s=s[a],!s)return;if(s instanceof HTMLButtonElement&&Qr(s))break}s instanceof HTMLButtonElement&&s.focus()}},EP=(t,e,r)=>{t.preventDefault(),xc(e.allowEscapeKey)&&r(hs.esc)};var vs={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const xP=()=>{const t=Fr();Array.from(document.body.children).forEach(r=>{r.contains(t)||(r.hasAttribute("aria-hidden")&&r.setAttribute("data-previous-aria-hidden",r.getAttribute("aria-hidden")||""),r.setAttribute("aria-hidden","true"))})},Bb=()=>{Array.from(document.body.children).forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")||""),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})},$b=typeof window<"u"&&!!window.GestureEvent,CP=()=>{if($b&&!Fi(document.body,W.iosfix)){const t=document.body.scrollTop;document.body.style.top=`${t*-1}px`,dt(document.body,W.iosfix),kP()}},kP=()=>{const t=Fr();if(!t)return;let e;t.ontouchstart=r=>{e=TP(r)},t.ontouchmove=r=>{e&&(r.preventDefault(),r.stopPropagation())}},TP=t=>{const e=t.target,r=Fr(),n=Kp();return!r||!n||SP(t)||_P(t)?!1:e===r||!eh(r)&&e instanceof HTMLElement&&!TR(e,n)&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"&&!(eh(n)&&n.contains(e))},SP=t=>t.touches&&t.touches.length&&t.touches[0].touchType==="stylus",_P=t=>t.touches&&t.touches.length>1,OP=()=>{if(Fi(document.body,W.iosfix)){const t=parseInt(document.body.style.top,10);Dn(document.body,W.iosfix),document.body.style.top="",document.body.scrollTop=t*-1}},AP=()=>{const t=document.createElement("div");t.className=W["scrollbar-measure"],document.body.appendChild(t);const e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e};let ms=null;const MP=t=>{ms===null&&(document.body.scrollHeight>window.innerHeight||t==="scroll")&&(ms=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${ms+AP()}px`)},NP=()=>{ms!==null&&(document.body.style.paddingRight=`${ms}px`,ms=null)};function Fb(t,e,r,n){Tc()?Ub(t,n):(gR(r).then(()=>Ub(t,n)),Rb(Me)),$b?(e.setAttribute("style","display:none !important"),e.removeAttribute("class"),e.innerHTML=""):e.remove(),Zp()&&(NP(),OP(),Bb()),LP()}function LP(){Dn([document.documentElement,document.body],[W.shown,W["height-auto"],W["no-backdrop"],W["toast-shown"]])}function Co(t){t=IP(t);const e=vs.swalPromiseResolve.get(this),r=DP(this);this.isAwaitingPromise?t.isDismissed||(Hl(this),e(t)):r&&e(t)}const DP=t=>{const e=ut();if(!e)return!1;const r=Et.innerParams.get(t);if(!r||Fi(e,r.hideClass.popup))return!1;Dn(e,r.showClass.popup),dt(e,r.hideClass.popup);const n=Fr();return Dn(n,r.showClass.backdrop),dt(n,r.hideClass.backdrop),RP(t,e,r),!0};function Hb(t){const e=vs.swalPromiseReject.get(this);Hl(this),e&&e(t)}const Hl=t=>{t.isAwaitingPromise&&(delete t.isAwaitingPromise,Et.innerParams.get(t)||t._destroy())},IP=t=>typeof t>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},t),RP=(t,e,r)=>{var n;const i=Fr(),o=xb(e);typeof r.willClose=="function"&&r.willClose(e),(n=Me.eventEmitter)===null||n===void 0||n.emit("willClose",e),o?PP(t,e,i,r.returnFocus,r.didClose):Fb(t,i,r.returnFocus,r.didClose)},PP=(t,e,r,n,i)=>{Me.swalCloseEventFinishedCallback=Fb.bind(null,t,r,n,i);const o=function(a){if(a.target===e){var s;(s=Me.swalCloseEventFinishedCallback)===null||s===void 0||s.call(Me),delete Me.swalCloseEventFinishedCallback,e.removeEventListener("animationend",o),e.removeEventListener("transitionend",o)}};e.addEventListener("animationend",o),e.addEventListener("transitionend",o)},Ub=(t,e)=>{setTimeout(()=>{var r;typeof e=="function"&&e.bind(t.params)(),(r=Me.eventEmitter)===null||r===void 0||r.emit("didClose"),t._destroy&&t._destroy()})},gs=t=>{let e=ut();if(e||new ha,e=ut(),!e)return;const r=ps();Tc()?Sr(fs()):BP(e,t),Qt(r),e.setAttribute("data-loading","true"),e.setAttribute("aria-busy","true"),e.focus()},BP=(t,e)=>{const r=Bl(),n=ps();!r||!n||(!e&&Qr(gi())&&(e=gi()),Qt(r),e&&(Sr(e),n.setAttribute("data-button-to-replace",e.className),r.insertBefore(n,e)),dt([t,r],W.loading))},$P=(t,e)=>{e.input==="select"||e.input==="radio"?qP(t,e):["text","email","number","tel","textarea"].some(r=>r===e.input)&&(jp(e.inputValue)||Gp(e.inputValue))&&(gs(gi()),VP(t,e))},FP=(t,e)=>{const r=t.getInput();if(!r)return null;switch(e.input){case"checkbox":return HP(r);case"radio":return UP(r);case"file":return zP(r);default:return e.inputAutoTrim?r.value.trim():r.value}},HP=t=>t.checked?1:0,UP=t=>t.checked?t.value:null,zP=t=>t.files&&t.files.length?t.getAttribute("multiple")!==null?t.files:t.files[0]:null,qP=(t,e)=>{const r=ut();if(!r)return;const n=i=>{e.input==="select"?WP(r,Nc(i),e):e.input==="radio"&&jP(r,Nc(i),e)};jp(e.inputOptions)||Gp(e.inputOptions)?(gs(gi()),Rl(e.inputOptions).then(i=>{t.hideLoading(),n(i)})):typeof e.inputOptions=="object"?n(e.inputOptions):ua(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof e.inputOptions}`)},VP=(t,e)=>{const r=t.getInput();r&&(Sr(r),Rl(e.inputValue).then(n=>{r.value=e.input==="number"?`${parseFloat(n)||0}`:`${n}`,Qt(r),r.focus(),t.hideLoading()}).catch(n=>{ua(`Error in inputValue promise: ${n}`),r.value="",Qt(r),r.focus(),t.hideLoading()}))};function WP(t,e,r){const n=xo(t,W.select);if(!n)return;const i=(o,a,s)=>{const u=document.createElement("option");u.value=s,vn(u,a),u.selected=zb(s,r.inputValue),o.appendChild(u)};e.forEach(o=>{const a=o[0],s=o[1];if(Array.isArray(s)){const u=document.createElement("optgroup");u.label=a,u.disabled=!1,n.appendChild(u),s.forEach(f=>i(u,f[1],f[0]))}else i(n,s,a)}),n.focus()}function jP(t,e,r){const n=xo(t,W.radio);if(!n)return;e.forEach(o=>{const a=o[0],s=o[1],u=document.createElement("input"),f=document.createElement("label");u.type="radio",u.name=W.radio,u.value=a,zb(a,r.inputValue)&&(u.checked=!0);const d=document.createElement("span");vn(d,s),d.className=W.label,f.appendChild(u),f.appendChild(d),n.appendChild(f)});const i=n.querySelectorAll("input");i.length&&i[0].focus()}const Nc=t=>{const e=[];return t instanceof Map?t.forEach((r,n)=>{let i=r;typeof i=="object"&&(i=Nc(i)),e.push([n,i])}):Object.keys(t).forEach(r=>{let n=t[r];typeof n=="object"&&(n=Nc(n)),e.push([r,n])}),e},zb=(t,e)=>!!e&&e.toString()===t.toString(),GP=t=>{const e=Et.innerParams.get(t);t.disableButtons(),e.input?qb(t,"confirm"):uh(t,!0)},KP=t=>{const e=Et.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?qb(t,"deny"):lh(t,!1)},YP=(t,e)=>{t.disableButtons(),e(hs.cancel)},qb=(t,e)=>{const r=Et.innerParams.get(t);if(!r.input){ua(`The "input" parameter is needed to be set when using returnInputValueOn${Wp(e)}`);return}const n=t.getInput(),i=FP(t,r);r.inputValidator?XP(t,i,e):n&&!n.checkValidity()?(t.enableButtons(),t.showValidationMessage(r.validationMessage||n.validationMessage)):e==="deny"?lh(t,i):uh(t,i)},XP=(t,e,r)=>{const n=Et.innerParams.get(t);t.disableInput(),Promise.resolve().then(()=>Rl(n.inputValidator(e,n.validationMessage))).then(o=>{t.enableButtons(),t.enableInput(),o?t.showValidationMessage(o):r==="deny"?lh(t,e):uh(t,e)})},lh=(t,e)=>{const r=Et.innerParams.get(t||void 0);r.showLoaderOnDeny&&gs(ca()),r.preDeny?(t.isAwaitingPromise=!0,Promise.resolve().then(()=>Rl(r.preDeny(e,r.validationMessage))).then(i=>{i===!1?(t.hideLoading(),Hl(t)):t.close({isDenied:!0,value:typeof i>"u"?e:i})}).catch(i=>Wb(t||void 0,i))):t.close({isDenied:!0,value:e})},Vb=(t,e)=>{t.close({isConfirmed:!0,value:e})},Wb=(t,e)=>{t.rejectPromise(e)},uh=(t,e)=>{const r=Et.innerParams.get(t||void 0);r.showLoaderOnConfirm&&gs(),r.preConfirm?(t.resetValidationMessage(),t.isAwaitingPromise=!0,Promise.resolve().then(()=>Rl(r.preConfirm(e,r.validationMessage))).then(i=>{Qr(Cc())||i===!1?(t.hideLoading(),Hl(t)):Vb(t,typeof i>"u"?e:i)}).catch(i=>Wb(t||void 0,i))):Vb(t,e)};function Lc(){const t=Et.innerParams.get(this);if(!t)return;const e=Et.domCache.get(this);Sr(e.loader),Tc()?t.icon&&Qt(fs()):JP(e),Dn([e.popup,e.actions],W.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.denyButton.disabled=!1,e.cancelButton.disabled=!1}const JP=t=>{const e=t.popup.getElementsByClassName(t.loader.getAttribute("data-button-to-replace"));e.length?Qt(e[0],"inline-block"):kR()&&Sr(t.actions)};function jb(){const t=Et.innerParams.get(this),e=Et.domCache.get(this);return e?Sc(e.popup,t.input):null}function Gb(t,e,r){const n=Et.domCache.get(t);e.forEach(i=>{n[i].disabled=r})}function Kb(t,e){const r=ut();if(!(!r||!t))if(t.type==="radio"){const n=r.querySelectorAll(`[name="${W.radio}"]`);for(let i=0;i<n.length;i++)n[i].disabled=e}else t.disabled=e}function Yb(){Gb(this,["confirmButton","denyButton","cancelButton"],!1)}function Xb(){Gb(this,["confirmButton","denyButton","cancelButton"],!0)}function Jb(){Kb(this.getInput(),!1)}function Zb(){Kb(this.getInput(),!0)}function Qb(t){const e=Et.domCache.get(this),r=Et.innerParams.get(this);vn(e.validationMessage,t),e.validationMessage.className=W["validation-message"],r.customClass&&r.customClass.validationMessage&&dt(e.validationMessage,r.customClass.validationMessage),Qt(e.validationMessage);const n=this.getInput();n&&(n.setAttribute("aria-invalid","true"),n.setAttribute("aria-describedby",W["validation-message"]),bb(n),dt(n,W.inputerror))}function ew(){const t=Et.domCache.get(this);t.validationMessage&&Sr(t.validationMessage);const e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedby"),Dn(e,W.inputerror))}const ys={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,draggable:!1,animation:!0,theme:"light",showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0,topLayer:!1},ZP=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","draggable","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","theme","willClose"],QP={allowEnterKey:void 0},eB=["allowOutsideClick","allowEnterKey","backdrop","draggable","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],tw=t=>Object.prototype.hasOwnProperty.call(ys,t),rw=t=>ZP.indexOf(t)!==-1,nw=t=>QP[t],tB=t=>{tw(t)||$r(`Unknown parameter "${t}"`)},rB=t=>{eB.includes(t)&&$r(`The parameter "${t}" is incompatible with toasts`)},nB=t=>{const e=nw(t);e&&vb(t,e)},iw=t=>{t.backdrop===!1&&t.allowOutsideClick&&$r('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),t.theme&&!["light","dark","auto","minimal","borderless","bootstrap-4","bootstrap-4-light","bootstrap-4-dark","bootstrap-5","bootstrap-5-light","bootstrap-5-dark","material-ui","material-ui-light","material-ui-dark","embed-iframe","bulma","bulma-light","bulma-dark"].includes(t.theme)&&$r(`Invalid theme "${t.theme}"`);for(const e in t)tB(e),t.toast&&rB(e),nB(e)};function ow(t){const e=Fr(),r=ut(),n=Et.innerParams.get(this);if(!r||Fi(r,n.hideClass.popup)){$r("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");return}const i=iB(t),o=Object.assign({},n,i);iw(o),e.dataset.swal2Theme=o.theme,Db(this,o),Et.innerParams.set(this,o),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})}const iB=t=>{const e={};return Object.keys(t).forEach(r=>{rw(r)?e[r]=t[r]:$r(`Invalid parameter to update: ${r}`)}),e};function aw(){const t=Et.domCache.get(this),e=Et.innerParams.get(this);if(!e){sw(this);return}t.popup&&Me.swalCloseEventFinishedCallback&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback),typeof e.didDestroy=="function"&&e.didDestroy(),Me.eventEmitter.emit("didDestroy"),oB(this)}const oB=t=>{sw(t),delete t.params,delete Me.keydownHandler,delete Me.keydownTarget,delete Me.currentInstance},sw=t=>{t.isAwaitingPromise?(ch(Et,t),t.isAwaitingPromise=!0):(ch(vs,t),ch(Et,t),delete t.isAwaitingPromise,delete t.disableButtons,delete t.enableButtons,delete t.getInput,delete t.disableInput,delete t.enableInput,delete t.hideLoading,delete t.disableLoading,delete t.showValidationMessage,delete t.resetValidationMessage,delete t.close,delete t.closePopup,delete t.closeModal,delete t.closeToast,delete t.rejectPromise,delete t.update,delete t._destroy)},ch=(t,e)=>{for(const r in t)t[r].delete(e)};var aB=Object.freeze({__proto__:null,_destroy:aw,close:Co,closeModal:Co,closePopup:Co,closeToast:Co,disableButtons:Xb,disableInput:Zb,disableLoading:Lc,enableButtons:Yb,enableInput:Jb,getInput:jb,handleAwaitingPromise:Hl,hideLoading:Lc,rejectPromise:Hb,resetValidationMessage:ew,showValidationMessage:Qb,update:ow});const sB=(t,e,r)=>{t.toast?lB(t,e,r):(cB(e),fB(e),dB(t,e,r))},lB=(t,e,r)=>{e.popup.onclick=()=>{t&&(uB(t)||t.timer||t.input)||r(hs.close)}},uB=t=>!!(t.showConfirmButton||t.showDenyButton||t.showCancelButton||t.showCloseButton);let Dc=!1;const cB=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=()=>{},e.target===t.container&&(Dc=!0)}}},fB=t=>{t.container.onmousedown=e=>{e.target===t.container&&e.preventDefault(),t.popup.onmouseup=function(r){t.popup.onmouseup=()=>{},(r.target===t.popup||r.target instanceof HTMLElement&&t.popup.contains(r.target))&&(Dc=!0)}}},dB=(t,e,r)=>{e.container.onclick=n=>{if(Dc){Dc=!1;return}n.target===e.container&&xc(t.allowOutsideClick)&&r(hs.backdrop)}},pB=t=>typeof t=="object"&&t.jquery,lw=t=>t instanceof Element||pB(t),hB=t=>{const e={};return typeof t[0]=="object"&&!lw(t[0])?Object.assign(e,t[0]):["title","html","icon"].forEach((r,n)=>{const i=t[n];typeof i=="string"||lw(i)?e[r]=i:i!==void 0&&ua(`Unexpected type of ${r}! Expected "string" or "Element", got ${typeof i}`)}),e};function vB(...t){return new this(...t)}function mB(t){class e extends this{_main(n,i){return super._main(n,Object.assign({},t,i))}}return e}const gB=()=>Me.timeout&&Me.timeout.getTimerLeft(),uw=()=>{if(Me.timeout)return SR(),Me.timeout.stop()},cw=()=>{if(Me.timeout){const t=Me.timeout.start();return th(t),t}},yB=()=>{const t=Me.timeout;return t&&(t.running?uw():cw())},bB=t=>{if(Me.timeout){const e=Me.timeout.increase(t);return th(e,!0),e}},wB=()=>!!(Me.timeout&&Me.timeout.isRunning());let fw=!1;const fh={};function EB(t="data-swal-template"){fh[t]=this,fw||(document.body.addEventListener("click",xB),fw=!0)}const xB=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const r in fh){const n=e.getAttribute(r);if(n){fh[r].fire({template:n});return}}};let CB=class{constructor(){this.events={}}_getHandlersByEventName(e){return typeof this.events[e]>"u"&&(this.events[e]=[]),this.events[e]}on(e,r){const n=this._getHandlersByEventName(e);n.includes(r)||n.push(r)}once(e,r){const n=(...i)=>{this.removeListener(e,n),r.apply(this,i)};this.on(e,n)}emit(e,...r){this._getHandlersByEventName(e).forEach(n=>{try{n.apply(this,r)}catch(i){console.error(i)}})}removeListener(e,r){const n=this._getHandlersByEventName(e),i=n.indexOf(r);i>-1&&n.splice(i,1)}removeAllListeners(e){this.events[e]!==void 0&&(this.events[e].length=0)}reset(){this.events={}}};Me.eventEmitter=new CB;var kB=Object.freeze({__proto__:null,argsToParams:hB,bindClickHandler:EB,clickCancel:hP,clickConfirm:Ib,clickDeny:pP,enableLoading:gs,fire:vB,getActions:Bl,getCancelButton:ds,getCloseButton:Xp,getConfirmButton:gi,getContainer:Fr,getDenyButton:ca,getFocusableElements:Jp,getFooter:yb,getHtmlContainer:Kp,getIcon:fs,getIconContent:bR,getImage:gb,getInputLabel:wR,getLoader:ps,getPopup:ut,getProgressSteps:Yp,getTimerLeft:gB,getTimerProgressBar:kc,getTitle:mb,getValidationMessage:Cc,increaseTimer:bB,isDeprecatedParameter:nw,isLoading:xR,isTimerRunning:wB,isUpdatableParameter:rw,isValidParameter:tw,isVisible:dP,mixin:mB,off:(t,e)=>{if(!t){Me.eventEmitter.reset();return}e?Me.eventEmitter.removeListener(t,e):Me.eventEmitter.removeAllListeners(t)},on:(t,e)=>{Me.eventEmitter.on(t,e)},once:(t,e)=>{Me.eventEmitter.once(t,e)},resumeTimer:cw,showLoading:gs,stopTimer:uw,toggleTimer:yB});class TB{constructor(e,r){this.callback=e,this.remaining=r,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}increase(e){const r=this.running;return r&&this.stop(),this.remaining+=e,r&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const dw=["swal-title","swal-html","swal-footer"],SB=t=>{const e=typeof t.template=="string"?document.querySelector(t.template):t.template;if(!e)return{};const r=e.content;return IB(r),Object.assign(_B(r),OB(r),AB(r),MB(r),NB(r),LB(r),DB(r,dw))},_B=t=>{const e={};return Array.from(t.querySelectorAll("swal-param")).forEach(n=>{pa(n,["name","value"]);const i=n.getAttribute("name"),o=n.getAttribute("value");!i||!o||(typeof ys[i]=="boolean"?e[i]=o!=="false":typeof ys[i]=="object"?e[i]=JSON.parse(o):e[i]=o)}),e},OB=t=>{const e={};return Array.from(t.querySelectorAll("swal-function-param")).forEach(n=>{const i=n.getAttribute("name"),o=n.getAttribute("value");!i||!o||(e[i]=new Function(`return ${o}`)())}),e},AB=t=>{const e={};return Array.from(t.querySelectorAll("swal-button")).forEach(n=>{pa(n,["type","color","aria-label"]);const i=n.getAttribute("type");!i||!["confirm","cancel","deny"].includes(i)||(e[`${i}ButtonText`]=n.innerHTML,e[`show${Wp(i)}Button`]=!0,n.hasAttribute("color")&&(e[`${i}ButtonColor`]=n.getAttribute("color")),n.hasAttribute("aria-label")&&(e[`${i}ButtonAriaLabel`]=n.getAttribute("aria-label")))}),e},MB=t=>{const e={},r=t.querySelector("swal-image");return r&&(pa(r,["src","width","height","alt"]),r.hasAttribute("src")&&(e.imageUrl=r.getAttribute("src")||void 0),r.hasAttribute("width")&&(e.imageWidth=r.getAttribute("width")||void 0),r.hasAttribute("height")&&(e.imageHeight=r.getAttribute("height")||void 0),r.hasAttribute("alt")&&(e.imageAlt=r.getAttribute("alt")||void 0)),e},NB=t=>{const e={},r=t.querySelector("swal-icon");return r&&(pa(r,["type","color"]),r.hasAttribute("type")&&(e.icon=r.getAttribute("type")),r.hasAttribute("color")&&(e.iconColor=r.getAttribute("color")),e.iconHtml=r.innerHTML),e},LB=t=>{const e={},r=t.querySelector("swal-input");r&&(pa(r,["type","label","placeholder","value"]),e.input=r.getAttribute("type")||"text",r.hasAttribute("label")&&(e.inputLabel=r.getAttribute("label")),r.hasAttribute("placeholder")&&(e.inputPlaceholder=r.getAttribute("placeholder")),r.hasAttribute("value")&&(e.inputValue=r.getAttribute("value")));const n=Array.from(t.querySelectorAll("swal-input-option"));return n.length&&(e.inputOptions={},n.forEach(i=>{pa(i,["value"]);const o=i.getAttribute("value");if(!o)return;const a=i.innerHTML;e.inputOptions[o]=a})),e},DB=(t,e)=>{const r={};for(const n in e){const i=e[n],o=t.querySelector(i);o&&(pa(o,[]),r[i.replace(/^swal-/,"")]=o.innerHTML.trim())}return r},IB=t=>{const e=dw.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(t.children).forEach(r=>{const n=r.tagName.toLowerCase();e.includes(n)||$r(`Unrecognized element <${n}>`)})},pa=(t,e)=>{Array.from(t.attributes).forEach(r=>{e.indexOf(r.name)===-1&&$r([`Unrecognized attribute "${r.name}" on <${t.tagName.toLowerCase()}>.`,`${e.length?`Allowed attributes are: ${e.join(", ")}`:"To set the value, use HTML within the element."}`])})},pw=10,RB=t=>{const e=Fr(),r=ut();typeof t.willOpen=="function"&&t.willOpen(r),Me.eventEmitter.emit("willOpen",r);const i=window.getComputedStyle(document.body).overflowY;$B(e,r,t),setTimeout(()=>{PB(e,r)},pw),Zp()&&(BB(e,t.scrollbarPadding,i),xP()),!Tc()&&!Me.previousActiveElement&&(Me.previousActiveElement=document.activeElement),typeof t.didOpen=="function"&&setTimeout(()=>t.didOpen(r)),Me.eventEmitter.emit("didOpen",r)},Ic=t=>{const e=ut();if(t.target!==e)return;const r=Fr();e.removeEventListener("animationend",Ic),e.removeEventListener("transitionend",Ic),r.style.overflowY="auto",Dn(r,W["no-transition"])},PB=(t,e)=>{xb(e)?(t.style.overflowY="hidden",e.addEventListener("animationend",Ic),e.addEventListener("transitionend",Ic)):t.style.overflowY="auto"},BB=(t,e,r)=>{CP(),e&&r!=="hidden"&&MP(r),setTimeout(()=>{t.scrollTop=0})},$B=(t,e,r)=>{dt(t,r.showClass.backdrop),r.animation?(e.style.setProperty("opacity","0","important"),Qt(e,"grid"),setTimeout(()=>{dt(e,r.showClass.popup),e.style.removeProperty("opacity")},pw)):Qt(e,"grid"),dt([document.documentElement,document.body],W.shown),r.heightAuto&&r.backdrop&&!r.toast&&dt([document.documentElement,document.body],W["height-auto"])};var hw={email:(t,e)=>/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid email address"),url:(t,e)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid URL")};function FB(t){t.inputValidator||(t.input==="email"&&(t.inputValidator=hw.email),t.input==="url"&&(t.inputValidator=hw.url))}function HB(t){(!t.target||typeof t.target=="string"&&!document.querySelector(t.target)||typeof t.target!="string"&&!t.target.appendChild)&&($r('Target parameter is not valid, defaulting to "body"'),t.target="body")}function UB(t){FB(t),t.showLoaderOnConfirm&&!t.preConfirm&&$r(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
|
|
90
|
+
showLoaderOnConfirm should be used together with preConfirm, see usage example:
|
|
91
|
+
https://sweetalert2.github.io/#ajax-request`),HB(t),typeof t.title=="string"&&(t.title=t.title.split(`
|
|
92
|
+
`).join("<br />")),IR(t)}let yi;var Rc=new WeakMap;class It{constructor(...e){if(pR(this,Rc,void 0),typeof window>"u")return;yi=this;const r=Object.freeze(this.constructor.argsToParams(e));this.params=r,this.isAwaitingPromise=!1,hR(Rc,this,this._main(yi.params))}_main(e,r={}){if(iw(Object.assign({},r,e)),Me.currentInstance){const o=vs.swalPromiseResolve.get(Me.currentInstance),{isAwaitingPromise:a}=Me.currentInstance;Me.currentInstance._destroy(),a||o({isDismissed:!0}),Zp()&&Bb()}Me.currentInstance=yi;const n=qB(e,r);UB(n),Object.freeze(n),Me.timeout&&(Me.timeout.stop(),delete Me.timeout),clearTimeout(Me.restoreFocusTimeout);const i=VB(yi);return Db(yi,n),Et.innerParams.set(yi,n),zB(yi,i,n)}then(e){return fb(Rc,this).then(e)}finally(e){return fb(Rc,this).finally(e)}}const zB=(t,e,r)=>new Promise((n,i)=>{const o=a=>{t.close({isDismissed:!0,dismiss:a,isConfirmed:!1,isDenied:!1})};vs.swalPromiseResolve.set(t,n),vs.swalPromiseReject.set(t,i),e.confirmButton.onclick=()=>{GP(t)},e.denyButton.onclick=()=>{KP(t)},e.cancelButton.onclick=()=>{YP(t,o)},e.closeButton.onclick=()=>{o(hs.close)},sB(r,e,o),vP(Me,r,o),$P(t,r),RB(r),WB(Me,r,o),jB(e,r),setTimeout(()=>{e.container.scrollTop=0})}),qB=(t,e)=>{const r=SB(t),n=Object.assign({},ys,e,r,t);return n.showClass=Object.assign({},ys.showClass,n.showClass),n.hideClass=Object.assign({},ys.hideClass,n.hideClass),n.animation===!1&&(n.showClass={backdrop:"swal2-noanimation"},n.hideClass={}),n},VB=t=>{const e={popup:ut(),container:Fr(),actions:Bl(),confirmButton:gi(),denyButton:ca(),cancelButton:ds(),loader:ps(),closeButton:Xp(),validationMessage:Cc(),progressSteps:Yp()};return Et.domCache.set(t,e),e},WB=(t,e,r)=>{const n=kc();Sr(n),e.timer&&(t.timeout=new TB(()=>{r("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(Qt(n),mn(n,e,"timerProgressBar"),setTimeout(()=>{t.timeout&&t.timeout.running&&th(e.timer)})))},jB=(t,e)=>{if(!e.toast){if(!xc(e.allowEnterKey)){vb("allowEnterKey"),YB();return}GB(t)||KB(t,e)||sh(-1,1)}},GB=t=>{const e=Array.from(t.popup.querySelectorAll("[autofocus]"));for(const r of e)if(r instanceof HTMLElement&&Qr(r))return r.focus(),!0;return!1},KB=(t,e)=>e.focusDeny&&Qr(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&Qr(t.cancelButton)?(t.cancelButton.focus(),!0):e.focusConfirm&&Qr(t.confirmButton)?(t.confirmButton.focus(),!0):!1,YB=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};It.prototype.disableButtons=Xb,It.prototype.enableButtons=Yb,It.prototype.getInput=jb,It.prototype.disableInput=Zb,It.prototype.enableInput=Jb,It.prototype.hideLoading=Lc,It.prototype.disableLoading=Lc,It.prototype.showValidationMessage=Qb,It.prototype.resetValidationMessage=ew,It.prototype.close=Co,It.prototype.closePopup=Co,It.prototype.closeModal=Co,It.prototype.closeToast=Co,It.prototype.rejectPromise=Hb,It.prototype.update=ow,It.prototype._destroy=aw,Object.assign(It,kB),Object.keys(aB).forEach(t=>{It[t]=function(...e){return yi&&yi[t]?yi[t](...e):null}}),It.DismissReason=hs,It.version="11.26.10";const ha=It;ha.default=ha,typeof document<"u"&&function(t,e){var r=t.createElement("style");if(t.getElementsByTagName("head")[0].appendChild(r),r.styleSheet)r.styleSheet.disabled||(r.styleSheet.cssText=e);else try{r.innerHTML=e}catch{r.innerText=e}}(document,':root{--swal2-outline: 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-container-padding: 0.625em;--swal2-backdrop: rgba(0, 0, 0, 0.4);--swal2-backdrop-transition: background-color 0.15s;--swal2-width: 32em;--swal2-padding: 0 0 1.25em;--swal2-border: none;--swal2-border-radius: 0.3125rem;--swal2-background: white;--swal2-color: #545454;--swal2-show-animation: swal2-show 0.3s;--swal2-hide-animation: swal2-hide 0.15s forwards;--swal2-icon-zoom: 1;--swal2-icon-animations: true;--swal2-title-padding: 0.8em 1em 0;--swal2-html-container-padding: 1em 1.6em 0.3em;--swal2-input-border: 1px solid #d9d9d9;--swal2-input-border-radius: 0.1875em;--swal2-input-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-background: transparent;--swal2-input-transition: border-color 0.2s, box-shadow 0.2s;--swal2-input-hover-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-focus-border: 1px solid #b4dbed;--swal2-input-focus-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-progress-step-background: #add8e6;--swal2-validation-message-background: #f0f0f0;--swal2-validation-message-color: #666;--swal2-footer-border-color: #eee;--swal2-footer-background: transparent;--swal2-footer-color: inherit;--swal2-timer-progress-bar-background: rgba(0, 0, 0, 0.3);--swal2-close-button-position: initial;--swal2-close-button-inset: auto;--swal2-close-button-font-size: 2.5em;--swal2-close-button-color: #ccc;--swal2-close-button-transition: color 0.2s, box-shadow 0.2s;--swal2-close-button-outline: initial;--swal2-close-button-box-shadow: inset 0 0 0 3px transparent;--swal2-close-button-focus-box-shadow: inset var(--swal2-outline);--swal2-close-button-hover-transform: none;--swal2-actions-justify-content: center;--swal2-actions-width: auto;--swal2-actions-margin: 1.25em auto 0;--swal2-actions-padding: 0;--swal2-actions-border-radius: 0;--swal2-actions-background: transparent;--swal2-action-button-transition: background-color 0.2s, box-shadow 0.2s;--swal2-action-button-hover: black 10%;--swal2-action-button-active: black 10%;--swal2-confirm-button-box-shadow: none;--swal2-confirm-button-border-radius: 0.25em;--swal2-confirm-button-background-color: #7066e0;--swal2-confirm-button-color: #fff;--swal2-deny-button-box-shadow: none;--swal2-deny-button-border-radius: 0.25em;--swal2-deny-button-background-color: #dc3741;--swal2-deny-button-color: #fff;--swal2-cancel-button-box-shadow: none;--swal2-cancel-button-border-radius: 0.25em;--swal2-cancel-button-background-color: #6e7881;--swal2-cancel-button-color: #fff;--swal2-toast-show-animation: swal2-toast-show 0.5s;--swal2-toast-hide-animation: swal2-toast-hide 0.1s forwards;--swal2-toast-border: none;--swal2-toast-box-shadow: 0 0 1px hsl(0deg 0% 0% / 0.075), 0 1px 2px hsl(0deg 0% 0% / 0.075), 1px 2px 4px hsl(0deg 0% 0% / 0.075), 1px 3px 8px hsl(0deg 0% 0% / 0.075), 2px 4px 16px hsl(0deg 0% 0% / 0.075)}[data-swal2-theme=dark]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}@media(prefers-color-scheme: dark){[data-swal2-theme=auto]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px var(--swal2-backdrop)}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:var(--swal2-container-padding);overflow-x:hidden;transition:var(--swal2-backdrop-transition);-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:var(--swal2-backdrop)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container)[popover]{width:auto;border:0}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:var(--swal2-width);max-width:100%;padding:var(--swal2-padding);border:var(--swal2-border);border-radius:var(--swal2-border-radius);background:var(--swal2-background);color:var(--swal2-color);font-family:inherit;font-size:1rem;container-name:swal2-popup}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:var(--swal2-title-padding);color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;overflow-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:var(--swal2-actions-justify-content);width:var(--swal2-actions-width);margin:var(--swal2-actions-margin);padding:var(--swal2-actions-padding);border-radius:var(--swal2-actions-border-radius);background:var(--swal2-actions-background)}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:var(--swal2-action-button-transition);border:none;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border-radius:var(--swal2-confirm-button-border-radius);background:initial;background-color:var(--swal2-confirm-button-background-color);box-shadow:var(--swal2-confirm-button-box-shadow);color:var(--swal2-confirm-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):hover{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):active{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border-radius:var(--swal2-deny-button-border-radius);background:initial;background-color:var(--swal2-deny-button-background-color);box-shadow:var(--swal2-deny-button-box-shadow);color:var(--swal2-deny-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):hover{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):active{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border-radius:var(--swal2-cancel-button-border-radius);background:initial;background-color:var(--swal2-cancel-button-background-color);box-shadow:var(--swal2-cancel-button-box-shadow);color:var(--swal2-cancel-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):hover{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):active{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none;box-shadow:var(--swal2-action-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-styled)[disabled]:not(.swal2-loading){opacity:.4}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid var(--swal2-footer-border-color);background:var(--swal2-footer-background);color:var(--swal2-footer-color);font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:var(--swal2-border-radius);border-bottom-left-radius:var(--swal2-border-radius)}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:var(--swal2-timer-progress-bar-background)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){position:var(--swal2-close-button-position);inset:var(--swal2-close-button-inset);z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:var(--swal2-close-button-transition);border:none;border-radius:var(--swal2-border-radius);outline:var(--swal2-close-button-outline);background:rgba(0,0,0,0);color:var(--swal2-close-button-color);font-family:monospace;font-size:var(--swal2-close-button-font-size);cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:var(--swal2-close-button-hover-transform);background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:var(--swal2-close-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:var(--swal2-html-container-padding);overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;overflow-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:var(--swal2-input-transition);border:var(--swal2-input-border);border-radius:var(--swal2-input-border-radius);background:var(--swal2-input-background);box-shadow:var(--swal2-input-box-shadow);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):hover,div:where(.swal2-container) input:where(.swal2-file):hover,div:where(.swal2-container) textarea:where(.swal2-textarea):hover{box-shadow:var(--swal2-input-hover-box-shadow)}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:var(--swal2-input-focus-border);outline:none;box-shadow:var(--swal2-input-focus-box-shadow)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:var(--swal2-background)}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:var(--swal2-input-background);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:var(--swal2-input-background);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:var(--swal2-background);color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:var(--swal2-validation-message-background);color:var(--swal2-validation-message-color);font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:var(--swal2-progress-step-background);color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:var(--swal2-progress-step-background)}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;zoom:var(--swal2-icon-zoom);border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}}div:where(.swal2-icon).swal2-warning{border-color:#f8bb86;color:#f8bb86}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}}div:where(.swal2-icon).swal2-info{border-color:#3fc3ee;color:#3fc3ee}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}}div:where(.swal2-icon).swal2-question{border-color:#87adbd;color:#87adbd}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:var(--swal2-show-animation)}.swal2-hide{animation:var(--swal2-hide-animation)}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;border:var(--swal2-toast-border);background:var(--swal2-background);box-shadow:var(--swal2-toast-box-shadow);pointer-events:all}.swal2-toast>*{grid-column:2}.swal2-toast h2:where(.swal2-title){margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-toast .swal2-loading{justify-content:center}.swal2-toast input:where(.swal2-input){height:2em;margin:.5em;font-size:1em}.swal2-toast .swal2-validation-message{font-size:1em}.swal2-toast div:where(.swal2-footer){margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-toast button:where(.swal2-close){grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-toast div:where(.swal2-html-container){margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-toast div:where(.swal2-html-container):empty{padding:0}.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-toast div:where(.swal2-actions){justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-toast button:where(.swal2-styled){margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}@container swal2-popup style(--swal2-icon-animations:true){.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}}.swal2-toast.swal2-show{animation:var(--swal2-toast-show-animation)}.swal2-toast.swal2-hide{animation:var(--swal2-toast-hide-animation)}@keyframes swal2-show{0%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}100%{transform:translate3d(0, 0, 0) scale(1);opacity:1}}@keyframes swal2-hide{0%{transform:translate3d(0, 0, 0) scale(1);opacity:1}100%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}');const $e=Bc;(function(t,e){const r=Bc,n=t();for(;;)try{if(parseInt(r(462))/1*(-parseInt(r(506))/2)+-parseInt(r(530))/3+-parseInt(r(505))/4*(-parseInt(r(545))/5)+-parseInt(r(539))/6+parseInt(r(509))/7*(parseInt(r(476))/8)+parseInt(r(534))/9+parseInt(r(507))/10===e)break;n.push(n.shift())}catch{n.push(n.shift())}})(Pc,893471);var XB=Object[$e(478)],JB=(t,e)=>{for(var r in e)XB(t,r,{get:e[r],enumerable:!0})},vw={};JB(vw,{Toast:()=>dh,alert:()=>A$,assign:()=>w$,calculateDay:()=>d$,cloneDeep:()=>m$,close:()=>D$,concat:()=>ZB,confirm:()=>M$,currencyFormatter:()=>h$,dateFormat:()=>gw,flattenDeep:()=>r$,flattenDeepAll:()=>n$,generateRandomNumber:()=>mw,generateUuid:()=>l$,getByteLength:()=>c$,has:()=>x$,head:()=>t$,intersection:()=>o$,isEmpty:()=>g$,last:()=>i$,merge:()=>E$,numberArrayMax:()=>b$,objectEmptyRemove:()=>k$,omit:()=>C$,orderBy:()=>s$,padStart:()=>T$,phoneFormatter:()=>v$,quarter:()=>f$,random:()=>y$,replace:()=>S$,searchDefaultDate:()=>p$,sortBy:()=>a$,toastError:()=>L$,toastSuccess:()=>N$,trim:()=>_$,trimStringByByte:()=>u$,union:()=>e$,uniq:()=>QB});var ZB=(t=[],...e)=>Ot.concat(t,...e),QB=(t=[])=>Ot[$e(503)](t),e$=(...t)=>Ot[$e(516)](...t),t$=(t=[])=>Ot[$e(459)](t),r$=(t=[])=>Ot.flattenDeep(t),n$=(t=[],e=$e(475),r="children")=>{const n=$e,i={QuUSM:function(u,f){return u===f},skbMx:n(497),cQwfk:n(527),xcSeq:function(u,f,d,p,v){return u(f,d,p,v)},zxrmb:function(u,f,d){return u(f,d)}};let o=(u,f,d,p)=>{const v=n;let m=[];return u[v(519)](g=>{const E=v,w={UWfpZ:function(x,k){return i[Bc(524)](x,k)},TsyTa:function(x,k){return i[Bc(524)](x,k)}};if(i[E(524)](i[E(510)],i[E(533)])){if(!_0x560b5a[E(493)](_0xa9f3ab))return{};let x={..._0x49fdd5};return _0x24da24[E(484)](x)[E(519)](k=>{const _=E;let O=x[k];(w[_(521)](O,"")||w[_(472)](O,null)||O===void 0||_0x393d8d[_(491)](O)&&_0x467f40[_(541)](O))&&delete x[k]}),x}else if(g[f]===p)m[E(483)](g[f]);else if(g[d]){let x=o(g[d],f,d,p);x.length>0&&(m[E(483)](g[f]),x.forEach(k=>m[E(483)](k)))}}),m},a=(u,f)=>u[n(492)]((d,p)=>{const v=n;let m=d[v(481)](p),g=p[f];return m[v(481)](g!=null&&g.length?a(g,f):[])},[]),s=(u,f)=>u.reduce((d,p)=>{const v=n;let m=d.concat(p),g=p[f];return Array[v(471)](p[f])||(p[f]=[]),p.parentIds=i[v(489)](o,t,e,f,p[e]),m[v(481)](g!=null&&g[v(498)]?i[v(487)](s,g,f):[])},[]);return i[n(487)](s,t,r)[n(529)](u=>({...u,childrenIds:a(u[r],r)[n(529)](f=>f[e])}))},i$=(t=[])=>Ot.last(t),o$=(...t)=>Ot[$e(469)](...t),a$=(t,e)=>Ot[$e(501)](t,e),s$=(t,e,r)=>Ot[$e(518)](t,e,r),l$=(t="v1")=>{let e=yD[t](),r=mw();return e+"-"+r},mw=(t=0,e=1e3)=>lR.random(t,e),u$=(t,e)=>{const r=$e,n={dzRCD:function(a,s){return a>s},iMACU:function(a,s){return a+s}};let i="",o=0;for(let a of t){let s=n[r(528)](a[r(500)](0),127)?2:1;if(n[r(543)](o,s)>e)break;o+=s,i+=a}return i},c$=t=>{const e=$e,r={RWANX:function(i,o){return i>o}};let n=0;for(let i of t){let o=i[e(500)](0);n+=r[e(467)](o,127)?2:1}return n};la.extend(fR);function Pc(){const t=["assign","jTfAn","cQwfk","1266300XVTAdt","zzLoG","$1-$2-$3","YYYY-MM-DD","Ltpyg","7021908GfZsLi","has","isEmpty","YLJTf","iMACU","BKXnP","10lePoQP","head","trim","error","35NjUaGU","quarter","ko-KR","string","top","RWANX","random","intersection","PeuYK","isArray","TsyTa","startOf","filter","menuId","4716776hRxUWN","constructor","defineProperty","size","PpHod","concat","swal2_body","push","keys","match","yGgoQ","zxrmb","add","xcSeq","uwnwr","isObject","reduce","isPlainObject","day","cloneDeep","swal2_title","IRSqD","length","XDJMd","charCodeAt","sortBy","subtract","uniq","mixin","2662864GBMRYA","41406rZplWp","4228350QLdUYT","TfhOl","21jcALxj","skbMx","fire","format","today-oneMonth","cIorO","freeze","union","max","orderBy","forEach","QOYSz","UWfpZ","swal2_btn_cancel","swal2_btn_confirm","QuUSM","djaIP","success","cEOrk","dzRCD","map","2626092kHBPjj"];return Pc=function(){return t},Pc()}var gw=(t,e="YYYY-MM-DD")=>la(t)[$e(512)](e),f$=t=>la(t)[$e(463)](),d$=({type:t=$e(494),addDay:e=0,format:r=$e(537)})=>{const n=$e,i={yGgoQ:function(a){return a()},QOYSz:function(a,s,u){return a(s,u)}};let o=i[n(486)](la);return i[n(520)](gw,o[n(488)](e,t),r)},p$=(t=$e(513))=>{const e=$e,r={zzLoG:function(a){return a()},XDJMd:e(537),djaIP:"month",Ltpyg:function(a,s){return a===s},PpHod:e(513)};let n=r[e(535)](la)[e(512)](r[e(499)]),i=la()[e(502)](1,r.djaIP)[e(512)](r[e(499)]),o=r[e(535)](la)[e(473)](r[e(525)]).format(r.XDJMd);return r[e(538)](t,r[e(480)])?[i,n]:[o,n]},yw={phone:/^(\d{2,3})-?(\d{3,4})-?(\d{4})$/},h$=(t,e=0)=>t==null||isNaN(Number(t))?"":Number(t).toLocaleString($e(464)),v$=(t="")=>{const e=$e,r={uwnwr:function(i,o){return i!=o},cIorO:e(465),TfhOl:function(i,o){return i(o)},YLJTf:e(536)};if(!t)return"";r[e(490)](typeof t,r[e(514)])&&(t=r[e(508)](String,t));let n=t.replace(/\D/g,"");return n[e(485)](yw.phone)?n.replace(yw.phone,r[e(542)]):t},m$=t=>Ot[$e(495)](t),g$=t=>t==null?!0:(t==null?void 0:t[$e(477)])===Object?Object[$e(484)](t).length===0:Array[$e(471)](t)?t.length===0:t instanceof Map||t instanceof Set?t[$e(479)]===0:typeof t==$e(465)?t[$e(460)]()[$e(498)]===0:Ot[$e(541)](t);function Bc(t,e){return t=t-459,Pc()[t]}var y$=(t=0,e=1,r=!1)=>Ot[$e(468)](t,e,r),b$=t=>{const e=$e,r={PeuYK:function(i,o){return i===o},BKXnP:function(i,o){return i!==o}};if(!Array.isArray(t)||r[e(470)](t[e(498)],0))return;let n=t[e(474)](i=>typeof i=="number"&&!isNaN(i));if(r[e(544)](n[e(498)],0))return Math[e(517)](...n)},w$=(t={},...e)=>Ot[$e(531)](t,...e),E$=(t={},...e)=>Ot.merge(t,...e),x$=(t,e)=>Ot[$e(540)](t,e),C$=(t,e)=>Ot.omit(t,e),k$=(t={})=>{const e=$e,r={jTfAn:function(i,o){return i===o}};if(!Ot[e(493)](t))return{};let n={...t};return Object[e(484)](n)[e(519)](i=>{const o=e;let a=n[i];(r[o(532)](a,"")||r.jTfAn(a,null)||r[o(532)](a,void 0)||Ot.isObject(a)&&Ot[o(541)](a))&&delete n[i]}),n},T$=(t,e,r=" ")=>Ot.padStart(String(t),e,r),S$=(t,e,r)=>Ot.replace(String(t),e,r),_$=(t,e)=>e?Ot[$e(460)](String(t),e):Ot[$e(460)](String(t)),O$={popup:"swal2_popup",title:$e(496),htmlContainer:$e(482),actions:"swal2_actions",confirmButton:$e(523),cancelButton:$e(522)},bw=(t,e)=>({title:t,html:e,allowOutsideClick:!1,focusConfirm:!1,customClass:O$}),A$=(t,e)=>ha[$e(511)]({...bw(t,e),showCancelButton:!1,confirmButtonText:"확인"}),M$=(t,e)=>ha[$e(511)]({...bw(t,e),showCancelButton:!0,confirmButtonText:"확인",cancelButtonText:"취소"}),dh=ha[$e(504)]({toast:!0,position:$e(466),showConfirmButton:!1,timer:3e3,timerProgressBar:!1,backdrop:!1}),N$=(t,e)=>dh.fire({icon:$e(526),title:t,html:e}),L$=(t,e)=>dh.fire({icon:$e(461),title:t,html:e}),D$=()=>ha.close(),I$=Object[$e(515)]({...vw}),Hi=I$;const R$={__name:"splitpanes",props:{horizontal:{type:Boolean,default:!1},pushOtherPanes:{type:Boolean,default:!0},maximizePanes:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean,default:!1}},emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click","splitter-dblclick"],setup(t,{emit:e}){const r=e,n=t,i=y.useSlots(),o=y.ref([]),a=y.computed(()=>o.value.reduce((F,G)=>(F[~~G.id]=G)&&F,{})),s=y.computed(()=>o.value.length),u=y.ref(null),f=y.ref(!1),d=y.ref({mouseDown:!1,dragging:!1,activeSplitter:null,cursorOffset:0}),p=y.ref({splitter:null,timeoutId:null}),v=y.computed(()=>({[`splitpanes splitpanes--${n.horizontal?"horizontal":"vertical"}`]:!0,"splitpanes--dragging":d.value.dragging})),m=()=>{document.addEventListener("mousemove",w,{passive:!1}),document.addEventListener("mouseup",x),"ontouchstart"in window&&(document.addEventListener("touchmove",w,{passive:!1}),document.addEventListener("touchend",x))},g=()=>{document.removeEventListener("mousemove",w,{passive:!1}),document.removeEventListener("mouseup",x),"ontouchstart"in window&&(document.removeEventListener("touchmove",w,{passive:!1}),document.removeEventListener("touchend",x))},E=(F,G)=>{const K=F.target.closest(".splitpanes__splitter");if(K){const{left:te,top:ne}=K.getBoundingClientRect(),{clientX:he,clientY:Ne}="ontouchstart"in window&&F.touches?F.touches[0]:F;d.value.cursorOffset=n.horizontal?Ne-ne:he-te}m(),d.value.mouseDown=!0,d.value.activeSplitter=G},w=F=>{d.value.mouseDown&&(F.preventDefault(),d.value.dragging=!0,requestAnimationFrame(()=>{A(N(F)),De("resize",{event:F},!0)}))},x=F=>{d.value.dragging&&(window.getSelection().removeAllRanges(),De("resized",{event:F},!0)),d.value.mouseDown=!1,d.value.activeSplitter=null,setTimeout(()=>{d.value.dragging=!1,g()},100)},k=(F,G)=>{"ontouchstart"in window&&(F.preventDefault(),p.value.splitter===G?(clearTimeout(p.value.timeoutId),p.value.timeoutId=null,_(F,G),p.value.splitter=null):(p.value.splitter=G,p.value.timeoutId=setTimeout(()=>p.value.splitter=null,500))),d.value.dragging||De("splitter-click",{event:F,index:G},!0)},_=(F,G)=>{if(De("splitter-dblclick",{event:F,index:G},!0),n.maximizePanes){let K=0;o.value=o.value.map((te,ne)=>(te.size=ne===G?te.max:te.min,ne!==G&&(K+=te.min),te)),o.value[G].size-=K,De("pane-maximize",{event:F,index:G,pane:o.value[G]}),De("resized",{event:F,index:G},!0)}},O=(F,G)=>{De("pane-click",{event:F,index:a.value[G].index,pane:a.value[G]})},N=F=>{const G=u.value.getBoundingClientRect(),{clientX:K,clientY:te}="ontouchstart"in window&&F.touches?F.touches[0]:F;return{x:K-(n.horizontal?0:d.value.cursorOffset)-G.left,y:te-(n.horizontal?d.value.cursorOffset:0)-G.top}},L=F=>{F=F[n.horizontal?"y":"x"];const G=u.value[n.horizontal?"clientHeight":"clientWidth"];return n.rtl&&!n.horizontal&&(F=G-F),F*100/G},A=F=>{const G=d.value.activeSplitter;let K={prevPanesSize:U(G),nextPanesSize:J(G),prevReachedMinPanes:0,nextReachedMinPanes:0};const te=0+(n.pushOtherPanes?0:K.prevPanesSize),ne=100-(n.pushOtherPanes?0:K.nextPanesSize),he=Math.max(Math.min(L(F),ne),te);let Ne=[G,G+1],Xe=o.value[Ne[0]]||null,ot=o.value[Ne[1]]||null;const sr=Xe.max<100&&he>=Xe.max+K.prevPanesSize,Ft=ot.max<100&&he<=100-(ot.max+J(G+1));if(sr||Ft){sr?(Xe.size=Xe.max,ot.size=Math.max(100-Xe.max-K.prevPanesSize-K.nextPanesSize,0)):(Xe.size=Math.max(100-ot.max-K.prevPanesSize-J(G+1),0),ot.size=ot.max);return}if(n.pushOtherPanes){const D=P(K,he);if(!D)return;({sums:K,panesToResize:Ne}=D),Xe=o.value[Ne[0]]||null,ot=o.value[Ne[1]]||null}Xe!==null&&(Xe.size=Math.min(Math.max(he-K.prevPanesSize-K.prevReachedMinPanes,Xe.min),Xe.max)),ot!==null&&(ot.size=Math.min(Math.max(100-he-K.nextPanesSize-K.nextReachedMinPanes,ot.min),ot.max))},P=(F,G)=>{const K=d.value.activeSplitter,te=[K,K+1];return G<F.prevPanesSize+o.value[te[0]].min&&(te[0]=re(K).index,F.prevReachedMinPanes=0,te[0]<K&&o.value.forEach((ne,he)=>{he>te[0]&&he<=K&&(ne.size=ne.min,F.prevReachedMinPanes+=ne.min)}),F.prevPanesSize=U(te[0]),te[0]===void 0)?(F.prevReachedMinPanes=0,o.value[0].size=o.value[0].min,o.value.forEach((ne,he)=>{he>0&&he<=K&&(ne.size=ne.min,F.prevReachedMinPanes+=ne.min)}),o.value[te[1]].size=100-F.prevReachedMinPanes-o.value[0].min-F.prevPanesSize-F.nextPanesSize,null):G>100-F.nextPanesSize-o.value[te[1]].min&&(te[1]=Se(K).index,F.nextReachedMinPanes=0,te[1]>K+1&&o.value.forEach((ne,he)=>{he>K&&he<te[1]&&(ne.size=ne.min,F.nextReachedMinPanes+=ne.min)}),F.nextPanesSize=J(te[1]-1),te[1]===void 0)?(F.nextReachedMinPanes=0,o.value.forEach((ne,he)=>{he<s.value-1&&he>=K+1&&(ne.size=ne.min,F.nextReachedMinPanes+=ne.min)}),o.value[te[0]].size=100-F.prevPanesSize-J(te[0]-1),null):{sums:F,panesToResize:te}},U=F=>o.value.reduce((G,K,te)=>G+(te<F?K.size:0),0),J=F=>o.value.reduce((G,K,te)=>G+(te>F+1?K.size:0),0),re=F=>[...o.value].reverse().find(G=>G.index<F&&G.size>G.min)||{},Se=F=>o.value.find(G=>G.index>F+1&&G.size>G.min)||{},Fe=()=>{var F;const G=Array.from(((F=u.value)==null?void 0:F.children)||[]);for(const K of G){const te=K.classList.contains("splitpanes__pane"),ne=K.classList.contains("splitpanes__splitter");!te&&!ne&&(K.remove(),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))}},ce=(F,G,K=!1)=>{const te=F-1,ne=document.createElement("div");ne.classList.add("splitpanes__splitter"),K||(ne.onmousedown=he=>E(he,te),typeof window<"u"&&"ontouchstart"in window&&(ne.ontouchstart=he=>E(he,te)),ne.onclick=he=>k(he,te+1)),ne.ondblclick=he=>_(he,te+1),G.parentNode.insertBefore(ne,G)},le=F=>{F.onmousedown=void 0,F.onclick=void 0,F.ondblclick=void 0,F.remove()},Z=()=>{var F;const G=Array.from(((F=u.value)==null?void 0:F.children)||[]);for(const te of G)te.className.includes("splitpanes__splitter")&&le(te);let K=0;for(const te of G)te.className.includes("splitpanes__pane")&&(!K&&n.firstSplitter?ce(K,te,!0):K&&ce(K,te),K++)},j=({uid:F,...G})=>{const K=a.value[F];for(const[te,ne]of Object.entries(G))K[te]=ne},ue=F=>{var G;let K=-1;Array.from(((G=u.value)==null?void 0:G.children)||[]).some(te=>(te.className.includes("splitpanes__pane")&&K++,te.isSameNode(F.el))),o.value.splice(K,0,{...F,index:K}),o.value.forEach((te,ne)=>te.index=ne),f.value&&y.nextTick(()=>{Z(),ve({addedPane:o.value[K]}),De("pane-add",{pane:o.value[K]})})},ye=F=>{const G=o.value.findIndex(te=>te.id===F);o.value[G].el=null;const K=o.value.splice(G,1)[0];o.value.forEach((te,ne)=>te.index=ne),y.nextTick(()=>{Z(),De("pane-remove",{pane:K}),ve({removedPane:{...K}})})},ve=(F={})=>{!F.addedPane&&!F.removedPane?Te():o.value.some(G=>G.givenSize!==null||G.min||G.max<100)?We(F):ke(),f.value&&De("resized")},ke=()=>{const F=100/s.value;let G=0;const K=[],te=[];for(const ne of o.value)ne.size=Math.max(Math.min(F,ne.max),ne.min),G-=ne.size,ne.size>=ne.max&&K.push(ne.id),ne.size<=ne.min&&te.push(ne.id);G>.1&&we(G,K,te)},Te=()=>{let F=100;const G=[],K=[];let te=0;for(const he of o.value)F-=he.size,he.givenSize!==null&&te++,he.size>=he.max&&G.push(he.id),he.size<=he.min&&K.push(he.id);let ne=100;if(F>.1){for(const he of o.value)he.givenSize===null&&(he.size=Math.max(Math.min(F/(s.value-te),he.max),he.min)),ne-=he.size;ne>.1&&we(ne,G,K)}},We=({addedPane:F,removedPane:G}={})=>{let K=100/s.value,te=0;const ne=[],he=[];((F==null?void 0:F.givenSize)??null)!==null&&(K=(100-F.givenSize)/(s.value-1));for(const Ne of o.value)te-=Ne.size,Ne.size>=Ne.max&&ne.push(Ne.id),Ne.size<=Ne.min&&he.push(Ne.id);if(!(Math.abs(te)<.1)){for(const Ne of o.value)(F==null?void 0:F.givenSize)!==null&&(F==null?void 0:F.id)===Ne.id||(Ne.size=Math.max(Math.min(K,Ne.max),Ne.min)),te-=Ne.size,Ne.size>=Ne.max&&ne.push(Ne.id),Ne.size<=Ne.min&&he.push(Ne.id);te>.1&&we(te,ne,he)}},we=(F,G,K)=>{let te;F>0?te=F/(s.value-G.length):te=F/(s.value-K.length),o.value.forEach((ne,he)=>{if(F>0&&!G.includes(ne.id)){const Ne=Math.max(Math.min(ne.size+te,ne.max),ne.min),Xe=Ne-ne.size;F-=Xe,ne.size=Ne}else if(!K.includes(ne.id)){const Ne=Math.max(Math.min(ne.size+te,ne.max),ne.min),Xe=Ne-ne.size;F-=Xe,ne.size=Ne}}),Math.abs(F)>.1&&y.nextTick(()=>{f.value&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})},De=(F,G=void 0,K=!1)=>{const te=(G==null?void 0:G.index)??d.value.activeSplitter??null;r(F,{...G,...te!==null&&{index:te},...K&&te!==null&&{prevPane:o.value[te-(n.firstSplitter?1:0)],nextPane:o.value[te+(n.firstSplitter?0:1)]},panes:o.value.map(ne=>({min:ne.min,max:ne.max,size:ne.size}))})};y.watch(()=>n.firstSplitter,()=>Z()),y.onMounted(()=>{Fe(),Z(),ve(),De("ready"),f.value=!0}),y.onBeforeUnmount(()=>f.value=!1);const pe=()=>{var F;return y.h("div",{ref:u,class:v.value},(F=i.default)==null?void 0:F.call(i))};return y.provide("panes",o),y.provide("indexedPanes",a),y.provide("horizontal",y.computed(()=>n.horizontal)),y.provide("requestUpdate",j),y.provide("onPaneAdd",ue),y.provide("onPaneRemove",ye),y.provide("onPaneClick",O),(F,G)=>(y.openBlock(),y.createBlock(y.resolveDynamicComponent(pe)))}},ww={__name:"pane",props:{size:{type:[Number,String]},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},setup(t){var e;const r=t,n=y.inject("requestUpdate"),i=y.inject("onPaneAdd"),o=y.inject("horizontal"),a=y.inject("onPaneRemove"),s=y.inject("onPaneClick"),u=(e=y.getCurrentInstance())==null?void 0:e.uid,f=y.inject("indexedPanes"),d=y.computed(()=>f.value[u]),p=y.ref(null),v=y.computed(()=>{const w=isNaN(r.size)||r.size===void 0?0:parseFloat(r.size);return Math.max(Math.min(w,g.value),m.value)}),m=y.computed(()=>{const w=parseFloat(r.minSize);return isNaN(w)?0:w}),g=y.computed(()=>{const w=parseFloat(r.maxSize);return isNaN(w)?100:w}),E=y.computed(()=>{var w;return`${o.value?"height":"width"}: ${(w=d.value)==null?void 0:w.size}%`});return y.watch(()=>v.value,w=>n({uid:u,size:w})),y.watch(()=>m.value,w=>n({uid:u,min:w})),y.watch(()=>g.value,w=>n({uid:u,max:w})),y.onMounted(()=>{i({id:u,el:p.value,min:m.value,max:g.value,givenSize:r.size===void 0?null:v.value,size:v.value})}),y.onBeforeUnmount(()=>a(u)),(w,x)=>(y.openBlock(),y.createElementBlock("div",{ref_key:"paneEl",ref:p,class:"splitpanes__pane",onClick:x[0]||(x[0]=k=>y.unref(s)(k,w._.uid)),style:y.normalizeStyle(E.value)},[y.renderSlot(w.$slots,"default")],4))}},P$=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"element-split-panes",props:{className:{type:String,default:""},horizontal:{type:Boolean,default:!1},leftSize:{type:Number,default:50}},emits:["resize"],setup(t,{emit:e}){const r=y.useSlots(),n=Hi.generateUuid(),i=e;return(o,a)=>(y.openBlock(),y.createBlock(y.unref(R$),{key:y.unref(n),class:"element-splitpanes",horizontal:t.horizontal,onResize:a[0]||(a[0]=s=>i("resize"))},{default:y.withCtx(()=>[y.unref(r).leftSlot?(y.openBlock(),y.createBlock(y.unref(ww),{key:0,size:t.leftSize},{default:y.withCtx(()=>[y.renderSlot(o.$slots,"leftSlot")]),_:3},8,["size"])):y.createCommentVNode("",!0),y.unref(r).rightSlot?(y.openBlock(),y.createBlock(y.unref(ww),{key:1},{default:y.withCtx(()=>[y.renderSlot(o.$slots,"rightSlot")]),_:3})):y.createCommentVNode("",!0)]),_:3},8,["horizontal"]))}}},Symbol.toStringTag,{value:"Module"}));/**
|
|
93
|
+
* vee-validate v4.15.1
|
|
94
|
+
* (c) 2025 Abdelrahman Awad
|
|
95
|
+
* @license MIT
|
|
96
|
+
*/function Zn(t){return typeof t=="function"}function B$(t){return t==null}const bs=t=>t!==null&&!!t&&typeof t=="object"&&!Array.isArray(t);function Ew(t){return Number(t)>=0}function $$(t){const e=parseFloat(t);return isNaN(e)?t:e}function F$(t){const e=t.split(".");if(!e.length)return"";let r=String(e[0]);for(let n=1;n<e.length;n++){if(Ew(e[n])){r+=`[${e[n]}]`;continue}r+=`.${e[n]}`}return r}const H$={};function U$(t){return H$[t]}function xw(t,e,r){typeof r.value=="object"&&(r.value=va(r.value)),!r.enumerable||r.get||r.set||!r.configurable||!r.writable||e==="__proto__"?Object.defineProperty(t,e,r):t[e]=r.value}function va(t){if(typeof t!="object")return t;var e=0,r,n,i,o=Object.prototype.toString.call(t);if(o==="[object Object]"?i=Object.create(t.__proto__||null):o==="[object Array]"?i=Array(t.length):o==="[object Set]"?(i=new Set,t.forEach(function(a){i.add(va(a))})):o==="[object Map]"?(i=new Map,t.forEach(function(a,s){i.set(va(s),va(a))})):o==="[object Date]"?i=new Date(+t):o==="[object RegExp]"?i=new RegExp(t.source,t.flags):o==="[object DataView]"?i=new t.constructor(va(t.buffer)):o==="[object ArrayBuffer]"?i=t.slice(0):o.slice(-6)==="Array]"&&(i=new t.constructor(t)),i){for(n=Object.getOwnPropertySymbols(t);e<n.length;e++)xw(i,n[e],Object.getOwnPropertyDescriptor(t,n[e]));for(e=0,n=Object.getOwnPropertyNames(t);e<n.length;e++)Object.hasOwnProperty.call(i,r=n[e])&&i[r]===t[r]||xw(i,r,Object.getOwnPropertyDescriptor(t,r))}return i||t}const Cw=Symbol("vee-validate-form"),z$=Symbol("vee-validate-field-instance"),$c=Symbol("Default empty value"),kw=typeof window<"u";function ph(t){return Zn(t)&&!!t.__locatorRef}function Ul(t){return!!t&&Zn(t.parse)&&t.__type==="VVTypedSchema"}function hh(t){return!!t&&Zn(t.validate)}function zl(t){return t==="checkbox"||t==="radio"}function q$(t){return bs(t)||Array.isArray(t)}function vh(t){return/^\[.+\]$/i.test(t)}function V$(t){return Tw(t)&&t.multiple}function Tw(t){return t.tagName==="SELECT"}function W$(t,e){const r=![!1,null,void 0,0].includes(e.multiple)&&!Number.isNaN(e.multiple);return t==="select"&&"multiple"in e&&r}function j$(t,e){return!W$(t,e)&&e.type!=="file"&&!zl(e.type)}function G$(t){return t?!!(typeof Event<"u"&&Zn(Event)&&t instanceof Event||t&&t.srcElement):!1}function Sw(t,e){return e in t&&t[e]!==$c}function gn(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var r,n,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!gn(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!gn(n[1],e.get(n[0])))return!1;return!0}if(Ow(t)&&Ow(e))return!(t.size!==e.size||t.name!==e.name||t.lastModified!==e.lastModified||t.type!==e.type);if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(t[n]!==e[n])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(t=_w(t),e=_w(e),i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){var o=i[n];if(!gn(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function _w(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0))}function Ow(t){return kw?t instanceof File:!1}function Aw(t){return vh(t)?t.replace(/\[|\]/gi,""):t}function ws(t,e,r){return t?vh(e)?t[Aw(e)]:(e||"").split(/\.|\[(\d+)\]/).filter(Boolean).reduce((i,o)=>q$(i)&&o in i?i[o]:r,t):r}function K$(t,e,r){if(vh(e)){t[Aw(e)]=r;return}const n=e.split(/\.|\[(\d+)\]/).filter(Boolean);let i=t;for(let o=0;o<n.length;o++){if(o===n.length-1){i[n[o]]=r;return}(!(n[o]in i)||B$(i[n[o]]))&&(i[n[o]]=Ew(n[o+1])?[]:{}),i=i[n[o]]}}function Mw(t){return Object.keys(t)}function Nw(t,e=void 0){const r=y.getCurrentInstance();return(r==null?void 0:r.provides[t])||y.inject(t,e)}function Lw(t,e,r){if(Array.isArray(t)){const n=[...t],i=n.findIndex(o=>gn(o,e));return i>=0?n.splice(i,1):n.push(e),n}return gn(t,e)?r:e}function Y$(t,e){let r,n;return function(...i){const o=this;return r||(r=!0,setTimeout(()=>r=!1,e),n=t.apply(o,i)),n}}function X$(t,e){return bs(e)&&e.number?$$(t):t}function Dw(t,e){let r;return async function(...i){const o=t(...i);r=o;const a=await o;return o!==r?a:(r=void 0,e(a,i))}}function J$(t){return Array.isArray(t)?t:t?[t]:[]}function Z$(t,e,r){return e.slots.default?typeof t=="string"||!t?e.slots.default(r()):{default:()=>{var n,i;return(i=(n=e.slots).default)===null||i===void 0?void 0:i.call(n,r())}}:e.slots.default}function mh(t){if(Iw(t))return t._value}function Iw(t){return"_value"in t}function Q$(t){return t.type==="number"||t.type==="range"?Number.isNaN(t.valueAsNumber)?t.value:t.valueAsNumber:t.value}function Rw(t){if(!G$(t))return t;const e=t.target;if(zl(e.type)&&Iw(e))return mh(e);if(e.type==="file"&&e.files){const r=Array.from(e.files);return e.multiple?r:r[0]}if(V$(e))return Array.from(e.options).filter(r=>r.selected&&!r.disabled).map(mh);if(Tw(e)){const r=Array.from(e.options).find(n=>n.selected);return r?mh(r):e.value}return Q$(e)}function Pw(t){const e={};return Object.defineProperty(e,"_$$isNormalized",{value:!0,writable:!1,enumerable:!1,configurable:!1}),t?bs(t)&&t._$$isNormalized?t:bs(t)?Object.keys(t).reduce((r,n)=>{const i=eF(t[n]);return t[n]!==!1&&(r[n]=Bw(i)),r},e):typeof t!="string"?e:t.split("|").reduce((r,n)=>{const i=tF(n);return i.name&&(r[i.name]=Bw(i.params)),r},e):e}function eF(t){return t===!0?[]:Array.isArray(t)||bs(t)?t:[t]}function Bw(t){const e=r=>typeof r=="string"&&r[0]==="@"?rF(r.slice(1)):r;return Array.isArray(t)?t.map(e):t instanceof RegExp?[t]:Object.keys(t).reduce((r,n)=>(r[n]=e(t[n]),r),{})}const tF=t=>{let e=[];const r=t.split(":")[0];return t.includes(":")&&(e=t.split(":").slice(1).join(":").split(",")),{name:r,params:e}};function rF(t){const e=r=>{var n;return(n=ws(r,t))!==null&&n!==void 0?n:r[t]};return e.__locatorRef=t,e}function nF(t){return Array.isArray(t)?t.filter(ph):Mw(t).filter(e=>ph(t[e])).map(e=>t[e])}let iF=Object.assign({},{generateMessage:({field:t})=>`${t} is not valid.`,bails:!0,validateOnBlur:!0,validateOnChange:!0,validateOnInput:!1,validateOnModelUpdate:!0});const gh=()=>iF;async function oF(t,e,r={}){const n=r==null?void 0:r.bails,i={name:(r==null?void 0:r.name)||"{field}",rules:e,label:r==null?void 0:r.label,bails:n??!0,formData:(r==null?void 0:r.values)||{}},o=await aF(i,t);return Object.assign(Object.assign({},o),{valid:!o.errors.length})}async function aF(t,e){const r=t.rules;if(Ul(r)||hh(r))return uF(e,Object.assign(Object.assign({},t),{rules:r}));if(Zn(r)||Array.isArray(r)){const s={field:t.label||t.name,name:t.name,label:t.label,form:t.formData,value:e},u=Array.isArray(r)?r:[r],f=u.length,d=[];for(let p=0;p<f;p++){const v=u[p],m=await v(e,s);if(!(typeof m!="string"&&!Array.isArray(m)&&m)){if(Array.isArray(m))d.push(...m);else{const E=typeof m=="string"?m:$w(s);d.push(E)}if(t.bails)return{errors:d}}}return{errors:d}}const n=Object.assign(Object.assign({},t),{rules:Pw(r)}),i=[],o=Object.keys(n.rules),a=o.length;for(let s=0;s<a;s++){const u=o[s],f=await cF(n,e,{name:u,params:n.rules[u]});if(f.error&&(i.push(f.error),t.bails))return{errors:i}}return{errors:i}}function sF(t){return!!t&&t.name==="ValidationError"}function lF(t){return{__type:"VVTypedSchema",async parse(r,n){var i;try{return{output:await t.validate(r,{abortEarly:!1,context:(n==null?void 0:n.formData)||{}}),errors:[]}}catch(o){if(!sF(o))throw o;if(!(!((i=o.inner)===null||i===void 0)&&i.length)&&o.errors.length)return{errors:[{path:o.path,errors:o.errors}]};const a=o.inner.reduce((s,u)=>{const f=u.path||"";return s[f]||(s[f]={errors:[],path:f}),s[f].errors.push(...u.errors),s},{});return{errors:Object.values(a)}}}}}async function uF(t,e){const n=await(Ul(e.rules)?e.rules:lF(e.rules)).parse(t,{formData:e.formData}),i=[];for(const o of n.errors)o.errors.length&&i.push(...o.errors);return{value:n.value,errors:i}}async function cF(t,e,r){const n=U$(r.name);if(!n)throw new Error(`No such validator '${r.name}' exists.`);const i=fF(r.params,t.formData),o={field:t.label||t.name,name:t.name,label:t.label,value:e,form:t.formData,rule:Object.assign(Object.assign({},r),{params:i})},a=await n(e,i,o);return typeof a=="string"?{error:a}:{error:a?void 0:$w(o)}}function $w(t){const e=gh().generateMessage;return e?e(t):"Field is invalid"}function fF(t,e){const r=n=>ph(n)?n(e):n;return Array.isArray(t)?t.map(r):Object.keys(t).reduce((n,i)=>(n[i]=r(t[i]),n),{})}let Fw=0;function dF(t,e){const{value:r,initialValue:n,setInitialValue:i}=pF(t,e.modelValue,e.form);if(!e.form){let v=function(m){var g;"value"in m&&(r.value=m.value),"errors"in m&&f(m.errors),"touched"in m&&(p.touched=(g=m.touched)!==null&&g!==void 0?g:p.touched),"initialValue"in m&&i(m.initialValue)};const{errors:u,setErrors:f}=mF(),d=Fw>=Number.MAX_SAFE_INTEGER?0:++Fw,p=vF(r,n,u,e.schema);return{id:d,path:t,value:r,initialValue:n,meta:p,flags:{pendingUnmount:{[d]:!1},pendingReset:!1},errors:u,setState:v}}const o=e.form.createPathState(t,{bails:e.bails,label:e.label,type:e.type,validate:e.validate,schema:e.schema}),a=y.computed(()=>o.errors);function s(u){var f,d,p;"value"in u&&(r.value=u.value),"errors"in u&&((f=e.form)===null||f===void 0||f.setFieldError(y.unref(t),u.errors)),"touched"in u&&((d=e.form)===null||d===void 0||d.setFieldTouched(y.unref(t),(p=u.touched)!==null&&p!==void 0?p:!1)),"initialValue"in u&&i(u.initialValue)}return{id:Array.isArray(o.id)?o.id[o.id.length-1]:o.id,path:t,value:r,errors:a,meta:o,initialValue:n,flags:o.__flags,setState:s}}function pF(t,e,r){const n=y.ref(y.unref(e));function i(){return r?ws(r.initialValues.value,y.unref(t),y.unref(n)):y.unref(n)}function o(f){if(!r){n.value=f;return}r.setFieldInitialValue(y.unref(t),f,!0)}const a=y.computed(i);if(!r)return{value:y.ref(i()),initialValue:a,setInitialValue:o};const s=hF(e,r,a,t);return r.stageInitialValue(y.unref(t),s,!0),{value:y.computed({get(){return ws(r.values,y.unref(t))},set(f){r.setFieldValue(y.unref(t),f,!1)}}),initialValue:a,setInitialValue:o}}function hF(t,e,r,n){return y.isRef(t)?y.unref(t):t!==void 0?t:ws(e.values,y.unref(n),y.unref(r))}function vF(t,e,r,n){const i=y.computed(()=>{var a,s,u;return(u=(s=(a=y.toValue(n))===null||a===void 0?void 0:a.describe)===null||s===void 0?void 0:s.call(a).required)!==null&&u!==void 0?u:!1}),o=y.reactive({touched:!1,pending:!1,valid:!0,required:i,validated:!!y.unref(r).length,initialValue:y.computed(()=>y.unref(e)),dirty:y.computed(()=>!gn(y.unref(t),y.unref(e)))});return y.watch(r,a=>{o.valid=!a.length},{immediate:!0,flush:"sync"}),o}function mF(){const t=y.ref([]);return{errors:t,setErrors:e=>{t.value=J$(e)}}}const Hw={},ql={},Vl="vee-validate-inspector",en={error:12405579,success:448379,unknown:5522283,white:16777215,black:0,blue:218007,purple:12157168,orange:16099682,gray:12304330};let zt=null,ko;async function gF(t){if(process.env.NODE_ENV!=="production"){if(!kw)return;(await Promise.resolve().then(()=>PPe)).setupDevtoolsPlugin({id:"vee-validate-devtools-plugin",label:"VeeValidate Plugin",packageName:"vee-validate",homepage:"https://vee-validate.logaretm.com/v4",app:t,logo:"https://vee-validate.logaretm.com/v4/logo.png"},r=>{ko=r,r.addInspector({id:Vl,icon:"rule",label:"vee-validate",noSelectionText:"Select a vee-validate node to inspect",actions:[{icon:"done_outline",tooltip:"Validate selected item",action:async()=>{if(!zt){console.error("There is not a valid selected vee-validate node or component");return}if(zt.type==="field"){await zt.field.validate();return}if(zt.type==="form"){await zt.form.validate();return}zt.type==="pathState"&&await zt.form.validateField(zt.state.path)}},{icon:"delete_sweep",tooltip:"Clear validation state of the selected item",action:()=>{if(!zt){console.error("There is not a valid selected vee-validate node or component");return}if(zt.type==="field"){zt.field.resetField();return}zt.type==="form"&&zt.form.resetForm(),zt.type==="pathState"&&zt.form.resetField(zt.state.path)}}]}),r.on.getInspectorTree(n=>{if(n.inspectorId!==Vl)return;const i=Object.values(Hw),o=Object.values(ql);n.rootNodes=[...i.map(bF),...o.map(a=>EF(a))]}),r.on.getInspectorState(n=>{if(n.inspectorId!==Vl)return;const{form:i,field:o,state:a,type:s}=xF(n.nodeId);if(r.unhighlightElement(),i&&s==="form"){n.state=CF(i),zt={type:"form",form:i},r.highlightElement(i._vm);return}if(a&&s==="pathState"&&i){n.state=zw(a),zt={type:"pathState",state:a,form:i};return}if(o&&s==="field"){n.state=zw({errors:o.errors.value,dirty:o.meta.dirty,valid:o.meta.valid,touched:o.meta.touched,value:o.value.value,initialValue:o.meta.initialValue}),zt={field:o,type:"field"},r.highlightElement(o._vm);return}zt=null,r.unhighlightElement()})})}}const yh=Y$(()=>{setTimeout(async()=>{await y.nextTick(),ko==null||ko.sendInspectorState(Vl),ko==null||ko.sendInspectorTree(Vl)},100)},100);function yF(t){const e=y.getCurrentInstance();if(!ko){const r=e==null?void 0:e.appContext.app;if(!r)return;gF(r)}ql[t.id]=Object.assign({},t),ql[t.id]._vm=e,y.onUnmounted(()=>{delete ql[t.id],yh()}),yh()}function bF(t){const{textColor:e,bgColor:r}=qw(t.meta.value.valid),n={};Object.values(t.getAllPathStates()).forEach(a=>{K$(n,y.toValue(a.path),wF(a,t))});function i(a,s=[]){const u=[...s].pop();return"id"in a?Object.assign(Object.assign({},a),{label:u||a.label}):bs(a)?{id:`${s.join(".")}`,label:u||"",children:Object.keys(a).map(f=>i(a[f],[...s,f]))}:Array.isArray(a)?{id:`${s.join(".")}`,label:`${u}[]`,children:a.map((f,d)=>i(f,[...s,String(d)]))}:{id:"",label:"",children:[]}}const{children:o}=i(n);return{id:bh(t),label:t.name,children:o,tags:[{label:"Form",textColor:e,backgroundColor:r},{label:`${t.getAllPathStates().length} fields`,textColor:en.white,backgroundColor:en.unknown}]}}function wF(t,e){return{id:bh(e,t),label:y.toValue(t.path),tags:Uw(t.multiple,t.fieldsCount,t.type,t.valid,e)}}function EF(t,e){return{id:bh(e,t),label:y.unref(t.name),tags:Uw(!1,1,t.type,t.meta.valid,e)}}function Uw(t,e,r,n,i){const{textColor:o,bgColor:a}=qw(n);return[t?void 0:{label:"Field",textColor:o,backgroundColor:a},i?void 0:{label:"Standalone",textColor:en.black,backgroundColor:en.gray},r==="checkbox"?{label:"Checkbox",textColor:en.white,backgroundColor:en.blue}:void 0,r==="radio"?{label:"Radio",textColor:en.white,backgroundColor:en.purple}:void 0,t?{label:"Multiple",textColor:en.black,backgroundColor:en.orange}:void 0].filter(Boolean)}function bh(t,e){const r=e?"path"in e?"pathState":"field":"form",n=e?"path"in e?e==null?void 0:e.path:y.toValue(e==null?void 0:e.name):"",i={f:t==null?void 0:t.formId,ff:(e==null?void 0:e.id)||n,type:r};return btoa(encodeURIComponent(JSON.stringify(i)))}function xF(t){try{const e=JSON.parse(decodeURIComponent(atob(t))),r=Hw[e.f];if(!r&&e.ff){const i=ql[e.ff];return i?{type:e.type,field:i}:{}}if(!r)return{};const n=r.getPathState(e.ff);return{type:e.type,form:r,state:n}}catch{}return{}}function zw(t){return{"Field state":[{key:"errors",value:t.errors},{key:"initialValue",value:t.initialValue},{key:"currentValue",value:t.value},{key:"touched",value:t.touched},{key:"dirty",value:t.dirty},{key:"valid",value:t.valid}]}}function CF(t){const{errorBag:e,meta:r,values:n,isSubmitting:i,isValidating:o,submitCount:a}=t;return{"Form state":[{key:"submitCount",value:a.value},{key:"isSubmitting",value:i.value},{key:"isValidating",value:o.value},{key:"touched",value:r.value.touched},{key:"dirty",value:r.value.dirty},{key:"valid",value:r.value.valid},{key:"initialValues",value:r.value.initialValues},{key:"currentValues",value:n},{key:"errors",value:Mw(e.value).reduce((s,u)=>{var f;const d=(f=e.value[u])===null||f===void 0?void 0:f[0];return d&&(s[u]=d),s},{})}]}}function qw(t){return{bgColor:t?en.success:en.error,textColor:t?en.black:en.white}}function kF(t,e,r){return zl(r==null?void 0:r.type)?SF(t,e,r):Vw(t,e,r)}function Vw(t,e,r){const{initialValue:n,validateOnMount:i,bails:o,type:a,checkedValue:s,label:u,validateOnValueUpdate:f,uncheckedValue:d,controlled:p,keepValueOnUnmount:v,syncVModel:m,form:g}=TF(r),E=p?Nw(Cw):void 0,w=g||E,x=y.computed(()=>F$(y.toValue(t))),k=y.computed(()=>{if(y.toValue(w==null?void 0:w.schema))return;const F=y.unref(e);return hh(F)||Ul(F)||Zn(F)||Array.isArray(F)?F:Pw(F)}),_=!Zn(k.value)&&Ul(y.toValue(e)),{id:O,value:N,initialValue:L,meta:A,setState:P,errors:U,flags:J}=dF(x,{modelValue:n,form:w,bails:o,label:u,type:a,validate:k.value?Z:void 0,schema:_?e:void 0}),re=y.computed(()=>U.value[0]);m&&_F({value:N,prop:m,handleChange:j,shouldValidate:()=>f&&!J.pendingReset});const Se=(pe,F=!1)=>{A.touched=!0,F&&ce()};async function Fe(pe){var F,G;if(w!=null&&w.validateSchema){const{results:K}=await w.validateSchema(pe);return(F=K[y.toValue(x)])!==null&&F!==void 0?F:{valid:!0,errors:[]}}return k.value?oF(N.value,k.value,{name:y.toValue(x),label:y.toValue(u),values:(G=w==null?void 0:w.values)!==null&&G!==void 0?G:{},bails:o}):{valid:!0,errors:[]}}const ce=Dw(async()=>(A.pending=!0,A.validated=!0,Fe("validated-only")),pe=>(J.pendingUnmount[we.id]||(P({errors:pe.errors}),A.pending=!1,A.valid=pe.valid),pe)),le=Dw(async()=>Fe("silent"),pe=>(A.valid=pe.valid,pe));function Z(pe){return(pe==null?void 0:pe.mode)==="silent"?le():ce()}function j(pe,F=!0){const G=Rw(pe);ke(G,F)}y.onMounted(()=>{if(i)return ce();(!w||!w.validateSchema)&&le()});function ue(pe){A.touched=pe}function ye(pe){var F;const G=pe&&"value"in pe?pe.value:L.value;P({value:va(G),initialValue:va(G),touched:(F=pe==null?void 0:pe.touched)!==null&&F!==void 0?F:!1,errors:(pe==null?void 0:pe.errors)||[]}),A.pending=!1,A.validated=!1,le()}const ve=y.getCurrentInstance();function ke(pe,F=!0){N.value=ve&&m?X$(pe,ve.props.modelModifiers):pe,(F?ce:le)()}function Te(pe){P({errors:Array.isArray(pe)?pe:[pe]})}const We=y.computed({get(){return N.value},set(pe){ke(pe,f)}}),we={id:O,name:x,label:u,value:We,meta:A,errors:U,errorMessage:re,type:a,checkedValue:s,uncheckedValue:d,bails:o,keepValueOnUnmount:v,resetField:ye,handleReset:()=>ye(),validate:Z,handleChange:j,handleBlur:Se,setState:P,setTouched:ue,setErrors:Te,setValue:ke};if(y.provide(z$,we),y.isRef(e)&&typeof y.unref(e)!="function"&&y.watch(e,(pe,F)=>{gn(pe,F)||(A.validated?ce():le())},{deep:!0}),process.env.NODE_ENV!=="production"&&(we._vm=y.getCurrentInstance(),y.watch(()=>Object.assign(Object.assign({errors:U.value},A),{value:N.value}),yh,{deep:!0}),w||yF(we)),!w)return we;const De=y.computed(()=>{const pe=k.value;return!pe||Zn(pe)||hh(pe)||Ul(pe)||Array.isArray(pe)?{}:Object.keys(pe).reduce((F,G)=>{const K=nF(pe[G]).map(te=>te.__locatorRef).reduce((te,ne)=>{const he=ws(w.values,ne)||w.values[ne];return he!==void 0&&(te[ne]=he),te},{});return Object.assign(F,K),F},{})});return y.watch(De,(pe,F)=>{if(!Object.keys(pe).length)return;!gn(pe,F)&&(A.validated?ce():le())}),y.onBeforeUnmount(()=>{var pe;const F=(pe=y.toValue(we.keepValueOnUnmount))!==null&&pe!==void 0?pe:y.toValue(w.keepValuesOnUnmount),G=y.toValue(x);if(F||!w||J.pendingUnmount[we.id]){w==null||w.removePathState(G,O);return}J.pendingUnmount[we.id]=!0;const K=w.getPathState(G);if(Array.isArray(K==null?void 0:K.id)&&(K!=null&&K.multiple)?K!=null&&K.id.includes(we.id):(K==null?void 0:K.id)===we.id){if(K!=null&&K.multiple&&Array.isArray(K.value)){const ne=K.value.findIndex(he=>gn(he,y.toValue(we.checkedValue)));if(ne>-1){const he=[...K.value];he.splice(ne,1),w.setFieldValue(G,he)}Array.isArray(K.id)&&K.id.splice(K.id.indexOf(we.id),1)}else w.unsetPathValue(y.toValue(x));w.removePathState(G,O)}}),we}function TF(t){const e=()=>({initialValue:void 0,validateOnMount:!1,bails:!0,label:void 0,validateOnValueUpdate:!0,keepValueOnUnmount:void 0,syncVModel:!1,controlled:!0}),r=!!(t!=null&&t.syncVModel),n=typeof(t==null?void 0:t.syncVModel)=="string"?t.syncVModel:(t==null?void 0:t.modelPropName)||"modelValue",i=r&&!("initialValue"in(t||{}))?wh(y.getCurrentInstance(),n):t==null?void 0:t.initialValue;if(!t)return Object.assign(Object.assign({},e()),{initialValue:i});const o="valueProp"in t?t.valueProp:t.checkedValue,a="standalone"in t?!t.standalone:t.controlled,s=(t==null?void 0:t.modelPropName)||(t==null?void 0:t.syncVModel)||!1;return Object.assign(Object.assign(Object.assign({},e()),t||{}),{initialValue:i,controlled:a??!0,checkedValue:o,syncVModel:s})}function SF(t,e,r){const n=r!=null&&r.standalone?void 0:Nw(Cw),i=r==null?void 0:r.checkedValue,o=r==null?void 0:r.uncheckedValue;function a(s){const u=s.handleChange,f=y.computed(()=>{const p=y.toValue(s.value),v=y.toValue(i);return Array.isArray(p)?p.findIndex(m=>gn(m,v))>=0:gn(v,p)});function d(p,v=!0){var m,g;if(f.value===((m=p==null?void 0:p.target)===null||m===void 0?void 0:m.checked)){v&&s.validate();return}const E=y.toValue(t),w=n==null?void 0:n.getPathState(E),x=Rw(p);let k=(g=y.toValue(i))!==null&&g!==void 0?g:x;n&&(w!=null&&w.multiple)&&w.type==="checkbox"?k=Lw(ws(n.values,E)||[],k,void 0):(r==null?void 0:r.type)==="checkbox"&&(k=Lw(y.toValue(s.value),k,y.toValue(o))),u(k,v)}return Object.assign(Object.assign({},s),{checked:f,checkedValue:i,uncheckedValue:o,handleChange:d})}return a(Vw(t,e,r))}function _F({prop:t,value:e,handleChange:r,shouldValidate:n}){const i=y.getCurrentInstance();if(!i||!t){process.env.NODE_ENV!=="production"&&console.warn("Failed to setup model events because `useField` was not called in setup.");return}const o=typeof t=="string"?t:"modelValue",a=`update:${o}`;o in i.props&&(y.watch(e,s=>{gn(s,wh(i,o))||i.emit(a,s)}),y.watch(()=>wh(i,o),s=>{if(s===$c&&e.value===void 0)return;const u=s===$c?void 0:s;gn(u,e.value)||r(u,n())}))}function wh(t,e){if(t)return t.props[e]}const OF=y.defineComponent({name:"Field",inheritAttrs:!1,props:{as:{type:[String,Object],default:void 0},name:{type:String,required:!0},rules:{type:[Object,String,Function],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnBlur:{type:Boolean,default:void 0},validateOnChange:{type:Boolean,default:void 0},validateOnInput:{type:Boolean,default:void 0},validateOnModelUpdate:{type:Boolean,default:void 0},bails:{type:Boolean,default:()=>gh().bails},label:{type:String,default:void 0},uncheckedValue:{type:null,default:void 0},modelValue:{type:null,default:$c},modelModifiers:{type:null,default:()=>({})},"onUpdate:modelValue":{type:null,default:void 0},standalone:{type:Boolean,default:!1},keepValue:{type:Boolean,default:void 0}},setup(t,e){const r=y.toRef(t,"rules"),n=y.toRef(t,"name"),i=y.toRef(t,"label"),o=y.toRef(t,"uncheckedValue"),a=y.toRef(t,"keepValue"),{errors:s,value:u,errorMessage:f,validate:d,handleChange:p,handleBlur:v,setTouched:m,resetField:g,handleReset:E,meta:w,checked:x,setErrors:k,setValue:_}=kF(n,r,{validateOnMount:t.validateOnMount,bails:t.bails,standalone:t.standalone,type:e.attrs.type,initialValue:MF(t,e),checkedValue:e.attrs.value,uncheckedValue:o,label:i,validateOnValueUpdate:t.validateOnModelUpdate,keepValueOnUnmount:a,syncVModel:!0}),O=function(J,re=!0){p(J,re)},N=y.computed(()=>{const{validateOnInput:U,validateOnChange:J,validateOnBlur:re,validateOnModelUpdate:Se}=AF(t);function Fe(j){v(j,re),Zn(e.attrs.onBlur)&&e.attrs.onBlur(j)}function ce(j){O(j,U),Zn(e.attrs.onInput)&&e.attrs.onInput(j)}function le(j){O(j,J),Zn(e.attrs.onChange)&&e.attrs.onChange(j)}const Z={name:t.name,onBlur:Fe,onInput:ce,onChange:le};return Z["onUpdate:modelValue"]=j=>O(j,Se),Z}),L=y.computed(()=>{const U=Object.assign({},N.value);zl(e.attrs.type)&&x&&(U.checked=x.value);const J=Ww(t,e);return j$(J,e.attrs)&&(U.value=u.value),U}),A=y.computed(()=>Object.assign(Object.assign({},N.value),{modelValue:u.value}));function P(){return{field:L.value,componentField:A.value,value:u.value,meta:w,errors:s.value,errorMessage:f.value,validate:d,resetField:g,handleChange:O,handleInput:U=>O(U,!1),handleReset:E,handleBlur:N.value.onBlur,setTouched:m,setErrors:k,setValue:_}}return e.expose({value:u,meta:w,errors:s,errorMessage:f,setErrors:k,setTouched:m,setValue:_,reset:g,validate:d,handleChange:p}),()=>{const U=y.resolveDynamicComponent(Ww(t,e)),J=Z$(U,e,P);return U?y.h(U,Object.assign(Object.assign({},e.attrs),L.value),J):J}}});function Ww(t,e){let r=t.as||"";return!t.as&&!e.slots.default&&(r="input"),r}function AF(t){var e,r,n,i;const{validateOnInput:o,validateOnChange:a,validateOnBlur:s,validateOnModelUpdate:u}=gh();return{validateOnInput:(e=t.validateOnInput)!==null&&e!==void 0?e:o,validateOnChange:(r=t.validateOnChange)!==null&&r!==void 0?r:a,validateOnBlur:(n=t.validateOnBlur)!==null&&n!==void 0?n:s,validateOnModelUpdate:(i=t.validateOnModelUpdate)!==null&&i!==void 0?i:u}}function MF(t,e){return zl(e.attrs.type)?Sw(t,"modelValue")?t.modelValue:void 0:Sw(t,"modelValue")?t.modelValue:e.attrs.value}const ma=OF,NF={class:"checkbox single"},LF=["id","checked"],DF={class:"text"},IF={key:0,class:"txt_tf txt_error"},RF=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"element-checkbox",props:{modelValue:{type:[String,Number],default:""},rules:{type:String,default:""},name:{type:String,default:""},label:{type:String,default:""},immediate:{type:Boolean,default:!1},className:{type:String,default:"custom-input-compo"}},emits:["update:modelValue"],setup(t,{emit:e}){const r=t,n=e,i=Hi.generateUuid(),o=y.computed({get(){return r.modelValue},set(a){return n("update:modelValue",a)}});return(a,s)=>(y.openBlock(),y.createBlock(y.unref(ma),{modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=u=>o.value=u),rules:t.rules,type:"checkbox",name:t.name,value:!0,"unchecked-value":!1},{default:y.withCtx(({field:u,errors:f})=>[y.createElementVNode("div",null,[y.createElementVNode("label",NF,[y.createElementVNode("input",y.mergeProps({type:"checkbox"},u,{id:`checkbox-${y.unref(i)}`,checked:o.value,value:!0,class:"hide"}),null,16,LF),y.createElementVNode("span",DF,y.toDisplayString(t.label),1)]),f.length>0?(y.openBlock(),y.createElementBlock("p",IF,y.toDisplayString(f[0]),1)):y.createCommentVNode("",!0)])]),_:1},8,["modelValue","rules","name"]))}}},Symbol.toStringTag,{value:"Module"})),PF=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"element-date-picker",props:{modelValue:{type:String,default:""},type:{type:String,default:"day"},name:{type:String,default:""},rules:{type:String,default:""},immediate:{type:Boolean,default:!1},isMultiple:{type:Boolean,default:!1},isTextInput:{type:Boolean,default:!1},isClear:{type:Boolean,default:!0},autoApply:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},tooltipModifiers:{type:Array,default(){return[{name:"offset",options:{offset:[30,25]}},{name:"arrow",options:{padding:15}}]}},tooltipPlacement:{type:String,default:"top-end"}},emits:["update:modelValue"],setup(t,{emit:e}){const r=t,n=e,i=y.ref(null),o=y.computed({get(){return r.modelValue},set(f){return n("update:modelValue",f)}}),a=y.computed(()=>{switch(r.type){case"day":return"yyyy-MM-dd";case"month":return"yyyy-MM";case"year":return"yyyy";default:return"yyyy-MM-dd"}}),s=y.computed(()=>a.value);y.onMounted(async()=>{r.immediate&&await i.value.validate()});const u=()=>{n("update:modelValue","")};return(f,d)=>(y.openBlock(),y.createBlock(y.unref(ma),{ref_key:"veeField",ref:i,modelValue:o.value,"onUpdate:modelValue":d[1]||(d[1]=p=>o.value=p),rules:t.rules,type:"text",name:t.name},{default:y.withCtx(({field:p,errors:v})=>[y.createElementVNode("span",{class:y.normalizeClass(["ipt",v.length>0?"iptError":""]),style:y.normalizeStyle(`width: ${t.isMultiple?"210":"130"}px`)},[y.createElementVNode("input",y.mergeProps(p,{type:"hidden"}),null,16),y.createVNode(y.unref(dn),{modelValue:o.value,"onUpdate:modelValue":d[0]||(d[0]=m=>o.value=m),locale:"ko",format:a.value,"model-type":s.value,"auto-apply":t.autoApply,range:t.isMultiple,"multi-calendars":t.isMultiple,"action-row":{showNow:!0},"now-button-label":"Today",clearable:!1,textInput:t.isTextInput,disabled:t.disabled,readonly:t.readonly,"enable-time-picker":t.type!=="day",yearPicker:t.type==="year",quarterPicker:t.type==="quarter",monthPicker:t.type==="month",weekPicker:t.type==="week",timePicker:t.type==="time"},null,8,["modelValue","format","model-type","auto-apply","range","multi-calendars","textInput","disabled","readonly","enable-time-picker","yearPicker","quarterPicker","monthPicker","weekPicker","timePicker"]),v.length>0?(y.openBlock(),y.createBlock(Ml,{key:0,msg:v[0],placement:t.tooltipPlacement,modifiers:t.tooltipModifiers},{default:y.withCtx(()=>[...d[2]||(d[2]=[y.createElementVNode("span",{class:"error"},[y.createElementVNode("span",{class:"hide"},"에러")],-1)])]),_:1},8,["msg","placement","modifiers"])):y.createCommentVNode("",!0),t.isClear&&o.value.length>0?(y.openBlock(),y.createBlock(El,{key:1,className:"btn_del",onClick:u},{default:y.withCtx(()=>[...d[3]||(d[3]=[y.createElementVNode("span",{class:"hide"},"삭제",-1)])]),_:1})):y.createCommentVNode("",!0)],6)]),_:1},8,["modelValue","rules","name"]))}}},Symbol.toStringTag,{value:"Module"}));function dr(t){this.content=t}dr.prototype={constructor:dr,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,r){var n=r&&r!=t?this.remove(r):this,i=n.find(t),o=n.content.slice();return i==-1?o.push(r||t,e):(o[i+1]=e,r&&(o[i]=r)),new dr(o)},remove:function(t){var e=this.find(t);if(e==-1)return this;var r=this.content.slice();return r.splice(e,2),new dr(r)},addToStart:function(t,e){return new dr([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var r=this.remove(t).content.slice();return r.push(t,e),new dr(r)},addBefore:function(t,e,r){var n=this.remove(e),i=n.content.slice(),o=n.find(t);return i.splice(o==-1?i.length:o,0,e,r),new dr(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=dr.from(t),t.size?new dr(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=dr.from(t),t.size?new dr(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=dr.from(t);for(var r=0;r<t.content.length;r+=2)e=e.remove(t.content[r]);return e},toObject:function(){var t={};return this.forEach(function(e,r){t[e]=r}),t},get size(){return this.content.length>>1}},dr.from=function(t){if(t instanceof dr)return t;var e=[];if(t)for(var r in t)e.push(r,t[r]);return new dr(e)};function jw(t,e,r){for(let n=0;;n++){if(n==t.childCount||n==e.childCount)return t.childCount==e.childCount?null:r;let i=t.child(n),o=e.child(n);if(i==o){r+=i.nodeSize;continue}if(!i.sameMarkup(o))return r;if(i.isText&&i.text!=o.text){for(let a=0;i.text[a]==o.text[a];a++)r++;return r}if(i.content.size||o.content.size){let a=jw(i.content,o.content,r+1);if(a!=null)return a}r+=i.nodeSize}}function Gw(t,e,r,n){for(let i=t.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:r,b:n};let a=t.child(--i),s=e.child(--o),u=a.nodeSize;if(a==s){r-=u,n-=u;continue}if(!a.sameMarkup(s))return{a:r,b:n};if(a.isText&&a.text!=s.text){let f=0,d=Math.min(a.text.length,s.text.length);for(;f<d&&a.text[a.text.length-f-1]==s.text[s.text.length-f-1];)f++,r--,n--;return{a:r,b:n}}if(a.content.size||s.content.size){let f=Gw(a.content,s.content,r-1,n-1);if(f)return f}r-=u,n-=u}}class oe{constructor(e,r){if(this.content=e,this.size=r||0,r==null)for(let n=0;n<e.length;n++)this.size+=e[n].nodeSize}nodesBetween(e,r,n,i=0,o){for(let a=0,s=0;s<r;a++){let u=this.content[a],f=s+u.nodeSize;if(f>e&&n(u,i+s,o||null,a)!==!1&&u.content.size){let d=s+1;u.nodesBetween(Math.max(0,e-d),Math.min(u.content.size,r-d),n,i+d)}s=f}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,r,n,i){let o="",a=!0;return this.nodesBetween(e,r,(s,u)=>{let f=s.isText?s.text.slice(Math.max(e,u)-u,r-u):s.isLeaf?i?typeof i=="function"?i(s):i:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&f||s.isTextblock)&&n&&(a?a=!1:o+=n),o+=f},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let r=this.lastChild,n=e.firstChild,i=this.content.slice(),o=0;for(r.isText&&r.sameMarkup(n)&&(i[i.length-1]=r.withText(r.text+n.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new oe(i,this.size+e.size)}cut(e,r=this.size){if(e==0&&r==this.size)return this;let n=[],i=0;if(r>e)for(let o=0,a=0;a<r;o++){let s=this.content[o],u=a+s.nodeSize;u>e&&((a<e||u>r)&&(s.isText?s=s.cut(Math.max(0,e-a),Math.min(s.text.length,r-a)):s=s.cut(Math.max(0,e-a-1),Math.min(s.content.size,r-a-1))),n.push(s),i+=s.nodeSize),a=u}return new oe(n,i)}cutByIndex(e,r){return e==r?oe.empty:e==0&&r==this.content.length?this:new oe(this.content.slice(e,r))}replaceChild(e,r){let n=this.content[e];if(n==r)return this;let i=this.content.slice(),o=this.size+r.nodeSize-n.nodeSize;return i[e]=r,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 r=0;r<this.content.length;r++)if(!this.content[r].eq(e.content[r]))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 r=this.content[e];if(!r)throw new RangeError("Index "+e+" out of range for "+this);return r}maybeChild(e){return this.content[e]||null}forEach(e){for(let r=0,n=0;r<this.content.length;r++){let i=this.content[r];e(i,n,r),n+=i.nodeSize}}findDiffStart(e,r=0){return jw(this,e,r)}findDiffEnd(e,r=this.size,n=e.size){return Gw(this,e,r,n)}findIndex(e){if(e==0)return Fc(0,e);if(e==this.size)return Fc(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,n=0;;r++){let i=this.child(r),o=n+i.nodeSize;if(o>=e)return o==e?Fc(r+1,o):Fc(r,n);n=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,r){if(!r)return oe.empty;if(!Array.isArray(r))throw new RangeError("Invalid input for Fragment.fromJSON");return new oe(r.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return oe.empty;let r,n=0;for(let i=0;i<e.length;i++){let o=e[i];n+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(r||(r=e.slice(0,i)),r[r.length-1]=o.withText(r[r.length-1].text+o.text)):r&&r.push(o)}return new oe(r||e,n)}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)":""))}}oe.empty=new oe([],0);const Eh={index:0,offset:0};function Fc(t,e){return Eh.index=t,Eh.offset=e,Eh}function Hc(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let r=Array.isArray(t);if(Array.isArray(e)!=r)return!1;if(r){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!Hc(t[n],e[n]))return!1}else{for(let n in t)if(!(n in e)||!Hc(t[n],e[n]))return!1;for(let n in e)if(!(n in t))return!1}return!0}let ht=class r0{constructor(e,r){this.type=e,this.attrs=r}addToSet(e){let r,n=!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))r||(r=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(r||(r=e.slice(0,i)),r.push(this),n=!0),r&&r.push(o)}}return r||(r=e.slice()),n||r.push(this),r}removeFromSet(e){for(let r=0;r<e.length;r++)if(this.eq(e[r]))return e.slice(0,r).concat(e.slice(r+1));return e}isInSet(e){for(let r=0;r<e.length;r++)if(this.eq(e[r]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Hc(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let r in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,r){if(!r)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[r.type];if(!n)throw new RangeError(`There is no mark type ${r.type} in this schema`);let i=n.create(r.attrs);return n.checkAttrs(i.attrs),i}static sameSet(e,r){if(e==r)return!0;if(e.length!=r.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(r[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return r0.none;if(e instanceof r0)return[e];let r=e.slice();return r.sort((n,i)=>n.type.rank-i.type.rank),r}};ht.none=[];class Uc extends Error{}class ge{constructor(e,r,n){this.content=e,this.openStart=r,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,r){let n=Yw(this.content,e+this.openStart,r);return n&&new ge(n,this.openStart,this.openEnd)}removeBetween(e,r){return new ge(Kw(this.content,e+this.openStart,r+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,r){if(!r)return ge.empty;let n=r.openStart||0,i=r.openEnd||0;if(typeof n!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ge(oe.fromJSON(e,r.content),n,i)}static maxOpen(e,r=!0){let n=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(r||!o.type.spec.isolating);o=o.firstChild)n++;for(let o=e.lastChild;o&&!o.isLeaf&&(r||!o.type.spec.isolating);o=o.lastChild)i++;return new ge(e,n,i)}}ge.empty=new ge(oe.empty,0,0);function Kw(t,e,r){let{index:n,offset:i}=t.findIndex(e),o=t.maybeChild(n),{index:a,offset:s}=t.findIndex(r);if(i==e||o.isText){if(s!=r&&!t.child(a).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(r))}if(n!=a)throw new RangeError("Removing non-flat range");return t.replaceChild(n,o.copy(Kw(o.content,e-i-1,r-i-1)))}function Yw(t,e,r,n){let{index:i,offset:o}=t.findIndex(e),a=t.maybeChild(i);if(o==e||a.isText)return n&&!n.canReplace(i,i,r)?null:t.cut(0,e).append(r).append(t.cut(e));let s=Yw(a.content,e-o-1,r,a);return s&&t.replaceChild(i,a.copy(s))}function BF(t,e,r){if(r.openStart>t.depth)throw new Uc("Inserted content deeper than insertion position");if(t.depth-r.openStart!=e.depth-r.openEnd)throw new Uc("Inconsistent open depths");return Xw(t,e,r,0)}function Xw(t,e,r,n){let i=t.index(n),o=t.node(n);if(i==e.index(n)&&n<t.depth-r.openStart){let a=Xw(t,e,r,n+1);return o.copy(o.content.replaceChild(i,a))}else if(r.content.size)if(!r.openStart&&!r.openEnd&&t.depth==n&&e.depth==n){let a=t.parent,s=a.content;return ya(a,s.cut(0,t.parentOffset).append(r.content).append(s.cut(e.parentOffset)))}else{let{start:a,end:s}=$F(r,t);return ya(o,Zw(t,a,s,e,n))}else return ya(o,zc(t,e,n))}function Jw(t,e){if(!e.type.compatibleContent(t.type))throw new Uc("Cannot join "+e.type.name+" onto "+t.type.name)}function xh(t,e,r){let n=t.node(r);return Jw(n,e.node(r)),n}function ga(t,e){let r=e.length-1;r>=0&&t.isText&&t.sameMarkup(e[r])?e[r]=t.withText(e[r].text+t.text):e.push(t)}function Wl(t,e,r,n){let i=(e||t).node(r),o=0,a=e?e.index(r):i.childCount;t&&(o=t.index(r),t.depth>r?o++:t.textOffset&&(ga(t.nodeAfter,n),o++));for(let s=o;s<a;s++)ga(i.child(s),n);e&&e.depth==r&&e.textOffset&&ga(e.nodeBefore,n)}function ya(t,e){return t.type.checkContent(e),t.copy(e)}function Zw(t,e,r,n,i){let o=t.depth>i&&xh(t,e,i+1),a=n.depth>i&&xh(r,n,i+1),s=[];return Wl(null,t,i,s),o&&a&&e.index(i)==r.index(i)?(Jw(o,a),ga(ya(o,Zw(t,e,r,n,i+1)),s)):(o&&ga(ya(o,zc(t,e,i+1)),s),Wl(e,r,i,s),a&&ga(ya(a,zc(r,n,i+1)),s)),Wl(n,null,i,s),new oe(s)}function zc(t,e,r){let n=[];if(Wl(null,t,r,n),t.depth>r){let i=xh(t,e,r+1);ga(ya(i,zc(t,e,r+1)),n)}return Wl(e,null,r,n),new oe(n)}function $F(t,e){let r=e.depth-t.openStart,i=e.node(r).copy(t.content);for(let o=r-1;o>=0;o--)i=e.node(o).copy(oe.from(i));return{start:i.resolveNoCache(t.openStart+r),end:i.resolveNoCache(i.content.size-t.openEnd-r)}}class jl{constructor(e,r,n){this.pos=e,this.path=r,this.parentOffset=n,this.depth=r.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,r=this.index(this.depth);if(r==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],i=e.child(r);return n?e.child(r).cut(n):i}get nodeBefore(){let e=this.index(this.depth),r=this.pos-this.path[this.path.length-1];return r?this.parent.child(e).cut(0,r):e==0?null:this.parent.child(e-1)}posAtIndex(e,r){r=this.resolveDepth(r);let n=this.path[r*3],i=r==0?0:this.path[r*3-1]+1;for(let o=0;o<e;o++)i+=n.child(o).nodeSize;return i}marks(){let e=this.parent,r=this.index();if(e.content.size==0)return ht.none;if(this.textOffset)return e.child(r).marks;let n=e.maybeChild(r-1),i=e.maybeChild(r);if(!n){let s=n;n=i,i=s}let o=n.marks;for(var a=0;a<o.length;a++)o[a].type.spec.inclusive===!1&&(!i||!o[a].isInSet(i.marks))&&(o=o[a--].removeFromSet(o));return o}marksAcross(e){let r=this.parent.maybeChild(this.index());if(!r||!r.isInline)return null;let n=r.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<n.length;o++)n[o].type.spec.inclusive===!1&&(!i||!n[o].isInSet(i.marks))&&(n=n[o--].removeFromSet(n));return n}sharedDepth(e){for(let r=this.depth;r>0;r--)if(this.start(r)<=e&&this.end(r)>=e)return r;return 0}blockRange(e=this,r){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!r||r(this.node(n))))return new qc(this,e,n);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 r=1;r<=this.depth;r++)e+=(e?"/":"")+this.node(r).type.name+"_"+this.index(r-1);return e+":"+this.parentOffset}static resolve(e,r){if(!(r>=0&&r<=e.content.size))throw new RangeError("Position "+r+" out of range");let n=[],i=0,o=r;for(let a=e;;){let{index:s,offset:u}=a.content.findIndex(o),f=o-u;if(n.push(a,s,i+u),!f||(a=a.child(s),a.isText))break;o=f-1,i+=u+1}return new jl(r,n,o)}static resolveCached(e,r){let n=Qw.get(e);if(n)for(let o=0;o<n.elts.length;o++){let a=n.elts[o];if(a.pos==r)return a}else Qw.set(e,n=new FF);let i=n.elts[n.i]=jl.resolve(e,r);return n.i=(n.i+1)%HF,i}}class FF{constructor(){this.elts=[],this.i=0}}const HF=12,Qw=new WeakMap;class qc{constructor(e,r,n){this.$from=e,this.$to=r,this.depth=n}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 UF=Object.create(null);let To=class n0{constructor(e,r,n,i=ht.none){this.type=e,this.attrs=r,this.marks=i,this.content=n||oe.empty}get children(){return this.content.content}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,r,n,i=0){this.content.nodesBetween(e,r,n,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,r,n,i){return this.content.textBetween(e,r,n,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,r,n){return this.type==e&&Hc(this.attrs,r||e.defaultAttrs||UF)&&ht.sameSet(this.marks,n||ht.none)}copy(e=null){return e==this.content?this:new n0(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new n0(this.type,this.attrs,this.content,e)}cut(e,r=this.content.size){return e==0&&r==this.content.size?this:this.copy(this.content.cut(e,r))}slice(e,r=this.content.size,n=!1){if(e==r)return ge.empty;let i=this.resolve(e),o=this.resolve(r),a=n?0:i.sharedDepth(r),s=i.start(a),f=i.node(a).content.cut(i.pos-s,o.pos-s);return new ge(f,i.depth-a,o.depth-a)}replace(e,r,n){return BF(this.resolve(e),this.resolve(r),n)}nodeAt(e){for(let r=this;;){let{index:n,offset:i}=r.content.findIndex(e);if(r=r.maybeChild(n),!r)return null;if(i==e||r.isText)return r;e-=i+1}}childAfter(e){let{index:r,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(r),index:r,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:r,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(r),index:r,offset:n};let i=this.content.child(r-1);return{node:i,index:r-1,offset:n-i.nodeSize}}resolve(e){return jl.resolveCached(this,e)}resolveNoCache(e){return jl.resolve(this,e)}rangeHasMark(e,r,n){let i=!1;return r>e&&this.nodesBetween(e,r,o=>(n.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()+")"),e1(this.marks,e)}contentMatchAt(e){let r=this.type.contentMatch.matchFragment(this.content,0,e);if(!r)throw new Error("Called contentMatchAt on a node with invalid content");return r}canReplace(e,r,n=oe.empty,i=0,o=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,i,o),s=a&&a.matchFragment(this.content,r);if(!s||!s.validEnd)return!1;for(let u=i;u<o;u++)if(!this.type.allowsMarks(n.child(u).marks))return!1;return!0}canReplaceWith(e,r,n,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(n),a=o&&o.matchFragment(this.content,r);return a?a.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=ht.none;for(let r=0;r<this.marks.length;r++){let n=this.marks[r];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!ht.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(r=>r.type.name)}`);this.content.forEach(r=>r.check())}toJSON(){let e={type:this.type.name};for(let r 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(r=>r.toJSON())),e}static fromJSON(e,r){if(!r)throw new RangeError("Invalid input for Node.fromJSON");let n;if(r.marks){if(!Array.isArray(r.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=r.marks.map(e.markFromJSON)}if(r.type=="text"){if(typeof r.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(r.text,n)}let i=oe.fromJSON(e,r.content),o=e.nodeType(r.type).create(r.attrs,i,n);return o.type.checkAttrs(o.attrs),o}};To.prototype.text=void 0;class Vc extends To{constructor(e,r,n,i){if(super(e,r,null,i),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):e1(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,r){return this.text.slice(e,r)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Vc(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Vc(this.type,this.attrs,e,this.marks)}cut(e=0,r=this.text.length){return e==0&&r==this.text.length?this:this.withText(this.text.slice(e,r))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function e1(t,e){for(let r=t.length-1;r>=0;r--)e=t[r].type.name+"("+e+")";return e}class ba{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,r){let n=new zF(e,r);if(n.next==null)return ba.empty;let i=t1(n);n.next&&n.err("Unexpected trailing text");let o=YF(KF(i));return XF(o,n),o}matchType(e){for(let r=0;r<this.next.length;r++)if(this.next[r].type==e)return this.next[r].next;return null}matchFragment(e,r=0,n=e.childCount){let i=this;for(let o=r;i&&o<n;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:r}=this.next[e];if(!(r.isText||r.hasRequiredAttrs()))return r}return null}compatible(e){for(let r=0;r<this.next.length;r++)for(let n=0;n<e.next.length;n++)if(this.next[r].type==e.next[n].type)return!0;return!1}fillBefore(e,r=!1,n=0){let i=[this];function o(a,s){let u=a.matchFragment(e,n);if(u&&(!r||u.validEnd))return oe.from(s.map(f=>f.createAndFill()));for(let f=0;f<a.next.length;f++){let{type:d,next:p}=a.next[f];if(!(d.isText||d.hasRequiredAttrs())&&i.indexOf(p)==-1){i.push(p);let v=o(p,s.concat(d));if(v)return v}}return null}return o(this,[])}findWrapping(e){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==e)return this.wrapCache[n+1];let r=this.computeWrapping(e);return this.wrapCache.push(e,r),r}computeWrapping(e){let r=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let i=n.shift(),o=i.match;if(o.matchType(e)){let a=[];for(let s=i;s.type;s=s.via)a.push(s.type);return a.reverse()}for(let a=0;a<o.next.length;a++){let{type:s,next:u}=o.next[a];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in r)&&(!i.type||u.validEnd)&&(n.push({match:s.contentMatch,type:s,via:i}),r[s.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 r(n){e.push(n);for(let i=0;i<n.next.length;i++)e.indexOf(n.next[i].next)==-1&&r(n.next[i].next)}return r(this),e.map((n,i)=>{let o=i+(n.validEnd?"*":" ")+" ";for(let a=0;a<n.next.length;a++)o+=(a?", ":"")+n.next[a].type.name+"->"+e.indexOf(n.next[a].next);return o}).join(`
|
|
97
|
+
`)}}ba.empty=new ba(!0);class zF{constructor(e,r){this.string=e,this.nodeTypes=r,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 t1(t){let e=[];do e.push(qF(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function qF(t){let e=[];do e.push(VF(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function VF(t){let e=GF(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=WF(t,e);else break;return e}function r1(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function WF(t,e){let r=r1(t),n=r;return t.eat(",")&&(t.next!="}"?n=r1(t):n=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:r,max:n,expr:e}}function jF(t,e){let r=t.nodeTypes,n=r[e];if(n)return[n];let i=[];for(let o in r){let a=r[o];a.isInGroup(e)&&i.push(a)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function GF(t){if(t.eat("(")){let e=t1(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=jF(t,t.next).map(r=>(t.inline==null?t.inline=r.isInline:t.inline!=r.isInline&&t.err("Mixing inline and block content"),{type:"name",value:r}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function KF(t){let e=[[]];return i(o(t,0),r()),e;function r(){return e.push([])-1}function n(a,s,u){let f={term:u,to:s};return e[a].push(f),f}function i(a,s){a.forEach(u=>u.to=s)}function o(a,s){if(a.type=="choice")return a.exprs.reduce((u,f)=>u.concat(o(f,s)),[]);if(a.type=="seq")for(let u=0;;u++){let f=o(a.exprs[u],s);if(u==a.exprs.length-1)return f;i(f,s=r())}else if(a.type=="star"){let u=r();return n(s,u),i(o(a.expr,u),u),[n(u)]}else if(a.type=="plus"){let u=r();return i(o(a.expr,s),u),i(o(a.expr,u),u),[n(u)]}else{if(a.type=="opt")return[n(s)].concat(o(a.expr,s));if(a.type=="range"){let u=s;for(let f=0;f<a.min;f++){let d=r();i(o(a.expr,u),d),u=d}if(a.max==-1)i(o(a.expr,u),u);else for(let f=a.min;f<a.max;f++){let d=r();n(u,d),i(o(a.expr,u),d),u=d}return[n(u)]}else{if(a.type=="name")return[n(s,void 0,a.value)];throw new Error("Unknown expr type")}}}}function n1(t,e){return e-t}function i1(t,e){let r=[];return n(e),r.sort(n1);function n(i){let o=t[i];if(o.length==1&&!o[0].term)return n(o[0].to);r.push(i);for(let a=0;a<o.length;a++){let{term:s,to:u}=o[a];!s&&r.indexOf(u)==-1&&n(u)}}}function YF(t){let e=Object.create(null);return r(i1(t,0));function r(n){let i=[];n.forEach(a=>{t[a].forEach(({term:s,to:u})=>{if(!s)return;let f;for(let d=0;d<i.length;d++)i[d][0]==s&&(f=i[d][1]);i1(t,u).forEach(d=>{f||i.push([s,f=[]]),f.indexOf(d)==-1&&f.push(d)})})});let o=e[n.join(",")]=new ba(n.indexOf(t.length-1)>-1);for(let a=0;a<i.length;a++){let s=i[a][1].sort(n1);o.next.push({type:i[a][0],next:e[s.join(",")]||r(s)})}return o}}function XF(t,e){for(let r=0,n=[t];r<n.length;r++){let i=n[r],o=!i.validEnd,a=[];for(let s=0;s<i.next.length;s++){let{type:u,next:f}=i.next[s];a.push(u.name),o&&!(u.isText||u.hasRequiredAttrs())&&(o=!1),n.indexOf(f)==-1&&n.push(f)}o&&e.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function o1(t){let e=Object.create(null);for(let r in t){let n=t[r];if(!n.hasDefault)return null;e[r]=n.default}return e}function a1(t,e){let r=Object.create(null);for(let n in t){let i=e&&e[n];if(i===void 0){let o=t[n];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+n)}r[n]=i}return r}function s1(t,e,r,n){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${r} of type ${i}`);for(let i in t){let o=t[i];o.validate&&o.validate(e[i])}}function l1(t,e){let r=Object.create(null);if(e)for(let n in e)r[n]=new ZF(t,n,e[n]);return r}let u1=class GN{constructor(e,r,n){this.name=e,this.schema=r,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=l1(e,n.attrs),this.defaultAttrs=o1(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==ba.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}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:a1(this.attrs,e)}create(e=null,r,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new To(this,this.computeAttrs(e),oe.from(r),ht.setFrom(n))}createChecked(e=null,r,n){return r=oe.from(r),this.checkContent(r),new To(this,this.computeAttrs(e),r,ht.setFrom(n))}createAndFill(e=null,r,n){if(e=this.computeAttrs(e),r=oe.from(r),r.size){let a=this.contentMatch.fillBefore(r);if(!a)return null;r=a.append(r)}let i=this.contentMatch.matchFragment(r),o=i&&i.fillBefore(oe.empty,!0);return o?new To(this,e,r.append(o),ht.setFrom(n)):null}validContent(e){let r=this.contentMatch.matchFragment(e);if(!r||!r.validEnd)return!1;for(let n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).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){s1(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 r=0;r<e.length;r++)if(!this.allowsMarkType(e[r].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let r;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?r&&r.push(e[n]):r||(r=e.slice(0,n));return r?r.length?r:ht.none:e}static compile(e,r){let n=Object.create(null);e.forEach((o,a)=>n[o]=new GN(o,r,a));let i=r.spec.topNode||"doc";if(!n[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let o in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}};function JF(t,e,r){let n=r.split("|");return i=>{let o=i===null?"null":typeof i;if(n.indexOf(o)<0)throw new RangeError(`Expected value of type ${n} for attribute ${e} on type ${t}, got ${o}`)}}class ZF{constructor(e,r,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate=typeof n.validate=="string"?JF(e,r,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class Wc{constructor(e,r,n,i){this.name=e,this.rank=r,this.schema=n,this.spec=i,this.attrs=l1(e,i.attrs),this.excluded=null;let o=o1(this.attrs);this.instance=o?new ht(this,o):null}create(e=null){return!e&&this.instance?this.instance:new ht(this,a1(this.attrs,e))}static compile(e,r){let n=Object.create(null),i=0;return e.forEach((o,a)=>n[o]=new Wc(o,i++,r,a)),n}removeFromSet(e){for(var r=0;r<e.length;r++)e[r].type==this&&(e=e.slice(0,r).concat(e.slice(r+1)),r--);return e}isInSet(e){for(let r=0;r<e.length;r++)if(e[r].type==this)return e[r]}checkAttrs(e){s1(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class c1{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let r=this.spec={};for(let i in e)r[i]=e[i];r.nodes=dr.from(e.nodes),r.marks=dr.from(e.marks||{}),this.nodes=u1.compile(this.spec.nodes,this),this.marks=Wc.compile(this.spec.marks,this);let n=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],a=o.spec.content||"",s=o.spec.marks;if(o.contentMatch=n[a]||(n[a]=ba.parse(a,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=s=="_"?null:s?f1(this,s.split(" ")):s==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],a=o.spec.excludes;o.excluded=a==null?[o]:a==""?[]:f1(this,a.split(" "))}this.nodeFromJSON=i=>To.fromJSON(this,i),this.markFromJSON=i=>ht.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,r=null,n,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof u1){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(r,n,i)}text(e,r){let n=this.nodes.text;return new Vc(n,n.defaultAttrs,e,ht.setFrom(r))}mark(e,r){return typeof e=="string"&&(e=this.marks[e]),e.create(r)}nodeType(e){let r=this.nodes[e];if(!r)throw new RangeError("Unknown node type: "+e);return r}}function f1(t,e){let r=[];for(let n=0;n<e.length;n++){let i=e[n],o=t.marks[i],a=o;if(o)r.push(o);else for(let s in t.marks){let u=t.marks[s];(i=="_"||u.spec.group&&u.spec.group.split(" ").indexOf(i)>-1)&&r.push(a=u)}if(!a)throw new SyntaxError("Unknown mark type: '"+e[n]+"'")}return r}function QF(t){return t.tag!=null}function e3(t){return t.style!=null}let jc=class i0{constructor(e,r){this.schema=e,this.rules=r,this.tags=[],this.styles=[];let n=this.matchedStyles=[];r.forEach(i=>{if(QF(i))this.tags.push(i);else if(e3(i)){let o=/[^=]*/.exec(i.style)[0];n.indexOf(o)<0&&n.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,r={}){let n=new v1(this,r,!1);return n.addAll(e,ht.none,r.from,r.to),n.finish()}parseSlice(e,r={}){let n=new v1(this,r,!0);return n.addAll(e,ht.none,r.from,r.to),ge.maxOpen(n.finish())}matchTag(e,r,n){for(let i=n?this.tags.indexOf(n)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(n3(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||r.matchesContext(o.context))){if(o.getAttrs){let a=o.getAttrs(e);if(a===!1)continue;o.attrs=a||void 0}return o}}}matchStyle(e,r,n,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let a=this.styles[o],s=a.style;if(!(s.indexOf(e)!=0||a.context&&!n.matchesContext(a.context)||s.length>e.length&&(s.charCodeAt(e.length)!=61||s.slice(e.length+1)!=r))){if(a.getAttrs){let u=a.getAttrs(r);if(u===!1)continue;a.attrs=u||void 0}return a}}}static schemaRules(e){let r=[];function n(i){let o=i.priority==null?50:i.priority,a=0;for(;a<r.length;a++){let s=r[a];if((s.priority==null?50:s.priority)<o)break}r.splice(a,0,i)}for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(a=>{n(a=m1(a)),a.mark||a.ignore||a.clearMark||(a.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(a=>{n(a=m1(a)),a.node||a.ignore||a.mark||(a.node=i)})}return r}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new i0(e,i0.schemaRules(e)))}};const d1={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},t3={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},p1={ol:!0,ul:!0},Gl=1,Ch=2,Kl=4;function h1(t,e,r){return e!=null?(e?Gl:0)|(e==="full"?Ch:0):t&&t.whitespace=="pre"?Gl|Ch:r&~Kl}class Gc{constructor(e,r,n,i,o,a){this.type=e,this.attrs=r,this.marks=n,this.solid=i,this.options=a,this.content=[],this.activeMarks=ht.none,this.match=o||(a&Kl?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let r=this.type.contentMatch.fillBefore(oe.from(e));if(r)this.match=this.type.contentMatch.matchFragment(r);else{let n=this.type.contentMatch,i;return(i=n.findWrapping(e.type))?(this.match=n,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Gl)){let n=this.content[this.content.length-1],i;if(n&&n.isText&&(i=/[ \t\r\n\u000c]+$/.exec(n.text))){let o=n;n.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 r=oe.from(this.content);return!e&&this.match&&(r=r.append(this.match.fillBefore(oe.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!d1.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class v1{constructor(e,r,n){this.parser=e,this.options=r,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let i=r.topNode,o,a=h1(null,r.preserveWhitespace,0)|(n?Kl:0);i?o=new Gc(i.type,i.attrs,ht.none,!0,r.topMatch||i.type.contentMatch,a):n?o=new Gc(null,null,ht.none,!0,null,a):o=new Gc(e.schema.topNodeType,null,ht.none,!0,null,a),this.nodes=[o],this.find=r.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,r){e.nodeType==3?this.addTextNode(e,r):e.nodeType==1&&this.addElement(e,r)}addTextNode(e,r){let n=e.nodeValue,i=this.top,o=i.options&Ch?"full":this.localPreserveWS||(i.options&Gl)>0,{schema:a}=this.parser;if(o==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(o)if(o==="full")n=n.replace(/\r\n?/g,`
|
|
98
|
+
`);else if(a.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(a.linebreakReplacement.create())){let s=n.split(/\r?\n|\r/);for(let u=0;u<s.length;u++)u&&this.insertNode(a.linebreakReplacement.create(),r,!0),s[u]&&this.insertNode(a.text(s[u]),r,!/\S/.test(s[u]));n=""}else n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let s=i.content[i.content.length-1],u=e.previousSibling;(!s||u&&u.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(n=n.slice(1))}n&&this.insertNode(a.text(n),r,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,r,n){let i=this.localPreserveWS,o=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let a=e.nodeName.toLowerCase(),s;p1.hasOwnProperty(a)&&this.parser.normalizeLists&&r3(e);let u=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,n));e:if(u?u.ignore:t3.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,r);else if(!u||u.skip||u.closeParent){u&&u.closeParent?this.open=Math.max(0,this.open-1):u&&u.skip.nodeType&&(e=u.skip);let f,d=this.needsBlock;if(d1.hasOwnProperty(a))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),f=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,r);break e}let p=u&&u.skip?r:this.readStyles(e,r);p&&this.addAll(e,p),f&&this.sync(o),this.needsBlock=d}else{let f=this.readStyles(e,r);f&&this.addElementByRule(e,u,f,u.consuming===!1?s:void 0)}this.localPreserveWS=i}leafFallback(e,r){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
99
|
+
`),r)}ignoreFallback(e,r){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),r,!0)}readStyles(e,r){let n=e.style;if(n&&n.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],a=n.getPropertyValue(o);if(a)for(let s=void 0;;){let u=this.parser.matchStyle(o,a,this,s);if(!u)break;if(u.ignore)return null;if(u.clearMark?r=r.filter(f=>!u.clearMark(f)):r=r.concat(this.parser.schema.marks[u.mark].create(u.attrs)),u.consuming===!1)s=u;else break}}return r}addElementByRule(e,r,n,i){let o,a;if(r.node)if(a=this.parser.schema.nodes[r.node],a.isLeaf)this.insertNode(a.create(r.attrs),n,e.nodeName=="BR")||this.leafFallback(e,n);else{let u=this.enter(a,r.attrs||null,n,r.preserveWhitespace);u&&(o=!0,n=u)}else{let u=this.parser.schema.marks[r.mark];n=n.concat(u.create(r.attrs))}let s=this.top;if(a&&a.isLeaf)this.findInside(e);else if(i)this.addElement(e,n,i);else if(r.getContent)this.findInside(e),r.getContent(e,this.parser.schema).forEach(u=>this.insertNode(u,n,!1));else{let u=e;typeof r.contentElement=="string"?u=e.querySelector(r.contentElement):typeof r.contentElement=="function"?u=r.contentElement(e):r.contentElement&&(u=r.contentElement),this.findAround(e,u,!0),this.addAll(u,n),this.findAround(e,u,!1)}o&&this.sync(s)&&this.open--}addAll(e,r,n,i){let o=n||0;for(let a=n?e.childNodes[n]:e.firstChild,s=i==null?null:e.childNodes[i];a!=s;a=a.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(a,r);this.findAtPoint(e,o)}findPlace(e,r,n){let i,o;for(let a=this.open,s=0;a>=0;a--){let u=this.nodes[a],f=u.findWrapping(e);if(f&&(!i||i.length>f.length+s)&&(i=f,o=u,!f.length))break;if(u.solid){if(n)break;s+=2}}if(!i)return null;this.sync(o);for(let a=0;a<i.length;a++)r=this.enterInner(i[a],null,r,!1);return r}insertNode(e,r,n){if(e.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(r=this.enterInner(o,null,r))}let i=this.findPlace(e,r,n);if(i){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(e.type));let a=ht.none;for(let s of i.concat(e.marks))(o.type?o.type.allowsMarkType(s.type):g1(s.type,e.type))&&(a=s.addToSet(a));return o.content.push(e.mark(a)),!0}return!1}enter(e,r,n,i){let o=this.findPlace(e.create(r),n,!1);return o&&(o=this.enterInner(e,r,n,!0,i)),o}enterInner(e,r,n,i=!1,o){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(e);let s=h1(e,o,a.options);a.options&Kl&&a.content.length==0&&(s|=Kl);let u=ht.none;return n=n.filter(f=>(a.type?a.type.allowsMarkType(f.type):g1(f.type,e))?(u=f.addToSet(u),!1):!0),this.nodes.push(new Gc(e,r,u,i,null,s)),this.open++,n}closeExtra(e=!1){let r=this.nodes.length-1;if(r>this.open){for(;r>this.open;r--)this.nodes[r-1].content.push(this.nodes[r].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 r=this.open;r>=0;r--){if(this.nodes[r]==e)return this.open=r,!0;this.localPreserveWS&&(this.nodes[r].options|=Gl)}return!1}get currentPos(){this.closeExtra();let e=0;for(let r=this.open;r>=0;r--){let n=this.nodes[r].content;for(let i=n.length-1;i>=0;i--)e+=n[i].nodeSize;r&&e++}return e}findAtPoint(e,r){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==r&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].pos==null&&e.nodeType==1&&e.contains(this.find[r].node)&&(this.find[r].pos=this.currentPos)}findAround(e,r,n){if(e!=r&&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)&&r.compareDocumentPosition(this.find[i].node)&(n?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&(this.find[r].pos=this.currentPos-(e.nodeValue.length-this.find[r].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let r=e.split("/"),n=this.options.context,i=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),o=-(n?n.depth+1:0)+(i?0:1),a=(s,u)=>{for(;s>=0;s--){let f=r[s];if(f==""){if(s==r.length-1||s==0)continue;for(;u>=o;u--)if(a(s-1,u))return!0;return!1}else{let d=u>0||u==0&&i?this.nodes[u].type:n&&u>=o?n.node(u-o).type:null;if(!d||d.name!=f&&!d.isInGroup(f))return!1;u--}}return!0};return a(r.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let r=e.depth;r>=0;r--){let n=e.node(r).contentMatchAt(e.indexAfter(r)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let r in this.parser.schema.nodes){let n=this.parser.schema.nodes[r];if(n.isTextblock&&n.defaultAttrs)return n}}}function r3(t){for(let e=t.firstChild,r=null;e;e=e.nextSibling){let n=e.nodeType==1?e.nodeName.toLowerCase():null;n&&p1.hasOwnProperty(n)&&r?(r.appendChild(e),e=r):n=="li"?r=e:n&&(r=null)}}function n3(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function m1(t){let e={};for(let r in t)e[r]=t[r];return e}function g1(t,e){let r=e.schema.nodes;for(let n in r){let i=r[n];if(!i.allowsMarkType(t))continue;let o=[],a=s=>{o.push(s);for(let u=0;u<s.edgeCount;u++){let{type:f,next:d}=s.edge(u);if(f==e||o.indexOf(d)<0&&a(d))return!0}};if(a(i.contentMatch))return!0}}class Es{constructor(e,r){this.nodes=e,this.marks=r}serializeFragment(e,r={},n){n||(n=kh(r).createDocumentFragment());let i=n,o=[];return e.forEach(a=>{if(o.length||a.marks.length){let s=0,u=0;for(;s<o.length&&u<a.marks.length;){let f=a.marks[u];if(!this.marks[f.type.name]){u++;continue}if(!f.eq(o[s][0])||f.type.spec.spanning===!1)break;s++,u++}for(;s<o.length;)i=o.pop()[1];for(;u<a.marks.length;){let f=a.marks[u++],d=this.serializeMark(f,a.isInline,r);d&&(o.push([f,i]),i.appendChild(d.dom),i=d.contentDOM||d.dom)}}i.appendChild(this.serializeNodeInner(a,r))}),n}serializeNodeInner(e,r){let{dom:n,contentDOM:i}=Kc(kh(r),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,r,i)}return n}serializeNode(e,r={}){let n=this.serializeNodeInner(e,r);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,r);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}serializeMark(e,r,n={}){let i=this.marks[e.type.name];return i&&Kc(kh(n),i(e,r),null,e.attrs)}static renderSpec(e,r,n=null,i){return Kc(e,r,n,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Es(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let r=y1(e.nodes);return r.text||(r.text=n=>n.text),r}static marksFromSchema(e){return y1(e.marks)}}function y1(t){let e={};for(let r in t){let n=t[r].spec.toDOM;n&&(e[r]=n)}return e}function kh(t){return t.document||window.document}const b1=new WeakMap;function i3(t){let e=b1.get(t);return e===void 0&&b1.set(t,e=o3(t)),e}function o3(t){let e=null;function r(n){if(n&&typeof n=="object")if(Array.isArray(n))if(typeof n[0]=="string")e||(e=[]),e.push(n);else for(let i=0;i<n.length;i++)r(n[i]);else for(let i in n)r(n[i])}return r(t),e}function Kc(t,e,r,n){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],o;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(n&&(o=i3(n))&&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 a=i.indexOf(" ");a>0&&(r=i.slice(0,a),i=i.slice(a+1));let s,u=r?t.createElementNS(r,i):t.createElement(i),f=e[1],d=1;if(f&&typeof f=="object"&&f.nodeType==null&&!Array.isArray(f)){d=2;for(let p in f)if(f[p]!=null){let v=p.indexOf(" ");v>0?u.setAttributeNS(p.slice(0,v),p.slice(v+1),f[p]):p=="style"&&u.style?u.style.cssText=f[p]:u.setAttribute(p,f[p])}}for(let p=d;p<e.length;p++){let v=e[p];if(v===0){if(p<e.length-1||p>d)throw new RangeError("Content hole must be the only child of its parent node");return{dom:u,contentDOM:u}}else{let{dom:m,contentDOM:g}=Kc(t,v,r,n);if(u.appendChild(m),g){if(s)throw new RangeError("Multiple content holes");s=g}}}return{dom:u,contentDOM:s}}const w1=65535,E1=Math.pow(2,16);function a3(t,e){return t+e*E1}function x1(t){return t&w1}function s3(t){return(t-(t&w1))/E1}const C1=1,k1=2,Yc=4,T1=8;class Th{constructor(e,r,n){this.pos=e,this.delInfo=r,this.recover=n}get deleted(){return(this.delInfo&T1)>0}get deletedBefore(){return(this.delInfo&(C1|Yc))>0}get deletedAfter(){return(this.delInfo&(k1|Yc))>0}get deletedAcross(){return(this.delInfo&Yc)>0}}class tn{constructor(e,r=!1){if(this.ranges=e,this.inverted=r,!e.length&&tn.empty)return tn.empty}recover(e){let r=0,n=x1(e);if(!this.inverted)for(let i=0;i<n;i++)r+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[n*3]+r+s3(e)}mapResult(e,r=1){return this._map(e,r,!1)}map(e,r=1){return this._map(e,r,!0)}_map(e,r,n){let i=0,o=this.inverted?2:1,a=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let u=this.ranges[s]-(this.inverted?i:0);if(u>e)break;let f=this.ranges[s+o],d=this.ranges[s+a],p=u+f;if(e<=p){let v=f?e==u?-1:e==p?1:r:r,m=u+i+(v<0?0:d);if(n)return m;let g=e==(r<0?u:p)?null:a3(s/3,e-u),E=e==u?k1:e==p?C1:Yc;return(r<0?e!=u:e!=p)&&(E|=T1),new Th(m,E,g)}i+=d-f}return n?e+i:new Th(e+i,0,null)}touches(e,r){let n=0,i=x1(r),o=this.inverted?2:1,a=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let u=this.ranges[s]-(this.inverted?n:0);if(u>e)break;let f=this.ranges[s+o],d=u+f;if(e<=d&&s==i*3)return!0;n+=this.ranges[s+a]-f}return!1}forEach(e){let r=this.inverted?2:1,n=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let a=this.ranges[i],s=a-(this.inverted?o:0),u=a+(this.inverted?0:o),f=this.ranges[i+r],d=this.ranges[i+n];e(s,s+f,u,u+d),o+=d-f}}invert(){return new tn(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?tn.empty:new tn(e<0?[0,-e,0]:[0,0,e])}}tn.empty=new tn([]);class Yl{constructor(e,r,n=0,i=e?e.length:0){this.mirror=r,this.from=n,this.to=i,this._maps=e||[],this.ownData=!(e||r)}get maps(){return this._maps}slice(e=0,r=this.maps.length){return new Yl(this._maps,this.mirror,e,r)}appendMap(e,r){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),r!=null&&this.setMirror(this._maps.length-1,r)}appendMapping(e){for(let r=0,n=this._maps.length;r<e._maps.length;r++){let i=e.getMirror(r);this.appendMap(e._maps[r],i!=null&&i<r?n+i:void 0)}}getMirror(e){if(this.mirror){for(let r=0;r<this.mirror.length;r++)if(this.mirror[r]==e)return this.mirror[r+(r%2?-1:1)]}}setMirror(e,r){this.mirror||(this.mirror=[]),this.mirror.push(e,r)}appendMappingInverted(e){for(let r=e.maps.length-1,n=this._maps.length+e._maps.length;r>=0;r--){let i=e.getMirror(r);this.appendMap(e._maps[r].invert(),i!=null&&i>r?n-i-1:void 0)}}invert(){let e=new Yl;return e.appendMappingInverted(this),e}map(e,r=1){if(this.mirror)return this._map(e,r,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,r);return e}mapResult(e,r=1){return this._map(e,r,!1)}_map(e,r,n){let i=0;for(let o=this.from;o<this.to;o++){let a=this._maps[o],s=a.mapResult(e,r);if(s.recover!=null){let u=this.getMirror(o);if(u!=null&&u>o&&u<this.to){o=u,e=this._maps[u].recover(s.recover);continue}}i|=s.delInfo,e=s.pos}return n?e:new Th(e,i,null)}}const Sh=Object.create(null);class _r{getMap(){return tn.empty}merge(e){return null}static fromJSON(e,r){if(!r||!r.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=Sh[r.stepType];if(!n)throw new RangeError(`No step type ${r.stepType} defined`);return n.fromJSON(e,r)}static jsonID(e,r){if(e in Sh)throw new RangeError("Duplicate use of step JSON ID "+e);return Sh[e]=r,r.prototype.jsonID=e,r}}class qt{constructor(e,r){this.doc=e,this.failed=r}static ok(e){return new qt(e,null)}static fail(e){return new qt(null,e)}static fromReplace(e,r,n,i){try{return qt.ok(e.replace(r,n,i))}catch(o){if(o instanceof Uc)return qt.fail(o.message);throw o}}}function _h(t,e,r){let n=[];for(let i=0;i<t.childCount;i++){let o=t.child(i);o.content.size&&(o=o.copy(_h(o.content,e,o))),o.isInline&&(o=e(o,r,i)),n.push(o)}return oe.fromArray(n)}class So extends _r{constructor(e,r,n){super(),this.from=e,this.to=r,this.mark=n}apply(e){let r=e.slice(this.from,this.to),n=e.resolve(this.from),i=n.node(n.sharedDepth(this.to)),o=new ge(_h(r.content,(a,s)=>!a.isAtom||!s.type.allowsMarkType(this.mark.type)?a:a.mark(this.mark.addToSet(a.marks)),i),r.openStart,r.openEnd);return qt.fromReplace(e,this.from,this.to,o)}invert(){return new bi(this.from,this.to,this.mark)}map(e){let r=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new So(r.pos,n.pos,this.mark)}merge(e){return e instanceof So&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new So(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,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new So(r.from,r.to,e.markFromJSON(r.mark))}}_r.jsonID("addMark",So);class bi extends _r{constructor(e,r,n){super(),this.from=e,this.to=r,this.mark=n}apply(e){let r=e.slice(this.from,this.to),n=new ge(_h(r.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),r.openStart,r.openEnd);return qt.fromReplace(e,this.from,this.to,n)}invert(){return new So(this.from,this.to,this.mark)}map(e){let r=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new bi(r.pos,n.pos,this.mark)}merge(e){return e instanceof bi&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new bi(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,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new bi(r.from,r.to,e.markFromJSON(r.mark))}}_r.jsonID("removeMark",bi);class _o extends _r{constructor(e,r){super(),this.pos=e,this.mark=r}apply(e){let r=e.nodeAt(this.pos);if(!r)return qt.fail("No node at mark step's position");let n=r.type.create(r.attrs,null,this.mark.addToSet(r.marks));return qt.fromReplace(e,this.pos,this.pos+1,new ge(oe.from(n),0,r.isLeaf?0:1))}invert(e){let r=e.nodeAt(this.pos);if(r){let n=this.mark.addToSet(r.marks);if(n.length==r.marks.length){for(let i=0;i<r.marks.length;i++)if(!r.marks[i].isInSet(n))return new _o(this.pos,r.marks[i]);return new _o(this.pos,this.mark)}}return new wa(this.pos,this.mark)}map(e){let r=e.mapResult(this.pos,1);return r.deletedAfter?null:new _o(r.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,r){if(typeof r.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new _o(r.pos,e.markFromJSON(r.mark))}}_r.jsonID("addNodeMark",_o);class wa extends _r{constructor(e,r){super(),this.pos=e,this.mark=r}apply(e){let r=e.nodeAt(this.pos);if(!r)return qt.fail("No node at mark step's position");let n=r.type.create(r.attrs,null,this.mark.removeFromSet(r.marks));return qt.fromReplace(e,this.pos,this.pos+1,new ge(oe.from(n),0,r.isLeaf?0:1))}invert(e){let r=e.nodeAt(this.pos);return!r||!this.mark.isInSet(r.marks)?this:new _o(this.pos,this.mark)}map(e){let r=e.mapResult(this.pos,1);return r.deletedAfter?null:new wa(r.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,r){if(typeof r.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new wa(r.pos,e.markFromJSON(r.mark))}}_r.jsonID("removeNodeMark",wa);class Or extends _r{constructor(e,r,n,i=!1){super(),this.from=e,this.to=r,this.slice=n,this.structure=i}apply(e){return this.structure&&Oh(e,this.from,this.to)?qt.fail("Structure replace would overwrite content"):qt.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new tn([this.from,this.to-this.from,this.slice.size])}invert(e){return new Or(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let r=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return r.deletedAcross&&n.deletedAcross?null:new Or(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Or)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let r=this.slice.size+e.slice.size==0?ge.empty:new ge(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Or(this.from,this.to+(e.to-e.from),r,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let r=this.slice.size+e.slice.size==0?ge.empty:new ge(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Or(e.from,this.to,r,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,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Or(r.from,r.to,ge.fromJSON(e,r.slice),!!r.structure)}}_r.jsonID("replace",Or);class er extends _r{constructor(e,r,n,i,o,a,s=!1){super(),this.from=e,this.to=r,this.gapFrom=n,this.gapTo=i,this.slice=o,this.insert=a,this.structure=s}apply(e){if(this.structure&&(Oh(e,this.from,this.gapFrom)||Oh(e,this.gapTo,this.to)))return qt.fail("Structure gap-replace would overwrite content");let r=e.slice(this.gapFrom,this.gapTo);if(r.openStart||r.openEnd)return qt.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,r.content);return n?qt.fromReplace(e,this.from,this.to,n):qt.fail("Content does not fit in gap")}getMap(){return new tn([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let r=this.gapTo-this.gapFrom;return new er(this.from,this.from+this.slice.size+r,this.from+this.insert,this.from+this.insert+r,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let r=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),i=this.from==this.gapFrom?r.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return r.deletedAcross&&n.deletedAcross||i<r.pos||o>n.pos?null:new er(r.pos,n.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,r){if(typeof r.from!="number"||typeof r.to!="number"||typeof r.gapFrom!="number"||typeof r.gapTo!="number"||typeof r.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new er(r.from,r.to,r.gapFrom,r.gapTo,ge.fromJSON(e,r.slice),r.insert,!!r.structure)}}_r.jsonID("replaceAround",er);function Oh(t,e,r){let n=t.resolve(e),i=r-e,o=n.depth;for(;i>0&&o>0&&n.indexAfter(o)==n.node(o).childCount;)o--,i--;if(i>0){let a=n.node(o).maybeChild(n.indexAfter(o));for(;i>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,i--}}return!1}function l3(t,e,r,n){let i=[],o=[],a,s;t.doc.nodesBetween(e,r,(u,f,d)=>{if(!u.isInline)return;let p=u.marks;if(!n.isInSet(p)&&d.type.allowsMarkType(n.type)){let v=Math.max(f,e),m=Math.min(f+u.nodeSize,r),g=n.addToSet(p);for(let E=0;E<p.length;E++)p[E].isInSet(g)||(a&&a.to==v&&a.mark.eq(p[E])?a.to=m:i.push(a=new bi(v,m,p[E])));s&&s.to==v?s.to=m:o.push(s=new So(v,m,n))}}),i.forEach(u=>t.step(u)),o.forEach(u=>t.step(u))}function u3(t,e,r,n){let i=[],o=0;t.doc.nodesBetween(e,r,(a,s)=>{if(!a.isInline)return;o++;let u=null;if(n instanceof Wc){let f=a.marks,d;for(;d=n.isInSet(f);)(u||(u=[])).push(d),f=d.removeFromSet(f)}else n?n.isInSet(a.marks)&&(u=[n]):u=a.marks;if(u&&u.length){let f=Math.min(s+a.nodeSize,r);for(let d=0;d<u.length;d++){let p=u[d],v;for(let m=0;m<i.length;m++){let g=i[m];g.step==o-1&&p.eq(i[m].style)&&(v=g)}v?(v.to=f,v.step=o):i.push({style:p,from:Math.max(s,e),to:f,step:o})}}}),i.forEach(a=>t.step(new bi(a.from,a.to,a.style)))}function Ah(t,e,r,n=r.contentMatch,i=!0){let o=t.doc.nodeAt(e),a=[],s=e+1;for(let u=0;u<o.childCount;u++){let f=o.child(u),d=s+f.nodeSize,p=n.matchType(f.type);if(!p)a.push(new Or(s,d,ge.empty));else{n=p;for(let v=0;v<f.marks.length;v++)r.allowsMarkType(f.marks[v].type)||t.step(new bi(s,d,f.marks[v]));if(i&&f.isText&&r.whitespace!="pre"){let v,m=/\r?\n|\r/g,g;for(;v=m.exec(f.text);)g||(g=new ge(oe.from(r.schema.text(" ",r.allowedMarks(f.marks))),0,0)),a.push(new Or(s+v.index,s+v.index+v[0].length,g))}}s=d}if(!n.validEnd){let u=n.fillBefore(oe.empty,!0);t.replace(s,s,new ge(u,0,0))}for(let u=a.length-1;u>=0;u--)t.step(a[u])}function c3(t,e,r){return(e==0||t.canReplace(e,t.childCount))&&(r==t.childCount||t.canReplace(0,r))}function Xc(t){let r=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth,i=0,o=0;;--n){let a=t.$from.node(n),s=t.$from.index(n)+i,u=t.$to.indexAfter(n)-o;if(n<t.depth&&a.canReplace(s,u,r))return n;if(n==0||a.type.spec.isolating||!c3(a,s,u))break;s&&(i=1),u<a.childCount&&(o=1)}return null}function f3(t,e,r){let{$from:n,$to:i,depth:o}=e,a=n.before(o+1),s=i.after(o+1),u=a,f=s,d=oe.empty,p=0;for(let g=o,E=!1;g>r;g--)E||n.index(g)>0?(E=!0,d=oe.from(n.node(g).copy(d)),p++):u--;let v=oe.empty,m=0;for(let g=o,E=!1;g>r;g--)E||i.after(g+1)<i.end(g)?(E=!0,v=oe.from(i.node(g).copy(v)),m++):f++;t.step(new er(u,f,a,s,new ge(d.append(v),p,m),d.size-p,!0))}function d3(t,e,r=null,n=t){let i=p3(t,e),o=i&&h3(n,e);return o?i.map(S1).concat({type:e,attrs:r}).concat(o.map(S1)):null}function S1(t){return{type:t,attrs:null}}function p3(t,e){let{parent:r,startIndex:n,endIndex:i}=t,o=r.contentMatchAt(n).findWrapping(e);if(!o)return null;let a=o.length?o[0]:e;return r.canReplaceWith(n,i,a)?o:null}function h3(t,e){let{parent:r,startIndex:n,endIndex:i}=t,o=r.child(n),a=e.contentMatch.findWrapping(o.type);if(!a)return null;let u=(a.length?a[a.length-1]:e).contentMatch;for(let f=n;u&&f<i;f++)u=u.matchType(r.child(f).type);return!u||!u.validEnd?null:a}function v3(t,e,r){let n=oe.empty;for(let a=r.length-1;a>=0;a--){if(n.size){let s=r[a].type.contentMatch.matchFragment(n);if(!s||!s.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=oe.from(r[a].type.create(r[a].attrs,n))}let i=e.start,o=e.end;t.step(new er(i,o,i,o,new ge(n,0,0),r.length,!0))}function m3(t,e,r,n,i){if(!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=t.steps.length;t.doc.nodesBetween(e,r,(a,s)=>{let u=typeof i=="function"?i(a):i;if(a.isTextblock&&!a.hasMarkup(n,u)&&g3(t.doc,t.mapping.slice(o).map(s),n)){let f=null;if(n.schema.linebreakReplacement){let m=n.whitespace=="pre",g=!!n.contentMatch.matchType(n.schema.linebreakReplacement);m&&!g?f=!1:!m&&g&&(f=!0)}f===!1&&O1(t,a,s,o),Ah(t,t.mapping.slice(o).map(s,1),n,void 0,f===null);let d=t.mapping.slice(o),p=d.map(s,1),v=d.map(s+a.nodeSize,1);return t.step(new er(p,v,p+1,v-1,new ge(oe.from(n.create(u,null,a.marks)),0,0),1,!0)),f===!0&&_1(t,a,s,o),!1}})}function _1(t,e,r,n){e.forEach((i,o)=>{if(i.isText){let a,s=/\r?\n|\r/g;for(;a=s.exec(i.text);){let u=t.mapping.slice(n).map(r+1+o+a.index);t.replaceWith(u,u+1,e.type.schema.linebreakReplacement.create())}}})}function O1(t,e,r,n){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let a=t.mapping.slice(n).map(r+1+o);t.replaceWith(a,a+1,e.type.schema.text(`
|
|
100
|
+
`))}})}function g3(t,e,r){let n=t.resolve(e),i=n.index();return n.parent.canReplaceWith(i,i+1,r)}function y3(t,e,r,n,i){let o=t.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");r||(r=o.type);let a=r.create(n,null,i||o.marks);if(o.isLeaf)return t.replaceWith(e,e+o.nodeSize,a);if(!r.validContent(o.content))throw new RangeError("Invalid content for node type "+r.name);t.step(new er(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new ge(oe.from(a),0,0),1,!0))}function xs(t,e,r=1,n){let i=t.resolve(e),o=i.depth-r,a=n&&n[n.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!a.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let f=i.depth-1,d=r-2;f>o;f--,d--){let p=i.node(f),v=i.index(f);if(p.type.spec.isolating)return!1;let m=p.content.cutByIndex(v,p.childCount),g=n&&n[d+1];g&&(m=m.replaceChild(0,g.type.create(g.attrs)));let E=n&&n[d]||p;if(!p.canReplace(v+1,p.childCount)||!E.type.validContent(m))return!1}let s=i.indexAfter(o),u=n&&n[0];return i.node(o).canReplaceWith(s,s,u?u.type:i.node(o+1).type)}function b3(t,e,r=1,n){let i=t.doc.resolve(e),o=oe.empty,a=oe.empty;for(let s=i.depth,u=i.depth-r,f=r-1;s>u;s--,f--){o=oe.from(i.node(s).copy(o));let d=n&&n[f];a=oe.from(d?d.type.create(d.attrs,a):i.node(s).copy(a))}t.step(new Or(e,e,new ge(o.append(a),r,r),!0))}function A1(t,e){let r=t.resolve(e),n=r.index();return E3(r.nodeBefore,r.nodeAfter)&&r.parent.canReplace(n,n+1)}function w3(t,e){e.content.size||t.type.compatibleContent(e.type);let r=t.contentMatchAt(t.childCount),{linebreakReplacement:n}=t.type.schema;for(let i=0;i<e.childCount;i++){let o=e.child(i),a=o.type==n?t.type.schema.nodes.text:o.type;if(r=r.matchType(a),!r||!t.type.allowsMarks(o.marks))return!1}return r.validEnd}function E3(t,e){return!!(t&&e&&!t.isLeaf&&w3(t,e))}function x3(t,e,r){let n=null,{linebreakReplacement:i}=t.doc.type.schema,o=t.doc.resolve(e-r),a=o.node().type;if(i&&a.inlineContent){let d=a.whitespace=="pre",p=!!a.contentMatch.matchType(i);d&&!p?n=!1:!d&&p&&(n=!0)}let s=t.steps.length;if(n===!1){let d=t.doc.resolve(e+r);O1(t,d.node(),d.before(),s)}a.inlineContent&&Ah(t,e+r-1,a,o.node().contentMatchAt(o.index()),n==null);let u=t.mapping.slice(s),f=u.map(e-r);if(t.step(new Or(f,u.map(e+r,-1),ge.empty,!0)),n===!0){let d=t.doc.resolve(f);_1(t,d.node(),d.before(),t.steps.length)}return t}function C3(t,e,r){let n=t.resolve(e);if(n.parent.canReplaceWith(n.index(),n.index(),r))return e;if(n.parentOffset==0)for(let i=n.depth-1;i>=0;i--){let o=n.index(i);if(n.node(i).canReplaceWith(o,o,r))return n.before(i+1);if(o>0)return null}if(n.parentOffset==n.parent.content.size)for(let i=n.depth-1;i>=0;i--){let o=n.indexAfter(i);if(n.node(i).canReplaceWith(o,o,r))return n.after(i+1);if(o<n.node(i).childCount)return null}return null}function k3(t,e,r){let n=t.resolve(e);if(!r.content.size)return e;let i=r.content;for(let o=0;o<r.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(r.openStart==0&&r.size?2:1);o++)for(let a=n.depth;a>=0;a--){let s=a==n.depth?0:n.pos<=(n.start(a+1)+n.end(a+1))/2?-1:1,u=n.index(a)+(s>0?1:0),f=n.node(a),d=!1;if(o==1)d=f.canReplace(u,u,i);else{let p=f.contentMatchAt(u).findWrapping(i.firstChild.type);d=p&&f.canReplaceWith(u,u,p[0])}if(d)return s==0?n.pos:s<0?n.before(a+1):n.after(a+1)}return null}function Mh(t,e,r=e,n=ge.empty){if(e==r&&!n.size)return null;let i=t.resolve(e),o=t.resolve(r);return M1(i,o,n)?new Or(e,r,n):new T3(i,o,n).fit()}function M1(t,e,r){return!r.openStart&&!r.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),r.content)}class T3{constructor(e,r,n){this.$from=e,this.$to=r,this.unplaced=n,this.frontier=[],this.placed=oe.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=oe.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let f=this.findFittable();f?this.placeNodes(f):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),r=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(e<0?this.$to:n.doc.resolve(e));if(!i)return null;let o=this.placed,a=n.depth,s=i.depth;for(;a&&s&&o.childCount==1;)o=o.firstChild.content,a--,s--;let u=new ge(o,a,s);return e>-1?new er(n.pos,e,this.$to.pos,this.$to.end(),u,r):u.size||n.pos!=this.$to.pos?new Or(n.pos,i.pos,u):null}findFittable(){let e=this.unplaced.openStart;for(let r=this.unplaced.content,n=0,i=this.unplaced.openEnd;n<e;n++){let o=r.firstChild;if(r.childCount>1&&(i=0),o.type.spec.isolating&&i<=n){e=n;break}r=o.content}for(let r=1;r<=2;r++)for(let n=r==1?e:this.unplaced.openStart;n>=0;n--){let i,o=null;n?(o=Nh(this.unplaced.content,n-1).firstChild,i=o.content):i=this.unplaced.content;let a=i.firstChild;for(let s=this.depth;s>=0;s--){let{type:u,match:f}=this.frontier[s],d,p=null;if(r==1&&(a?f.matchType(a.type)||(p=f.fillBefore(oe.from(a),!1)):o&&u.compatibleContent(o.type)))return{sliceDepth:n,frontierDepth:s,parent:o,inject:p};if(r==2&&a&&(d=f.findWrapping(a.type)))return{sliceDepth:n,frontierDepth:s,parent:o,wrap:d};if(o&&f.matchType(o.type))break}}}openMore(){let{content:e,openStart:r,openEnd:n}=this.unplaced,i=Nh(e,r);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new ge(e,r+1,Math.max(n,i.size+r>=e.size-n?r+1:0)),!0)}dropNode(){let{content:e,openStart:r,openEnd:n}=this.unplaced,i=Nh(e,r);if(i.childCount<=1&&r>0){let o=e.size-r<=r+i.size;this.unplaced=new ge(Xl(e,r-1,1),r-1,o?r-1:n)}else this.unplaced=new ge(Xl(e,r,1),r,n)}placeNodes({sliceDepth:e,frontierDepth:r,parent:n,inject:i,wrap:o}){for(;this.depth>r;)this.closeFrontierNode();if(o)for(let E=0;E<o.length;E++)this.openFrontierNode(o[E]);let a=this.unplaced,s=n?n.content:a.content,u=a.openStart-e,f=0,d=[],{match:p,type:v}=this.frontier[r];if(i){for(let E=0;E<i.childCount;E++)d.push(i.child(E));p=p.matchFragment(i)}let m=s.size+e-(a.content.size-a.openEnd);for(;f<s.childCount;){let E=s.child(f),w=p.matchType(E.type);if(!w)break;f++,(f>1||u==0||E.content.size)&&(p=w,d.push(N1(E.mark(v.allowedMarks(E.marks)),f==1?u:0,f==s.childCount?m:-1)))}let g=f==s.childCount;g||(m=-1),this.placed=Jl(this.placed,r,oe.from(d)),this.frontier[r].match=p,g&&m<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let E=0,w=s;E<m;E++){let x=w.lastChild;this.frontier.push({type:x.type,match:x.contentMatchAt(x.childCount)}),w=x.content}this.unplaced=g?e==0?ge.empty:new ge(Xl(a.content,e-1,1),e-1,m<0?a.openEnd:e-1):new ge(Xl(a.content,e,f),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],r;if(!e.type.isTextblock||!Lh(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(r=this.findCloseLevel(this.$to))&&r.depth==this.depth)return-1;let{depth:n}=this.$to,i=this.$to.after(n);for(;n>1&&i==this.$to.end(--n);)++i;return i}findCloseLevel(e){e:for(let r=Math.min(this.depth,e.depth);r>=0;r--){let{match:n,type:i}=this.frontier[r],o=r<e.depth&&e.end(r+1)==e.pos+(e.depth-(r+1)),a=Lh(e,r,i,n,o);if(a){for(let s=r-1;s>=0;s--){let{match:u,type:f}=this.frontier[s],d=Lh(e,s,f,u,!0);if(!d||d.childCount)continue e}return{depth:r,fit:a,move:o?e.doc.resolve(e.after(r+1)):e}}}}close(e){let r=this.findCloseLevel(e);if(!r)return null;for(;this.depth>r.depth;)this.closeFrontierNode();r.fit.childCount&&(this.placed=Jl(this.placed,r.depth,r.fit)),e=r.move;for(let n=r.depth+1;n<=e.depth;n++){let i=e.node(n),o=i.type.contentMatch.fillBefore(i.content,!0,e.index(n));this.openFrontierNode(i.type,i.attrs,o)}return e}openFrontierNode(e,r=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=Jl(this.placed,this.depth,oe.from(e.create(r,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let r=this.frontier.pop().match.fillBefore(oe.empty,!0);r.childCount&&(this.placed=Jl(this.placed,this.frontier.length,r))}}function Xl(t,e,r){return e==0?t.cutByIndex(r,t.childCount):t.replaceChild(0,t.firstChild.copy(Xl(t.firstChild.content,e-1,r)))}function Jl(t,e,r){return e==0?t.append(r):t.replaceChild(t.childCount-1,t.lastChild.copy(Jl(t.lastChild.content,e-1,r)))}function Nh(t,e){for(let r=0;r<e;r++)t=t.firstChild.content;return t}function N1(t,e,r){if(e<=0)return t;let n=t.content;return e>1&&(n=n.replaceChild(0,N1(n.firstChild,e-1,n.childCount==1?r-1:0))),e>0&&(n=t.type.contentMatch.fillBefore(n).append(n),r<=0&&(n=n.append(t.type.contentMatch.matchFragment(n).fillBefore(oe.empty,!0)))),t.copy(n)}function Lh(t,e,r,n,i){let o=t.node(e),a=i?t.indexAfter(e):t.index(e);if(a==o.childCount&&!r.compatibleContent(o.type))return null;let s=n.fillBefore(o.content,!0,a);return s&&!S3(r,o.content,a)?s:null}function S3(t,e,r){for(let n=r;n<e.childCount;n++)if(!t.allowsMarks(e.child(n).marks))return!0;return!1}function _3(t){return t.spec.defining||t.spec.definingForContent}function O3(t,e,r,n){if(!n.size)return t.deleteRange(e,r);let i=t.doc.resolve(e),o=t.doc.resolve(r);if(M1(i,o,n))return t.step(new Or(e,r,n));let a=D1(i,o);a[a.length-1]==0&&a.pop();let s=-(i.depth+1);a.unshift(s);for(let v=i.depth,m=i.pos-1;v>0;v--,m--){let g=i.node(v).type.spec;if(g.defining||g.definingAsContext||g.isolating)break;a.indexOf(v)>-1?s=v:i.before(v)==m&&a.splice(1,0,-v)}let u=a.indexOf(s),f=[],d=n.openStart;for(let v=n.content,m=0;;m++){let g=v.firstChild;if(f.push(g),m==n.openStart)break;v=g.content}for(let v=d-1;v>=0;v--){let m=f[v],g=_3(m.type);if(g&&!m.sameMarkup(i.node(Math.abs(s)-1)))d=v;else if(g||!m.type.isTextblock)break}for(let v=n.openStart;v>=0;v--){let m=(v+d+1)%(n.openStart+1),g=f[m];if(g)for(let E=0;E<a.length;E++){let w=a[(E+u)%a.length],x=!0;w<0&&(x=!1,w=-w);let k=i.node(w-1),_=i.index(w-1);if(k.canReplaceWith(_,_,g.type,g.marks))return t.replace(i.before(w),x?o.after(w):r,new ge(L1(n.content,0,n.openStart,m),m,n.openEnd))}}let p=t.steps.length;for(let v=a.length-1;v>=0&&(t.replace(e,r,n),!(t.steps.length>p));v--){let m=a[v];m<0||(e=i.before(m),r=o.after(m))}}function L1(t,e,r,n,i){if(e<r){let o=t.firstChild;t=t.replaceChild(0,o.copy(L1(o.content,e+1,r,n,o)))}if(e>n){let o=i.contentMatchAt(0),a=o.fillBefore(t).append(t);t=a.append(o.matchFragment(a).fillBefore(oe.empty,!0))}return t}function A3(t,e,r,n){if(!n.isInline&&e==r&&t.doc.resolve(e).parent.content.size){let i=C3(t.doc,e,n.type);i!=null&&(e=r=i)}t.replaceRange(e,r,new ge(oe.from(n),0,0))}function M3(t,e,r){let n=t.doc.resolve(e),i=t.doc.resolve(r),o=D1(n,i);for(let a=0;a<o.length;a++){let s=o[a],u=a==o.length-1;if(u&&s==0||n.node(s).type.contentMatch.validEnd)return t.delete(n.start(s),i.end(s));if(s>0&&(u||n.node(s-1).canReplace(n.index(s-1),i.indexAfter(s-1))))return t.delete(n.before(s),i.after(s))}for(let a=1;a<=n.depth&&a<=i.depth;a++)if(e-n.start(a)==n.depth-a&&r>n.end(a)&&i.end(a)-r!=i.depth-a&&n.start(a-1)==i.start(a-1)&&n.node(a-1).canReplace(n.index(a-1),i.index(a-1)))return t.delete(n.before(a),r);t.delete(e,r)}function D1(t,e){let r=[],n=Math.min(t.depth,e.depth);for(let i=n;i>=0;i--){let o=t.start(i);if(o<t.pos-(t.depth-i)||e.end(i)>e.pos+(e.depth-i)||t.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(o==e.start(i)||i==t.depth&&i==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==o-1)&&r.push(i)}return r}class Cs extends _r{constructor(e,r,n){super(),this.pos=e,this.attr=r,this.value=n}apply(e){let r=e.nodeAt(this.pos);if(!r)return qt.fail("No node at attribute step's position");let n=Object.create(null);for(let o in r.attrs)n[o]=r.attrs[o];n[this.attr]=this.value;let i=r.type.create(n,null,r.marks);return qt.fromReplace(e,this.pos,this.pos+1,new ge(oe.from(i),0,r.isLeaf?0:1))}getMap(){return tn.empty}invert(e){return new Cs(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let r=e.mapResult(this.pos,1);return r.deletedAfter?null:new Cs(r.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,r){if(typeof r.pos!="number"||typeof r.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Cs(r.pos,r.attr,r.value)}}_r.jsonID("attr",Cs);class Zl extends _r{constructor(e,r){super(),this.attr=e,this.value=r}apply(e){let r=Object.create(null);for(let i in e.attrs)r[i]=e.attrs[i];r[this.attr]=this.value;let n=e.type.create(r,e.content,e.marks);return qt.ok(n)}getMap(){return tn.empty}invert(e){return new Zl(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,r){if(typeof r.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Zl(r.attr,r.value)}}_r.jsonID("docAttr",Zl);let ks=class extends Error{};ks=function t(e){let r=Error.call(this,e);return r.__proto__=t.prototype,r},ks.prototype=Object.create(Error.prototype),ks.prototype.constructor=ks,ks.prototype.name="TransformError";class N3{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Yl}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let r=this.maybeStep(e);if(r.failed)throw new ks(r.failed);return this}maybeStep(e){let r=e.apply(this.doc);return r.failed||this.addStep(e,r.doc),r}get docChanged(){return this.steps.length>0}addStep(e,r){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=r}replace(e,r=e,n=ge.empty){let i=Mh(this.doc,e,r,n);return i&&this.step(i),this}replaceWith(e,r,n){return this.replace(e,r,new ge(oe.from(n),0,0))}delete(e,r){return this.replace(e,r,ge.empty)}insert(e,r){return this.replaceWith(e,e,r)}replaceRange(e,r,n){return O3(this,e,r,n),this}replaceRangeWith(e,r,n){return A3(this,e,r,n),this}deleteRange(e,r){return M3(this,e,r),this}lift(e,r){return f3(this,e,r),this}join(e,r=1){return x3(this,e,r),this}wrap(e,r){return v3(this,e,r),this}setBlockType(e,r=e,n,i=null){return m3(this,e,r,n,i),this}setNodeMarkup(e,r,n=null,i){return y3(this,e,r,n,i),this}setNodeAttribute(e,r,n){return this.step(new Cs(e,r,n)),this}setDocAttribute(e,r){return this.step(new Zl(e,r)),this}addNodeMark(e,r){return this.step(new _o(e,r)),this}removeNodeMark(e,r){let n=this.doc.nodeAt(e);if(!n)throw new RangeError("No node at position "+e);if(r instanceof ht)r.isInSet(n.marks)&&this.step(new wa(e,r));else{let i=n.marks,o,a=[];for(;o=r.isInSet(i);)a.push(new wa(e,o)),i=o.removeFromSet(i);for(let s=a.length-1;s>=0;s--)this.step(a[s])}return this}split(e,r=1,n){return b3(this,e,r,n),this}addMark(e,r,n){return l3(this,e,r,n),this}removeMark(e,r,n){return u3(this,e,r,n),this}clearIncompatible(e,r,n){return Ah(this,e,r,n),this}}const Dh=Object.create(null);class rt{constructor(e,r,n){this.$anchor=e,this.$head=r,this.ranges=n||[new I1(e.min(r),e.max(r))]}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 r=0;r<e.length;r++)if(e[r].$from.pos!=e[r].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,r=ge.empty){let n=r.content.lastChild,i=null;for(let s=0;s<r.openEnd;s++)i=n,n=n.lastChild;let o=e.steps.length,a=this.ranges;for(let s=0;s<a.length;s++){let{$from:u,$to:f}=a[s],d=e.mapping.slice(o);e.replaceRange(d.map(u.pos),d.map(f.pos),s?ge.empty:r),s==0&&B1(e,o,(n?n.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,r){let n=e.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:a,$to:s}=i[o],u=e.mapping.slice(n),f=u.map(a.pos),d=u.map(s.pos);o?e.deleteRange(f,d):(e.replaceRangeWith(f,d,r),B1(e,n,r.isInline?-1:1))}}static findFrom(e,r,n=!1){let i=e.parent.inlineContent?new it(e):Ts(e.node(0),e.parent,e.pos,e.index(),r,n);if(i)return i;for(let o=e.depth-1;o>=0;o--){let a=r<0?Ts(e.node(0),e.node(o),e.before(o+1),e.index(o),r,n):Ts(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,r,n);if(a)return a}return null}static near(e,r=1){return this.findFrom(e,r)||this.findFrom(e,-r)||new Hr(e.node(0))}static atStart(e){return Ts(e,e,0,0,1)||new Hr(e)}static atEnd(e){return Ts(e,e,e.content.size,e.childCount,-1)||new Hr(e)}static fromJSON(e,r){if(!r||!r.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=Dh[r.type];if(!n)throw new RangeError(`No selection type ${r.type} defined`);return n.fromJSON(e,r)}static jsonID(e,r){if(e in Dh)throw new RangeError("Duplicate use of selection JSON ID "+e);return Dh[e]=r,r.prototype.jsonID=e,r}getBookmark(){return it.between(this.$anchor,this.$head).getBookmark()}}rt.prototype.visible=!0;class I1{constructor(e,r){this.$from=e,this.$to=r}}let R1=!1;function P1(t){!R1&&!t.parent.inlineContent&&(R1=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class it extends rt{constructor(e,r=e){P1(e),P1(r),super(e,r)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,r){let n=e.resolve(r.map(this.head));if(!n.parent.inlineContent)return rt.near(n);let i=e.resolve(r.map(this.anchor));return new it(i.parent.inlineContent?i:n,n)}replace(e,r=ge.empty){if(super.replace(e,r),r==ge.empty){let n=this.$from.marksAcross(this.$to);n&&e.ensureMarks(n)}}eq(e){return e instanceof it&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Jc(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,r){if(typeof r.anchor!="number"||typeof r.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new it(e.resolve(r.anchor),e.resolve(r.head))}static create(e,r,n=r){let i=e.resolve(r);return new this(i,n==r?i:e.resolve(n))}static between(e,r,n){let i=e.pos-r.pos;if((!n||i)&&(n=i>=0?1:-1),!r.parent.inlineContent){let o=rt.findFrom(r,n,!0)||rt.findFrom(r,-n,!0);if(o)r=o.$head;else return rt.near(r,n)}return e.parent.inlineContent||(i==0?e=r:(e=(rt.findFrom(e,-n,!0)||rt.findFrom(e,n,!0)).$anchor,e.pos<r.pos!=i<0&&(e=r))),new it(e,r)}}rt.jsonID("text",it);class Jc{constructor(e,r){this.anchor=e,this.head=r}map(e){return new Jc(e.map(this.anchor),e.map(this.head))}resolve(e){return it.between(e.resolve(this.anchor),e.resolve(this.head))}}class He extends rt{constructor(e){let r=e.nodeAfter,n=e.node(0).resolve(e.pos+r.nodeSize);super(e,n),this.node=r}map(e,r){let{deleted:n,pos:i}=r.mapResult(this.anchor),o=e.resolve(i);return n?rt.near(o):new He(o)}content(){return new ge(oe.from(this.node),0,0)}eq(e){return e instanceof He&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Ih(this.anchor)}static fromJSON(e,r){if(typeof r.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new He(e.resolve(r.anchor))}static create(e,r){return new He(e.resolve(r))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}He.prototype.visible=!1,rt.jsonID("node",He);class Ih{constructor(e){this.anchor=e}map(e){let{deleted:r,pos:n}=e.mapResult(this.anchor);return r?new Jc(n,n):new Ih(n)}resolve(e){let r=e.resolve(this.anchor),n=r.nodeAfter;return n&&He.isSelectable(n)?new He(r):rt.near(r)}}class Hr extends rt{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,r=ge.empty){if(r==ge.empty){e.delete(0,e.doc.content.size);let n=rt.atStart(e.doc);n.eq(e.selection)||e.setSelection(n)}else super.replace(e,r)}toJSON(){return{type:"all"}}static fromJSON(e){return new Hr(e)}map(e){return new Hr(e)}eq(e){return e instanceof Hr}getBookmark(){return L3}}rt.jsonID("all",Hr);const L3={map(){return this},resolve(t){return new Hr(t)}};function Ts(t,e,r,n,i,o=!1){if(e.inlineContent)return it.create(t,r);for(let a=n-(i>0?0:1);i>0?a<e.childCount:a>=0;a+=i){let s=e.child(a);if(s.isAtom){if(!o&&He.isSelectable(s))return He.create(t,r-(i<0?s.nodeSize:0))}else{let u=Ts(t,s,r+i,i<0?s.childCount:0,i,o);if(u)return u}r+=s.nodeSize*i}return null}function B1(t,e,r){let n=t.steps.length-1;if(n<e)return;let i=t.steps[n];if(!(i instanceof Or||i instanceof er))return;let o=t.mapping.maps[n],a;o.forEach((s,u,f,d)=>{a==null&&(a=d)}),t.setSelection(rt.near(t.doc.resolve(a),r))}const $1=1,Zc=2,F1=4;class D3 extends N3{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|$1)&~Zc,this.storedMarks=null,this}get selectionSet(){return(this.updated&$1)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Zc,this}ensureMarks(e){return ht.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&Zc)>0}addStep(e,r){super.addStep(e,r),this.updated=this.updated&~Zc,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,r=!0){let n=this.selection;return r&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||ht.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,r,n){let i=this.doc.type.schema;if(r==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(n==null&&(n=r),!e)return this.deleteRange(r,n);let o=this.storedMarks;if(!o){let a=this.doc.resolve(r);o=n==r?a.marks():a.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(r,n,i.text(e,o)),!this.selection.empty&&this.selection.to==r+e.length&&this.setSelection(rt.near(this.selection.$to)),this}}setMeta(e,r){return this.meta[typeof e=="string"?e:e.key]=r,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|=F1,this}get scrolledIntoView(){return(this.updated&F1)>0}}function H1(t,e){return!e||!t?t:t.bind(e)}class Ql{constructor(e,r,n){this.name=e,this.init=H1(r.init,n),this.apply=H1(r.apply,n)}}const I3=[new Ql("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new Ql("selection",{init(t,e){return t.selection||rt.atStart(e.doc)},apply(t){return t.selection}}),new Ql("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,r,n){return n.selection.$cursor?t.storedMarks:null}}),new Ql("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class Rh{constructor(e,r){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=I3.slice(),r&&r.forEach(n=>{if(this.pluginsByKey[n.key])throw new RangeError("Adding different instances of a keyed plugin ("+n.key+")");this.plugins.push(n),this.pluginsByKey[n.key]=n,n.spec.state&&this.fields.push(new Ql(n.key,n.spec.state,n))})}}class Ea{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,r=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=r){let i=this.config.plugins[n];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 r=[e],n=this.applyInner(e),i=null;for(;;){let o=!1;for(let a=0;a<this.config.plugins.length;a++){let s=this.config.plugins[a];if(s.spec.appendTransaction){let u=i?i[a].n:0,f=i?i[a].state:this,d=u<r.length&&s.spec.appendTransaction.call(s,u?r.slice(u):r,f,n);if(d&&n.filterTransaction(d,a)){if(d.setMeta("appendedTransaction",e),!i){i=[];for(let p=0;p<this.config.plugins.length;p++)i.push(p<a?{state:n,n:r.length}:{state:this,n:0})}r.push(d),n=n.applyInner(d),o=!0}i&&(i[a]={state:n,n:r.length})}}if(!o)return{state:n,transactions:r}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let r=new Ea(this.config),n=this.config.fields;for(let i=0;i<n.length;i++){let o=n[i];r[o.name]=o.apply(e,this[o.name],this,r)}return r}get tr(){return new D3(this)}static create(e){let r=new Rh(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new Ea(r);for(let i=0;i<r.fields.length;i++)n[r.fields[i].name]=r.fields[i].init(e,n);return n}reconfigure(e){let r=new Rh(this.schema,e.plugins),n=r.fields,i=new Ea(r);for(let o=0;o<n.length;o++){let a=n[o].name;i[a]=this.hasOwnProperty(a)?this[a]:n[o].init(e,i)}return i}toJSON(e){let r={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(r.storedMarks=this.storedMarks.map(n=>n.toJSON())),e&&typeof e=="object")for(let n in e){if(n=="doc"||n=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[n],o=i.spec.state;o&&o.toJSON&&(r[n]=o.toJSON.call(i,this[i.key]))}return r}static fromJSON(e,r,n){if(!r)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new Rh(e.schema,e.plugins),o=new Ea(i);return i.fields.forEach(a=>{if(a.name=="doc")o.doc=To.fromJSON(e.schema,r.doc);else if(a.name=="selection")o.selection=rt.fromJSON(o.doc,r.selection);else if(a.name=="storedMarks")r.storedMarks&&(o.storedMarks=r.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let s in n){let u=n[s],f=u.spec.state;if(u.key==a.name&&f&&f.fromJSON&&Object.prototype.hasOwnProperty.call(r,s)){o[a.name]=f.fromJSON.call(u,e,r[s],o);return}}o[a.name]=a.init(e,o)}}),o}}function U1(t,e,r){for(let n in t){let i=t[n];i instanceof Function?i=i.bind(e):n=="handleDOMEvents"&&(i=U1(i,e,{})),r[n]=i}return r}class rn{constructor(e){this.spec=e,this.props={},e.props&&U1(e.props,this,this.props),this.key=e.key?e.key.key:z1("plugin")}getState(e){return e[this.key]}}const Ph=Object.create(null);function z1(t){return t in Ph?t+"$"+ ++Ph[t]:(Ph[t]=0,t+"$")}class eu{constructor(e="key"){this.key=z1(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const pr=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},Ss=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let Bh=null;const Ui=function(t,e,r){let n=Bh||(Bh=document.createRange());return n.setEnd(t,r??t.nodeValue.length),n.setStart(t,e||0),n},R3=function(){Bh=null},xa=function(t,e,r,n){return r&&(q1(t,e,r,n,-1)||q1(t,e,r,n,1))},P3=/^(img|br|input|textarea|hr)$/i;function q1(t,e,r,n,i){for(var o;;){if(t==r&&e==n)return!0;if(e==(i<0?0:In(t))){let a=t.parentNode;if(!a||a.nodeType!=1||tu(t)||P3.test(t.nodeName)||t.contentEditable=="false")return!1;e=pr(t)+(i<0?0:1),t=a}else if(t.nodeType==1){let a=t.childNodes[e+(i<0?-1:0)];if(a.nodeType==1&&a.contentEditable=="false")if(!((o=a.pmViewDesc)===null||o===void 0)&&o.ignoreForSelection)e+=i;else return!1;else t=a,e=i<0?In(t):0}else return!1}}function In(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function B3(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=In(t)}else if(t.parentNode&&!tu(t))e=pr(t),t=t.parentNode;else return null}}function $3(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!tu(t))e=pr(t)+1,t=t.parentNode;else return null}}function F3(t,e,r){for(let n=e==0,i=e==In(t);n||i;){if(t==r)return!0;let o=pr(t);if(t=t.parentNode,!t)return!1;n=n&&o==0,i=i&&o==In(t)}}function tu(t){let e;for(let r=t;r&&!(e=r.pmViewDesc);r=r.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const Qc=function(t){return t.focusNode&&xa(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Ca(t,e){let r=document.createEvent("Event");return r.initEvent("keydown",!0,!0),r.keyCode=t,r.key=r.code=e,r}function H3(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function U3(t,e,r){if(t.caretPositionFromPoint)try{let n=t.caretPositionFromPoint(e,r);if(n)return{node:n.offsetNode,offset:Math.min(In(n.offsetNode),n.offset)}}catch{}if(t.caretRangeFromPoint){let n=t.caretRangeFromPoint(e,r);if(n)return{node:n.startContainer,offset:Math.min(In(n.startContainer),n.startOffset)}}}const wi=typeof navigator<"u"?navigator:null,V1=typeof document<"u"?document:null,Oo=wi&&wi.userAgent||"",$h=/Edge\/(\d+)/.exec(Oo),W1=/MSIE \d/.exec(Oo),Fh=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Oo),nn=!!(W1||Fh||$h),Ao=W1?document.documentMode:Fh?+Fh[1]:$h?+$h[1]:0,Rn=!nn&&/gecko\/(\d+)/i.test(Oo);Rn&&+(/Firefox\/(\d+)/.exec(Oo)||[0,0])[1];const Hh=!nn&&/Chrome\/(\d+)/.exec(Oo),tr=!!Hh,j1=Hh?+Hh[1]:0,Ar=!nn&&!!wi&&/Apple Computer/.test(wi.vendor),_s=Ar&&(/Mobile\/\w+/.test(Oo)||!!wi&&wi.maxTouchPoints>2),Pn=_s||(wi?/Mac/.test(wi.platform):!1),G1=wi?/Win/.test(wi.platform):!1,zi=/Android \d/.test(Oo),ru=!!V1&&"webkitFontSmoothing"in V1.documentElement.style,z3=ru?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function q3(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function qi(t,e){return typeof t=="number"?t:t[e]}function V3(t){let e=t.getBoundingClientRect(),r=e.width/t.offsetWidth||1,n=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*r,top:e.top,bottom:e.top+t.clientHeight*n}}function K1(t,e,r){let n=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,o=t.dom.ownerDocument;for(let a=r||t.dom;a;){if(a.nodeType!=1){a=Ss(a);continue}let s=a,u=s==o.body,f=u?q3(o):V3(s),d=0,p=0;if(e.top<f.top+qi(n,"top")?p=-(f.top-e.top+qi(i,"top")):e.bottom>f.bottom-qi(n,"bottom")&&(p=e.bottom-e.top>f.bottom-f.top?e.top+qi(i,"top")-f.top:e.bottom-f.bottom+qi(i,"bottom")),e.left<f.left+qi(n,"left")?d=-(f.left-e.left+qi(i,"left")):e.right>f.right-qi(n,"right")&&(d=e.right-f.right+qi(i,"right")),d||p)if(u)o.defaultView.scrollBy(d,p);else{let m=s.scrollLeft,g=s.scrollTop;p&&(s.scrollTop+=p),d&&(s.scrollLeft+=d);let E=s.scrollLeft-m,w=s.scrollTop-g;e={left:e.left-E,top:e.top-w,right:e.right-E,bottom:e.bottom-w}}let v=u?"fixed":getComputedStyle(a).position;if(/^(fixed|sticky)$/.test(v))break;a=v=="absolute"?a.offsetParent:Ss(a)}}function W3(t){let e=t.dom.getBoundingClientRect(),r=Math.max(0,e.top),n,i;for(let o=(e.left+e.right)/2,a=r+1;a<Math.min(innerHeight,e.bottom);a+=5){let s=t.root.elementFromPoint(o,a);if(!s||s==t.dom||!t.dom.contains(s))continue;let u=s.getBoundingClientRect();if(u.top>=r-20){n=s,i=u.top;break}}return{refDOM:n,refTop:i,stack:Y1(t.dom)}}function Y1(t){let e=[],r=t.ownerDocument;for(let n=t;n&&(e.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),t!=r);n=Ss(n));return e}function j3({refDOM:t,refTop:e,stack:r}){let n=t?t.getBoundingClientRect().top:0;X1(r,n==0?0:n-e)}function X1(t,e){for(let r=0;r<t.length;r++){let{dom:n,top:i,left:o}=t[r];n.scrollTop!=i+e&&(n.scrollTop=i+e),n.scrollLeft!=o&&(n.scrollLeft=o)}}let Os=null;function G3(t){if(t.setActive)return t.setActive();if(Os)return t.focus(Os);let e=Y1(t);t.focus(Os==null?{get preventScroll(){return Os={preventScroll:!0},!0}}:void 0),Os||(Os=!1,X1(e,0))}function J1(t,e){let r,n=2e8,i,o=0,a=e.top,s=e.top,u,f;for(let d=t.firstChild,p=0;d;d=d.nextSibling,p++){let v;if(d.nodeType==1)v=d.getClientRects();else if(d.nodeType==3)v=Ui(d).getClientRects();else continue;for(let m=0;m<v.length;m++){let g=v[m];if(g.top<=a&&g.bottom>=s){a=Math.max(g.bottom,a),s=Math.min(g.top,s);let E=g.left>e.left?g.left-e.left:g.right<e.left?e.left-g.right:0;if(E<n){r=d,n=E,i=E&&r.nodeType==3?{left:g.right<e.left?g.right:g.left,top:e.top}:e,d.nodeType==1&&E&&(o=p+(e.left>=(g.left+g.right)/2?1:0));continue}}else g.top>e.top&&!u&&g.left<=e.left&&g.right>=e.left&&(u=d,f={left:Math.max(g.left,Math.min(g.right,e.left)),top:g.top});!r&&(e.left>=g.right&&e.top>=g.top||e.left>=g.left&&e.top>=g.bottom)&&(o=p+1)}}return!r&&u&&(r=u,i=f,n=0),r&&r.nodeType==3?K3(r,i):!r||n&&r.nodeType==1?{node:t,offset:o}:J1(r,i)}function K3(t,e){let r=t.nodeValue.length,n=document.createRange(),i;for(let o=0;o<r;o++){n.setEnd(t,o+1),n.setStart(t,o);let a=Mo(n,1);if(a.top!=a.bottom&&Uh(e,a)){i={node:t,offset:o+(e.left>=(a.left+a.right)/2?1:0)};break}}return n.detach(),i||{node:t,offset:0}}function Uh(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function Y3(t,e){let r=t.parentNode;return r&&/^li$/i.test(r.nodeName)&&e.left<t.getBoundingClientRect().left?r:t}function X3(t,e,r){let{node:n,offset:i}=J1(e,r),o=-1;if(n.nodeType==1&&!n.firstChild){let a=n.getBoundingClientRect();o=a.left!=a.right&&r.left>(a.left+a.right)/2?1:-1}return t.docView.posFromDOM(n,i,o)}function J3(t,e,r,n){let i=-1;for(let o=e,a=!1;o!=t.dom;){let s=t.docView.nearestDesc(o,!0),u;if(!s)return null;if(s.dom.nodeType==1&&(s.node.isBlock&&s.parent||!s.contentDOM)&&((u=s.dom.getBoundingClientRect()).width||u.height)&&(s.node.isBlock&&s.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(s.dom.nodeName)&&(!a&&u.left>n.left||u.top>n.top?i=s.posBefore:(!a&&u.right<n.left||u.bottom<n.top)&&(i=s.posAfter),a=!0),!s.contentDOM&&i<0&&!s.node.isText))return(s.node.isBlock?n.top<(u.top+u.bottom)/2:n.left<(u.left+u.right)/2)?s.posBefore:s.posAfter;o=s.dom.parentNode}return i>-1?i:t.docView.posFromDOM(e,r,-1)}function Z1(t,e,r){let n=t.childNodes.length;if(n&&r.top<r.bottom)for(let i=Math.max(0,Math.min(n-1,Math.floor(n*(e.top-r.top)/(r.bottom-r.top))-2)),o=i;;){let a=t.childNodes[o];if(a.nodeType==1){let s=a.getClientRects();for(let u=0;u<s.length;u++){let f=s[u];if(Uh(e,f))return Z1(a,e,f)}}if((o=(o+1)%n)==i)break}return t}function Z3(t,e){let r=t.dom.ownerDocument,n,i=0,o=U3(r,e.left,e.top);o&&({node:n,offset:i}=o);let a=(t.root.elementFromPoint?t.root:r).elementFromPoint(e.left,e.top),s;if(!a||!t.dom.contains(a.nodeType!=1?a.parentNode:a)){let f=t.dom.getBoundingClientRect();if(!Uh(e,f)||(a=Z1(t.dom,e,f),!a))return null}if(Ar)for(let f=a;n&&f;f=Ss(f))f.draggable&&(n=void 0);if(a=Y3(a,e),n){if(Rn&&n.nodeType==1&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let d=n.childNodes[i],p;d.nodeName=="IMG"&&(p=d.getBoundingClientRect()).right<=e.left&&p.bottom>e.top&&i++}let f;ru&&i&&n.nodeType==1&&(f=n.childNodes[i-1]).nodeType==1&&f.contentEditable=="false"&&f.getBoundingClientRect().top>=e.top&&i--,n==t.dom&&i==n.childNodes.length-1&&n.lastChild.nodeType==1&&e.top>n.lastChild.getBoundingClientRect().bottom?s=t.state.doc.content.size:(i==0||n.nodeType!=1||n.childNodes[i-1].nodeName!="BR")&&(s=J3(t,n,i,e))}s==null&&(s=X3(t,a,e));let u=t.docView.nearestDesc(a,!0);return{pos:s,inside:u?u.posAtStart-u.border:-1}}function Q1(t){return t.top<t.bottom||t.left<t.right}function Mo(t,e){let r=t.getClientRects();if(r.length){let n=r[e<0?0:r.length-1];if(Q1(n))return n}return Array.prototype.find.call(r,Q1)||t.getBoundingClientRect()}const Q3=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function eE(t,e,r){let{node:n,offset:i,atom:o}=t.docView.domFromPos(e,r<0?-1:1),a=ru||Rn;if(n.nodeType==3)if(a&&(Q3.test(n.nodeValue)||(r<0?!i:i==n.nodeValue.length))){let u=Mo(Ui(n,i,i),r);if(Rn&&i&&/\s/.test(n.nodeValue[i-1])&&i<n.nodeValue.length){let f=Mo(Ui(n,i-1,i-1),-1);if(f.top==u.top){let d=Mo(Ui(n,i,i+1),-1);if(d.top!=u.top)return nu(d,d.left<f.left)}}return u}else{let u=i,f=i,d=r<0?1:-1;return r<0&&!i?(f++,d=-1):r>=0&&i==n.nodeValue.length?(u--,d=1):r<0?u--:f++,nu(Mo(Ui(n,u,f),d),d<0)}if(!t.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&i&&(r<0||i==In(n))){let u=n.childNodes[i-1];if(u.nodeType==1)return zh(u.getBoundingClientRect(),!1)}if(o==null&&i<In(n)){let u=n.childNodes[i];if(u.nodeType==1)return zh(u.getBoundingClientRect(),!0)}return zh(n.getBoundingClientRect(),r>=0)}if(o==null&&i&&(r<0||i==In(n))){let u=n.childNodes[i-1],f=u.nodeType==3?Ui(u,In(u)-(a?0:1)):u.nodeType==1&&(u.nodeName!="BR"||!u.nextSibling)?u:null;if(f)return nu(Mo(f,1),!1)}if(o==null&&i<In(n)){let u=n.childNodes[i];for(;u.pmViewDesc&&u.pmViewDesc.ignoreForCoords;)u=u.nextSibling;let f=u?u.nodeType==3?Ui(u,0,a?0:1):u.nodeType==1?u:null:null;if(f)return nu(Mo(f,-1),!0)}return nu(Mo(n.nodeType==3?Ui(n):n,-r),r>=0)}function nu(t,e){if(t.width==0)return t;let r=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:r,right:r}}function zh(t,e){if(t.height==0)return t;let r=e?t.top:t.bottom;return{top:r,bottom:r,left:t.left,right:t.right}}function tE(t,e,r){let n=t.state,i=t.root.activeElement;n!=e&&t.updateState(e),i!=t.dom&&t.focus();try{return r()}finally{n!=e&&t.updateState(n),i!=t.dom&&i&&i.focus()}}function eH(t,e,r){let n=e.selection,i=r=="up"?n.$from:n.$to;return tE(t,e,()=>{let{node:o}=t.docView.domFromPos(i.pos,r=="up"?-1:1);for(;;){let s=t.docView.nearestDesc(o,!0);if(!s)break;if(s.node.isBlock){o=s.contentDOM||s.dom;break}o=s.dom.parentNode}let a=eE(t,i.pos,1);for(let s=o.firstChild;s;s=s.nextSibling){let u;if(s.nodeType==1)u=s.getClientRects();else if(s.nodeType==3)u=Ui(s,0,s.nodeValue.length).getClientRects();else continue;for(let f=0;f<u.length;f++){let d=u[f];if(d.bottom>d.top+1&&(r=="up"?a.top-d.top>(d.bottom-a.top)*2:d.bottom-a.bottom>(a.bottom-d.top)*2))return!1}}return!0})}const tH=/[\u0590-\u08ac]/;function rH(t,e,r){let{$head:n}=e.selection;if(!n.parent.isTextblock)return!1;let i=n.parentOffset,o=!i,a=i==n.parent.content.size,s=t.domSelection();return s?!tH.test(n.parent.textContent)||!s.modify?r=="left"||r=="backward"?o:a:tE(t,e,()=>{let{focusNode:u,focusOffset:f,anchorNode:d,anchorOffset:p}=t.domSelectionRange(),v=s.caretBidiLevel;s.modify("move",r,"character");let m=n.depth?t.docView.domAfterPos(n.before()):t.dom,{focusNode:g,focusOffset:E}=t.domSelectionRange(),w=g&&!m.contains(g.nodeType==1?g:g.parentNode)||u==g&&f==E;try{s.collapse(d,p),u&&(u!=d||f!=p)&&s.extend&&s.extend(u,f)}catch{}return v!=null&&(s.caretBidiLevel=v),w}):n.pos==n.start()||n.pos==n.end()}let rE=null,nE=null,iE=!1;function nH(t,e,r){return rE==e&&nE==r?iE:(rE=e,nE=r,iE=r=="up"||r=="down"?eH(t,e,r):rH(t,e,r))}const Bn=0,oE=1,ka=2,Ei=3;class iu{constructor(e,r,n,i){this.parent=e,this.children=r,this.dom=n,this.contentDOM=i,this.dirty=Bn,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,r,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let r=0;r<this.children.length;r++)e+=this.children[r].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 r=0,n=this.posAtStart;;r++){let i=this.children[r];if(i==e)return n;n+=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,r,n){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(n<0){let o,a;if(e==this.contentDOM)o=e.childNodes[r-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.previousSibling}for(;o&&!((a=o.pmViewDesc)&&a.parent==this);)o=o.previousSibling;return o?this.posBeforeChild(a)+a.size:this.posAtStart}else{let o,a;if(e==this.contentDOM)o=e.childNodes[r];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.nextSibling}for(;o&&!((a=o.pmViewDesc)&&a.parent==this);)o=o.nextSibling;return o?this.posBeforeChild(a):this.posAtEnd}let i;if(e==this.dom&&this.contentDOM)i=r>pr(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(r==0)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!1;break}if(o.previousSibling)break}if(i==null&&r==e.childNodes.length)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!0;break}if(o.nextSibling)break}}return i??n>0?this.posAtEnd:this.posAtStart}nearestDesc(e,r=!1){for(let n=!0,i=e;i;i=i.parentNode){let o=this.getDesc(i),a;if(o&&(!r||o.node))if(n&&(a=o.nodeDOM)&&!(a.nodeType==1?a.contains(e.nodeType==1?e:e.parentNode):a==e))n=!1;else return o}}getDesc(e){let r=e.pmViewDesc;for(let n=r;n;n=n.parent)if(n==this)return r}posFromDOM(e,r,n){for(let i=e;i;i=i.parentNode){let o=this.getDesc(i);if(o)return o.localPosFromDOM(e,r,n)}return-1}descAt(e){for(let r=0,n=0;r<this.children.length;r++){let i=this.children[r],o=n+i.size;if(n==e&&o!=n){for(;!i.border&&i.children.length;)for(let a=0;a<i.children.length;a++){let s=i.children[a];if(s.size){i=s;break}}return i}if(e<o)return i.descAt(e-n-i.border);n=o}}domFromPos(e,r){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,i=0;for(let o=0;n<this.children.length;n++){let a=this.children[n],s=o+a.size;if(s>e||a instanceof lE){i=e-o;break}o=s}if(i)return this.children[n].domFromPos(i-this.children[n].border,r);for(let o;n&&!(o=this.children[n-1]).size&&o instanceof aE&&o.side>=0;n--);if(r<=0){let o,a=!0;for(;o=n?this.children[n-1]:null,!(!o||o.dom.parentNode==this.contentDOM);n--,a=!1);return o&&r&&a&&!o.border&&!o.domAtom?o.domFromPos(o.size,r):{node:this.contentDOM,offset:o?pr(o.dom)+1:0}}else{let o,a=!0;for(;o=n<this.children.length?this.children[n]:null,!(!o||o.dom.parentNode==this.contentDOM);n++,a=!1);return o&&a&&!o.border&&!o.domAtom?o.domFromPos(0,r):{node:this.contentDOM,offset:o?pr(o.dom):this.contentDOM.childNodes.length}}}parseRange(e,r,n=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:r,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,o=-1;for(let a=n,s=0;;s++){let u=this.children[s],f=a+u.size;if(i==-1&&e<=f){let d=a+u.border;if(e>=d&&r<=f-u.border&&u.node&&u.contentDOM&&this.contentDOM.contains(u.contentDOM))return u.parseRange(e,r,d);e=a;for(let p=s;p>0;p--){let v=this.children[p-1];if(v.size&&v.dom.parentNode==this.contentDOM&&!v.emptyChildAt(1)){i=pr(v.dom)+1;break}e-=v.size}i==-1&&(i=0)}if(i>-1&&(f>r||s==this.children.length-1)){r=f;for(let d=s+1;d<this.children.length;d++){let p=this.children[d];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(-1)){o=pr(p.dom);break}r+=p.size}o==-1&&(o=this.contentDOM.childNodes.length);break}a=f}return{node:this.contentDOM,from:e,to:r,fromOffset:i,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let r=this.children[e<0?0:this.children.length-1];return r.size==0||r.emptyChildAt(e)}domAfterPos(e){let{node:r,offset:n}=this.domFromPos(e,0);if(r.nodeType!=1||n==r.childNodes.length)throw new RangeError("No node after pos "+e);return r.childNodes[n]}setSelection(e,r,n,i=!1){let o=Math.min(e,r),a=Math.max(e,r);for(let m=0,g=0;m<this.children.length;m++){let E=this.children[m],w=g+E.size;if(o>g&&a<w)return E.setSelection(e-g-E.border,r-g-E.border,n,i);g=w}let s=this.domFromPos(e,e?-1:1),u=r==e?s:this.domFromPos(r,r?-1:1),f=n.root.getSelection(),d=n.domSelectionRange(),p=!1;if((Rn||Ar)&&e==r){let{node:m,offset:g}=s;if(m.nodeType==3){if(p=!!(g&&m.nodeValue[g-1]==`
|
|
101
|
+
`),p&&g==m.nodeValue.length)for(let E=m,w;E;E=E.parentNode){if(w=E.nextSibling){w.nodeName=="BR"&&(s=u={node:w.parentNode,offset:pr(w)+1});break}let x=E.pmViewDesc;if(x&&x.node&&x.node.isBlock)break}}else{let E=m.childNodes[g-1];p=E&&(E.nodeName=="BR"||E.contentEditable=="false")}}if(Rn&&d.focusNode&&d.focusNode!=u.node&&d.focusNode.nodeType==1){let m=d.focusNode.childNodes[d.focusOffset];m&&m.contentEditable=="false"&&(i=!0)}if(!(i||p&&Ar)&&xa(s.node,s.offset,d.anchorNode,d.anchorOffset)&&xa(u.node,u.offset,d.focusNode,d.focusOffset))return;let v=!1;if((f.extend||e==r)&&!(p&&Rn)){f.collapse(s.node,s.offset);try{e!=r&&f.extend(u.node,u.offset),v=!0}catch{}}if(!v){if(e>r){let g=s;s=u,u=g}let m=document.createRange();m.setEnd(u.node,u.offset),m.setStart(s.node,s.offset),f.removeAllRanges(),f.addRange(m)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,r){for(let n=0,i=0;i<this.children.length;i++){let o=this.children[i],a=n+o.size;if(n==a?e<=a&&r>=n:e<a&&r>n){let s=n+o.border,u=a-o.border;if(e>=s&&r<=u){this.dirty=e==n||r==a?ka:oE,e==s&&r==u&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=Ei:o.markDirty(e-s,r-s);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?ka:Ei}n=a}this.dirty=ka}markParentsDirty(){let e=1;for(let r=this.parent;r;r=r.parent,e++){let n=e==1?ka:oE;r.dirty<n&&(r.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class aE extends iu{constructor(e,r,n,i){let o,a=r.type.toDOM;if(typeof a=="function"&&(a=a(n,()=>{if(!o)return i;if(o.parent)return o.parent.posBeforeChild(o)})),!r.type.spec.raw){if(a.nodeType!=1){let s=document.createElement("span");s.appendChild(a),a=s}a.contentEditable="false",a.classList.add("ProseMirror-widget")}super(e,[],a,null),this.widget=r,this.widget=r,o=this}matchesWidget(e){return this.dirty==Bn&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let r=this.widget.spec.stopEvent;return r?r(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 ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class iH extends iu{constructor(e,r,n,i){super(e,[],r,null),this.textDOM=n,this.text=i}get size(){return this.text.length}localPosFromDOM(e,r){return e!=this.textDOM?this.posAtStart+(r?this.size:0):this.posAtStart+r}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Ta extends iu{constructor(e,r,n,i,o){super(e,[],n,i),this.mark=r,this.spec=o}static create(e,r,n,i){let o=i.nodeViews[r.type.name],a=o&&o(r,i,n);return(!a||!a.dom)&&(a=Es.renderSpec(document,r.type.spec.toDOM(r,n),null,r.attrs)),new Ta(e,r,a.dom,a.contentDOM||a.dom,a)}parseRule(){return this.dirty&Ei||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Ei&&this.mark.eq(e)}markDirty(e,r){if(super.markDirty(e,r),this.dirty!=Bn){let n=this.parent;for(;!n.node;)n=n.parent;n.dirty<this.dirty&&(n.dirty=this.dirty),this.dirty=Bn}}slice(e,r,n){let i=Ta.create(this.parent,this.mark,!0,n),o=this.children,a=this.size;r<a&&(o=Vh(o,r,a,n)),e>0&&(o=Vh(o,0,e,n));for(let s=0;s<o.length;s++)o[s].parent=i;return i.children=o,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class No extends iu{constructor(e,r,n,i,o,a,s,u,f){super(e,[],o,a),this.node=r,this.outerDeco=n,this.innerDeco=i,this.nodeDOM=s}static create(e,r,n,i,o,a){let s=o.nodeViews[r.type.name],u,f=s&&s(r,o,()=>{if(!u)return a;if(u.parent)return u.parent.posBeforeChild(u)},n,i),d=f&&f.dom,p=f&&f.contentDOM;if(r.isText){if(!d)d=document.createTextNode(r.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:p}=Es.renderSpec(document,r.type.spec.toDOM(r),null,r.attrs));!p&&!r.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),r.type.spec.draggable&&(d.draggable=!0));let v=d;return d=fE(d,n,r),f?u=new oH(e,r,n,i,d,p||null,v,f,o,a+1):r.isText?new ef(e,r,n,i,d,v,o):new No(e,r,n,i,d,p||null,v,o,a+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 r=this.children.length-1;r>=0;r--){let n=this.children[r];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>oe.empty)}return e}matchesNode(e,r,n){return this.dirty==Bn&&e.eq(this.node)&&tf(r,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,r){let n=this.node.inlineContent,i=r,o=e.composing?this.localCompositionInfo(e,r):null,a=o&&o.pos>-1?o:null,s=o&&o.pos<0,u=new sH(this,a&&a.node,e);cH(this.node,this.innerDeco,(f,d,p)=>{f.spec.marks?u.syncToMarks(f.spec.marks,n,e):f.type.side>=0&&!p&&u.syncToMarks(d==this.node.childCount?ht.none:this.node.child(d).marks,n,e),u.placeWidget(f,e,i)},(f,d,p,v)=>{u.syncToMarks(f.marks,n,e);let m;u.findNodeMatch(f,d,p,v)||s&&e.state.selection.from>i&&e.state.selection.to<i+f.nodeSize&&(m=u.findIndexWithChild(o.node))>-1&&u.updateNodeAt(f,d,p,m,e)||u.updateNextNode(f,d,p,e,v,i)||u.addNode(f,d,p,e,i),i+=f.nodeSize}),u.syncToMarks([],n,e),this.node.isTextblock&&u.addTextblockHacks(),u.destroyRest(),(u.changed||this.dirty==ka)&&(a&&this.protectLocalComposition(e,a),uE(this.contentDOM,this.children,e),_s&&fH(this.dom))}localCompositionInfo(e,r){let{from:n,to:i}=e.state.selection;if(!(e.state.selection instanceof it)||n<r||i>r+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 a=o.nodeValue,s=dH(this.node.content,a,n-r,i-r);return s<0?null:{node:o,pos:s,text:a}}else return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:r,pos:n,text:i}){if(this.getDesc(r))return;let o=r;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 a=new iH(this,o,r,i);e.input.compositionNodes.push(a),this.children=Vh(this.children,n,n+i.length,e,a)}update(e,r,n,i){return this.dirty==Ei||!e.sameMarkup(this.node)?!1:(this.updateInner(e,r,n,i),!0)}updateInner(e,r,n,i){this.updateOuterDeco(r),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=Bn}updateOuterDeco(e){if(tf(e,this.outerDeco))return;let r=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=cE(this.dom,this.nodeDOM,qh(this.outerDeco,this.node,r),qh(e,this.node,r)),this.dom!=n&&(n.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.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function sE(t,e,r,n,i){fE(n,e,t);let o=new No(void 0,t,e,r,n,n,n,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class ef extends No{constructor(e,r,n,i,o,a,s){super(e,r,n,i,o,null,a,s,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,r,n,i){return this.dirty==Ei||this.dirty!=Bn&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(r),(this.dirty!=Bn||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=Bn,!0)}inParent(){let e=this.parent.contentDOM;for(let r=this.nodeDOM;r;r=r.parentNode)if(r==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,r,n){return e==this.nodeDOM?this.posAtStart+Math.min(r,this.node.text.length):super.localPosFromDOM(e,r,n)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,r,n){let i=this.node.cut(e,r),o=document.createTextNode(i.text);return new ef(this.parent,i,this.outerDeco,this.innerDeco,o,o,n)}markDirty(e,r){super.markDirty(e,r),this.dom!=this.nodeDOM&&(e==0||r==this.nodeDOM.nodeValue.length)&&(this.dirty=Ei)}get domAtom(){return!1}isText(e){return this.node.text==e}}class lE extends iu{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Bn&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class oH extends No{constructor(e,r,n,i,o,a,s,u,f,d){super(e,r,n,i,o,a,s,f,d),this.spec=u}update(e,r,n,i){if(this.dirty==Ei)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let o=this.spec.update(e,r,n);return o&&this.updateInner(e,r,n,i),o}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,r,n,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,r,n,i){this.spec.setSelection?this.spec.setSelection(e,r,n.root):super.setSelection(e,r,n,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 uE(t,e,r){let n=t.firstChild,i=!1;for(let o=0;o<e.length;o++){let a=e[o],s=a.dom;if(s.parentNode==t){for(;s!=n;)n=dE(n),i=!0;n=n.nextSibling}else i=!0,t.insertBefore(s,n);if(a instanceof Ta){let u=n?n.previousSibling:t.lastChild;uE(a.contentDOM,a.children,r),n=u?u.nextSibling:t.firstChild}}for(;n;)n=dE(n),i=!0;i&&r.trackWrites==t&&(r.trackWrites=null)}const ou=function(t){t&&(this.nodeName=t)};ou.prototype=Object.create(null);const Sa=[new ou];function qh(t,e,r){if(t.length==0)return Sa;let n=r?Sa[0]:new ou,i=[n];for(let o=0;o<t.length;o++){let a=t[o].type.attrs;if(a){a.nodeName&&i.push(n=new ou(a.nodeName));for(let s in a){let u=a[s];u!=null&&(r&&i.length==1&&i.push(n=new ou(e.isInline?"span":"div")),s=="class"?n.class=(n.class?n.class+" ":"")+u:s=="style"?n.style=(n.style?n.style+";":"")+u:s!="nodeName"&&(n[s]=u))}}}return i}function cE(t,e,r,n){if(r==Sa&&n==Sa)return e;let i=e;for(let o=0;o<n.length;o++){let a=n[o],s=r[o];if(o){let u;s&&s.nodeName==a.nodeName&&i!=t&&(u=i.parentNode)&&u.nodeName.toLowerCase()==a.nodeName||(u=document.createElement(a.nodeName),u.pmIsDeco=!0,u.appendChild(i),s=Sa[0]),i=u}aH(i,s||Sa[0],a)}return i}function aH(t,e,r){for(let n in e)n!="class"&&n!="style"&&n!="nodeName"&&!(n in r)&&t.removeAttribute(n);for(let n in r)n!="class"&&n!="style"&&n!="nodeName"&&r[n]!=e[n]&&t.setAttribute(n,r[n]);if(e.class!=r.class){let n=e.class?e.class.split(" ").filter(Boolean):[],i=r.class?r.class.split(" ").filter(Boolean):[];for(let o=0;o<n.length;o++)i.indexOf(n[o])==-1&&t.classList.remove(n[o]);for(let o=0;o<i.length;o++)n.indexOf(i[o])==-1&&t.classList.add(i[o]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=r.style){if(e.style){let n=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=n.exec(e.style);)t.style.removeProperty(i[1])}r.style&&(t.style.cssText+=r.style)}}function fE(t,e,r){return cE(t,t,Sa,qh(e,r,t.nodeType!=1))}function tf(t,e){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].type.eq(e[r].type))return!1;return!0}function dE(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class sH{constructor(e,r,n){this.lock=r,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=lH(e.node.content,e)}destroyBetween(e,r){if(e!=r){for(let n=e;n<r;n++)this.top.children[n].destroy();this.top.children.splice(e,r-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,r,n){let i=0,o=this.stack.length>>1,a=Math.min(o,e.length);for(;i<a&&(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=Bn,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let s=-1;for(let u=this.index;u<Math.min(this.index+3,this.top.children.length);u++){let f=this.top.children[u];if(f.matchesMark(e[o])&&!this.isLocked(f.dom)){s=u;break}}if(s>-1)s>this.index&&(this.changed=!0,this.destroyBetween(this.index,s)),this.top=this.top.children[this.index];else{let u=Ta.create(this.top,e[o],r,n);this.top.children.splice(this.index,0,u),this.top=u,this.changed=!0}this.index=0,o++}}findNodeMatch(e,r,n,i){let o=-1,a;if(i>=this.preMatch.index&&(a=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&a.matchesNode(e,r,n))o=this.top.children.indexOf(a,this.index);else for(let s=this.index,u=Math.min(this.top.children.length,s+5);s<u;s++){let f=this.top.children[s];if(f.matchesNode(e,r,n)&&!this.preMatch.matched.has(f)){o=s;break}}return o<0?!1:(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(e,r,n,i,o){let a=this.top.children[i];return a.dirty==Ei&&a.dom==a.contentDOM&&(a.dirty=ka),a.update(e,r,n,o)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(e){for(;;){let r=e.parentNode;if(!r)return-1;if(r==this.top.contentDOM){let n=e.pmViewDesc;if(n){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==n)return i}return-1}e=r}}updateNextNode(e,r,n,i,o,a){for(let s=this.index;s<this.top.children.length;s++){let u=this.top.children[s];if(u instanceof No){let f=this.preMatch.matched.get(u);if(f!=null&&f!=o)return!1;let d=u.dom,p,v=this.isLocked(d)&&!(e.isText&&u.node&&u.node.isText&&u.nodeDOM.nodeValue==e.text&&u.dirty!=Ei&&tf(r,u.outerDeco));if(!v&&u.update(e,r,n,i))return this.destroyBetween(this.index,s),u.dom!=d&&(this.changed=!0),this.index++,!0;if(!v&&(p=this.recreateWrapper(u,e,r,n,i,a)))return this.destroyBetween(this.index,s),this.top.children[this.index]=p,p.contentDOM&&(p.dirty=ka,p.updateChildren(i,a+1),p.dirty=Bn),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,r,n,i,o,a){if(e.dirty||r.isAtom||!e.children.length||!e.node.content.eq(r.content)||!tf(n,e.outerDeco)||!i.eq(e.innerDeco))return null;let s=No.create(this.top,r,n,i,o,a);if(s.contentDOM){s.children=e.children,e.children=[];for(let u of s.children)u.parent=s}return e.destroy(),s}addNode(e,r,n,i,o){let a=No.create(this.top,e,r,n,i,o);a.contentDOM&&a.updateChildren(i,o+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(e,r,n){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 aE(this.top,e,r,n);this.top.children.splice(this.index++,0,o),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],r=this.top;for(;e instanceof Ta;)r=e,e=r.children[r.children.length-1];(!e||!(e instanceof ef)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Ar||tr)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",r),this.addHackNode("BR",this.top))}addHackNode(e,r){if(r==this.top&&this.index<r.children.length&&r.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);e=="IMG"&&(n.className="ProseMirror-separator",n.alt=""),e=="BR"&&(n.className="ProseMirror-trailingBreak");let i=new lE(this.top,[],n,null);r!=this.top?r.children.push(i):r.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 lH(t,e){let r=e,n=r.children.length,i=t.childCount,o=new Map,a=[];e:for(;i>0;){let s;for(;;)if(n){let f=r.children[n-1];if(f instanceof Ta)r=f,n=f.children.length;else{s=f,n--;break}}else{if(r==e)break e;n=r.parent.children.indexOf(r),r=r.parent}let u=s.node;if(u){if(u!=t.child(i-1))break;--i,o.set(s,i),a.push(s)}}return{index:i,matched:o,matches:a.reverse()}}function uH(t,e){return t.type.side-e.type.side}function cH(t,e,r,n){let i=e.locals(t),o=0;if(i.length==0){for(let f=0;f<t.childCount;f++){let d=t.child(f);n(d,i,e.forChild(o,d),f),o+=d.nodeSize}return}let a=0,s=[],u=null;for(let f=0;;){let d,p;for(;a<i.length&&i[a].to==o;){let w=i[a++];w.widget&&(d?(p||(p=[d])).push(w):d=w)}if(d)if(p){p.sort(uH);for(let w=0;w<p.length;w++)r(p[w],f,!!u)}else r(d,f,!!u);let v,m;if(u)m=-1,v=u,u=null;else if(f<t.childCount)m=f,v=t.child(f++);else break;for(let w=0;w<s.length;w++)s[w].to<=o&&s.splice(w--,1);for(;a<i.length&&i[a].from<=o&&i[a].to>o;)s.push(i[a++]);let g=o+v.nodeSize;if(v.isText){let w=g;a<i.length&&i[a].from<w&&(w=i[a].from);for(let x=0;x<s.length;x++)s[x].to<w&&(w=s[x].to);w<g&&(u=v.cut(w-o),v=v.cut(0,w-o),g=w,m=-1)}else for(;a<i.length&&i[a].to<g;)a++;let E=v.isInline&&!v.isLeaf?s.filter(w=>!w.inline):s.slice();n(v,E,e.forChild(o,v),m),o=g}}function fH(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function dH(t,e,r,n){for(let i=0,o=0;i<t.childCount&&o<=n;){let a=t.child(i++),s=o;if(o+=a.nodeSize,!a.isText)continue;let u=a.text;for(;i<t.childCount;){let f=t.child(i++);if(o+=f.nodeSize,!f.isText)break;u+=f.text}if(o>=r){if(o>=n&&u.slice(n-e.length-s,n-s)==e)return n-e.length;let f=s<n?u.lastIndexOf(e,n-s-1):-1;if(f>=0&&f+e.length+s>=r)return s+f;if(r==n&&u.length>=n+e.length-s&&u.slice(n-s,n-s+e.length)==e)return n}}return-1}function Vh(t,e,r,n,i){let o=[];for(let a=0,s=0;a<t.length;a++){let u=t[a],f=s,d=s+=u.size;f>=r||d<=e?o.push(u):(f<e&&o.push(u.slice(0,e-f,n)),i&&(o.push(i),i=void 0),d>r&&o.push(u.slice(r-f,u.size,n)))}return o}function Wh(t,e=null){let r=t.domSelectionRange(),n=t.state.doc;if(!r.focusNode)return null;let i=t.docView.nearestDesc(r.focusNode),o=i&&i.size==0,a=t.docView.posFromDOM(r.focusNode,r.focusOffset,1);if(a<0)return null;let s=n.resolve(a),u,f;if(Qc(r)){for(u=a;i&&!i.node;)i=i.parent;let p=i.node;if(i&&p.isAtom&&He.isSelectable(p)&&i.parent&&!(p.isInline&&F3(r.focusNode,r.focusOffset,i.dom))){let v=i.posBefore;f=new He(a==v?s:n.resolve(v))}}else{if(r instanceof t.dom.ownerDocument.defaultView.Selection&&r.rangeCount>1){let p=a,v=a;for(let m=0;m<r.rangeCount;m++){let g=r.getRangeAt(m);p=Math.min(p,t.docView.posFromDOM(g.startContainer,g.startOffset,1)),v=Math.max(v,t.docView.posFromDOM(g.endContainer,g.endOffset,-1))}if(p<0)return null;[u,a]=v==t.state.selection.anchor?[v,p]:[p,v],s=n.resolve(a)}else u=t.docView.posFromDOM(r.anchorNode,r.anchorOffset,1);if(u<0)return null}let d=n.resolve(u);if(!f){let p=e=="pointer"||t.state.selection.head<s.pos&&!o?1:-1;f=Gh(t,d,s,p)}return f}function pE(t){return t.editable?t.hasFocus():wE(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Vi(t,e=!1){let r=t.state.selection;if(gE(t,r),!!pE(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&tr){let n=t.domSelectionRange(),i=t.domObserver.currentSelection;if(n.anchorNode&&i.anchorNode&&xa(n.anchorNode,n.anchorOffset,i.anchorNode,i.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)hH(t);else{let{anchor:n,head:i}=r,o,a;hE&&!(r instanceof it)&&(r.$from.parent.inlineContent||(o=vE(t,r.from)),!r.empty&&!r.$from.parent.inlineContent&&(a=vE(t,r.to))),t.docView.setSelection(n,i,t,e),hE&&(o&&mE(o),a&&mE(a)),r.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&pH(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const hE=Ar||tr&&j1<63;function vE(t,e){let{node:r,offset:n}=t.docView.domFromPos(e,0),i=n<r.childNodes.length?r.childNodes[n]:null,o=n?r.childNodes[n-1]:null;if(Ar&&i&&i.contentEditable=="false")return jh(i);if((!i||i.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(i)return jh(i);if(o)return jh(o)}}function jh(t){return t.contentEditable="true",Ar&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function mE(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function pH(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let r=t.domSelectionRange(),n=r.anchorNode,i=r.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(r.anchorNode!=n||r.anchorOffset!=i)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!pE(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function hH(t){let e=t.domSelection();if(!e)return;let r=t.cursorWrapper.dom,n=r.nodeName=="IMG";n?e.collapse(r.parentNode,pr(r)+1):e.collapse(r,0),!n&&!t.state.selection.visible&&nn&&Ao<=11&&(r.disabled=!0,r.disabled=!1)}function gE(t,e){if(e instanceof He){let r=t.docView.descAt(e.from);r!=t.lastSelectedViewDesc&&(yE(t),r&&r.selectNode(),t.lastSelectedViewDesc=r)}else yE(t)}function yE(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Gh(t,e,r,n){return t.someProp("createSelectionBetween",i=>i(t,e,r))||it.between(e,r,n)}function bE(t){return t.editable&&!t.hasFocus()?!1:wE(t)}function wE(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function vH(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),r=t.domSelectionRange();return xa(e.node,e.offset,r.anchorNode,r.anchorOffset)}function Kh(t,e){let{$anchor:r,$head:n}=t.selection,i=e>0?r.max(n):r.min(n),o=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return o&&rt.findFrom(o,e)}function Lo(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function EE(t,e,r){let n=t.state.selection;if(n instanceof it)if(r.indexOf("s")>-1){let{$head:i}=n,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let a=t.state.doc.resolve(i.pos+o.nodeSize*(e<0?-1:1));return Lo(t,new it(n.$anchor,a))}else if(n.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let i=Kh(t.state,e);return i&&i instanceof He?Lo(t,i):!1}else if(!(Pn&&r.indexOf("m")>-1)){let i=n.$head,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,a;if(!o||o.isText)return!1;let s=e<0?i.pos-o.nodeSize:i.pos;return o.isAtom||(a=t.docView.descAt(s))&&!a.contentDOM?He.isSelectable(o)?Lo(t,new He(e<0?t.state.doc.resolve(i.pos-o.nodeSize):i)):ru?Lo(t,new it(t.state.doc.resolve(e<0?s:s+o.nodeSize))):!1:!1}}else return!1;else{if(n instanceof He&&n.node.isInline)return Lo(t,new it(e>0?n.$to:n.$from));{let i=Kh(t.state,e);return i?Lo(t,i):!1}}}function rf(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function au(t,e){let r=t.pmViewDesc;return r&&r.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function As(t,e){return e<0?mH(t):gH(t)}function mH(t){let e=t.domSelectionRange(),r=e.focusNode,n=e.focusOffset;if(!r)return;let i,o,a=!1;for(Rn&&r.nodeType==1&&n<rf(r)&&au(r.childNodes[n],-1)&&(a=!0);;)if(n>0){if(r.nodeType!=1)break;{let s=r.childNodes[n-1];if(au(s,-1))i=r,o=--n;else if(s.nodeType==3)r=s,n=r.nodeValue.length;else break}}else{if(xE(r))break;{let s=r.previousSibling;for(;s&&au(s,-1);)i=r.parentNode,o=pr(s),s=s.previousSibling;if(s)r=s,n=rf(r);else{if(r=r.parentNode,r==t.dom)break;n=0}}}a?Yh(t,r,n):i&&Yh(t,i,o)}function gH(t){let e=t.domSelectionRange(),r=e.focusNode,n=e.focusOffset;if(!r)return;let i=rf(r),o,a;for(;;)if(n<i){if(r.nodeType!=1)break;let s=r.childNodes[n];if(au(s,1))o=r,a=++n;else break}else{if(xE(r))break;{let s=r.nextSibling;for(;s&&au(s,1);)o=s.parentNode,a=pr(s)+1,s=s.nextSibling;if(s)r=s,n=0,i=rf(r);else{if(r=r.parentNode,r==t.dom)break;n=i=0}}}o&&Yh(t,o,a)}function xE(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function yH(t,e){for(;t&&e==t.childNodes.length&&!tu(t);)e=pr(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let r=t.childNodes[e];if(r.nodeType==3)return r;if(r.nodeType==1&&r.contentEditable=="false")break;t=r,e=0}}function bH(t,e){for(;t&&!e&&!tu(t);)e=pr(t),t=t.parentNode;for(;t&&e;){let r=t.childNodes[e-1];if(r.nodeType==3)return r;if(r.nodeType==1&&r.contentEditable=="false")break;t=r,e=t.childNodes.length}}function Yh(t,e,r){if(e.nodeType!=3){let o,a;(a=yH(e,r))?(e=a,r=0):(o=bH(e,r))&&(e=o,r=o.nodeValue.length)}let n=t.domSelection();if(!n)return;if(Qc(n)){let o=document.createRange();o.setEnd(e,r),o.setStart(e,r),n.removeAllRanges(),n.addRange(o)}else n.extend&&n.extend(e,r);t.domObserver.setCurSelection();let{state:i}=t;setTimeout(()=>{t.state==i&&Vi(t)},50)}function CE(t,e){let r=t.state.doc.resolve(e);if(!(tr||G1)&&r.parent.inlineContent){let i=t.coordsAtPos(e);if(e>r.start()){let o=t.coordsAtPos(e-1),a=(o.top+o.bottom)/2;if(a>i.top&&a<i.bottom&&Math.abs(o.left-i.left)>1)return o.left<i.left?"ltr":"rtl"}if(e<r.end()){let o=t.coordsAtPos(e+1),a=(o.top+o.bottom)/2;if(a>i.top&&a<i.bottom&&Math.abs(o.left-i.left)>1)return o.left>i.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function kE(t,e,r){let n=t.state.selection;if(n instanceof it&&!n.empty||r.indexOf("s")>-1||Pn&&r.indexOf("m")>-1)return!1;let{$from:i,$to:o}=n;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let a=Kh(t.state,e);if(a&&a instanceof He)return Lo(t,a)}if(!i.parent.inlineContent){let a=e<0?i:o,s=n instanceof Hr?rt.near(a,e):rt.findFrom(a,e);return s?Lo(t,s):!1}return!1}function TE(t,e){if(!(t.state.selection instanceof it))return!0;let{$head:r,$anchor:n,empty:i}=t.state.selection;if(!r.sameParent(n))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!r.textOffset&&(e<0?r.nodeBefore:r.nodeAfter);if(o&&!o.isText){let a=t.state.tr;return e<0?a.delete(r.pos-o.nodeSize,r.pos):a.delete(r.pos,r.pos+o.nodeSize),t.dispatch(a),!0}return!1}function SE(t,e,r){t.domObserver.stop(),e.contentEditable=r,t.domObserver.start()}function wH(t){if(!Ar||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:r}=t.domSelectionRange();if(e&&e.nodeType==1&&r==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let n=e.firstChild;SE(t,n,"true"),setTimeout(()=>SE(t,n,"false"),20)}return!1}function EH(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function xH(t,e){let r=e.keyCode,n=EH(e);if(r==8||Pn&&r==72&&n=="c")return TE(t,-1)||As(t,-1);if(r==46&&!e.shiftKey||Pn&&r==68&&n=="c")return TE(t,1)||As(t,1);if(r==13||r==27)return!0;if(r==37||Pn&&r==66&&n=="c"){let i=r==37?CE(t,t.state.selection.from)=="ltr"?-1:1:-1;return EE(t,i,n)||As(t,i)}else if(r==39||Pn&&r==70&&n=="c"){let i=r==39?CE(t,t.state.selection.from)=="ltr"?1:-1:1;return EE(t,i,n)||As(t,i)}else{if(r==38||Pn&&r==80&&n=="c")return kE(t,-1,n)||As(t,-1);if(r==40||Pn&&r==78&&n=="c")return wH(t)||kE(t,1,n)||As(t,1);if(n==(Pn?"m":"c")&&(r==66||r==73||r==89||r==90))return!0}return!1}function Xh(t,e){t.someProp("transformCopied",m=>{e=m(e,t)});let r=[],{content:n,openStart:i,openEnd:o}=e;for(;i>1&&o>1&&n.childCount==1&&n.firstChild.childCount==1;){i--,o--;let m=n.firstChild;r.push(m.type.name,m.attrs!=m.type.defaultAttrs?m.attrs:null),n=m.content}let a=t.someProp("clipboardSerializer")||Es.fromSchema(t.state.schema),s=IE(),u=s.createElement("div");u.appendChild(a.serializeFragment(n,{document:s}));let f=u.firstChild,d,p=0;for(;f&&f.nodeType==1&&(d=LE[f.nodeName.toLowerCase()]);){for(let m=d.length-1;m>=0;m--){let g=s.createElement(d[m]);for(;u.firstChild;)g.appendChild(u.firstChild);u.appendChild(g),p++}f=u.firstChild}f&&f.nodeType==1&&f.setAttribute("data-pm-slice",`${i} ${o}${p?` -${p}`:""} ${JSON.stringify(r)}`);let v=t.someProp("clipboardTextSerializer",m=>m(e,t))||e.content.textBetween(0,e.content.size,`
|
|
102
|
+
|
|
103
|
+
`);return{dom:u,text:v,slice:e}}function _E(t,e,r,n,i){let o=i.parent.type.spec.code,a,s;if(!r&&!e)return null;let u=!!e&&(n||o||!r);if(u){if(t.someProp("transformPastedText",v=>{e=v(e,o||n,t)}),o)return s=new ge(oe.from(t.state.schema.text(e.replace(/\r\n?/g,`
|
|
104
|
+
`))),0,0),t.someProp("transformPasted",v=>{s=v(s,t,!0)}),s;let p=t.someProp("clipboardTextParser",v=>v(e,i,n,t));if(p)s=p;else{let v=i.marks(),{schema:m}=t.state,g=Es.fromSchema(m);a=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(E=>{let w=a.appendChild(document.createElement("p"));E&&w.appendChild(g.serializeNode(m.text(E,v)))})}}else t.someProp("transformPastedHTML",p=>{r=p(r,t)}),a=SH(r),ru&&_H(a);let f=a&&a.querySelector("[data-pm-slice]"),d=f&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(f.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let p=+d[3];p>0;p--){let v=a.firstChild;for(;v&&v.nodeType!=1;)v=v.nextSibling;if(!v)break;a=v}if(s||(s=(t.someProp("clipboardParser")||t.someProp("domParser")||jc.fromSchema(t.state.schema)).parseSlice(a,{preserveWhitespace:!!(u||d),context:i,ruleFromNode(v){return v.nodeName=="BR"&&!v.nextSibling&&v.parentNode&&!CH.test(v.parentNode.nodeName)?{ignore:!0}:null}})),d)s=OH(NE(s,+d[1],+d[2]),d[4]);else if(s=ge.maxOpen(kH(s.content,i),!0),s.openStart||s.openEnd){let p=0,v=0;for(let m=s.content.firstChild;p<s.openStart&&!m.type.spec.isolating;p++,m=m.firstChild);for(let m=s.content.lastChild;v<s.openEnd&&!m.type.spec.isolating;v++,m=m.lastChild);s=NE(s,p,v)}return t.someProp("transformPasted",p=>{s=p(s,t,u)}),s}const CH=/^(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 kH(t,e){if(t.childCount<2)return t;for(let r=e.depth;r>=0;r--){let i=e.node(r).contentMatchAt(e.index(r)),o,a=[];if(t.forEach(s=>{if(!a)return;let u=i.findWrapping(s.type),f;if(!u)return a=null;if(f=a.length&&o.length&&AE(u,o,s,a[a.length-1],0))a[a.length-1]=f;else{a.length&&(a[a.length-1]=ME(a[a.length-1],o.length));let d=OE(s,u);a.push(d),i=i.matchType(d.type),o=u}}),a)return oe.from(a)}return t}function OE(t,e,r=0){for(let n=e.length-1;n>=r;n--)t=e[n].create(null,oe.from(t));return t}function AE(t,e,r,n,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let o=AE(t,e,r,n.lastChild,i+1);if(o)return n.copy(n.content.replaceChild(n.childCount-1,o));if(n.contentMatchAt(n.childCount).matchType(i==t.length-1?r.type:t[i+1]))return n.copy(n.content.append(oe.from(OE(r,t,i+1))))}}function ME(t,e){if(e==0)return t;let r=t.content.replaceChild(t.childCount-1,ME(t.lastChild,e-1)),n=t.contentMatchAt(t.childCount).fillBefore(oe.empty,!0);return t.copy(r.append(n))}function Jh(t,e,r,n,i,o){let a=e<0?t.firstChild:t.lastChild,s=a.content;return t.childCount>1&&(o=0),i<n-1&&(s=Jh(s,e,r,n,i+1,o)),i>=r&&(s=e<0?a.contentMatchAt(0).fillBefore(s,o<=i).append(s):s.append(a.contentMatchAt(a.childCount).fillBefore(oe.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,a.copy(s))}function NE(t,e,r){return e<t.openStart&&(t=new ge(Jh(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),r<t.openEnd&&(t=new ge(Jh(t.content,1,r,t.openEnd,0,0),t.openStart,r)),t}const LE={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 DE=null;function IE(){return DE||(DE=document.implementation.createHTMLDocument("title"))}let Zh=null;function TH(t){let e=window.trustedTypes;return e?(Zh||(Zh=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:r=>r})),Zh.createHTML(t)):t}function SH(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let r=IE().createElement("div"),n=/<([a-z][^>\s]+)/i.exec(t),i;if((i=n&&LE[n[1].toLowerCase()])&&(t=i.map(o=>"<"+o+">").join("")+t+i.map(o=>"</"+o+">").reverse().join("")),r.innerHTML=TH(t),i)for(let o=0;o<i.length;o++)r=r.querySelector(i[o])||r;return r}function _H(t){let e=t.querySelectorAll(tr?"span:not([class]):not([style])":"span.Apple-converted-space");for(let r=0;r<e.length;r++){let n=e[r];n.childNodes.length==1&&n.textContent==" "&&n.parentNode&&n.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),n)}}function OH(t,e){if(!t.size)return t;let r=t.content.firstChild.type.schema,n;try{n=JSON.parse(e)}catch{return t}let{content:i,openStart:o,openEnd:a}=t;for(let s=n.length-2;s>=0;s-=2){let u=r.nodes[n[s]];if(!u||u.hasRequiredAttrs())break;i=oe.from(u.create(n[s+1],i)),o++,a++}return new ge(i,o,a)}const Ur={},zr={},AH={touchstart:!0,touchmove:!0};class MH{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=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 NH(t){for(let e in Ur){let r=Ur[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=n=>{DH(t,n)&&!ev(t,n)&&(t.editable||!(n.type in zr))&&r(t,n)},AH[e]?{passive:!0}:void 0)}Ar&&t.dom.addEventListener("input",()=>null),Qh(t)}function Do(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function LH(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function Qh(t){t.someProp("handleDOMEvents",e=>{for(let r in e)t.input.eventHandlers[r]||t.dom.addEventListener(r,t.input.eventHandlers[r]=n=>ev(t,n))})}function ev(t,e){return t.someProp("handleDOMEvents",r=>{let n=r[e.type];return n?n(t,e)||e.defaultPrevented:!1})}function DH(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let r=e.target;r!=t.dom;r=r.parentNode)if(!r||r.nodeType==11||r.pmViewDesc&&r.pmViewDesc.stopEvent(e))return!1;return!0}function IH(t,e){!ev(t,e)&&Ur[e.type]&&(t.editable||!(e.type in zr))&&Ur[e.type](t,e)}zr.keydown=(t,e)=>{let r=e;if(t.input.shiftKey=r.keyCode==16||r.shiftKey,!PE(t,r)&&(t.input.lastKeyCode=r.keyCode,t.input.lastKeyCodeTime=Date.now(),!(zi&&tr&&r.keyCode==13)))if(r.keyCode!=229&&t.domObserver.forceFlush(),_s&&r.keyCode==13&&!r.ctrlKey&&!r.altKey&&!r.metaKey){let n=Date.now();t.input.lastIOSEnter=n,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==n&&(t.someProp("handleKeyDown",i=>i(t,Ca(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",n=>n(t,r))||xH(t,r)?r.preventDefault():Do(t,"key")},zr.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)},zr.keypress=(t,e)=>{let r=e;if(PE(t,r)||!r.charCode||r.ctrlKey&&!r.altKey||Pn&&r.metaKey)return;if(t.someProp("handleKeyPress",i=>i(t,r))){r.preventDefault();return}let n=t.state.selection;if(!(n instanceof it)||!n.$from.sameParent(n.$to)){let i=String.fromCharCode(r.charCode),o=()=>t.state.tr.insertText(i).scrollIntoView();!/[\r\n]/.test(i)&&!t.someProp("handleTextInput",a=>a(t,n.$from.pos,n.$to.pos,i,o))&&t.dispatch(o()),r.preventDefault()}};function nf(t){return{left:t.clientX,top:t.clientY}}function RH(t,e){let r=e.x-t.clientX,n=e.y-t.clientY;return r*r+n*n<100}function tv(t,e,r,n,i){if(n==-1)return!1;let o=t.state.doc.resolve(n);for(let a=o.depth+1;a>0;a--)if(t.someProp(e,s=>a>o.depth?s(t,r,o.nodeAfter,o.before(a),i,!0):s(t,r,o.node(a),o.before(a),i,!1)))return!0;return!1}function Ms(t,e,r){if(t.focused||t.focus(),t.state.selection.eq(e))return;let n=t.state.tr.setSelection(e);n.setMeta("pointer",!0),t.dispatch(n)}function PH(t,e){if(e==-1)return!1;let r=t.state.doc.resolve(e),n=r.nodeAfter;return n&&n.isAtom&&He.isSelectable(n)?(Ms(t,new He(r)),!0):!1}function BH(t,e){if(e==-1)return!1;let r=t.state.selection,n,i;r instanceof He&&(n=r.node);let o=t.state.doc.resolve(e);for(let a=o.depth+1;a>0;a--){let s=a>o.depth?o.nodeAfter:o.node(a);if(He.isSelectable(s)){n&&r.$from.depth>0&&a>=r.$from.depth&&o.before(r.$from.depth+1)==r.$from.pos?i=o.before(r.$from.depth):i=o.before(a);break}}return i!=null?(Ms(t,He.create(t.state.doc,i)),!0):!1}function $H(t,e,r,n,i){return tv(t,"handleClickOn",e,r,n)||t.someProp("handleClick",o=>o(t,e,n))||(i?BH(t,r):PH(t,r))}function FH(t,e,r,n){return tv(t,"handleDoubleClickOn",e,r,n)||t.someProp("handleDoubleClick",i=>i(t,e,n))}function HH(t,e,r,n){return tv(t,"handleTripleClickOn",e,r,n)||t.someProp("handleTripleClick",i=>i(t,e,n))||UH(t,r,n)}function UH(t,e,r){if(r.button!=0)return!1;let n=t.state.doc;if(e==-1)return n.inlineContent?(Ms(t,it.create(n,0,n.content.size)),!0):!1;let i=n.resolve(e);for(let o=i.depth+1;o>0;o--){let a=o>i.depth?i.nodeAfter:i.node(o),s=i.before(o);if(a.inlineContent)Ms(t,it.create(n,s+1,s+1+a.content.size));else if(He.isSelectable(a))Ms(t,He.create(n,s));else continue;return!0}}function rv(t){return of(t)}const RE=Pn?"metaKey":"ctrlKey";Ur.mousedown=(t,e)=>{let r=e;t.input.shiftKey=r.shiftKey;let n=rv(t),i=Date.now(),o="singleClick";i-t.input.lastClick.time<500&&RH(r,t.input.lastClick)&&!r[RE]&&t.input.lastClick.button==r.button&&(t.input.lastClick.type=="singleClick"?o="doubleClick":t.input.lastClick.type=="doubleClick"&&(o="tripleClick")),t.input.lastClick={time:i,x:r.clientX,y:r.clientY,type:o,button:r.button};let a=t.posAtCoords(nf(r));a&&(o=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new zH(t,a,r,!!n)):(o=="doubleClick"?FH:HH)(t,a.pos,a.inside,r)?r.preventDefault():Do(t,"pointer"))};class zH{constructor(e,r,n,i){this.view=e,this.pos=r,this.event=n,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[RE],this.allowDefault=n.shiftKey;let o,a;if(r.inside>-1)o=e.state.doc.nodeAt(r.inside),a=r.inside;else{let d=e.state.doc.resolve(r.pos);o=d.parent,a=d.depth?d.before():0}const s=i?null:n.target,u=s?e.docView.nearestDesc(s,!0):null;this.target=u&&u.nodeDOM.nodeType==1?u.nodeDOM:null;let{selection:f}=e.state;(n.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||f instanceof He&&f.from<=a&&f.to>a)&&(this.mightDrag={node:o,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Rn&&!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)),Do(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(()=>Vi(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let r=this.pos;this.view.state.doc!=this.startDoc&&(r=this.view.posAtCoords(nf(e))),this.updateAllowDefault(e),this.allowDefault||!r?Do(this.view,"pointer"):$H(this.view,r.pos,r.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Ar&&this.mightDrag&&!this.mightDrag.node.isAtom||tr&&!this.view.state.selection.visible&&Math.min(Math.abs(r.pos-this.view.state.selection.from),Math.abs(r.pos-this.view.state.selection.to))<=2)?(Ms(this.view,rt.near(this.view.state.doc.resolve(r.pos))),e.preventDefault()):Do(this.view,"pointer")}move(e){this.updateAllowDefault(e),Do(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)}}Ur.touchstart=t=>{t.input.lastTouch=Date.now(),rv(t),Do(t,"pointer")},Ur.touchmove=t=>{t.input.lastTouch=Date.now(),Do(t,"pointer")},Ur.contextmenu=t=>rv(t);function PE(t,e){return t.composing?!0:Ar&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const qH=zi?5e3:-1;zr.compositionstart=zr.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,r=e.selection.$to;if(e.selection instanceof it&&(e.storedMarks||!r.textOffset&&r.parentOffset&&r.nodeBefore.marks.some(n=>n.type.spec.inclusive===!1)||tr&&G1&&VH(t)))t.markCursor=t.state.storedMarks||r.marks(),of(t,!0),t.markCursor=null;else if(of(t,!e.selection.empty),Rn&&e.selection.empty&&r.parentOffset&&!r.textOffset&&r.nodeBefore.marks.length){let n=t.domSelectionRange();for(let i=n.focusNode,o=n.focusOffset;i&&i.nodeType==1&&o!=0;){let a=o<0?i.lastChild:i.childNodes[o-1];if(!a)break;if(a.nodeType==3){let s=t.domSelection();s&&s.collapse(a,a.nodeValue.length);break}else i=a,o=-1}}t.input.composing=!0}BE(t,qH)};function VH(t){let{focusNode:e,focusOffset:r}=t.domSelectionRange();if(!e||e.nodeType!=1||r>=e.childNodes.length)return!1;let n=e.childNodes[r];return n.nodeType==1&&n.contentEditable=="false"}zr.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,BE(t,20))};function BE(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>of(t),e))}function $E(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=jH());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function WH(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let r=B3(e.focusNode,e.focusOffset),n=$3(e.focusNode,e.focusOffset);if(r&&n&&r!=n){let i=n.pmViewDesc,o=t.domObserver.lastChangedTextNode;if(r==o||n==o)return o;if(!i||!i.isText(n.nodeValue))return n;if(t.input.compositionNode==n){let a=r.pmViewDesc;if(!(!a||!a.isText(r.nodeValue)))return n}}return r||n}function jH(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function of(t,e=!1){if(!(zi&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),$E(t),e||t.docView&&t.docView.dirty){let r=Wh(t),n=t.state.selection;return r&&!r.eq(n)?t.dispatch(t.state.tr.setSelection(r)):(t.markCursor||e)&&!n.$from.node(n.$from.sharedDepth(n.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function GH(t,e){if(!t.dom.parentNode)return;let r=t.dom.parentNode.appendChild(document.createElement("div"));r.appendChild(e),r.style.cssText="position: fixed; left: -10000px; top: 10px";let n=getSelection(),i=document.createRange();i.selectNodeContents(e),t.dom.blur(),n.removeAllRanges(),n.addRange(i),setTimeout(()=>{r.parentNode&&r.parentNode.removeChild(r),t.focus()},50)}const su=nn&&Ao<15||_s&&z3<604;Ur.copy=zr.cut=(t,e)=>{let r=e,n=t.state.selection,i=r.type=="cut";if(n.empty)return;let o=su?null:r.clipboardData,a=n.content(),{dom:s,text:u}=Xh(t,a);o?(r.preventDefault(),o.clearData(),o.setData("text/html",s.innerHTML),o.setData("text/plain",u)):GH(t,s),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function KH(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function YH(t,e){if(!t.dom.parentNode)return;let r=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,n=t.dom.parentNode.appendChild(document.createElement(r?"textarea":"div"));r||(n.contentEditable="true"),n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus();let i=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),n.parentNode&&n.parentNode.removeChild(n),r?lu(t,n.value,null,i,e):lu(t,n.textContent,n.innerHTML,i,e)},50)}function lu(t,e,r,n,i){let o=_E(t,e,r,n,t.state.selection.$from);if(t.someProp("handlePaste",u=>u(t,i,o||ge.empty)))return!0;if(!o)return!1;let a=KH(o),s=a?t.state.tr.replaceSelectionWith(a,n):t.state.tr.replaceSelection(o);return t.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function FE(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let r=t.getData("text/uri-list");return r?r.replace(/\r?\n/g," "):""}zr.paste=(t,e)=>{let r=e;if(t.composing&&!zi)return;let n=su?null:r.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;n&&lu(t,FE(n),n.getData("text/html"),i,r)?r.preventDefault():YH(t,r)};class HE{constructor(e,r,n){this.slice=e,this.move=r,this.node=n}}const XH=Pn?"altKey":"ctrlKey";function UE(t,e){let r=t.someProp("dragCopies",n=>!n(e));return r??!e[XH]}Ur.dragstart=(t,e)=>{let r=e,n=t.input.mouseDown;if(n&&n.done(),!r.dataTransfer)return;let i=t.state.selection,o=i.empty?null:t.posAtCoords(nf(r)),a;if(!(o&&o.pos>=i.from&&o.pos<=(i instanceof He?i.to-1:i.to))){if(n&&n.mightDrag)a=He.create(t.state.doc,n.mightDrag.pos);else if(r.target&&r.target.nodeType==1){let p=t.docView.nearestDesc(r.target,!0);p&&p.node.type.spec.draggable&&p!=t.docView&&(a=He.create(t.state.doc,p.posBefore))}}let s=(a||t.state.selection).content(),{dom:u,text:f,slice:d}=Xh(t,s);(!r.dataTransfer.files.length||!tr||j1>120)&&r.dataTransfer.clearData(),r.dataTransfer.setData(su?"Text":"text/html",u.innerHTML),r.dataTransfer.effectAllowed="copyMove",su||r.dataTransfer.setData("text/plain",f),t.dragging=new HE(d,UE(t,r),a)},Ur.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)},zr.dragover=zr.dragenter=(t,e)=>e.preventDefault(),zr.drop=(t,e)=>{try{JH(t,e,t.dragging)}finally{t.dragging=null}};function JH(t,e,r){if(!e.dataTransfer)return;let n=t.posAtCoords(nf(e));if(!n)return;let i=t.state.doc.resolve(n.pos),o=r&&r.slice;o?t.someProp("transformPasted",m=>{o=m(o,t,!1)}):o=_E(t,FE(e.dataTransfer),su?null:e.dataTransfer.getData("text/html"),!1,i);let a=!!(r&&UE(t,e));if(t.someProp("handleDrop",m=>m(t,e,o||ge.empty,a))){e.preventDefault();return}if(!o)return;e.preventDefault();let s=o?k3(t.state.doc,i.pos,o):i.pos;s==null&&(s=i.pos);let u=t.state.tr;if(a){let{node:m}=r;m?m.replace(u):u.deleteSelection()}let f=u.mapping.map(s),d=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,p=u.doc;if(d?u.replaceRangeWith(f,f,o.content.firstChild):u.replaceRange(f,f,o),u.doc.eq(p))return;let v=u.doc.resolve(f);if(d&&He.isSelectable(o.content.firstChild)&&v.nodeAfter&&v.nodeAfter.sameMarkup(o.content.firstChild))u.setSelection(new He(v));else{let m=u.mapping.map(s);u.mapping.maps[u.mapping.maps.length-1].forEach((g,E,w,x)=>m=x),u.setSelection(Gh(t,v,u.doc.resolve(m)))}t.focus(),t.dispatch(u.setMeta("uiEvent","drop"))}Ur.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&Vi(t)},20))},Ur.blur=(t,e)=>{let r=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),r.relatedTarget&&t.dom.contains(r.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)},Ur.beforeinput=(t,e)=>{if(tr&&zi&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:n}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=n||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",o=>o(t,Ca(8,"Backspace")))))return;let{$cursor:i}=t.state.selection;i&&i.pos>0&&t.dispatch(t.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let t in zr)Ur[t]=zr[t];function uu(t,e){if(t==e)return!0;for(let r in t)if(t[r]!==e[r])return!1;for(let r in e)if(!(r in t))return!1;return!0}class af{constructor(e,r){this.toDOM=e,this.spec=r||_a,this.side=this.spec.side||0}map(e,r,n,i){let{pos:o,deleted:a}=e.mapResult(r.from+i,this.side<0?-1:1);return a?null:new on(o-n,o-n,this)}valid(){return!0}eq(e){return this==e||e instanceof af&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&uu(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Io{constructor(e,r){this.attrs=e,this.spec=r||_a}map(e,r,n,i){let o=e.map(r.from+i,this.spec.inclusiveStart?-1:1)-n,a=e.map(r.to+i,this.spec.inclusiveEnd?1:-1)-n;return o>=a?null:new on(o,a,this)}valid(e,r){return r.from<r.to}eq(e){return this==e||e instanceof Io&&uu(this.attrs,e.attrs)&&uu(this.spec,e.spec)}static is(e){return e.type instanceof Io}destroy(){}}class nv{constructor(e,r){this.attrs=e,this.spec=r||_a}map(e,r,n,i){let o=e.mapResult(r.from+i,1);if(o.deleted)return null;let a=e.mapResult(r.to+i,-1);return a.deleted||a.pos<=o.pos?null:new on(o.pos-n,a.pos-n,this)}valid(e,r){let{index:n,offset:i}=e.content.findIndex(r.from),o;return i==r.from&&!(o=e.child(n)).isText&&i+o.nodeSize==r.to}eq(e){return this==e||e instanceof nv&&uu(this.attrs,e.attrs)&&uu(this.spec,e.spec)}destroy(){}}class on{constructor(e,r,n){this.from=e,this.to=r,this.type=n}copy(e,r){return new on(e,r,this.type)}eq(e,r=0){return this.type.eq(e.type)&&this.from+r==e.from&&this.to+r==e.to}map(e,r,n){return this.type.map(e,this,r,n)}static widget(e,r,n){return new on(e,e,new af(r,n))}static inline(e,r,n,i){return new on(e,r,new Io(n,i))}static node(e,r,n,i){return new on(e,r,new nv(n,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Io}get widget(){return this.type instanceof af}}const Ns=[],_a={};class Rt{constructor(e,r){this.local=e.length?e:Ns,this.children=r.length?r:Ns}static create(e,r){return r.length?sf(r,e,0,_a):Mr}find(e,r,n){let i=[];return this.findInner(e??0,r??1e9,i,0,n),i}findInner(e,r,n,i,o){for(let a=0;a<this.local.length;a++){let s=this.local[a];s.from<=r&&s.to>=e&&(!o||o(s.spec))&&n.push(s.copy(s.from+i,s.to+i))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<r&&this.children[a+1]>e){let s=this.children[a]+1;this.children[a+2].findInner(e-s,r-s,n,i+s,o)}}map(e,r,n){return this==Mr||e.maps.length==0?this:this.mapInner(e,r,0,0,n||_a)}mapInner(e,r,n,i,o){let a;for(let s=0;s<this.local.length;s++){let u=this.local[s].map(e,n,i);u&&u.type.valid(r,u)?(a||(a=[])).push(u):o.onRemove&&o.onRemove(this.local[s].spec)}return this.children.length?ZH(this.children,a||[],e,r,n,i,o):a?new Rt(a.sort(Oa),Ns):Mr}add(e,r){return r.length?this==Mr?Rt.create(e,r):this.addInner(e,r,0):this}addInner(e,r,n){let i,o=0;e.forEach((s,u)=>{let f=u+n,d;if(d=qE(r,s,f)){for(i||(i=this.children.slice());o<i.length&&i[o]<u;)o+=3;i[o]==u?i[o+2]=i[o+2].addInner(s,d,f+1):i.splice(o,0,u,u+s.nodeSize,sf(d,s,f+1,_a)),o+=3}});let a=zE(o?VE(r):r,-n);for(let s=0;s<a.length;s++)a[s].type.valid(e,a[s])||a.splice(s--,1);return new Rt(a.length?this.local.concat(a).sort(Oa):this.local,i||this.children)}remove(e){return e.length==0||this==Mr?this:this.removeInner(e,0)}removeInner(e,r){let n=this.children,i=this.local;for(let o=0;o<n.length;o+=3){let a,s=n[o]+r,u=n[o+1]+r;for(let d=0,p;d<e.length;d++)(p=e[d])&&p.from>s&&p.to<u&&(e[d]=null,(a||(a=[])).push(p));if(!a)continue;n==this.children&&(n=this.children.slice());let f=n[o+2].removeInner(a,s+1);f!=Mr?n[o+2]=f:(n.splice(o,3),o-=3)}if(i.length){for(let o=0,a;o<e.length;o++)if(a=e[o])for(let s=0;s<i.length;s++)i[s].eq(a,r)&&(i==this.local&&(i=this.local.slice()),i.splice(s--,1))}return n==this.children&&i==this.local?this:i.length||n.length?new Rt(i,n):Mr}forChild(e,r){if(this==Mr)return this;if(r.isLeaf)return Rt.empty;let n,i;for(let s=0;s<this.children.length;s+=3)if(this.children[s]>=e){this.children[s]==e&&(n=this.children[s+2]);break}let o=e+1,a=o+r.content.size;for(let s=0;s<this.local.length;s++){let u=this.local[s];if(u.from<a&&u.to>o&&u.type instanceof Io){let f=Math.max(o,u.from)-o,d=Math.min(a,u.to)-o;f<d&&(i||(i=[])).push(u.copy(f,d))}}if(i){let s=new Rt(i.sort(Oa),Ns);return n?new Ro([s,n]):s}return n||Mr}eq(e){if(this==e)return!0;if(!(e instanceof Rt)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let r=0;r<this.local.length;r++)if(!this.local[r].eq(e.local[r]))return!1;for(let r=0;r<this.children.length;r+=3)if(this.children[r]!=e.children[r]||this.children[r+1]!=e.children[r+1]||!this.children[r+2].eq(e.children[r+2]))return!1;return!0}locals(e){return iv(this.localsInner(e))}localsInner(e){if(this==Mr)return Ns;if(e.inlineContent||!this.local.some(Io.is))return this.local;let r=[];for(let n=0;n<this.local.length;n++)this.local[n].type instanceof Io||r.push(this.local[n]);return r}forEachSet(e){e(this)}}Rt.empty=new Rt([],[]),Rt.removeOverlap=iv;const Mr=Rt.empty;class Ro{constructor(e){this.members=e}map(e,r){const n=this.members.map(i=>i.map(e,r,_a));return Ro.from(n)}forChild(e,r){if(r.isLeaf)return Rt.empty;let n=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(e,r);o!=Mr&&(o instanceof Ro?n=n.concat(o.members):n.push(o))}return Ro.from(n)}eq(e){if(!(e instanceof Ro)||e.members.length!=this.members.length)return!1;for(let r=0;r<this.members.length;r++)if(!this.members[r].eq(e.members[r]))return!1;return!0}locals(e){let r,n=!0;for(let i=0;i<this.members.length;i++){let o=this.members[i].localsInner(e);if(o.length)if(!r)r=o;else{n&&(r=r.slice(),n=!1);for(let a=0;a<o.length;a++)r.push(o[a])}}return r?iv(n?r:r.sort(Oa)):Ns}static from(e){switch(e.length){case 0:return Mr;case 1:return e[0];default:return new Ro(e.every(r=>r instanceof Rt)?e:e.reduce((r,n)=>r.concat(n instanceof Rt?n:n.members),[]))}}forEachSet(e){for(let r=0;r<this.members.length;r++)this.members[r].forEachSet(e)}}function ZH(t,e,r,n,i,o,a){let s=t.slice();for(let f=0,d=o;f<r.maps.length;f++){let p=0;r.maps[f].forEach((v,m,g,E)=>{let w=E-g-(m-v);for(let x=0;x<s.length;x+=3){let k=s[x+1];if(k<0||v>k+d-p)continue;let _=s[x]+d-p;m>=_?s[x+1]=v<=_?-2:-1:v>=d&&w&&(s[x]+=w,s[x+1]+=w)}p+=w}),d=r.maps[f].map(d,-1)}let u=!1;for(let f=0;f<s.length;f+=3)if(s[f+1]<0){if(s[f+1]==-2){u=!0,s[f+1]=-1;continue}let d=r.map(t[f]+o),p=d-i;if(p<0||p>=n.content.size){u=!0;continue}let v=r.map(t[f+1]+o,-1),m=v-i,{index:g,offset:E}=n.content.findIndex(p),w=n.maybeChild(g);if(w&&E==p&&E+w.nodeSize==m){let x=s[f+2].mapInner(r,w,d+1,t[f]+o+1,a);x!=Mr?(s[f]=p,s[f+1]=m,s[f+2]=x):(s[f+1]=-2,u=!0)}else u=!0}if(u){let f=QH(s,t,e,r,i,o,a),d=sf(f,n,0,a);e=d.local;for(let p=0;p<s.length;p+=3)s[p+1]<0&&(s.splice(p,3),p-=3);for(let p=0,v=0;p<d.children.length;p+=3){let m=d.children[p];for(;v<s.length&&s[v]<m;)v+=3;s.splice(v,0,d.children[p],d.children[p+1],d.children[p+2])}}return new Rt(e.sort(Oa),s)}function zE(t,e){if(!e||!t.length)return t;let r=[];for(let n=0;n<t.length;n++){let i=t[n];r.push(new on(i.from+e,i.to+e,i.type))}return r}function QH(t,e,r,n,i,o,a){function s(u,f){for(let d=0;d<u.local.length;d++){let p=u.local[d].map(n,i,f);p?r.push(p):a.onRemove&&a.onRemove(u.local[d].spec)}for(let d=0;d<u.children.length;d+=3)s(u.children[d+2],u.children[d]+f+1)}for(let u=0;u<t.length;u+=3)t[u+1]==-1&&s(t[u+2],e[u]+o+1);return r}function qE(t,e,r){if(e.isLeaf)return null;let n=r+e.nodeSize,i=null;for(let o=0,a;o<t.length;o++)(a=t[o])&&a.from>r&&a.to<n&&((i||(i=[])).push(a),t[o]=null);return i}function VE(t){let e=[];for(let r=0;r<t.length;r++)t[r]!=null&&e.push(t[r]);return e}function sf(t,e,r,n){let i=[],o=!1;e.forEach((s,u)=>{let f=qE(t,s,u+r);if(f){o=!0;let d=sf(f,s,r+u+1,n);d!=Mr&&i.push(u,u+s.nodeSize,d)}});let a=zE(o?VE(t):t,-r).sort(Oa);for(let s=0;s<a.length;s++)a[s].type.valid(e,a[s])||(n.onRemove&&n.onRemove(a[s].spec),a.splice(s--,1));return a.length||i.length?new Rt(a,i):Mr}function Oa(t,e){return t.from-e.from||t.to-e.to}function iv(t){let e=t;for(let r=0;r<e.length-1;r++){let n=e[r];if(n.from!=n.to)for(let i=r+1;i<e.length;i++){let o=e[i];if(o.from==n.from){o.to!=n.to&&(e==t&&(e=t.slice()),e[i]=o.copy(o.from,n.to),WE(e,i+1,o.copy(n.to,o.to)));continue}else{o.from<n.to&&(e==t&&(e=t.slice()),e[r]=n.copy(n.from,o.from),WE(e,i,n.copy(o.from,n.to)));break}}}return e}function WE(t,e,r){for(;e<t.length&&Oa(r,t[e])>0;)e++;t.splice(e,0,r)}function ov(t){let e=[];return t.someProp("decorations",r=>{let n=r(t.state);n&&n!=Mr&&e.push(n)}),t.cursorWrapper&&e.push(Rt.create(t.state.doc,[t.cursorWrapper.deco])),Ro.from(e)}const eU={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},tU=nn&&Ao<=11;class rU{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 nU{constructor(e,r){this.view=e,this.handleDOMChange=r,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new rU,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(n=>{for(let i=0;i<n.length;i++)this.queue.push(n[i]);nn&&Ao<=11&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),tU&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.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,eU)),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 r=0;r<e.length;r++)this.queue.push(e[r]);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(bE(this.view)){if(this.suppressingSelectionUpdates)return Vi(this.view);if(nn&&Ao<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&xa(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 r=new Set,n;for(let o=e.focusNode;o;o=Ss(o))r.add(o);for(let o=e.anchorNode;o;o=Ss(o))if(r.has(o)){n=o;break}let i=n&&this.view.docView.nearestDesc(n);if(i&&i.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let r=this.pendingRecords();r.length&&(this.queue=[]);let n=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&bE(e)&&!this.ignoreSelectionChange(n),o=-1,a=-1,s=!1,u=[];if(e.editable)for(let d=0;d<r.length;d++){let p=this.registerMutation(r[d],u);p&&(o=o<0?p.from:Math.min(p.from,o),a=a<0?p.to:Math.max(p.to,a),p.typeOver&&(s=!0))}if(Rn&&u.length){let d=u.filter(p=>p.nodeName=="BR");if(d.length==2){let[p,v]=d;p.parentNode&&p.parentNode.parentNode==v.parentNode?v.remove():p.remove()}else{let{focusNode:p}=this.currentSelection;for(let v of d){let m=v.parentNode;m&&m.nodeName=="LI"&&(!p||aU(e,p)!=m)&&v.remove()}}}else if((tr||Ar)&&u.some(d=>d.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let d of u)if(d.nodeName=="BR"&&d.parentNode){let p=d.nextSibling;p&&p.nodeType==1&&p.contentEditable=="false"&&d.parentNode.removeChild(d)}}let f=null;o<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Qc(n)&&(f=Wh(e))&&f.eq(rt.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Vi(e),this.currentSelection.set(n),e.scrollToSelection()):(o>-1||i)&&(o>-1&&(e.docView.markDirty(o,a),iU(e)),this.handleDOMChange(o,a,s,u),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||Vi(e),this.currentSelection.set(n))}registerMutation(e,r){if(r.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(n==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!n||n.ignoreMutation(e))return null;if(e.type=="childList"){for(let d=0;d<e.addedNodes.length;d++){let p=e.addedNodes[d];r.push(p),p.nodeType==3&&(this.lastChangedTextNode=p)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let i=e.previousSibling,o=e.nextSibling;if(nn&&Ao<=11&&e.addedNodes.length)for(let d=0;d<e.addedNodes.length;d++){let{previousSibling:p,nextSibling:v}=e.addedNodes[d];(!p||Array.prototype.indexOf.call(e.addedNodes,p)<0)&&(i=p),(!v||Array.prototype.indexOf.call(e.addedNodes,v)<0)&&(o=v)}let a=i&&i.parentNode==e.target?pr(i)+1:0,s=n.localPosFromDOM(e.target,a,-1),u=o&&o.parentNode==e.target?pr(o):e.target.childNodes.length,f=n.localPosFromDOM(e.target,u,1);return{from:s,to:f}}else return e.type=="attributes"?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:(this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let jE=new WeakMap,GE=!1;function iU(t){if(!jE.has(t)&&(jE.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=Rn,GE)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."),GE=!0}}function KE(t,e){let r=e.startContainer,n=e.startOffset,i=e.endContainer,o=e.endOffset,a=t.domAtPos(t.state.selection.anchor);return xa(a.node,a.offset,i,o)&&([r,n,i,o]=[i,o,r,n]),{anchorNode:r,anchorOffset:n,focusNode:i,focusOffset:o}}function oU(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return KE(t,i)}let r;function n(i){i.preventDefault(),i.stopImmediatePropagation(),r=i.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",n,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",n,!0),r?KE(t,r):null}function aU(t,e){for(let r=e.parentNode;r&&r!=t.dom;r=r.parentNode){let n=t.docView.nearestDesc(r,!0);if(n&&n.node.isBlock)return r}return null}function sU(t,e,r){let{node:n,fromOffset:i,toOffset:o,from:a,to:s}=t.docView.parseRange(e,r),u=t.domSelectionRange(),f,d=u.anchorNode;if(d&&t.dom.contains(d.nodeType==1?d:d.parentNode)&&(f=[{node:d,offset:u.anchorOffset}],Qc(u)||f.push({node:u.focusNode,offset:u.focusOffset})),tr&&t.input.lastKeyCode===8)for(let w=o;w>i;w--){let x=n.childNodes[w-1],k=x.pmViewDesc;if(x.nodeName=="BR"&&!k){o=w;break}if(!k||k.size)break}let p=t.state.doc,v=t.someProp("domParser")||jc.fromSchema(t.state.schema),m=p.resolve(a),g=null,E=v.parse(n,{topNode:m.parent,topMatch:m.parent.contentMatchAt(m.index()),topOpen:!0,from:i,to:o,preserveWhitespace:m.parent.type.whitespace=="pre"?"full":!0,findPositions:f,ruleFromNode:lU,context:m});if(f&&f[0].pos!=null){let w=f[0].pos,x=f[1]&&f[1].pos;x==null&&(x=w),g={anchor:w+a,head:x+a}}return{doc:E,sel:g,from:a,to:s}}function lU(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(Ar&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let r=document.createElement("div");return r.appendChild(document.createElement("li")),{skip:r}}else if(t.parentNode.lastChild==t||Ar&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const uU=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function cU(t,e,r,n,i){let o=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let A=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,P=Wh(t,A);if(P&&!t.state.selection.eq(P)){if(tr&&zi&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",J=>J(t,Ca(13,"Enter"))))return;let U=t.state.tr.setSelection(P);A=="pointer"?U.setMeta("pointer",!0):A=="key"&&U.scrollIntoView(),o&&U.setMeta("composition",o),t.dispatch(U)}return}let a=t.state.doc.resolve(e),s=a.sharedDepth(r);e=a.before(s+1),r=t.state.doc.resolve(r).after(s+1);let u=t.state.selection,f=sU(t,e,r),d=t.state.doc,p=d.slice(f.from,f.to),v,m;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(v=t.state.selection.to,m="end"):(v=t.state.selection.from,m="start"),t.input.lastKeyCode=null;let g=pU(p.content,f.doc.content,f.from,v,m);if(g&&t.input.domChangeCount++,(_s&&t.input.lastIOSEnter>Date.now()-225||zi)&&i.some(A=>A.nodeType==1&&!uU.test(A.nodeName))&&(!g||g.endA>=g.endB)&&t.someProp("handleKeyDown",A=>A(t,Ca(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!g)if(n&&u instanceof it&&!u.empty&&u.$head.sameParent(u.$anchor)&&!t.composing&&!(f.sel&&f.sel.anchor!=f.sel.head))g={start:u.from,endA:u.to,endB:u.to};else{if(f.sel){let A=YE(t,t.state.doc,f.sel);if(A&&!A.eq(t.state.selection)){let P=t.state.tr.setSelection(A);o&&P.setMeta("composition",o),t.dispatch(P)}}return}t.state.selection.from<t.state.selection.to&&g.start==g.endB&&t.state.selection instanceof it&&(g.start>t.state.selection.from&&g.start<=t.state.selection.from+2&&t.state.selection.from>=f.from?g.start=t.state.selection.from:g.endA<t.state.selection.to&&g.endA>=t.state.selection.to-2&&t.state.selection.to<=f.to&&(g.endB+=t.state.selection.to-g.endA,g.endA=t.state.selection.to)),nn&&Ao<=11&&g.endB==g.start+1&&g.endA==g.start&&g.start>f.from&&f.doc.textBetween(g.start-f.from-1,g.start-f.from+1)==" "&&(g.start--,g.endA--,g.endB--);let E=f.doc.resolveNoCache(g.start-f.from),w=f.doc.resolveNoCache(g.endB-f.from),x=d.resolve(g.start),k=E.sameParent(w)&&E.parent.inlineContent&&x.end()>=g.endA;if((_s&&t.input.lastIOSEnter>Date.now()-225&&(!k||i.some(A=>A.nodeName=="DIV"||A.nodeName=="P"))||!k&&E.pos<f.doc.content.size&&(!E.sameParent(w)||!E.parent.inlineContent)&&E.pos<w.pos&&!/\S/.test(f.doc.textBetween(E.pos,w.pos,"","")))&&t.someProp("handleKeyDown",A=>A(t,Ca(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>g.start&&dU(d,g.start,g.endA,E,w)&&t.someProp("handleKeyDown",A=>A(t,Ca(8,"Backspace")))){zi&&tr&&t.domObserver.suppressSelectionUpdates();return}tr&&g.endB==g.start&&(t.input.lastChromeDelete=Date.now()),zi&&!k&&E.start()!=w.start()&&w.parentOffset==0&&E.depth==w.depth&&f.sel&&f.sel.anchor==f.sel.head&&f.sel.head==g.endA&&(g.endB-=2,w=f.doc.resolveNoCache(g.endB-f.from),setTimeout(()=>{t.someProp("handleKeyDown",function(A){return A(t,Ca(13,"Enter"))})},20));let _=g.start,O=g.endA,N=A=>{let P=A||t.state.tr.replace(_,O,f.doc.slice(g.start-f.from,g.endB-f.from));if(f.sel){let U=YE(t,P.doc,f.sel);U&&!(tr&&t.composing&&U.empty&&(g.start!=g.endB||t.input.lastChromeDelete<Date.now()-100)&&(U.head==_||U.head==P.mapping.map(O)-1)||nn&&U.empty&&U.head==_)&&P.setSelection(U)}return o&&P.setMeta("composition",o),P.scrollIntoView()},L;if(k)if(E.pos==w.pos){nn&&Ao<=11&&E.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>Vi(t),20));let A=N(t.state.tr.delete(_,O)),P=d.resolve(g.start).marksAcross(d.resolve(g.endA));P&&A.ensureMarks(P),t.dispatch(A)}else if(g.endA==g.endB&&(L=fU(E.parent.content.cut(E.parentOffset,w.parentOffset),x.parent.content.cut(x.parentOffset,g.endA-x.start())))){let A=N(t.state.tr);L.type=="add"?A.addMark(_,O,L.mark):A.removeMark(_,O,L.mark),t.dispatch(A)}else if(E.parent.child(E.index()).isText&&E.index()==w.index()-(w.textOffset?0:1)){let A=E.parent.textBetween(E.parentOffset,w.parentOffset),P=()=>N(t.state.tr.insertText(A,_,O));t.someProp("handleTextInput",U=>U(t,_,O,A,P))||t.dispatch(P())}else t.dispatch(N());else t.dispatch(N())}function YE(t,e,r){return Math.max(r.anchor,r.head)>e.content.size?null:Gh(t,e.resolve(r.anchor),e.resolve(r.head))}function fU(t,e){let r=t.firstChild.marks,n=e.firstChild.marks,i=r,o=n,a,s,u;for(let d=0;d<n.length;d++)i=n[d].removeFromSet(i);for(let d=0;d<r.length;d++)o=r[d].removeFromSet(o);if(i.length==1&&o.length==0)s=i[0],a="add",u=d=>d.mark(s.addToSet(d.marks));else if(i.length==0&&o.length==1)s=o[0],a="remove",u=d=>d.mark(s.removeFromSet(d.marks));else return null;let f=[];for(let d=0;d<e.childCount;d++)f.push(u(e.child(d)));if(oe.from(f).eq(t))return{mark:s,type:a}}function dU(t,e,r,n,i){if(r-e<=i.pos-n.pos||av(n,!0,!1)<i.pos)return!1;let o=t.resolve(e);if(!n.parent.isTextblock){let s=o.nodeAfter;return s!=null&&r==e+s.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let a=t.resolve(av(o,!0,!0));return!a.parent.isTextblock||a.pos>r||av(a,!0,!1)<r?!1:n.parent.content.cut(n.parentOffset).eq(a.parent.content)}function av(t,e,r){let n=t.depth,i=e?t.end():t.pos;for(;n>0&&(e||t.indexAfter(n)==t.node(n).childCount);)n--,i++,e=!1;if(r){let o=t.node(n).maybeChild(t.indexAfter(n));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function pU(t,e,r,n,i){let o=t.findDiffStart(e,r);if(o==null)return null;let{a,b:s}=t.findDiffEnd(e,r+t.size,r+e.size);if(i=="end"){let u=Math.max(0,o-Math.min(a,s));n-=a+u-o}if(a<o&&t.size<e.size){let u=n<=o&&n>=a?o-n:0;o-=u,o&&o<e.size&&XE(e.textBetween(o-1,o+1))&&(o+=u?1:-1),s=o+(s-a),a=o}else if(s<o){let u=n<=o&&n>=s?o-n:0;o-=u,o&&o<t.size&&XE(t.textBetween(o-1,o+1))&&(o+=u?1:-1),a=o+(a-s),s=o}return{start:o,endA:a,endB:s}}function XE(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),r=t.charCodeAt(1);return e>=56320&&e<=57343&&r>=55296&&r<=56319}class lf{constructor(e,r){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 MH,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=r,this.state=r.state,this.directPlugins=r.plugins||[],this.directPlugins.forEach(tx),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=QE(this),ZE(this),this.nodeViews=ex(this),this.docView=sE(this.state.doc,JE(this),ov(this),this.dom,this),this.domObserver=new nU(this,(n,i,o,a)=>cU(this,n,i,o,a)),this.domObserver.start(),NH(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 r in e)this._props[r]=e[r];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Qh(this);let r=this._props;this._props=e,e.plugins&&(e.plugins.forEach(tx),this.directPlugins=e.plugins),this.updateStateInner(e.state,r)}setProps(e){let r={};for(let n in this._props)r[n]=this._props[n];r.state=this.state;for(let n in e)r[n]=e[n];this.update(r)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,r){var n;let i=this.state,o=!1,a=!1;e.storedMarks&&this.composing&&($E(this),a=!0),this.state=e;let s=i.plugins!=e.plugins||this._props.plugins!=r.plugins;if(s||this._props.plugins!=r.plugins||this._props.nodeViews!=r.nodeViews){let m=ex(this);vU(m,this.nodeViews)&&(this.nodeViews=m,o=!0)}(s||r.handleDOMEvents!=this._props.handleDOMEvents)&&Qh(this),this.editable=QE(this),ZE(this);let u=ov(this),f=JE(this),d=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",p=o||!this.docView.matchesNode(e.doc,f,u);(p||!e.selection.eq(i.selection))&&(a=!0);let v=d=="preserve"&&a&&this.dom.style.overflowAnchor==null&&W3(this);if(a){this.domObserver.stop();let m=p&&(nn||tr)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&hU(i.selection,e.selection);if(p){let g=tr?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=WH(this)),(o||!this.docView.update(e.doc,f,u,this))&&(this.docView.updateOuterDeco(f),this.docView.destroy(),this.docView=sE(e.doc,f,u,this.dom,this)),g&&!this.trackWrites&&(m=!0)}m||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&vH(this))?Vi(this,m):(gE(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((n=this.dragging)===null||n===void 0)&&n.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),d=="reset"?this.dom.scrollTop=0:d=="to selection"?this.scrollToSelection():v&&j3(v)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",r=>r(this)))if(this.state.selection instanceof He){let r=this.docView.domAfterPos(this.state.selection.from);r.nodeType==1&&K1(this,r.getBoundingClientRect(),e)}else K1(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 r=0;r<this.directPlugins.length;r++){let n=this.directPlugins[r];n.spec.view&&this.pluginViews.push(n.spec.view(this))}for(let r=0;r<this.state.plugins.length;r++){let n=this.state.plugins[r];n.spec.view&&this.pluginViews.push(n.spec.view(this))}}else for(let r=0;r<this.pluginViews.length;r++){let n=this.pluginViews[r];n.update&&n.update(this,e)}}updateDraggedNode(e,r){let n=e.node,i=-1;if(this.state.doc.nodeAt(n.from)==n.node)i=n.from;else{let o=n.from+(this.state.doc.content.size-r.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==n.node&&(i=o)}this.dragging=new HE(e.slice,e.move,i<0?void 0:He.create(this.state.doc,i))}someProp(e,r){let n=this._props&&this._props[e],i;if(n!=null&&(i=r?r(n):n))return i;for(let a=0;a<this.directPlugins.length;a++){let s=this.directPlugins[a].props[e];if(s!=null&&(i=r?r(s):s))return i}let o=this.state.plugins;if(o)for(let a=0;a<o.length;a++){let s=o[a].props[e];if(s!=null&&(i=r?r(s):s))return i}}hasFocus(){if(nn){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&&G3(this.dom),Vi(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let r=this.dom.parentNode;r;r=r.parentNode)if(r.nodeType==9||r.nodeType==11&&r.host)return r.getSelection||(Object.getPrototypeOf(r).getSelection=()=>r.ownerDocument.getSelection()),this._root=r}return e||document}updateRoot(){this._root=null}posAtCoords(e){return Z3(this,e)}coordsAtPos(e,r=1){return eE(this,e,r)}domAtPos(e,r=0){return this.docView.domFromPos(e,r)}nodeDOM(e){let r=this.docView.descAt(e);return r?r.nodeDOM:null}posAtDOM(e,r,n=-1){let i=this.docView.posFromDOM(e,r,n);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,r){return nH(this,r||this.state,e)}pasteHTML(e,r){return lu(this,"",e,!1,r||new ClipboardEvent("paste"))}pasteText(e,r){return lu(this,e,null,!0,r||new ClipboardEvent("paste"))}serializeForClipboard(e){return Xh(this,e)}destroy(){this.docView&&(LH(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],ov(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,R3())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return IH(this,e)}domSelectionRange(){let e=this.domSelection();return e?Ar&&this.root.nodeType===11&&H3(this.dom.ownerDocument)==this.dom&&oU(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}lf.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function JE(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",r=>{if(typeof r=="function"&&(r=r(t.state)),r)for(let n in r)n=="class"?e.class+=" "+r[n]:n=="style"?e.style=(e.style?e.style+";":"")+r[n]:!e[n]&&n!="contenteditable"&&n!="nodeName"&&(e[n]=String(r[n]))}),e.translate||(e.translate="no"),[on.node(0,t.state.doc.content.size,e)]}function ZE(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:on.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function QE(t){return!t.someProp("editable",e=>e(t.state)===!1)}function hU(t,e){let r=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(r)!=e.$anchor.start(r)}function ex(t){let e=Object.create(null);function r(n){for(let i in n)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=n[i])}return t.someProp("nodeViews",r),t.someProp("markViews",r),e}function vU(t,e){let r=0,n=0;for(let i in t){if(t[i]!=e[i])return!0;r++}for(let i in e)n++;return r!=n}function tx(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var Po={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:"'"},uf={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},mU=typeof navigator<"u"&&/Mac/.test(navigator.platform),gU=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),hr=0;hr<10;hr++)Po[48+hr]=Po[96+hr]=String(hr);for(var hr=1;hr<=24;hr++)Po[hr+111]="F"+hr;for(var hr=65;hr<=90;hr++)Po[hr]=String.fromCharCode(hr+32),uf[hr]=String.fromCharCode(hr);for(var sv in Po)uf.hasOwnProperty(sv)||(uf[sv]=Po[sv]);function yU(t){var e=mU&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||gU&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",r=!e&&t.key||(t.shiftKey?uf:Po)[t.keyCode]||t.key||"Unidentified";return r=="Esc"&&(r="Escape"),r=="Del"&&(r="Delete"),r=="Left"&&(r="ArrowLeft"),r=="Up"&&(r="ArrowUp"),r=="Right"&&(r="ArrowRight"),r=="Down"&&(r="ArrowDown"),r}const bU=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),wU=typeof navigator<"u"&&/Win/.test(navigator.platform);function EU(t){let e=t.split(/-(?!$)/),r=e[e.length-1];r=="Space"&&(r=" ");let n,i,o,a;for(let s=0;s<e.length-1;s++){let u=e[s];if(/^(cmd|meta|m)$/i.test(u))a=!0;else if(/^a(lt)?$/i.test(u))n=!0;else if(/^(c|ctrl|control)$/i.test(u))i=!0;else if(/^s(hift)?$/i.test(u))o=!0;else if(/^mod$/i.test(u))bU?a=!0:i=!0;else throw new Error("Unrecognized modifier name: "+u)}return n&&(r="Alt-"+r),i&&(r="Ctrl-"+r),a&&(r="Meta-"+r),o&&(r="Shift-"+r),r}function xU(t){let e=Object.create(null);for(let r in t)e[EU(r)]=t[r];return e}function lv(t,e,r=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),r&&e.shiftKey&&(t="Shift-"+t),t}function cu(t){return new rn({props:{handleKeyDown:CU(t)}})}function CU(t){let e=xU(t);return function(r,n){let i=yU(n),o,a=e[lv(i,n)];if(a&&a(r.state,r.dispatch,r))return!0;if(i.length==1&&i!=" "){if(n.shiftKey){let s=e[lv(i,n,!1)];if(s&&s(r.state,r.dispatch,r))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(wU&&n.ctrlKey&&n.altKey)&&(o=Po[n.keyCode])&&o!=i){let s=e[lv(o,n)];if(s&&s(r.state,r.dispatch,r))return!0}}return!1}}const uv=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function kU(t,e){let{$cursor:r}=t.selection;return!r||(e?!e.endOfTextblock("backward",t):r.parentOffset>0)?null:r}const TU=(t,e,r)=>{let n=kU(t,r);if(!n)return!1;let i=rx(n);if(!i){let a=n.blockRange(),s=a&&Xc(a);return s==null?!1:(e&&e(t.tr.lift(a,s).scrollIntoView()),!0)}let o=i.nodeBefore;if(sx(t,i,e,-1))return!0;if(n.parent.content.size==0&&(Ls(o,"end")||He.isSelectable(o)))for(let a=n.depth;;a--){let s=Mh(t.doc,n.before(a),n.after(a),ge.empty);if(s&&s.slice.size<s.to-s.from){if(e){let u=t.tr.step(s);u.setSelection(Ls(o,"end")?rt.findFrom(u.doc.resolve(u.mapping.map(i.pos,-1)),-1):He.create(u.doc,i.pos-o.nodeSize)),e(u.scrollIntoView())}return!0}if(a==1||n.node(a-1).childCount>1)break}return o.isAtom&&i.depth==n.depth-1?(e&&e(t.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0):!1};function Ls(t,e,r=!1){for(let n=t;n;n=e=="start"?n.firstChild:n.lastChild){if(n.isTextblock)return!0;if(r&&n.childCount!=1)return!1}return!1}const SU=(t,e,r)=>{let{$head:n,empty:i}=t.selection,o=n;if(!i)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("backward",t):n.parentOffset>0)return!1;o=rx(n)}let a=o&&o.nodeBefore;return!a||!He.isSelectable(a)?!1:(e&&e(t.tr.setSelection(He.create(t.doc,o.pos-a.nodeSize)).scrollIntoView()),!0)};function rx(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function _U(t,e){let{$cursor:r}=t.selection;return!r||(e?!e.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)?null:r}const nx=(t,e,r)=>{let n=_U(t,r);if(!n)return!1;let i=ix(n);if(!i)return!1;let o=i.nodeAfter;if(sx(t,i,e,1))return!0;if(n.parent.content.size==0&&(Ls(o,"start")||He.isSelectable(o))){let a=Mh(t.doc,n.before(),n.after(),ge.empty);if(a&&a.slice.size<a.to-a.from){if(e){let s=t.tr.step(a);s.setSelection(Ls(o,"start")?rt.findFrom(s.doc.resolve(s.mapping.map(i.pos)),1):He.create(s.doc,s.mapping.map(i.pos))),e(s.scrollIntoView())}return!0}}return o.isAtom&&i.depth==n.depth-1?(e&&e(t.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0):!1},OU=(t,e,r)=>{let{$head:n,empty:i}=t.selection,o=n;if(!i)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)return!1;o=ix(n)}let a=o&&o.nodeAfter;return!a||!He.isSelectable(a)?!1:(e&&e(t.tr.setSelection(He.create(t.doc,o.pos)).scrollIntoView()),!0)};function ix(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let r=t.node(e);if(t.index(e)+1<r.childCount)return t.doc.resolve(t.after(e+1));if(r.type.spec.isolating)break}return null}const ox=(t,e)=>{let{$head:r,$anchor:n}=t.selection;return!r.parent.type.spec.code||!r.sameParent(n)?!1:(e&&e(t.tr.insertText(`
|
|
105
|
+
`).scrollIntoView()),!0)};function cv(t){for(let e=0;e<t.edgeCount;e++){let{type:r}=t.edge(e);if(r.isTextblock&&!r.hasRequiredAttrs())return r}return null}const fv=(t,e)=>{let{$head:r,$anchor:n}=t.selection;if(!r.parent.type.spec.code||!r.sameParent(n))return!1;let i=r.node(-1),o=r.indexAfter(-1),a=cv(i.contentMatchAt(o));if(!a||!i.canReplaceWith(o,o,a))return!1;if(e){let s=r.after(),u=t.tr.replaceWith(s,s,a.createAndFill());u.setSelection(rt.near(u.doc.resolve(s),1)),e(u.scrollIntoView())}return!0},AU=(t,e)=>{let r=t.selection,{$from:n,$to:i}=r;if(r instanceof Hr||n.parent.inlineContent||i.parent.inlineContent)return!1;let o=cv(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let a=(!n.parentOffset&&i.index()<i.parent.childCount?n:i).pos,s=t.tr.insert(a,o.createAndFill());s.setSelection(it.create(s.doc,a+1)),e(s.scrollIntoView())}return!0},MU=(t,e)=>{let{$cursor:r}=t.selection;if(!r||r.parent.content.size)return!1;if(r.depth>1&&r.after()!=r.end(-1)){let o=r.before();if(xs(t.doc,o))return e&&e(t.tr.split(o).scrollIntoView()),!0}let n=r.blockRange(),i=n&&Xc(n);return i==null?!1:(e&&e(t.tr.lift(n,i).scrollIntoView()),!0)};function NU(t){return(e,r)=>{let{$from:n,$to:i}=e.selection;if(e.selection instanceof He&&e.selection.node.isBlock)return!n.parentOffset||!xs(e.doc,n.pos)?!1:(r&&r(e.tr.split(n.pos).scrollIntoView()),!0);if(!n.depth)return!1;let o=[],a,s,u=!1,f=!1;for(let m=n.depth;;m--)if(n.node(m).isBlock){u=n.end(m)==n.pos+(n.depth-m),f=n.start(m)==n.pos-(n.depth-m),s=cv(n.node(m-1).contentMatchAt(n.indexAfter(m-1))),o.unshift(u&&s?{type:s}:null),a=m;break}else{if(m==1)return!1;o.unshift(null)}let d=e.tr;(e.selection instanceof it||e.selection instanceof Hr)&&d.deleteSelection();let p=d.mapping.map(n.pos),v=xs(d.doc,p,o.length,o);if(v||(o[0]=s?{type:s}:null,v=xs(d.doc,p,o.length,o)),!v)return!1;if(d.split(p,o.length,o),!u&&f&&n.node(a).type!=s){let m=d.mapping.map(n.before(a)),g=d.doc.resolve(m);s&&n.node(a-1).canReplaceWith(g.index(),g.index()+1,s)&&d.setNodeMarkup(d.mapping.map(n.before(a)),s)}return r&&r(d.scrollIntoView()),!0}}const LU=NU(),ax=(t,e)=>(e&&e(t.tr.setSelection(new Hr(t.doc))),!0);function DU(t,e,r){let n=e.nodeBefore,i=e.nodeAfter,o=e.index();return!n||!i||!n.type.compatibleContent(i.type)?!1:!n.content.size&&e.parent.canReplace(o-1,o)?(r&&r(t.tr.delete(e.pos-n.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(o,o+1)||!(i.isTextblock||A1(t.doc,e.pos))?!1:(r&&r(t.tr.join(e.pos).scrollIntoView()),!0)}function sx(t,e,r,n){let i=e.nodeBefore,o=e.nodeAfter,a,s,u=i.type.spec.isolating||o.type.spec.isolating;if(!u&&DU(t,e,r))return!0;let f=!u&&e.parent.canReplace(e.index(),e.index()+1);if(f&&(a=(s=i.contentMatchAt(i.childCount)).findWrapping(o.type))&&s.matchType(a[0]||o.type).validEnd){if(r){let m=e.pos+o.nodeSize,g=oe.empty;for(let x=a.length-1;x>=0;x--)g=oe.from(a[x].create(null,g));g=oe.from(i.copy(g));let E=t.tr.step(new er(e.pos-1,m,e.pos,m,new ge(g,1,0),a.length,!0)),w=E.doc.resolve(m+2*a.length);w.nodeAfter&&w.nodeAfter.type==i.type&&A1(E.doc,w.pos)&&E.join(w.pos),r(E.scrollIntoView())}return!0}let d=o.type.spec.isolating||n>0&&u?null:rt.findFrom(e,1),p=d&&d.$from.blockRange(d.$to),v=p&&Xc(p);if(v!=null&&v>=e.depth)return r&&r(t.tr.lift(p,v).scrollIntoView()),!0;if(f&&Ls(o,"start",!0)&&Ls(i,"end")){let m=i,g=[];for(;g.push(m),!m.isTextblock;)m=m.lastChild;let E=o,w=1;for(;!E.isTextblock;E=E.firstChild)w++;if(m.canReplace(m.childCount,m.childCount,E.content)){if(r){let x=oe.empty;for(let _=g.length-1;_>=0;_--)x=oe.from(g[_].copy(x));let k=t.tr.step(new er(e.pos-g.length,e.pos+o.nodeSize,e.pos+w,e.pos+o.nodeSize-w,new ge(x,g.length,0),0,!0));r(k.scrollIntoView())}return!0}}return!1}function lx(t){return function(e,r){let n=e.selection,i=t<0?n.$from:n.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return i.node(o).isTextblock?(r&&r(e.tr.setSelection(it.create(e.doc,t<0?i.start(o):i.end(o)))),!0):!1}}const IU=lx(-1),RU=lx(1);function PU(t,e=null){return function(r,n){let{$from:i,$to:o}=r.selection,a=i.blockRange(o),s=a&&d3(a,t,e);return s?(n&&n(r.tr.wrap(a,s).scrollIntoView()),!0):!1}}function dv(t,e=null){return function(r,n){let i=!1;for(let o=0;o<r.selection.ranges.length&&!i;o++){let{$from:{pos:a},$to:{pos:s}}=r.selection.ranges[o];r.doc.nodesBetween(a,s,(u,f)=>{if(i)return!1;if(!(!u.isTextblock||u.hasMarkup(t,e)))if(u.type==t)i=!0;else{let d=r.doc.resolve(f),p=d.index();i=d.parent.canReplaceWith(p,p+1,t)}})}if(!i)return!1;if(n){let o=r.tr;for(let a=0;a<r.selection.ranges.length;a++){let{$from:{pos:s},$to:{pos:u}}=r.selection.ranges[a];o.setBlockType(s,u,t,e)}n(o.scrollIntoView())}return!0}}function BU(t,e,r,n){for(let i=0;i<e.length;i++){let{$from:o,$to:a}=e[i],s=o.depth==0?t.inlineContent&&t.type.allowsMarkType(r):!1;if(t.nodesBetween(o.pos,a.pos,(u,f)=>{if(s)return!1;s=u.inlineContent&&u.type.allowsMarkType(r)}),s)return!0}return!1}function fu(t,e=null,r){return function(n,i){let{empty:o,$cursor:a,ranges:s}=n.selection;if(o&&!a||!BU(n.doc,s,t))return!1;if(i)if(a)t.isInSet(n.storedMarks||a.marks())?i(n.tr.removeStoredMark(t)):i(n.tr.addStoredMark(t.create(e)));else{let u,f=n.tr;u=!s.some(d=>n.doc.rangeHasMark(d.$from.pos,d.$to.pos,t));for(let d=0;d<s.length;d++){let{$from:p,$to:v}=s[d];if(!u)f.removeMark(p.pos,v.pos,t);else{let m=p.pos,g=v.pos,E=p.nodeAfter,w=v.nodeBefore,x=E&&E.isText?/^\s*/.exec(E.text)[0].length:0,k=w&&w.isText?/\s*$/.exec(w.text)[0].length:0;m+x<g&&(m+=x,g-=k),f.addMark(m,g,t.create(e))}}i(f.scrollIntoView())}return!0}}function cf(...t){return function(e,r,n){for(let i=0;i<t.length;i++)if(t[i](e,r,n))return!0;return!1}}let pv=cf(uv,TU,SU),ux=cf(uv,nx,OU);const Wi={Enter:cf(ox,AU,MU,LU),"Mod-Enter":fv,Backspace:pv,"Mod-Backspace":pv,"Shift-Backspace":pv,Delete:ux,"Mod-Delete":ux,"Mod-a":ax},cx={"Ctrl-h":Wi.Backspace,"Alt-Backspace":Wi["Mod-Backspace"],"Ctrl-d":Wi.Delete,"Ctrl-Alt-Backspace":Wi["Mod-Delete"],"Alt-Delete":Wi["Mod-Delete"],"Alt-d":Wi["Mod-Delete"],"Ctrl-a":IU,"Ctrl-e":RU};for(let t in Wi)cx[t]=Wi[t];const fx=(typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1)?cx:Wi;class Bo{constructor(e,r,n={}){this.match=e,this.match=e,this.handler=typeof r=="string"?$U(r):r,this.undoable=n.undoable!==!1,this.inCode=n.inCode||!1,this.inCodeMark=n.inCodeMark!==!1}}function $U(t){return function(e,r,n,i){let o=t;if(r[1]){let a=r[0].lastIndexOf(r[1]);o+=r[0].slice(a+r[1].length),n+=a;let s=n-i;s>0&&(o=r[0].slice(a-s,a)+o,n=i)}return e.tr.insertText(o,n,i)}}const FU=500;function dx({rules:t}){let e=new rn({state:{init(){return null},apply(r,n){let i=r.getMeta(this);return i||(r.selectionSet||r.docChanged?null:n)}},props:{handleTextInput(r,n,i,o){return px(r,n,i,o,t,e)},handleDOMEvents:{compositionend:r=>{setTimeout(()=>{let{$cursor:n}=r.state.selection;n&&px(r,n.pos,n.pos,"",t,e)})}}},isInputRules:!0});return e}function px(t,e,r,n,i,o){if(t.composing)return!1;let a=t.state,s=a.doc.resolve(e),u=s.parent.textBetween(Math.max(0,s.parentOffset-FU),s.parentOffset,null,"")+n;for(let f=0;f<i.length;f++){let d=i[f];if(!d.inCodeMark&&s.marks().some(g=>g.type.spec.code))continue;if(s.parent.type.spec.code){if(!d.inCode)continue}else if(d.inCode==="only")continue;let p=d.match.exec(u);if(!p||p[0].length<n.length)continue;let v=e-(p[0].length-n.length);if(!d.inCodeMark){let g=!1;if(a.doc.nodesBetween(v,s.pos,E=>{E.isInline&&E.marks.some(w=>w.type.spec.code)&&(g=!0)}),g)continue}let m=d.handler(a,p,v,r);if(m)return d.undoable&&m.setMeta(o,{transform:m,from:e,to:r,text:n}),t.dispatch(m),!0}return!1}const HU=(t,e)=>{let r=t.plugins;for(let n=0;n<r.length;n++){let i=r[n],o;if(i.spec.isInputRules&&(o=i.getState(t))){if(e){let a=t.tr,s=o.transform;for(let u=s.steps.length-1;u>=0;u--)a.step(s.steps[u].invert(s.docs[u]));if(o.text){let u=a.doc.resolve(o.from).marks();a.replaceWith(o.from,o.to,t.schema.text(o.text,u))}else a.delete(o.from,o.to);e(a)}return!0}}return!1};new Bo(/--$/,"—",{inCodeMark:!1}),new Bo(/\.\.\.$/,"…",{inCodeMark:!1}),new Bo(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“",{inCodeMark:!1}),new Bo(/"$/,"”",{inCodeMark:!1}),new Bo(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘",{inCodeMark:!1}),new Bo(/'$/,"’",{inCodeMark:!1});var ff=200,rr=function(){};rr.prototype.append=function(e){return e.length?(e=rr.from(e),!this.length&&e||e.length<ff&&this.leafAppend(e)||this.length<ff&&e.leafPrepend(this)||this.appendInner(e)):this},rr.prototype.prepend=function(e){return e.length?rr.from(e).append(this):this},rr.prototype.appendInner=function(e){return new UU(this,e)},rr.prototype.slice=function(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.length),e>=r?rr.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,r))},rr.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},rr.prototype.forEach=function(e,r,n){r===void 0&&(r=0),n===void 0&&(n=this.length),r<=n?this.forEachInner(e,r,n,0):this.forEachInvertedInner(e,r,n,0)},rr.prototype.map=function(e,r,n){r===void 0&&(r=0),n===void 0&&(n=this.length);var i=[];return this.forEach(function(o,a){return i.push(e(o,a))},r,n),i},rr.from=function(e){return e instanceof rr?e:e&&e.length?new hx(e):rr.empty};var hx=function(t){function e(n){t.call(this),this.values=n}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={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,a,s){for(var u=o;u<a;u++)if(i(this.values[u],s+u)===!1)return!1},e.prototype.forEachInvertedInner=function(i,o,a,s){for(var u=o-1;u>=a;u--)if(i(this.values[u],s+u)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=ff)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=ff)return new e(i.flatten().concat(this.values))},r.length.get=function(){return this.values.length},r.depth.get=function(){return 0},Object.defineProperties(e.prototype,r),e}(rr);rr.empty=new hx([]);var UU=function(t){function e(r,n){t.call(this),this.left=r,this.right=n,this.length=r.length+n.length,this.depth=Math.max(r.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},e.prototype.forEachInner=function(n,i,o,a){var s=this.left.length;if(i<s&&this.left.forEachInner(n,i,Math.min(o,s),a)===!1||o>s&&this.right.forEachInner(n,Math.max(i-s,0),Math.min(this.length,o)-s,a+s)===!1)return!1},e.prototype.forEachInvertedInner=function(n,i,o,a){var s=this.left.length;if(i>s&&this.right.forEachInvertedInner(n,i-s,Math.max(o,s)-s,a+s)===!1||o<s&&this.left.forEachInvertedInner(n,Math.min(i,s),o,a)===!1)return!1},e.prototype.sliceInner=function(n,i){if(n==0&&i==this.length)return this;var o=this.left.length;return i<=o?this.left.slice(n,i):n>=o?this.right.slice(n-o,i-o):this.left.slice(n,o).append(this.right.slice(0,i-o))},e.prototype.leafAppend=function(n){var i=this.right.leafAppend(n);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(n){var i=this.left.leafPrepend(n);if(i)return new e(i,this.right)},e.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new e(this.left,new e(this.right,n)):new e(this,n)},e}(rr);const zU=500;class Qn{constructor(e,r){this.items=e,this.eventCount=r}popEvent(e,r){if(this.eventCount==0)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let i,o;r&&(i=this.remapping(n,this.items.length),o=i.maps.length);let a=e.tr,s,u,f=[],d=[];return this.items.forEach((p,v)=>{if(!p.step){i||(i=this.remapping(n,v+1),o=i.maps.length),o--,d.push(p);return}if(i){d.push(new xi(p.map));let m=p.step.map(i.slice(o)),g;m&&a.maybeStep(m).doc&&(g=a.mapping.maps[a.mapping.maps.length-1],f.push(new xi(g,void 0,void 0,f.length+d.length))),o--,g&&i.appendMap(g,o)}else a.maybeStep(p.step);if(p.selection)return s=i?p.selection.map(i.slice(o)):p.selection,u=new Qn(this.items.slice(0,n).append(d.reverse().concat(f)),this.eventCount-1),!1},this.items.length,0),{remaining:u,transform:a,selection:s}}addTransform(e,r,n,i){let o=[],a=this.eventCount,s=this.items,u=!i&&s.length?s.get(s.length-1):null;for(let d=0;d<e.steps.length;d++){let p=e.steps[d].invert(e.docs[d]),v=new xi(e.mapping.maps[d],p,r),m;(m=u&&u.merge(v))&&(v=m,d?o.pop():s=s.slice(0,s.length-1)),o.push(v),r&&(a++,r=void 0),i||(u=v)}let f=a-n.depth;return f>VU&&(s=qU(s,f),a-=f),new Qn(s.append(o),a)}remapping(e,r){let n=new Yl;return this.items.forEach((i,o)=>{let a=i.mirrorOffset!=null&&o-i.mirrorOffset>=e?n.maps.length-i.mirrorOffset:void 0;n.appendMap(i.map,a)},e,r),n}addMaps(e){return this.eventCount==0?this:new Qn(this.items.append(e.map(r=>new xi(r))),this.eventCount)}rebased(e,r){if(!this.eventCount)return this;let n=[],i=Math.max(0,this.items.length-r),o=e.mapping,a=e.steps.length,s=this.eventCount;this.items.forEach(v=>{v.selection&&s--},i);let u=r;this.items.forEach(v=>{let m=o.getMirror(--u);if(m==null)return;a=Math.min(a,m);let g=o.maps[m];if(v.step){let E=e.steps[m].invert(e.docs[m]),w=v.selection&&v.selection.map(o.slice(u+1,m));w&&s++,n.push(new xi(g,E,w))}else n.push(new xi(g))},i);let f=[];for(let v=r;v<a;v++)f.push(new xi(o.maps[v]));let d=this.items.slice(0,i).append(f).append(n),p=new Qn(d,s);return p.emptyItemCount()>zU&&(p=p.compress(this.items.length-n.length)),p}emptyItemCount(){let e=0;return this.items.forEach(r=>{r.step||e++}),e}compress(e=this.items.length){let r=this.remapping(0,e),n=r.maps.length,i=[],o=0;return this.items.forEach((a,s)=>{if(s>=e)i.push(a),a.selection&&o++;else if(a.step){let u=a.step.map(r.slice(n)),f=u&&u.getMap();if(n--,f&&r.appendMap(f,n),u){let d=a.selection&&a.selection.map(r.slice(n));d&&o++;let p=new xi(f.invert(),u,d),v,m=i.length-1;(v=i.length&&i[m].merge(p))?i[m]=v:i.push(p)}}else a.map&&n--},this.items.length,0),new Qn(rr.from(i.reverse()),o)}}Qn.empty=new Qn(rr.empty,0);function qU(t,e){let r;return t.forEach((n,i)=>{if(n.selection&&e--==0)return r=i,!1}),t.slice(r)}class xi{constructor(e,r,n,i){this.map=e,this.step=r,this.selection=n,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let r=e.step.merge(this.step);if(r)return new xi(r.getMap().invert(),r,this.selection)}}}class $o{constructor(e,r,n,i,o){this.done=e,this.undone=r,this.prevRanges=n,this.prevTime=i,this.prevComposition=o}}const VU=20;function WU(t,e,r,n){let i=r.getMeta(Fo),o;if(i)return i.historyState;r.getMeta(KU)&&(t=new $o(t.done,t.undone,null,0,-1));let a=r.getMeta("appendedTransaction");if(r.steps.length==0)return t;if(a&&a.getMeta(Fo))return a.getMeta(Fo).redo?new $o(t.done.addTransform(r,void 0,n,df(e)),t.undone,vx(r.mapping.maps),t.prevTime,t.prevComposition):new $o(t.done,t.undone.addTransform(r,void 0,n,df(e)),null,t.prevTime,t.prevComposition);if(r.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let s=r.getMeta("composition"),u=t.prevTime==0||!a&&t.prevComposition!=s&&(t.prevTime<(r.time||0)-n.newGroupDelay||!jU(r,t.prevRanges)),f=a?hv(t.prevRanges,r.mapping):vx(r.mapping.maps);return new $o(t.done.addTransform(r,u?e.selection.getBookmark():void 0,n,df(e)),Qn.empty,f,r.time,s??t.prevComposition)}else return(o=r.getMeta("rebased"))?new $o(t.done.rebased(r,o),t.undone.rebased(r,o),hv(t.prevRanges,r.mapping),t.prevTime,t.prevComposition):new $o(t.done.addMaps(r.mapping.maps),t.undone.addMaps(r.mapping.maps),hv(t.prevRanges,r.mapping),t.prevTime,t.prevComposition)}function jU(t,e){if(!e)return!1;if(!t.docChanged)return!0;let r=!1;return t.mapping.maps[0].forEach((n,i)=>{for(let o=0;o<e.length;o+=2)n<=e[o+1]&&i>=e[o]&&(r=!0)}),r}function vx(t){let e=[];for(let r=t.length-1;r>=0&&e.length==0;r--)t[r].forEach((n,i,o,a)=>e.push(o,a));return e}function hv(t,e){if(!t)return null;let r=[];for(let n=0;n<t.length;n+=2){let i=e.map(t[n],1),o=e.map(t[n+1],-1);i<=o&&r.push(i,o)}return r}function GU(t,e,r){let n=df(e),i=Fo.get(e).spec.config,o=(r?t.undone:t.done).popEvent(e,n);if(!o)return null;let a=o.selection.resolve(o.transform.doc),s=(r?t.done:t.undone).addTransform(o.transform,e.selection.getBookmark(),i,n),u=new $o(r?s:o.remaining,r?o.remaining:s,null,0,-1);return o.transform.setSelection(a).setMeta(Fo,{redo:r,historyState:u})}let vv=!1,mx=null;function df(t){let e=t.plugins;if(mx!=e){vv=!1,mx=e;for(let r=0;r<e.length;r++)if(e[r].spec.historyPreserveItems){vv=!0;break}}return vv}const Fo=new eu("history"),KU=new eu("closeHistory");function gx(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new rn({key:Fo,state:{init(){return new $o(Qn.empty,Qn.empty,null,0,-1)},apply(e,r,n){return WU(r,n,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,r){let n=r.inputType,i=n=="historyUndo"?du:n=="historyRedo"?mv:null;return!i||!e.editable?!1:(r.preventDefault(),i(e.state,e.dispatch))}}}})}function yx(t,e){return(r,n)=>{let i=Fo.getState(r);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(n){let o=GU(i,r,t);o&&n(e?o.scrollIntoView():o)}return!0}}const du=yx(!1,!0),mv=yx(!0,!0);function YU(t){let e=Fo.getState(t);return e?e.done.eventCount:0}/**
|
|
106
|
+
* @toast-ui/editor
|
|
107
|
+
* @version 3.2.2 | Fri Feb 17 2023
|
|
108
|
+
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
109
|
+
* @license MIT
|
|
110
|
+
*//*! *****************************************************************************
|
|
111
|
+
Copyright (c) Microsoft Corporation.
|
|
112
|
+
|
|
113
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
114
|
+
purpose with or without fee is hereby granted.
|
|
115
|
+
|
|
116
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
117
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
118
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
119
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
120
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
121
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
122
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
123
|
+
***************************************************************************** */var gv=function(t,e){return gv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},gv(t,e)};function be(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");gv(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var q=function(){return q=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},q.apply(this,arguments)};function an(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))}function st(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function XU(t,e,r){var n;r=r||null;for(n in t)if(t.hasOwnProperty(n)&&e.call(r,t[n],n,t)===!1)break}var Ds=XU;function JU(t,e){var r=Object.prototype.hasOwnProperty,n,i,o,a;for(o=1,a=arguments.length;o<a;o+=1){n=arguments[o];for(i in n)r.call(n,i)&&(t[i]=n[i])}return t}var yv=JU;function ZU(t){return typeof t=="string"||t instanceof String}var ji=ZU;function QU(t){return t instanceof Array}var Is=QU;function e4(t,e,r){var n=0,i=t.length;for(r=r||null;n<i&&e.call(r,t[n],n,t)!==!1;n+=1);}var Rs=e4,t4=Is,r4=Rs,n4=Ds;function i4(t,e,r){t4(t)?r4(t,e,r):n4(t,e,r)}var pf=i4,o4=ji,a4=pf;function s4(t,e,r){var n=t.style;if(o4(e)){n[e]=r;return}a4(e,function(i,o){n[o]=i})}var Ci=s4,l4=Is;function u4(t,e,r){var n,i;if(r=r||0,!l4(e))return-1;if(Array.prototype.indexOf)return Array.prototype.indexOf.call(e,t,r);for(i=e.length,n=r;r>=0&&n<i;n+=1)if(e[n]===t)return n;return-1}var Aa=u4;function c4(t){return t===void 0}var ei=c4,f4=ei;function d4(t){return!t||!t.className?"":f4(t.className.baseVal)?t.className:t.className.baseVal}var bv=d4,p4=Is,h4=ei;function v4(t,e){if(e=p4(e)?e.join(" "):e,e=e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),h4(t.className.baseVal)){t.className=e;return}t.className.baseVal=e}var bx=v4,wx=pf,m4=Aa,g4=bv,y4=bx;function b4(t){var e=Array.prototype.slice.call(arguments,1),r=t.classList,n=[],i;if(r){wx(e,function(o){t.classList.add(o)});return}i=g4(t),i&&(e=[].concat(i.split(/\s+/),e)),wx(e,function(o){m4(o,n)<0&&n.push(o)}),y4(t,n)}var ki=b4,Ex=Rs,w4=Aa,E4=bv,x4=bx;function C4(t){var e=Array.prototype.slice.call(arguments,1),r=t.classList,n,i;if(r){Ex(e,function(o){r.remove(o)});return}n=E4(t).split(/\s+/),i=[],Ex(n,function(o){w4(o,e)<0&&i.push(o)}),x4(t,i)}var ti=C4;function k4(t){return typeof t=="number"||t instanceof Number}var Gi=k4;function T4(t){return t===null}var hf=T4,S4=Ds;function _4(t,e){var r=document.createElement("img"),n="";return S4(e,function(i,o){n+="&"+o+"="+i}),n=n.substring(1),r.src=t+"?"+n,r.style.display="none",document.body.appendChild(r),document.body.removeChild(r),r}var O4=_4,A4=ei,M4=O4,N4=7*24*60*60*1e3;function L4(t){var e=new Date().getTime();return e-t>N4}function D4(t,e){var r="https://www.google-analytics.com/collect",n=location.hostname,i="event",o="use",a="TOAST UI "+t+" for "+n+": Statistics",s=window.localStorage.getItem(a);!A4(window.tui)&&window.tui.usageStatistics===!1||s&&!L4(s)||(window.localStorage.setItem(a,new Date().getTime()),setTimeout(function(){(document.readyState==="interactive"||document.readyState==="complete")&&M4(r,{v:1,t:i,tid:e,cid:n,dp:n,dh:t,el:t,ec:o})},1e3))}var I4=D4,R4=/[\u0020]+/g,P4=/[>(){}[\]+-.!#|]/g,xx=/<([a-zA-Z_][a-zA-Z0-9\-._]*)(\s|[^\\>])*\/?>|<(\/)([a-zA-Z_][a-zA-Z0-9\-._]*)\s*\/?>|<!--[^-]+-->|<([a-zA-Z_][a-zA-Z0-9\-.:/]*)>/g,Cx=/\\[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~\\]/g,B4=/[*_~`]/g,kx=/!\[.*\]\(.*\)/g,$4=/[[\]]/g,Tx=/(?:^|[^\\])\\(?!\\)/g,F4='[&<>"]',Sx=new RegExp(F4,"g");function H4(t){switch(t){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";default:return t}}function Ps(t){return Sx.test(t)?t.replace(Sx,H4):t}function U4(){I4("editor","UA-129966929-1")}function vr(t,e){return t.indexOf(e)!==-1}var z4=["rel","target","hreflang","type"],q4={codeblock:/(^ {4}[^\n]+\n*)+/,thematicBreak:/^ *((\* *){3,}|(- *){3,} *|(_ *){3,}) */,atxHeading:/^(#{1,6}) +[\s\S]+/,seTextheading:/^([^\n]+)\n *(=|-){2,} */,blockquote:/^( *>[^\n]+.*)+/,list:/^ *(\*+|-+|\d+\.) [\s\S]+/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? */,link:/!?\[.*\]\(.*\)/,reflink:/!?\[.*\]\s*\[([^\]]*)\]/,verticalBar:/\u007C/,fencedCodeblock:/^((`|~){3,})/};function _x(t){if(!t)return null;var e={};return z4.forEach(function(r){ei(t[r])||(e[r]=t[r])}),e}function vf(t,e){for(var r="",n=0;n<e;n+=1)r+=t;return r}function V4(t){var e=!1;return Ds(q4,function(r){return r.test(t)&&(e=!0),!e}),e}function mf(t){for(var e=[],r=kx.exec(t);r;)e.push([r.index,r.index+r[0].length]),r=kx.exec(t);return t.replace($4,function(n,i){var o=e.some(function(a){return i>a[0]&&i<a[1]});return o?n:"\\"+n})}function W4(t){var e=function(i){return"\\"+i},r=function(i){return i+"\\"},n=t.replace(R4," ");return Cx.test(n)&&(n=n.replace(Cx,e)),Tx.test(n)&&(n=n.replace(Tx,r)),n=n.replace(B4,e),xx.test(n)&&(n=n.replace(xx,e)),V4(n)&&(n=n.replace(P4,e)),n}function j4(t){var e;return t.indexOf('"')===-1?e='""':e=t.indexOf("'")===-1?"''":"()",e[0]+t+e[1]}function wv(t){return hf(t)||ei(t)}function Ev(t,e){if(t===null&&t===e)return!0;if(typeof t!="object"||typeof e!="object"||wv(t)||wv(e))return t===e;for(var r in t)if(t[r]!==e[r])return!1;for(var r in e)if(!(r in t))return!1;return!0}function Nr(t){return t[t.length-1]}function G4(t,e,r){return t>=e&&t<=r}function xv(t){return typeof t=="object"&&t!==null}function gf(t,e){var r=q({},t);return t&&e&&Object.keys(e).forEach(function(n){xv(r[n])?Array.isArray(e[n])?r[n]=Cv(e[n]):r.hasOwnProperty(n)?r[n]=gf(r[n],e[n]):r[n]=kv(e[n]):r[n]=e[n]}),r}function Cv(t){return t.map(function(e){return xv(e)?Array.isArray(e)?Cv(e):kv(e):e})}function kv(t){var e=Object.keys(t);return e.length?e.reduce(function(r,n){return xv(t[n])?r[n]=Array.isArray(t[n])?Cv(t[n]):kv(t[n]):r[n]=t[n],r},{}):t}function Tv(t,e){return e===void 0&&(e={}),Object.keys(e).forEach(function(r){t.hasOwnProperty(r)&&typeof t[r]=="object"?Array.isArray(e[r])?t[r]=e[r]:Tv(t[r],e[r]):t[r]=e[r]}),t}function Ox(t,e){return t>e?[e,t]:[t,e]}var K4=Rs;function Y4(t){var e;try{e=Array.prototype.slice.call(t)}catch{e=[],K4(t,function(n){e.push(n)})}return e}var Ti=Y4;function yf(t,e){var r=t.nodes.paragraph;return e?r.create(null,ji(e)?t.text(e):e):r.createAndFill()}function mr(t,e,r){return t.text(e,r)}function At(t,e,r){r===void 0&&(r=e);var n=t.doc.content.size,i=n>0?n-1:1;return it.create(t.doc,Math.min(e,i),Math.min(r,i))}function Sv(t,e,r){var n=e.pos;return t.replaceWith(n,n,yf(r)),t.setSelection(At(t,n+1))}function bf(t){for(var e=t.state,r=t.from,n=t.startIndex,i=t.endIndex,o=t.createText,a=e.tr,s=e.doc,u=e.schema,f=n;f<=i;f+=1){var d=s.child(f),p=d.nodeSize,v=d.textContent,m=d.content,g=o(v),E=g?mr(u,g):oe.empty,w=a.mapping.map(r),x=w+m.size;a.replaceWith(w,x,E),r+=p}return a}function _v(t,e,r,n){var i=r.length;t.split(e).delete(e-i,e).insert(t.mapping.map(e),n).setSelection(At(t,t.mapping.map(e)-i))}function pu(t){return t.sourcepos[0][0]}function wf(t){return t.sourcepos[1][0]}function Ef(t){return t.sourcepos[0][1]}function Ho(t){return t.sourcepos[1][1]}function X4(t){var e=t.type;return e==="htmlBlock"||e==="htmlInline"}function J4(t){var e=t.type;return e==="strike"||e==="strong"||e==="emph"||e==="code"||e==="link"||e==="image"}function Z4(t){return t&&t.type==="codeBlock"}function Ma(t){return t&&(t.type==="item"||t.type==="list")}function Ax(t){return Ma(t)&&t.listData.type==="ordered"}function Q4(t){return Ma(t)&&t.listData.type!=="ordered"}function Mx(t){return t&&(t.type==="tableCell"||t.type==="tableDelimCell")}function ez(t){switch(t.type){case"code":case"text":case"emph":case"strong":case"strike":case"link":case"image":case"htmlInline":case"linebreak":case"softbreak":case"customInline":return!0;default:return!1}}function Bs(t,e,r){for(r===void 0&&(r=!0),t=r?t:t.parent;t&&t.type!=="document";){if(e(t))return t;t=t.parent}return null}function tz(t,e,r){for(r===void 0&&(r=!0),t=r?t:t.parent;t&&t.type!=="document";)e(t),t=t.parent}function nr(t,e){return[t[0],t[1]+e]}function Uo(t,e){return[t[0],e]}function rz(t){var e=t.firstChild.literal;switch(t.type){case"emph":return"*"+e+"*";case"strong":return"**"+e+"**";case"strike":return"~~"+e+"~~";case"code":return"`"+e+"`";case"link":case"image":var r=t,n=r.destination,i=r.title,o=t.type==="link"?"":"!";return o+"["+e+"]("+n+(i?' "'+i+'"':"")+")";default:return null}}function nz(t){switch(t.type){case"document":case"blockQuote":case"list":case"item":case"paragraph":case"heading":case"emph":case"strong":case"strike":case"link":case"image":case"table":case"tableHead":case"tableBody":case"tableRow":case"tableCell":case"tableDelimRow":case"customInline":return!0;default:return!1}}function iz(t){for(var e=[],r=t.walker(),n=null;n=r.next();){var i=n.node;i.type==="text"&&e.push(i.literal)}return e.join("")}var hu=[],Nx={},Lx=/\$\$widget\d+\s/;function xf(t){var e=t.search(Lx);if(e!==-1){var r=t.substring(e),n=r.replace(Lx,"").replace("$$","");t=t.substring(0,e),t+=xf(n)}return t}function Dx(t,e){return"$$"+t+" "+e+"$$"}function Ix(t,e){var r=Nx[t],n=r.rule,i=r.toDOM,o=xf(e).match(n);return o&&(e=o[0]),i(e)}function oz(){return hu}function az(t){hu=t,hu.forEach(function(e,r){Nx["widget"+r]=e})}function Ov(t,e,r,n){return t.concat(Na(e,r,n))}function Na(t,e,r){r===void 0&&(r=0);var n=[],i=(hu[r]||{}).rule,o=r+1;if(t=xf(t),i&&i.test(t)){for(var a=void 0;(a=t.search(i))!==-1;){var s=t.substring(0,a);s&&(n=Ov(n,s,e,o)),t=t.substring(a);var u=t.match(i)[0],f="widget"+r;n.push(e.nodes.widget.create({info:f},e.text(Dx(f,u)))),t=t.substring(u.length)}t&&(n=Ov(n,t,e,o))}else t&&(n=r<hu.length-1?Ov(n,t,e,o):[e.text(t)]);return n}function Rx(t){for(var e,r="",n=t.walker();e=n.next();){var i=e.node,o=e.entering;o&&(i!==t&&i.type!=="text"?(r+=rz(i),n.resumeAt(t,!1),n.next()):i.type==="text"&&(r+=i.literal))}return r}function Px(){return{deleteSelection:function(){return uv},selectAll:function(){return ax},undo:function(){return du},redo:function(){return mv}}}function sz(t){return new rn({props:{decorations:function(e){var r=e.doc;if(t.text&&r.childCount===1&&r.firstChild.isTextblock&&r.firstChild.content.size===0){var n=document.createElement("span");return ki(n,"placeholder"),t.className&&ki(n,t.className),n.textContent=t.text,Rt.create(r,[on.widget(1,n)])}return null}}})}var lz=Aa,uz=bv;function cz(t,e){var r;return t.classList?t.classList.contains(e):(r=uz(t).split(/\s+/),lz(e,r)>-1)}var Bx=cz,fz=Aa,dz=Ti,Cf=Element.prototype,pz=Cf.matches||Cf.webkitMatchesSelector||Cf.mozMatchesSelector||Cf.msMatchesSelector||function(t){var e=this.document||this.ownerDocument;return fz(this,dz(e.querySelectorAll(t)))>-1};function hz(t,e){return pz.call(t,e)}var vz=hz,$x="[A-Za-z][A-Za-z0-9-]*",mz="[a-zA-Z_:][a-zA-Z0-9:._-]*",gz="[^\"'=<>`\\x00-\\x20]+",yz="'[^']*'",bz='"[^"]*"',wz="(?:"+gz+"|"+yz+"|"+bz+")",Ez="(?:\\s*=\\s*"+wz+")",Fx="(?:\\s+"+mz+Ez+"?)",Hx="<("+$x+")("+Fx+")*\\s*/?>",xz="</("+$x+")\\s*[>]",Ux="(?:"+Hx+"|"+xz+")",$s=new RegExp("^"+Ux,"i"),Av=/<br\s*\/*>/i,Cz=/<! ---->|<!--(?:-?[^>-])(?:-?[^-])*-->/,zx="</p><p>";function Mv(t,e,r){var n=parseInt(t.left,10),i=parseInt(t.top,10),o=parseInt(t.width,10)+parseInt(t.paddingLeft,10)+parseInt(t.paddingRight,10),a=parseInt(t.height,10)+parseInt(t.paddingTop,10)+parseInt(t.paddingBottom,10);return e>=n&&e<=n+o&&r>=i&&r<=i+a}var qx="toastui-editor-";function _e(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=[],n=0,i=t;n<i.length;n++){var o=i[n],a=void 0;Array.isArray(o)?a=o[0]?o[1]:null:a=o,a&&r.push(""+qx+a)}return r.join(" ")}function Wt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.map(function(r){return qx+"md-"+r}).join(" ")}function kz(t){return(t==null?void 0:t.nodeType)===Node.TEXT_NODE}function kf(t){return t&&t.nodeType===Node.ELEMENT_NODE}function Tz(t,e){var r=Ti(t.querySelectorAll(e));return r.length?r:[]}function Sz(t,e){e=Is(e)?Ti(e):[e],e.forEach(function(r){t.appendChild(r)})}function _z(t,e){e.parentNode&&e.parentNode.insertBefore(t,e)}function La(t){t.parentNode&&t.parentNode.removeChild(t)}function Oz(t){for(var e=[];t.firstChild;)e.push(t.firstChild),t.parentNode&&t.parentNode.insertBefore(t.firstChild,t);return La(t),e}function Nv(t,e,r){ei(r)&&(r=!Bx(t,e));var n=r?ki:ti;n(t,e)}function Vx(t,e){var r=document.createElement("div");ji(t)?r.innerHTML=t:r.appendChild(t);var n=r.firstChild;return e&&e.appendChild(n),n}function Lv(t){var e=window.getComputedStyle(t);return["margin-left","margin-right"].reduce(function(r,n){return r+parseInt(e.getPropertyValue(n),10)},0)+t.offsetWidth}function Si(t,e){var r;for(ji(e)?r=function(n){return vz(n,e)}:r=function(n){return n===e};t&&t!==document;){if(kf(t)&&r(t))return t;t=t.parentNode}return null}function Wx(t,e){for(var r=0,n=0;t&&t!==e;){var i=t.offsetTop,o=t.offsetLeft,a=t.offsetParent;if(r+=i,n+=o,a===e.offsetParent)break;t=t.offsetParent}return{offsetTop:r,offsetLeft:n}}function Dv(t,e){Object.keys(t).forEach(function(r){wv(t[r])?e.removeAttribute(r):e.setAttribute(r,t[r])})}function Az(t){var e=t.replace(/<p><br\s*\/*><\/p>/gi,"<p></p>"),r=new RegExp(Ux,"ig"),n=e.match(r);return n==null||n.forEach(function(i,o){if(Av.test(i)){var a=zx;if(o){var s=n[o-1],u=s.match(Hx);if(u&&!/br/i.test(u[1])){var f=u[1];a="</"+f+"><"+f+">"}}e=e.replace(Av,a)}}),e}function Iv(t){var e=/<img class="ProseMirror-separator" alt="">/g,r=/ class="ProseMirror-trailingBreak"/g,n=t;return n=n.replace(e,""),n=n.replace(r,""),n}var jx=new eu("widget"),Gx=5,Mz=function(){function t(e,r){var n=this;this.popup=null,this.removeWidget=function(){n.popup&&(n.rootEl.removeChild(n.popup),n.popup=null)},this.rootEl=e.dom.parentElement,this.eventEmitter=r,this.eventEmitter.listen("blur",this.removeWidget),this.eventEmitter.listen("loadUI",function(){n.rootEl=Si(e.dom.parentElement,"."+_e("defaultUI"))}),this.eventEmitter.listen("removePopupWidget",this.removeWidget)}return t.prototype.update=function(e){var r=jx.getState(e.state);if(this.removeWidget(),r){var n=r.node,i=r.style,o=e.coordsAtPos(r.pos),a=o.top,s=o.left,u=o.bottom,f=u-a,d=this.rootEl.getBoundingClientRect(),p=a-d.top;Ci(n,{opacity:"0"}),this.rootEl.appendChild(n),Ci(n,{position:"absolute",left:s-d.left+Gx+"px",top:(i==="bottom"?p+f-Gx:p-f)+"px",opacity:"1"}),this.popup=n,e.focus()}},t.prototype.destroy=function(){this.eventEmitter.removeEventHandler("blur",this.removeWidget)},t}();function Nz(t){return new rn({key:jx,state:{init:function(){return null},apply:function(e){return e.getMeta("widget")}},view:function(e){return new Mz(e,t)}})}function Lz(t){t.listen("addImageBlobHook",function(e,r){var n=new FileReader;n.onload=function(i){var o=i.target;return r(o.result)},n.readAsDataURL(e)})}function Rv(t,e,r){var n=function(i,o){t.emit("command","addImage",{imageUrl:i,altText:o||e.name||"image"})};t.emit("addImageBlobHook",e,n,r)}function Kx(t){var e=Ti(t).filter(function(n){var i=n.type;return i.indexOf("image")!==-1});if(e.length===1){var r=e[0];if(r)return r.getAsFile()}return null}function Dz(t){var e=t.eventEmitter;return new rn({props:{handleDOMEvents:{drop:function(r,n){var i,o=(i=n.dataTransfer)===null||i===void 0?void 0:i.files;return o&&Rs(o,function(a){return a.type.indexOf("image")!==-1?(n.preventDefault(),n.stopPropagation(),Rv(e,a,n.type),!1):!0}),!0}}}})}var Tt=function(){function t(){}return Object.defineProperty(t.prototype,"type",{get:function(){return"node"},enumerable:!1,configurable:!0}),t.prototype.setContext=function(e){this.context=e},t}();function Yx(t){var e=document.createElement("span"),r=Ix(t.attrs.info,t.textContent);return e.className="tui-widget",e.appendChild(r),{dom:e}}function Pv(t){return t.type.name==="widget"}var Xx=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"widget"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:{info:{default:null}},group:"inline",inline:!0,content:"text*",selectable:!1,atom:!0,toDOM:function(){return["span",{class:"tui-widget"},0]},parseDOM:[{tag:"span.tui-widget",getAttrs:function(r){var n=r.textContent,i=n.match(/\$\$(widget\d+)/),o=i[1];return{info:o}}}]}},enumerable:!1,configurable:!0}),e}(Tt),Jx=function(){function t(e){this.timer=null,this.el=document.createElement("div"),this.el.className="toastui-editor",this.eventEmitter=e,this.placeholder={text:""}}return t.prototype.createState=function(){return Ea.create({schema:this.schema,plugins:this.createPlugins()})},t.prototype.initEvent=function(){var e=this,r=e.eventEmitter,n=e.view,i=e.editorType;n.dom.addEventListener("focus",function(){return r.emit("focus",i)}),n.dom.addEventListener("blur",function(){return r.emit("blur",i)})},t.prototype.emitChangeEvent=function(e){this.eventEmitter.emit("caretChange",this.editorType),e.docChanged&&this.eventEmitter.emit("change",this.editorType)},Object.defineProperty(t.prototype,"defaultPlugins",{get:function(){var e=this.createInputRules(),r=an(an([],this.keymaps),[cu(q({"Shift-Enter":fx.Enter},fx)),gx(),sz(this.placeholder),Nz(this.eventEmitter),Dz(this.context)]);return e?r.concat(e):r},enumerable:!1,configurable:!0}),t.prototype.createInputRules=function(){var e=oz(),r=e.map(function(n){var i=n.rule;return new Bo(i,function(o,a,s,u){var f=o.schema,d=o.tr,p=o.doc,v=a.input.match(new RegExp(i,"g")),m=p.resolve(s),g=m.parent,E=0;if(Pv(g)&&(g=m.node(m.depth-1)),g.forEach(function(k){return Pv(k)&&(E+=1)}),v.length>E){var w=Nr(v),x=Na(w,f);return d.replaceWith(u-w.length+1,u,x)}return null})});return r.length?dx({rules:r}):null},t.prototype.clearTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},t.prototype.createSchema=function(){return new c1({nodes:this.specs.nodes,marks:this.specs.marks})},t.prototype.createKeymaps=function(e){var r=Px(),n=r.undo,i=r.redo,o=this.specs.keymaps(e),a={"Mod-z":n(),"Shift-Mod-z":i()};return e?o.concat(cu(a)):o},t.prototype.createCommands=function(){return this.specs.commands(this.view)},t.prototype.createPluginProps=function(){var e=this;return this.extraPlugins.map(function(r){return r(e.eventEmitter)})},t.prototype.focus=function(){var e=this;this.clearTimer(),this.timer=setTimeout(function(){e.view.focus(),e.view.dispatch(e.view.state.tr.scrollIntoView())})},t.prototype.blur=function(){this.view.dom.blur()},t.prototype.destroy=function(){var e=this;this.clearTimer(),this.view.destroy(),Object.keys(this).forEach(function(r){delete e[r]})},t.prototype.moveCursorToStart=function(e){var r=this.view.state.tr;this.view.dispatch(r.setSelection(At(r,1)).scrollIntoView()),e&&this.focus()},t.prototype.moveCursorToEnd=function(e){var r=this.view.state.tr;this.view.dispatch(r.setSelection(At(r,r.doc.content.size-1)).scrollIntoView()),e&&this.focus()},t.prototype.setScrollTop=function(e){this.view.dom.scrollTop=e},t.prototype.getScrollTop=function(){return this.view.dom.scrollTop},t.prototype.setPlaceholder=function(e){this.placeholder.text=e,this.view.dispatch(this.view.state.tr.scrollIntoView())},t.prototype.setHeight=function(e){Ci(this.el,{height:e+"px"})},t.prototype.setMinHeight=function(e){Ci(this.el,{minHeight:e+"px"})},t.prototype.getElement=function(){return this.el},t}();function Iz(t){return t instanceof Function}var $n=Iz,Rz=["Enter","Shift-Enter","Mod-Enter","Tab","Shift-Tab","Delete","Backspace","Mod-Delete","Mod-Backspace","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Mod-d","Mod-D","Alt-ArrowUp","Alt-ArrowDown"];function Tf(t,e,r){return t.focus(),e(r)(t.state,t.dispatch,t)}var Zx=function(){function t(e){this.specs=e}return Object.defineProperty(t.prototype,"nodes",{get:function(){return this.specs.filter(function(e){return e.type==="node"}).reduce(function(e,r){var n,i=r.name,o=r.schema;return q(q({},e),(n={},n[i]=o,n))},{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"marks",{get:function(){return this.specs.filter(function(e){return e.type==="mark"}).reduce(function(e,r){var n,i=r.name,o=r.schema;return q(q({},e),(n={},n[i]=o,n))},{})},enumerable:!1,configurable:!0}),t.prototype.commands=function(e,r){var n=this.specs.filter(function(o){var a=o.commands;return a}).reduce(function(o,a){var s={},u=a.commands();return $n(u)?s[a.name]=function(f){return Tf(e,u,f)}:Object.keys(u).forEach(function(f){s[f]=function(d){return Tf(e,u[f],d)}}),q(q({},o),s)},{}),i=Px();return Object.keys(i).forEach(function(o){n[o]=function(a){return Tf(e,i[o],a)}}),r&&Object.keys(r).forEach(function(o){n[o]=function(a){return Tf(e,r[o],a)}}),n},t.prototype.keymaps=function(e){var r=this.specs.filter(function(n){return n.keymaps}).map(function(n){return n.keymaps()});return r.map(function(n){return e||Object.keys(n).forEach(function(i){vr(Rz,i)||delete n[i]}),cu(n)})},t.prototype.setContext=function(e){this.specs.forEach(function(r){r.setContext(e)})},t}();function Qx(t){var e=t.from,r=t.to;return t instanceof Hr?[e+1,r-1]:[e,r]}function eC(t){return t.index(0)+1}function Fs(t,e,r){r===void 0&&(r=1);var n=0;return t.forEach(function(i,o){Pv(i)&&o+2<e&&(n+=2*r)}),n}function Sf(t,e,r){r===void 0&&(r=e);var n=e===r,i=t.resolve(e),o=eC(i),a=o,s=i.start(1),u=s;if(!n){var f=t.resolve(r===t.content.size?r-1:r);u=f.start(1),a=eC(f),f.pos===t.content.size&&(r=t.content.size-2)}var d=Math.max(e-s+1,1),p=Math.max(r-u+1,1);return[[o,d+Fs(t.child(o-1),d,-1)],[a,p+Fs(t.child(a-1),p,-1)]]}function tC(t,e){for(var r=[],n=0,i=0;n<e;n+=1){var o=t.child(n);r[n]=i,i+=o.nodeSize}return r}function Da(t,e,r){var n=tC(t,r[0]),i=e[0]-1,o=r[0]-1,a=t.child(i),s=t.child(o),u=n[i],f=n[o];return u+=e[1]+Fs(a,e[1]-1),f+=r[1]+Fs(s,r[1]-1),[u,Math.min(f,t.content.size)]}function jt(t){var e=t.$from,r=t.$to,n=t.from,i=t.to,o=e.doc;return t instanceof Hr&&(e=o.resolve(n+1),r=o.resolve(i-1)),e.depth===0&&(e=o.resolve(n-1),r=e),{startFromOffset:e.start(1),endFromOffset:r.start(1),startToOffset:e.end(1),endToOffset:r.end(1),startIndex:e.index(0),endIndex:r.index(0),from:e.pos,to:r.pos}}function _f(t,e){for(var r=1,n=1,i=0,o=0;i<t.childCount;i+=1){var a=t.child(i).nodeSize;if(r=o+1,n=o+a-1,i===e)break;o+=a}return{startOffset:r,endOffset:n}}var rC="heading",Pz="blockQuote",Bz="listItem",$z="table",Fz="tableCell",Hz="codeBlock",Uz="thematicBreak",Of="link",Af="code",Mf="meta",Ia="delimiter",zz="taskDelimiter",Bv="markedText",qz="html",Vz="customBlock",nC={strong:2,emph:1,strike:2};function vt(t,e,r,n){return{start:t,end:e,spec:{type:r,attrs:n}}}function Wz(t,e,r){var n=t.level,i=t.headingType,o=[vt(e,r,rC,{level:n})];return i==="atx"?o.push(vt(e,nr(e,n),Ia)):o.push(vt(Uo(r,0),r,rC,{seText:!0})),o}function $v(t,e,r){var n=t.type,i=nr(e,nC[n]),o=nr(r,-nC[n]);return[vt(i,o,n),vt(e,i,Ia),vt(o,r,Ia)]}function iC(t,e,r,n){return[vt(t,e,Of),vt(Uo(t,r[1]+1),Uo(e,n),Of,{desc:!0}),vt(Uo(e,n+2),nr(e,-1),Of,{url:!0})]}function jz(t,e,r){var n=t.lastChild,i=n?Ho(n)+1:3,o=nr(e,1);return an([vt(e,o,Mf)],iC(e,r,o,i))}function Gz(t,e,r){var n=t.lastChild,i=t.extendedAutolink,o=n?Ho(n)+1:2;return i?[vt(e,r,Of,{desc:!0})]:iC(e,r,e,o)}function Kz(t,e,r){var n=t.tickCount,i=nr(e,n),o=nr(r,-n);return[vt(e,r,Af),vt(e,i,Af,{start:!0}),vt(i,o,Af,{marked:!0}),vt(o,r,Af,{end:!0})]}function oC(t,e,r,n){var i={start:e,end:r,spec:{attrs:{className:n+"-line-background",codeStart:e[0],codeEnd:r[0]}},lineBackground:!0};return t.type!=="item"&&t.type!=="blockQuote"?[q(q({},i),{end:e,spec:{attrs:{className:n+"-line-background start"}}}),q(q({},i),{start:[Math.min(e[0]+1,r[0]),e[1]]})]:null}function Yz(t,e,r,n){var i=t.fenceOffset,o=t.fenceLength,a=t.fenceChar,s=t.info,u=t.infoPadding,f=t.parent,d=i+o,p=[vt(Uo(e,1),r,Hz)];a&&p.push(vt(e,nr(e,d),Ia)),s&&p.push(vt(nr(e,o),nr(e,o+u+s.length),Mf));var v="^(\\s{0,4})("+a+"{"+o+",})",m=new RegExp(v);m.test(n)&&p.push(vt(Uo(r,1),r,Ia));var g=oC(f,e,r,"code-block");return g?p.concat(g):p}function Xz(t,e,r){var n=t,i=n.offset,o=n.syntaxLength,a=n.info,s=n.parent,u=i+o,f=[vt(Uo(e,1),r,Vz)];f.push(vt(e,nr(e,u),Ia)),a&&f.push(vt(nr(e,u),nr(e,o+a.length),Mf)),f.push(vt(Uo(r,1),r,Ia));var d=oC(s,e,r,"custom-block");return d?f.concat(d):f}function aC(t,e){for(var r=[];t;){var n=t.type;(n==="paragraph"||n==="codeBlock")&&r.push(vt([pu(t),Ef(t)-1],[wf(t),Ho(t)+1],e)),t=t.next}return r}function Jz(t){for(var e=[];t;)e.push(vt([pu(t),Ef(t)],[wf(t),Ho(t)+1],Bv)),t=t.next;return e}function Zz(t,e,r){var n=t.parent&&t.parent.type!=="blockQuote"?[vt(e,r,Pz)]:[];if(t.firstChild){var i=[];t.firstChild.type==="paragraph"?i=Jz(t.firstChild.firstChild):t.firstChild.type==="list"&&(i=aC(t.firstChild,Bv)),n=an(an([],n),i)}return n}function Qz(t){for(var e=0;t.parent.parent&&t.parent.parent.type==="item";)t=t.parent.parent,e+=1;var r=[{odd:!0},{even:!0}][e%2];return[Bz,q(q({},r),{listStyle:!0})]}function e5(t,e){var r=t.listData,n=r.padding,i=r.task,o=Qz(t),a=[vt.apply(void 0,an([e,nr(e,n)],o))];return i&&(a.push(vt(nr(e,n),nr(e,n+3),zz)),a.push(vt(nr(e,n+1),nr(e,n+2),Mf))),a.concat(aC(t.firstChild,Bv))}var sC={heading:Wz,strong:$v,emph:$v,strike:$v,link:Gz,image:jz,code:Kz,codeBlock:Yz,blockQuote:Zz,item:e5,customBlock:Xz},lC={thematicBreak:Uz,table:$z,tableCell:Fz,htmlInline:qz};function t5(t,e,r,n){var i=t.type;return $n(sC[i])?sC[i](t,e,r,n):lC[i]?[vt(e,r,lC[i])]:null}var vu={};function r5(t){var e=t.schema,r=t.toastMark;return new rn({appendTransaction:function(n,i,o){var a=n[0],s=o.tr;if(a.docChanged){var u=[],f=a.getMeta("editResult");f.forEach(function(d){var p=d.nodes,v=d.removedNodeRange;if(p.length){u=u.concat(l5(s,p));for(var m=0,g=p;m<g.length;m++)for(var E=g[m],w=E.walker(),x=w.next();x;){var k=x.node,_=x.entering;_&&(u=u.concat(u5(k,r))),x=w.next()}}else if(v)for(var O=s.doc.childCount-1,N=v.line,L=N[0],A=N[1],P=Math.min(L,O),U=Math.min(A,O),J=P;J<=U;J+=1)vu[J]=!0}),o5(s,e,u)}return s.setMeta("widget",a.getMeta("widget"))}})}function n5(t,e,r){return Object.keys(r).some(function(n){return r[n]!==t.child(e).attrs[n]})}function i5(t,e,r,n,i){i===void 0&&(i={});for(var o=n.startIndex,a=n.endIndex,s=n.from,u=n.to,f=!1,d=o;d<=a;d+=1)delete vu[d],f=n5(e,d,i);f&&t.setBlockType(s,u,r,i)}function o5(t,e,r){var n=t.doc,i=e.nodes.paragraph,o=tC(n,n.childCount);r.forEach(function(a){var s=a.start,u=a.end,f=a.spec,d=a.lineBackground,p=Math.min(s[0],n.childCount)-1,v=Math.min(u[0],n.childCount)-1,m=n.child(p),g=n.child(v),E=o[p],w=o[v];if(E+=s[1]+Fs(m,s[1]-1),w+=u[1]+Fs(g,u[1]-1),f)if(d){var x={from:E,to:w,startIndex:p,endIndex:v};i5(t,n,i,x,f.attrs)}else t.addMark(E,w,e.mark(f.type,f.attrs));else t.removeMark(E,w)}),a5(t,o,i)}function a5(t,e,r){Object.keys(vu).forEach(function(n){var i=Number(n),o=Math.min(Number(n)+1,t.doc.childCount-1),a=e[i],s=e[o]-1;i===o&&(s+=2),t.setBlockType(a,s,r)})}function s5(t,e,r){var n=[];vu={};for(var i=e[0]-1;i<r[0];i+=1){var o=t.child(i),a=o.attrs.codeEnd,s=o.attrs.codeStart;if(s&&a&&!vr(n,s)){n.push(s),a=Math.min(a,t.childCount);for(var u=s-1,f=r[0],d=u;d<f;d+=1)vu[d]=!0}}}function l5(t,e){var r=t.doc,n=e[0].sourcepos[0],i=Nr(e).sourcepos,o=i[1],a=[n[0],n[1]],s=[o[0],o[1]+1],u=[];return s5(r,n,o),u.push({start:a,end:s}),u}function u5(t,e){var r=e.getLineTexts(),n=[pu(t),Ef(t)],i=[wf(t),Ho(t)+1],o=t5(t,n,i,r[i[0]-1]);return o??[]}var c5=["taskList","orderedList","bulletList","table","strong","emph","strike","heading","thematicBreak","blockQuote","code","codeBlock","indent","outdent"];function f5(t){var e=t.type;return Ma(t)?t.listData.task?"taskList":t.listData.type==="ordered"?"orderedList":"bulletList":e.indexOf("table")!==-1?"table":vr(c5,e)?e:null}function d5(t){var e={indent:{active:!1,disabled:!0},outdent:{active:!1,disabled:!0}},r=!0;return tz(t,function(n){var i=f5(n);i&&(i==="bulletList"||i==="orderedList"?r&&(e[i]={active:!0},e.indent.disabled=!1,e.outdent.disabled=!1,r=!1):e[i]={active:!0})}),e}function p5(t){var e=t.toastMark,r=t.eventEmitter;return new rn({view:function(){return{update:function(n,i){var o=n.state,a=o.doc,s=o.selection;if(!(i&&i.doc.eq(a)&&i.selection.eq(s))){var u=s.from,f=o.doc.resolve(u).start(),d=o.doc.content.findIndex(u).index+1,p=u-f;u===f&&(p+=1);var v=[d,p],m=e.findNodeAtPosition(v),g=d5(m);r.emit("changeToolbarState",{cursorPos:v,mdNode:m,toolbarState:g}),r.emit("setFocusedNode",m)}}}}})}var h5=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"doc"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"block+"}},enumerable:!1,configurable:!0}),e}(Tt),Mt=function(){function t(){}return Object.defineProperty(t.prototype,"type",{get:function(){return"mark"},enumerable:!1,configurable:!0}),t.prototype.setContext=function(e){this.context=e},t}();function yn(t,e){return zo(t,e-1)}function zo(t,e){return t.child(e).textContent}var mu=/^\s*> ?/,v5=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"blockQuote"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Wt("block-quote")},0]}}},enumerable:!1,configurable:!0}),e.prototype.createBlockQuoteText=function(r,n){return n?r.replace(mu,"").trim():"> "+r.trim()},e.prototype.extendBlockQuote=function(){var r=this;return function(n,i){var o=n.selection,a=n.doc,s=n.tr,u=n.schema,f=jt(o),d=f.endFromOffset,p=f.endToOffset,v=f.endIndex,m=f.to,g=zo(a,v),E=mu.test(g);if(E&&m>d&&o.empty){var w=!g.replace(mu,"").trim();if(w)s.deleteRange(d,p).split(s.mapping.map(p));else{var x=g.slice(m-d).trim(),k=mr(u,r.createBlockQuoteText(x));_v(s,p,x,k)}return i(s),!0}return!1}},e.prototype.commands=function(){var r=this;return function(){return function(n,i){var o=n.selection,a=n.doc,s=jt(o),u=s.startFromOffset,f=s.endToOffset,d=s.startIndex,p=s.endIndex,v=mu.test(zo(a,d)),m=bf({state:n,startIndex:d,endIndex:p,from:u,createText:function(g){return r.createBlockQuoteText(g,v)}});return i(m.setSelection(At(m,m.mapping.map(f)))),!0}}},e.prototype.keymaps=function(){var r=this.commands()();return{"alt-q":r,"alt-Q":r,Enter:this.extendBlockQuote()}},e}(Mt),Ra=/(^\s*)([-*+] |[\d]+\. )/,Fv=/(^\s*)([\d])+\.( \[[ xX]])? /,Ki=/^(\s*)((\d+)([.)]\s(?:\[(?:x|\s)\]\s)?))(.*)/,Nf=/(^\s*)([-*+]|[\d]+\.)( \[[ xX]])? /,m5=/^(\s*)([-*+]+(\s(?:\[(?:x|\s)\]\s)?))(.*)/,g5=/(^\s*)([-*+] |[\d]+\. )(\[[ xX]] )/,y5=/(^\s*)([-*+])( \[[ xX]]) /;function Hv(t){return Fv.test(t)?"ordered":"bullet"}function Uv(t){for(var e=0;t&&t.type!=="document";)t.type==="list"&&(e+=1),t=t.parent;return e}function zv(t,e,r,n){for(var i=t.getLineTexts(),o=i.length,a=[],s=e;n?s<o:s>1;){s=n?s+1:s-1;var u=t.findFirstNodeAtLine(s),f=Uv(u);if(f===r)a.push({line:s,depth:r,mdNode:u});else if(f<r)break}return a}function b5(t){var e=t.toastMark,r=t.mdNode,n=t.line,i=Uv(r),o=zv(e,n,i,!1).reverse(),a=zv(e,n,i,!0);return o.concat([{line:n,depth:i,mdNode:r}]).concat(a)}function w5(t){if(!Ra.test(t))return"* "+t;var e=Hv(t);return e==="bullet"&&Nf.test(t)?t=t.replace(y5,"$1$2 "):e==="ordered"&&(t=t.replace(Fv,"$1* ")),t}function E5(t,e){if(!Ra.test(t))return e+". "+t;var r=Hv(t);if(r==="bullet"||r==="ordered"&&Nf.test(t))t=t.replace(Nf,"$1"+e+". ");else if(r==="ordered"){var n=Ki.exec(t)[3];Number(n)!==e&&(t=t.replace(Fv,"$1"+e+". "))}return t}function uC(t,e,r,n){n===void 0&&(n=0);var i=Number.MAX_VALUE,o=0,a=e.map(function(s,u){var f=s.line;i=Math.min(f-1,i),o=Math.max(f-1,o);var d=yn(t,f);return d=r==="bullet"?w5(d):E5(d,u+1+n),{text:d,line:f}});return{changedResults:a,firstIndex:i,lastIndex:o}}function cC(t,e){var r=b5(e);return uC(e.doc,r,t)}var x5={bullet:function(t){return cC("bullet",t)},ordered:function(t){return cC("ordered",t)},task:function(t){var e=t.mdNode,r=t.doc,n=t.line,i=yn(r,n);return e.listData.task?i=i.replace(g5,"$1$2"):Ma(e)&&(i=i.replace(Ra,"$1$2[ ] ")),{changedResults:[{text:i,line:n}]}}},C5={bullet:function(t){var e=t.doc,r=t.line,n=yn(e,r),i=[{text:"* "+n,line:r}];return{changedResults:i}},ordered:function(t){for(var e=t.toastMark,r=t.doc,n=t.line,i=t.startLine,o=yn(r,n),a=1,s=i,u=0,f=i-1;f>0;f-=1){var d=e.findFirstNodeAtLine(f),p=yn(r,f),v=p&&!!Bs(d,function(_){return Ma(_)}),m=Ki.exec(yn(r,f));if(!m&&!v)break;if(!m&&v){u+=1;continue}var g=m,E=g[1],w=g[3];if(!E){a=Number(w),s=f;break}}var x=a+n-s-u,k=[{text:x+". "+o,line:n}];return{changedResults:k}},task:function(t){var e=t.doc,r=t.line,n=yn(e,r),i=[{text:"* [ ] "+n,line:r}];return{changedResults:i}}},k5={bullet:function(t){var e=t.line,r=t.doc,n=yn(r,e),i=m5.exec(n),o=i[1],a=i[2];return{listSyntax:""+o+a}},ordered:function(t){var e=t.toastMark,r=t.line,n=t.mdNode,i=t.doc,o=Uv(n),a=yn(i,r),s=Ki.exec(a),u=s[1],f=s[3],d=s[4],p=Number(f)+1,v=""+u+p+d,m=zv(e,r,o,!0),g=m.filter(function(E){var w=Ki.exec(yn(i,E.line));return w&&w[1].length===u.length&&!!Bs(E.mdNode,function(x){return Ax(x)})});return q({listSyntax:v},uC(i,g,"ordered",p))}};function fC(t,e,r,n,i){for(var o=[],a=yn(t,r),s=Ki.exec(a);s;){var u=s[1],f=s[4],d=s[5],p=u.length;if(p===i)o.push(mr(e,""+u+n+f+d)),n+=1,r+=1;else if(p>i){var v=fC(t,e,r,1,p);r=v.line,o=o.concat(v.nodes)}if(p<i||r>t.childCount)break;a=yn(t,r),s=Ki.exec(a)}return{nodes:o,line:r}}var dC=/(^\s{1,4})(.*)/;function pC(t,e,r){return t<e||Ra.test(r)||mu.test(r)}function hC(t,e,r){var n=r.$from;n.depth===0&&(n=t.resolve(n.pos-1));var i=n.node(1),o=n.start(1),a=i.content.size;return i.rangeHasMark(0,a,e.marks.table)&&n.pos-o!==a&&n.pos!==o}function vC(t,e){var r=e.from,n=e.to;if(e.type==="indent"){var i=4;r+=i,n+=(e.lineLen+1)*i}else{var o=e.spaceLenList;r-=o[0];for(var a=0;a<o.length;a+=1)n-=o[a]}return At(t,r,n)}var T5=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"paragraph"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"inline*",attrs:{className:{default:null},codeStart:{default:null},codeEnd:{default:null}},selectable:!1,group:"block",parseDOM:[{tag:"div"}],toDOM:function(r){var n=r.attrs;return n.className?["div",{class:Wt(n.className)},0]:["div",0]}}},enumerable:!1,configurable:!0}),e.prototype.reorderList=function(r,n){for(var i=this.context,o=i.view,a=i.toastMark,s=i.schema,u=o.state,f=u.tr,d=u.selection,p=u.doc,v=a.findFirstNodeAtLine(r),m=v;v&&!Q4(v)&&v.parent.type!=="document";)if(v=v.parent,Ax(v)){m=v;break}m&&(r=m.sourcepos[0][0]);var g=Ki.exec(yn(p,r)),E=g[1],w=g[3],x=E.length,k=fC(p,s,r,Number(w),x),_=k.line,O=k.nodes;n=Math.max(n,_-1);for(var N=_f(p,r-1).startOffset,L=r-1;L<=n-1;L+=1){var A=p.child(L),P=A.nodeSize,U=A.content,J=f.mapping.map(N),re=J+U.size;f.replaceWith(J,re,O[L-r+1]),N+=P}var Se=At(f,d.from,d.to);o.dispatch(f.setSelection(Se))},e.prototype.indent=function(r){var n=this;return r===void 0&&(r=!1),function(){return function(i,o){var a=i.schema,s=i.selection,u=i.doc,f=jt(s),d=f.from,p=f.to,v=f.startFromOffset,m=f.startIndex,g=f.endIndex;if(r&&hC(u,a,s))return!1;var E=zo(u,m);if(r&&pC(d,p,E)||!r&&Ra.test(E)){var w=bf({state:i,from:v,startIndex:m,endIndex:g,createText:function(k){return" "+k}}),x={type:"indent",from:d,to:p,lineLen:g-m};o(w.setSelection(vC(w,x))),Ki.test(E)&&n.reorderList(m+1,g+1)}else r&&o(i.tr.insert(p,mr(a," ")));return!0}}},e.prototype.outdent=function(r){var n=this;return r===void 0&&(r=!1),function(){return function(i,o){var a=i.selection,s=i.doc,u=i.schema,f=jt(a),d=f.from,p=f.to,v=f.startFromOffset,m=f.startIndex,g=f.endIndex;if(r&&hC(s,u,a))return!1;var E=zo(s,m);if(r&&pC(d,p,E)||!r&&Ra.test(E)){var w=[],x=bf({state:i,from:v,startIndex:m,endIndex:g,createText:function(L){var A=dC.exec(L);return w.push(A?A[1].length:0),L.replace(dC,"$2")}}),k={type:"outdent",from:d,to:p,spaceLenList:w};o(x.setSelection(vC(x,k))),Ki.test(E)&&n.reorderList(m+1,g+1)}else if(r){var _=E.slice(0,p-v),O=_.replace(/\s{1,4}$/,""),N=p-(_.length-O.length);o(i.tr.delete(N,p))}return!0}}},e.prototype.deleteLines=function(){var r=this;return function(n,i){var o=r.context.view,a=jt(n.selection),s=a.startFromOffset,u=a.endToOffset,f=function(){return i(n.tr.deleteRange(s,u)),!0};return cf(f,nx)(n,i,o)}},e.prototype.moveDown=function(){return function(r,n){var i=r.doc,o=r.tr,a=r.selection,s=r.schema,u=jt(a),f=u.startFromOffset,d=u.endToOffset,p=u.endIndex;if(p<i.content.childCount-1){var v=i.child(p+1),m=v.nodeSize,g=v.textContent;return o.delete(d,d+m).split(f).insert(o.mapping.map(f)-2,mr(s,g)),n(o),!0}return!1}},e.prototype.moveUp=function(){return function(r,n){var i=r.tr,o=r.doc,a=r.selection,s=r.schema,u=jt(a),f=u.startFromOffset,d=u.endToOffset,p=u.startIndex;if(p>0){var v=o.child(p-1),m=v.nodeSize,g=v.textContent;return i.delete(f-m,f).split(i.mapping.map(d)).insert(i.mapping.map(d),mr(s,g)),n(i),!0}return!1}},e.prototype.commands=function(){return{indent:this.indent(),outdent:this.outdent()}},e.prototype.keymaps=function(){return{Tab:this.indent(!0)(),"Shift-Tab":this.outdent(!0)(),"Mod-d":this.deleteLines(),"Mod-D":this.deleteLines(),"Alt-ArrowUp":this.moveUp(),"Alt-ArrowDown":this.moveDown()}},e}(Tt),S5=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"text"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{group:"inline"}},enumerable:!1,configurable:!0}),e}(Tt),_5=/^#{1,6}\s/,O5=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"heading"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:{level:{default:1},seText:{default:!1}},toDOM:function(r){var n=r.attrs,i=n.level,o=n.seText,a="heading|heading"+i;return o&&(a+="|delimiter|setext"),["span",{class:Wt.apply(void 0,a.split("|"))},0]}}},enumerable:!1,configurable:!0}),e.prototype.createHeadingText=function(r,n,i){for(var o=n.replace(i,"").trim(),a="";r>0;)a+="#",r-=1;return a+" "+o},e.prototype.commands=function(){var r=this;return function(n){return function(i,o){var a=n.level,s=jt(i.selection),u=s.startFromOffset,f=s.endToOffset,d=s.startIndex,p=s.endIndex,v=bf({state:i,from:u,startIndex:d,endIndex:p,createText:function(m){var g=m.match(_5),E=g?g[0]:"";return r.createHeadingText(a,m,E)}});return o(v.setSelection(At(v,v.mapping.map(f)))),!0}}},e}(Mt),qv="```",A5=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"codeBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Wt("code-block")},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(r,n){var i=r.selection,o=r.schema,a=r.tr,s=jt(i),u=s.startFromOffset,f=s.endToOffset,d=mr(o,qv);return a.insert(u,d).split(u+qv.length),a.split(a.mapping.map(f)).insert(a.mapping.map(f),d),n(a.setSelection(At(a,a.mapping.map(f)-(qv.length+2)))),!0}}},e.prototype.keepIndentation=function(){var r=this;return function(n,i){var o=n.selection,a=n.tr,s=n.doc,u=n.schema,f=r.context.toastMark,d=jt(o),p=d.startFromOffset,v=d.endToOffset,m=d.endIndex,g=d.from,E=d.to,w=zo(s,m);if(g===E&&w.trim()){var x=w.match(/^\s+/),k=f.findFirstNodeAtLine(m+1);if(Z4(k)&&x){var _=x[0],O=w.slice(E-p),N=mr(u,_+O);return _v(a,v,O,N),i(a),!0}}return!1}},e.prototype.keymaps=function(){var r=this.commands()();return{"Shift-Mod-p":r,"Shift-Mod-P":r,Enter:this.keepIndentation()}},e}(Mt),M5=/\||\s/g;function N5(t){return[Lf(t),Lf(t,!0)]}function L5(t,e){for(var r=[],n=0;n<e;n+=1)r.push(Lf(t));return r}function Lf(t,e){for(var r="|",n=0;n<t;n+=1)r+=e?" --- |":" |";return r}function D5(t){return t?{type:"next",parentType:"tableHead",childType:"firstChild"}:{type:"prev",parentType:"tableBody",childType:"lastChild"}}var I5=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"table"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Wt("table")},0]}}},enumerable:!1,configurable:!0}),e.prototype.extendTable=function(){var r=this;return function(n,i){var o=n.selection,a=n.doc,s=n.tr,u=n.schema;if(!o.empty)return!1;var f=jt(o),d=f.endFromOffset,p=f.endToOffset,v=f.endIndex,m=f.to,g=zo(a,v),E=[v+1,m-d+1],w=r.context.toastMark.findNodeAtPosition(E),x=Bs(w,function(L){return Mx(L)&&(L.parent.type==="tableDelimRow"||L.parent.parent.type==="tableBody")});if(x){var k=!g.replace(M5,"").trim(),_=x.parent,O=_.parent.parent.columns.length,N=Lf(O);return k?s.deleteRange(d,p).split(s.mapping.map(p)):s.split(p).insert(s.mapping.map(p),mr(u,N)).setSelection(At(s,s.mapping.map(p)-2)),i(s),!0}return!1}},e.prototype.moveTableCell=function(r){var n=this;return function(i,o){var a=i.selection,s=i.tr,u=jt(a),f=u.endFromOffset,d=u.endIndex,p=u.to,v=[d+1,p-f],m=n.context.toastMark.findNodeAtPosition(v),g=Bs(m,function(A){return Mx(A)});if(g){var E=g.parent,w=D5(r),x=w.type,k=w.parentType,_=w.childType,O=Ho(g);if(g[x])O=Ho(g[x])-1;else{var N=!E[x]&&E.parent.type===k?E.parent[x][_]:E[x];if(x==="next"){var L=N?Ho(N[_]):0;O+=L+2}else x==="prev"&&(O=N?-4:0)}return o(s.setSelection(At(s,f+O))),!0}return!1}},e.prototype.addTable=function(){return function(r){return function(n,i){var o=n.selection,a=n.tr,s=n.schema,u=r,f=u.columnCount,d=u.rowCount,p=jt(o).endToOffset,v=N5(f),m=L5(f,d-1),g=an(an([],v),m);return g.forEach(function(E){a.split(a.mapping.map(p)).insert(a.mapping.map(p),mr(s,E))}),i(a.setSelection(At(a,p+4))),!0}}},e.prototype.commands=function(){return{addTable:this.addTable()}},e.prototype.keymaps=function(){return{Enter:this.extendTable(),Tab:this.moveTableCell(!0),"Shift-Tab":this.moveTableCell(!1)}},e}(Mt),R5="***",P5=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"thematicBreak"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Wt("thematic-break")},0]}}},enumerable:!1,configurable:!0}),e.prototype.hr=function(){return function(){return function(r,n){var i=r.selection,o=r.schema,a=r.tr,s=jt(i),u=s.from,f=s.to,d=s.endToOffset,p=mr(o,R5);return a.split(u).replaceWith(a.mapping.map(u),a.mapping.map(f),p).split(a.mapping.map(f)).setSelection(At(a,a.mapping.map(d))),n(a),!0}}},e.prototype.commands=function(){return{hr:this.hr()}},e.prototype.keymaps=function(){var r=this.hr()();return{"Mod-l":r,"Mod-L":r}},e}(Mt);function B5(t,e){var r=t.type,n=t.sourcepos,i=n[0][0];return e<=i&&(r==="codeBlock"||r==="heading"||r.match("table"))}var $5=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"listItem"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:{odd:{default:!1},even:{default:!1},listStyle:{default:!1}},toDOM:function(r){var n=r.attrs,i=n.odd,o=n.even,a=n.listStyle,s="list-item";return a&&(s+="|list-item-style"),i&&(s+="|list-item-odd"),o&&(s+="|list-item-even"),["span",{class:Wt.apply(void 0,s.split("|"))},0]}}},enumerable:!1,configurable:!0}),e.prototype.extendList=function(){var r=this;return function(n,i){var o=n.selection,a=n.doc,s=n.schema,u=n.tr,f=r.context.toastMark,d=jt(o),p=d.to,v=d.startFromOffset,m=d.endFromOffset,g=d.endIndex,E=d.endToOffset,w=zo(a,g),x=Ra.test(w);if(!x||o.from===v||!o.empty)return!1;var k=!w.replace(Nf,"").trim();if(k)u.deleteRange(m,E).split(u.mapping.map(E));else{var _=Hv(w),O=f.findFirstNodeAtLine(g+1),N=w.slice(p-m),L={toastMark:f,mdNode:O,doc:a,line:g+1},A=k5[_](L),P=A.listSyntax,U=A.changedResults;if(U!=null&&U.length){u.split(p),U.unshift({text:P+N,line:g+1}),r.changeToListPerLine(u,U,{from:p,startLine:U[0].line,endLine:Nr(U).line});var J=u.mapping.map(E)-N.length;u.setSelection(At(u,J))}else{var re=mr(s,P+N);_v(u,E,N,re)}}return i(u),!0}},e.prototype.toList=function(r){var n=this;return function(){return function(i,o){for(var a=i.doc,s=i.tr,u=i.selection,f=n.context.toastMark,d=jt(u),p=d.startIndex+1,v=d.endIndex+1,m=d.endToOffset,g=[],E=p;E<=v;E+=1){var w=f.findFirstNodeAtLine(E);if(w&&B5(w,E))break;if(g.indexOf(E)===-1){var x={toastMark:f,mdNode:w,doc:a,line:E,startLine:p},k=(Ma(w)?x5[r](x):C5[r](x)).changedResults,_=n.changeToListPerLine(s,k,{from:_f(a,k[0].line-1).startOffset,startLine:k[0].line,endLine:Nr(k).line,indexDiff:1});m=Math.max(_,m),k&&(g=g.concat(k.map(function(O){return O.line})))}}return o(s.setSelection(At(s,s.mapping.map(m)))),!0}}},e.prototype.changeToListPerLine=function(r,n,i){for(var o=i.from,a=i.startLine,s=i.endLine,u=i.indexDiff,f=u===void 0?0:u,d=0,p=function(g){var E=r.doc.child(g),w=E.nodeSize,x=E.content,k=r.mapping.map(o),_=k+x.size,O=n.filter(function(N){return N.line-f===g})[0];O&&(r.replaceWith(k,_,mr(v.context.schema,O.text)),d=Math.max(d,o+x.size)),o+=w},v=this,m=a-f;m<=s-f;m+=1)p(m);return d},e.prototype.toggleTask=function(){var r=this;return function(n,i){for(var o=n.selection,a=n.tr,s=n.doc,u=n.schema,f=r.context.toastMark,d=jt(o),p=d.startIndex,v=d.endIndex,m=null,g=p;g<=v;g+=1){var E=f.findFirstNodeAtLine(g+1);if(Ma(E)&&E.listData.task){var w=E.listData,x=w.checked,k=w.padding,_=x?" ":"x",O=E.sourcepos[0],N=_f(s,O[0]-1).startOffset;N+=O[1]+k,m=a.replaceWith(N,N+1,u.text(_))}}return m?(i(m),!0):!1}},e.prototype.commands=function(){return{bulletList:this.toList("bullet"),orderedList:this.toList("ordered"),taskList:this.toList("task")}},e.prototype.keymaps=function(){var r=this.toList("bullet")(),n=this.toList("ordered")(),i=this.toList("task")(),o=this.toggleTask();return{"Mod-u":r,"Mod-U":r,"Mod-o":n,"Mod-O":n,"alt-t":i,"alt-T":i,"Shift-Ctrl-x":o,"Shift-Ctrl-X":o,Enter:this.extendList()}},e}(Mt);function Df(t,e){return function(){return function(r,n){var i=r.tr,o=r.selection,a=$n(t)?t:function(_){return t.test(_)},s=e.length,u=i.doc,f=Qx(o),d=f[0],p=f[1],v=Math.max(d-s,1),m=Math.min(p+s,u.content.size-1),g=o.content(),E=g.content.textBetween(0,g.content.size,`
|
|
124
|
+
`),w=u.textBetween(v,d,`
|
|
125
|
+
`),x=u.textBetween(p,m,`
|
|
126
|
+
`);if(E=""+w+E+x,w&&x&&a(E))i.delete(m-s,m).delete(v,v+s);else{i.insertText(e,p).insertText(e,d);var k=o.empty?At(i,d+s):At(i,d+s,p+s);i.setSelection(k)}return n(i),!0}}}var F5=/^(\*{2}|_{2}).*([\s\S]*)\1$/m,H5="**",U5=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"strong"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Wt("strong")},0]}}},enumerable:!1,configurable:!0}),e.prototype.bold=function(){return Df(F5,H5)},e.prototype.commands=function(){return{bold:this.bold()}},e.prototype.keymaps=function(){var r=this.bold()();return{"Mod-b":r,"Mod-B":r}},e}(Mt),z5=/^(~{2}).*([\s\S]*)\1$/m,q5="~~",V5=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"strike"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Wt("strike")},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return Df(z5,q5)},e.prototype.keymaps=function(){var r=this.commands()();return{"Mod-s":r,"Mod-S":r}},e}(Mt),W5=/^(\*|_).*([\s\S]*)\1$/m,j5="*",G5=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"emph"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Wt("emph")},0]}}},enumerable:!1,configurable:!0}),e.prototype.italic=function(){return Df(W5,j5)},e.prototype.commands=function(){return{italic:this.italic()}},e.prototype.keymaps=function(){var r=this.italic()();return{"Mod-i":r,"Mod-I":r}},e}(Mt),K5=/^(`).*([\s\S]*)\1$/m,Y5="`",X5=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"code"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:{start:{default:!1},end:{default:!1},marked:{default:!1}},toDOM:function(r){var n=r.attrs,i=n.start,o=n.end,a=n.marked,s="code";return i&&(s+="|delimiter|start"),o&&(s+="|delimiter|end"),a&&(s+="|marked-text"),["span",{class:Wt.apply(void 0,s.split("|"))},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return Df(K5,Y5)},e.prototype.keymaps=function(){var r=this.commands()();return{"Shift-Mod-c":r,"Shift-Mod-C":r}},e}(Mt),J5=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"link"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:{url:{default:!1},desc:{default:!1}},toDOM:function(r){var n=r.attrs,i=n.url,o=n.desc,a="link";return i&&(a+="|link-url|marked-text"),o&&(a+="|link-desc|marked-text"),["span",{class:Wt.apply(void 0,a.split("|"))},0]}}},enumerable:!1,configurable:!0}),e.prototype.addLinkOrImage=function(r){return function(n){return function(i,o){var a=i.selection,s=i.tr,u=i.schema,f=Qx(a),d=f[0],p=f[1],v=n,m=v.linkText,g=v.altText,E=v.linkUrl,w=v.imageUrl,x=m,k=E,_="";return r==="image"&&(x=g,k=w,_="!"),x=mf(x),_+="["+x+"]("+k+")",o(s.replaceWith(d,p,mr(u,_))),!0}}},e.prototype.commands=function(){return{addImage:this.addLinkOrImage("image"),addLink:this.addLinkOrImage("link")}},e}(Mt),Z5=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"taskDelimiter"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Wt("delimiter","list-item")},0]}}},enumerable:!1,configurable:!0}),e}(Mt),Q5=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"delimiter"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Wt("delimiter")},0]}}},enumerable:!1,configurable:!0}),e}(Mt),eq=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"meta"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Wt("meta")},0]}}},enumerable:!1,configurable:!0}),e}(Mt),tq=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"markedText"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Wt("marked-text")},0]}}},enumerable:!1,configurable:!0}),e}(Mt),rq=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"tableCell"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Wt("table-cell")},0]}}},enumerable:!1,configurable:!0}),e}(Mt),nq=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"html"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Wt("html")},0]}}},enumerable:!1,configurable:!0}),e}(Mt),Vv="$$",iq=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"customBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Wt("custom-block")},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(r){return function(n,i){var o=n.selection,a=n.schema,s=n.tr,u=jt(o),f=u.startFromOffset,d=u.endToOffset;if(!(r!=null&&r.info))return!1;var p=""+Vv+r.info,v=mr(a,p),m=mr(a,Vv);return s.insert(f,v).split(f+p.length),s.split(s.mapping.map(d)).insert(s.mapping.map(d),m),i(s.setSelection(At(s,s.mapping.map(d)-(Vv.length+2)))),!0}}},e}(Mt),oq=/x|backspace/i,aq=/^\[(\s*)(x?)(\s*)\](?:\s+)/i;function sq(t){var e=t.schema,r=t.toastMark;return new rn({props:{handleDOMEvents:{keyup:function(n,i){var o,a=n.state,s=a.doc,u=a.tr,f=a.selection;if(f.empty&&oq.test(i.key)){var d=jt(f),p=d.startIndex,v=d.startFromOffset,m=d.from,g=[p+1,m-v+1],E=r.findNodeAtPosition(g),w=Bs(E,function(re){var Se;return re.type==="paragraph"&&((Se=re.parent)===null||Se===void 0?void 0:Se.type)==="item"});if(!((o=w==null?void 0:w.firstChild)===null||o===void 0)&&o.literal){var x=w.firstChild,k=x.literal.match(aq);if(k){var _=x.sourcepos[0],O=k[1],N=k[2],L=k[3],A=O.length+L.length,P=_f(s,_[0]-1).startOffset,U=_[1]+P;if(N){var J=A?A+1:0;u.replaceWith(U,J+U,e.text(N)),n.dispatch(u)}else A||(u.insertText(" ",U),n.dispatch(u))}}}return!1}}}})}var Wv="cut",mC=/\r\n|\n|\r/,lq=function(t){be(e,t);function e(r,n){var i=t.call(this,r)||this,o=n.toastMark,a=n.useCommandShortcut,s=a===void 0?!0:a,u=n.mdPlugins,f=u===void 0?[]:u;return i.editorType="markdown",i.el.classList.add("md-mode"),i.toastMark=o,i.extraPlugins=f,i.specs=i.createSpecs(),i.schema=i.createSchema(),i.context=i.createContext(),i.keymaps=i.createKeymaps(s),i.view=i.createView(),i.commands=i.createCommands(),i.specs.setContext(q(q({},i.context),{view:i.view})),i.createClipboard(),i.eventEmitter.listen("changePreviewTabWrite",function(d){return i.toggleActive(!0,d)}),i.eventEmitter.listen("changePreviewTabPreview",function(){return i.toggleActive(!1)}),i.initEvent(),i}return e.prototype.toggleActive=function(r,n){Nv(this.el,"active",r),r?n||this.focus():this.blur()},e.prototype.createClipboard=function(){var r=this;this.clipboard=document.createElement("textarea"),this.clipboard.className=_e("pseudo-clipboard"),this.clipboard.addEventListener("paste",function(n){var i=n.clipboardData||window.clipboardData,o=i&&i.items;if(o){var a=Ti(o).some(function(u){return u.kind==="string"&&u.type==="text/rtf"});if(!a){var s=Kx(o);s&&(n.preventDefault(),Rv(r.eventEmitter,s,n.type))}}}),this.clipboard.addEventListener("input",function(n){var i=n.target.value;r.replaceSelection(i),n.preventDefault(),n.target.value=""}),this.el.insertBefore(this.clipboard,this.view.dom)},e.prototype.createContext=function(){return{toastMark:this.toastMark,schema:this.schema,eventEmitter:this.eventEmitter}},e.prototype.createSpecs=function(){return new Zx([new h5,new T5,new Xx,new S5,new O5,new v5,new A5,new iq,new I5,new rq,new P5,new $5,new U5,new V5,new G5,new X5,new J5,new Q5,new Z5,new tq,new eq,new nq])},e.prototype.createPlugins=function(){return an([r5(this.context),p5(this.context),sq(this.context)],this.createPluginProps()).concat(this.defaultPlugins)},e.prototype.createView=function(){var r=this;return new lf(this.el,{state:this.createState(),dispatchTransaction:function(n){r.updateMarkdown(n);var i=r.view.state.applyTransaction(n).state;r.view.updateState(i),r.emitChangeEvent(n)},handleKeyDown:function(n,i){return(i.metaKey||i.ctrlKey)&&i.key.toUpperCase()==="V"&&r.clipboard.focus(),r.eventEmitter.emit("keydown",r.editorType,i),!1},handleDOMEvents:{copy:function(n,i){return r.captureCopy(i)},cut:function(n,i){return r.captureCopy(i,Wv)},scroll:function(){return r.eventEmitter.emit("scroll","editor"),!0},keyup:function(n,i){return r.eventEmitter.emit("keyup",r.editorType,i),!1}},nodeViews:{widget:Yx}})},e.prototype.createCommands=function(){return this.specs.commands(this.view)},e.prototype.captureCopy=function(r,n){r.preventDefault();var i=this.view.state,o=i.selection,a=i.tr;if(o.empty)return!0;var s=this.getChanged(o.content());return r.clipboardData?r.clipboardData.setData("text/plain",s):window.clipboardData.setData("Text",s),n===Wv&&this.view.dispatch(a.deleteSelection().scrollIntoView().setMeta("uiEvent",Wv)),!0},e.prototype.updateMarkdown=function(r){var n=this;r.docChanged&&r.steps.forEach(function(i,o){if(i.slice&&!(i instanceof er)){var a=r.docs[o],s=[i.from,i.to],u=s[0],f=s[1],d=Sf(a,u,f),p=d[0],v=d[1],m=n.getChanged(i.slice);p[0]===v[0]&&p[1]===v[1]&&m===""&&(m=`
|
|
127
|
+
`);var g=n.toastMark.editMarkdown(p,v,m);n.eventEmitter.emit("updatePreview",g),r.setMeta("editResult",g).scrollIntoView()}})},e.prototype.getChanged=function(r){var n="",i=0,o=r.content.size;return r.content.nodesBetween(i,o,function(a,s){a.isText?n+=a.text.slice(Math.max(i,s)-s,o-s):a.isBlock&&s>0&&(n+=`
|
|
128
|
+
`)}),n},e.prototype.setSelection=function(r,n){n===void 0&&(n=r);var i=this.view.state.tr,o=Da(i.doc,r,n),a=o[0],s=o[1];this.view.dispatch(i.setSelection(At(i,a,s)).scrollIntoView())},e.prototype.replaceSelection=function(r,n,i){var o,a=this.view.state,s=a.tr,u=a.schema,f=a.doc,d=r.split(mC),p=d.map(function(w){return yf(u,Na(w,u))}),v=new ge(oe.from(p),1,1);if(this.focus(),n&&i){var m=Da(f,n,i),g=m[0],E=m[1];o=s.replaceRange(g,E,v)}else o=s.replaceSelection(v);this.view.dispatch(o.scrollIntoView())},e.prototype.deleteSelection=function(r,n){var i,o=this.view.state,a=o.tr,s=o.doc;if(r&&n){var u=Da(s,r,n),f=u[0],d=u[1];i=a.deleteRange(f,d)}else i=a.deleteSelection();this.view.dispatch(i.scrollIntoView())},e.prototype.getSelectedText=function(r,n){var i=this.view.state,o=i.doc,a=i.selection,s=a.from,u=a.to;if(r&&n){var f=Da(o,r,n);s=f[0],u=f[1]}return o.textBetween(s,u,`
|
|
129
|
+
`)},e.prototype.getSelection=function(){var r=this.view.state.selection,n=r.from,i=r.to;return Sf(this.view.state.tr.doc,n,i)},e.prototype.setMarkdown=function(r,n){n===void 0&&(n=!0);var i=r.split(mC),o=this.view.state,a=o.tr,s=o.doc,u=o.schema,f=i.map(function(d){return yf(u,Na(d,u))});this.view.dispatch(a.replaceWith(0,s.content.size,f)),n&&this.moveCursorToEnd(!0)},e.prototype.addWidget=function(r,n,i){var o=this.view.state,a=o.tr,s=o.doc,u=o.selection,f=i?Da(s,i,i)[0]:u.to;this.view.dispatch(a.setMeta("widget",{pos:f,node:r,style:n}))},e.prototype.replaceWithWidget=function(r,n,i){var o=this.view.state,a=o.tr,s=o.schema,u=o.doc,f=Da(u,r,n),d=Na(i,s);this.view.dispatch(a.replaceWith(f[0],f[1],d))},e.prototype.getRangeInfoOfNode=function(r){var n=this.view.state,i=n.doc,o=n.selection,a=r||Sf(i,o.from)[0],s=this.toastMark.findNodeAtPosition(a);return s.type==="text"&&s.parent.type!=="paragraph"&&(s=s.parent),s.sourcepos[1][1]+=1,{range:s.sourcepos,type:s.type}},e.prototype.getMarkdown=function(){return this.toastMark.getLineTexts().map(function(r){return xf(r)}).join(`
|
|
130
|
+
`)},e.prototype.getToastMark=function(){return this.toastMark},e}(Jx),gC="_feEventKey";function uq(t,e){var r=t[gC],n;return r||(r=t[gC]={}),n=r[e],n||(n=r[e]=[]),n}var yC=uq,cq=ji,If=pf,fq=yC;function dq(t,e,r){if(cq(e)){If(e.split(/\s+/g),function(n){bC(t,n,r)});return}If(e,function(n,i){bC(t,i,n)})}function bC(t,e,r){var n=fq(t,e),i;r?(If(n,function(o,a){return r===o.handler?(wC(t,e,o.wrappedHandler),i=a,!1):!0}),n.splice(i,1)):(If(n,function(o){wC(t,e,o.wrappedHandler)}),n.splice(0,n.length))}function wC(t,e,r){"removeEventListener"in t?t.removeEventListener(e,r):"detachEvent"in t&&t.detachEvent("on"+e,r)}var EC=dq,pq=ji,jv=pf,hq=yC;function vq(t,e,r,n){if(pq(e)){jv(e.split(/\s+/g),function(i){xC(t,i,r,n)});return}jv(e,function(i,o){xC(t,o,i,r)})}function xC(t,e,r,n){function i(o){r.call(n||t,o||window.event)}"addEventListener"in t?t.addEventListener(e,i):"attachEvent"in t&&t.attachEvent("on"+e,i),mq(t,e,r,i)}function mq(t,e,r,n){var i=hq(t,e),o=!1;jv(i,function(a){return a.handler===r?(o=!0,!1):!0}),o||i.push({handler:r,wrappedHandler:n})}var CC=vq;/*! *****************************************************************************
|
|
131
|
+
Copyright (c) Microsoft Corporation.
|
|
132
|
+
|
|
133
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
134
|
+
purpose with or without fee is hereby granted.
|
|
135
|
+
|
|
136
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
137
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
138
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
139
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
140
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
141
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
142
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
143
|
+
***************************************************************************** */var Gv=function(t,e){return Gv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Gv(t,e)};function Fn(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Gv(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var gr=function(){return gr=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},gr.apply(this,arguments)};function Kv(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))}var Hs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},kC={};function gq(t){var e,r,n=kC[t];if(n)return n;for(n=kC[t]=[],e=0;e<128;e++)r=String.fromCharCode(e),/^[0-9a-z]$/i.test(r)?n.push(r):n.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2));for(e=0;e<t.length;e++)n[t.charCodeAt(e)]=t[e];return n}function Rf(t,e,r){var n,i,o,a,s,u="";for(typeof e!="string"&&(r=e,e=Rf.defaultChars),typeof r>"u"&&(r=!0),s=gq(e),n=0,i=t.length;n<i;n++){if(o=t.charCodeAt(n),r&&o===37&&n+2<i&&/^[0-9a-f]{2}$/i.test(t.slice(n+1,n+3))){u+=t.slice(n,n+3),n+=2;continue}if(o<128){u+=s[o];continue}if(o>=55296&&o<=57343){if(o>=55296&&o<=56319&&n+1<i&&(a=t.charCodeAt(n+1),a>=56320&&a<=57343)){u+=encodeURIComponent(t[n]+t[n+1]),n++;continue}u+="%EF%BF%BD";continue}u+=encodeURIComponent(t[n])}return u}Rf.defaultChars=";/?:@&=+$,-_.!~*'()#",Rf.componentChars="-_.!~*'()";var yq=Rf,Yv={},Yi={},bq="Á",wq="á",Eq="Ă",xq="ă",Cq="∾",kq="∿",Tq="∾̳",Sq="Â",_q="â",Oq="´",Aq="А",Mq="а",Nq="Æ",Lq="æ",Dq="",Iq="𝔄",Rq="𝔞",Pq="À",Bq="à",$q="ℵ",Fq="ℵ",Hq="Α",Uq="α",zq="Ā",qq="ā",Vq="⨿",Wq="&",jq="&",Gq="⩕",Kq="⩓",Yq="∧",Xq="⩜",Jq="⩘",Zq="⩚",Qq="∠",e6="⦤",t6="∠",r6="⦨",n6="⦩",i6="⦪",o6="⦫",a6="⦬",s6="⦭",l6="⦮",u6="⦯",c6="∡",f6="∟",d6="⊾",p6="⦝",h6="∢",v6="Å",m6="⍼",g6="Ą",y6="ą",b6="𝔸",w6="𝕒",E6="⩯",x6="≈",C6="⩰",k6="≊",T6="≋",S6="'",_6="",O6="≈",A6="≊",M6="Å",N6="å",L6="𝒜",D6="𝒶",I6="≔",R6="*",P6="≈",B6="≍",$6="Ã",F6="ã",H6="Ä",U6="ä",z6="∳",q6="⨑",V6="≌",W6="϶",j6="‵",G6="∽",K6="⋍",Y6="∖",X6="⫧",J6="⊽",Z6="⌅",Q6="⌆",eV="⌅",tV="⎵",rV="⎶",nV="≌",iV="Б",oV="б",aV="„",sV="∵",lV="∵",uV="∵",cV="⦰",fV="϶",dV="ℬ",pV="ℬ",hV="Β",vV="β",mV="ℶ",gV="≬",yV="𝔅",bV="𝔟",wV="⋂",EV="◯",xV="⋃",CV="⨀",kV="⨁",TV="⨂",SV="⨆",_V="★",OV="▽",AV="△",MV="⨄",NV="⋁",LV="⋀",DV="⤍",IV="⧫",RV="▪",PV="▴",BV="▾",$V="◂",FV="▸",HV="␣",UV="▒",zV="░",qV="▓",VV="█",WV="=⃥",jV="≡⃥",GV="⫭",KV="⌐",YV="𝔹",XV="𝕓",JV="⊥",ZV="⊥",QV="⋈",eW="⧉",tW="┐",rW="╕",nW="╖",iW="╗",oW="┌",aW="╒",sW="╓",lW="╔",uW="─",cW="═",fW="┬",dW="╤",pW="╥",hW="╦",vW="┴",mW="╧",gW="╨",yW="╩",bW="⊟",wW="⊞",EW="⊠",xW="┘",CW="╛",kW="╜",TW="╝",SW="└",_W="╘",OW="╙",AW="╚",MW="│",NW="║",LW="┼",DW="╪",IW="╫",RW="╬",PW="┤",BW="╡",$W="╢",FW="╣",HW="├",UW="╞",zW="╟",qW="╠",VW="‵",WW="˘",jW="˘",GW="¦",KW="𝒷",YW="ℬ",XW="⁏",JW="∽",ZW="⋍",QW="⧅",ej="\\",tj="⟈",rj="•",nj="•",ij="≎",oj="⪮",aj="≏",sj="≎",lj="≏",uj="Ć",cj="ć",fj="⩄",dj="⩉",pj="⩋",hj="∩",vj="⋒",mj="⩇",gj="⩀",yj="ⅅ",bj="∩︀",wj="⁁",Ej="ˇ",xj="ℭ",Cj="⩍",kj="Č",Tj="č",Sj="Ç",_j="ç",Oj="Ĉ",Aj="ĉ",Mj="∰",Nj="⩌",Lj="⩐",Dj="Ċ",Ij="ċ",Rj="¸",Pj="¸",Bj="⦲",$j="¢",Fj="·",Hj="·",Uj="𝔠",zj="ℭ",qj="Ч",Vj="ч",Wj="✓",jj="✓",Gj="Χ",Kj="χ",Yj="ˆ",Xj="≗",Jj="↺",Zj="↻",Qj="⊛",e8="⊚",t8="⊝",r8="⊙",n8="®",i8="Ⓢ",o8="⊖",a8="⊕",s8="⊗",l8="○",u8="⧃",c8="≗",f8="⨐",d8="⫯",p8="⧂",h8="∲",v8="”",m8="’",g8="♣",y8="♣",b8=":",w8="∷",E8="⩴",x8="≔",C8="≔",k8=",",T8="@",S8="∁",_8="∘",O8="∁",A8="ℂ",M8="≅",N8="⩭",L8="≡",D8="∮",I8="∯",R8="∮",P8="𝕔",B8="ℂ",$8="∐",F8="∐",H8="©",U8="©",z8="℗",q8="∳",V8="↵",W8="✗",j8="⨯",G8="𝒞",K8="𝒸",Y8="⫏",X8="⫑",J8="⫐",Z8="⫒",Q8="⋯",e7="⤸",t7="⤵",r7="⋞",n7="⋟",i7="↶",o7="⤽",a7="⩈",s7="⩆",l7="≍",u7="∪",c7="⋓",f7="⩊",d7="⊍",p7="⩅",h7="∪︀",v7="↷",m7="⤼",g7="⋞",y7="⋟",b7="⋎",w7="⋏",E7="¤",x7="↶",C7="↷",k7="⋎",T7="⋏",S7="∲",_7="∱",O7="⌭",A7="†",M7="‡",N7="ℸ",L7="↓",D7="↡",I7="⇓",R7="‐",P7="⫤",B7="⊣",$7="⤏",F7="˝",H7="Ď",U7="ď",z7="Д",q7="д",V7="‡",W7="⇊",j7="ⅅ",G7="ⅆ",K7="⤑",Y7="⩷",X7="°",J7="∇",Z7="Δ",Q7="δ",e9="⦱",t9="⥿",r9="𝔇",n9="𝔡",i9="⥥",o9="⇃",a9="⇂",s9="´",l9="˙",u9="˝",c9="`",f9="˜",d9="⋄",p9="⋄",h9="⋄",v9="♦",m9="♦",g9="¨",y9="ⅆ",b9="ϝ",w9="⋲",E9="÷",x9="÷",C9="⋇",k9="⋇",T9="Ђ",S9="ђ",_9="⌞",O9="⌍",A9="$",M9="𝔻",N9="𝕕",L9="¨",D9="˙",I9="⃜",R9="≐",P9="≑",B9="≐",$9="∸",F9="∔",H9="⊡",U9="⌆",z9="∯",q9="¨",V9="⇓",W9="⇐",j9="⇔",G9="⫤",K9="⟸",Y9="⟺",X9="⟹",J9="⇒",Z9="⊨",Q9="⇑",eG="⇕",tG="∥",rG="⤓",nG="↓",iG="↓",oG="⇓",aG="⇵",sG="̑",lG="⇊",uG="⇃",cG="⇂",fG="⥐",dG="⥞",pG="⥖",hG="↽",vG="⥟",mG="⥗",gG="⇁",yG="↧",bG="⊤",wG="⤐",EG="⌟",xG="⌌",CG="𝒟",kG="𝒹",TG="Ѕ",SG="ѕ",_G="⧶",OG="Đ",AG="đ",MG="⋱",NG="▿",LG="▾",DG="⇵",IG="⥯",RG="⦦",PG="Џ",BG="џ",$G="⟿",FG="É",HG="é",UG="⩮",zG="Ě",qG="ě",VG="Ê",WG="ê",jG="≖",GG="≕",KG="Э",YG="э",XG="⩷",JG="Ė",ZG="ė",QG="≑",eK="ⅇ",tK="≒",rK="𝔈",nK="𝔢",iK="⪚",oK="È",aK="è",sK="⪖",lK="⪘",uK="⪙",cK="∈",fK="⏧",dK="ℓ",pK="⪕",hK="⪗",vK="Ē",mK="ē",gK="∅",yK="∅",bK="◻",wK="∅",EK="▫",xK=" ",CK=" ",kK=" ",TK="Ŋ",SK="ŋ",_K=" ",OK="Ę",AK="ę",MK="𝔼",NK="𝕖",LK="⋕",DK="⧣",IK="⩱",RK="ε",PK="Ε",BK="ε",$K="ϵ",FK="≖",HK="≕",UK="≂",zK="⪖",qK="⪕",VK="⩵",WK="=",jK="≂",GK="≟",KK="⇌",YK="≡",XK="⩸",JK="⧥",ZK="⥱",QK="≓",eY="ℯ",tY="ℰ",rY="≐",nY="⩳",iY="≂",oY="Η",aY="η",sY="Ð",lY="ð",uY="Ë",cY="ë",fY="€",dY="!",pY="∃",hY="∃",vY="ℰ",mY="ⅇ",gY="ⅇ",yY="≒",bY="Ф",wY="ф",EY="♀",xY="ffi",CY="ff",kY="ffl",TY="𝔉",SY="𝔣",_Y="fi",OY="◼",AY="▪",MY="fj",NY="♭",LY="fl",DY="▱",IY="ƒ",RY="𝔽",PY="𝕗",BY="∀",$Y="∀",FY="⋔",HY="⫙",UY="ℱ",zY="⨍",qY="½",VY="⅓",WY="¼",jY="⅕",GY="⅙",KY="⅛",YY="⅔",XY="⅖",JY="¾",ZY="⅗",QY="⅜",eX="⅘",tX="⅚",rX="⅝",nX="⅞",iX="⁄",oX="⌢",aX="𝒻",sX="ℱ",lX="ǵ",uX="Γ",cX="γ",fX="Ϝ",dX="ϝ",pX="⪆",hX="Ğ",vX="ğ",mX="Ģ",gX="Ĝ",yX="ĝ",bX="Г",wX="г",EX="Ġ",xX="ġ",CX="≥",kX="≧",TX="⪌",SX="⋛",_X="≥",OX="≧",AX="⩾",MX="⪩",NX="⩾",LX="⪀",DX="⪂",IX="⪄",RX="⋛︀",PX="⪔",BX="𝔊",$X="𝔤",FX="≫",HX="⋙",UX="⋙",zX="ℷ",qX="Ѓ",VX="ѓ",WX="⪥",jX="≷",GX="⪒",KX="⪤",YX="⪊",XX="⪊",JX="⪈",ZX="≩",QX="⪈",eJ="≩",tJ="⋧",rJ="𝔾",nJ="𝕘",iJ="`",oJ="≥",aJ="⋛",sJ="≧",lJ="⪢",uJ="≷",cJ="⩾",fJ="≳",dJ="𝒢",pJ="ℊ",hJ="≳",vJ="⪎",mJ="⪐",gJ="⪧",yJ="⩺",bJ=">",wJ=">",EJ="≫",xJ="⋗",CJ="⦕",kJ="⩼",TJ="⪆",SJ="⥸",_J="⋗",OJ="⋛",AJ="⪌",MJ="≷",NJ="≳",LJ="≩︀",DJ="≩︀",IJ="ˇ",RJ=" ",PJ="½",BJ="ℋ",$J="Ъ",FJ="ъ",HJ="⥈",UJ="↔",zJ="⇔",qJ="↭",VJ="^",WJ="ℏ",jJ="Ĥ",GJ="ĥ",KJ="♥",YJ="♥",XJ="…",JJ="⊹",ZJ="𝔥",QJ="ℌ",eZ="ℋ",tZ="⤥",rZ="⤦",nZ="⇿",iZ="∻",oZ="↩",aZ="↪",sZ="𝕙",lZ="ℍ",uZ="―",cZ="─",fZ="𝒽",dZ="ℋ",pZ="ℏ",hZ="Ħ",vZ="ħ",mZ="≎",gZ="≏",yZ="⁃",bZ="‐",wZ="Í",EZ="í",xZ="",CZ="Î",kZ="î",TZ="И",SZ="и",_Z="İ",OZ="Е",AZ="е",MZ="¡",NZ="⇔",LZ="𝔦",DZ="ℑ",IZ="Ì",RZ="ì",PZ="ⅈ",BZ="⨌",$Z="∭",FZ="⧜",HZ="℩",UZ="IJ",zZ="ij",qZ="Ī",VZ="ī",WZ="ℑ",jZ="ⅈ",GZ="ℐ",KZ="ℑ",YZ="ı",XZ="ℑ",JZ="⊷",ZZ="Ƶ",QZ="⇒",eQ="℅",tQ="∞",rQ="⧝",nQ="ı",iQ="⊺",oQ="∫",aQ="∬",sQ="ℤ",lQ="∫",uQ="⊺",cQ="⋂",fQ="⨗",dQ="⨼",pQ="",hQ="",vQ="Ё",mQ="ё",gQ="Į",yQ="į",bQ="𝕀",wQ="𝕚",EQ="Ι",xQ="ι",CQ="⨼",kQ="¿",TQ="𝒾",SQ="ℐ",_Q="∈",OQ="⋵",AQ="⋹",MQ="⋴",NQ="⋳",LQ="∈",DQ="",IQ="Ĩ",RQ="ĩ",PQ="І",BQ="і",$Q="Ï",FQ="ï",HQ="Ĵ",UQ="ĵ",zQ="Й",qQ="й",VQ="𝔍",WQ="𝔧",jQ="ȷ",GQ="𝕁",KQ="𝕛",YQ="𝒥",XQ="𝒿",JQ="Ј",ZQ="ј",QQ="Є",eee="є",tee="Κ",ree="κ",nee="ϰ",iee="Ķ",oee="ķ",aee="К",see="к",lee="𝔎",uee="𝔨",cee="ĸ",fee="Х",dee="х",pee="Ќ",hee="ќ",vee="𝕂",mee="𝕜",gee="𝒦",yee="𝓀",bee="⇚",wee="Ĺ",Eee="ĺ",xee="⦴",Cee="ℒ",kee="Λ",Tee="λ",See="⟨",_ee="⟪",Oee="⦑",Aee="⟨",Mee="⪅",Nee="ℒ",Lee="«",Dee="⇤",Iee="⤟",Ree="←",Pee="↞",Bee="⇐",$ee="⤝",Fee="↩",Hee="↫",Uee="⤹",zee="⥳",qee="↢",Vee="⤙",Wee="⤛",jee="⪫",Gee="⪭",Kee="⪭︀",Yee="⤌",Xee="⤎",Jee="❲",Zee="{",Qee="[",ete="⦋",tte="⦏",rte="⦍",nte="Ľ",ite="ľ",ote="Ļ",ate="ļ",ste="⌈",lte="{",ute="Л",cte="л",fte="⤶",dte="“",pte="„",hte="⥧",vte="⥋",mte="↲",gte="≤",yte="≦",bte="⟨",wte="⇤",Ete="←",xte="←",Cte="⇐",kte="⇆",Tte="↢",Ste="⌈",_te="⟦",Ote="⥡",Ate="⥙",Mte="⇃",Nte="⌊",Lte="↽",Dte="↼",Ite="⇇",Rte="↔",Pte="↔",Bte="⇔",$te="⇆",Fte="⇋",Hte="↭",Ute="⥎",zte="↤",qte="⊣",Vte="⥚",Wte="⋋",jte="⧏",Gte="⊲",Kte="⊴",Yte="⥑",Xte="⥠",Jte="⥘",Zte="↿",Qte="⥒",ere="↼",tre="⪋",rre="⋚",nre="≤",ire="≦",ore="⩽",are="⪨",sre="⩽",lre="⩿",ure="⪁",cre="⪃",fre="⋚︀",dre="⪓",pre="⪅",hre="⋖",vre="⋚",mre="⪋",gre="⋚",yre="≦",bre="≶",wre="≶",Ere="⪡",xre="≲",Cre="⩽",kre="≲",Tre="⥼",Sre="⌊",_re="𝔏",Ore="𝔩",Are="≶",Mre="⪑",Nre="⥢",Lre="↽",Dre="↼",Ire="⥪",Rre="▄",Pre="Љ",Bre="љ",$re="⇇",Fre="≪",Hre="⋘",Ure="⌞",zre="⇚",qre="⥫",Vre="◺",Wre="Ŀ",jre="ŀ",Gre="⎰",Kre="⎰",Yre="⪉",Xre="⪉",Jre="⪇",Zre="≨",Qre="⪇",ene="≨",tne="⋦",rne="⟬",nne="⇽",ine="⟦",one="⟵",ane="⟵",sne="⟸",lne="⟷",une="⟷",cne="⟺",fne="⟼",dne="⟶",pne="⟶",hne="⟹",vne="↫",mne="↬",gne="⦅",yne="𝕃",bne="𝕝",wne="⨭",Ene="⨴",xne="∗",Cne="_",kne="↙",Tne="↘",Sne="◊",_ne="◊",One="⧫",Ane="(",Mne="⦓",Nne="⇆",Lne="⌟",Dne="⇋",Ine="⥭",Rne="",Pne="⊿",Bne="‹",$ne="𝓁",Fne="ℒ",Hne="↰",Une="↰",zne="≲",qne="⪍",Vne="⪏",Wne="[",jne="‘",Gne="‚",Kne="Ł",Yne="ł",Xne="⪦",Jne="⩹",Zne="<",Qne="<",eie="≪",tie="⋖",rie="⋋",nie="⋉",iie="⥶",oie="⩻",aie="◃",sie="⊴",lie="◂",uie="⦖",cie="⥊",fie="⥦",die="≨︀",pie="≨︀",hie="¯",vie="♂",mie="✠",gie="✠",yie="↦",bie="↦",wie="↧",Eie="↤",xie="↥",Cie="▮",kie="⨩",Tie="М",Sie="м",_ie="—",Oie="∺",Aie="∡",Mie=" ",Nie="ℳ",Lie="𝔐",Die="𝔪",Iie="℧",Rie="µ",Pie="*",Bie="⫰",$ie="∣",Fie="·",Hie="⊟",Uie="−",zie="∸",qie="⨪",Vie="∓",Wie="⫛",jie="…",Gie="∓",Kie="⊧",Yie="𝕄",Xie="𝕞",Jie="∓",Zie="𝓂",Qie="ℳ",eoe="∾",toe="Μ",roe="μ",noe="⊸",ioe="⊸",ooe="∇",aoe="Ń",soe="ń",loe="∠⃒",uoe="≉",coe="⩰̸",foe="≋̸",doe="ʼn",poe="≉",hoe="♮",voe="ℕ",moe="♮",goe=" ",yoe="≎̸",boe="≏̸",woe="⩃",Eoe="Ň",xoe="ň",Coe="Ņ",koe="ņ",Toe="≇",Soe="⩭̸",_oe="⩂",Ooe="Н",Aoe="н",Moe="–",Noe="⤤",Loe="↗",Doe="⇗",Ioe="↗",Roe="≠",Poe="≐̸",Boe="",$oe="",Foe="",Hoe="",Uoe="≢",zoe="⤨",qoe="≂̸",Voe="≫",Woe="≪",joe=`
|
|
144
|
+
`,Goe="∄",Koe="∄",Yoe="𝔑",Xoe="𝔫",Joe="≧̸",Zoe="≱",Qoe="≱",eae="≧̸",tae="⩾̸",rae="⩾̸",nae="⋙̸",iae="≵",oae="≫⃒",aae="≯",sae="≯",lae="≫̸",uae="↮",cae="⇎",fae="⫲",dae="∋",pae="⋼",hae="⋺",vae="∋",mae="Њ",gae="њ",yae="↚",bae="⇍",wae="‥",Eae="≦̸",xae="≰",Cae="↚",kae="⇍",Tae="↮",Sae="⇎",_ae="≰",Oae="≦̸",Aae="⩽̸",Mae="⩽̸",Nae="≮",Lae="⋘̸",Dae="≴",Iae="≪⃒",Rae="≮",Pae="⋪",Bae="⋬",$ae="≪̸",Fae="∤",Hae="",Uae=" ",zae="𝕟",qae="ℕ",Vae="⫬",Wae="¬",jae="≢",Gae="≭",Kae="∦",Yae="∉",Xae="≠",Jae="≂̸",Zae="∄",Qae="≯",ese="≱",tse="≧̸",rse="≫̸",nse="≹",ise="⩾̸",ose="≵",ase="≎̸",sse="≏̸",lse="∉",use="⋵̸",cse="⋹̸",fse="∉",dse="⋷",pse="⋶",hse="⧏̸",vse="⋪",mse="⋬",gse="≮",yse="≰",bse="≸",wse="≪̸",Ese="⩽̸",xse="≴",Cse="⪢̸",kse="⪡̸",Tse="∌",Sse="∌",_se="⋾",Ose="⋽",Ase="⊀",Mse="⪯̸",Nse="⋠",Lse="∌",Dse="⧐̸",Ise="⋫",Rse="⋭",Pse="⊏̸",Bse="⋢",$se="⊐̸",Fse="⋣",Hse="⊂⃒",Use="⊈",zse="⊁",qse="⪰̸",Vse="⋡",Wse="≿̸",jse="⊃⃒",Gse="⊉",Kse="≁",Yse="≄",Xse="≇",Jse="≉",Zse="∤",Qse="∦",ele="∦",tle="⫽⃥",rle="∂̸",nle="⨔",ile="⊀",ole="⋠",ale="⊀",sle="⪯̸",lle="⪯̸",ule="⤳̸",cle="↛",fle="⇏",dle="↝̸",ple="↛",hle="⇏",vle="⋫",mle="⋭",gle="⊁",yle="⋡",ble="⪰̸",wle="𝒩",Ele="𝓃",xle="∤",Cle="∦",kle="≁",Tle="≄",Sle="≄",_le="∤",Ole="∦",Ale="⋢",Mle="⋣",Nle="⊄",Lle="⫅̸",Dle="⊈",Ile="⊂⃒",Rle="⊈",Ple="⫅̸",Ble="⊁",$le="⪰̸",Fle="⊅",Hle="⫆̸",Ule="⊉",zle="⊃⃒",qle="⊉",Vle="⫆̸",Wle="≹",jle="Ñ",Gle="ñ",Kle="≸",Yle="⋪",Xle="⋬",Jle="⋫",Zle="⋭",Qle="Ν",eue="ν",tue="#",rue="№",nue=" ",iue="≍⃒",oue="⊬",aue="⊭",sue="⊮",lue="⊯",uue="≥⃒",cue=">⃒",fue="⤄",due="⧞",pue="⤂",hue="≤⃒",vue="<⃒",mue="⊴⃒",gue="⤃",yue="⊵⃒",bue="∼⃒",wue="⤣",Eue="↖",xue="⇖",Cue="↖",kue="⤧",Tue="Ó",Sue="ó",_ue="⊛",Oue="Ô",Aue="ô",Mue="⊚",Nue="О",Lue="о",Due="⊝",Iue="Ő",Rue="ő",Pue="⨸",Bue="⊙",$ue="⦼",Fue="Œ",Hue="œ",Uue="⦿",zue="𝔒",que="𝔬",Vue="˛",Wue="Ò",jue="ò",Gue="⧁",Kue="⦵",Yue="Ω",Xue="∮",Jue="↺",Zue="⦾",Que="⦻",ece="‾",tce="⧀",rce="Ō",nce="ō",ice="Ω",oce="ω",ace="Ο",sce="ο",lce="⦶",uce="⊖",cce="𝕆",fce="𝕠",dce="⦷",pce="“",hce="‘",vce="⦹",mce="⊕",gce="↻",yce="⩔",bce="∨",wce="⩝",Ece="ℴ",xce="ℴ",Cce="ª",kce="º",Tce="⊶",Sce="⩖",_ce="⩗",Oce="⩛",Ace="Ⓢ",Mce="𝒪",Nce="ℴ",Lce="Ø",Dce="ø",Ice="⊘",Rce="Õ",Pce="õ",Bce="⨶",$ce="⨷",Fce="⊗",Hce="Ö",Uce="ö",zce="⌽",qce="‾",Vce="⏞",Wce="⎴",jce="⏜",Gce="¶",Kce="∥",Yce="∥",Xce="⫳",Jce="⫽",Zce="∂",Qce="∂",efe="П",tfe="п",rfe="%",nfe=".",ife="‰",ofe="⊥",afe="‱",sfe="𝔓",lfe="𝔭",ufe="Φ",cfe="φ",ffe="ϕ",dfe="ℳ",pfe="☎",hfe="Π",vfe="π",mfe="⋔",gfe="ϖ",yfe="ℏ",bfe="ℎ",wfe="ℏ",Efe="⨣",xfe="⊞",Cfe="⨢",kfe="+",Tfe="∔",Sfe="⨥",_fe="⩲",Ofe="±",Afe="±",Mfe="⨦",Nfe="⨧",Lfe="±",Dfe="ℌ",Ife="⨕",Rfe="𝕡",Pfe="ℙ",Bfe="£",$fe="⪷",Ffe="⪻",Hfe="≺",Ufe="≼",zfe="⪷",qfe="≺",Vfe="≼",Wfe="≺",jfe="⪯",Gfe="≼",Kfe="≾",Yfe="⪯",Xfe="⪹",Jfe="⪵",Zfe="⋨",Qfe="⪯",ede="⪳",tde="≾",rde="′",nde="″",ide="ℙ",ode="⪹",ade="⪵",sde="⋨",lde="∏",ude="∏",cde="⌮",fde="⌒",dde="⌓",pde="∝",hde="∝",vde="∷",mde="∝",gde="≾",yde="⊰",bde="𝒫",wde="𝓅",Ede="Ψ",xde="ψ",Cde=" ",kde="𝔔",Tde="𝔮",Sde="⨌",_de="𝕢",Ode="ℚ",Ade="⁗",Mde="𝒬",Nde="𝓆",Lde="ℍ",Dde="⨖",Ide="?",Rde="≟",Pde='"',Bde='"',$de="⇛",Fde="∽̱",Hde="Ŕ",Ude="ŕ",zde="√",qde="⦳",Vde="⟩",Wde="⟫",jde="⦒",Gde="⦥",Kde="⟩",Yde="»",Xde="⥵",Jde="⇥",Zde="⤠",Qde="⤳",epe="→",tpe="↠",rpe="⇒",npe="⤞",ipe="↪",ope="↬",ape="⥅",spe="⥴",lpe="⤖",upe="↣",cpe="↝",fpe="⤚",dpe="⤜",ppe="∶",hpe="ℚ",vpe="⤍",mpe="⤏",gpe="⤐",ype="❳",bpe="}",wpe="]",Epe="⦌",xpe="⦎",Cpe="⦐",kpe="Ř",Tpe="ř",Spe="Ŗ",_pe="ŗ",Ope="⌉",Ape="}",Mpe="Р",Npe="р",Lpe="⤷",Dpe="⥩",Ipe="”",Rpe="”",Ppe="↳",Bpe="ℜ",$pe="ℛ",Fpe="ℜ",Hpe="ℝ",Upe="ℜ",zpe="▭",qpe="®",Vpe="®",Wpe="∋",jpe="⇋",Gpe="⥯",Kpe="⥽",Ype="⌋",Xpe="𝔯",Jpe="ℜ",Zpe="⥤",Qpe="⇁",ehe="⇀",the="⥬",rhe="Ρ",nhe="ρ",ihe="ϱ",ohe="⟩",ahe="⇥",she="→",lhe="→",uhe="⇒",che="⇄",fhe="↣",dhe="⌉",phe="⟧",hhe="⥝",vhe="⥕",mhe="⇂",ghe="⌋",yhe="⇁",bhe="⇀",whe="⇄",Ehe="⇌",xhe="⇉",Che="↝",khe="↦",The="⊢",She="⥛",_he="⋌",Ohe="⧐",Ahe="⊳",Mhe="⊵",Nhe="⥏",Lhe="⥜",Dhe="⥔",Ihe="↾",Rhe="⥓",Phe="⇀",Bhe="˚",$he="≓",Fhe="⇄",Hhe="⇌",Uhe="",zhe="⎱",qhe="⎱",Vhe="⫮",Whe="⟭",jhe="⇾",Ghe="⟧",Khe="⦆",Yhe="𝕣",Xhe="ℝ",Jhe="⨮",Zhe="⨵",Qhe="⥰",eve=")",tve="⦔",rve="⨒",nve="⇉",ive="⇛",ove="›",ave="𝓇",sve="ℛ",lve="↱",uve="↱",cve="]",fve="’",dve="’",pve="⋌",hve="⋊",vve="▹",mve="⊵",gve="▸",yve="⧎",bve="⧴",wve="⥨",Eve="℞",xve="Ś",Cve="ś",kve="‚",Tve="⪸",Sve="Š",_ve="š",Ove="⪼",Ave="≻",Mve="≽",Nve="⪰",Lve="⪴",Dve="Ş",Ive="ş",Rve="Ŝ",Pve="ŝ",Bve="⪺",$ve="⪶",Fve="⋩",Hve="⨓",Uve="≿",zve="С",qve="с",Vve="⊡",Wve="⋅",jve="⩦",Gve="⤥",Kve="↘",Yve="⇘",Xve="↘",Jve="§",Zve=";",Qve="⤩",eme="∖",tme="∖",rme="✶",nme="𝔖",ime="𝔰",ome="⌢",ame="♯",sme="Щ",lme="щ",ume="Ш",cme="ш",fme="↓",dme="←",pme="∣",hme="∥",vme="→",mme="↑",gme="",yme="Σ",bme="σ",wme="ς",Eme="ς",xme="∼",Cme="⩪",kme="≃",Tme="≃",Sme="⪞",_me="⪠",Ome="⪝",Ame="⪟",Mme="≆",Nme="⨤",Lme="⥲",Dme="←",Ime="∘",Rme="∖",Pme="⨳",Bme="⧤",$me="∣",Fme="⌣",Hme="⪪",Ume="⪬",zme="⪬︀",qme="Ь",Vme="ь",Wme="⌿",jme="⧄",Gme="/",Kme="𝕊",Yme="𝕤",Xme="♠",Jme="♠",Zme="∥",Qme="⊓",ege="⊓︀",tge="⊔",rge="⊔︀",nge="√",ige="⊏",oge="⊑",age="⊏",sge="⊑",lge="⊐",uge="⊒",cge="⊐",fge="⊒",dge="□",pge="□",hge="⊓",vge="⊏",mge="⊑",gge="⊐",yge="⊒",bge="⊔",wge="▪",Ege="□",xge="▪",Cge="→",kge="𝒮",Tge="𝓈",Sge="∖",_ge="⌣",Oge="⋆",Age="⋆",Mge="☆",Nge="★",Lge="ϵ",Dge="ϕ",Ige="¯",Rge="⊂",Pge="⋐",Bge="⪽",$ge="⫅",Fge="⊆",Hge="⫃",Uge="⫁",zge="⫋",qge="⊊",Vge="⪿",Wge="⥹",jge="⊂",Gge="⋐",Kge="⊆",Yge="⫅",Xge="⊆",Jge="⊊",Zge="⫋",Qge="⫇",eye="⫕",tye="⫓",rye="⪸",nye="≻",iye="≽",oye="≻",aye="⪰",sye="≽",lye="≿",uye="⪰",cye="⪺",fye="⪶",dye="⋩",pye="≿",hye="∋",vye="∑",mye="∑",gye="♪",yye="¹",bye="²",wye="³",Eye="⊃",xye="⋑",Cye="⪾",kye="⫘",Tye="⫆",Sye="⊇",_ye="⫄",Oye="⊃",Aye="⊇",Mye="⟉",Nye="⫗",Lye="⥻",Dye="⫂",Iye="⫌",Rye="⊋",Pye="⫀",Bye="⊃",$ye="⋑",Fye="⊇",Hye="⫆",Uye="⊋",zye="⫌",qye="⫈",Vye="⫔",Wye="⫖",jye="⤦",Gye="↙",Kye="⇙",Yye="↙",Xye="⤪",Jye="ß",Zye=" ",Qye="⌖",e0e="Τ",t0e="τ",r0e="⎴",n0e="Ť",i0e="ť",o0e="Ţ",a0e="ţ",s0e="Т",l0e="т",u0e="⃛",c0e="⌕",f0e="𝔗",d0e="𝔱",p0e="∴",h0e="∴",v0e="∴",m0e="Θ",g0e="θ",y0e="ϑ",b0e="ϑ",w0e="≈",E0e="∼",x0e=" ",C0e=" ",k0e=" ",T0e="≈",S0e="∼",_0e="Þ",O0e="þ",A0e="˜",M0e="∼",N0e="≃",L0e="≅",D0e="≈",I0e="⨱",R0e="⊠",P0e="×",B0e="⨰",$0e="∭",F0e="⤨",H0e="⌶",U0e="⫱",z0e="⊤",q0e="𝕋",V0e="𝕥",W0e="⫚",j0e="⤩",G0e="‴",K0e="™",Y0e="™",X0e="▵",J0e="▿",Z0e="◃",Q0e="⊴",ebe="≜",tbe="▹",rbe="⊵",nbe="◬",ibe="≜",obe="⨺",abe="⃛",sbe="⨹",lbe="⧍",ube="⨻",cbe="⏢",fbe="𝒯",dbe="𝓉",pbe="Ц",hbe="ц",vbe="Ћ",mbe="ћ",gbe="Ŧ",ybe="ŧ",bbe="≬",wbe="↞",Ebe="↠",xbe="Ú",Cbe="ú",kbe="↑",Tbe="↟",Sbe="⇑",_be="⥉",Obe="Ў",Abe="ў",Mbe="Ŭ",Nbe="ŭ",Lbe="Û",Dbe="û",Ibe="У",Rbe="у",Pbe="⇅",Bbe="Ű",$be="ű",Fbe="⥮",Hbe="⥾",Ube="𝔘",zbe="𝔲",qbe="Ù",Vbe="ù",Wbe="⥣",jbe="↿",Gbe="↾",Kbe="▀",Ybe="⌜",Xbe="⌜",Jbe="⌏",Zbe="◸",Qbe="Ū",ewe="ū",twe="¨",rwe="_",nwe="⏟",iwe="⎵",owe="⏝",awe="⋃",swe="⊎",lwe="Ų",uwe="ų",cwe="𝕌",fwe="𝕦",dwe="⤒",pwe="↑",hwe="↑",vwe="⇑",mwe="⇅",gwe="↕",ywe="↕",bwe="⇕",wwe="⥮",Ewe="↿",xwe="↾",Cwe="⊎",kwe="↖",Twe="↗",Swe="υ",_we="ϒ",Owe="ϒ",Awe="Υ",Mwe="υ",Nwe="↥",Lwe="⊥",Dwe="⇈",Iwe="⌝",Rwe="⌝",Pwe="⌎",Bwe="Ů",$we="ů",Fwe="◹",Hwe="𝒰",Uwe="𝓊",zwe="⋰",qwe="Ũ",Vwe="ũ",Wwe="▵",jwe="▴",Gwe="⇈",Kwe="Ü",Ywe="ü",Xwe="⦧",Jwe="⦜",Zwe="ϵ",Qwe="ϰ",e1e="∅",t1e="ϕ",r1e="ϖ",n1e="∝",i1e="↕",o1e="⇕",a1e="ϱ",s1e="ς",l1e="⊊︀",u1e="⫋︀",c1e="⊋︀",f1e="⫌︀",d1e="ϑ",p1e="⊲",h1e="⊳",v1e="⫨",m1e="⫫",g1e="⫩",y1e="В",b1e="в",w1e="⊢",E1e="⊨",x1e="⊩",C1e="⊫",k1e="⫦",T1e="⊻",S1e="∨",_1e="⋁",O1e="≚",A1e="⋮",M1e="|",N1e="‖",L1e="|",D1e="‖",I1e="∣",R1e="|",P1e="❘",B1e="≀",$1e=" ",F1e="𝔙",H1e="𝔳",U1e="⊲",z1e="⊂⃒",q1e="⊃⃒",V1e="𝕍",W1e="𝕧",j1e="∝",G1e="⊳",K1e="𝒱",Y1e="𝓋",X1e="⫋︀",J1e="⊊︀",Z1e="⫌︀",Q1e="⊋︀",eEe="⊪",tEe="⦚",rEe="Ŵ",nEe="ŵ",iEe="⩟",oEe="∧",aEe="⋀",sEe="≙",lEe="℘",uEe="𝔚",cEe="𝔴",fEe="𝕎",dEe="𝕨",pEe="℘",hEe="≀",vEe="≀",mEe="𝒲",gEe="𝓌",yEe="⋂",bEe="◯",wEe="⋃",EEe="▽",xEe="𝔛",CEe="𝔵",kEe="⟷",TEe="⟺",SEe="Ξ",_Ee="ξ",OEe="⟵",AEe="⟸",MEe="⟼",NEe="⋻",LEe="⨀",DEe="𝕏",IEe="𝕩",REe="⨁",PEe="⨂",BEe="⟶",$Ee="⟹",FEe="𝒳",HEe="𝓍",UEe="⨆",zEe="⨄",qEe="△",VEe="⋁",WEe="⋀",jEe="Ý",GEe="ý",KEe="Я",YEe="я",XEe="Ŷ",JEe="ŷ",ZEe="Ы",QEe="ы",exe="¥",txe="𝔜",rxe="𝔶",nxe="Ї",ixe="ї",oxe="𝕐",axe="𝕪",sxe="𝒴",lxe="𝓎",uxe="Ю",cxe="ю",fxe="ÿ",dxe="Ÿ",pxe="Ź",hxe="ź",vxe="Ž",mxe="ž",gxe="З",yxe="з",bxe="Ż",wxe="ż",Exe="ℨ",xxe="",Cxe="Ζ",kxe="ζ",Txe="𝔷",Sxe="ℨ",_xe="Ж",Oxe="ж",Axe="⇝",Mxe="𝕫",Nxe="ℤ",Lxe="𝒵",Dxe="𝓏",Ixe="",Rxe="",TC={Aacute:bq,aacute:wq,Abreve:Eq,abreve:xq,ac:Cq,acd:kq,acE:Tq,Acirc:Sq,acirc:_q,acute:Oq,Acy:Aq,acy:Mq,AElig:Nq,aelig:Lq,af:Dq,Afr:Iq,afr:Rq,Agrave:Pq,agrave:Bq,alefsym:$q,aleph:Fq,Alpha:Hq,alpha:Uq,Amacr:zq,amacr:qq,amalg:Vq,amp:Wq,AMP:jq,andand:Gq,And:Kq,and:Yq,andd:Xq,andslope:Jq,andv:Zq,ang:Qq,ange:e6,angle:t6,angmsdaa:r6,angmsdab:n6,angmsdac:i6,angmsdad:o6,angmsdae:a6,angmsdaf:s6,angmsdag:l6,angmsdah:u6,angmsd:c6,angrt:f6,angrtvb:d6,angrtvbd:p6,angsph:h6,angst:v6,angzarr:m6,Aogon:g6,aogon:y6,Aopf:b6,aopf:w6,apacir:E6,ap:x6,apE:C6,ape:k6,apid:T6,apos:S6,ApplyFunction:_6,approx:O6,approxeq:A6,Aring:M6,aring:N6,Ascr:L6,ascr:D6,Assign:I6,ast:R6,asymp:P6,asympeq:B6,Atilde:$6,atilde:F6,Auml:H6,auml:U6,awconint:z6,awint:q6,backcong:V6,backepsilon:W6,backprime:j6,backsim:G6,backsimeq:K6,Backslash:Y6,Barv:X6,barvee:J6,barwed:Z6,Barwed:Q6,barwedge:eV,bbrk:tV,bbrktbrk:rV,bcong:nV,Bcy:iV,bcy:oV,bdquo:aV,becaus:sV,because:lV,Because:uV,bemptyv:cV,bepsi:fV,bernou:dV,Bernoullis:pV,Beta:hV,beta:vV,beth:mV,between:gV,Bfr:yV,bfr:bV,bigcap:wV,bigcirc:EV,bigcup:xV,bigodot:CV,bigoplus:kV,bigotimes:TV,bigsqcup:SV,bigstar:_V,bigtriangledown:OV,bigtriangleup:AV,biguplus:MV,bigvee:NV,bigwedge:LV,bkarow:DV,blacklozenge:IV,blacksquare:RV,blacktriangle:PV,blacktriangledown:BV,blacktriangleleft:$V,blacktriangleright:FV,blank:HV,blk12:UV,blk14:zV,blk34:qV,block:VV,bne:WV,bnequiv:jV,bNot:GV,bnot:KV,Bopf:YV,bopf:XV,bot:JV,bottom:ZV,bowtie:QV,boxbox:eW,boxdl:tW,boxdL:rW,boxDl:nW,boxDL:iW,boxdr:oW,boxdR:aW,boxDr:sW,boxDR:lW,boxh:uW,boxH:cW,boxhd:fW,boxHd:dW,boxhD:pW,boxHD:hW,boxhu:vW,boxHu:mW,boxhU:gW,boxHU:yW,boxminus:bW,boxplus:wW,boxtimes:EW,boxul:xW,boxuL:CW,boxUl:kW,boxUL:TW,boxur:SW,boxuR:_W,boxUr:OW,boxUR:AW,boxv:MW,boxV:NW,boxvh:LW,boxvH:DW,boxVh:IW,boxVH:RW,boxvl:PW,boxvL:BW,boxVl:$W,boxVL:FW,boxvr:HW,boxvR:UW,boxVr:zW,boxVR:qW,bprime:VW,breve:WW,Breve:jW,brvbar:GW,bscr:KW,Bscr:YW,bsemi:XW,bsim:JW,bsime:ZW,bsolb:QW,bsol:ej,bsolhsub:tj,bull:rj,bullet:nj,bump:ij,bumpE:oj,bumpe:aj,Bumpeq:sj,bumpeq:lj,Cacute:uj,cacute:cj,capand:fj,capbrcup:dj,capcap:pj,cap:hj,Cap:vj,capcup:mj,capdot:gj,CapitalDifferentialD:yj,caps:bj,caret:wj,caron:Ej,Cayleys:xj,ccaps:Cj,Ccaron:kj,ccaron:Tj,Ccedil:Sj,ccedil:_j,Ccirc:Oj,ccirc:Aj,Cconint:Mj,ccups:Nj,ccupssm:Lj,Cdot:Dj,cdot:Ij,cedil:Rj,Cedilla:Pj,cemptyv:Bj,cent:$j,centerdot:Fj,CenterDot:Hj,cfr:Uj,Cfr:zj,CHcy:qj,chcy:Vj,check:Wj,checkmark:jj,Chi:Gj,chi:Kj,circ:Yj,circeq:Xj,circlearrowleft:Jj,circlearrowright:Zj,circledast:Qj,circledcirc:e8,circleddash:t8,CircleDot:r8,circledR:n8,circledS:i8,CircleMinus:o8,CirclePlus:a8,CircleTimes:s8,cir:l8,cirE:u8,cire:c8,cirfnint:f8,cirmid:d8,cirscir:p8,ClockwiseContourIntegral:h8,CloseCurlyDoubleQuote:v8,CloseCurlyQuote:m8,clubs:g8,clubsuit:y8,colon:b8,Colon:w8,Colone:E8,colone:x8,coloneq:C8,comma:k8,commat:T8,comp:S8,compfn:_8,complement:O8,complexes:A8,cong:M8,congdot:N8,Congruent:L8,conint:D8,Conint:I8,ContourIntegral:R8,copf:P8,Copf:B8,coprod:$8,Coproduct:F8,copy:H8,COPY:U8,copysr:z8,CounterClockwiseContourIntegral:q8,crarr:V8,cross:W8,Cross:j8,Cscr:G8,cscr:K8,csub:Y8,csube:X8,csup:J8,csupe:Z8,ctdot:Q8,cudarrl:e7,cudarrr:t7,cuepr:r7,cuesc:n7,cularr:i7,cularrp:o7,cupbrcap:a7,cupcap:s7,CupCap:l7,cup:u7,Cup:c7,cupcup:f7,cupdot:d7,cupor:p7,cups:h7,curarr:v7,curarrm:m7,curlyeqprec:g7,curlyeqsucc:y7,curlyvee:b7,curlywedge:w7,curren:E7,curvearrowleft:x7,curvearrowright:C7,cuvee:k7,cuwed:T7,cwconint:S7,cwint:_7,cylcty:O7,dagger:A7,Dagger:M7,daleth:N7,darr:L7,Darr:D7,dArr:I7,dash:R7,Dashv:P7,dashv:B7,dbkarow:$7,dblac:F7,Dcaron:H7,dcaron:U7,Dcy:z7,dcy:q7,ddagger:V7,ddarr:W7,DD:j7,dd:G7,DDotrahd:K7,ddotseq:Y7,deg:X7,Del:J7,Delta:Z7,delta:Q7,demptyv:e9,dfisht:t9,Dfr:r9,dfr:n9,dHar:i9,dharl:o9,dharr:a9,DiacriticalAcute:s9,DiacriticalDot:l9,DiacriticalDoubleAcute:u9,DiacriticalGrave:c9,DiacriticalTilde:f9,diam:d9,diamond:p9,Diamond:h9,diamondsuit:v9,diams:m9,die:g9,DifferentialD:y9,digamma:b9,disin:w9,div:E9,divide:x9,divideontimes:C9,divonx:k9,DJcy:T9,djcy:S9,dlcorn:_9,dlcrop:O9,dollar:A9,Dopf:M9,dopf:N9,Dot:L9,dot:D9,DotDot:I9,doteq:R9,doteqdot:P9,DotEqual:B9,dotminus:$9,dotplus:F9,dotsquare:H9,doublebarwedge:U9,DoubleContourIntegral:z9,DoubleDot:q9,DoubleDownArrow:V9,DoubleLeftArrow:W9,DoubleLeftRightArrow:j9,DoubleLeftTee:G9,DoubleLongLeftArrow:K9,DoubleLongLeftRightArrow:Y9,DoubleLongRightArrow:X9,DoubleRightArrow:J9,DoubleRightTee:Z9,DoubleUpArrow:Q9,DoubleUpDownArrow:eG,DoubleVerticalBar:tG,DownArrowBar:rG,downarrow:nG,DownArrow:iG,Downarrow:oG,DownArrowUpArrow:aG,DownBreve:sG,downdownarrows:lG,downharpoonleft:uG,downharpoonright:cG,DownLeftRightVector:fG,DownLeftTeeVector:dG,DownLeftVectorBar:pG,DownLeftVector:hG,DownRightTeeVector:vG,DownRightVectorBar:mG,DownRightVector:gG,DownTeeArrow:yG,DownTee:bG,drbkarow:wG,drcorn:EG,drcrop:xG,Dscr:CG,dscr:kG,DScy:TG,dscy:SG,dsol:_G,Dstrok:OG,dstrok:AG,dtdot:MG,dtri:NG,dtrif:LG,duarr:DG,duhar:IG,dwangle:RG,DZcy:PG,dzcy:BG,dzigrarr:$G,Eacute:FG,eacute:HG,easter:UG,Ecaron:zG,ecaron:qG,Ecirc:VG,ecirc:WG,ecir:jG,ecolon:GG,Ecy:KG,ecy:YG,eDDot:XG,Edot:JG,edot:ZG,eDot:QG,ee:eK,efDot:tK,Efr:rK,efr:nK,eg:iK,Egrave:oK,egrave:aK,egs:sK,egsdot:lK,el:uK,Element:cK,elinters:fK,ell:dK,els:pK,elsdot:hK,Emacr:vK,emacr:mK,empty:gK,emptyset:yK,EmptySmallSquare:bK,emptyv:wK,EmptyVerySmallSquare:EK,emsp13:xK,emsp14:CK,emsp:kK,ENG:TK,eng:SK,ensp:_K,Eogon:OK,eogon:AK,Eopf:MK,eopf:NK,epar:LK,eparsl:DK,eplus:IK,epsi:RK,Epsilon:PK,epsilon:BK,epsiv:$K,eqcirc:FK,eqcolon:HK,eqsim:UK,eqslantgtr:zK,eqslantless:qK,Equal:VK,equals:WK,EqualTilde:jK,equest:GK,Equilibrium:KK,equiv:YK,equivDD:XK,eqvparsl:JK,erarr:ZK,erDot:QK,escr:eY,Escr:tY,esdot:rY,Esim:nY,esim:iY,Eta:oY,eta:aY,ETH:sY,eth:lY,Euml:uY,euml:cY,euro:fY,excl:dY,exist:pY,Exists:hY,expectation:vY,exponentiale:mY,ExponentialE:gY,fallingdotseq:yY,Fcy:bY,fcy:wY,female:EY,ffilig:xY,fflig:CY,ffllig:kY,Ffr:TY,ffr:SY,filig:_Y,FilledSmallSquare:OY,FilledVerySmallSquare:AY,fjlig:MY,flat:NY,fllig:LY,fltns:DY,fnof:IY,Fopf:RY,fopf:PY,forall:BY,ForAll:$Y,fork:FY,forkv:HY,Fouriertrf:UY,fpartint:zY,frac12:qY,frac13:VY,frac14:WY,frac15:jY,frac16:GY,frac18:KY,frac23:YY,frac25:XY,frac34:JY,frac35:ZY,frac38:QY,frac45:eX,frac56:tX,frac58:rX,frac78:nX,frasl:iX,frown:oX,fscr:aX,Fscr:sX,gacute:lX,Gamma:uX,gamma:cX,Gammad:fX,gammad:dX,gap:pX,Gbreve:hX,gbreve:vX,Gcedil:mX,Gcirc:gX,gcirc:yX,Gcy:bX,gcy:wX,Gdot:EX,gdot:xX,ge:CX,gE:kX,gEl:TX,gel:SX,geq:_X,geqq:OX,geqslant:AX,gescc:MX,ges:NX,gesdot:LX,gesdoto:DX,gesdotol:IX,gesl:RX,gesles:PX,Gfr:BX,gfr:$X,gg:FX,Gg:HX,ggg:UX,gimel:zX,GJcy:qX,gjcy:VX,gla:WX,gl:jX,glE:GX,glj:KX,gnap:YX,gnapprox:XX,gne:JX,gnE:ZX,gneq:QX,gneqq:eJ,gnsim:tJ,Gopf:rJ,gopf:nJ,grave:iJ,GreaterEqual:oJ,GreaterEqualLess:aJ,GreaterFullEqual:sJ,GreaterGreater:lJ,GreaterLess:uJ,GreaterSlantEqual:cJ,GreaterTilde:fJ,Gscr:dJ,gscr:pJ,gsim:hJ,gsime:vJ,gsiml:mJ,gtcc:gJ,gtcir:yJ,gt:bJ,GT:wJ,Gt:EJ,gtdot:xJ,gtlPar:CJ,gtquest:kJ,gtrapprox:TJ,gtrarr:SJ,gtrdot:_J,gtreqless:OJ,gtreqqless:AJ,gtrless:MJ,gtrsim:NJ,gvertneqq:LJ,gvnE:DJ,Hacek:IJ,hairsp:RJ,half:PJ,hamilt:BJ,HARDcy:$J,hardcy:FJ,harrcir:HJ,harr:UJ,hArr:zJ,harrw:qJ,Hat:VJ,hbar:WJ,Hcirc:jJ,hcirc:GJ,hearts:KJ,heartsuit:YJ,hellip:XJ,hercon:JJ,hfr:ZJ,Hfr:QJ,HilbertSpace:eZ,hksearow:tZ,hkswarow:rZ,hoarr:nZ,homtht:iZ,hookleftarrow:oZ,hookrightarrow:aZ,hopf:sZ,Hopf:lZ,horbar:uZ,HorizontalLine:cZ,hscr:fZ,Hscr:dZ,hslash:pZ,Hstrok:hZ,hstrok:vZ,HumpDownHump:mZ,HumpEqual:gZ,hybull:yZ,hyphen:bZ,Iacute:wZ,iacute:EZ,ic:xZ,Icirc:CZ,icirc:kZ,Icy:TZ,icy:SZ,Idot:_Z,IEcy:OZ,iecy:AZ,iexcl:MZ,iff:NZ,ifr:LZ,Ifr:DZ,Igrave:IZ,igrave:RZ,ii:PZ,iiiint:BZ,iiint:$Z,iinfin:FZ,iiota:HZ,IJlig:UZ,ijlig:zZ,Imacr:qZ,imacr:VZ,image:WZ,ImaginaryI:jZ,imagline:GZ,imagpart:KZ,imath:YZ,Im:XZ,imof:JZ,imped:ZZ,Implies:QZ,incare:eQ,in:"∈",infin:tQ,infintie:rQ,inodot:nQ,intcal:iQ,int:oQ,Int:aQ,integers:sQ,Integral:lQ,intercal:uQ,Intersection:cQ,intlarhk:fQ,intprod:dQ,InvisibleComma:pQ,InvisibleTimes:hQ,IOcy:vQ,iocy:mQ,Iogon:gQ,iogon:yQ,Iopf:bQ,iopf:wQ,Iota:EQ,iota:xQ,iprod:CQ,iquest:kQ,iscr:TQ,Iscr:SQ,isin:_Q,isindot:OQ,isinE:AQ,isins:MQ,isinsv:NQ,isinv:LQ,it:DQ,Itilde:IQ,itilde:RQ,Iukcy:PQ,iukcy:BQ,Iuml:$Q,iuml:FQ,Jcirc:HQ,jcirc:UQ,Jcy:zQ,jcy:qQ,Jfr:VQ,jfr:WQ,jmath:jQ,Jopf:GQ,jopf:KQ,Jscr:YQ,jscr:XQ,Jsercy:JQ,jsercy:ZQ,Jukcy:QQ,jukcy:eee,Kappa:tee,kappa:ree,kappav:nee,Kcedil:iee,kcedil:oee,Kcy:aee,kcy:see,Kfr:lee,kfr:uee,kgreen:cee,KHcy:fee,khcy:dee,KJcy:pee,kjcy:hee,Kopf:vee,kopf:mee,Kscr:gee,kscr:yee,lAarr:bee,Lacute:wee,lacute:Eee,laemptyv:xee,lagran:Cee,Lambda:kee,lambda:Tee,lang:See,Lang:_ee,langd:Oee,langle:Aee,lap:Mee,Laplacetrf:Nee,laquo:Lee,larrb:Dee,larrbfs:Iee,larr:Ree,Larr:Pee,lArr:Bee,larrfs:$ee,larrhk:Fee,larrlp:Hee,larrpl:Uee,larrsim:zee,larrtl:qee,latail:Vee,lAtail:Wee,lat:jee,late:Gee,lates:Kee,lbarr:Yee,lBarr:Xee,lbbrk:Jee,lbrace:Zee,lbrack:Qee,lbrke:ete,lbrksld:tte,lbrkslu:rte,Lcaron:nte,lcaron:ite,Lcedil:ote,lcedil:ate,lceil:ste,lcub:lte,Lcy:ute,lcy:cte,ldca:fte,ldquo:dte,ldquor:pte,ldrdhar:hte,ldrushar:vte,ldsh:mte,le:gte,lE:yte,LeftAngleBracket:bte,LeftArrowBar:wte,leftarrow:Ete,LeftArrow:xte,Leftarrow:Cte,LeftArrowRightArrow:kte,leftarrowtail:Tte,LeftCeiling:Ste,LeftDoubleBracket:_te,LeftDownTeeVector:Ote,LeftDownVectorBar:Ate,LeftDownVector:Mte,LeftFloor:Nte,leftharpoondown:Lte,leftharpoonup:Dte,leftleftarrows:Ite,leftrightarrow:Rte,LeftRightArrow:Pte,Leftrightarrow:Bte,leftrightarrows:$te,leftrightharpoons:Fte,leftrightsquigarrow:Hte,LeftRightVector:Ute,LeftTeeArrow:zte,LeftTee:qte,LeftTeeVector:Vte,leftthreetimes:Wte,LeftTriangleBar:jte,LeftTriangle:Gte,LeftTriangleEqual:Kte,LeftUpDownVector:Yte,LeftUpTeeVector:Xte,LeftUpVectorBar:Jte,LeftUpVector:Zte,LeftVectorBar:Qte,LeftVector:ere,lEg:tre,leg:rre,leq:nre,leqq:ire,leqslant:ore,lescc:are,les:sre,lesdot:lre,lesdoto:ure,lesdotor:cre,lesg:fre,lesges:dre,lessapprox:pre,lessdot:hre,lesseqgtr:vre,lesseqqgtr:mre,LessEqualGreater:gre,LessFullEqual:yre,LessGreater:bre,lessgtr:wre,LessLess:Ere,lesssim:xre,LessSlantEqual:Cre,LessTilde:kre,lfisht:Tre,lfloor:Sre,Lfr:_re,lfr:Ore,lg:Are,lgE:Mre,lHar:Nre,lhard:Lre,lharu:Dre,lharul:Ire,lhblk:Rre,LJcy:Pre,ljcy:Bre,llarr:$re,ll:Fre,Ll:Hre,llcorner:Ure,Lleftarrow:zre,llhard:qre,lltri:Vre,Lmidot:Wre,lmidot:jre,lmoustache:Gre,lmoust:Kre,lnap:Yre,lnapprox:Xre,lne:Jre,lnE:Zre,lneq:Qre,lneqq:ene,lnsim:tne,loang:rne,loarr:nne,lobrk:ine,longleftarrow:one,LongLeftArrow:ane,Longleftarrow:sne,longleftrightarrow:lne,LongLeftRightArrow:une,Longleftrightarrow:cne,longmapsto:fne,longrightarrow:dne,LongRightArrow:pne,Longrightarrow:hne,looparrowleft:vne,looparrowright:mne,lopar:gne,Lopf:yne,lopf:bne,loplus:wne,lotimes:Ene,lowast:xne,lowbar:Cne,LowerLeftArrow:kne,LowerRightArrow:Tne,loz:Sne,lozenge:_ne,lozf:One,lpar:Ane,lparlt:Mne,lrarr:Nne,lrcorner:Lne,lrhar:Dne,lrhard:Ine,lrm:Rne,lrtri:Pne,lsaquo:Bne,lscr:$ne,Lscr:Fne,lsh:Hne,Lsh:Une,lsim:zne,lsime:qne,lsimg:Vne,lsqb:Wne,lsquo:jne,lsquor:Gne,Lstrok:Kne,lstrok:Yne,ltcc:Xne,ltcir:Jne,lt:Zne,LT:Qne,Lt:eie,ltdot:tie,lthree:rie,ltimes:nie,ltlarr:iie,ltquest:oie,ltri:aie,ltrie:sie,ltrif:lie,ltrPar:uie,lurdshar:cie,luruhar:fie,lvertneqq:die,lvnE:pie,macr:hie,male:vie,malt:mie,maltese:gie,Map:"⤅",map:yie,mapsto:bie,mapstodown:wie,mapstoleft:Eie,mapstoup:xie,marker:Cie,mcomma:kie,Mcy:Tie,mcy:Sie,mdash:_ie,mDDot:Oie,measuredangle:Aie,MediumSpace:Mie,Mellintrf:Nie,Mfr:Lie,mfr:Die,mho:Iie,micro:Rie,midast:Pie,midcir:Bie,mid:$ie,middot:Fie,minusb:Hie,minus:Uie,minusd:zie,minusdu:qie,MinusPlus:Vie,mlcp:Wie,mldr:jie,mnplus:Gie,models:Kie,Mopf:Yie,mopf:Xie,mp:Jie,mscr:Zie,Mscr:Qie,mstpos:eoe,Mu:toe,mu:roe,multimap:noe,mumap:ioe,nabla:ooe,Nacute:aoe,nacute:soe,nang:loe,nap:uoe,napE:coe,napid:foe,napos:doe,napprox:poe,natural:hoe,naturals:voe,natur:moe,nbsp:goe,nbump:yoe,nbumpe:boe,ncap:woe,Ncaron:Eoe,ncaron:xoe,Ncedil:Coe,ncedil:koe,ncong:Toe,ncongdot:Soe,ncup:_oe,Ncy:Ooe,ncy:Aoe,ndash:Moe,nearhk:Noe,nearr:Loe,neArr:Doe,nearrow:Ioe,ne:Roe,nedot:Poe,NegativeMediumSpace:Boe,NegativeThickSpace:$oe,NegativeThinSpace:Foe,NegativeVeryThinSpace:Hoe,nequiv:Uoe,nesear:zoe,nesim:qoe,NestedGreaterGreater:Voe,NestedLessLess:Woe,NewLine:joe,nexist:Goe,nexists:Koe,Nfr:Yoe,nfr:Xoe,ngE:Joe,nge:Zoe,ngeq:Qoe,ngeqq:eae,ngeqslant:tae,nges:rae,nGg:nae,ngsim:iae,nGt:oae,ngt:aae,ngtr:sae,nGtv:lae,nharr:uae,nhArr:cae,nhpar:fae,ni:dae,nis:pae,nisd:hae,niv:vae,NJcy:mae,njcy:gae,nlarr:yae,nlArr:bae,nldr:wae,nlE:Eae,nle:xae,nleftarrow:Cae,nLeftarrow:kae,nleftrightarrow:Tae,nLeftrightarrow:Sae,nleq:_ae,nleqq:Oae,nleqslant:Aae,nles:Mae,nless:Nae,nLl:Lae,nlsim:Dae,nLt:Iae,nlt:Rae,nltri:Pae,nltrie:Bae,nLtv:$ae,nmid:Fae,NoBreak:Hae,NonBreakingSpace:Uae,nopf:zae,Nopf:qae,Not:Vae,not:Wae,NotCongruent:jae,NotCupCap:Gae,NotDoubleVerticalBar:Kae,NotElement:Yae,NotEqual:Xae,NotEqualTilde:Jae,NotExists:Zae,NotGreater:Qae,NotGreaterEqual:ese,NotGreaterFullEqual:tse,NotGreaterGreater:rse,NotGreaterLess:nse,NotGreaterSlantEqual:ise,NotGreaterTilde:ose,NotHumpDownHump:ase,NotHumpEqual:sse,notin:lse,notindot:use,notinE:cse,notinva:fse,notinvb:dse,notinvc:pse,NotLeftTriangleBar:hse,NotLeftTriangle:vse,NotLeftTriangleEqual:mse,NotLess:gse,NotLessEqual:yse,NotLessGreater:bse,NotLessLess:wse,NotLessSlantEqual:Ese,NotLessTilde:xse,NotNestedGreaterGreater:Cse,NotNestedLessLess:kse,notni:Tse,notniva:Sse,notnivb:_se,notnivc:Ose,NotPrecedes:Ase,NotPrecedesEqual:Mse,NotPrecedesSlantEqual:Nse,NotReverseElement:Lse,NotRightTriangleBar:Dse,NotRightTriangle:Ise,NotRightTriangleEqual:Rse,NotSquareSubset:Pse,NotSquareSubsetEqual:Bse,NotSquareSuperset:$se,NotSquareSupersetEqual:Fse,NotSubset:Hse,NotSubsetEqual:Use,NotSucceeds:zse,NotSucceedsEqual:qse,NotSucceedsSlantEqual:Vse,NotSucceedsTilde:Wse,NotSuperset:jse,NotSupersetEqual:Gse,NotTilde:Kse,NotTildeEqual:Yse,NotTildeFullEqual:Xse,NotTildeTilde:Jse,NotVerticalBar:Zse,nparallel:Qse,npar:ele,nparsl:tle,npart:rle,npolint:nle,npr:ile,nprcue:ole,nprec:ale,npreceq:sle,npre:lle,nrarrc:ule,nrarr:cle,nrArr:fle,nrarrw:dle,nrightarrow:ple,nRightarrow:hle,nrtri:vle,nrtrie:mle,nsc:gle,nsccue:yle,nsce:ble,Nscr:wle,nscr:Ele,nshortmid:xle,nshortparallel:Cle,nsim:kle,nsime:Tle,nsimeq:Sle,nsmid:_le,nspar:Ole,nsqsube:Ale,nsqsupe:Mle,nsub:Nle,nsubE:Lle,nsube:Dle,nsubset:Ile,nsubseteq:Rle,nsubseteqq:Ple,nsucc:Ble,nsucceq:$le,nsup:Fle,nsupE:Hle,nsupe:Ule,nsupset:zle,nsupseteq:qle,nsupseteqq:Vle,ntgl:Wle,Ntilde:jle,ntilde:Gle,ntlg:Kle,ntriangleleft:Yle,ntrianglelefteq:Xle,ntriangleright:Jle,ntrianglerighteq:Zle,Nu:Qle,nu:eue,num:tue,numero:rue,numsp:nue,nvap:iue,nvdash:oue,nvDash:aue,nVdash:sue,nVDash:lue,nvge:uue,nvgt:cue,nvHarr:fue,nvinfin:due,nvlArr:pue,nvle:hue,nvlt:vue,nvltrie:mue,nvrArr:gue,nvrtrie:yue,nvsim:bue,nwarhk:wue,nwarr:Eue,nwArr:xue,nwarrow:Cue,nwnear:kue,Oacute:Tue,oacute:Sue,oast:_ue,Ocirc:Oue,ocirc:Aue,ocir:Mue,Ocy:Nue,ocy:Lue,odash:Due,Odblac:Iue,odblac:Rue,odiv:Pue,odot:Bue,odsold:$ue,OElig:Fue,oelig:Hue,ofcir:Uue,Ofr:zue,ofr:que,ogon:Vue,Ograve:Wue,ograve:jue,ogt:Gue,ohbar:Kue,ohm:Yue,oint:Xue,olarr:Jue,olcir:Zue,olcross:Que,oline:ece,olt:tce,Omacr:rce,omacr:nce,Omega:ice,omega:oce,Omicron:ace,omicron:sce,omid:lce,ominus:uce,Oopf:cce,oopf:fce,opar:dce,OpenCurlyDoubleQuote:pce,OpenCurlyQuote:hce,operp:vce,oplus:mce,orarr:gce,Or:yce,or:bce,ord:wce,order:Ece,orderof:xce,ordf:Cce,ordm:kce,origof:Tce,oror:Sce,orslope:_ce,orv:Oce,oS:Ace,Oscr:Mce,oscr:Nce,Oslash:Lce,oslash:Dce,osol:Ice,Otilde:Rce,otilde:Pce,otimesas:Bce,Otimes:$ce,otimes:Fce,Ouml:Hce,ouml:Uce,ovbar:zce,OverBar:qce,OverBrace:Vce,OverBracket:Wce,OverParenthesis:jce,para:Gce,parallel:Kce,par:Yce,parsim:Xce,parsl:Jce,part:Zce,PartialD:Qce,Pcy:efe,pcy:tfe,percnt:rfe,period:nfe,permil:ife,perp:ofe,pertenk:afe,Pfr:sfe,pfr:lfe,Phi:ufe,phi:cfe,phiv:ffe,phmmat:dfe,phone:pfe,Pi:hfe,pi:vfe,pitchfork:mfe,piv:gfe,planck:yfe,planckh:bfe,plankv:wfe,plusacir:Efe,plusb:xfe,pluscir:Cfe,plus:kfe,plusdo:Tfe,plusdu:Sfe,pluse:_fe,PlusMinus:Ofe,plusmn:Afe,plussim:Mfe,plustwo:Nfe,pm:Lfe,Poincareplane:Dfe,pointint:Ife,popf:Rfe,Popf:Pfe,pound:Bfe,prap:$fe,Pr:Ffe,pr:Hfe,prcue:Ufe,precapprox:zfe,prec:qfe,preccurlyeq:Vfe,Precedes:Wfe,PrecedesEqual:jfe,PrecedesSlantEqual:Gfe,PrecedesTilde:Kfe,preceq:Yfe,precnapprox:Xfe,precneqq:Jfe,precnsim:Zfe,pre:Qfe,prE:ede,precsim:tde,prime:rde,Prime:nde,primes:ide,prnap:ode,prnE:ade,prnsim:sde,prod:lde,Product:ude,profalar:cde,profline:fde,profsurf:dde,prop:pde,Proportional:hde,Proportion:vde,propto:mde,prsim:gde,prurel:yde,Pscr:bde,pscr:wde,Psi:Ede,psi:xde,puncsp:Cde,Qfr:kde,qfr:Tde,qint:Sde,qopf:_de,Qopf:Ode,qprime:Ade,Qscr:Mde,qscr:Nde,quaternions:Lde,quatint:Dde,quest:Ide,questeq:Rde,quot:Pde,QUOT:Bde,rAarr:$de,race:Fde,Racute:Hde,racute:Ude,radic:zde,raemptyv:qde,rang:Vde,Rang:Wde,rangd:jde,range:Gde,rangle:Kde,raquo:Yde,rarrap:Xde,rarrb:Jde,rarrbfs:Zde,rarrc:Qde,rarr:epe,Rarr:tpe,rArr:rpe,rarrfs:npe,rarrhk:ipe,rarrlp:ope,rarrpl:ape,rarrsim:spe,Rarrtl:lpe,rarrtl:upe,rarrw:cpe,ratail:fpe,rAtail:dpe,ratio:ppe,rationals:hpe,rbarr:vpe,rBarr:mpe,RBarr:gpe,rbbrk:ype,rbrace:bpe,rbrack:wpe,rbrke:Epe,rbrksld:xpe,rbrkslu:Cpe,Rcaron:kpe,rcaron:Tpe,Rcedil:Spe,rcedil:_pe,rceil:Ope,rcub:Ape,Rcy:Mpe,rcy:Npe,rdca:Lpe,rdldhar:Dpe,rdquo:Ipe,rdquor:Rpe,rdsh:Ppe,real:Bpe,realine:$pe,realpart:Fpe,reals:Hpe,Re:Upe,rect:zpe,reg:qpe,REG:Vpe,ReverseElement:Wpe,ReverseEquilibrium:jpe,ReverseUpEquilibrium:Gpe,rfisht:Kpe,rfloor:Ype,rfr:Xpe,Rfr:Jpe,rHar:Zpe,rhard:Qpe,rharu:ehe,rharul:the,Rho:rhe,rho:nhe,rhov:ihe,RightAngleBracket:ohe,RightArrowBar:ahe,rightarrow:she,RightArrow:lhe,Rightarrow:uhe,RightArrowLeftArrow:che,rightarrowtail:fhe,RightCeiling:dhe,RightDoubleBracket:phe,RightDownTeeVector:hhe,RightDownVectorBar:vhe,RightDownVector:mhe,RightFloor:ghe,rightharpoondown:yhe,rightharpoonup:bhe,rightleftarrows:whe,rightleftharpoons:Ehe,rightrightarrows:xhe,rightsquigarrow:Che,RightTeeArrow:khe,RightTee:The,RightTeeVector:She,rightthreetimes:_he,RightTriangleBar:Ohe,RightTriangle:Ahe,RightTriangleEqual:Mhe,RightUpDownVector:Nhe,RightUpTeeVector:Lhe,RightUpVectorBar:Dhe,RightUpVector:Ihe,RightVectorBar:Rhe,RightVector:Phe,ring:Bhe,risingdotseq:$he,rlarr:Fhe,rlhar:Hhe,rlm:Uhe,rmoustache:zhe,rmoust:qhe,rnmid:Vhe,roang:Whe,roarr:jhe,robrk:Ghe,ropar:Khe,ropf:Yhe,Ropf:Xhe,roplus:Jhe,rotimes:Zhe,RoundImplies:Qhe,rpar:eve,rpargt:tve,rppolint:rve,rrarr:nve,Rrightarrow:ive,rsaquo:ove,rscr:ave,Rscr:sve,rsh:lve,Rsh:uve,rsqb:cve,rsquo:fve,rsquor:dve,rthree:pve,rtimes:hve,rtri:vve,rtrie:mve,rtrif:gve,rtriltri:yve,RuleDelayed:bve,ruluhar:wve,rx:Eve,Sacute:xve,sacute:Cve,sbquo:kve,scap:Tve,Scaron:Sve,scaron:_ve,Sc:Ove,sc:Ave,sccue:Mve,sce:Nve,scE:Lve,Scedil:Dve,scedil:Ive,Scirc:Rve,scirc:Pve,scnap:Bve,scnE:$ve,scnsim:Fve,scpolint:Hve,scsim:Uve,Scy:zve,scy:qve,sdotb:Vve,sdot:Wve,sdote:jve,searhk:Gve,searr:Kve,seArr:Yve,searrow:Xve,sect:Jve,semi:Zve,seswar:Qve,setminus:eme,setmn:tme,sext:rme,Sfr:nme,sfr:ime,sfrown:ome,sharp:ame,SHCHcy:sme,shchcy:lme,SHcy:ume,shcy:cme,ShortDownArrow:fme,ShortLeftArrow:dme,shortmid:pme,shortparallel:hme,ShortRightArrow:vme,ShortUpArrow:mme,shy:gme,Sigma:yme,sigma:bme,sigmaf:wme,sigmav:Eme,sim:xme,simdot:Cme,sime:kme,simeq:Tme,simg:Sme,simgE:_me,siml:Ome,simlE:Ame,simne:Mme,simplus:Nme,simrarr:Lme,slarr:Dme,SmallCircle:Ime,smallsetminus:Rme,smashp:Pme,smeparsl:Bme,smid:$me,smile:Fme,smt:Hme,smte:Ume,smtes:zme,SOFTcy:qme,softcy:Vme,solbar:Wme,solb:jme,sol:Gme,Sopf:Kme,sopf:Yme,spades:Xme,spadesuit:Jme,spar:Zme,sqcap:Qme,sqcaps:ege,sqcup:tge,sqcups:rge,Sqrt:nge,sqsub:ige,sqsube:oge,sqsubset:age,sqsubseteq:sge,sqsup:lge,sqsupe:uge,sqsupset:cge,sqsupseteq:fge,square:dge,Square:pge,SquareIntersection:hge,SquareSubset:vge,SquareSubsetEqual:mge,SquareSuperset:gge,SquareSupersetEqual:yge,SquareUnion:bge,squarf:wge,squ:Ege,squf:xge,srarr:Cge,Sscr:kge,sscr:Tge,ssetmn:Sge,ssmile:_ge,sstarf:Oge,Star:Age,star:Mge,starf:Nge,straightepsilon:Lge,straightphi:Dge,strns:Ige,sub:Rge,Sub:Pge,subdot:Bge,subE:$ge,sube:Fge,subedot:Hge,submult:Uge,subnE:zge,subne:qge,subplus:Vge,subrarr:Wge,subset:jge,Subset:Gge,subseteq:Kge,subseteqq:Yge,SubsetEqual:Xge,subsetneq:Jge,subsetneqq:Zge,subsim:Qge,subsub:eye,subsup:tye,succapprox:rye,succ:nye,succcurlyeq:iye,Succeeds:oye,SucceedsEqual:aye,SucceedsSlantEqual:sye,SucceedsTilde:lye,succeq:uye,succnapprox:cye,succneqq:fye,succnsim:dye,succsim:pye,SuchThat:hye,sum:vye,Sum:mye,sung:gye,sup1:yye,sup2:bye,sup3:wye,sup:Eye,Sup:xye,supdot:Cye,supdsub:kye,supE:Tye,supe:Sye,supedot:_ye,Superset:Oye,SupersetEqual:Aye,suphsol:Mye,suphsub:Nye,suplarr:Lye,supmult:Dye,supnE:Iye,supne:Rye,supplus:Pye,supset:Bye,Supset:$ye,supseteq:Fye,supseteqq:Hye,supsetneq:Uye,supsetneqq:zye,supsim:qye,supsub:Vye,supsup:Wye,swarhk:jye,swarr:Gye,swArr:Kye,swarrow:Yye,swnwar:Xye,szlig:Jye,Tab:Zye,target:Qye,Tau:e0e,tau:t0e,tbrk:r0e,Tcaron:n0e,tcaron:i0e,Tcedil:o0e,tcedil:a0e,Tcy:s0e,tcy:l0e,tdot:u0e,telrec:c0e,Tfr:f0e,tfr:d0e,there4:p0e,therefore:h0e,Therefore:v0e,Theta:m0e,theta:g0e,thetasym:y0e,thetav:b0e,thickapprox:w0e,thicksim:E0e,ThickSpace:x0e,ThinSpace:C0e,thinsp:k0e,thkap:T0e,thksim:S0e,THORN:_0e,thorn:O0e,tilde:A0e,Tilde:M0e,TildeEqual:N0e,TildeFullEqual:L0e,TildeTilde:D0e,timesbar:I0e,timesb:R0e,times:P0e,timesd:B0e,tint:$0e,toea:F0e,topbot:H0e,topcir:U0e,top:z0e,Topf:q0e,topf:V0e,topfork:W0e,tosa:j0e,tprime:G0e,trade:K0e,TRADE:Y0e,triangle:X0e,triangledown:J0e,triangleleft:Z0e,trianglelefteq:Q0e,triangleq:ebe,triangleright:tbe,trianglerighteq:rbe,tridot:nbe,trie:ibe,triminus:obe,TripleDot:abe,triplus:sbe,trisb:lbe,tritime:ube,trpezium:cbe,Tscr:fbe,tscr:dbe,TScy:pbe,tscy:hbe,TSHcy:vbe,tshcy:mbe,Tstrok:gbe,tstrok:ybe,twixt:bbe,twoheadleftarrow:wbe,twoheadrightarrow:Ebe,Uacute:xbe,uacute:Cbe,uarr:kbe,Uarr:Tbe,uArr:Sbe,Uarrocir:_be,Ubrcy:Obe,ubrcy:Abe,Ubreve:Mbe,ubreve:Nbe,Ucirc:Lbe,ucirc:Dbe,Ucy:Ibe,ucy:Rbe,udarr:Pbe,Udblac:Bbe,udblac:$be,udhar:Fbe,ufisht:Hbe,Ufr:Ube,ufr:zbe,Ugrave:qbe,ugrave:Vbe,uHar:Wbe,uharl:jbe,uharr:Gbe,uhblk:Kbe,ulcorn:Ybe,ulcorner:Xbe,ulcrop:Jbe,ultri:Zbe,Umacr:Qbe,umacr:ewe,uml:twe,UnderBar:rwe,UnderBrace:nwe,UnderBracket:iwe,UnderParenthesis:owe,Union:awe,UnionPlus:swe,Uogon:lwe,uogon:uwe,Uopf:cwe,uopf:fwe,UpArrowBar:dwe,uparrow:pwe,UpArrow:hwe,Uparrow:vwe,UpArrowDownArrow:mwe,updownarrow:gwe,UpDownArrow:ywe,Updownarrow:bwe,UpEquilibrium:wwe,upharpoonleft:Ewe,upharpoonright:xwe,uplus:Cwe,UpperLeftArrow:kwe,UpperRightArrow:Twe,upsi:Swe,Upsi:_we,upsih:Owe,Upsilon:Awe,upsilon:Mwe,UpTeeArrow:Nwe,UpTee:Lwe,upuparrows:Dwe,urcorn:Iwe,urcorner:Rwe,urcrop:Pwe,Uring:Bwe,uring:$we,urtri:Fwe,Uscr:Hwe,uscr:Uwe,utdot:zwe,Utilde:qwe,utilde:Vwe,utri:Wwe,utrif:jwe,uuarr:Gwe,Uuml:Kwe,uuml:Ywe,uwangle:Xwe,vangrt:Jwe,varepsilon:Zwe,varkappa:Qwe,varnothing:e1e,varphi:t1e,varpi:r1e,varpropto:n1e,varr:i1e,vArr:o1e,varrho:a1e,varsigma:s1e,varsubsetneq:l1e,varsubsetneqq:u1e,varsupsetneq:c1e,varsupsetneqq:f1e,vartheta:d1e,vartriangleleft:p1e,vartriangleright:h1e,vBar:v1e,Vbar:m1e,vBarv:g1e,Vcy:y1e,vcy:b1e,vdash:w1e,vDash:E1e,Vdash:x1e,VDash:C1e,Vdashl:k1e,veebar:T1e,vee:S1e,Vee:_1e,veeeq:O1e,vellip:A1e,verbar:M1e,Verbar:N1e,vert:L1e,Vert:D1e,VerticalBar:I1e,VerticalLine:R1e,VerticalSeparator:P1e,VerticalTilde:B1e,VeryThinSpace:$1e,Vfr:F1e,vfr:H1e,vltri:U1e,vnsub:z1e,vnsup:q1e,Vopf:V1e,vopf:W1e,vprop:j1e,vrtri:G1e,Vscr:K1e,vscr:Y1e,vsubnE:X1e,vsubne:J1e,vsupnE:Z1e,vsupne:Q1e,Vvdash:eEe,vzigzag:tEe,Wcirc:rEe,wcirc:nEe,wedbar:iEe,wedge:oEe,Wedge:aEe,wedgeq:sEe,weierp:lEe,Wfr:uEe,wfr:cEe,Wopf:fEe,wopf:dEe,wp:pEe,wr:hEe,wreath:vEe,Wscr:mEe,wscr:gEe,xcap:yEe,xcirc:bEe,xcup:wEe,xdtri:EEe,Xfr:xEe,xfr:CEe,xharr:kEe,xhArr:TEe,Xi:SEe,xi:_Ee,xlarr:OEe,xlArr:AEe,xmap:MEe,xnis:NEe,xodot:LEe,Xopf:DEe,xopf:IEe,xoplus:REe,xotime:PEe,xrarr:BEe,xrArr:$Ee,Xscr:FEe,xscr:HEe,xsqcup:UEe,xuplus:zEe,xutri:qEe,xvee:VEe,xwedge:WEe,Yacute:jEe,yacute:GEe,YAcy:KEe,yacy:YEe,Ycirc:XEe,ycirc:JEe,Ycy:ZEe,ycy:QEe,yen:exe,Yfr:txe,yfr:rxe,YIcy:nxe,yicy:ixe,Yopf:oxe,yopf:axe,Yscr:sxe,yscr:lxe,YUcy:uxe,yucy:cxe,yuml:fxe,Yuml:dxe,Zacute:pxe,zacute:hxe,Zcaron:vxe,zcaron:mxe,Zcy:gxe,zcy:yxe,Zdot:bxe,zdot:wxe,zeetrf:Exe,ZeroWidthSpace:xxe,Zeta:Cxe,zeta:kxe,zfr:Txe,Zfr:Sxe,ZHcy:_xe,zhcy:Oxe,zigrarr:Axe,zopf:Mxe,Zopf:Nxe,Zscr:Lxe,zscr:Dxe,zwj:Ixe,zwnj:Rxe},Pxe="Á",Bxe="á",$xe="Â",Fxe="â",Hxe="´",Uxe="Æ",zxe="æ",qxe="À",Vxe="à",Wxe="&",jxe="&",Gxe="Å",Kxe="å",Yxe="Ã",Xxe="ã",Jxe="Ä",Zxe="ä",Qxe="¦",eCe="Ç",tCe="ç",rCe="¸",nCe="¢",iCe="©",oCe="©",aCe="¤",sCe="°",lCe="÷",uCe="É",cCe="é",fCe="Ê",dCe="ê",pCe="È",hCe="è",vCe="Ð",mCe="ð",gCe="Ë",yCe="ë",bCe="½",wCe="¼",ECe="¾",xCe=">",CCe=">",kCe="Í",TCe="í",SCe="Î",_Ce="î",OCe="¡",ACe="Ì",MCe="ì",NCe="¿",LCe="Ï",DCe="ï",ICe="«",RCe="<",PCe="<",BCe="¯",$Ce="µ",FCe="·",HCe=" ",UCe="¬",zCe="Ñ",qCe="ñ",VCe="Ó",WCe="ó",jCe="Ô",GCe="ô",KCe="Ò",YCe="ò",XCe="ª",JCe="º",ZCe="Ø",QCe="ø",eke="Õ",tke="õ",rke="Ö",nke="ö",ike="¶",oke="±",ake="£",ske='"',lke='"',uke="»",cke="®",fke="®",dke="§",pke="",hke="¹",vke="²",mke="³",gke="ß",yke="Þ",bke="þ",wke="×",Eke="Ú",xke="ú",Cke="Û",kke="û",Tke="Ù",Ske="ù",_ke="¨",Oke="Ü",Ake="ü",Mke="Ý",Nke="ý",Lke="¥",Dke="ÿ",Ike={Aacute:Pxe,aacute:Bxe,Acirc:$xe,acirc:Fxe,acute:Hxe,AElig:Uxe,aelig:zxe,Agrave:qxe,agrave:Vxe,amp:Wxe,AMP:jxe,Aring:Gxe,aring:Kxe,Atilde:Yxe,atilde:Xxe,Auml:Jxe,auml:Zxe,brvbar:Qxe,Ccedil:eCe,ccedil:tCe,cedil:rCe,cent:nCe,copy:iCe,COPY:oCe,curren:aCe,deg:sCe,divide:lCe,Eacute:uCe,eacute:cCe,Ecirc:fCe,ecirc:dCe,Egrave:pCe,egrave:hCe,ETH:vCe,eth:mCe,Euml:gCe,euml:yCe,frac12:bCe,frac14:wCe,frac34:ECe,gt:xCe,GT:CCe,Iacute:kCe,iacute:TCe,Icirc:SCe,icirc:_Ce,iexcl:OCe,Igrave:ACe,igrave:MCe,iquest:NCe,Iuml:LCe,iuml:DCe,laquo:ICe,lt:RCe,LT:PCe,macr:BCe,micro:$Ce,middot:FCe,nbsp:HCe,not:UCe,Ntilde:zCe,ntilde:qCe,Oacute:VCe,oacute:WCe,Ocirc:jCe,ocirc:GCe,Ograve:KCe,ograve:YCe,ordf:XCe,ordm:JCe,Oslash:ZCe,oslash:QCe,Otilde:eke,otilde:tke,Ouml:rke,ouml:nke,para:ike,plusmn:oke,pound:ake,quot:ske,QUOT:lke,raquo:uke,reg:cke,REG:fke,sect:dke,shy:pke,sup1:hke,sup2:vke,sup3:mke,szlig:gke,THORN:yke,thorn:bke,times:wke,Uacute:Eke,uacute:xke,Ucirc:Cke,ucirc:kke,Ugrave:Tke,ugrave:Ske,uml:_ke,Uuml:Oke,uuml:Ake,Yacute:Mke,yacute:Nke,yen:Lke,yuml:Dke},Rke="&",Pke="'",Bke=">",$ke="<",Fke='"',SC={amp:Rke,apos:Pke,gt:Bke,lt:$ke,quot:Fke},Xv={},Hke={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},Uke=Hs&&Hs.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Xv,"__esModule",{value:!0});var _C=Uke(Hke),zke=String.fromCodePoint||function(t){var e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function qke(t){return t>=55296&&t<=57343||t>1114111?"�":(t in _C.default&&(t=_C.default[t]),zke(t))}Xv.default=qke;var Pf=Hs&&Hs.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.decodeHTML=Yi.decodeHTMLStrict=Yi.decodeXML=void 0;var Jv=Pf(TC),Vke=Pf(Ike),Wke=Pf(SC),OC=Pf(Xv),jke=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;Yi.decodeXML=AC(Wke.default),Yi.decodeHTMLStrict=AC(Jv.default);function AC(t){var e=NC(t);return function(r){return String(r).replace(jke,e)}}var MC=function(t,e){return t<e?1:-1};Yi.decodeHTML=function(){for(var t=Object.keys(Vke.default).sort(MC),e=Object.keys(Jv.default).sort(MC),r=0,n=0;r<e.length;r++)t[n]===e[r]?(e[r]+=";?",n++):e[r]+=";";var i=new RegExp("&(?:"+e.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),o=NC(Jv.default);function a(s){return s.substr(-1)!==";"&&(s+=";"),o(s)}return function(s){return String(s).replace(i,a)}}();function NC(t){return function(r){if(r.charAt(1)==="#"){var n=r.charAt(2);return n==="X"||n==="x"?OC.default(parseInt(r.substr(3),16)):OC.default(parseInt(r.substr(2),10))}return t[r.slice(1,-1)]||r}}var bn={},LC=Hs&&Hs.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(bn,"__esModule",{value:!0}),bn.escapeUTF8=bn.escape=bn.encodeNonAsciiHTML=bn.encodeHTML=bn.encodeXML=void 0;var Gke=LC(SC),DC=RC(Gke.default),IC=PC(DC);bn.encodeXML=FC(DC);var Kke=LC(TC),Zv=RC(Kke.default),Yke=PC(Zv);bn.encodeHTML=Jke(Zv,Yke),bn.encodeNonAsciiHTML=FC(Zv);function RC(t){return Object.keys(t).sort().reduce(function(e,r){return e[t[r]]="&"+r+";",e},{})}function PC(t){for(var e=[],r=[],n=0,i=Object.keys(t);n<i.length;n++){var o=i[n];o.length===1?e.push("\\"+o):r.push(o)}e.sort();for(var a=0;a<e.length-1;a++){for(var s=a;s<e.length-1&&e[s].charCodeAt(1)+1===e[s+1].charCodeAt(1);)s+=1;var u=1+s-a;u<3||e.splice(a,u,e[a]+"-"+e[s])}return r.unshift("["+e.join("")+"]"),new RegExp(r.join("|"),"g")}var BC=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,Xke=String.prototype.codePointAt!=null?function(t){return t.codePointAt(0)}:function(t){return(t.charCodeAt(0)-55296)*1024+t.charCodeAt(1)-56320+65536};function Bf(t){return"&#x"+(t.length>1?Xke(t):t.charCodeAt(0)).toString(16).toUpperCase()+";"}function Jke(t,e){return function(r){return r.replace(e,function(n){return t[n]}).replace(BC,Bf)}}var $C=new RegExp(IC.source+"|"+BC.source,"g");function Zke(t){return t.replace($C,Bf)}bn.escape=Zke;function Qke(t){return t.replace(IC,Bf)}bn.escapeUTF8=Qke;function FC(t){return function(e){return e.replace($C,function(r){return t[r]||Bf(r)})}}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.encodeHTML5=t.encodeHTML4=t.escapeUTF8=t.escape=t.encodeNonAsciiHTML=t.encodeHTML=t.encodeXML=t.encode=t.decodeStrict=t.decode=void 0;var e=Yi,r=bn;function n(u,f){return(!f||f<=0?e.decodeXML:e.decodeHTML)(u)}t.decode=n;function i(u,f){return(!f||f<=0?e.decodeXML:e.decodeHTMLStrict)(u)}t.decodeStrict=i;function o(u,f){return(!f||f<=0?r.encodeXML:r.encodeHTML)(u)}t.encode=o;var a=bn;Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return a.encodeXML}}),Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return a.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return a.encodeNonAsciiHTML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return a.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return a.escapeUTF8}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return a.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return a.encodeHTML}});var s=Yi;Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return s.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return s.decodeXML}})})(Yv);var HC="&(?:#x[a-f0-9]{1,6}|#[0-9]{1,7}|[a-z][a-z0-9]{1,31});",eTe=92,tTe=/[\\&]/,Qv="[!\"#$%&'()*+,./:;<=>?@[\\\\\\]^_`{|}~-]",rTe=new RegExp("\\\\"+Qv+"|"+HC,"gi"),nTe='[&<>"]',UC=new RegExp(nTe,"g"),iTe=function(t){return t.charCodeAt(0)===eTe?t.charAt(1):Yv.decodeHTML(t)};function gu(t){return tTe.test(t)?t.replace(rTe,iTe):t}function $f(t){try{return yq(t)}catch{return t}}function oTe(t){switch(t){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";default:return t}}function Us(t){return UC.test(t)?t.replace(UC,oTe):t}function em(t,e){for(var r=[],n=0;n<e;n++)r.push(t);return r.join("")}function zC(t){return t?!/[^ \t]+/.test(t):!0}var aTe=function(){function t(e){this.current=e,this.root=e,this.entering=!0}return t.prototype.next=function(){var e=this.current,r=this.entering;if(e===null)return null;var n=tm(e);return r&&n?e.firstChild?(this.current=e.firstChild,this.entering=!0):this.entering=!1:e===this.root?this.current=null:e.next===null?(this.current=e.parent,this.entering=!1):(this.current=e.next,this.entering=!0),{entering:r,node:e}},t.prototype.resumeAt=function(e,r){this.current=e,this.entering=r===!0},t}();function tm(t){switch(t.type){case"document":case"blockQuote":case"list":case"item":case"paragraph":case"heading":case"emph":case"strong":case"strike":case"link":case"image":case"table":case"tableHead":case"tableBody":case"tableRow":case"tableCell":case"tableDelimRow":case"customInline":return!0;default:return!1}}var sTe=1,Ff={};function lTe(t){return Ff[t]}function rm(t){delete Ff[t]}function uTe(){Ff={}}var yu=function(){function t(e,r){this.parent=null,this.prev=null,this.next=null,this.firstChild=null,this.lastChild=null,this.literal=null,e==="document"?this.id=-1:this.id=sTe++,this.type=e,this.sourcepos=r,Ff[this.id]=this}return t.prototype.isContainer=function(){return tm(this)},t.prototype.unlink=function(){this.prev?this.prev.next=this.next:this.parent&&(this.parent.firstChild=this.next),this.next?this.next.prev=this.prev:this.parent&&(this.parent.lastChild=this.prev),this.parent=null,this.next=null,this.prev=null},t.prototype.replaceWith=function(e){this.insertBefore(e),this.unlink()},t.prototype.insertAfter=function(e){e.unlink(),e.next=this.next,e.next&&(e.next.prev=e),e.prev=this,this.next=e,this.parent&&(e.parent=this.parent,e.next||(e.parent.lastChild=e))},t.prototype.insertBefore=function(e){e.unlink(),e.prev=this.prev,e.prev&&(e.prev.next=e),e.next=this,this.prev=e,e.parent=this.parent,e.prev||(e.parent.firstChild=e)},t.prototype.appendChild=function(e){e.unlink(),e.parent=this,this.lastChild?(this.lastChild.next=e,e.prev=this.lastChild,this.lastChild=e):(this.firstChild=e,this.lastChild=e)},t.prototype.prependChild=function(e){e.unlink(),e.parent=this,this.firstChild?(this.firstChild.prev=e,e.next=this.firstChild,this.firstChild=e):(this.firstChild=e,this.lastChild=e)},t.prototype.walker=function(){return new aTe(this)},t}(),Xi=function(t){Fn(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.open=!0,i.lineOffsets=null,i.stringContent=null,i.lastLineBlank=!1,i.lastLineChecked=!1,i.type=r,i}return e}(yu),cTe=function(t){Fn(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.listData=null,r}return e}(Xi),fTe=function(t){Fn(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.level=0,r.headingType="atx",r}return e}(Xi),dTe=function(t){Fn(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.isFenced=!1,r.fenceChar=null,r.fenceLength=0,r.fenceOffset=-1,r.info=null,r.infoPadding=0,r}return e}(Xi),pTe=function(t){Fn(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.columns=[],r}return e}(Xi),hTe=function(t){Fn(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.startIdx=0,r.endIdx=0,r.paddingLeft=0,r.paddingRight=0,r.ignored=!1,r}return e}(Xi),vTe=function(t){Fn(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.title="",r.dest="",r.label="",r}return e}(Xi),mTe=function(t){Fn(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.syntaxLength=0,r.offset=-1,r.info="",r}return e}(Xi),gTe=function(t){Fn(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.htmlBlockType=-1,r}return e}(Xi),yTe=function(t){Fn(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.destination=null,r.title=null,r.extendedAutolink=!1,r}return e}(yu),bTe=function(t){Fn(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.tickCount=0,r}return e}(yu),wTe=function(t){Fn(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.info="",r}return e}(yu);function Pt(t,e){switch(t){case"heading":return new fTe(t,e);case"list":case"item":return new cTe(t,e);case"link":case"image":return new yTe(t,e);case"codeBlock":return new dTe(t,e);case"htmlBlock":return new gTe(t,e);case"table":return new pTe(t,e);case"tableCell":return new hTe(t,e);case"document":case"paragraph":case"blockQuote":case"thematicBreak":case"tableRow":case"tableBody":case"tableHead":case"frontMatter":return new Xi(t,e);case"code":return new bTe(t,e);case"refDef":return new vTe(t,e);case"customBlock":return new mTe(t,e);case"customInline":return new wTe(t,e);default:return new yu(t,e)}}function qC(t){return t.type==="codeBlock"}function ETe(t){return t.type==="htmlBlock"}function xTe(t){return t.type==="heading"}function VC(t){return t.type==="list"}function CTe(t){return t.type==="table"}function zs(t){return t.type==="refDef"}function WC(t){return t.type==="customBlock"}function kTe(t){return t.type==="customInline"}function Gt(t,e){var r=Pt("text",e);return r.literal=t,r}var jC="[A-Za-z][A-Za-z0-9-]*",TTe="[a-zA-Z_:][a-zA-Z0-9:._-]*",STe="[^\"'=<>`\\x00-\\x20]+",_Te="'[^']*'",OTe='"[^"]*"',ATe="(?:"+STe+"|"+_Te+"|"+OTe+")",MTe="(?:\\s*=\\s*"+ATe+")",NTe="(?:\\s+"+TTe+MTe+"?)",GC="<"+jC+NTe+"*\\s*/?>",KC="</"+jC+"\\s*[>]",LTe="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",DTe="[<][?].*?[?][>]",ITe="<![A-Z]+\\s+[^>]*>",RTe="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",PTe="(?:"+GC+"|"+KC+"|"+LTe+"|"+DTe+"|"+ITe+"|"+RTe+")",BTe=new RegExp("^"+PTe,"i");/*! http://mths.be/fromcodepoint v0.2.1 by @mathias */var nm;if(String.fromCodePoint)nm=function(t){try{return String.fromCodePoint(t)}catch(e){if(e instanceof RangeError)return"�";throw e}};else{var $Te=String.fromCharCode,FTe=Math.floor;nm=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=16384,n=[],i,o,a=-1,s=t.length;if(!s)return"";for(var u="";++a<s;){var f=Number(t[a]);if(!isFinite(f)||f<0||f>1114111||FTe(f)!==f)return"�";f<=65535?n.push(f):(f-=65536,i=(f>>10)+55296,o=f%1024+56320,n.push(i,o)),(a+1===s||n.length>r)&&(u+=$Te.apply(void 0,n),n.length=0)}return u}}var im=nm,HTe="(?:[w-]+.)*[A-Za-z0-9-]+.[A-Za-z0-9-]+",UTe="[^<\\s]*[^<?!.,:*_?~\\s]",zTe="[\\w.+-]+@(?:[\\w-]+\\.)+[\\w-]+";function qTe(t){var e=/\)+$/.exec(t);if(e){for(var r=0,n=0,i=t;n<i.length;n++){var o=i[n];o==="("?r<0?r=1:r+=1:o===")"&&(r-=1)}if(r<0){var a=Math.min(-r,e[0].length);return t.substring(0,t.length-a)}}return t}function VTe(t){return t.replace(/&[A-Za-z0-9]+;$/,"")}function WTe(t){for(var e=new RegExp(zTe,"g"),r=[],n;n=e.exec(t);){var i=n[0];/[_-]+$/.test(i)||r.push({text:i,range:[n.index,n.index+i.length-1],url:"mailto:"+i})}return r}function jTe(t){for(var e=new RegExp("(www|https?://)."+HTe+UTe,"g"),r=[],n;n=e.exec(t);){var i=VTe(qTe(n[0])),o=n[1]==="www"?"http://":"";r.push({text:i,range:[n.index,n.index+i.length-1],url:""+o+i})}return r}function GTe(t){return Kv(Kv([],jTe(t)),WTe(t)).sort(function(e,r){return e.range[0]-r.range[0]})}function KTe(t,e){typeof e=="boolean"&&(e=GTe);for(var r,n=function(){var i=r.entering,o=r.node;if(i&&o.type==="text"&&o.parent.type!=="link"){var a=o.literal,s=e(a);if(!s||!s.length)return"continue";for(var u=0,f=o.sourcepos[0],d=f[0],p=f[1],v=function(P,U){return[[d,p+P],[d,p+U]]},m=[],g=0,E=s;g<E.length;g++){var w=E[g],x=w.range,k=w.url,_=w.text;x[0]>u&&m.push(Gt(a.substring(u,x[0]),v(u,x[0]-1)));var O=Pt("link",v.apply(void 0,x));O.appendChild(Gt(_,v.apply(void 0,x))),O.destination=k,O.extendedAutolink=!0,m.push(O),u=x[1]+1}u<a.length&&m.push(Gt(a.substring(u),v(u,a.length-1)));for(var N=0,L=m;N<L.length;N++){var A=L[N];o.insertBefore(A)}o.unlink()}};r=t.next();)n()}function Hf(t){return t[t.length-1]}function YC(t){return t.slice(1,t.length-1).trim().replace(/[ \t\r\n]+/," ").toLowerCase().toUpperCase()}function Uf(t,e){Object.keys(t).forEach(function(r){e(r,t[r])})}function YTe(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=gr({},t);return e.forEach(function(i){delete n[i]}),n}function qs(t){return!Object.keys(t).length}function XTe(t){Object.keys(t).forEach(function(e){delete t[e]})}var om=10,am=42,zf=95,JTe=96,XC=91,ZTe=93,qf=126,JC=60,QTe=33,ZC=92,eSe=38,QC=40,sm=41,tSe=58,Pa=39,Ba=34,$a=36,lm="\\\\"+Qv,ek=new RegExp(/[!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/),rSe=new RegExp('^(?:"('+lm+'|[^"\\x00])*"|'+("'("+lm+"|[^'\\x00])*'")+"|"+("\\(("+lm+"|[^()\\x00])*\\))")),nSe=/^(?:<(?:[^<>\n\\\x00]|\\.)*>)/,tk=new RegExp("^"+Qv),iSe=new RegExp("^"+HC,"i"),oSe=/`+/,aSe=/^`+/,sSe=/\.\.\./g,lSe=/--+/g,uSe=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,cSe=/^<[A-Za-z][A-Za-z0-9.+-]{1,31}:[^<>\x00-\x20]*>/i,fSe=/^ *(?:\n *)?/,um=/^[ \t\n\x0b\x0c\x0d]/,rk=/^\s/,dSe=/ *$/,pSe=/^ */,nk=/^ *(?:\n|$)/,hSe=/^\[(?:[^\\\[\]]|\\.){0,1000}\]/,vSe=/^[^\n`\[\]\\!<&*_'"~$]+/m,mSe=function(){function t(e){this.subject="",this.delimiters=null,this.brackets=null,this.pos=0,this.lineStartNum=0,this.lineIdx=0,this.lineOffsets=[0],this.linePosOffset=0,this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.options=e}return t.prototype.sourcepos=function(e,r){var n=this.linePosOffset+this.lineOffsets[this.lineIdx],i=this.lineStartNum+this.lineIdx,o=[i,e+n];return typeof r=="number"?[o,[i,r+n]]:o},t.prototype.nextLine=function(){this.lineIdx+=1,this.linePosOffset=-this.pos},t.prototype.match=function(e){var r=e.exec(this.subject.slice(this.pos));return r===null?null:(this.pos+=r.index+r[0].length,r[0])},t.prototype.peek=function(){return this.pos<this.subject.length?this.subject.charCodeAt(this.pos):-1},t.prototype.spnl=function(){return this.match(fSe),!0},t.prototype.parseBackticks=function(e){var r=this.pos+1,n=this.match(aSe);if(n===null)return!1;for(var i=this.pos,o;(o=this.match(oSe))!==null;)if(o===n){var a=this.subject.slice(i,this.pos-n.length),s=this.sourcepos(r,this.pos),u=a.split(`
|
|
145
|
+
`);if(u.length>1){var f=Hf(u);this.lineIdx+=u.length-1,this.linePosOffset=-(this.pos-f.length-n.length),s[1]=this.sourcepos(this.pos),a=u.join(" ")}var d=Pt("code",s);return a.length>0&&a.match(/[^ ]/)!==null&&a[0]==" "&&a[a.length-1]==" "?d.literal=a.slice(1,a.length-1):d.literal=a,d.tickCount=n.length,e.appendChild(d),!0}return this.pos=i,e.appendChild(Gt(n,this.sourcepos(r,this.pos-1))),!0},t.prototype.parseBackslash=function(e){var r=this.subject,n;this.pos+=1;var i=this.pos;return this.peek()===om?(this.pos+=1,n=Pt("linebreak",this.sourcepos(this.pos-1,this.pos)),e.appendChild(n),this.nextLine()):tk.test(r.charAt(this.pos))?(e.appendChild(Gt(r.charAt(this.pos),this.sourcepos(i,this.pos))),this.pos+=1):e.appendChild(Gt("\\",this.sourcepos(i,i))),!0},t.prototype.parseAutolink=function(e){var r,n,i,o=this.pos+1;return(r=this.match(uSe))?(n=r.slice(1,r.length-1),i=Pt("link",this.sourcepos(o,this.pos)),i.destination=$f("mailto:"+n),i.title="",i.appendChild(Gt(n,this.sourcepos(o+1,this.pos-1))),e.appendChild(i),!0):(r=this.match(cSe))?(n=r.slice(1,r.length-1),i=Pt("link",this.sourcepos(o,this.pos)),i.destination=$f(n),i.title="",i.appendChild(Gt(n,this.sourcepos(o+1,this.pos-1))),e.appendChild(i),!0):!1},t.prototype.parseHtmlTag=function(e){var r=this.pos+1,n=this.match(BTe);if(n===null)return!1;var i=Pt("htmlInline",this.sourcepos(r,this.pos));return i.literal=n,e.appendChild(i),!0},t.prototype.scanDelims=function(e){var r=0,n=this.pos;if(e===Pa||e===Ba)r++,this.pos++;else for(;this.peek()===e;)r++,this.pos++;if(r===0||r<2&&(e===qf||e===$a))return this.pos=n,null;var i=n===0?`
|
|
146
|
+
`:this.subject.charAt(n-1),o=this.peek(),a;o===-1?a=`
|
|
147
|
+
`:a=im(o);var s=rk.test(a),u=ek.test(a),f=rk.test(i),d=ek.test(i),p=!s&&(!u||f||d),v=!f&&(!d||s||u),m,g;return e===zf?(m=p&&(!v||d),g=v&&(!p||u)):e===Pa||e===Ba?(m=p&&!v,g=v):e===$a?(m=!s,g=!f):(m=p,g=v),this.pos=n,{numdelims:r,canOpen:m,canClose:g}},t.prototype.handleDelim=function(e,r){var n=this.scanDelims(e);if(!n)return!1;var i=n.numdelims,o=this.pos+1,a;this.pos+=i,e===Pa?a="’":e===Ba?a="“":a=this.subject.slice(o-1,this.pos);var s=Gt(a,this.sourcepos(o,this.pos));return r.appendChild(s),(n.canOpen||n.canClose)&&(this.options.smart||e!==Pa&&e!==Ba)&&(this.delimiters={cc:e,numdelims:i,origdelims:i,node:s,previous:this.delimiters,next:null,canOpen:n.canOpen,canClose:n.canClose},this.delimiters.previous&&(this.delimiters.previous.next=this.delimiters)),!0},t.prototype.removeDelimiter=function(e){e.previous!==null&&(e.previous.next=e.next),e.next===null?this.delimiters=e.previous:e.next.previous=e.previous},t.prototype.removeDelimitersBetween=function(e,r){e.next!==r&&(e.next=r,r.previous=e)},t.prototype.processEmphasis=function(e){var r,n,i,o,a,s,u,f=!1,d=(r={},r[zf]=[e,e,e],r[am]=[e,e,e],r[Pa]=[e],r[Ba]=[e],r[qf]=[e],r[$a]=[e],r);for(i=this.delimiters;i!==null&&i.previous!==e;)i=i.previous;for(;i!==null;){var p=i.cc,v=p===zf||p===am;if(!i.canClose)i=i.next;else{for(n=i.previous,u=!1;n!==null&&n!==e&&n!==d[p][v?i.origdelims%3:0];){if(f=v&&(i.canOpen||n.canClose)&&i.origdelims%3!==0&&(n.origdelims+i.origdelims)%3===0,n.cc===i.cc&&n.canOpen&&!f){u=!0;break}n=n.previous}if(o=i,v||p===qf||p===$a){if(!u)i=i.next;else if(n){var m=i.numdelims>=2&&n.numdelims>=2?2:1,g=v?0:1;a=n.node,s=i.node;var E=v?m===1?"emph":"strong":"strike";p===$a&&(E="customInline");var w=Pt(E),x=a.sourcepos[1],k=s.sourcepos[0];w.sourcepos=[[x[0],x[1]-m+1],[k[0],k[1]+m-1]],a.sourcepos[1][1]-=m,s.sourcepos[0][1]+=m,a.literal=a.literal.slice(m),s.literal=s.literal.slice(m),n.numdelims-=m,i.numdelims-=m;for(var _=a.next,O=void 0;_&&_!==s;)O=_.next,_.unlink(),w.appendChild(_),_=O;if(p===$a){var N=w.firstChild,L=N.literal||"",A=L.split(/\s/)[0];w.info=A,L.length<=A.length?N.unlink():(N.sourcepos[0][1]+=A.length,N.literal=L.replace(A+" ",""))}if(a.insertAfter(w),this.removeDelimitersBetween(n,i),n.numdelims<=g&&(n.numdelims===0&&a.unlink(),this.removeDelimiter(n)),i.numdelims<=g){i.numdelims===0&&s.unlink();var P=i.next;this.removeDelimiter(i),i=P}}}else p===Pa?(i.node.literal="’",u&&(n.node.literal="‘"),i=i.next):p===Ba&&(i.node.literal="”",u&&(n.node.literal="“"),i=i.next);u||(d[p][v?o.origdelims%3:0]=o.previous,o.canOpen||this.removeDelimiter(o))}}for(;this.delimiters!==null&&this.delimiters!==e;)this.removeDelimiter(this.delimiters)},t.prototype.parseLinkTitle=function(){var e=this.match(rSe);return e===null?null:gu(e.substr(1,e.length-2))},t.prototype.parseLinkDestination=function(){var e=this.match(nSe);if(e===null){if(this.peek()===JC)return null;for(var r=this.pos,n=0,i=void 0;(i=this.peek())!==-1;)if(i===ZC&&tk.test(this.subject.charAt(this.pos+1)))this.pos+=1,this.peek()!==-1&&(this.pos+=1);else if(i===QC)this.pos+=1,n+=1;else if(i===sm){if(n<1)break;this.pos+=1,n-=1}else{if(um.exec(im(i))!==null)break;this.pos+=1}return this.pos===r&&i!==sm||n!==0?null:(e=this.subject.substr(r,this.pos-r),$f(gu(e)))}return $f(gu(e.substr(1,e.length-2)))},t.prototype.parseLinkLabel=function(){var e=this.match(hSe);return e===null||e.length>1001?0:e.length},t.prototype.parseOpenBracket=function(e){var r=this.pos;this.pos+=1;var n=Gt("[",this.sourcepos(this.pos,this.pos));return e.appendChild(n),this.addBracket(n,r,!1),!0},t.prototype.parseBang=function(e){var r=this.pos;if(this.pos+=1,this.peek()===XC){this.pos+=1;var n=Gt("![",this.sourcepos(this.pos-1,this.pos));e.appendChild(n),this.addBracket(n,r+1,!0)}else{var n=Gt("!",this.sourcepos(this.pos,this.pos));e.appendChild(n)}return!0},t.prototype.parseCloseBracket=function(e){var r=null,n=null,i=!1;this.pos+=1;var o=this.pos,a=this.brackets;if(a===null)return e.appendChild(Gt("]",this.sourcepos(o,o))),!0;if(!a.active)return e.appendChild(Gt("]",this.sourcepos(o,o))),this.removeBracket(),!0;var s=a.image,u=this.pos;this.peek()===QC&&(this.pos++,this.spnl()&&(r=this.parseLinkDestination())!==null&&this.spnl()&&(um.test(this.subject.charAt(this.pos-1))&&(n=this.parseLinkTitle())||!0)&&this.spnl()&&this.peek()===sm?(this.pos+=1,i=!0):this.pos=u);var f="";if(!i){var d=this.pos,p=this.parseLinkLabel();if(p>2?f=this.subject.slice(d,d+p):a.bracketAfter||(f=this.subject.slice(a.index,o)),p===0&&(this.pos=u),f){f=YC(f);var v=this.refMap[f];v&&(r=v.destination,n=v.title,i=!0)}}if(i){var m=Pt(s?"image":"link");m.destination=r,m.title=n||"",m.sourcepos=[a.startpos,this.sourcepos(this.pos)];for(var g=a.node.next,E=void 0;g;)E=g.next,g.unlink(),m.appendChild(g),g=E;if(e.appendChild(m),this.processEmphasis(a.previousDelimiter),this.removeBracket(),a.node.unlink(),!s)for(a=this.brackets;a!==null;)a.image||(a.active=!1),a=a.previous;return this.options.referenceDefinition&&(this.refLinkCandidateMap[e.id]={node:e,refLabel:f}),!0}return this.removeBracket(),this.pos=o,e.appendChild(Gt("]",this.sourcepos(o,o))),this.options.referenceDefinition&&(this.refLinkCandidateMap[e.id]={node:e,refLabel:f}),!0},t.prototype.addBracket=function(e,r,n){this.brackets!==null&&(this.brackets.bracketAfter=!0),this.brackets={node:e,startpos:this.sourcepos(r+(n?0:1)),previous:this.brackets,previousDelimiter:this.delimiters,index:r,image:n,active:!0}},t.prototype.removeBracket=function(){this.brackets&&(this.brackets=this.brackets.previous)},t.prototype.parseEntity=function(e){var r,n=this.pos+1;return(r=this.match(iSe))?(e.appendChild(Gt(Yv.decodeHTML(r),this.sourcepos(n,this.pos))),!0):!1},t.prototype.parseString=function(e){var r,n=this.pos+1;if(r=this.match(vSe)){if(this.options.smart){var i=r.replace(sSe,"…").replace(lSe,function(a){var s=0,u=0;return a.length%3===0?u=a.length/3:a.length%2===0?s=a.length/2:a.length%3===2?(s=1,u=(a.length-2)/3):(s=2,u=(a.length-4)/3),em("—",u)+em("–",s)});e.appendChild(Gt(i,this.sourcepos(n,this.pos)))}else{var o=Gt(r,this.sourcepos(n,this.pos));e.appendChild(o)}return!0}return!1},t.prototype.parseNewline=function(e){this.pos+=1;var r=e.lastChild;if(r&&r.type==="text"&&r.literal[r.literal.length-1]===" "){var n=r.literal[r.literal.length-2]===" ",i=r.literal.length;r.literal=r.literal.replace(dSe,"");var o=i-r.literal.length;r.sourcepos[1][1]-=o,e.appendChild(Pt(n?"linebreak":"softbreak",this.sourcepos(this.pos-o,this.pos)))}else e.appendChild(Pt("softbreak",this.sourcepos(this.pos,this.pos)));return this.nextLine(),this.match(pSe),!0},t.prototype.parseReference=function(e,r){if(!this.options.referenceDefinition)return 0;this.subject=e.stringContent,this.pos=0;var n=null,i=this.pos,o=this.parseLinkLabel();if(o===0)return 0;var a=this.subject.substr(0,o);if(this.peek()===tSe)this.pos++;else return this.pos=i,0;this.spnl();var s=this.parseLinkDestination();if(s===null)return this.pos=i,0;var u=this.pos;this.spnl(),this.pos!==u&&(n=this.parseLinkTitle()),n===null&&(n="",this.pos=u);var f=!0;if(this.match(nk)===null&&(n===""?f=!1:(n="",this.pos=u,f=this.match(nk)!==null)),!f)return this.pos=i,0;var d=YC(a);if(d==="")return this.pos=i,0;var p=this.getReferenceDefSourcepos(e);e.sourcepos[0][0]=p[1][0]+1;var v=Pt("refDef",p);return v.title=n,v.dest=s,v.label=d,e.insertBefore(v),r[d]?this.refDefCandidateMap[v.id]=v:r[d]=vm(v),this.pos-i},t.prototype.mergeTextNodes=function(e){for(var r,n=[];r=e.next();){var i=r.entering,o=r.node;if(i&&o.type==="text")n.push(o);else if(n.length===1)n=[];else if(n.length>1){var a=n[0],s=n[n.length-1];a.sourcepos&&s.sourcepos&&(a.sourcepos[1]=s.sourcepos[1]),a.next=s.next,a.next&&(a.next.prev=a);for(var u=1;u<n.length;u+=1)a.literal+=n[u].literal,n[u].unlink();n=[]}}},t.prototype.getReferenceDefSourcepos=function(e){for(var r=e.stringContent.split(/\n|\r\n/),n=!1,i=0,o={line:0,ch:0},a=0;a<r.length;a+=1){var s=r[a];if(um.test(s))break;if(/\:/.test(s)&&i===0){if(n)break;var u=s.indexOf(":")===s.length-1?a+1:a;o={line:u,ch:r[u].length},n=!0}var f=s.match(/'|"/g);if(f&&(i+=f.length),i===2){o={line:a,ch:s.length};break}}return[[e.sourcepos[0][0],e.sourcepos[0][1]],[e.sourcepos[0][0]+o.line,o.ch]]},t.prototype.parseInline=function(e){var r,n=!1,i=this.peek();if(i===-1)return!1;switch(i){case om:n=this.parseNewline(e);break;case ZC:n=this.parseBackslash(e);break;case JTe:n=this.parseBackticks(e);break;case am:case zf:case qf:case $a:n=this.handleDelim(i,e);break;case Pa:case Ba:n=!!(!((r=this.options)===null||r===void 0)&&r.smart)&&this.handleDelim(i,e);break;case XC:n=this.parseOpenBracket(e);break;case QTe:n=this.parseBang(e);break;case ZTe:n=this.parseCloseBracket(e);break;case JC:n=this.parseAutolink(e)||this.parseHtmlTag(e);break;case eSe:e.disabledEntityParse||(n=this.parseEntity(e));break;default:n=this.parseString(e);break}return n||(this.pos+=1,e.appendChild(Gt(im(i),this.sourcepos(this.pos,this.pos+1)))),!0},t.prototype.parse=function(e){for(this.subject=e.stringContent.trim(),this.pos=0,this.delimiters=null,this.brackets=null,this.lineOffsets=e.lineOffsets||[0],this.lineIdx=0,this.linePosOffset=0,this.lineStartNum=e.sourcepos[0][0],xTe(e)&&(this.lineOffsets[0]+=e.level+1);this.parseInline(e););e.stringContent=null,this.processEmphasis(null),this.mergeTextNodes(e.walker());var r=this.options,n=r.extendedAutolinks,i=r.customParser;if(n&&KTe(e.walker(),n),i&&e.firstChild)for(var o,a=e.firstChild.walker();o=a.next();){var s=o.node,u=o.entering;i[s.type]&&i[s.type](s,{entering:u,options:this.options})}},t}(),gSe=/^\[([ \txX])\][ \t]+/;function ySe(t,e){if(e.firstChild&&e.firstChild.type==="paragraph"){var r=e.firstChild,n=r.stringContent.match(gSe);if(n){var i=n[0].length;r.stringContent=r.stringContent.substring(i-1),r.sourcepos[0][1]+=i,r.lineOffsets[0]+=i,e.listData.task=!0,e.listData.checked=/[xX]/.test(n[1])}}}var bSe={continue:function(){return 0},finalize:function(){},canContain:function(t){return t==="tableHead"||t==="tableBody"},acceptsLines:!1},wSe={continue:function(){return 0},finalize:function(){},canContain:function(t){return t==="tableRow"},acceptsLines:!1},ESe={continue:function(){return 1},finalize:function(){},canContain:function(t){return t==="tableRow"||t==="tableDelimRow"},acceptsLines:!1},xSe={continue:function(){return 1},finalize:function(){},canContain:function(t){return t==="tableDelimCell"},acceptsLines:!1},CSe={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},kSe={continue:function(){return 1},finalize:function(){},canContain:function(t){return t==="tableCell"},acceptsLines:!1},TSe={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},Vf=4,ik=9,ok=62,SSe=60,ak=32,sk=91,lk=/[^ \t\f\v\r\n]/,_Se=/^(?:`{3,}|~{3,})(?= *$)/;function uk(t){for(var e=t;e;){if(e.lastLineBlank)return!0;var r=e.type;if(!e.lastLineChecked&&(r==="list"||r==="item"))e.lastLineChecked=!0,e=e.lastChild;else{e.lastLineChecked=!0;break}}return!1}function wn(t,e){return e<t.length?t.charCodeAt(e):-1}function ck(t){return!lk.test(t)}function Vs(t){return t===ak||t===ik}var OSe=/^\$\$$/,ASe={continue:function(t,e){var r=t.currentLine,n=r.match(OSe);if(n)return t.lastLineLength=n[0].length,t.finalize(e,t.lineNumber),2;for(var i=e.offset;i>0&&Vs(wn(r,t.offset));)t.advanceOffset(1,!0),i--;return 0},finalize:function(t,e){if(e.stringContent!==null){var r=e.stringContent,n=r.indexOf(`
|
|
148
|
+
`),i=r.slice(0,n),o=r.slice(n+1),a=i.match(/^(\s*)(.*)/);e.info=gu(a[2].trim()),e.literal=o,e.stringContent=null}},canContain:function(){return!1},acceptsLines:!0},fk={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!0},MSe={continue:function(){return 0},finalize:function(){},canContain:function(t){return t!=="item"},acceptsLines:!1},NSe={continue:function(){return 0},finalize:function(t,e){for(var r=e.firstChild;r;){if(uk(r)&&r.next){e.listData.tight=!1;break}for(var n=r.firstChild;n;){if(uk(n)&&(r.next||n.next)){e.listData.tight=!1;break}n=n.next}r=r.next}},canContain:function(t){return t==="item"},acceptsLines:!1},LSe={continue:function(t){var e=t.currentLine;if(!t.indented&&wn(e,t.nextNonspace)===ok)t.advanceNextNonspace(),t.advanceOffset(1,!1),Vs(wn(e,t.offset))&&t.advanceOffset(1,!0);else return 1;return 0},finalize:function(){},canContain:function(t){return t!=="item"},acceptsLines:!1},DSe={continue:function(t,e){if(t.blank){if(e.firstChild===null)return 1;t.advanceNextNonspace()}else if(t.indent>=e.listData.markerOffset+e.listData.padding)t.advanceOffset(e.listData.markerOffset+e.listData.padding,!0);else return 1;return 0},finalize:ySe,canContain:function(t){return t!=="item"},acceptsLines:!1},ISe={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},RSe={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},PSe={continue:function(t,e){var r=t.currentLine,n=t.indent;if(e.isFenced){var i=n<=3&&r.charAt(t.nextNonspace)===e.fenceChar&&r.slice(t.nextNonspace).match(_Se);if(i&&i[0].length>=e.fenceLength)return t.lastLineLength=t.offset+n+i[0].length,t.finalize(e,t.lineNumber),2;for(var o=e.fenceOffset;o>0&&Vs(wn(r,t.offset));)t.advanceOffset(1,!0),o--}else if(n>=Vf)t.advanceOffset(Vf,!0);else if(t.blank)t.advanceNextNonspace();else return 1;return 0},finalize:function(t,e){var r;if(e.stringContent!==null){if(e.isFenced){var n=e.stringContent,i=n.indexOf(`
|
|
149
|
+
`),o=n.slice(0,i),a=n.slice(i+1),s=o.match(/^(\s*)(.*)/);e.infoPadding=s[1].length,e.info=gu(s[2].trim()),e.literal=a}else e.literal=(r=e.stringContent)===null||r===void 0?void 0:r.replace(/(\n *)+$/,`
|
|
150
|
+
`);e.stringContent=null}},canContain:function(){return!1},acceptsLines:!0},BSe={continue:function(t,e){return t.blank&&(e.htmlBlockType===6||e.htmlBlockType===7)?1:0},finalize:function(t,e){var r;e.literal=((r=e.stringContent)===null||r===void 0?void 0:r.replace(/(\n *)+$/,""))||null,e.stringContent=null},canContain:function(){return!1},acceptsLines:!0},$Se={continue:function(t){return t.blank?1:0},finalize:function(t,e){if(e.stringContent!==null){for(var r,n=!1;wn(e.stringContent,0)===sk&&(r=t.inlineParser.parseReference(e,t.refMap));)e.stringContent=e.stringContent.slice(r),n=!0;n&&ck(e.stringContent)&&e.unlink()}},canContain:function(){return!1},acceptsLines:!0},FSe=fk,HSe=fk,Ws={document:MSe,list:NSe,blockQuote:LSe,item:DSe,heading:ISe,thematicBreak:RSe,codeBlock:PSe,htmlBlock:BSe,paragraph:$Se,table:bSe,tableBody:wSe,tableHead:ESe,tableRow:kSe,tableCell:TSe,tableDelimRow:xSe,tableDelimCell:CSe,refDef:FSe,customBlock:ASe,frontMatter:HSe};function cm(t){for(var e=0,r=0,n=[],i=0;i<t.length;i+=1)if(t[i]==="|"&&t[i-1]!=="\\"){var o=t.substring(e,i);e===0&&zC(o)?r=i+1:n.push(o),e=i+1}if(e<t.length){var o=t.substring(e,t.length);zC(o)||n.push(o)}return[r,n]}function fm(t,e,r,n){for(var i=[],o=0,a=e;o<a.length;o++){var s=a[o],u=s.match(/^[ \t]+/),f=u?u[0].length:0,d=void 0,p=void 0;if(f===s.length)f=0,d=0,p="";else{var v=s.match(/[ \t]+$/);d=v?v[0].length:0,p=s.slice(f,s.length-d)}var m=n+f,g=Pt(t,[[r,n],[r,n+s.length-1]]);g.stringContent=p.replace(/\\\|/g,"|"),g.startIdx=i.length,g.endIdx=i.length,g.lineOffsets=[m-1],g.paddingLeft=f,g.paddingRight=d,i.push(g),n+=s.length+1}return i}function USe(t){var e=null,r=t.stringContent,n=r[0],i=r[r.length-1];return i===":"?e=n===":"?"center":"right":n===":"&&(e="left"),{align:e}}var zSe=function(t,e){var r=e.stringContent;if(e.type==="paragraph"&&!t.indented&&!t.blank){var n=r.length-1,i=r.lastIndexOf(`
|
|
151
|
+
`,n-1)+1,o=r.slice(i,n),a=t.currentLine.slice(t.nextNonspace),s=cm(o),u=s[0],f=s[1],d=cm(a),p=d[0],v=d[1],m=/^[ \t]*:?-+:?[ \t]*$/;if(!f.length||!v.length||v.some(function(P){return!m.test(P)})||v.length===1&&a.indexOf("|")!==0)return 0;var g=e.lineOffsets,E=t.lineNumber-1,w=Hf(g)+1,x=Pt("table",[[E,w],[t.lineNumber,t.offset]]);if(x.columns=v.map(function(){return{align:null}}),e.insertAfter(x),g.length===1)e.unlink();else{e.stringContent=r.slice(0,i);var k=r.lastIndexOf(`
|
|
152
|
+
`,i-2)+1,_=i-k-1;t.lastLineLength=g[g.length-2]+_,t.finalize(e,E-1)}t.advanceOffset(t.currentLine.length-t.offset,!1);var O=Pt("tableHead",[[E,w],[t.lineNumber,t.offset]]);x.appendChild(O);var N=Pt("tableRow",[[E,w],[E,w+o.length-1]]),L=Pt("tableDelimRow",[[t.lineNumber,t.nextNonspace+1],[t.lineNumber,t.offset]]);O.appendChild(N),O.appendChild(L),fm("tableCell",f,E,w+u).forEach(function(P){N.appendChild(P)});var A=fm("tableDelimCell",v,t.lineNumber,t.nextNonspace+1+p);return A.forEach(function(P){L.appendChild(P)}),x.columns=A.map(USe),t.tip=x,2}return 0},qSe=function(t,e){if(e.type!=="table"&&e.type!=="tableBody"||!t.blank&&t.currentLine.indexOf("|")===-1)return 0;if(t.advanceOffset(t.currentLine.length-t.offset,!1),t.blank){var r=e;return e.type==="tableBody"&&(r=e.parent,t.finalize(e,t.lineNumber-1)),t.finalize(r,t.lineNumber-1),0}var n=e;e.type==="table"&&(n=t.addChild("tableBody",t.nextNonspace),n.stringContent=null);var i=Pt("tableRow",[[t.lineNumber,t.nextNonspace+1],[t.lineNumber,t.currentLine.length]]);n.appendChild(i);var o=n.parent,a=t.currentLine.slice(t.nextNonspace),s=cm(a),u=s[0],f=s[1];return fm("tableCell",f,t.lineNumber,t.nextNonspace+1+u).forEach(function(d,p){p>=o.columns.length&&(d.ignored=!0),i.appendChild(d)}),2},VSe=/^(\$\$)(\s*[a-zA-Z])+/,WSe=/^(\$\$)(\s*[a-zA-Z])+.*(\$\$)/,jSe=function(t){var e;if(!t.indented&&!WSe.test(t.currentLine)&&(e=t.currentLine.match(VSe))){var r=e[1].length;t.closeUnmatchedBlocks();var n=t.addChild("customBlock",t.nextNonspace);return n.syntaxLength=r,n.offset=t.indent,t.advanceNextNonspace(),t.advanceOffset(r,!1),2}return 0},GSe=/^`{3,}(?!.*`)|^~{3,}/,KSe=[/./,/^<(?:script|pre|style)(?:\s|>|$)/i,/^<!--/,/^<[?]/,/^<![A-Z]/,/^<!\[CDATA\[/,/^<[/]?(?: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|h[123456]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|[/]?[>]|$)/i,new RegExp("^(?:"+GC+"|"+KC+")\\s*$","i")],YSe=/^(?:=+|-+)[ \t]*$/,XSe=/^#{1,6}(?:[ \t]+|$)/,JSe=/^(?:(?:\*[ \t]*){3,}|(?:_[ \t]*){3,}|(?:-[ \t]*){3,})[ \t]*$/,dk=/^[*+-]/,pk=/^(\d{1,9})([.)])/;function ZSe(t,e){var r=t.currentLine.slice(t.nextNonspace),n,i,o={type:"bullet",tight:!0,bulletChar:"",start:0,delimiter:"",padding:0,markerOffset:t.indent,task:!1,checked:!1};if(t.indent>=4)return null;if(n=r.match(dk))o.type="bullet",o.bulletChar=n[0][0];else if((n=r.match(pk))&&(e.type!=="paragraph"||n[1]==="1"))o.type="ordered",o.start=parseInt(n[1],10),o.delimiter=n[2];else return null;if(i=wn(t.currentLine,t.nextNonspace+n[0].length),!(i===-1||i===ik||i===ak)||e.type==="paragraph"&&!t.currentLine.slice(t.nextNonspace+n[0].length).match(lk))return null;t.advanceNextNonspace(),t.advanceOffset(n[0].length,!0);var a=t.column,s=t.offset;do t.advanceOffset(1,!0),i=wn(t.currentLine,t.offset);while(t.column-a<5&&Vs(i));var u=wn(t.currentLine,t.offset)===-1,f=t.column-a;return f>=5||f<1||u?(o.padding=n[0].length+1,t.column=a,t.offset=s,Vs(wn(t.currentLine,t.offset))&&t.advanceOffset(1,!0)):o.padding=n[0].length+f,o}function QSe(t,e){return t.type===e.type&&t.delimiter===e.delimiter&&t.bulletChar===e.bulletChar}function hk(t,e){return t.options.disallowDeepHeading&&(e.type==="blockQuote"||e.type==="item")}var e_e=function(t){return!t.indented&&wn(t.currentLine,t.nextNonspace)===ok?(t.advanceNextNonspace(),t.advanceOffset(1,!1),Vs(wn(t.currentLine,t.offset))&&t.advanceOffset(1,!0),t.closeUnmatchedBlocks(),t.addChild("blockQuote",t.nextNonspace),1):0},t_e=function(t,e){var r;if(!t.indented&&!hk(t,e)&&(r=t.currentLine.slice(t.nextNonspace).match(XSe))){t.advanceNextNonspace(),t.advanceOffset(r[0].length,!1),t.closeUnmatchedBlocks();var n=t.addChild("heading",t.nextNonspace);return n.level=r[0].trim().length,n.headingType="atx",n.stringContent=t.currentLine.slice(t.offset).replace(/^[ \t]*#+[ \t]*$/,"").replace(/[ \t]+#+[ \t]*$/,""),t.advanceOffset(t.currentLine.length-t.offset),2}return 0},r_e=function(t){var e;if(!t.indented&&(e=t.currentLine.slice(t.nextNonspace).match(GSe))){var r=e[0].length;t.closeUnmatchedBlocks();var n=t.addChild("codeBlock",t.nextNonspace);return n.isFenced=!0,n.fenceLength=r,n.fenceChar=e[0][0],n.fenceOffset=t.indent,t.advanceNextNonspace(),t.advanceOffset(r,!1),2}return 0},n_e=function(t,e){if(!t.indented&&wn(t.currentLine,t.nextNonspace)===SSe){var r=t.currentLine.slice(t.nextNonspace),n=t.options.disallowedHtmlBlockTags,i=void 0;for(i=1;i<=7;i++){var o=r.match(KSe[i]);if(o){if(i===7){if(e.type==="paragraph")return 0;if(n.length>0){var a=new RegExp("</?(?:"+n.join("|")+")","i");if(a.test(o[0]))return 0}}t.closeUnmatchedBlocks();var s=t.addChild("htmlBlock",t.offset);return s.htmlBlockType=i,2}}}return 0},i_e=function(t,e){var r;if(e.stringContent!==null&&!t.indented&&e.type==="paragraph"&&!hk(t,e.parent)&&(r=t.currentLine.slice(t.nextNonspace).match(YSe))){t.closeUnmatchedBlocks();for(var n=void 0;wn(e.stringContent,0)===sk&&(n=t.inlineParser.parseReference(e,t.refMap));)e.stringContent=e.stringContent.slice(n);if(e.stringContent.length>0){var i=Pt("heading",e.sourcepos);return i.level=r[0][0]==="="?1:2,i.headingType="setext",i.stringContent=e.stringContent,e.insertAfter(i),e.unlink(),t.tip=i,t.advanceOffset(t.currentLine.length-t.offset,!1),2}return 0}return 0},o_e=function(t){return!t.indented&&JSe.test(t.currentLine.slice(t.nextNonspace))?(t.closeUnmatchedBlocks(),t.addChild("thematicBreak",t.nextNonspace),t.advanceOffset(t.currentLine.length-t.offset,!1),2):0},a_e=function(t,e){var r,n=e;return(!t.indented||e.type==="list")&&(r=ZSe(t,n))?(t.closeUnmatchedBlocks(),(t.tip.type!=="list"||!QSe(n.listData,r))&&(n=t.addChild("list",t.nextNonspace),n.listData=r),n=t.addChild("item",t.nextNonspace),n.listData=r,1):0},s_e=function(t){return t.indented&&t.tip.type!=="paragraph"&&!t.blank?(t.advanceOffset(Vf,!0),t.closeUnmatchedBlocks(),t.addChild("codeBlock",t.offset),2):0},dm=[e_e,t_e,r_e,n_e,i_e,o_e,a_e,s_e,zSe,qSe,jSe],vk=/^(-{3}|\+{3}|;{3})$/,l_e=function(t,e){var r=t.currentLine,n=t.lineNumber,i=t.indented;if(n===1&&!i&&e.type==="document"&&vk.test(r)){t.closeUnmatchedBlocks();var o=t.addChild("frontMatter",t.nextNonspace);return o.stringContent=r,t.advanceNextNonspace(),t.advanceOffset(r.length,!1),2}return 0},u_e={continue:function(t,e){var r=t.currentLine,n=r.match(vk);return e.type==="frontMatter"&&n?(e.stringContent+=r,t.lastLineLength=n[0].length,t.finalize(e,t.lineNumber),2):0},finalize:function(t,e){e.stringContent!==null&&(e.literal=e.stringContent,e.stringContent=null)},canContain:function(){return!1},acceptsLines:!0},c_e=[/./,/<\/(?:script|pre|style)>/i,/-->/,/\?>/,/>/,/\]\]>/],f_e=/^[#`~*+_=<>0-9-;$]/,d_e=/\r\n|\n|\r/;function pm(){return Pt("document",[[1,1],[0,0]])}var p_e={smart:!1,tagFilter:!1,extendedAutolinks:!1,disallowedHtmlBlockTags:[],referenceDefinition:!1,disallowDeepHeading:!1,customParser:null,frontMatter:!1},h_e=function(){function t(e){this.options=gr(gr({},p_e),e),this.doc=pm(),this.tip=this.doc,this.oldtip=this.doc,this.lineNumber=0,this.offset=0,this.column=0,this.nextNonspace=0,this.nextNonspaceColumn=0,this.indent=0,this.currentLine="",this.indented=!1,this.blank=!1,this.partiallyConsumedTab=!1,this.allClosed=!0,this.lastMatchedContainer=this.doc,this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.lastLineLength=0,this.lines=[],this.options.frontMatter&&(Ws.frontMatter=u_e,dm.unshift(l_e)),this.inlineParser=new mSe(this.options)}return t.prototype.advanceOffset=function(e,r){r===void 0&&(r=!1);for(var n=this.currentLine,i,o,a;e>0&&(a=n[this.offset]);)a===" "?(i=4-this.column%4,r?(this.partiallyConsumedTab=i>e,o=i>e?e:i,this.column+=o,this.offset+=this.partiallyConsumedTab?0:1,e-=o):(this.partiallyConsumedTab=!1,this.column+=i,this.offset+=1,e-=1)):(this.partiallyConsumedTab=!1,this.offset+=1,this.column+=1,e-=1)},t.prototype.advanceNextNonspace=function(){this.offset=this.nextNonspace,this.column=this.nextNonspaceColumn,this.partiallyConsumedTab=!1},t.prototype.findNextNonspace=function(){for(var e=this.currentLine,r=this.offset,n=this.column,i;(i=e.charAt(r))!=="";)if(i===" ")r++,n++;else if(i===" ")r++,n+=4-n%4;else break;this.blank=i===`
|
|
153
|
+
`||i==="\r"||i==="",this.nextNonspace=r,this.nextNonspaceColumn=n,this.indent=this.nextNonspaceColumn-this.column,this.indented=this.indent>=Vf},t.prototype.addLine=function(){if(this.partiallyConsumedTab){this.offset+=1;var e=4-this.column%4;this.tip.stringContent+=em(" ",e)}this.tip.lineOffsets?this.tip.lineOffsets.push(this.offset):this.tip.lineOffsets=[this.offset],this.tip.stringContent+=this.currentLine.slice(this.offset)+`
|
|
154
|
+
`},t.prototype.addChild=function(e,r){for(;!Ws[this.tip.type].canContain(e);)this.finalize(this.tip,this.lineNumber-1);var n=r+1,i=Pt(e,[[this.lineNumber,n],[0,0]]);return i.stringContent="",this.tip.appendChild(i),this.tip=i,i},t.prototype.closeUnmatchedBlocks=function(){if(!this.allClosed){for(;this.oldtip!==this.lastMatchedContainer;){var e=this.oldtip.parent;this.finalize(this.oldtip,this.lineNumber-1),this.oldtip=e}this.allClosed=!0}},t.prototype.finalize=function(e,r){var n=e.parent;e.open=!1,e.sourcepos[1]=[r,this.lastLineLength],Ws[e.type].finalize(this,e),this.tip=n},t.prototype.processInlines=function(e){var r,n=this.options.customParser,i=e.walker();for(this.inlineParser.refMap=this.refMap,this.inlineParser.refLinkCandidateMap=this.refLinkCandidateMap,this.inlineParser.refDefCandidateMap=this.refDefCandidateMap,this.inlineParser.options=this.options;r=i.next();){var o=r.node,a=r.entering,s=o.type;n&&n[s]&&n[s](o,{entering:a,options:this.options}),!a&&(s==="paragraph"||s==="heading"||s==="tableCell"&&!o.ignored)&&this.inlineParser.parse(o)}},t.prototype.incorporateLine=function(e){var r=this.doc;this.oldtip=this.tip,this.offset=0,this.column=0,this.blank=!1,this.partiallyConsumedTab=!1,this.lineNumber+=1,e.indexOf("\0")!==-1&&(e=e.replace(/\0/g,"�")),this.currentLine=e;for(var n=!0,i;(i=r.lastChild)&&i.open;){switch(r=i,this.findNextNonspace(),Ws[r.type].continue(this,r)){case 0:break;case 1:n=!1;break;case 2:this.lastLineLength=e.length;return;default:throw new Error("continue returned illegal value, must be 0, 1, or 2")}if(!n){r=r.parent;break}}this.allClosed=r===this.oldtip,this.lastMatchedContainer=r;for(var o=r.type!=="paragraph"&&Ws[r.type].acceptsLines,a=dm.length;!o;){if(this.findNextNonspace(),r.type!=="table"&&r.type!=="tableBody"&&r.type!=="paragraph"&&!this.indented&&!f_e.test(e.slice(this.nextNonspace))){this.advanceNextNonspace();break}for(var s=0;s<a;){var u=dm[s](this,r);if(u===1){r=this.tip;break}else if(u===2){r=this.tip,o=!0;break}else s++}if(s===a){this.advanceNextNonspace();break}}if(!this.allClosed&&!this.blank&&this.tip.type==="paragraph")this.addLine();else{this.closeUnmatchedBlocks(),this.blank&&r.lastChild&&(r.lastChild.lastLineBlank=!0);for(var f=r.type,d=this.blank&&!(f==="blockQuote"||qC(r)&&r.isFenced||f==="item"&&!r.firstChild&&r.sourcepos[0][0]===this.lineNumber),p=r;p;)p.lastLineBlank=d,p=p.parent;Ws[f].acceptsLines?(this.addLine(),ETe(r)&&r.htmlBlockType>=1&&r.htmlBlockType<=5&&c_e[r.htmlBlockType].test(this.currentLine.slice(this.offset))&&(this.lastLineLength=e.length,this.finalize(r,this.lineNumber))):this.offset<e.length&&!this.blank&&(r=this.addChild("paragraph",this.offset),this.advanceNextNonspace(),this.addLine())}this.lastLineLength=e.length},t.prototype.parse=function(e,r){this.doc=pm(),this.tip=this.doc,this.lineNumber=0,this.lastLineLength=0,this.offset=0,this.column=0,this.lastMatchedContainer=this.doc,this.currentLine="";var n=e.split(d_e),i=n.length;this.lines=r||n,this.options.referenceDefinition&&this.clearRefMaps(),e.charCodeAt(e.length-1)===om&&(i-=1);for(var o=0;o<i;o++)this.incorporateLine(n[o]);for(;this.tip;)this.finalize(this.tip,i);return this.processInlines(this.doc),this.doc},t.prototype.partialParseStart=function(e,r){this.doc=pm(),this.tip=this.doc,this.lineNumber=e-1,this.lastLineLength=0,this.offset=0,this.column=0,this.lastMatchedContainer=this.doc,this.currentLine="";for(var n=r.length,i=0;i<n;i++)this.incorporateLine(r[i]);return this.doc},t.prototype.partialParseExtends=function(e){for(var r=0;r<e.length;r++)this.incorporateLine(e[r])},t.prototype.partialParseFinish=function(){for(;this.tip;)this.finalize(this.tip,this.lineNumber);this.processInlines(this.doc)},t.prototype.setRefMaps=function(e,r,n){this.refMap=e,this.refLinkCandidateMap=r,this.refDefCandidateMap=n},t.prototype.clearRefMaps=function(){[this.refMap,this.refLinkCandidateMap,this.refDefCandidateMap].forEach(function(e){XTe(e)})},t}();function mk(t,e){return t[0]<e[0]?1:t[0]>e[0]?-1:t[1]<e[1]?1:t[1]>e[1]?-1:0}function v_e(t,e){var r=t[0],n=t[1];return mk(n,e)===1?1:mk(r,e)===-1?-1:0}function m_e(t,e){if(!(t.parent!==e.parent||t===e)){for(var r=t.next;r&&r!==e;){for(var n=r.next,i=0,o=["parent","prev","next"];i<o.length;i++){var a=o[i];r[a]&&(rm(r[a].id),r[a]=null)}r=n}t.next=e.next,e.next?e.next.prev=t:t.parent.lastChild=t}}function g_e(t){for(var e=[],r=t.firstChild;r;)e.push(r),r=r.next;return e}function gk(t,e){for(var r=0,n=e;r<n.length;r++){var i=n[r];t.insertBefore(i)}}function y_e(t,e){for(var r=e.length-1;r>=0;r-=1)t.prependChild(e[r])}function b_e(t,e){if(!(!t||!t.parent||e===0)){var r=t.parent.walker();r.resumeAt(t,!0);for(var n;n=r.next();){var i=n.node,o=n.entering;o&&(i.sourcepos[0][0]+=e,i.sourcepos[1][0]+=e)}}}function yk(t,e){var r=t[0],n=t[1];return n[0]<e?1:r[0]>e?-1:0}function Wf(t,e){for(var r=t.firstChild;r;){var n=yk(r.sourcepos,e);if(n===0)return r;if(n===-1)return r.prev||r;r=r.next}return t.lastChild}function w_e(t){for(;t.lastChild;)t=t.lastChild;return t}function E_e(t){for(;t.parent&&t.parent.type!=="document"&&t.parent.sourcepos[0][0]===t.sourcepos[0][0];)t=t.parent;return t}function x_e(t,e){for(var r=t.firstChild,n=null;r;){var i=yk(r.sourcepos,e);if(i===0){if(r.sourcepos[0][0]===e||!r.firstChild)return r;n=r,r=r.firstChild}else{if(i===-1)break;n=r,r=r.next}}return n?E_e(w_e(n)):null}function C_e(t,e){for(var r=t,n=null;r;){var i=v_e(r.sourcepos,e);if(i===0)if(r.firstChild)n=r,r=r.firstChild;else return r;else{if(i===-1)return n;if(r.next)r=r.next;else return n}}return r}function bk(t){return lTe(t)||null}function hm(t,e,r){if(r===void 0&&(r=null),e)for(var n=e.walker();e&&e!==r;){t(e);var i=n.next();if(i)e=i.node;else break}}function k_e(t){var e=bk(t);if(!e)return!0;for(;e&&e.type!=="document";){if(!e.parent&&!e.prev&&!e.next)return!0;e=e.parent}return!1}var wk=/\r\n|\n|\r/;function T_e(t){var e=t.match(/^[ \t]+/);if(e&&(e[0].length>=2||/\t/.test(e[0])))return!0;var r=e?t.slice(e.length):t;return dk.test(r)||pk.test(r)}function S_e(t){return!ck(t)&&t.indexOf("|")!==-1}function vm(t){var e=t.id,r=t.title,n=t.sourcepos,i=t.dest;return{id:e,title:r,sourcepos:n,unlinked:!1,destination:i}}var Ek=function(){function t(e,r){this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.referenceDefinition=!!(r!=null&&r.referenceDefinition),this.parser=new h_e(r),this.parser.setRefMaps(this.refMap,this.refLinkCandidateMap,this.refDefCandidateMap),this.eventHandlerMap={change:[]},e=e||"",this.lineTexts=e.split(wk),this.root=this.parser.parse(e,this.lineTexts)}return t.prototype.updateLineTexts=function(e,r,n){var i,o=e[0],a=e[1],s=r[0],u=r[1],f=n.split(wk),d=f.length,p=this.lineTexts[o-1],v=this.lineTexts[s-1];f[0]=p.slice(0,a-1)+f[0],f[d-1]=f[d-1]+v.slice(u-1);var m=s-o+1;return(i=this.lineTexts).splice.apply(i,Kv([o-1,m],f)),d-m},t.prototype.updateRootNodeState=function(){if(this.lineTexts.length===1&&this.lineTexts[0]===""){this.root.lastLineBlank=!0,this.root.sourcepos=[[1,1],[1,0]];return}this.root.lastChild&&(this.root.lastLineBlank=this.root.lastChild.lastLineBlank);for(var e=this.lineTexts,r=e.length-1;e[r]==="";)r-=1;e.length-2>r&&(r+=1),this.root.sourcepos[1]=[r+1,e[r].length]},t.prototype.replaceRangeNodes=function(e,r,n){e?(gk(e,n),m_e(e,r),[e.id,r.id].forEach(function(i){return rm(i)}),e.unlink()):r?(gk(r,n),rm(r.id),r.unlink()):y_e(this.root,n)},t.prototype.getNodeRange=function(e,r){var n=Wf(this.root,e[0]),i=Wf(this.root,r[0]);return i&&i.next&&r[0]+1===i.next.sourcepos[0][0]&&(i=i.next),[n,i]},t.prototype.trigger=function(e,r){this.eventHandlerMap[e].forEach(function(n){n(r)})},t.prototype.extendEndLine=function(e){for(;this.lineTexts[e]==="";)e+=1;return e},t.prototype.parseRange=function(e,r,n,i){e&&e.prev&&(VC(e.prev)&&T_e(this.lineTexts[n-1])||CTe(e.prev)&&S_e(this.lineTexts[n-1]))&&(e=e.prev,n=e.sourcepos[0][0]);for(var o=this.lineTexts.slice(n-1,i),a=this.parser.partialParseStart(n,o),s=r?r.next:this.root.firstChild,u=a.lastChild,f=u&&qC(u)&&u.open,d=u&&WC(u)&&u.open,p=u&&VC(u);(f||d)&&s||p&&s&&(s.type==="list"||s.sourcepos[0][1]>=2);){var v=this.extendEndLine(s.sourcepos[1][0]);this.parser.partialParseExtends(this.lineTexts.slice(i,v)),e||(e=r),r=s,i=v,s=s.next}this.parser.partialParseFinish();var m=g_e(a);return{newNodes:m,extStartNode:e,extEndNode:r}},t.prototype.getRemovedNodeRange=function(e,r){return!e||e&&zs(e)||r&&zs(r)?null:{id:[e.id,r.id],line:[e.sourcepos[0][0]-1,r.sourcepos[1][0]-1]}},t.prototype.markDeletedRefMap=function(e,r){var n=this;if(!qs(this.refMap)){var i=function(o){if(zs(o)){var a=n.refMap[o.label];a&&o.id===a.id&&(a.unlinked=!0)}};e&&hm(i,e.parent,r),r&&hm(i,r)}},t.prototype.replaceWithNewRefDefState=function(e){var r=this;if(!qs(this.refMap)){var n=function(i){if(zs(i)){var o=i.label,a=r.refMap[o];(!a||a.unlinked)&&(r.refMap[o]=vm(i))}};e.forEach(function(i){hm(n,i)})}},t.prototype.replaceWithRefDefCandidate=function(){var e=this;qs(this.refDefCandidateMap)||Uf(this.refDefCandidateMap,function(r,n){var i=n.label,o=n.sourcepos,a=e.refMap[i];(!a||a.unlinked||a.sourcepos[0][0]>o[0][0])&&(e.refMap[i]=vm(n))})},t.prototype.getRangeWithRefDef=function(e,r,n,i,o){if(this.referenceDefinition&&!qs(this.refMap)){var a=Wf(this.root,e-1),s=Wf(this.root,r+1);a&&zs(a)&&a!==n&&a!==i&&(n=a,e=n.sourcepos[0][0]),s&&zs(s)&&s!==n&&s!==i&&(i=s,r=this.extendEndLine(i.sourcepos[1][0]+o))}return[n,i,e,r]},t.prototype.parse=function(e,r,n){n===void 0&&(n=0);var i=this.getNodeRange(e,r),o=i[0],a=i[1],s=o?Math.min(o.sourcepos[0][0],e[0]):e[0],u=this.extendEndLine((a?Math.max(a.sourcepos[1][0],r[0]):r[0])+n),f=this.parseRange.apply(this,this.getRangeWithRefDef(s,u,o,a,n)),d=f.newNodes,p=f.extStartNode,v=f.extEndNode,m=this.getRemovedNodeRange(p,v),g=v?v.next:this.root.firstChild;return this.referenceDefinition?(this.markDeletedRefMap(p,v),this.replaceRangeNodes(p,v,d),this.replaceWithNewRefDefState(d)):this.replaceRangeNodes(p,v,d),{nodes:d,removedNodeRange:m,nextNode:g}},t.prototype.parseRefLink=function(){var e=this,r=[];return qs(this.refMap)||Uf(this.refMap,function(n,i){i.unlinked&&delete e.refMap[n],Uf(e.refLinkCandidateMap,function(o,a){var s=a.node,u=a.refLabel;u===n&&r.push(e.parse(s.sourcepos[0],s.sourcepos[1]))})}),r},t.prototype.removeUnlinkedCandidate=function(){qs(this.refDefCandidateMap)||[this.refLinkCandidateMap,this.refDefCandidateMap].forEach(function(e){Uf(e,function(r){k_e(r)&&delete e[r]})})},t.prototype.editMarkdown=function(e,r,n){var i=this.updateLineTexts(e,r,n),o=this.parse(e,r,i),a=YTe(o,"nextNode");b_e(o.nextNode,i),this.updateRootNodeState();var s=[a];return this.referenceDefinition&&(this.removeUnlinkedCandidate(),this.replaceWithRefDefCandidate(),s=s.concat(this.parseRefLink())),this.trigger("change",s),s},t.prototype.getLineTexts=function(){return this.lineTexts},t.prototype.getRootNode=function(){return this.root},t.prototype.findNodeAtPosition=function(e){var r=C_e(this.root,e);return!r||r===this.root?null:r},t.prototype.findFirstNodeAtLine=function(e){return x_e(this.root,e)},t.prototype.on=function(e,r){this.eventHandlerMap[e].push(r)},t.prototype.off=function(e,r){var n=this.eventHandlerMap[e],i=n.indexOf(r);n.splice(i,1)},t.prototype.findNodeById=function(e){return bk(e)},t.prototype.removeAllNode=function(){uTe()},t}(),__e=["title","textarea","style","xmp","iframe","noembed","noframes","script","plaintext"],xk=new RegExp("<(/?(?:"+__e.join("|")+")[^>]*>)","ig");function Ck(t){return xk.test(t)?t.replace(xk,function(e,r){return"<"+r}):t}var kk={heading:function(t,e){var r=e.entering;return{type:r?"openTag":"closeTag",tagName:"h"+t.level,outerNewLine:!0}},text:function(t){return{type:"text",content:t.literal}},softbreak:function(t,e){var r=e.options;return{type:"html",content:r.softbreak}},linebreak:function(){return{type:"html",content:`<br />
|
|
155
|
+
`}},emph:function(t,e){var r=e.entering;return{type:r?"openTag":"closeTag",tagName:"em"}},strong:function(t,e){var r=e.entering;return{type:r?"openTag":"closeTag",tagName:"strong"}},paragraph:function(t,e){var r,n=e.entering,i=(r=t.parent)===null||r===void 0?void 0:r.parent;return i&&i.type==="list"&&i.listData.tight?null:{type:n?"openTag":"closeTag",tagName:"p",outerNewLine:!0}},thematicBreak:function(){return{type:"openTag",tagName:"hr",outerNewLine:!0,selfClose:!0}},blockQuote:function(t,e){var r=e.entering;return{type:r?"openTag":"closeTag",tagName:"blockquote",outerNewLine:!0,innerNewLine:!0}},list:function(t,e){var r=e.entering,n=t.listData,i=n.type,o=n.start,a=i==="bullet"?"ul":"ol",s={};return a==="ol"&&o!==null&&o!==1&&(s.start=o.toString()),{type:r?"openTag":"closeTag",tagName:a,attributes:s,outerNewLine:!0}},item:function(t,e){var r=e.entering;return{type:r?"openTag":"closeTag",tagName:"li",outerNewLine:!0}},htmlInline:function(t,e){var r=e.options,n=r.tagFilter?Ck(t.literal):t.literal;return{type:"html",content:n}},htmlBlock:function(t,e){var r=e.options,n=r.tagFilter?Ck(t.literal):t.literal;return r.nodeId?[{type:"openTag",tagName:"div",outerNewLine:!0},{type:"html",content:n},{type:"closeTag",tagName:"div",outerNewLine:!0}]:{type:"html",content:n,outerNewLine:!0}},code:function(t){return[{type:"openTag",tagName:"code"},{type:"text",content:t.literal},{type:"closeTag",tagName:"code"}]},codeBlock:function(t){var e=t.info,r=e?e.split(/\s+/):[],n=[];return r.length>0&&r[0].length>0&&n.push("language-"+Us(r[0])),[{type:"openTag",tagName:"pre",outerNewLine:!0},{type:"openTag",tagName:"code",classNames:n},{type:"text",content:t.literal},{type:"closeTag",tagName:"code"},{type:"closeTag",tagName:"pre",outerNewLine:!0}]},link:function(t,e){var r=e.entering;if(r){var n=t,i=n.title,o=n.destination;return{type:"openTag",tagName:"a",attributes:gr({href:Us(o)},i&&{title:Us(i)})}}return{type:"closeTag",tagName:"a"}},image:function(t,e){var r=e.getChildrenText,n=e.skipChildren,i=t,o=i.title,a=i.destination;return n(),{type:"openTag",tagName:"img",selfClose:!0,attributes:gr({src:Us(a),alt:r(t)},o&&{title:Us(o)})}},customBlock:function(t,e,r){var n=t.info.trim().toLowerCase(),i=r[n];if(i)try{return i(t,e)}catch(o){console.warn("[@toast-ui/editor] - The error occurred when "+n+" block node was parsed in markdown renderer: "+o)}return[{type:"openTag",tagName:"div",outerNewLine:!0},{type:"text",content:t.literal},{type:"closeTag",tagName:"div",outerNewLine:!0}]},frontMatter:function(t){return[{type:"openTag",tagName:"div",outerNewLine:!0,attributes:{style:"white-space: pre; display: none;"}},{type:"text",content:t.literal},{type:"closeTag",tagName:"div",outerNewLine:!0}]},customInline:function(t,e,r){var n=t,i=n.info,o=n.firstChild,a=i.trim().toLowerCase(),s=r[a],u=e.entering;if(s)try{return s(t,e)}catch(f){console.warn("[@toast-ui/editor] - The error occurred when "+a+" inline node was parsed in markdown renderer: "+f)}return u?[{type:"openTag",tagName:"span"},{type:"text",content:"$$"+i+(o?" ":"")}]:[{type:"text",content:"$$"},{type:"closeTag",tagName:"span"}]}},Tk={strike:function(t,e){var r=e.entering;return{type:r?"openTag":"closeTag",tagName:"del"}},item:function(t,e){var r=e.entering,n=t.listData,i=n.checked,o=n.task;if(r){var a={type:"openTag",tagName:"li",outerNewLine:!0};return o?[a,{type:"openTag",tagName:"input",selfClose:!0,attributes:gr(gr({},i&&{checked:""}),{disabled:"",type:"checkbox"})},{type:"text",content:" "}]:a}return{type:"closeTag",tagName:"li",outerNewLine:!0}},table:function(t,e){var r=e.entering;return{type:r?"openTag":"closeTag",tagName:"table",outerNewLine:!0}},tableHead:function(t,e){var r=e.entering;return{type:r?"openTag":"closeTag",tagName:"thead",outerNewLine:!0}},tableBody:function(t,e){var r=e.entering;return{type:r?"openTag":"closeTag",tagName:"tbody",outerNewLine:!0}},tableRow:function(t,e){var r=e.entering;if(r)return{type:"openTag",tagName:"tr",outerNewLine:!0};var n=[];if(t.lastChild)for(var i=t.parent.parent.columns.length,o=t.lastChild.endIdx,a=o+1;a<i;a+=1)n.push({type:"openTag",tagName:"td",outerNewLine:!0},{type:"closeTag",tagName:"td",outerNewLine:!0});return n.push({type:"closeTag",tagName:"tr",outerNewLine:!0}),n},tableCell:function(t,e){var r=e.entering;if(t.ignored)return{type:"text",content:""};var n=t.parent.parent,i=n.type==="tableHead"?"th":"td",o=n.parent,a=o.columns[t.startIdx],s=a!=null&&a.align?{align:a.align}:null;return r?gr({type:"openTag",tagName:i,outerNewLine:!0},s&&{attributes:s}):{type:"closeTag",tagName:i,outerNewLine:!0}}},O_e={softbreak:`
|
|
156
|
+
`,gfm:!1,tagFilter:!1,nodeId:!1};function A_e(t){for(var e=[],r=t.walker(),n=null;n=r.next();){var i=n.node;i.type==="text"&&e.push(i.literal)}return e.join("")}var mm=function(){function t(e){this.buffer=[],this.options=gr(gr({},O_e),e),this.convertors=this.createConvertors(),delete this.options.convertors}return t.prototype.createConvertors=function(){var e=gr({},kk);if(this.options.gfm&&(e=gr(gr({},e),Tk)),this.options.convertors){var r=this.options.convertors,n=Object.keys(r),i=gr(gr({},kk),Tk);n.forEach(function(o){var a=e[o],s=r[o],u=Object.keys(i).indexOf(o)===-1?o.toLowerCase():o;a?e[u]=function(f,d,p){return d.origin=function(){return a(f,d,p)},s(f,d)}:e[u]=s})}return e},t.prototype.getConvertors=function(){return this.convertors},t.prototype.getOptions=function(){return this.options},t.prototype.render=function(e){var r=this;this.buffer=[];for(var n=e.walker(),i=null,o=function(){var s=i.node,u=i.entering,f=a.convertors[s.type];if(!f)return"continue";var d=!1,p={entering:u,leaf:!tm(s),options:a.options,getChildrenText:A_e,skipChildren:function(){d=!0}},v=WC(s)||kTe(s)?f(s,p,a.convertors):f(s,p);if(v){var m=Array.isArray(v)?v:[v];m.forEach(function(g,E){g.type==="openTag"&&r.options.nodeId&&E===0&&(g.attributes||(g.attributes={}),g.attributes["data-nodeid"]=String(s.id)),r.renderHTMLNode(g)}),d&&(n.resumeAt(s,!1),n.next())}},a=this;i=n.next();)o();return this.addNewLine(),this.buffer.join("")},t.prototype.renderHTMLNode=function(e){switch(e.type){case"openTag":case"closeTag":this.renderElementNode(e);break;case"text":this.renderTextNode(e);break;case"html":this.renderRawHtmlNode(e);break}},t.prototype.generateOpenTagString=function(e){var r=this,n=e.tagName,i=e.classNames,o=e.attributes;this.buffer.push("<"+n),i&&i.length>0&&this.buffer.push(' class="'+i.join(" ")+'"'),o&&Object.keys(o).forEach(function(a){var s=o[a];r.buffer.push(" "+a+'="'+s+'"')}),e.selfClose&&this.buffer.push(" /"),this.buffer.push(">")},t.prototype.generateCloseTagString=function(e){var r=e.tagName;this.buffer.push("</"+r+">")},t.prototype.addNewLine=function(){this.buffer.length&&Hf(Hf(this.buffer))!==`
|
|
157
|
+
`&&this.buffer.push(`
|
|
158
|
+
`)},t.prototype.addOuterNewLine=function(e){e.outerNewLine&&this.addNewLine()},t.prototype.addInnerNewLine=function(e){e.innerNewLine&&this.addNewLine()},t.prototype.renderTextNode=function(e){this.buffer.push(Us(e.content))},t.prototype.renderRawHtmlNode=function(e){this.addOuterNewLine(e),this.buffer.push(e.content),this.addOuterNewLine(e)},t.prototype.renderElementNode=function(e){e.type==="openTag"?(this.addOuterNewLine(e),this.generateOpenTagString(e),e.selfClose?this.addOuterNewLine(e):this.addInnerNewLine(e)):(this.addInnerNewLine(e),this.generateCloseTagString(e),this.addOuterNewLine(e))},t}();/*! @license DOMPurify 2.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.3/LICENSE */function M_e(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}else return Array.from(t)}var N_e=Object.hasOwnProperty,Sk=Object.setPrototypeOf,L_e=Object.isFrozen,D_e=Object.getPrototypeOf,I_e=Object.getOwnPropertyDescriptor,qr=Object.freeze,Ji=Object.seal,R_e=Object.create,_k=typeof Reflect<"u"&&Reflect,jf=_k.apply,gm=_k.construct;jf||(jf=function(e,r,n){return e.apply(r,n)}),qr||(qr=function(e){return e}),Ji||(Ji=function(e){return e}),gm||(gm=function(e,r){return new(Function.prototype.bind.apply(e,[null].concat(M_e(r))))});var P_e=ri(Array.prototype.forEach),Ok=ri(Array.prototype.pop),bu=ri(Array.prototype.push),Gf=ri(String.prototype.toLowerCase),Ak=ri(String.prototype.match),qo=ri(String.prototype.replace),B_e=ri(String.prototype.indexOf),$_e=ri(String.prototype.trim),Zi=ri(RegExp.prototype.test),Mk=F_e(TypeError);function ri(t){return function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return jf(t,e,n)}}function F_e(t){return function(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return gm(t,r)}}function Ze(t,e){Sk&&Sk(t,null);for(var r=e.length;r--;){var n=e[r];if(typeof n=="string"){var i=Gf(n);i!==n&&(L_e(e)||(e[r]=i),n=i)}t[n]=!0}return t}function Fa(t){var e=R_e(null),r=void 0;for(r in t)jf(N_e,t,[r])&&(e[r]=t[r]);return e}function Kf(t,e){for(;t!==null;){var r=I_e(t,e);if(r){if(r.get)return ri(r.get);if(typeof r.value=="function")return ri(r.value)}t=D_e(t)}function n(i){return console.warn("fallback value for",i),null}return n}var Nk=qr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ym=qr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),bm=qr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),H_e=qr(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),wm=qr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),U_e=qr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Lk=qr(["#text"]),Dk=qr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Em=qr(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ik=qr(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Yf=qr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),z_e=Ji(/\{\{[\s\S]*|[\s\S]*\}\}/gm),q_e=Ji(/<%[\s\S]*|[\s\S]*%>/gm),V_e=Ji(/^data-[\-\w.\u00B7-\uFFFF]/),W_e=Ji(/^aria-[\-\w]+$/),j_e=Ji(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G_e=Ji(/^(?:\w+script|data):/i),K_e=Ji(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),wu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function _i(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}else return Array.from(t)}var Y_e=function(){return typeof window>"u"?null:window},X_e=function(e,r){if((typeof e>"u"?"undefined":wu(e))!=="object"||typeof e.createPolicy!="function")return null;var n=null,i="data-tt-policy-suffix";r.currentScript&&r.currentScript.hasAttribute(i)&&(n=r.currentScript.getAttribute(i));var o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:function(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function Rk(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Y_e(),e=function(H){return Rk(H)};if(e.version="2.3.3",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;var r=t.document,n=t.document,i=t.DocumentFragment,o=t.HTMLTemplateElement,a=t.Node,s=t.Element,u=t.NodeFilter,f=t.NamedNodeMap,d=f===void 0?t.NamedNodeMap||t.MozNamedAttrMap:f,p=t.Text,v=t.Comment,m=t.DOMParser,g=t.trustedTypes,E=s.prototype,w=Kf(E,"cloneNode"),x=Kf(E,"nextSibling"),k=Kf(E,"childNodes"),_=Kf(E,"parentNode");if(typeof o=="function"){var O=n.createElement("template");O.content&&O.content.ownerDocument&&(n=O.content.ownerDocument)}var N=X_e(g,r),L=N&&D?N.createHTML(""):"",A=n,P=A.implementation,U=A.createNodeIterator,J=A.createDocumentFragment,re=A.getElementsByTagName,Se=r.importNode,Fe={};try{Fe=Fa(n).documentMode?n.documentMode:{}}catch{}var ce={};e.isSupported=typeof _=="function"&&P&&typeof P.createHTMLDocument<"u"&&Fe!==9;var le=z_e,Z=q_e,j=V_e,ue=W_e,ye=G_e,ve=K_e,ke=j_e,Te=null,We=Ze({},[].concat(_i(Nk),_i(ym),_i(bm),_i(wm),_i(Lk))),we=null,De=Ze({},[].concat(_i(Dk),_i(Em),_i(Ik),_i(Yf))),pe=null,F=null,G=!0,K=!0,te=!1,ne=!1,he=!1,Ne=!1,Xe=!1,ot=!1,sr=!1,Ft=!0,D=!1,R=!0,X=!0,fe=!1,Ke={},et=null,je=Ze({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),V=null,se=Ze({},["audio","video","img","source","image","track"]),Ue=null,at=Ze({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Wr="http://www.w3.org/1998/Math/MathML",zn="http://www.w3.org/2000/svg",Yt="http://www.w3.org/1999/xhtml",Rr=Yt,oo=!1,Cn=void 0,Fu=["application/xhtml+xml","text/html"],Hu="text/html",Ii=void 0,Yo=null,Ug=n.createElement("form"),Uu=function(H){Yo&&Yo===H||((!H||(typeof H>"u"?"undefined":wu(H))!=="object")&&(H={}),H=Fa(H),Te="ALLOWED_TAGS"in H?Ze({},H.ALLOWED_TAGS):We,we="ALLOWED_ATTR"in H?Ze({},H.ALLOWED_ATTR):De,Ue="ADD_URI_SAFE_ATTR"in H?Ze(Fa(at),H.ADD_URI_SAFE_ATTR):at,V="ADD_DATA_URI_TAGS"in H?Ze(Fa(se),H.ADD_DATA_URI_TAGS):se,et="FORBID_CONTENTS"in H?Ze({},H.FORBID_CONTENTS):je,pe="FORBID_TAGS"in H?Ze({},H.FORBID_TAGS):{},F="FORBID_ATTR"in H?Ze({},H.FORBID_ATTR):{},Ke="USE_PROFILES"in H?H.USE_PROFILES:!1,G=H.ALLOW_ARIA_ATTR!==!1,K=H.ALLOW_DATA_ATTR!==!1,te=H.ALLOW_UNKNOWN_PROTOCOLS||!1,ne=H.SAFE_FOR_TEMPLATES||!1,he=H.WHOLE_DOCUMENT||!1,ot=H.RETURN_DOM||!1,sr=H.RETURN_DOM_FRAGMENT||!1,Ft=H.RETURN_DOM_IMPORT!==!1,D=H.RETURN_TRUSTED_TYPE||!1,Xe=H.FORCE_BODY||!1,R=H.SANITIZE_DOM!==!1,X=H.KEEP_CONTENT!==!1,fe=H.IN_PLACE||!1,ke=H.ALLOWED_URI_REGEXP||ke,Rr=H.NAMESPACE||Yt,Cn=Fu.indexOf(H.PARSER_MEDIA_TYPE)===-1?Cn=Hu:Cn=H.PARSER_MEDIA_TYPE,Ii=Cn==="application/xhtml+xml"?function(de){return de}:Gf,ne&&(K=!1),sr&&(ot=!0),Ke&&(Te=Ze({},[].concat(_i(Lk))),we=[],Ke.html===!0&&(Ze(Te,Nk),Ze(we,Dk)),Ke.svg===!0&&(Ze(Te,ym),Ze(we,Em),Ze(we,Yf)),Ke.svgFilters===!0&&(Ze(Te,bm),Ze(we,Em),Ze(we,Yf)),Ke.mathMl===!0&&(Ze(Te,wm),Ze(we,Ik),Ze(we,Yf))),H.ADD_TAGS&&(Te===We&&(Te=Fa(Te)),Ze(Te,H.ADD_TAGS)),H.ADD_ATTR&&(we===De&&(we=Fa(we)),Ze(we,H.ADD_ATTR)),H.ADD_URI_SAFE_ATTR&&Ze(Ue,H.ADD_URI_SAFE_ATTR),H.FORBID_CONTENTS&&(et===je&&(et=Fa(et)),Ze(et,H.FORBID_CONTENTS)),X&&(Te["#text"]=!0),he&&Ze(Te,["html","head","body"]),Te.table&&(Ze(Te,["tbody"]),delete pe.tbody),qr&&qr(H),Yo=H)},zu=Ze({},["mi","mo","mn","ms","mtext"]),qu=Ze({},["foreignobject","desc","title","annotation-xml"]),ol=Ze({},ym);Ze(ol,bm),Ze(ol,H_e);var Vu=Ze({},wm);Ze(Vu,U_e);var zg=function(H){var de=_(H);(!de||!de.tagName)&&(de={namespaceURI:Yt,tagName:"template"});var Oe=Gf(H.tagName),mt=Gf(de.tagName);if(H.namespaceURI===zn)return de.namespaceURI===Yt?Oe==="svg":de.namespaceURI===Wr?Oe==="svg"&&(mt==="annotation-xml"||zu[mt]):!!ol[Oe];if(H.namespaceURI===Wr)return de.namespaceURI===Yt?Oe==="math":de.namespaceURI===zn?Oe==="math"&&qu[mt]:!!Vu[Oe];if(H.namespaceURI===Yt){if(de.namespaceURI===zn&&!qu[mt]||de.namespaceURI===Wr&&!zu[mt])return!1;var Xt=Ze({},["title","style","font","a","script"]);return!Vu[Oe]&&(Xt[Oe]||!ol[Oe])}return!1},li=function(H){bu(e.removed,{element:H});try{H.parentNode.removeChild(H)}catch{try{H.outerHTML=L}catch{H.remove()}}},Wu=function(H,de){try{bu(e.removed,{attribute:de.getAttributeNode(H),from:de})}catch{bu(e.removed,{attribute:null,from:de})}if(de.removeAttribute(H),H==="is"&&!we[H])if(ot||sr)try{li(de)}catch{}else try{de.setAttribute(H,"")}catch{}},Ad=function(H){var de=void 0,Oe=void 0;if(Xe)H="<remove></remove>"+H;else{var mt=Ak(H,/^[\r\n\t ]+/);Oe=mt&&mt[0]}Cn==="application/xhtml+xml"&&(H='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+H+"</body></html>");var Xt=N?N.createHTML(H):H;if(Rr===Yt)try{de=new m().parseFromString(Xt,Cn)}catch{}if(!de||!de.documentElement){de=P.createDocument(Rr,"template",null);try{de.documentElement.innerHTML=oo?"":Xt}catch{}}var lr=de.body||de.documentElement;return H&&Oe&&lr.insertBefore(n.createTextNode(Oe),lr.childNodes[0]||null),Rr===Yt?re.call(de,he?"html":"body")[0]:he?de.documentElement:lr},Md=function(H){return U.call(H.ownerDocument||H,H,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},qg=function(H){return H instanceof p||H instanceof v?!1:typeof H.nodeName!="string"||typeof H.textContent!="string"||typeof H.removeChild!="function"||!(H.attributes instanceof d)||typeof H.removeAttribute!="function"||typeof H.setAttribute!="function"||typeof H.namespaceURI!="string"||typeof H.insertBefore!="function"},ao=function(H){return(typeof a>"u"?"undefined":wu(a))==="object"?H instanceof a:H&&(typeof H>"u"?"undefined":wu(H))==="object"&&typeof H.nodeType=="number"&&typeof H.nodeName=="string"},ui=function(H,de,Oe){ce[H]&&P_e(ce[H],function(mt){mt.call(e,de,Oe,Yo)})},al=function(H){var de=void 0;if(ui("beforeSanitizeElements",H,null),qg(H)||Ak(H.nodeName,/[\u0080-\uFFFF]/))return li(H),!0;var Oe=Ii(H.nodeName);if(ui("uponSanitizeElement",H,{tagName:Oe,allowedTags:Te}),!ao(H.firstElementChild)&&(!ao(H.content)||!ao(H.content.firstElementChild))&&Zi(/<[/\w]/g,H.innerHTML)&&Zi(/<[/\w]/g,H.textContent)||Oe==="select"&&Zi(/<template/i,H.innerHTML))return li(H),!0;if(!Te[Oe]||pe[Oe]){if(X&&!et[Oe]){var mt=_(H)||H.parentNode,Xt=k(H)||H.childNodes;if(Xt&&mt)for(var lr=Xt.length,ur=lr-1;ur>=0;--ur)mt.insertBefore(w(Xt[ur],!0),x(H))}return li(H),!0}return H instanceof s&&!zg(H)||(Oe==="noscript"||Oe==="noembed")&&Zi(/<\/no(script|embed)/i,H.innerHTML)?(li(H),!0):(ne&&H.nodeType===3&&(de=H.textContent,de=qo(de,le," "),de=qo(de,Z," "),H.textContent!==de&&(bu(e.removed,{element:H.cloneNode()}),H.textContent=de)),ui("afterSanitizeElements",H,null),!1)},Nd=function(H,de,Oe){if(R&&(de==="id"||de==="name")&&(Oe in n||Oe in Ug))return!1;if(!(K&&!F[de]&&Zi(j,de))){if(!(G&&Zi(ue,de))){if(!we[de]||F[de])return!1;if(!Ue[de]){if(!Zi(ke,qo(Oe,ve,""))){if(!((de==="src"||de==="xlink:href"||de==="href")&&H!=="script"&&B_e(Oe,"data:")===0&&V[H])){if(!(te&&!Zi(ye,qo(Oe,ve,"")))){if(Oe)return!1}}}}}}return!0},Ld=function(H){var de=void 0,Oe=void 0,mt=void 0,Xt=void 0;ui("beforeSanitizeAttributes",H,null);var lr=H.attributes;if(lr){var ur={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:we};for(Xt=lr.length;Xt--;){de=lr[Xt];var ci=de,ja=ci.name,Dd=ci.namespaceURI;if(Oe=$_e(de.value),mt=Ii(ja),ur.attrName=mt,ur.attrValue=Oe,ur.keepAttr=!0,ur.forceKeepAttr=void 0,ui("uponSanitizeAttribute",H,ur),Oe=ur.attrValue,!ur.forceKeepAttr&&(Wu(ja,H),!!ur.keepAttr)){if(Zi(/\/>/i,Oe)){Wu(ja,H);continue}ne&&(Oe=qo(Oe,le," "),Oe=qo(Oe,Z," "));var Wg=Ii(H.nodeName);if(Nd(Wg,mt,Oe))try{Dd?H.setAttributeNS(Dd,ja,Oe):H.setAttribute(ja,Oe),Ok(e.removed)}catch{}}}ui("afterSanitizeAttributes",H,null)}},Vg=function Le(H){var de=void 0,Oe=Md(H);for(ui("beforeSanitizeShadowDOM",H,null);de=Oe.nextNode();)ui("uponSanitizeShadowNode",de,null),!al(de)&&(de.content instanceof i&&Le(de.content),Ld(de));ui("afterSanitizeShadowDOM",H,null)};return e.sanitize=function(Le,H){var de=void 0,Oe=void 0,mt=void 0,Xt=void 0,lr=void 0;if(oo=!Le,oo&&(Le="<!-->"),typeof Le!="string"&&!ao(Le)){if(typeof Le.toString!="function")throw Mk("toString is not a function");if(Le=Le.toString(),typeof Le!="string")throw Mk("dirty is not a string, aborting")}if(!e.isSupported){if(wu(t.toStaticHTML)==="object"||typeof t.toStaticHTML=="function"){if(typeof Le=="string")return t.toStaticHTML(Le);if(ao(Le))return t.toStaticHTML(Le.outerHTML)}return Le}if(Ne||Uu(H),e.removed=[],typeof Le=="string"&&(fe=!1),!fe)if(Le instanceof a)de=Ad("<!---->"),Oe=de.ownerDocument.importNode(Le,!0),Oe.nodeType===1&&Oe.nodeName==="BODY"||Oe.nodeName==="HTML"?de=Oe:de.appendChild(Oe);else{if(!ot&&!ne&&!he&&Le.indexOf("<")===-1)return N&&D?N.createHTML(Le):Le;if(de=Ad(Le),!de)return ot?null:L}de&&Xe&&li(de.firstChild);for(var ur=Md(fe?Le:de);mt=ur.nextNode();)mt.nodeType===3&&mt===Xt||al(mt)||(mt.content instanceof i&&Vg(mt.content),Ld(mt),Xt=mt);if(Xt=null,fe)return Le;if(ot){if(sr)for(lr=J.call(de.ownerDocument);de.firstChild;)lr.appendChild(de.firstChild);else lr=de;return Ft&&(lr=Se.call(r,lr,!0)),lr}var ci=he?de.outerHTML:de.innerHTML;return ne&&(ci=qo(ci,le," "),ci=qo(ci,Z," ")),N&&D?N.createHTML(ci):ci},e.setConfig=function(Le){Uu(Le),Ne=!0},e.clearConfig=function(){Yo=null,Ne=!1},e.isValidAttribute=function(Le,H,de){Yo||Uu({});var Oe=Ii(Le),mt=Ii(H);return Nd(Oe,mt,de)},e.addHook=function(Le,H){typeof H=="function"&&(ce[Le]=ce[Le]||[],bu(ce[Le],H))},e.removeHook=function(Le){ce[Le]&&Ok(ce[Le])},e.removeHooks=function(Le){ce[Le]&&(ce[Le]=[])},e.removeAllHooks=function(){ce={}},e}var J_e=Rk(),Z_e=["iframe","embed"],Pk=[];function Bk(t){vr(Z_e,t)&&Pk.push(t.toLowerCase())}function Ha(t,e){return J_e.sanitize(t,q({ADD_TAGS:Pk,ADD_ATTR:["rel","target","hreflang","type"],FORBID_TAGS:["input","script","textarea","form","button","select","meta","style","link","title","object","base"]},e))}function $k(t,e){return t.literal.replace(new RegExp("(<\\s*"+e+"[^>]*>)|(</"+e+"\\s*[>])","ig"),"").trim()}function xm(t){t=t.match($s)[0];var e=t.match(new RegExp(Fx,"g"));return e?e.reduce(function(r,n){var i=n.trim().split("="),o=i[0],a=i.slice(1);return a.length&&(r[o]=a.join("=").replace(/'|"/g,"").trim()),r},{}):{}}function Cm(t){return Ti(t.attributes).reduce(function(e,r){return e[r.nodeName]=r.nodeValue,e},{})}function Fk(t,e,r,n){var i=n.getToDOMNode(e)(t),o=r(i.outerHTML),a=document.createElement("div");a.innerHTML=o,i=a.firstChild;var s=Cm(i);return{dom:i,htmlAttrs:s}}var Q_e={htmlBlock:function(t,e,r){return{atom:!0,content:"block+",group:"block",attrs:{htmlAttrs:{default:{}},childrenHTML:{default:""},htmlBlock:{default:!0}},parseDOM:[{tag:t,getAttrs:function(n){return{htmlAttrs:Cm(n),childrenHTML:n.innerHTML}}}],toDOM:function(n){var i=Fk(n,t,e,r),o=i.dom,a=i.htmlAttrs;return a.class=a.class?a.class+" html-block":"html-block",an([t,a],Ti(o.childNodes))}}},htmlInline:function(t,e,r){return{attrs:{htmlAttrs:{default:{}},htmlInline:{default:!0}},parseDOM:[{tag:t,getAttrs:function(n){return{htmlAttrs:Cm(n)}}}],toDOM:function(n){var i=Fk(n,t,e,r).htmlAttrs;return[t,i,0]}}}};function eOe(t,e,r){var n={nodes:{},marks:{}};return["htmlBlock","htmlInline"].forEach(function(i){t[i]&&Object.keys(t[i]).forEach(function(o){var a=i==="htmlBlock"?"nodes":"marks";Bk(o),n[a][o]=Q_e[i](o,e,r)})}),n}var tOe=/^\s*<\s*\//,rOe={paragraph:function(t,e){var r=e.entering,n=e.origin,i=e.options;return i.nodeId?{type:r?"openTag":"closeTag",outerNewLine:!0,tagName:"p"}:n()},softbreak:function(t){var e=t.prev&&t.prev.type==="htmlInline",r=e&&/<br ?\/?>/.test(t.prev.literal),n=r?`
|
|
159
|
+
`:`<br>
|
|
160
|
+
`;return{type:"html",content:n}},item:function(t,e){var r=e.entering;if(r){var n={},i=[];return t.listData.task&&(n["data-task"]="",i.push("task-list-item"),t.listData.checked&&(i.push("checked"),n["data-task-checked"]="")),{type:"openTag",tagName:"li",classNames:i,attributes:n,outerNewLine:!0}}return{type:"closeTag",tagName:"li",outerNewLine:!0}},code:function(t){var e={"data-backticks":String(t.tickCount)};return[{type:"openTag",tagName:"code",attributes:e},{type:"text",content:t.literal},{type:"closeTag",tagName:"code"}]},codeBlock:function(t){var e=t,r=e.fenceLength,n=e.info,i=n?n.split(/\s+/):[],o=[],a={};if(r>3&&(a["data-backticks"]=r),i.length>0&&i[0].length>0){var s=i[0];o.push("lang-"+s),a["data-language"]=s}return[{type:"openTag",tagName:"pre",classNames:o},{type:"openTag",tagName:"code",attributes:a},{type:"text",content:t.literal},{type:"closeTag",tagName:"code"},{type:"closeTag",tagName:"pre"}]},customInline:function(t,e){var r=e.origin,n=e.entering,i=e.skipChildren,o=t.info;if(o.indexOf("widget")!==-1&&n){i();var a=Rx(t),s=Ix(o,a).outerHTML;return[{type:"openTag",tagName:"span",classNames:["tui-widget"]},{type:"html",content:s},{type:"closeTag",tagName:"span"}]}return r()}};function km(t,e){var r=q({},rOe);return t&&(r.link=function(n,i){var o=i.entering,a=i.origin,s=a();return o&&(s.attributes=q(q({},s.attributes),t)),s}),e&&Object.keys(e).forEach(function(n){var i=r[n],o=e[n];i&&$n(o)?r[n]=function(a,s){var u=q({},s);return u.origin=function(){return i(a,s)},o(a,u)}:vr(["htmlBlock","htmlInline"],n)&&!$n(o)?r[n]=function(a,s){var u=a.literal.match($s);if(u){var f=u[0],d=u[1],p=u[3],v=(d||p).toLowerCase(),m=o[v],g=$k(a,v);if(m){var E=q({},a);return E.attrs=xm(f),E.childrenHTML=g,E.type=v,s.entering=!tOe.test(a.literal),m(E,s)}}return s.origin()}:r[n]=o}),r}var nOe=["list","item","blockQuote"],iOe=["UL","OL","BLOCKQUOTE"];function oOe(t,e){var r,n=t.child(e);return!n.childCount||n.childCount===1&&!(!((r=n.firstChild.text)===null||r===void 0)&&r.trim())}function Hk(t,e,r){var n=pu(e)-1,i=wf(e)-1,o=r[n].getBoundingClientRect(),a=r[i].offsetTop-r[n].offsetTop+r[i].clientHeight;return{height:a<=0?r[n].clientHeight:a+aOe(t,r,Math.min(i+1,t.childCount-1)),rect:o}}function aOe(t,e,r){for(var n=t.childCount-1,i=0;r<=n&&oOe(t,r);)i+=e[r].clientHeight,r+=1;return i}function sOe(t,e){for(;!t.getAttribute("data-nodeid")&&t.parentElement!==e;)t=t.parentElement;return t}function Xf(t,e){for(var r=0;t&&t!==e&&(vr(iOe,t.tagName)||(r+=t.offsetTop),t.offsetParent!==e.offsetParent);)t=t.parentElement;return r}function lOe(t,e){for(var r=e,n=null;r;){var i=r.firstElementChild;if(!i)break;var o=Uk(i,t,Xf(r,e));n=r,r=o}var a=r||n;return a===e?null:a}function Uk(t,e,r){return t&&e>r+t.offsetTop?Uk(t.nextElementSibling,e,r)||t:null}function uOe(t,e,r,n){var i=Math.min((t-e)/r,1);return i*n}function Tm(t,e){for(var r=t.querySelector('[data-nodeid="'+e.id+'"]');!r||J4(e);)e=e.parent,r=t.querySelector('[data-nodeid="'+e.id+'"]');return cOe({mdNode:e,el:r})}function cOe(t){for(var e=t.mdNode,r=t.el;(vr(nOe,e.type)||e.type==="table")&&e.firstChild;)e=e.firstChild,r=r.firstElementChild;return{mdNode:e,el:r}}var ni={};function fOe(t,e){ni[t]=ni[t]||{},ni[t].height=e}function dOe(t,e){ni[t]=ni[t]||{},ni[t].offsetTop=e}function pOe(t){return ni[t]&&ni[t].height}function hOe(t){return ni[t]&&ni[t].offsetTop}function Sm(t){t&&(delete ni[Number(t.getAttribute("data-nodeid"))],Ti(t.children).forEach(function(e){Sm(e)}))}function vOe(t,e,r){var n=pOe(r),i=hOe(r),o=n||t.clientHeight,a=i||Xf(t,e)||t.offsetTop;return n||fOe(r,o),i||dOe(r,a),{nodeHeight:o,offsetTop:a}}var _m=_e("md-preview-highlight");function mOe(t,e){for(var r=t.firstChild;r&&r.next&&!(Ef(r.next)>e+1);)r=r.next;return r}var zk=function(){function t(e,r){var n=document.createElement("div");this.el=n,this.eventEmitter=e,this.isViewer=!!r.isViewer,this.el.className=_e("md-preview");var i=r.linkAttributes,o=r.customHTMLRenderer,a=r.sanitizer,s=r.highlight,u=s===void 0?!1:s;this.renderer=new mm({gfm:!0,nodeId:!0,convertors:km(i,o)}),this.cursorNodeId=null,this.sanitizer=a,this.initEvent(u),this.initContentSection(),this.isViewer&&(this.previewContent.style.overflowWrap="break-word")}return t.prototype.initContentSection=function(){this.previewContent=Vx('<div class="'+_e("contents")+'"></div>'),this.isViewer||this.el.appendChild(this.previewContent)},t.prototype.toggleActive=function(e){Nv(this.el,"active",e)},t.prototype.initEvent=function(e){var r=this;this.eventEmitter.listen("updatePreview",this.update.bind(this)),!this.isViewer&&(e&&(this.eventEmitter.listen("changeToolbarState",function(n){var i=n.mdNode,o=n.cursorPos;r.updateCursorNode(i,o)}),this.eventEmitter.listen("blur",function(){r.removeHighlight()})),CC(this.el,"scroll",function(n){r.eventEmitter.emit("scroll","preview",lOe(n.target.scrollTop,r.previewContent))}),this.eventEmitter.listen("changePreviewTabPreview",function(){return r.toggleActive(!0)}),this.eventEmitter.listen("changePreviewTabWrite",function(){return r.toggleActive(!1)}))},t.prototype.removeHighlight=function(){if(this.cursorNodeId){var e=this.getElementByNodeId(this.cursorNodeId);e&&ti(e,_m)}},t.prototype.updateCursorNode=function(e,r){e&&(e=Bs(e,function(a){return!ez(a)}),e.type==="tableRow"?e=mOe(e,r[1]):e.type==="tableBody"&&(e=null));var n=e?e.id:null;if(this.cursorNodeId!==n){var i=this.getElementByNodeId(this.cursorNodeId),o=this.getElementByNodeId(n);i&&ti(i,_m),o&&ki(o,_m),this.cursorNodeId=n}},t.prototype.getElementByNodeId=function(e){return e?this.previewContent.querySelector('[data-nodeid="'+e+'"]'):null},t.prototype.update=function(e){var r=this;e.forEach(function(n){return r.replaceRangeNodes(n)}),this.eventEmitter.emit("afterPreviewRender",this)},t.prototype.replaceRangeNodes=function(e){var r=this,n=e.nodes,i=e.removedNodeRange,o=this.previewContent,a=this.eventEmitter.emitReduce("beforePreviewRender",this.sanitizer(n.map(function(g){return r.renderer.render(g)}).join("")));if(!i)o.insertAdjacentHTML("afterbegin",a);else{var s=i.id,u=s[0],f=s[1],d=this.getElementByNodeId(u),p=this.getElementByNodeId(f);if(d){d.insertAdjacentHTML("beforebegin",a);for(var v=d;v&&v!==p;){var m=v.nextElementSibling;La(v),Sm(v),v=m}v!=null&&v.parentNode&&(La(v),Sm(v))}}},t.prototype.getRenderer=function(){return this.renderer},t.prototype.destroy=function(){EC(this.el,"scroll"),this.el=null},t.prototype.getElement=function(){return this.el},t.prototype.getHTML=function(){return Iv(this.previewContent.innerHTML)},t.prototype.setHTML=function(e){this.previewContent.innerHTML=e},t.prototype.setHeight=function(e){Ci(this.el,{height:e+"px"})},t.prototype.setMinHeight=function(e){Ci(this.el,{minHeight:e+"px"})},t}();function Qi(t,e){for(var r=t.depth;r;){var n=t.node(r);if(e(n,r))return{node:n,depth:r,offset:r>0?t.before(r):0};r-=1}return null}function js(t){return!!Qi(t,function(e){var r=e.type;return r.name==="listItem"||r.name==="bulletList"||r.name==="orderedList"})}function Jf(t){return!!Qi(t,function(e){var r=e.type;return r.name==="tableHeadCell"||r.name==="tableBodyCell"})}function Gs(t){return Qi(t,function(e){var r=e.type;return r.name==="listItem"})}function Zf(t){return{tag:t,getAttrs:function(e){var r=e.getAttribute("data-raw-html");return q({},r&&{rawHTML:r})}}}function qk(t){return Object.keys(t).reduce(function(e,r){return r!=="rawHTML"&&t[r]&&(r=r==="className"?"class":r,e[r]=t[r]),e},{})}function Vk(t){return{tag:t,getAttrs:function(e){return["rawHTML","colspan","rowspan","extended"].reduce(function(r,n){var i=n==="rawHTML"?"data-raw-html":n,o=e.getAttribute(i);return o&&(r[n]=vr(["rawHTML","extended"],n)?o:Number(o)),r},{})}}}function ir(){return{htmlAttrs:{default:null},classNames:{default:null}}}function Vt(t){var e=t.htmlAttrs,r=t.classNames;return q(q({},e),{class:r?r.join(" "):null})}function gOe(t,e){var r=t.parent,n=t.startIndex,i=t.endIndex,o=r.contentMatchAt(n).findWrapping(e);if(o){var a=o.length?o[0]:e;return r.canReplaceWith(n,i,a)?o:null}return null}function yOe(t,e){var r=t.parent,n=t.startIndex,i=t.endIndex,o=r.child(n),a=e.contentMatch.findWrapping(o.type);if(a){for(var s=a.length?a[a.length-1]:e,u=s.contentMatch,f=n;u&&f<i;f+=1)u=u.matchType(r.child(f).type);if(u&&u.validEnd)return a}return null}function bOe(t,e,r,n){var i=gOe(t,r),o=yOe(e,r);if(i&&o){var a=i.map(function(u){return{type:u}}),s=o.map(function(u){return{type:u,attrs:n}});return a.concat({type:r}).concat(s)}return null}function wOe(t,e,r,n,i){for(var o=e.start,a=e.end,s=e.startIndex,u=e.endIndex,f=e.parent,d=oe.empty,p=r.length-1;p>=0;p-=1)d=oe.from(r[p].type.create(r[p].attrs,d));t.step(new er(o-(n?2:0),a,o,a,new ge(d,0,0),r.length,!0));for(var v=0,p=0;p<r.length;p+=1)if(r[p].type===i){v=p+1;break}for(var m=r.length-v,g=o+r.length-(n?2:0),p=s,E=u;p<E;p+=1){var w=p===s;!w&&xs(t.doc,g,m)&&(t.split(g,m),g+=m*2),g+=f.child(p).nodeSize}return t}function Wk(t,e,r,n){var i=e.$from,o=e.$to,a=e.depth,s=e,u=!1;if(a>=2&&i.node(a-1).type.compatibleContent(r)&&e.startIndex===0&&i.index(a-1)){var f=t.doc.resolve(e.start-2);s=new qc(f,f,a),e.endIndex<e.parent.childCount&&(e=new qc(i,t.doc.resolve(o.end(a)),a)),u=!0}var d=bOe(s,e,r,n);return d?wOe(t,e,d,u,r):t}function jk(t,e){for(var r=t.resolve(e);r.node().type.name!=="paragraph";)e-=2,r=t.resolve(e);return Gs(r)}function EOe(t,e){var r=e.$from,n=e.$to,i=Gs(r),o=Gs(n);if(i&&o)for(;o;){var a=o.offset,s=o.node,u={task:!s.attrs.task,checked:!1};if(t.setNodeMarkup(a,null,u),a===i.offset)break;o=jk(t.doc,a)}return t}function xOe(t,e,r){var n=e.$from,i=e.$to,o=Gs(n),a=Gs(i);if(o&&a)for(;a;){var s=a.offset,u=a.node,f=a.depth;u.attrs.task&&t.setNodeMarkup(s,null,{task:!1,checked:!1});var d=t.doc.resolve(s);if(d.parent.type!==r){var p=d.before(f-1);t.setNodeMarkup(p,r)}if(s===o.offset)break;a=jk(t.doc,s)}return t}function Gk(t){return function(e,r){var n=e.selection,i=e.tr,o=n.$from,a=n.$to,s=o.blockRange(a);if(s){var u=js(o)?xOe(i,s,t):Wk(i,s,t);return r(u),!0}return!1}}function COe(){return function(t,e){var r=t.selection,n=t.tr,i=t.schema,o=r.$from,a=r.$to,s=o.blockRange(a);if(s){var u=js(o)?EOe(n,s):Wk(n,s,i.nodes.bulletList,{task:!0});return e(u),!0}return!1}}function kOe(t){return function(e,r){var n=e.tr,i=e.selection,o=i.$from,a=i.$to,s=o.blockRange(a,function(E){var w=E.childCount,x=E.firstChild;return!!w&&x.type===t});if(s&&s.startIndex>0){var u=s.parent,f=u.child(s.startIndex-1);if(f.type!==t)return!1;var d=f.lastChild&&f.lastChild.type===u.type,p=d?oe.from(t.create()):null,v=new ge(oe.from(t.create(null,oe.from(u.type.create(null,p)))),d?3:1,0),m=s.start,g=s.end;return n.step(new er(m-(d?3:1),g,m,g,v,1,!0)),r(n),!0}return!1}}function TOe(t,e,r){var n=e.$from,i=e.$to,o=e.end,a=e.depth,s=e.parent,u=i.end(a);return o<u&&(t.step(new er(o-1,u,o,u,new ge(oe.from(r.create(null,s.copy())),1,0),1,!0)),e=new qc(t.doc.resolve(n.pos),t.doc.resolve(u),a)),t.lift(e,Xc(e)),t}function SOe(t,e){for(var r=e.parent,n=e.end,i=e.endIndex-1,o=e.startIndex;i>o;i-=1)n-=r.child(i).nodeSize,t.delete(n-1,n+1);var a=t.doc.resolve(e.start),s=a.nodeAfter,u=e.startIndex===0,f=e.endIndex===r.childCount,d=a.node(-1),p=a.index(-1),v=d.canReplace(p+(u?0:1),p+1,s==null?void 0:s.content.append(f?oe.empty:oe.from(r)));if(s&&v){var m=a.pos,g=m+s.nodeSize;t.step(new er(m-(u?1:0),g+(f?1:0),m+1,g-1,new ge((u?oe.empty:oe.from(r.copy(oe.empty))).append(f?oe.empty:oe.from(r.copy(oe.empty))),u?0:1,f?0:1),u?0:1))}return t}function _Oe(t){return function(e,r){var n=e.tr,i=e.selection,o=i.$from,a=i.$to,s=o.blockRange(a,function(d){var p=d.childCount,v=d.firstChild;return!!p&&v.type===t});if(s){var u=o.node(s.depth-1).type===t,f=u?TOe(n,s,t):SOe(n,s);return r(f),!0}return!1}}function OOe(t){return function(e,r){var n=e.tr,i=e.selection,o=i.$from,a=i.$to;if(o.depth<2||!o.sameParent(a))return!1;var s=o.node(-1);if(s.type!==t)return!1;if(o.parent.content.size===0&&o.node(-1).childCount===o.indexAfter(-1)){if(o.depth===2||o.node(-3).type!==t||o.index(-2)!==o.node(-2).childCount-1)return!1;for(var u=o.index(-1)>0,f=oe.empty,d=o.depth-(u?1:2);d>=o.depth-3;d-=1)f=oe.from(o.node(d).copy(f));return f=f.append(oe.from(t.createAndFill())),n.replace(u?o.before():o.before(-1),o.after(-3),new ge(f,u?3:2,2)),n.setSelection(rt.near(n.doc.resolve(o.pos+(u?3:2)))),r(n),!0}var p=a.pos===o.end()?s.contentMatchAt(0).defaultType:null,v=p&&[null,{type:p}];return n.delete(o.pos,a.pos),xs(n.doc,o.pos,2,v)?(n.split(o.pos,2,v),r(n),!0):!1}}function AOe(){return function(){return function(t,e){var r=t.selection,n=t.schema,i=r.$from,o=r.$to,a=i.blockRange(o);return a&&js(i)?kOe(n.nodes.listItem)(t,e):!1}}}function MOe(){return function(){return function(t,e){var r=t.selection,n=t.schema,i=r.$from,o=r.$to,a=i.blockRange(o);return a&&js(i)?_Oe(n.nodes.listItem)(t,e):!1}}}function Om(){return{indent:AOe(),outdent:MOe()}}var Kk=new Map,yr=function(){function t(e,r,n,i){this.table=e,this.tableRows=r,this.tableStartPos=n,this.rowInfo=i}return t.create=function(e){var r=Qi(e,function(g){var E=g.type;return E.name==="table"});if(r){var n=r.node,i=r.depth,o=r.offset,a=Kk.get(n);if((a==null?void 0:a.tableStartPos)===o+1)return a;var s=[],u=e.start(i),f=n.child(0),d=n.child(1),p=Am(f,u),v=Am(d,u+f.nodeSize);f.forEach(function(g){return s.push(g)}),d.forEach(function(g){return s.push(g)});var m=new t(n,s,u,p.concat(v));return Kk.set(n,m),m}return null},Object.defineProperty(t.prototype,"totalRowCount",{get:function(){return this.rowInfo.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalColumnCount",{get:function(){return this.rowInfo[0].length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tableStartOffset",{get:function(){return this.tableStartPos},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tableEndOffset",{get:function(){return this.tableStartPos+this.table.nodeSize-1},enumerable:!1,configurable:!0}),t.prototype.getCellInfo=function(e,r){return this.rowInfo[e][r]},t.prototype.posAt=function(e,r){for(var n=0,i=this.tableStartPos;;n+=1){var o=i+this.tableRows[n].nodeSize;if(n===e){for(var a=r;a<this.totalColumnCount&&this.rowInfo[n][a].offset<i;)a+=1;return a===this.totalColumnCount?o:this.rowInfo[n][a].offset}i=o}},t.prototype.getNodeAndPos=function(e,r){var n=this.rowInfo[e][r];return{node:this.table.nodeAt(n.offset-this.tableStartOffset),pos:n.offset}},t.prototype.extendedRowspan=function(e,r){return!1},t.prototype.extendedColspan=function(e,r){return!1},t.prototype.getRowspanCount=function(e,r){return 0},t.prototype.getColspanCount=function(e,r){return 0},t.prototype.decreaseColspanCount=function(e,r){return 0},t.prototype.decreaseRowspanCount=function(e,r){return 0},t.prototype.getColspanStartInfo=function(e,r){return null},t.prototype.getRowspanStartInfo=function(e,r){return null},t.prototype.getCellStartOffset=function(e,r){var n=this.rowInfo[e][r].offset;return this.extendedRowspan(e,r)?this.posAt(e,r):n},t.prototype.getCellEndOffset=function(e,r){var n=this.rowInfo[e][r],i=n.offset,o=n.nodeSize;return this.extendedRowspan(e,r)?this.posAt(e,r):i+o},t.prototype.getCellIndex=function(e){for(var r=0;r<this.totalRowCount;r+=1)for(var n=this.rowInfo[r],i=0;i<this.totalColumnCount;i+=1)if(n[i].offset+1>e.pos)return[r,i];return[0,0]},t.prototype.getRectOffsets=function(e,r){var n,i,o;r===void 0&&(r=e),e.pos>r.pos&&(n=[r,e],e=n[0],r=n[1]);var a=this.getCellIndex(e),s=a[0],u=a[1],f=this.getCellIndex(r),d=f[0],p=f[1];return i=Ox(s,d),s=i[0],d=i[1],o=Ox(u,p),u=o[0],p=o[1],this.getSpannedOffsets({startRowIdx:s,startColIdx:u,endRowIdx:d,endColIdx:p})},t.prototype.getSpannedOffsets=function(e){return e},t}(),Am=function(t,e){var r=[];return t.forEach(function(n,i){var o={rowspanMap:{},colspanMap:{},length:0};n.forEach(function(a,s){for(var u=a.nodeSize,f=0;o[f];)f+=1;o[f]={offset:e+i+s+2,nodeSize:u},o.length+=1}),r.push(o)}),r};function NOe(t,e){return Tv(yr.prototype,t),Am=e,yr}function LOe(t,e,r){for(var n=r.startRowIdx,i=r.startColIdx,o=r.endRowIdx,a=r.endColIdx,s=[],u=n;u<=o;u+=1)for(var f=i;f<=a;f+=1){var d=e.getCellInfo(u,f),p=d.offset,v=d.nodeSize;s.push(new I1(t.resolve(p+1),t.resolve(p+v-1)))}return s}function DOe(t,e){var r=[];return t.childCount&&r.push(t),e.childCount&&r.push(e),oe.from(r)}var Mm=function(t){be(e,t);function e(r,n){n===void 0&&(n=r);var i=this,o=r.node(0),a=yr.create(r),s=a.getRectOffsets(r,n),u=LOe(o,a,s);return i=t.call(this,u[0].$from,u[0].$to,u)||this,i.startCell=r,i.endCell=n,i.offsetMap=a,i.isCellSelection=!0,i.visible=!1,i}return e.prototype.map=function(r,n){var i=this.startCell.pos,o=this.endCell.pos,a=r.resolve(n.map(i)),s=r.resolve(n.map(o)),u=yr.create(a);if(this.offsetMap.totalColumnCount>u.totalColumnCount||this.offsetMap.totalRowCount>u.totalRowCount){var f={tableBody:1,tableRow:2,tableCell:3,paragraph:4},d=f[s.parent.type.name],p=s.end(s.depth-d),v=Math.min(p-4,s.pos);return it.create(r,v)}return new e(a,s)},e.prototype.eq=function(r){return r instanceof e&&r.startCell.pos===this.startCell.pos&&r.endCell.pos===this.endCell.pos},e.prototype.content=function(){for(var r=this.startCell.node(-2),n=this.startCell.start(-2),i=r.child(1).firstChild,o=r.child(0).type.create(),a=r.child(1).type.create(),s=yr.create(this.startCell),u=s.getRectOffsets(this.startCell,this.endCell),f=u.startRowIdx,d=u.startColIdx,p=u.endRowIdx,v=u.endColIdx,m=!1,g=f;g<=p;g+=1){for(var E=[],w=d;w<=v;w+=1){var x=s.getCellInfo(g,w).offset,k=r.nodeAt(x-n);k&&(m=k.type.name==="tableHeadCell",s.extendedRowspan(g,w)||s.extendedColspan(g,w)?E.push(k.type.create({extended:!0})):E.push(k.copy(k.content)))}var _=i.copy(oe.from(E)),O=m?o:a;O.content=O.content.append(oe.from(_))}return new ge(DOe(o,a),1,1)},e.prototype.toJSON=function(){return JSON.stringify(this)},e}(rt);function IOe(t,e,r){for(var n=e.nodes,i=n.tableRow,o=n.tableHeadCell,a=n.paragraph,s=[],u=0;u<t;u+=1){var f=r&&r[u],d=a.create(null,f?e.text(f):[]);s.push(o.create(null,d))}return[i.create(null,s)]}function Yk(t,e,r,n){for(var i=r.nodes,o=i.tableRow,a=i.tableBodyCell,s=i.paragraph,u=[],f=0;f<t;f+=1){for(var d=[],p=0;p<e;p+=1){var v=n&&n[f*e+p],m=s.create(null,v?r.text(v):[]);d.push(a.create(null,m))}u.push(o.create(null,d))}return u}function Qf(t,e,r,n){n===void 0&&(n=null);for(var i=r.nodes,o=i.tableHeadCell,a=i.tableBodyCell,s=i.paragraph,u=e===0?o:a,f=[],d=0;d<t;d+=1)f.push(u.create(n,s.create()));return f}function Xk(t,e){for(;t&&t!==e;){if(t.nodeName==="TD"||t.nodeName==="TH")return t;t=t.parentNode}return null}function Jk(t){return Qi(t,function(e){var r=e.type;return r.name==="tableHeadCell"||r.name==="tableBodyCell"})}function Oi(t){if(t instanceof it){var e=t.$anchor,r=Jk(e);if(r){var n=e.node(0).resolve(e.before(r.depth));return{anchor:n,head:n}}}var i=t,o=i.startCell,a=i.endCell;return{anchor:o,head:a}}function Zk(t){var e;if(t.size){var r=t.content,n=t.openStart,i=t.openEnd;if(r.childCount!==1)return null;for(;r.childCount===1&&(n>0&&i>0||((e=r.firstChild)===null||e===void 0?void 0:e.type.name)==="table");)n-=1,i-=1,r=r.firstChild.content;if(r.firstChild.type.name==="tableHead"||r.firstChild.type.name==="tableBody")return r}return null}function Ks(t){var e=t.startRowIdx,r=t.startColIdx,n=t.endRowIdx,i=t.endColIdx,o=n-e+1,a=i-r+1;return{rowCount:o,columnCount:a}}function ROe(t,e){return q(q({},t.attrs),e)}var Vo=new eu("cellSelection"),POe=2,BOe=function(){function t(e){this.view=e,this.handlers={mousedown:this.handleMousedown.bind(this),mousemove:this.handleMousemove.bind(this),mouseup:this.handleMouseup.bind(this)},this.startCellPos=null,this.init()}return t.prototype.init=function(){this.view.dom.addEventListener("mousedown",this.handlers.mousedown)},t.prototype.handleMousedown=function(e){var r=Xk(e.target,this.view.dom);if(e.button===POe){e.preventDefault();return}if(r){var n=this.getCellPos(e);n&&(this.startCellPos=n),this.bindEvent()}},t.prototype.handleMousemove=function(e){var r=Vo.getState(this.view.state),n=this.getCellPos(e),i=this.startCellPos,o;r?o=this.view.state.doc.resolve(r):i!==n&&(o=i),o&&i&&n&&this.setCellSelection(i,n)},t.prototype.handleMouseup=function(){this.startCellPos=null,this.unbindEvent(),Vo.getState(this.view.state)!==null&&this.view.dispatch(this.view.state.tr.setMeta(Vo,-1))},t.prototype.bindEvent=function(){var e=this.view.dom;e.addEventListener("mousemove",this.handlers.mousemove),e.addEventListener("mouseup",this.handlers.mouseup)},t.prototype.unbindEvent=function(){var e=this.view.dom;e.removeEventListener("mousemove",this.handlers.mousemove),e.removeEventListener("mouseup",this.handlers.mouseup)},t.prototype.getCellPos=function(e){var r=e.clientX,n=e.clientY,i=this.view.posAtCoords({left:r,top:n});if(i){var o=this.view.state.doc,a=o.resolve(i.pos),s=Jk(a);if(s){var u=a.before(s.depth);return o.resolve(u)}}return null},t.prototype.setCellSelection=function(e,r){var n=this.view.state,i=n.selection,o=n.tr,a=Vo.getState(this.view.state)===null,s=new Mm(e,r);if(a||!i.eq(s)){var u=o.setSelection(s);a&&u.setMeta(Vo,r.pos),this.view.dispatch(u)}},t.prototype.destroy=function(){this.view.dom.removeEventListener("mousedown",this.handlers.mousedown)},t}(),$Oe=_e("cell-selected");function FOe(t){var e=t.selection,r=t.doc;if(e instanceof Mm){var n=[],i=e.ranges;return i.forEach(function(o){var a=o.$from,s=o.$to;n.push(on.node(a.pos-1,s.pos+1,{class:$Oe}))}),Rt.create(r,n)}return null}function HOe(){return new rn({key:Vo,state:{init:function(){return null},apply:function(t,e){var r=t.getMeta(Vo);if(r)return r===-1?null:r;if(hf(e)||!t.docChanged)return e;var n=t.mapping.mapResult(e),i=n.deleted,o=n.pos;return i?null:o}},props:{decorations:FOe,createSelectionBetween:function(t){var e=t.state;return hf(Vo.getState(e))?null:e.selection}},view:function(t){return new BOe(t)}})}var Qk=function(){function t(){this.keys=[],this.values=[]}return t.prototype.getKeyIndex=function(e){return Aa(e,this.keys)},t.prototype.get=function(e){return this.values[this.getKeyIndex(e)]},t.prototype.set=function(e,r){var n=this.getKeyIndex(e);return n>-1?this.values[n]=r:(this.keys.push(e),this.values.push(r)),this},t.prototype.has=function(e){return this.getKeyIndex(e)>-1},t.prototype.delete=function(e){var r=this.getKeyIndex(e);return r>-1?(this.keys.splice(r,1),this.values.splice(r,1),!0):!1},t.prototype.forEach=function(e,r){var n=this;r===void 0&&(r=this),this.values.forEach(function(i,o){i&&n.keys[o]&&e.call(r,i,n.keys[o],n)})},t.prototype.clear=function(){this.keys=[],this.values=[]},t}(),Nm="en-US",UOe=function(){function t(){this.code=Nm,this.langs=new Qk}return t.prototype.setCode=function(e){this.code=e||Nm},t.prototype.setLanguage=function(e,r){var n=this;e=[].concat(e),e.forEach(function(i){if(!n.langs.has(i))n.langs.set(i,r);else{var o=n.langs.get(i);n.langs.set(i,yv(o,r))}})},t.prototype.get=function(e,r){r||(r=this.code);var n=this.langs.get(r);n||(n=this.langs.get(Nm));var i=n[e];if(!i)throw new Error('There is no text key "'+e+'" in '+r);return i},t}(),Ve=new UOe,zOe=[[{action:"Add row to up",command:"addRowToUp",disableInThead:!0,className:"add-row-up"},{action:"Add row to down",command:"addRowToDown",disableInThead:!0,className:"add-row-down"},{action:"Remove row",command:"removeRow",disableInThead:!0,className:"remove-row"}],[{action:"Add column to left",command:"addColumnToLeft",className:"add-column-left"},{action:"Add column to right",command:"addColumnToRight",className:"add-column-right"},{action:"Remove column",command:"removeColumn",className:"remove-column"}],[{action:"Align column to left",command:"alignColumn",payload:{align:"left"},className:"align-column-left"},{action:"Align column to center",command:"alignColumn",payload:{align:"center"},className:"align-column-center"},{action:"Align column to right",command:"alignColumn",payload:{align:"right"},className:"align-column-right"}],[{action:"Remove table",command:"removeTable",className:"remove-table"}]];function qOe(t,e){return zOe.map(function(r){return r.map(function(n){var i=n.action,o=n.command,a=n.payload,s=n.disableInThead,u=n.className;return{label:Ve.get(i),onClick:function(){t.emit("command",o,a)},disabled:e&&!!s,className:u}})}).concat()}function VOe(t){return new rn({props:{handleDOMEvents:{contextmenu:function(e,r){var n=Xk(r.target,e.dom);if(n){r.preventDefault();var i=r,o=i.clientX,a=i.clientY,s=e.dom.parentNode.getBoundingClientRect(),u=s.left,f=s.top,d=n.nodeName==="TH";return t.emit("contextmenu",{pos:{left:o-u+10+"px",top:a-f+30+"px"},menuGroups:qOe(t,d),tableCell:n}),!0}return!1}}}})}function WOe(){return new rn({props:{handleDOMEvents:{mousedown:function(t,e){var r=e,n=r.clientX,i=r.clientY,o=t.posAtCoords({left:n,top:i});if(o){var a=t.state,s=a.doc,u=a.tr,f=s.resolve(o.pos),d=Gs(f),p=e.target,v=getComputedStyle(p,":before"),m=e,g=m.offsetX,E=m.offsetY;if(!d||!Mv(v,g,E))return!1;e.preventDefault();var w=f.before(d.depth),x=d.node.attrs;return u.setNodeMarkup(w,null,q(q({},x),{checked:!x.checked})),t.dispatch(u),!0}return!1}}}})}var jOe=["image","link","customBlock","frontMatter"],GOe=["strong","strike","emph","code"],eT=["bulletList","orderedList","taskList"];function KOe(t,e){var r=t.type.name;return r==="listItem"?t.attrs.task?"taskList":e.type.name:r.indexOf("table")!==-1?"table":r}function YOe(t,e){e[t]={active:!0},eT.filter(function(r){return r!==t}).forEach(function(r){e[r]&&delete e[r]})}function XOe(t,e,r,n){GOe.forEach(function(i){var o=r.marks[i],a=t.marksAcross(e)||[],s=!!o.isInSet(a);s&&(n[i]={active:!0})})}function JOe(t,e,r){var n=t.$from,i=t.$to,o=t.from,a=t.to,s={indent:{active:!1,disabled:!0},outdent:{active:!1,disabled:!0}};return e.nodesBetween(o,a,function(u,f,d){var p=KOe(u,d);vr(jOe,p)||(vr(eT,p)?(YOe(p,s),s.indent.disabled=!1,s.outdent.disabled=!1):p==="paragraph"||p==="text"?XOe(n,i,r,s):s[p]={active:!0})}),s}function ZOe(t){return new rn({view:function(){return{update:function(e){var r=e.state,n=r.selection,i=r.doc,o=r.schema;t.emit("changeToolbarState",{toolbarState:JOe(n,i,o)})}}}})}var QOe=function(){function t(e,r,n,i){var o=this;this.openEditor=function(){if(o.innerEditorView)throw new Error("The editor is already opened.");o.dom.draggable=!1,o.wrapper.style.display="none",o.innerViewContainer.style.display="block",o.innerEditorView=new lf(o.innerViewContainer,{state:Ea.create({doc:o.node,plugins:[cu({"Mod-z":function(){return du(o.innerEditorView.state,o.innerEditorView.dispatch)},"Shift-Mod-z":function(){return mv(o.innerEditorView.state,o.innerEditorView.dispatch)},Tab:function(a,s){return s(a.tr.insertText(" ")),!0},Enter:ox,Escape:function(){return o.cancelEditing(),!0},"Ctrl-Enter":function(){return o.saveAndFinishEditing(),!0}}),gx()]}),dispatchTransaction:function(a){return o.dispatchInner(a)},handleDOMEvents:{mousedown:function(){return o.editorView.hasFocus()&&o.innerEditorView.focus(),!0},blur:function(){return o.saveAndFinishEditing(),!0}}}),o.innerEditorView.focus()},this.node=e,this.editorView=r,this.getPos=n,this.toDOMAdaptor=i,this.innerEditorView=null,this.canceled=!1,this.dom=document.createElement("div"),this.dom.className=_e("custom-block"),this.wrapper=document.createElement("div"),this.wrapper.className=_e("custom-block-view"),this.createInnerViewContainer(),this.renderCustomBlock(),this.dom.appendChild(this.innerViewContainer),this.dom.appendChild(this.wrapper)}return t.prototype.renderToolArea=function(){var e=this,r=document.createElement("div"),n=document.createElement("span"),i=document.createElement("button");r.className="tool",n.textContent=this.node.attrs.info,n.className="info",i.type="button",i.addEventListener("click",function(){return e.openEditor()}),r.appendChild(n),r.appendChild(i),this.wrapper.appendChild(r)},t.prototype.renderCustomBlock=function(){var e=this.toDOMAdaptor.getToDOMNode(this.node.attrs.info);if(e){for(var r=e(this.node);this.wrapper.hasChildNodes();)this.wrapper.removeChild(this.wrapper.lastChild);r&&this.wrapper.appendChild(r),this.renderToolArea()}},t.prototype.createInnerViewContainer=function(){this.innerViewContainer=document.createElement("div"),this.innerViewContainer.className=_e("custom-block-editor"),this.innerViewContainer.style.display="none"},t.prototype.closeEditor=function(){this.innerEditorView&&(this.innerEditorView.destroy(),this.innerEditorView=null,this.innerViewContainer.style.display="none"),this.wrapper.style.display="block"},t.prototype.saveAndFinishEditing=function(){var e=this.editorView.state.selection.to,r=this.editorView.state;this.editorView.dispatch(r.tr.setSelection(At(r.tr,e))),this.editorView.focus(),this.renderCustomBlock(),this.closeEditor()},t.prototype.cancelEditing=function(){var e=YU(this.innerEditorView.state);for(this.canceled=!0;e--;)du(this.innerEditorView.state,this.innerEditorView.dispatch),du(this.editorView.state,this.editorView.dispatch);this.canceled=!1;var r=this.editorView.state.selection.to,n=this.editorView.state;this.editorView.dispatch(n.tr.setSelection(it.create(n.doc,r))),this.editorView.focus(),this.closeEditor()},t.prototype.dispatchInner=function(e){var r=this.innerEditorView.state.applyTransaction(e),n=r.state,i=r.transactions;if(this.innerEditorView.updateState(n),!this.canceled&&$n(this.getPos)){for(var o=this.editorView.state.tr,a=tn.offset(this.getPos()+1),s=0;s<i.length;s+=1)for(var u=i[s].steps,f=0;f<u.length;f+=1)o.step(u[f].map(a));o.docChanged&&this.editorView.dispatch(o)}},t.prototype.update=function(e){return e.sameMarkup(this.node)?(this.node=e,this.innerEditorView||this.renderCustomBlock(),!0):!1},t.prototype.stopEvent=function(e){return!!this.innerEditorView&&!!e.target&&this.innerEditorView.dom.contains(e.target)},t.prototype.ignoreMutation=function(){return!0},t.prototype.destroy=function(){this.dom.removeEventListener("dblclick",this.openEditor),this.closeEditor()},t}(),tT="image-link",eAe=function(){function t(e,r,n,i){var o=this,a;this.handleMousedown=function(s){s.preventDefault();var u=s.target,f=s.offsetX,d=s.offsetY;if(o.imageLink&&$n(o.getPos)&&Bx(u,tT)){var p=getComputedStyle(u,":before");if(s.stopPropagation(),Mv(p,f,d)){var v=o.view.state.tr,m=o.getPos();v.setSelection(At(v,m,m+1)),o.view.dispatch(v),o.eventEmitter.emit("openPopup","link",o.imageLink.attrs)}}},this.node=e,this.view=r,this.getPos=n,this.eventEmitter=i,this.imageLink=(a=e.marks.filter(function(s){var u=s.type;return u.name==="link"})[0])!==null&&a!==void 0?a:null,this.dom=this.createElement(),this.bindEvent()}return t.prototype.createElement=function(){var e=this.createImageElement(this.node);if(this.imageLink){var r=document.createElement("span");return r.className=tT,r.appendChild(e),r}return e},t.prototype.createImageElement=function(e){var r=document.createElement("img"),n=e.attrs,i=n.imageUrl,o=n.altText,a=Vt(e.attrs);return r.src=i,o&&(r.alt=o),Dv(a,r),r},t.prototype.bindEvent=function(){this.imageLink&&this.dom.addEventListener("mousedown",this.handleMousedown)},t.prototype.stopEvent=function(){return!0},t.prototype.destroy=function(){this.imageLink&&this.dom.removeEventListener("mousedown",this.handleMousedown)},t}(),tAe="toastui-editor-ww-code-block",rAe="toastui-editor-ww-code-block-language",nAe=function(){function t(e,r,n,i){var o=this;this.contentDOM=null,this.input=null,this.timer=null,this.handleMousedown=function(a){var s=a.target,u=getComputedStyle(s,":after");if(u.backgroundImage!=="none"&&$n(o.getPos)){var f=o.view.coordsAtPos(o.getPos()),d=f.top,p=f.right;o.createLanguageEditor({top:d,right:p})}},this.handleKeydown=function(a){a.key==="Enter"&&o.input&&(a.preventDefault(),o.changeLanguage())},this.node=e,this.view=r,this.getPos=n,this.eventEmitter=i,this.createElement(),this.bindDOMEvent(),this.bindEvent()}return t.prototype.createElement=function(){var e=this.node.attrs.language,r=document.createElement("div");r.setAttribute("data-language",e||"text"),r.className=tAe;var n=this.createCodeBlockElement(),i=n.firstChild;r.appendChild(n),this.dom=r,this.contentDOM=i},t.prototype.createCodeBlockElement=function(){var e=document.createElement("pre"),r=document.createElement("code"),n=this.node.attrs.language,i=Vt(this.node.attrs);return n&&r.setAttribute("data-language",n),Dv(i,e),e.appendChild(r),e},t.prototype.createLanguageEditor=function(e){var r=this,n=e.top,i=e.right,o=document.createElement("span");o.className=rAe;var a=document.createElement("input");a.type="text",a.value=this.node.attrs.language,o.appendChild(a),this.view.dom.parentElement.appendChild(o);var s=o.clientWidth;Ci(o,{top:n+10+"px",left:i-s-10+"px",width:s+"px"}),this.input=a,this.input.addEventListener("blur",function(){return r.changeLanguage()}),this.input.addEventListener("keydown",this.handleKeydown),this.clearTimer(),this.timer=setTimeout(function(){r.input.focus()})},t.prototype.bindDOMEvent=function(){this.dom&&this.dom.addEventListener("click",this.handleMousedown)},t.prototype.bindEvent=function(){var e=this;this.eventEmitter.listen("scroll",function(){e.input&&e.reset()})},t.prototype.changeLanguage=function(){if(this.input&&$n(this.getPos)){var e=this.input.value;this.reset();var r=this.getPos(),n=this.view.state.tr;n.setNodeMarkup(r,null,{language:e}),this.view.dispatch(n)}},t.prototype.reset=function(){var e;if(!((e=this.input)===null||e===void 0)&&e.parentElement){var r=this.input.parentElement;this.input=null,La(r)}},t.prototype.clearTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},t.prototype.stopEvent=function(){return!0},t.prototype.update=function(e){return e.sameMarkup(this.node)?(this.node=e,!0):!1},t.prototype.destroy=function(){this.reset(),this.clearTimer(),this.dom&&this.dom.removeEventListener("click",this.handleMousedown)},t}(),iAe=/MsoListParagraph/,rT=/style=(.|\n)*mso-/,nT=/mso-list:(.*)/,oAe=/O:P/,aAe=/^(n|u|l)/,sAe="p.MsoListParagraph";function lAe(t){return rT.test(t)}function uAe(t){for(var e=[],r=document.createTreeWalker(t,1,null,!1);r.nextNode();){var n=r.currentNode;if(kf(n)){var i=n,o=i.outerHTML,a=i.textContent,s=rT.test(o),u=nT.test(o);s&&!u&&a?e.push([n,!0]):(oAe.test(n.nodeName)||s&&!a||u)&&e.push([n,!1])}}return e.forEach(function(f){var d=f[0],p=f[1];p?Oz(d):La(d)}),t.innerHTML.trim()}function cAe(t,e){var r=t.getAttribute("style");if(r){var n=r.match(nT),i=n[1],o=i.trim().split(" "),a=o[1],s=parseInt(a.replace("level",""),10),u=aAe.test(t.textContent||"");return{id:e,level:s,prev:null,parent:null,children:[],unordered:u,contents:uAe(t)}}return null}function fAe(t,e){if(e.level<t.level)e.children.push(t),t.parent=e;else{for(;e&&e.level!==t.level;)e=e.parent;e&&(t.prev=e,t.parent=e.parent,t.parent&&t.parent.children.push(t))}}function dAe(t){var e=[];return t.forEach(function(r,n){var i=e[n-1],o=cAe(r,n);o&&(i&&fAe(o,i),e.push(o))}),e}function iT(t){var e=t[0].unordered?"ul":"ol",r=document.createElement(e);return t.forEach(function(n){var i=n.children,o=n.contents,a=document.createElement("li");a.innerHTML=o,r.appendChild(a),i.length&&r.appendChild(iT(i))}),r}function pAe(t){var e=dAe(t),r=e.filter(function(n){var i=n.parent;return!i});return iT(r)}function hAe(t){for(;t&&!kf(t);)t=t.nextSibling;return t?!iAe.test(t.className):!0}function vAe(t){var e=document.createElement("div");e.innerHTML=t;var r=[],n=Tz(e,sAe);n.forEach(function(o){var a=hAe(o.nextSibling);if(r.push(o),a){var s=pAe(r),u=o.nextSibling;u?_z(s,u):Sz(e,s),r=[]}La(o)});var i=n.length?"<p></p>":"";return""+i+e.innerHTML}var oT="<!--StartFragment-->",mAe="<!--EndFragment-->";function gAe(t){var e=t.indexOf(oT),r=t.lastIndexOf(mAe);return e>-1&&r>-1&&(t=t.slice(e+oT.length,r)),t.replace(/<br[^>]*>/g,zx)}function yAe(t){return/<\/td>((?!<\/tr>)[\s\S])*$/i.test(t)&&(t="<tr>"+t+"</tr>"),/<\/tr>((?!<\/table>)[\s\S])*$/i.test(t)&&(t="<table>"+t+"</table>"),t}function bAe(t){return t=gAe(t),t=yAe(t),lAe(t)&&(t=vAe(t)),t}function wAe(t){var e=t.reduce(function(r,n){return r.childCount>n.childCount?r:n});return e.childCount}function aT(t,e,r){for(var n=[],i=t.childCount,o=0;o<i;o+=1)if(!t.child(o).attrs.extended){var a=o<i?r.create(t.child(o).attrs,t.child(o).content):r.createAndFill();n.push(a)}return n}function sT(t,e,r){var n=r.nodes,i=n.tableRow,o=n.tableHeadCell,a=aT(t,e,o);return i.create(null,a)}function lT(t,e,r){var n=r.nodes,i=n.tableRow,o=n.tableBodyCell,a=aT(t,e,o);return i.create(null,a)}function EAe(t,e){for(var r=e.nodes,n=r.tableRow,i=r.tableBodyCell,o=[],a=0;a<t;a+=1){var s=i.createAndFill();o.push(s)}return n.create({dummyRowForPasting:!0},o)}function uT(t){var e=[],r=[];if(t.firstChild.type.name==="tableHead"){var n=t.firstChild;n.forEach(function(o){return e.push(o)})}if(t.lastChild.type.name==="tableBody"){var i=t.lastChild;i.forEach(function(o){return r.push(o)})}return an(an([],e),r)}function xAe(t,e,r){var n=sT(t,e,r);return r.nodes.tableHead.create(null,n)}function cT(t,e,r){var n=t.map(function(o){return lT(o,e,r)});if(!t.length){var i=EAe(e,r);n.push(i)}return r.nodes.tableBody.create(null,n)}function CAe(t,e,r,n){var i=wAe(t);if(r&&n)return e.nodes.table.create(null,[cT(t,i,e)]);var o=t[0],a=t.slice(1),s=[xAe(o,i,e)];return a.length&&s.push(cT(a,i,e)),e.nodes.table.create(null,s)}function kAe(t,e,r){var n=[],i=t.content,o=t.openStart,a=t.openEnd;return i.forEach(function(s){if(s.type.name==="table"){var u=Zk(new ge(oe.from(s),0,0));if(u){var f=uT(u),d=u.firstChild.type.name==="tableBody",p=CAe(f,e,d,r);n.push(p)}}else n.push(s)}),new ge(oe.from(n),o,a)}var TAe=4,SAe=2;function ed(t){return t*TAe}function _Ae(t,e,r){var n=[],i=uT(t),o=i[0].childCount,a=i.length,s=e.startRowIdx===0,u=i.slice(0,a);if(s){var f=u.shift();if(f){var d=sT(f,o,r).content;n.push(d)}}return u.forEach(function(p){if(!p.attrs.dummyRowForPasting){var v=lT(p,o,r).content;n.push(v)}}),n}function OAe(t,e,r){for(var n=e.startRowIdx,i=e.startColIdx,o=r.length,a=0,s=function(m){var g=r[m].childCount;r[m].forEach(function(E){var w=E.attrs,x=w.colspan;x>1&&(g+=x-1)}),a=Math.max(a,g)},u=0;u<o;u+=1)s(u);var f=n+o-1,d=i+a-1,p=Math.max(f+1-t.totalRowCount,0),v=Math.max(d+1-t.totalColumnCount,0);return{startRowIdx:n,startColIdx:i,endRowIdx:f,endColIdx:d,addedRowCount:p,addedColumnCount:v}}function AAe(t,e){for(var r=t.startRowIdx,n=t.startColIdx,i=t.endRowIdx,o=t.endColIdx,a=t.addedRowCount,s=t.addedColumnCount,u=r;u<=i-a;u+=1)e.push({rowIdx:u,startColIdx:n,endColIdx:o-s})}function MAe(t,e,r,n,i){for(var o=n.startRowIdx,a=n.startColIdx,s=n.endRowIdx,u=n.endColIdx,f=n.addedRowCount,d=n.addedColumnCount,p=r.totalRowCount,v=0,m=0;m<p;m+=1){var g=r.getCellInfo(m,u-d),E=g.offset,w=g.nodeSize,x=t.mapping.map(E+w),k=Qf(d,m,e);if(t.insert(x,k),m>=o&&m<=s-f){var _=r.getCellInfo(m,u-d),O=t.mapping.map(_.offset),N=x+ed(d);i[v]={rowIdx:m,startColIdx:a,endColIdx:u,dummyOffsets:[O,N]},v+=1}}}function NAe(t,e,r,n,i){var o=n.addedRowCount,a=n.addedColumnCount,s=n.startColIdx,u=n.endColIdx,f=t.mapping.maps.length,d=r.tableEndOffset-2,p=Yk(o,r.totalColumnCount+a,e),v=d;t.insert(t.mapping.slice(f).map(v),p);for(var m=0;m<o;m+=1){var g=v+ed(s)+1,E=v+ed(u+1)+1,w=v+ed(r.totalColumnCount+a)+SAe;i.push({rowIdx:m+r.totalRowCount,startColIdx:s,endColIdx:u,dummyOffsets:[g,E]}),v=w}}function LAe(t,e,r,n){var i=t.mapping.maps.length;r.forEach(function(o,a){var s=o.rowIdx,u=o.startColIdx,f=o.endColIdx,d=o.dummyOffsets,p=t.mapping.slice(i),v=new ge(e[a],0,0),m=d?d[0]:n.getCellStartOffset(s,u),g=d?d[1]:n.getCellEndOffset(s,f);t.replace(p.map(m),p.map(g),v)})}function DAe(t,e){var r=t.state,n=r.selection,i=r.schema,o=r.tr,a=Oi(n),s=a.anchor,u=a.head;if(s&&u){var f=Zk(e);if(!f)return!1;var d=yr.create(s),p=d.getRectOffsets(s,u),v=_Ae(f,p,i),m=OAe(d,p,v),g=[];return RAe(d,m)&&(AAe(m,g),m.addedColumnCount&&MAe(o,i,d,m,g),m.addedRowCount&&NAe(o,i,d,m,g),LAe(o,v,g,d),t.dispatch(o),IAe(t,g,d.getCellInfo(0,0).offset)),!0}return!1}function IAe(t,e,r){var n=t.state,i=n.tr,o=n.doc,a=yr.create(o.resolve(r)),s=e[0],u=s.rowIdx,f=s.startColIdx,d=Nr(e),p=d.rowIdx,v=d.endColIdx,m=a.getCellInfo(u,f).offset,g=a.getCellInfo(p,v).offset;t.dispatch(i.setSelection(new Mm(o.resolve(m),o.resolve(g))))}function RAe(t,e){var r=t.getSpannedOffsets(e),n=Ks(r),i=n.rowCount,o=n.columnCount,a=Ks(e),s=a.rowCount,u=a.columnCount;return i===s&&o===u}var PAe=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"doc"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"block+"}},enumerable:!1,configurable:!0}),e}(Tt),BAe=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"paragraph"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"inline*",group:"block",attrs:q({},ir()),parseDOM:[{tag:"p"}],toDOM:function(r){var n=r.attrs;return["p",Vt(n),0]}}},enumerable:!1,configurable:!0}),e}(Tt),$Ae=/\s{1,4}$/,FAe=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"text"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{group:"inline"}},enumerable:!1,configurable:!0}),e.prototype.addSpaces=function(){return function(r,n){var i=r.selection,o=r.tr,a=i.$from,s=i.$to,u=a.blockRange(s);return u&&!js(a)&&!Jf(a)?(n(o.insertText(" ",a.pos,s.pos)),!0):!1}},e.prototype.removeSpaces=function(){return function(r,n){var i=r.selection,o=r.tr,a=i.$from,s=i.$to,u=i.from,f=a.blockRange(s);if(f&&!js(a)&&!Jf(a)){var d=a.nodeBefore;if(d&&d.isText){var p=d.text,v=p.replace($Ae,""),m=p.length-v.length;return n(o.delete(u-m,u)),!0}}return!1}},e.prototype.keymaps=function(){return{Tab:this.addSpaces(),"Shift-Tab":this.removeSpaces()}},e}(Tt),HAe=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"heading"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"levels",{get:function(){return[1,2,3,4,5,6]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){var r=this.levels.map(function(n){return{tag:"h"+n,getAttrs:function(i){var o=i.getAttribute("data-raw-html");return q({level:n},o&&{rawHTML:o})}}});return{attrs:q({level:{default:1},headingType:{default:"atx"},rawHTML:{default:null}},ir()),content:"inline*",group:"block",defining:!0,parseDOM:r,toDOM:function(n){var i=n.attrs;return["h"+i.level,Vt(i),0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(r){return function(n,i){var o=n.schema.nodes[r.level?"heading":"paragraph"];return dv(o,r)(n,i)}}},e}(Tt),UAe=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"codeBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"text*",group:"block",attrs:q({language:{default:null},rawHTML:{default:null}},ir()),code:!0,defining:!0,marks:"",parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:function(r){var n=r.getAttribute("data-raw-html"),i=r.firstElementChild;return q({language:(i==null?void 0:i.getAttribute("data-language"))||null},n&&{rawHTML:n})}}],toDOM:function(r){var n=r.attrs;return[n.rawHTML||"pre",["code",q({"data-language":n.language},Vt(n)),0]]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(r,n){return dv(r.schema.nodes.codeBlock)(r,n)}}},e.prototype.moveCursor=function(r){var n=this;return function(i,o){var a=i.tr,s=i.doc,u=i.schema,f=i.selection.$from,d=n.context.view;if(d.endOfTextblock(r)&&f.node().type.name==="codeBlock"){var p=f.parent.textContent.split(`
|
|
161
|
+
`),v=r==="up"?f.start():f.end(),m=r==="up"?[v,p[0].length+v]:[v-Nr(p).length,v],g=s.resolve(r==="up"?f.before():f.after()),E=r==="up"?g.nodeBefore:g.nodeAfter;if(G4(f.pos,m[0],m[1])&&!E){var w=Sv(a,g,u);if(w)return o(w),!0}}return!1}},e.prototype.keymaps=function(){var r=this.commands()();return{"Shift-Mod-p":r,"Shift-Mod-P":r,ArrowUp:this.moveCursor("up"),ArrowDown:this.moveCursor("down")}},e}(Tt),zAe=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"bulletList"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"listItem+",group:"block",attrs:q({rawHTML:{default:null}},ir()),parseDOM:[Zf("ul")],toDOM:function(r){var n=r.attrs;return["ul",Vt(n),0]}}},enumerable:!1,configurable:!0}),e.prototype.changeList=function(){return function(r,n){return Gk(r.schema.nodes.bulletList)(r,n)}},e.prototype.commands=function(){return{bulletList:this.changeList,taskList:COe}},e.prototype.keymaps=function(){var r=this.changeList(),n=Om(),i=n.indent,o=n.outdent;return{"Mod-u":r,"Mod-U":r,Tab:i(),"Shift-Tab":o()}},e}(Tt),qAe=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"orderedList"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"listItem+",group:"block",attrs:q({order:{default:1},rawHTML:{default:null}},ir()),parseDOM:[{tag:"ol",getAttrs:function(r){var n=r.getAttribute("start"),i=r.getAttribute("data-raw-html");return q({order:r.hasAttribute("start")?Number(n):1},i&&{rawHTML:i})}}],toDOM:function(r){var n=r.attrs;return[n.rawHTML||"ol",q({start:n.order===1?null:n.order},Vt(n)),0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(r,n){return Gk(r.schema.nodes.orderedList)(r,n)}}},e.prototype.keymaps=function(){var r=this.commands()(),n=Om(),i=n.indent,o=n.outdent;return{"Mod-o":r,"Mod-O":r,Tab:i(),"Shift-Tab":o()}},e}(Tt),VAe=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"listItem"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"paragraph block*",selectable:!1,attrs:{task:{default:!1},checked:{default:!1},rawHTML:{default:null}},defining:!0,parseDOM:[{tag:"li",getAttrs:function(r){var n=r.getAttribute("data-raw-html");return q({task:r.hasAttribute("data-task"),checked:r.hasAttribute("data-task-checked")},n&&{rawHTML:n})}}],toDOM:function(r){var n=r.attrs,i=n.task,o=n.checked;if(!i)return[n.rawHTML||"li",0];var a=["task-list-item"];return o&&a.push("checked"),[n.rawHTML||"li",q({class:a.join(" "),"data-task":i},o&&{"data-task-checked":o}),0]}}},enumerable:!1,configurable:!0}),e.prototype.liftToPrevListItem=function(){return function(r,n){var i=r.selection,o=r.tr,a=r.schema,s=i.$from,u=i.empty,f=a.nodes.listItem,d=s.parent,p=s.node(-1);if(u&&!d.childCount&&p.type===f){if(s.index(-2)>=1)return o.delete(s.start(-1)-1,s.end(-1)),n(o),!0;var v=s.node(-3);if(v.type===f)return o.delete(s.start(-2)-1,s.end(-1)),n(o),!0}return!1}},e.prototype.keymaps=function(){var r=function(n,i){return OOe(n.schema.nodes.listItem)(n,i)};return{Backspace:this.liftToPrevListItem(),Enter:r}},e}(Tt),WAe=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"blockQuote"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:q({rawHTML:{default:null}},ir()),content:"block+",group:"block",parseDOM:[Zf("blockquote")],toDOM:function(r){var n=r.attrs;return["blockquote",Vt(n),0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(r,n){return PU(r.schema.nodes.blockQuote)(r,n)}}},e.prototype.keymaps=function(){var r=this.commands()();return{"Alt-q":r,"Alt-Q":r}},e}(Tt),jAe={left:eMe,right:QAe,up:tMe,down:rMe};function GAe(t,e,r){var n=r[0],i=r[1],o=e.resolve(t.before(n-1));return i===n&&!o.nodeBefore}function KAe(t){for(var e,r=t.depth,n;r&&(n=t.node(r),n.type.name!=="tableBodyCell");){if(n.type.name==="listItem"){var i=t.node(r-1),o=i.lastChild===n,a=((e=n.lastChild)===null||e===void 0?void 0:e.type.name)!=="paragraph";return o?!a:!1}r-=1}return!1}function YAe(t,e,r,n,i){var o=e[0],a=e[1],s=e[2];if(t==="left"||t==="up"){if(i&&!GAe(r,n,[o,a]))return!1;var u=r.before(s),f=n.resolve(u).nodeBefore;if(f)return!1}return!0}function XAe(t,e,r,n,i){if(t==="right"||t==="down"){if(i&&!KAe(r))return!1;var o=r.after(e),a=n.resolve(o).nodeAfter;if(a)return!1}return!0}function JAe(t,e,r,n){var i=e[0],o=e[1],a=i+3,s=o>=a,u=s?i+1:o,f=YAe(t,[o,a,u],r,n,s),d=XAe(t,u,r,n,s);return f&&d}function fT(t,e,r){var n=r[0],i=r[1],o=e.getRowspanStartInfo(n,i),a=t==="up"&&n===0,s=t==="down"&&((o==null?void 0:o.count)>1?n+o.count-1:n)===e.totalRowCount-1;return a||s}function ZAe(t,e,r){var n=t.doc.resolve(e.tableStartOffset-1);return n.nodeBefore?t.setSelection(rt.near(n,-1)):Sv(t,n,r)}function Lm(t,e,r,n){n===void 0&&(n=!1);var i=t.doc.resolve(e.tableEndOffset);return n||!i.nodeAfter?Sv(t,i,r):t.setSelection(rt.near(i,1))}function QAe(t,e){var r=t[0],n=t[1],i=e.totalRowCount,o=e.totalColumnCount,a=n===o-1,s=r===i-1&&a;if(!s){var u=n+1,f=e.getColspanStartInfo(r,n);(f==null?void 0:f.count)>1&&(u+=f.count-1),(a||u===o)&&(r+=1,u=0);var d=e.getCellInfo(r,u).offset;return d+2}return null}function eMe(t,e){var r=t[0],n=t[1],i=e.totalColumnCount,o=n===0,a=r===0&&o;if(!a){n-=1,o&&(r-=1,n=i-1);var s=e.getCellInfo(r,n),u=s.offset,f=s.nodeSize;return u+f-2}return null}function tMe(t,e){var r=t[0],n=t[1];if(r>0){var i=e.getCellInfo(r-1,n),o=i.offset,a=i.nodeSize;return o+a-2}return null}function rMe(t,e){var r=t[0],n=t[1],i=e.totalRowCount;if(r<i-1){var o=r+1,a=e.getRowspanStartInfo(r,n);(a==null?void 0:a.count)>1&&(o+=a.count-1);var s=e.getCellInfo(o,n).offset;return s+2}return null}function dT(t,e,r,n){var i=jAe[t],o=i(r,n);if(o){var a=t==="right"||t==="down"?1:-1;return e.setSelection(rt.near(e.doc.resolve(o),a))}return null}function nMe(t,e,r){var n=r[0],i=r[1];if(t==="up"||t==="down")return!1;var o=e.tableStartOffset,a=e.tableEndOffset,s=e.getCellInfo(n,i),u=s.offset,f=s.nodeSize,d=t==="left"?o:a,p=t==="left"?u-2:u+f+3;return d===p}function iMe(t,e,r){var n=t.doc.resolve(e.before(r-3));return t.setSelection(new He(n))}function oMe(t,e,r){var n,i,o;return t==="up"?(n=r.startRowIdx,i=0,o=-1):(n=r.endRowIdx,i=e.totalColumnCount-1,o=e.getCellInfo(n,i).nodeSize+1),{targetRowIdx:n,insertColIdx:i,nodeSize:o}}function aMe(t,e,r){var n=t.getCellInfo(e,0).offset,i=t.getCellInfo(e,r-1),o=i.offset,a=i.nodeSize;return{from:n,to:o+a}}var sMe=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"table"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"tableHead{1} tableBody{1}",group:"block",attrs:q({rawHTML:{default:null}},ir()),parseDOM:[Zf("table")],toDOM:function(r){var n=r.attrs;return["table",Vt(n),0]}}},enumerable:!1,configurable:!0}),e.prototype.addTable=function(){return function(r){return r===void 0&&(r={rowCount:2,columnCount:1,data:[]}),function(n,i){var o=r.rowCount,a=r.columnCount,s=r.data,u=n.schema,f=n.selection,d=n.tr,p=f.from,v=f.to,m=f.$from,g=p===v;if(g&&!Jf(m)){var E=u.nodes,w=E.tableHead,x=E.tableBody,k=s==null?void 0:s.slice(0,a),_=s==null?void 0:s.slice(a,s.length),O=IOe(a,u,k),N=Yk(o-1,a,u,_),L=u.nodes.table.create(null,[w.create(null,O),x.create(null,N)]);return i(d.replaceSelectionWith(L)),!0}return!1}}},e.prototype.removeTable=function(){return function(){return function(r,n){var i=r.selection,o=r.tr,a=yr.create(i.$anchor);if(a){var s=a.tableStartOffset,u=a.tableEndOffset,f=s-1,d=At(o.delete(f,u),f);return n(o.setSelection(d)),!0}return!1}}},e.prototype.addColumn=function(r){return function(){return function(n,i){var o=n.selection,a=n.tr,s=n.schema,u=Oi(o),f=u.anchor,d=u.head;if(f&&d){for(var p=yr.create(f),v=p.getRectOffsets(f,d),m=r==="left"?v.startColIdx:v.endColIdx+1,g=Ks(v).columnCount,E=p.totalRowCount,w=0;w<E;w+=1){var x=Qf(g,w,s);a.insert(a.mapping.map(p.posAt(w,m)),x)}return i(a),!0}return!1}}},e.prototype.removeColumn=function(){return function(){return function(r,n){var i=r.selection,o=r.tr,a=Oi(i),s=a.anchor,u=a.head;if(s&&u){var f=yr.create(s),d=f.getRectOffsets(s,u),p=f.totalColumnCount,v=f.totalRowCount,m=Ks(d).columnCount,g=m===p;if(g)return!1;for(var E=d.startColIdx,w=d.endColIdx,x=o.mapping.maps.length,k=0;k<v;k+=1)for(var _=w;_>=E;_-=1){var O=f.getCellInfo(k,_),N=O.offset,L=O.nodeSize,A=o.mapping.slice(x).map(N),P=A+L;o.delete(A,P)}return n(o),!0}return!1}}},e.prototype.addRow=function(r){return function(){return function(n,i){var o=n.selection,a=n.schema,s=n.tr,u=Oi(o),f=u.anchor,d=u.head;if(f&&d){var p=yr.create(f),v=p.totalColumnCount,m=p.getRectOffsets(f,d),g=Ks(m).rowCount,E=oMe(r,p,m),w=E.targetRowIdx,x=E.insertColIdx,k=E.nodeSize,_=w===0;if(!_){for(var O=[],N=s.mapping.map(p.posAt(w,x))+k,L=[],A=0;A<v;A+=1)L=L.concat(Qf(1,w,a));for(var P=0;P<g;P+=1)O.push(a.nodes.tableRow.create(null,L));return i(s.insert(N,O)),!0}}return!1}}},e.prototype.removeRow=function(){return function(){return function(r,n){var i=r.selection,o=r.tr,a=Oi(i),s=a.anchor,u=a.head;if(s&&u){var f=yr.create(s),d=f.totalRowCount,p=f.totalColumnCount,v=f.getRectOffsets(s,u),m=Ks(v).rowCount,g=v.startRowIdx,E=v.endRowIdx,w=g===0,x=m===d-1;if(x||w)return!1;for(var k=E;k>=g;k-=1){var _=aMe(f,k,p),O=_.from,N=_.to;o.delete(O-1,N+1)}return n(o),!0}return!1}}},e.prototype.alignColumn=function(){return function(r){return r===void 0&&(r={align:"center"}),function(n,i){var o=r.align,a=n.selection,s=n.tr,u=Oi(a),f=u.anchor,d=u.head;if(f&&d){for(var p=yr.create(f),v=p.totalRowCount,m=p.getRectOffsets(f,d),g=m.startColIdx,E=m.endColIdx,w=0;w<v;w+=1)for(var x=g;x<=E;x+=1)if(!p.extendedRowspan(w,x)&&!p.extendedColspan(w,x)){var k=p.getNodeAndPos(w,x),_=k.node,O=k.pos,N=ROe(_,{align:o});s.setNodeMarkup(O,null,N)}return i(s),!0}return!1}}},e.prototype.moveToCell=function(r){return function(n,i){var o=n.selection,a=n.tr,s=n.schema,u=Oi(o),f=u.anchor,d=u.head;if(f&&d){var p=yr.create(f),v=p.getCellIndex(f),m=void 0;if(fT(r,p,v)?m=Lm(a,p,s):m=dT(r,a,v,p),m)return i(m),!0}return!1}},e.prototype.moveInCell=function(r){var n=this;return function(i,o){var a=i.selection,s=i.tr,u=i.doc,f=i.schema,d=a.$from,p=n.context.view;if(!p.endOfTextblock(r))return!1;var v=Qi(d,function(_){var O=_.type;return O.name==="tableHeadCell"||O.name==="tableBodyCell"});if(v){var m=Qi(d,function(_){var O=_.type;return O.name==="paragraph"}),g=v.depth;if(m&&JAe(r,[g,m.depth],d,u)){var E=Oi(a).anchor,w=yr.create(E),x=w.getCellIndex(E),k=void 0;if(nMe(r,w,x)?k=iMe(s,d,g):fT(r,w,x)?r==="up"?k=ZAe(s,w,f):r==="down"&&(k=Lm(s,w,f)):k=dT(r,s,x,w),k)return o(k),!0}}return!1}},e.prototype.deleteCells=function(){return function(r,n){var i=r.schema,o=r.selection,a=r.tr,s=Oi(o),u=s.anchor,f=s.head,d=o instanceof it;if(u&&f&&!d){for(var p=yr.create(u),v=p.getRectOffsets(u,f),m=v.startRowIdx,g=v.startColIdx,E=v.endRowIdx,w=v.endColIdx,x=m;x<=E;x+=1)for(var k=g;k<=w;k+=1)if(!p.extendedRowspan(x,k)&&!p.extendedColspan(x,k)){var _=p.getNodeAndPos(x,k),O=_.node,N=_.pos,L=Qf(1,x,i,O.attrs);a.replaceWith(a.mapping.map(N),a.mapping.map(N+O.nodeSize),L)}return n(a),!0}return!1}},e.prototype.exitTable=function(){return function(r,n){var i=r.selection,o=r.tr,a=r.schema,s=i.$from,u=Qi(s,function(v){var m=v.type;return m.name==="tableHeadCell"||m.name==="tableBodyCell"});if(u){var f=Qi(s,function(v){var m=v.type;return m.name==="paragraph"});if(f){var d=Oi(i).anchor,p=yr.create(d);return n(Lm(o,p,a,!0)),!0}}return!1}},e.prototype.commands=function(){return{addTable:this.addTable(),removeTable:this.removeTable(),addColumnToLeft:this.addColumn("left"),addColumnToRight:this.addColumn("right"),removeColumn:this.removeColumn(),addRowToUp:this.addRow("up"),addRowToDown:this.addRow("down"),removeRow:this.removeRow(),alignColumn:this.alignColumn()}},e.prototype.keymaps=function(){var r=this.deleteCells();return{Tab:this.moveToCell("right"),"Shift-Tab":this.moveToCell("left"),ArrowUp:this.moveInCell("up"),ArrowDown:this.moveInCell("down"),ArrowLeft:this.moveInCell("left"),ArrowRight:this.moveInCell("right"),Backspace:r,"Mod-Backspace":r,Delete:r,"Mod-Delete":r,"Mod-Enter":this.exitTable()}},e}(Tt),lMe=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"tableHead"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"tableRow{1}",attrs:q({rawHTML:{default:null}},ir()),parseDOM:[Zf("thead")],toDOM:function(r){var n=r.attrs;return["thead",Vt(n),0]}}},enumerable:!1,configurable:!0}),e}(Tt),uMe=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"tableBody"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"tableRow+",attrs:q({rawHTML:{default:null}},ir()),parseDOM:[{tag:"tbody",getAttrs:function(r){var n=r.querySelectorAll("tr"),i=n[0].children.length,o=r.getAttribute("data-raw-html");return i?q({},o&&{rawHTML:o}):!1}}],toDOM:function(r){var n=r.attrs;return["tbody",Vt(n),0]}}},enumerable:!1,configurable:!0}),e}(Tt),cMe=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"tableRow"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"(tableHeadCell | tableBodyCell)*",attrs:q({rawHTML:{default:null}},ir()),parseDOM:[{tag:"tr",getAttrs:function(r){var n=r.children.length,i=r.getAttribute("data-raw-html");return n?q({},i&&{rawHTML:i}):!1}}],toDOM:function(r){var n=r.attrs;return["tr",Vt(n),0]}}},enumerable:!1,configurable:!0}),e}(Tt),fMe=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"tableHeadCell"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"paragraph+",attrs:q({align:{default:null},className:{default:null},rawHTML:{default:null},colspan:{default:null},extended:{default:null}},ir()),isolating:!0,parseDOM:[Vk("th")],toDOM:function(r){var n=r.attrs,i=qk(n);return["th",q(q({},i),Vt(n)),0]}}},enumerable:!1,configurable:!0}),e}(Tt),dMe=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"tableBodyCell"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"(paragraph | bulletList | orderedList)+",attrs:{align:{default:null},className:{default:null},rawHTML:{default:null},colspan:{default:null},rowspan:{default:null},extended:{default:null}},isolating:!0,parseDOM:[Vk("td")],toDOM:function(r){var n=r.attrs,i=qk(n);return["td",i,0]}}},enumerable:!1,configurable:!0}),e}(Tt),pMe=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"image"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{inline:!0,attrs:q({imageUrl:{default:""},altText:{default:null},rawHTML:{default:null}},ir()),group:"inline",selectable:!1,parseDOM:[{tag:"img[src]",getAttrs:function(r){var n=Ha(r,{RETURN_DOM_FRAGMENT:!0}).firstChild,i=n.getAttribute("src")||"",o=n.getAttribute("data-raw-html"),a=n.getAttribute("alt");return q({imageUrl:i,altText:a},o&&{rawHTML:o})}}],toDOM:function(r){var n=r.attrs;return[n.rawHTML||"img",q(q({src:Ps(n.imageUrl)},n.altText&&{alt:n.altText}),Vt(n))]}}},enumerable:!1,configurable:!0}),e.prototype.addImage=function(){return function(r){return function(n,i){var o=n.schema,a=n.tr,s=r,u=s.imageUrl,f=s.altText;if(!u)return!1;var d=o.nodes.image.createAndFill(q({imageUrl:u},f&&{altText:f}));return i(a.replaceSelectionWith(d).scrollIntoView()),!0}}},e.prototype.commands=function(){return{addImage:this.addImage()}},e}(Tt),pT=1,hMe=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"thematicBreak"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:q({rawHTML:{default:null}},ir()),group:"block",parseDOM:[{tag:"hr"}],selectable:!1,toDOM:function(r){var n=r.attrs;return["div",Vt(n),[n.rawHTML||"hr"]]}}},enumerable:!1,configurable:!0}),e.prototype.hr=function(){var r=this;return function(){return function(n,i){var o,a=n.selection,s=a.$from,u=a.$to;if(s===u){var f=n.doc,d=n.schema.nodes,p=d.thematicBreak,v=d.paragraph,m=[p.create()],g=s.node(pT),E=f.child(f.childCount-1)===g,w=f.resolve(s.after(pT)),x=((o=s.nodeAfter)===null||o===void 0?void 0:o.type.name)===r.name;return(E||x)&&m.push(v.create()),i(n.tr.insert(w.pos,m).scrollIntoView()),!0}return!1}}},e.prototype.commands=function(){return{hr:this.hr()}},e.prototype.keymaps=function(){var r=this.hr()();return{"Mod-l":r,"Mod-L":r}},e}(Tt),vMe=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"strong"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){var r=["b","strong"].map(function(n){return{tag:n,getAttrs:function(i){var o=i.getAttribute("data-raw-html");return q({},o&&{rawHTML:o})}}});return{attrs:q({rawHTML:{default:null}},ir()),parseDOM:r,toDOM:function(n){var i=n.attrs;return[i.rawHTML||"strong",Vt(i)]}}},enumerable:!1,configurable:!0}),e.prototype.bold=function(){return function(){return function(r,n){return fu(r.schema.marks.strong)(r,n)}}},e.prototype.commands=function(){return{bold:this.bold()}},e.prototype.keymaps=function(){var r=this.bold()();return{"Mod-b":r,"Mod-B":r}},e}(Mt),mMe=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"emph"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){var r=["i","em"].map(function(n){return{tag:n,getAttrs:function(i){var o=i.getAttribute("data-raw-html");return q({},o&&{rawHTML:o})}}});return{attrs:q({rawHTML:{default:null}},ir()),parseDOM:r,toDOM:function(n){var i=n.attrs;return[i.rawHTML||"em",Vt(i)]}}},enumerable:!1,configurable:!0}),e.prototype.italic=function(){return function(){return function(r,n){return fu(r.schema.marks.emph)(r,n)}}},e.prototype.commands=function(){return{italic:this.italic()}},e.prototype.keymaps=function(){var r=this.italic()();return{"Mod-i":r,"Mod-I":r}},e}(Mt),gMe=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"strike"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){var r=["s","del"].map(function(n){return{tag:n,getAttrs:function(i){var o=i.getAttribute("data-raw-html");return q({},o&&{rawHTML:o})}}});return{attrs:q({rawHTML:{default:null}},ir()),parseDOM:r,toDOM:function(n){var i=n.attrs;return[i.rawHTML||"del",Vt(i)]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(r,n){return fu(r.schema.marks.strike)(r,n)}}},e.prototype.keymaps=function(){var r=this.commands()();return{"Mod-s":r,"Mod-S":r}},e}(Mt),yMe=function(t){be(e,t);function e(r){var n=t.call(this)||this;return n.linkAttributes=r,n}return Object.defineProperty(e.prototype,"name",{get:function(){return"link"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){var r=this;return{attrs:q({linkUrl:{default:""},title:{default:null},rawHTML:{default:null}},ir()),inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:function(n){var i=Ha(n,{RETURN_DOM_FRAGMENT:!0}).firstChild,o=i.getAttribute("href")||"",a=i.getAttribute("title")||"",s=i.getAttribute("data-raw-html");return q({linkUrl:o,title:a},s&&{rawHTML:s})}}],toDOM:function(n){var i=n.attrs;return[i.rawHTML||"a",q(q({href:Ps(i.linkUrl)},r.linkAttributes),Vt(i))]}}},enumerable:!1,configurable:!0}),e.prototype.addLink=function(){return function(r){return function(n,i){var o=r,a=o.linkUrl,s=o.linkText,u=s===void 0?"":s,f=n.schema,d=n.tr,p=n.selection,v=p.empty,m=p.from,g=p.to;if(m&&g&&a){var E={linkUrl:a},w=f.mark("link",E);if(v&&u){var x=mr(f,u,w);d.replaceRangeWith(m,g,x)}else d.addMark(m,g,w);return i(d.scrollIntoView()),!0}return!1}}},e.prototype.toggleLink=function(){return function(r){return function(n,i){return fu(n.schema.marks.link,r)(n,i)}}},e.prototype.commands=function(){return{addLink:this.addLink(),toggleLink:this.toggleLink()}},e}(Mt),bMe=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"code"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:q({rawHTML:{default:null}},ir()),parseDOM:[{tag:"code",getAttrs:function(r){var n=r.getAttribute("data-raw-html");return q({},n&&{rawHTML:n})}}],toDOM:function(r){var n=r.attrs;return[n.rawHTML||"code",Vt(n)]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(r,n){return fu(r.schema.marks.code)(r,n)}}},e.prototype.keymaps=function(){var r=this.commands()();return{"Shift-Mod-c":r,"Shift-Mod-C":r}},e}(Mt),wMe=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"customBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"text*",group:"block",attrs:{info:{default:null}},atom:!0,code:!0,defining:!0,parseDOM:[{tag:"div[data-custom-info]",getAttrs:function(r){var n=r.getAttribute("data-custom-info");return{info:n}}}],toDOM:function(r){var n=r.attrs;return["div",{"data-custom-info":n.info||null},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(r){return function(n,i){return r!=null&&r.info?dv(n.schema.nodes.customBlock,r)(n,i):!1}}},e}(Tt),EMe=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"frontMatter"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"text*",group:"block",code:!0,defining:!0,parseDOM:[{preserveWhitespace:"full",tag:"div[data-front-matter]"}],toDOM:function(){return["div",{"data-front-matter":"true"},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(r,n,i){var o=r.selection.$from;return i.endOfTextblock("down")&&o.node().type.name==="frontMatter"?fv(r,n):!1}}},e.prototype.keymaps=function(){return{Enter:this.commands()()}},e}(Tt),xMe=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"htmlComment"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"text*",group:"block",code:!0,defining:!0,parseDOM:[{preserveWhitespace:"full",tag:"div[data-html-comment]"}],toDOM:function(){return["div",{"data-html-comment":"true"},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(r,n,i){var o=r.selection.$from;return i.endOfTextblock("down")&&o.node().type.name==="htmlComment"?fv(r,n):!1}}},e.prototype.keymaps=function(){return{Enter:this.commands()()}},e}(Tt);function CMe(t){return new Zx([new PAe,new BAe,new FAe,new HAe,new UAe,new zAe,new qAe,new VAe,new WAe,new sMe,new lMe,new uMe,new cMe,new fMe,new dMe,new pMe,new hMe,new vMe,new mMe,new gMe,new yMe(t),new bMe,new wMe,new EMe,new Xx,new xMe])}var kMe=_e("contents"),TMe=function(t){be(e,t);function e(r,n){var i=t.call(this,r)||this,o=n.toDOMAdaptor,a=n.htmlSchemaMap,s=a===void 0?{}:a,u=n.linkAttributes,f=u===void 0?{}:u,d=n.useCommandShortcut,p=d===void 0?!0:d,v=n.wwPlugins,m=v===void 0?[]:v,g=n.wwNodeViews,E=g===void 0?{}:g;return i.editorType="wysiwyg",i.el.classList.add("ww-mode"),i.toDOMAdaptor=o,i.linkAttributes=f,i.extraPlugins=m,i.pluginNodeViews=E,i.specs=i.createSpecs(),i.schema=i.createSchema(s),i.context=i.createContext(),i.keymaps=i.createKeymaps(p),i.view=i.createView(),i.commands=i.createCommands(),i.specs.setContext(q(q({},i.context),{view:i.view})),i.initEvent(),i}return e.prototype.createSpecs=function(){return CMe(this.linkAttributes)},e.prototype.createContext=function(){return{schema:this.schema,eventEmitter:this.eventEmitter}},e.prototype.createSchema=function(r){return new c1({nodes:q(q({},this.specs.nodes),r.nodes),marks:q(q({},this.specs.marks),r.marks)})},e.prototype.createPlugins=function(){return an([HOe(),VOe(this.eventEmitter),WOe(),ZOe(this.eventEmitter)],this.createPluginProps()).concat(this.defaultPlugins)},e.prototype.createPluginNodeViews=function(){var r=this,n=r.eventEmitter,i=r.pluginNodeViews,o={};return i&&Object.keys(i).forEach(function(a){o[a]=function(s,u,f){return i[a](s,u,f,n)}}),o},e.prototype.createView=function(){var r=this,n=this,i=n.toDOMAdaptor,o=n.eventEmitter;return new lf(this.el,{state:this.createState(),attributes:{class:kMe},nodeViews:q({customBlock:function(a,s,u){return new QOe(a,s,u,i)},image:function(a,s,u){return new eAe(a,s,u,o)},codeBlock:function(a,s,u){return new nAe(a,s,u,o)},widget:Yx},this.createPluginNodeViews()),dispatchTransaction:function(a){var s=r.view.state.applyTransaction(a).state;r.view.updateState(s),r.emitChangeEvent(a.scrollIntoView()),r.eventEmitter.emit("setFocusedNode",s.selection.$from.node(1))},transformPastedHTML:bAe,transformPasted:function(a){return kAe(a,r.schema,Jf(r.view.state.selection.$from))},handlePaste:function(a,s,u){return DAe(a,u)},handleKeyDown:function(a,s){return r.eventEmitter.emit("keydown",r.editorType,s),!1},handleDOMEvents:{paste:function(a,s){var u=s.clipboardData||window.clipboardData,f=u==null?void 0:u.items;if(f){var d=Ti(f).some(function(v){return v.kind==="string"&&v.type==="text/rtf"});if(!d){var p=Kx(f);p&&(s.preventDefault(),Rv(r.eventEmitter,p,s.type))}}return!1},keyup:function(a,s){return r.eventEmitter.emit("keyup",r.editorType,s),!1},scroll:function(){return r.eventEmitter.emit("scroll","editor"),!0}}})},e.prototype.createCommands=function(){return this.specs.commands(this.view,Om())},e.prototype.getHTML=function(){return Iv(this.view.dom.innerHTML)},e.prototype.getModel=function(){return this.view.state.doc},e.prototype.getSelection=function(){var r=this.view.state.selection,n=r.from,i=r.to;return[n,i]},e.prototype.getSchema=function(){return this.view.state.schema},e.prototype.replaceSelection=function(r,n,i){var o=this.view.state,a=o.schema,s=o.tr,u=r.split(`
|
|
162
|
+
`),f=u.map(function(v){return yf(a,Na(v,a))}),d=new ge(oe.from(f),1,1),p=Gi(n)&&Gi(i)?s.replaceRange(n,i,d):s.replaceSelection(d);this.view.dispatch(p),this.focus()},e.prototype.deleteSelection=function(r,n){var i=this.view.state.tr,o=Gi(r)&&Gi(n)?i.deleteRange(r,n):i.deleteSelection();this.view.dispatch(o.scrollIntoView())},e.prototype.getSelectedText=function(r,n){var i=this.view.state,o=i.doc,a=i.selection,s=a.from,u=a.to;return Gi(r)&&Gi(n)&&(s=r,u=n),o.textBetween(s,u,`
|
|
163
|
+
`)},e.prototype.setModel=function(r,n){n===void 0&&(n=!1);var i=this.view.state,o=i.tr,a=i.doc;this.view.dispatch(o.replaceWith(0,a.content.size,r)),n&&this.moveCursorToEnd(!0)},e.prototype.setSelection=function(r,n){n===void 0&&(n=r);var i=this.view.state.tr,o=At(i,r,n);this.view.dispatch(i.setSelection(o).scrollIntoView())},e.prototype.addWidget=function(r,n,i){var o=this.view,a=o.dispatch,s=o.state;a(s.tr.setMeta("widget",{pos:i??s.selection.to,node:r,style:n}))},e.prototype.replaceWithWidget=function(r,n,i){var o=this.view.state,a=o.tr,s=o.schema,u=Na(i,s);this.view.dispatch(a.replaceWith(r,n,u))},e.prototype.getRangeInfoOfNode=function(r){var n=this.view.state,i=n.doc,o=n.selection,a=r?i.resolve(r):o.$from,s=a.marks(),u=a.node(),f=a.start(),d=a.end(),p=u.type.name;if(s.length||p==="paragraph"){var v=s[s.length-1],m=function(g){return g.length?vr(g,v):!0};p=v?v.type.name:"text",u.forEach(function(g,E){var w=g.isText,x=g.nodeSize,k=g.marks,_=a.pos-f;w&&E<=_&&E+x>=_&&m(k)&&(f=f+E,d=f+x)})}return{range:[f,d],type:p}},e}(Jx),SMe=ei,_Me=hf;function OMe(t){return!SMe(t)&&!_Me(t)}var AMe=OMe,MMe=AMe;function NMe(t){return MMe(t)&&t!==!1}var LMe=NMe,DMe=LMe;function IMe(t){return!DMe(t)}var RMe=IMe,hT=["afterPreviewRender","updatePreview","changeMode","needChangeMode","command","changePreviewStyle","changePreviewTabPreview","changePreviewTabWrite","scroll","contextmenu","show","hide","changeLanguage","changeToolbarState","toggleScrollSync","mixinTableOffsetMapPrototype","setFocusedNode","removePopupWidget","query","openPopup","closePopup","addImageBlobHook","beforePreviewRender","beforeConvertWysiwygToMarkdown","load","loadUI","change","caretChange","destroy","focus","blur","keydown","keyup"],vT=function(){function t(){var e=this;this.events=new Qk,this.eventTypes=hT.reduce(function(r,n){return q(q({},r),{type:n})},{}),this.hold=!1,hT.forEach(function(r){e.addEventType(r)})}return t.prototype.listen=function(e,r){var n=this.getTypeInfo(e),i=this.events.get(n.type)||[];if(!this.hasEventType(n.type))throw new Error("There is no event type "+n.type);n.namespace&&(r.namespace=n.namespace),i.push(r),this.events.set(n.type,i)},t.prototype.emit=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=this.getTypeInfo(e),o=this.events.get(i.type),a=[];return!this.hold&&o&&o.forEach(function(s){var u=s.apply(void 0,r);ei(u)||a.push(u)}),a},t.prototype.emitReduce=function(e,r){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var o=this.events.get(e);return!this.hold&&o&&o.forEach(function(a){var s=a.apply(void 0,an([r],n));RMe(s)||(r=s)}),r},t.prototype.getTypeInfo=function(e){var r=e.split(".");return{type:r[0],namespace:r[1]}},t.prototype.hasEventType=function(e){return!ei(this.eventTypes[this.getTypeInfo(e).type])},t.prototype.addEventType=function(e){if(this.hasEventType(e))throw new Error("There is already have event type "+e);this.eventTypes[e]=e},t.prototype.removeEventHandler=function(e,r){var n=this,i=this.getTypeInfo(e),o=i.type,a=i.namespace;o&&r?this.removeEventHandlerWithHandler(o,r):o&&!a?this.events.delete(o):!o&&a?this.events.forEach(function(s,u){n.removeEventHandlerWithTypeInfo(u,a)}):o&&a&&this.removeEventHandlerWithTypeInfo(o,a)},t.prototype.removeEventHandlerWithHandler=function(e,r){var n=this.events.get(e);if(n){var i=n.indexOf(r);n.indexOf(r)>=0&&n.splice(i,1)}},t.prototype.removeEventHandlerWithTypeInfo=function(e,r){var n=[],i=this.events.get(e);i&&(i.map(function(o){return o.namespace!==r&&n.push(o),null}),this.events.set(e,n))},t.prototype.getEvents=function(){return this.events},t.prototype.holdEventInvoke=function(e){this.hold=!0,e(),this.hold=!1},t}(),PMe=function(){function t(e,r,n,i){this.eventEmitter=e,this.mdCommands=r,this.wwCommands=n,this.getEditorType=i,this.initEvent()}return t.prototype.initEvent=function(){var e=this;this.eventEmitter.listen("command",function(r,n){e.exec(r,n)})},t.prototype.addCommand=function(e,r,n){e==="markdown"?this.mdCommands[r]=n:this.wwCommands[r]=n},t.prototype.deleteCommand=function(e,r){e==="markdown"?delete this.mdCommands[r]:delete this.wwCommands[r]},t.prototype.exec=function(e,r){var n=this.getEditorType();n==="markdown"?this.mdCommands[e](r):this.wwCommands[e](r)},t}();function td(t){return t[t.length-1]===`
|
|
164
|
+
`?t.slice(0,t.length-1):t}function Dm(t,e){var r=t.schema,n=e.literal,i=n.match($s);if(i){var o=i[1],a=i[3],s=(o||a).toLowerCase();return e.type==="htmlInline"&&!!(r.marks[s]||r.nodes[s])}return!1}function Im(t){var e=t.type;return vr(["text","strong","emph","strike","image","link","code"],e)}function mT(t){return(t==null?void 0:t.type)==="softbreak"}function Eu(t){var e=t.type,r=t.literal,n=e==="htmlInline"&&r.match($s);if(n){var i=n[1],o=n[3],a=i||o;if(a)return vr(["ul","ol","li"],a.toLowerCase())}return!1}function BMe(t){var e=t.literal,r=/data-task/.test(e),n=/data-task-checked/.test(e);return{task:r,checked:n}}function gT(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=document.createElement("div");n.innerHTML=Ha(t);var i=n.firstChild;return e.map(function(o){return i.getAttribute(o)||""})}function $Me(t){var e={};return Object.keys(t).forEach(function(r){var n=r.split(", ");n.forEach(function(i){var o=i.toLowerCase();e[o]=t[r]})}),e}var FMe={"b, strong":function(t,e,r){var n=t.schema.marks.strong;r?t.openMark(n.create({rawHTML:r})):t.closeMark(n)},"i, em":function(t,e,r){var n=t.schema.marks.emph;r?t.openMark(n.create({rawHTML:r})):t.closeMark(n)},"s, del":function(t,e,r){var n=t.schema.marks.strike;r?t.openMark(n.create({rawHTML:r})):t.closeMark(n)},code:function(t,e,r){var n=t.schema.marks.code;r?t.openMark(n.create({rawHTML:r})):t.closeMark(n)},a:function(t,e,r){var n=e.literal,i=t.schema.marks.link;if(r){var o=gT(n,"href")[0];t.openMark(i.create({linkUrl:o,rawHTML:r}))}else t.closeMark(i)},img:function(t,e,r){var n=e.literal;if(r){var i=gT(n,"src","alt"),o=i[0],a=i[1],s=t.schema.nodes.image;t.addNode(s,q({rawHTML:r,imageUrl:o},a&&{altText:a}))}},hr:function(t,e,r){t.addNode(t.schema.nodes.thematicBreak,{rawHTML:r})},br:function(t,e){var r=t.schema.nodes.paragraph,n=e.parent,i=e.prev,o=e.next;(n==null?void 0:n.type)==="paragraph"?(mT(i)&&t.openNode(r),mT(o)?t.closeNode():o&&(t.closeNode(),t.openNode(r))):(n==null?void 0:n.type)==="tableCell"&&(i&&(Im(i)||Dm(t,i))&&t.closeNode(),o&&(Im(o)||Dm(t,o))&&t.openNode(r))},pre:function(t,e,r){var n,i,o=document.createElement("div");o.innerHTML=e.literal;var a=(i=(n=o.firstChild)===null||n===void 0?void 0:n.firstChild)===null||i===void 0?void 0:i.textContent;t.openNode(t.schema.nodes.codeBlock,{rawHTML:r}),t.addText(td(a)),t.closeNode()},"ul, ol":function(t,e,r){if(e.parent.type==="tableCell"){var n=t.schema.nodes,i=n.bulletList,o=n.orderedList,a=n.paragraph,s=r==="ul"?i:o;r?(e.prev&&!Eu(e.prev)&&t.closeNode(),t.openNode(s,{rawHTML:r})):(t.closeNode(),e.next&&!Eu(e.next)&&t.openNode(a))}},li:function(t,e,r){var n;if(((n=e.parent)===null||n===void 0?void 0:n.type)==="tableCell"){var i=t.schema.nodes,o=i.listItem,a=i.paragraph;if(r){var s=BMe(e);e.prev&&!Eu(e.prev)&&t.closeNode(),t.openNode(o,q({rawHTML:r},s)),e.next&&!Eu(e.next)&&t.openNode(a)}else e.prev&&!Eu(e.prev)&&t.closeNode(),t.closeNode()}}},HMe=$Me(FMe);function yT(t){return t.type==="htmlInline"&&Av.test(t.literal)}function bT(t){Ti(t.childNodes).forEach(function(e){if(kf(e)){var r=e.nodeName.toLowerCase();e.setAttribute("data-raw-html",r),e.childNodes&&bT(e)}})}var wT={text:function(t,e){t.addText(e.literal||"")},paragraph:function(t,e,r,n){var i,o=r.entering;if(o){var a=t.schema.nodes.paragraph;((i=e.prev)===null||i===void 0?void 0:i.type)==="paragraph"&&(t.openNode(a,n),t.closeNode()),t.openNode(a,n)}else t.closeNode()},heading:function(t,e,r,n){var i=r.entering;if(i){var o=e,a=o.level,s=o.headingType;t.openNode(t.schema.nodes.heading,q({level:a,headingType:s},n))}else t.closeNode()},codeBlock:function(t,e,r){var n=t.schema.nodes.codeBlock,i=e,o=i.info,a=i.literal;t.openNode(n,q({language:o},r)),t.addText(td(a||"")),t.closeNode()},list:function(t,e,r,n){var i=r.entering;if(i){var o=t.schema.nodes,a=o.bulletList,s=o.orderedList,u=e.listData,f=u.type,d=u.start;f==="bullet"?t.openNode(a,n):t.openNode(s,q({order:d},n))}else t.closeNode()},item:function(t,e,r,n){var i=r.entering,o=t.schema.nodes.listItem,a=e.listData,s=a.task,u=a.checked;if(i){var f=q(q(q({},s&&{task:s}),u&&{checked:u}),n);t.openNode(o,f)}else t.closeNode()},blockQuote:function(t,e,r,n){var i=r.entering;i?t.openNode(t.schema.nodes.blockQuote,n):t.closeNode()},image:function(t,e,r,n){var i=r.entering,o=r.skipChildren,a=t.schema.nodes.image,s=e,u=s.destination,f=s.firstChild;i&&o&&o(),t.addNode(a,q(q({imageUrl:u},f&&{altText:f.literal}),n))},thematicBreak:function(t,e,r,n){t.addNode(t.schema.nodes.thematicBreak,n)},strong:function(t,e,r,n){var i=r.entering,o=t.schema.marks.strong;i?t.openMark(o.create(n)):t.closeMark(o)},emph:function(t,e,r,n){var i=r.entering,o=t.schema.marks.emph;i?t.openMark(o.create(n)):t.closeMark(o)},link:function(t,e,r,n){var i=r.entering,o=t.schema.marks.link,a=e,s=a.destination,u=a.title;if(i){var f=q({linkUrl:s,title:u},n);t.openMark(o.create(f))}else t.closeMark(o)},softbreak:function(t,e){if(e.parent.type==="paragraph"){var r=e.prev,n=e.next;r&&!yT(r)&&t.closeNode(),n&&!yT(n)&&t.openNode(t.schema.nodes.paragraph)}},table:function(t,e,r,n){var i=r.entering;i?t.openNode(t.schema.nodes.table,n):t.closeNode()},tableHead:function(t,e,r,n){var i=r.entering;i?t.openNode(t.schema.nodes.tableHead,n):t.closeNode()},tableBody:function(t,e,r,n){var i=r.entering;i?t.openNode(t.schema.nodes.tableBody,n):t.closeNode()},tableRow:function(t,e,r,n){var i=r.entering;i?t.openNode(t.schema.nodes.tableRow,n):t.closeNode()},tableCell:function(t,e,r){var n=r.entering;if(!e.ignored){var i=function(g){return g&&(Im(g)||Dm(t,g))};if(n){var o=t.schema.nodes,a=o.tableHeadCell,s=o.tableBodyCell,u=o.paragraph,f=e.parent.parent,d=f.type==="tableHead"?a:s,p=f.parent,v=(p.columns[e.startIdx]||{}).align,m=q({},e.attrs);v&&(m.align=v),t.openNode(d,m),i(e.firstChild)&&t.openNode(u)}else i(e.lastChild)&&t.closeNode(),t.closeNode()}},strike:function(t,e,r,n){var i=r.entering,o=t.schema.marks.strike;i?t.openMark(o.create(n)):t.closeMark(o)},code:function(t,e,r,n){var i=t.schema.marks.code;t.openMark(i.create(n)),t.addText(td(e.literal||"")),t.closeMark(i)},customBlock:function(t,e){var r=t.schema.nodes,n=r.customBlock,i=r.paragraph,o=e,a=o.info,s=o.literal;t.openNode(n,{info:a}),t.addText(td(s||"")),t.closeNode(),e.next||(t.openNode(i),t.closeNode())},frontMatter:function(t,e){t.openNode(t.schema.nodes.frontMatter),t.addText(e.literal),t.closeNode()},htmlInline:function(t,e){var r=e.literal,n=r.match($s),i=n[1],o=n[3],a=(i||o).toLowerCase(),s=t.schema.marks[a],u=Ha(r);if(s!=null&&s.spec.attrs.htmlInline)if(i){var f=xm(u);t.openMark(s.create({htmlAttrs:f}))}else t.closeMark(s);else{var d=HMe[a];d&&d(t,e,i)}},htmlBlock:function(t,e){var r=e.literal,n=document.createElement("div"),i=Cz.test(r);if(i)t.openNode(t.schema.nodes.htmlComment),t.addText(e.literal),t.closeNode();else{var o=r.match($s),a=o[1],s=o[3],u=(a||s).toLowerCase(),f=t.schema.nodes[u],d=Ha(r);if(f!=null&&f.spec.attrs.htmlBlock){var p=xm(d),v=$k(e,u);t.addNode(f,{htmlAttrs:p,childrenHTML:v})}else n.innerHTML=d,bT(n),t.convertByDOMParser(n)}},customInline:function(t,e,r){var n=r.entering,i=r.skipChildren,o=e,a=o.info,s=o.firstChild,u=t.schema;if(a.indexOf("widget")!==-1&&n){var f=Rx(e);i(),t.addNode(u.nodes.widget,{info:a},[u.text(Dx(a,f))])}else{var d="$$";n&&(d+=s?a+" ":a),t.addText(d)}}};function UMe(t){var e=Object.keys(t),r=q({},wT),n=new mm({gfm:!0,nodeId:!0,convertors:t}),i=n.getConvertors();return e.forEach(function(o){var a=wT[o];a&&!vr(["htmlBlock","htmlInline"],o)&&(r[o]=function(s,u,f){f.origin=function(){return i[o](u,f,i)};var d=t[o](u,f),p;if(d){var v=Array.isArray(d)?d[0]:d,m=v.attributes,g=v.classNames;p={htmlAttrs:m,classNames:g}}a(s,u,f,p)})}),r}function zMe(t,e){return t.isText&&e.isText&&ht.sameSet(t.marks,e.marks)?t.withText(t.text+e.text):!1}var qMe=function(){function t(e,r){this.schema=e,this.convertors=r,this.stack=[{type:this.schema.topNodeType,attrs:null,content:[]}],this.marks=ht.none}return t.prototype.top=function(){return Nr(this.stack)},t.prototype.push=function(e){this.stack.length&&this.top().content.push(e)},t.prototype.addText=function(e){if(e){var r=this.top().content,n=Nr(r),i=this.schema.text(e,this.marks),o=n&&zMe(n,i);o?r[r.length-1]=o:r.push(i)}},t.prototype.openMark=function(e){this.marks=e.addToSet(this.marks)},t.prototype.closeMark=function(e){this.marks=e.removeFromSet(this.marks)},t.prototype.addNode=function(e,r,n){var i=e.createAndFill(r,n,this.marks);return i?(this.push(i),i):null},t.prototype.openNode=function(e,r){this.stack.push({type:e,attrs:r,content:[]})},t.prototype.closeNode=function(){this.marks.length&&(this.marks=ht.none);var e=this.stack.pop(),r=e.type,n=e.attrs,i=e.content;return this.addNode(r,n,i)},t.prototype.convertByDOMParser=function(e){var r=this,n=jc.fromSchema(this.schema).parse(e);n.content.forEach(function(i){return r.push(i)})},t.prototype.closeUnmatchedHTMLInline=function(e,r){var n;if(!r&&e.type!=="htmlInline")for(var i=this.stack.length-1,o=i;o>=0;o-=1){var a=this.stack[o];if(!((n=a.attrs)===null||n===void 0)&&n.rawHTML)a.content.length?this.closeNode():this.stack.pop();else break}},t.prototype.convert=function(e,r){for(var n=e.walker(),i=n.next(),o=function(){var s=i.node,u=i.entering,f=a.convertors[s.type],d=!1;if(f){var p={entering:u,leaf:!nz(s),getChildrenText:iz,options:{gfm:!0,nodeId:!1,tagFilter:!1,softbreak:`
|
|
165
|
+
`},skipChildren:function(){d=!0}};if(a.closeUnmatchedHTMLInline(s,u),f(a,s,p),(r==null?void 0:r.node)===s){var v=a.stack.reduce(function(m,g){return m+g.content.reduce(function(E,w){return E+w.nodeSize},0)},0)+1;r.setMappedPos(v)}}d&&(n.resumeAt(s,!1),n.next()),i=n.next()},a=this;i;)o()},t.prototype.convertNode=function(e,r){return this.convert(e,r),this.stack.length?this.closeNode():null},t}();function VMe(t,e,r){var n=r[0],i=r[1];t.write(n),t.convertInline(e),t.write(i)}function WMe(t,e,r){var n=e.node,i=e.parent,o=r[0],a=r[1];t.stopNewline=!0,t.write(o),t.convertNode(n),t.write(a),(i==null?void 0:i.type.name)==="doc"&&(t.closeBlock(n),t.stopNewline=!1)}function jMe(t,e){var r=t.length,n="",i="";return e==="left"?(n=":",r-=1):e==="right"?(i=":",r-=1):e==="center"&&(n=":",i=":",r-=2),""+n+vf("-",Math.max(r,3))+i}var Rm={text:function(t,e){var r,n=e.node,i=(r=n.text)!==null&&r!==void 0?r:"";(n.marks||[]).some(function(o){return o.type.name==="link"})?t.text(mf(i),!1):t.text(i)},paragraph:function(t,e){var r=e.node,n=e.parent,i=e.index,o=i===void 0?0:i;if(t.stopNewline)t.convertInline(r);else{var a=o===0,s=!a&&n.child(o-1),u=s&&s.childCount===0,f=o<n.childCount-1&&n.child(o+1),d=f&&f.type.name==="paragraph",p=r.childCount===0;if(p&&u)t.write(`<br>
|
|
166
|
+
`);else if(p&&!u&&!a){if((n==null?void 0:n.type.name)==="listItem"){var v=t.getDelim();t.setDelim(""),t.write("<br>"),t.setDelim(v)}t.write(`
|
|
167
|
+
`)}else t.convertInline(r),d?t.write(`
|
|
168
|
+
`):t.closeBlock(r)}},heading:function(t,e,r){var n=e.node,i=r.delim,o=n.attrs.headingType;o==="atx"?(t.write(i+" "),t.convertInline(n),t.closeBlock(n)):(t.convertInline(n),t.ensureNewLine(),t.write(i),t.closeBlock(n))},codeBlock:function(t,e,r){var n=e.node,i=r.delim,o=r.text,a=i,s=a[0],u=a[1];t.write(s),t.ensureNewLine(),t.text(o,!1),t.ensureNewLine(),t.write(u),t.closeBlock(n)},blockQuote:function(t,e,r){var n=e.node,i=e.parent,o=r.delim;(i==null?void 0:i.type.name)===n.type.name&&t.flushClose(1),t.wrapBlock(o,null,n,function(){return t.convertNode(n)})},bulletList:function(t,e,r){var n=e.node,i=r.delim;t.convertList(n,vf(" ",4),function(){return i+" "})},orderedList:function(t,e){var r=e.node,n=r.attrs.order||1;t.convertList(r,vf(" ",4),function(i){var o=String(n+i);return o+". "})},listItem:function(t,e){var r=e.node,n=r.attrs,i=n.task,o=n.checked;i&&t.write("["+(o?"x":" ")+"] "),t.convertNode(r)},image:function(t,e,r){var n=r.attrs;t.write("+")")},thematicBreak:function(t,e,r){var n=e.node,i=r.delim;t.write(i),t.closeBlock(n)},table:function(t,e){var r=e.node;t.convertNode(r),t.closeBlock(r)},tableHead:function(t,e,r){var n=e.node,i=r.delim,o=n.firstChild;t.convertNode(n);var a=i??"";!i&&o&&o.forEach(function(s){var u=s.textContent,f=s.attrs,d=jMe(u,f.align);a+="| "+d+" "}),t.write(a+"|"),t.ensureNewLine()},tableBody:function(t,e){var r=e.node;t.convertNode(r)},tableRow:function(t,e){var r=e.node;t.convertNode(r),t.write("|"),t.ensureNewLine()},tableHeadCell:function(t,e,r){var n=e.node,i=r.delim,o=i===void 0?"| ":i;t.write(o),t.convertTableCell(n),t.write(" ")},tableBodyCell:function(t,e,r){var n=e.node,i=r.delim,o=i===void 0?"| ":i;t.write(o),t.convertTableCell(n),t.write(" ")},customBlock:function(t,e,r){var n=e.node,i=r.delim,o=r.text,a=i,s=a[0],u=a[1];t.write(s),t.ensureNewLine(),t.text(o,!1),t.ensureNewLine(),t.write(u),t.closeBlock(n)},frontMatter:function(t,e,r){var n=e.node,i=r.text;t.text(i,!1),t.closeBlock(n)},widget:function(t,e,r){var n=r.text;t.write(n)},html:function(t,e,r){var n=e.node,i=r.text;t.write(i),n.attrs.htmlBlock&&t.closeBlock(n)},htmlComment:function(t,e,r){var n=e.node,i=r.text;t.write(i),t.closeBlock(n)}};function GMe(t,e){var r=e.state,n=e.nodeInfo,i=e.params,o=i.rawHTML;o?Aa(t,["heading","codeBlock"])>-1?VMe(r,n.node,o):Aa(t,["image","thematicBreak"])>-1?r.write(o):WMe(r,n,o):Rm[t](r,n,i)}function ET(t,e){var r=t.text,n=/`+/g,i=0;if(t.isText&&r)for(var o=n.exec(r);o;)i=Math.max(i,o[0].length),o=n.exec(r);for(var a=i>0&&e>0?" `":"`",s=0;s<i;s+=1)a+="`";return i>0&&e<0&&(a+=" "),a}function ii(t){return t?["<"+t+">","</"+t+">"]:null}function xu(t){return t?"<"+t+">":null}function Cu(t){return t?"</"+t+">":null}var ku={heading:function(t){var e=t.node,r=e.attrs,n=r.level,i=vf("#",n);return r.headingType==="setext"&&(i=n===1?"===":"---"),{delim:i,rawHTML:ii(r.rawHTML)}},codeBlock:function(t){var e=t.node,r=e,n=r.attrs,i=r.textContent;return{delim:["```"+(n.language||""),"```"],rawHTML:ii(n.rawHTML),text:i}},blockQuote:function(t){var e=t.node;return{delim:"> ",rawHTML:ii(e.attrs.rawHTML)}},bulletList:function(t,e){var r=t.node,n=e.inTable,i=r.attrs.rawHTML;return n&&(i=i||"ul"),{delim:"*",rawHTML:ii(i)}},orderedList:function(t,e){var r=t.node,n=e.inTable,i=r.attrs.rawHTML;return n&&(i=i||"ol"),{rawHTML:ii(i)}},listItem:function(t,e){var r=t.node,n=e.inTable,i=r.attrs,o=i.task,a=i.checked,s=r.attrs.rawHTML;n&&(s=s||"li");var u=o?' class="task-list-item'+(a?" checked":"")+'"':"",f=o?" data-task"+(a?" data-task-checked":""):"";return{rawHTML:s?["<"+s+u+f+">","</"+s+">"]:null}},table:function(t){var e=t.node;return{rawHTML:ii(e.attrs.rawHTML)}},tableHead:function(t){var e=t.node;return{rawHTML:ii(e.attrs.rawHTML)}},tableBody:function(t){var e=t.node;return{rawHTML:ii(e.attrs.rawHTML)}},tableRow:function(t){var e=t.node;return{rawHTML:ii(e.attrs.rawHTML)}},tableHeadCell:function(t){var e=t.node;return{rawHTML:ii(e.attrs.rawHTML)}},tableBodyCell:function(t){var e=t.node;return{rawHTML:ii(e.attrs.rawHTML)}},image:function(t){var e=t.node,r=e.attrs,n=r.rawHTML,i=r.altText,o=r.imageUrl.replace(/&/g,"&"),a=i?' alt="'+Ps(i)+'"':"";return{rawHTML:n?"<"+n+' src="'+Ps(o)+'"'+a+">":null,attrs:{altText:mf(i||""),imageUrl:o}}},thematicBreak:function(t){var e=t.node;return{delim:"***",rawHTML:xu(e.attrs.rawHTML)}},customBlock:function(t){var e=t.node,r=e,n=r.attrs,i=r.textContent;return{delim:["$$"+n.info,"$$"],text:i}},frontMatter:function(t){var e=t.node;return{text:e.textContent}},widget:function(t){var e=t.node;return{text:e.textContent}},strong:function(t,e){var r=t.node,n=e.entering,i=r.attrs.rawHTML;return{delim:"**",rawHTML:n?xu(i):Cu(i)}},emph:function(t,e){var r=t.node,n=e.entering,i=r.attrs.rawHTML;return{delim:"*",rawHTML:n?xu(i):Cu(i)}},strike:function(t,e){var r=t.node,n=e.entering,i=r.attrs.rawHTML;return{delim:"~~",rawHTML:n?xu(i):Cu(i)}},link:function(t,e){var r=t.node,n=e.entering,i=r.attrs,o=i.title,a=i.rawHTML,s=i.linkUrl.replace(/&/g,"&"),u=o?' title="'+Ps(o)+'"':"";return n?{delim:"[",rawHTML:a?"<"+a+' href="'+Ps(s)+'"'+u+">":null}:{delim:"]("+s+(o?" "+j4(mf(o)):"")+")",rawHTML:Cu(a)}},code:function(t,e){var r=t.node,n=t.parent,i=t.index,o=i===void 0?0:i,a=e.entering,s=a?ET(n.child(o),-1):ET(n.child(o-1),1),u=a?xu(r.attrs.rawHTML):Cu(r.attrs.rawHTML);return{delim:s,rawHTML:u}},htmlComment:function(t){var e=t.node;return{text:e.textContent}},html:function(t,e){var r=t.node,n=e.entering,i=r.type.name,o=r.attrs.htmlAttrs,a="<"+i,s="</"+i+">";return Object.keys(o).forEach(function(u){a+=" "+u+'="'+o[u].replace(/"/g,"'")+'"'}),a+=">",r.attrs.htmlInline?{rawHTML:n?a:s}:{text:""+a+r.attrs.childrenHTML+s}}},xT={strong:{mixable:!0,removedEnclosingWhitespace:!0},emph:{mixable:!0,removedEnclosingWhitespace:!0},strike:{mixable:!0,removedEnclosingWhitespace:!0},code:{escape:!1},link:null,html:null};function KMe(t){var e={},r=Object.keys(Rm);return r.forEach(function(n){e[n]=function(i,o){var a=Rm[n];if(a){var s=t[n],u=s?s(o,{inTable:i.inTable}):{};GMe(n,{state:i,nodeInfo:o,params:u})}}}),e}function YMe(t){var e={},r=Object.keys(xT);return r.forEach(function(n){e[n]=function(i,o){var a=xT[n],s=t[n],u=s&&i&&!ei(o),f=u?s(i,{entering:o}):{};return q(q({},f),a)}}),e}function XMe(t){var e=Object.keys(t);e.forEach(function(i){var o=ku[i],a=t[i];o?ku[i]=function(s,u){return u.origin=function(){return o(s,u)},a(s,u)}:ku[i]=a,delete t[i]});var r=KMe(ku),n=YMe(ku);return{nodeTypeConvertors:r,markTypeConvertors:n}}var JMe=function(){function t(e){var r=e.nodeTypeConvertors,n=e.markTypeConvertors;this.nodeTypeConvertors=r,this.markTypeConvertors=n,this.delim="",this.result="",this.closed=!1,this.tightList=!1,this.stopNewline=!1,this.inTable=!1}return t.prototype.getMarkConvertor=function(e){var r=e.attrs.htmlInline?"html":e.type.name;return this.markTypeConvertors[r]},t.prototype.isInBlank=function(){return/(^|\n)$/.test(this.result)},t.prototype.markText=function(e,r,n,i){var o=this.getMarkConvertor(e);if(o){var a=o({node:e,parent:n,index:i},r),s=a.delim,u=a.rawHTML;return u||s}return""},t.prototype.setDelim=function(e){this.delim=e},t.prototype.getDelim=function(){return this.delim},t.prototype.flushClose=function(e){if(!this.stopNewline&&this.closed){if(this.isInBlank()||(this.result+=`
|
|
169
|
+
`),e||(e=2),e>1){var r=this.delim,n=/\s+$/.exec(r);n&&(r=r.slice(0,r.length-n[0].length));for(var i=1;i<e;i+=1)this.result+=r+`
|
|
170
|
+
`}this.closed=!1}},t.prototype.wrapBlock=function(e,r,n,i){var o=this.getDelim();this.write(r||e),this.setDelim(this.getDelim()+e),i(),this.setDelim(o),this.closeBlock(n)},t.prototype.ensureNewLine=function(){this.isInBlank()||(this.result+=`
|
|
171
|
+
`)},t.prototype.write=function(e){e===void 0&&(e=""),this.flushClose(),this.delim&&this.isInBlank()&&(this.result+=this.delim),e&&(this.result+=e)},t.prototype.closeBlock=function(e){this.closed=e},t.prototype.text=function(e,r){r===void 0&&(r=!0);for(var n=e.split(`
|
|
172
|
+
`),i=0;i<n.length;i+=1)this.write(),this.result+=r?W4(n[i]):n[i],i!==n.length-1&&(this.result+=`
|
|
173
|
+
`)},t.prototype.convertBlock=function(e,r,n){var i=e.type.name,o=this.nodeTypeConvertors[i],a={node:e,parent:r,index:n};e.attrs.htmlBlock?this.nodeTypeConvertors.html(this,a):o&&o(this,a)},t.prototype.convertInline=function(e){var r=this,n=[],i="",o=function(a,s,u){var f=a?a.marks:[],d=i;i="";var p=a&&a.isText&&f.some(function(J){var re=r.getMarkConvertor(J),Se=re&&re();return Se&&Se.removedEnclosingWhitespace});if(p&&a&&a.text){var v=/^(\s*)(.*?)(\s*)$/m.exec(a.text),m=v[1],g=v[2],E=v[3];d+=m,i=E,(m||E)&&(a=g?a.withText(g):null,a||(f=n))}for(var w=f.length&&Nr(f),x=w&&r.getMarkConvertor(w),k=x&&x(),_=k&&k.escape===!1,O=f.length-(_?1:0),N=0;N<O;N+=1){var g=f[N];if(k&&!k.mixable)break;for(var L=0;L<n.length;L+=1){var A=n[L];if(k&&!k.mixable)break;if(g.eq(A)){N>L?f=f.slice(0,L).concat(g).concat(f.slice(L,N)).concat(f.slice(N+1,O)):L>N&&(f=f.slice(0,N).concat(f.slice(N+1,L)).concat(g).concat(f.slice(L,O)));break}}}for(var P=0;P<Math.min(n.length,O)&&f[P].eq(n[P]);)P+=1;for(;P<n.length;){var U=n.pop();U&&r.text(r.markText(U,!1,e,u),!1)}if(d&&r.text(d),a){for(;n.length<O;){var g=f[n.length];n.push(g),r.text(r.markText(g,!0,e,u),!1)}_&&a.isText?r.text(r.markText(w,!0,e,u)+a.text+r.markText(w,!1,e,u+1),!1):r.convertBlock(a,e,u)}};e.forEach(o),o(null,null,e.childCount)},t.prototype.convertList=function(e,r,n){var i=this,o;this.closed&&this.closed.type===e.type?this.flushClose(3):this.tightList&&this.flushClose(1);var a=(o=e.attrs.tight)!==null&&o!==void 0?o:!0,s=this.tightList;this.tightList=a,e.forEach(function(u,f,d){d&&a&&i.flushClose(1),i.wrapBlock(r,n(d),e,function(){return i.convertBlock(u,e,d)})}),this.tightList=s},t.prototype.convertTableCell=function(e){var r=this;this.stopNewline=!0,this.inTable=!0,e.forEach(function(n,i,o){if(vr(["bulletList","orderedList"],n.type.name))r.convertBlock(n,e,o),r.closed=!1;else if(r.convertInline(n),o<e.childCount-1){var a=e.child(o+1);a.type.name==="paragraph"&&r.write("<br>")}}),this.stopNewline=!1,this.inTable=!1},t.prototype.convertNode=function(e,r){var n=this;return e.forEach(function(i,o,a){if(n.convertBlock(i,e,a),(r==null?void 0:r.node)===i){var s=n.result.split(`
|
|
174
|
+
`);r.setMappedPos([s.length,Nr(s).length+1])}}),this.result},t}(),ZMe=function(){function t(e,r,n,i){var o=this;this.setMappedPos=function(a){o.mappedPosWhenConverting=a},this.schema=e,this.eventEmitter=i,this.focusedNode=null,this.mappedPosWhenConverting=null,this.toWwConvertors=UMe(n),this.toMdConvertors=XMe(r||{}),this.eventEmitter.listen("setFocusedNode",function(a){return o.focusedNode=a})}return t.prototype.getMappedPos=function(){return this.mappedPosWhenConverting},t.prototype.getInfoForPosSync=function(){return{node:this.focusedNode,setMappedPos:this.setMappedPos}},t.prototype.toWysiwygModel=function(e){var r=new qMe(this.schema,this.toWwConvertors);return r.convertNode(e,this.getInfoForPosSync())},t.prototype.toMarkdownText=function(e){var r=new JMe(this.toMdConvertors),n=r.convertNode(e,this.getInfoForPosSync());return n=this.eventEmitter.emitReduce("beforeConvertWysiwygToMarkdown",n),n},t}();function QMe(t){var e=t.plugin,r=t.eventEmitter,n=t.usageStatistics,i=t.instance,o={Plugin:rn,PluginKey:eu,Selection:rt,TextSelection:it},a={Decoration:on,DecorationSet:Rt},s={Fragment:oe},u={InputRule:Bo,inputRules:dx,undoInputRule:HU},f={keymap:cu},d={eventEmitter:r,usageStatistics:n,instance:i,pmState:o,pmView:a,pmModel:s,pmRules:u,pmKeymap:f,i18n:Ve};if(Is(e)){var p=e[0],v=e[1],m=v===void 0?{}:v;return p(d,m)}return e(d)}function CT(t){var e=t.plugins,r=t.eventEmitter,n=t.usageStatistics,i=t.instance;return r.listen("mixinTableOffsetMapPrototype",NOe),(e??[]).reduce(function(o,a){var s=QMe({plugin:a,eventEmitter:r,usageStatistics:n,instance:i});if(!s)throw new Error("The return value of the executed plugin is empty.");var u=s.markdownParsers,f=s.toHTMLRenderers,d=s.toMarkdownRenderers,p=s.markdownPlugins,v=s.wysiwygPlugins,m=s.wysiwygNodeViews,g=s.markdownCommands,E=s.wysiwygCommands,w=s.toolbarItems;return f&&(o.toHTMLRenderers=gf(o.toHTMLRenderers,f)),d&&(o.toMarkdownRenderers=gf(o.toMarkdownRenderers,d)),p&&(o.mdPlugins=o.mdPlugins.concat(p)),v&&(o.wwPlugins=o.wwPlugins.concat(v)),m&&(o.wwNodeViews=q(q({},o.wwNodeViews),m)),g&&(o.mdCommands=q(q({},o.mdCommands),g)),E&&(o.wwCommands=q(q({},o.wwCommands),E)),w&&(o.toolbarItems=o.toolbarItems.concat(w)),u&&(o.markdownParsers=q(q({},o.markdownParsers),u)),o},{toHTMLRenderers:{},toMarkdownRenderers:{},mdPlugins:[],wwPlugins:[],wwNodeViews:{},mdCommands:{},wwCommands:{},toolbarItems:[],markdownParsers:{}})}var eNe="data-task",tNe="data-task-disabled",rNe="checked";function nNe(t){["htmlBlock","htmlInline"].forEach(function(e){t[e]&&Object.keys(t[e]).forEach(function(r){return Bk(r)})})}var kT=function(){function t(e){var r=this;this.options=yv({linkAttributes:null,extendedAutolinks:!1,customHTMLRenderer:null,referenceDefinition:!1,customHTMLSanitizer:null,frontMatter:!1,usageStatistics:!0,theme:"light"},e),this.eventEmitter=new vT;var n=_x(this.options.linkAttributes),i=CT({plugins:this.options.plugins,eventEmitter:this.eventEmitter,usageStatistics:this.options.usageStatistics,instance:this})||{},o=i.toHTMLRenderers,a=i.markdownParsers,s=this.options,u=s.customHTMLRenderer,f=s.extendedAutolinks,d=s.referenceDefinition,p=s.frontMatter,v=s.customHTMLSanitizer,m={linkAttributes:n,customHTMLRenderer:q(q({},o),u),extendedAutolinks:f,referenceDefinition:d,frontMatter:p,sanitizer:v||Ha};nNe(m.customHTMLRenderer),this.options.events&&Ds(this.options.events,function(_,O){r.on(O,_)});var g=this.options,E=g.el,w=g.initialValue,x=g.theme,k=E.innerHTML;x!=="light"&&E.classList.add(_e(x)),E.innerHTML="",this.toastMark=new Ek("",{disallowedHtmlBlockTags:["br","img"],extendedAutolinks:f,referenceDefinition:d,disallowDeepHeading:!0,frontMatter:p,customParser:a}),this.preview=new zk(this.eventEmitter,q(q({},m),{isViewer:!0})),CC(this.preview.previewContent,"mousedown",this.toggleTask.bind(this)),w?this.setMarkdown(w):k&&this.preview.setHTML(k),E.appendChild(this.preview.previewContent),this.eventEmitter.emit("load",this)}return t.prototype.toggleTask=function(e){var r=e.target,n=getComputedStyle(r,":before");!r.hasAttribute(tNe)&&r.hasAttribute(eNe)&&Mv(n,e.offsetX,e.offsetY)&&(Nv(r,rNe),this.eventEmitter.emit("change",{source:"viewer",date:e}))},t.prototype.setMarkdown=function(e){var r=this.toastMark.getLineTexts(),n=r.length,i=Nr(r),o=[n,i.length+1],a=this.toastMark.editMarkdown([1,1],o,e||"");this.eventEmitter.emit("updatePreview",a)},t.prototype.on=function(e,r){this.eventEmitter.listen(e,r)},t.prototype.off=function(e){this.eventEmitter.removeEventHandler(e)},t.prototype.addHook=function(e,r){this.eventEmitter.removeEventHandler(e),this.eventEmitter.listen(e,r)},t.prototype.destroy=function(){EC(this.preview.el,"mousedown",this.toggleTask.bind(this)),this.preview.destroy(),this.eventEmitter.emit("destroy")},t.prototype.isViewer=function(){return!0},t.prototype.isMarkdownMode=function(){return!1},t.prototype.isWysiwygMode=function(){return!1},t}();function rd(t){return t instanceof To}function TT(t){var e=["document","blockQuote","bulletList","orderedList","listItem","paragraph","heading","emph","strong","strike","link","image","table","tableHead","tableBody","tableRow","tableHeadCell","tableBodyCell"];return vr(e,t)}function iNe(t){var e=t.attrs,r=t.type,n=r.name,i={type:n,wysiwygNode:!0,literal:!TT(n)&&rd(t)?t.textContent:null},o={heading:{level:e.level},link:{destination:e.linkUrl,title:e.title},image:{destination:e.imageUrl},codeBlock:{info:e.language},bulletList:{type:"list",listData:{type:"bullet"}},orderedList:{type:"list",listData:{type:"ordered",start:e.order}},listItem:{type:"item",listData:{task:e.task,checked:e.checked}},tableHeadCell:{type:"tableCell",cellType:"head",align:e.align},tableBodyCell:{type:"tableCell",cellType:"body",align:e.align},customBlock:{info:e.info}},a=o[n],s=q(q({},i),a),u=t.attrs,f=u.htmlAttrs,d=u.childrenHTML;return f?q(q({},s),{attrs:f,childrenHTML:d}):s}var oNe={openTag:function(t,e){var r=t,n=r.tagName,i=r.classNames,o=r.attributes,a=document.createElement(n),s={};i&&(a.className=i.join(" ")),o&&(s=q(q({},s),o)),Dv(s,a),e.push(a)},closeTag:function(t,e){if(e.length>1){var r=e.pop();Nr(e).appendChild(r)}},html:function(t,e){Nr(e).insertAdjacentHTML("beforeend",t.content)},text:function(t,e){var r=document.createTextNode(t.content);Nr(e).appendChild(r)}},aNe=function(){function t(e,r){var n=km(e,r),i=q(q({},r.htmlBlock),r.htmlInline);this.customConvertorKeys=Object.keys(r).concat(Object.keys(i)),this.renderer=new mm({gfm:!0,convertors:q(q({},n),i)}),this.convertors=this.renderer.getConvertors()}return t.prototype.generateTokens=function(e){var r=iNe(e),n={entering:!0,leaf:rd(e)?e.isLeaf:!1,options:this.renderer.getOptions(),getChildrenText:function(){return rd(e)?e.textContent:""},skipChildren:function(){return!1}},i=this.convertors[e.type.name],o=i(r,n,this.convertors),a=Is(o)?o:[o];return(TT(e.type.name)||e.attrs.htmlInline)&&(n.entering=!1,a.push({type:"text",content:rd(e)?e.textContent:""}),a=a.concat(i(r,n,this.convertors))),a},t.prototype.toDOMNode=function(e){var r=this.generateTokens(e),n=[];return r.forEach(function(i){return oNe[i.type](i,n)}),n[0]},t.prototype.getToDOMNode=function(e){return vr(this.customConvertorKeys,e)?this.toDOMNode.bind(this):null},t}(),sNe=100,lNe=15,nd=null,Pm=null;function ST(t,e){var r=e.syncScrollTop,n=e.releaseEventBlock;Pm&&clearTimeout(Pm),r(t),Pm=setTimeout(function(){n()},lNe)}function uNe(t,e,r){var n=e-t,i=Date.now(),o=function(){var a=Date.now(),s=(a-i)/sNe,u;nd&&clearTimeout(nd),s<1?(u=t+n*Math.cos((1-s)*Math.PI/2),ST(Math.ceil(u),r),nd=setTimeout(o,1)):(ST(e,r),nd=null)};o()}var cNe=18,fNe=function(){function t(e,r,n){this.latestEditorScrollTop=null,this.latestPreviewScrollTop=null,this.blockedScroll=null,this.active=!0,this.timer=null;var i=r.previewContent,o=r.el;this.previewRoot=i,this.previewEl=o,this.mdEditor=e,this.editorView=e.view,this.toastMark=e.getToastMark(),this.eventEmitter=n,this.addScrollSyncEvent()}return t.prototype.addScrollSyncEvent=function(){var e=this;this.eventEmitter.listen("afterPreviewRender",function(){e.clearTimer(),e.timer=setTimeout(function(){e.syncPreviewScrollTop(!0)},200)}),this.eventEmitter.listen("scroll",function(r,n){e.active&&(r==="editor"&&e.blockedScroll!=="editor"?e.syncPreviewScrollTop():r==="preview"&&e.blockedScroll!=="preview"&&e.syncEditorScrollTop(n))}),this.eventEmitter.listen("toggleScrollSync",function(r){e.active=r})},t.prototype.getMdNodeAtPos=function(e,r){var n=e.content.findIndex(r.pos),i=n.index;return this.toastMark.findFirstNodeAtLine(i+1)},t.prototype.getScrollTopByCaretPos=function(){var e=this.mdEditor.getSelection(),r=this.toastMark.findFirstNodeAtLine(e[0][0]),n=this.previewEl.clientHeight,i=Tm(this.previewRoot,r).el,o=Xf(i,this.previewRoot)||i.offsetTop,a=i.clientHeight,s=o+a-n*.5;this.latestEditorScrollTop=null;var u=i.getBoundingClientRect().top-this.previewEl.getBoundingClientRect().top;return u<n?null:s},t.prototype.syncPreviewScrollTop=function(e){e===void 0&&(e=!1);var r=this,n=r.editorView,i=r.previewEl,o=r.previewRoot,a=n.dom.getBoundingClientRect(),s=a.left,u=a.top,f=n.posAtCoords({left:s,top:u}),d=n.state.doc,p=this.getMdNodeAtPos(d,f);if(!(!p||X4(p))){var v=i.scrollTop,m=n.dom,g=m.scrollTop,E=m.scrollHeight,w=m.clientHeight,x=m.children,k=E-g<=w+cNe,_=k?i.scrollHeight:0;if(g&&!k){if(e){var O=this.getScrollTopByCaretPos();if(!O)return;_=O}else{var N=Tm(this.previewRoot,p),L=N.el,A=N.mdNode,P=Hk(d,A,x),U=P.height,J=P.rect,re=Xf(L,o)||L.offsetTop,Se=L.clientHeight,Fe=u>J.top?Math.min((u-J.top)/U,1):0;_=re+Se*Fe}_=this.getResolvedScrollTop("editor",g,_,v),this.latestEditorScrollTop=g}_!==v&&this.run("editor",_,v)}},t.prototype.syncEditorScrollTop=function(e){var r=this,n=r.toastMark,i=r.editorView,o=r.previewRoot,a=r.previewEl,s=i.dom,u=i.state,f=a.scrollTop,d=a.clientHeight,p=a.scrollHeight,v=p-f<=d,m=s.scrollTop,g=v?s.scrollHeight:0;if(f&&e&&!v){if(e=sOe(e,o),!e.getAttribute("data-nodeid"))return;var E=s.children,w=Number(e.getAttribute("data-nodeid")),x=Tm(this.previewRoot,n.findNodeById(w)),k=x.mdNode,_=x.el,O=pu(k);g=E[O-1].offsetTop;var N=Hk(u.doc,k,E).height,L=vOe(_,o,w),A=L.nodeHeight,P=L.offsetTop;g+=uOe(f,P,A,N),g=this.getResolvedScrollTop("preview",f,g,m),this.latestPreviewScrollTop=f}g!==m&&this.run("preview",g,m)},t.prototype.getResolvedScrollTop=function(e,r,n,i){var o=e==="editor"?this.latestEditorScrollTop:this.latestPreviewScrollTop;return o===null?n:o<r?Math.max(n,i):Math.min(n,i)},t.prototype.run=function(e,r,n){var i=this,o;e==="editor"?(o=this.previewEl,this.blockedScroll="preview"):(o=this.editorView.dom,this.blockedScroll="editor");var a={syncScrollTop:function(s){return o.scrollTop=s},releaseEventBlock:function(){return i.blockedScroll=null}};uNe(n,r,a)},t.prototype.clearTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},t.prototype.destroy=function(){this.clearTimer(),this.eventEmitter.removeEventHandler("scroll"),this.eventEmitter.removeEventHandler("afterPreviewRender")},t}(),dNe={getPopupInitialValues:function(t,e){var r=e.popupName;return r==="link"?{linkText:t.getSelectedText()}:{}}};function pNe(t){t.eventEmitter.listen("query",function(e,r){return dNe[e](t,r)})}var _T=function(){function t(e){var r=this;this.initialHTML=e.el.innerHTML,e.el.innerHTML="",this.options=yv({previewStyle:"tab",previewHighlight:!0,initialEditType:"markdown",height:"300px",minHeight:"200px",language:"en-US",useCommandShortcut:!0,usageStatistics:!0,toolbarItems:[["heading","bold","italic","strike"],["hr","quote"],["ul","ol","task","indent","outdent"],["table","image","link"],["code","codeblock"],["scrollSync"]],hideModeSwitch:!1,linkAttributes:null,extendedAutolinks:!1,customHTMLRenderer:null,customMarkdownRenderer:null,referenceDefinition:!1,customHTMLSanitizer:null,frontMatter:!1,widgetRules:[],theme:"light",autofocus:!0},e);var n=this.options,i=n.customHTMLRenderer,o=n.extendedAutolinks,a=n.referenceDefinition,s=n.frontMatter,u=n.customMarkdownRenderer,f=n.useCommandShortcut,d=n.initialEditType,p=n.widgetRules,v=n.customHTMLSanitizer;this.mode=d||"markdown",this.mdPreviewStyle=this.options.previewStyle,this.i18n=Ve,this.i18n.setCode(this.options.language),this.eventEmitter=new vT,az(p);var m=_x(this.options.linkAttributes);this.pluginInfo=CT({plugins:this.options.plugins,eventEmitter:this.eventEmitter,usageStatistics:this.options.usageStatistics,instance:this});var g=this.pluginInfo,E=g.toHTMLRenderers,w=g.toMarkdownRenderers,x=g.mdPlugins,k=g.wwPlugins,_=g.wwNodeViews,O=g.mdCommands,N=g.wwCommands,L=g.markdownParsers,A={linkAttributes:m,customHTMLRenderer:gf(E,i),extendedAutolinks:o,referenceDefinition:a,frontMatter:s,sanitizer:v||Ha},P=new aNe(m,A.customHTMLRenderer),U=eOe(A.customHTMLRenderer,A.sanitizer,P);this.toastMark=new Ek("",{disallowedHtmlBlockTags:["br","img"],extendedAutolinks:o,referenceDefinition:a,disallowDeepHeading:!0,frontMatter:s,customParser:L}),this.mdEditor=new lq(this.eventEmitter,{toastMark:this.toastMark,useCommandShortcut:f,mdPlugins:x}),this.preview=new zk(this.eventEmitter,q(q({},A),{isViewer:!1,highlight:this.options.previewHighlight})),this.wwEditor=new TMe(this.eventEmitter,{toDOMAdaptor:P,useCommandShortcut:f,htmlSchemaMap:U,linkAttributes:m,wwPlugins:k,wwNodeViews:_}),this.convertor=new ZMe(this.wwEditor.getSchema(),q(q({},w),u),km(m,A.customHTMLRenderer),this.eventEmitter),this.setMinHeight(this.options.minHeight),this.setHeight(this.options.height),this.setMarkdown(this.options.initialValue,!1),this.options.placeholder&&this.setPlaceholder(this.options.placeholder),this.options.initialValue||this.setHTML(this.initialHTML,!1),this.commandManager=new PMe(this.eventEmitter,this.mdEditor.commands,this.wwEditor.commands,function(){return r.mode}),this.options.usageStatistics&&U4(),this.scrollSync=new fNe(this.mdEditor,this.preview,this.eventEmitter),this.addInitEvent(),this.addInitCommand(O,N),pNe(this),this.options.hooks&&Ds(this.options.hooks,function(J,re){return r.addHook(re,J)}),this.options.events&&Ds(this.options.events,function(J,re){return r.on(re,J)}),this.eventEmitter.emit("load",this),this.moveCursorToStart(this.options.autofocus)}return t.prototype.addInitEvent=function(){var e=this;this.on("needChangeMode",this.changeMode.bind(this)),this.on("loadUI",function(){if(e.height!=="auto"){var r=Math.min(parseInt(e.minHeight,10),parseInt(e.height,10)-75)+"px";e.setMinHeight(r)}}),Lz(this.eventEmitter)},t.prototype.addInitCommand=function(e,r){var n=this,i=function(o,a){Object.keys(a).forEach(function(s){n.addCommand(o,s,a[s])})};this.addCommand("markdown","toggleScrollSync",function(o){return n.eventEmitter.emit("toggleScrollSync",o.active),!0}),i("markdown",e),i("wysiwyg",r)},t.prototype.getCurrentModeEditor=function(){return this.isMarkdownMode()?this.mdEditor:this.wwEditor},t.factory=function(e){return e.viewer?new kT(e):new t(e)},t.setLanguage=function(e,r){Ve.setLanguage(e,r)},t.prototype.changePreviewStyle=function(e){this.mdPreviewStyle!==e&&(this.mdPreviewStyle=e,this.eventEmitter.emit("changePreviewStyle",e))},t.prototype.exec=function(e,r){this.commandManager.exec(e,r)},t.prototype.addCommand=function(e,r,n){var i=this,o=function(a){a===void 0&&(a={});var s=(e==="markdown"?i.mdEditor:i.wwEditor).view;n(a,s.state,s.dispatch,s)};this.commandManager.addCommand(e,r,o)},t.prototype.on=function(e,r){this.eventEmitter.listen(e,r)},t.prototype.off=function(e){this.eventEmitter.removeEventHandler(e)},t.prototype.addHook=function(e,r){this.eventEmitter.removeEventHandler(e),this.eventEmitter.listen(e,r)},t.prototype.removeHook=function(e){this.eventEmitter.removeEventHandler(e)},t.prototype.focus=function(){this.getCurrentModeEditor().focus()},t.prototype.blur=function(){this.getCurrentModeEditor().blur()},t.prototype.moveCursorToEnd=function(e){e===void 0&&(e=!0),this.getCurrentModeEditor().moveCursorToEnd(e)},t.prototype.moveCursorToStart=function(e){e===void 0&&(e=!0),this.getCurrentModeEditor().moveCursorToStart(e)},t.prototype.setMarkdown=function(e,r){if(e===void 0&&(e=""),r===void 0&&(r=!0),this.mdEditor.setMarkdown(e,r),this.isWysiwygMode()){var n=this.toastMark.getRootNode(),i=this.convertor.toWysiwygModel(n);this.wwEditor.setModel(i,r)}},t.prototype.setHTML=function(e,r){e===void 0&&(e=""),r===void 0&&(r=!0);var n=document.createElement("div");n.innerHTML=Az(e);var i=jc.fromSchema(this.wwEditor.schema).parse(n);this.isMarkdownMode()?this.mdEditor.setMarkdown(this.convertor.toMarkdownText(i),r):this.wwEditor.setModel(i,r)},t.prototype.getMarkdown=function(){return this.isMarkdownMode()?this.mdEditor.getMarkdown():this.convertor.toMarkdownText(this.wwEditor.getModel())},t.prototype.getHTML=function(){var e=this;this.eventEmitter.holdEventInvoke(function(){if(e.isMarkdownMode()){var i=e.toastMark.getRootNode(),o=e.convertor.toWysiwygModel(i);e.wwEditor.setModel(o)}});var r=Iv(this.wwEditor.view.dom.innerHTML);if(this.placeholder){var n=new RegExp('<span class="placeholder[^>]+>'+this.placeholder+"</span>","i");return r.replace(n,"")}return r},t.prototype.insertText=function(e){this.getCurrentModeEditor().replaceSelection(e)},t.prototype.setSelection=function(e,r){this.getCurrentModeEditor().setSelection(e,r)},t.prototype.replaceSelection=function(e,r,n){this.getCurrentModeEditor().replaceSelection(e,r,n)},t.prototype.deleteSelection=function(e,r){this.getCurrentModeEditor().deleteSelection(e,r)},t.prototype.getSelectedText=function(e,r){return this.getCurrentModeEditor().getSelectedText(e,r)},t.prototype.getRangeInfoOfNode=function(e){return this.getCurrentModeEditor().getRangeInfoOfNode(e)},t.prototype.addWidget=function(e,r,n){this.getCurrentModeEditor().addWidget(e,r,n)},t.prototype.replaceWithWidget=function(e,r,n){this.getCurrentModeEditor().replaceWithWidget(e,r,n)},t.prototype.setHeight=function(e){var r=this.options.el;ji(e)&&(e==="auto"?ki(r,"auto-height"):ti(r,"auto-height"),this.setMinHeight(this.getMinHeight())),Ci(r,{height:e}),this.height=e},t.prototype.getHeight=function(){return this.height},t.prototype.setMinHeight=function(e){if(e!==this.minHeight){var r=this.height||this.options.height;r!=="auto"&&this.options.el.querySelector("."+_e("main"))&&(e=Math.min(parseInt(e,10),parseInt(r,10)-75)+"px");var n=parseInt(e,10);this.minHeight=e,this.wwEditor.setMinHeight(n),this.mdEditor.setMinHeight(n),this.preview.setMinHeight(n)}},t.prototype.getMinHeight=function(){return this.minHeight},t.prototype.isMarkdownMode=function(){return this.mode==="markdown"},t.prototype.isWysiwygMode=function(){return this.mode==="wysiwyg"},t.prototype.isViewer=function(){return!1},t.prototype.getCurrentPreviewStyle=function(){return this.mdPreviewStyle},t.prototype.changeMode=function(e,r){if(this.mode!==e){if(this.mode=e,this.isWysiwygMode()){var n=this.toastMark.getRootNode(),i=this.convertor.toWysiwygModel(n);this.wwEditor.setModel(i)}else{var i=this.wwEditor.getModel();this.mdEditor.setMarkdown(this.convertor.toMarkdownText(i),!r)}if(this.eventEmitter.emit("removePopupWidget"),this.eventEmitter.emit("changeMode",e),!r){var o=this.convertor.getMappedPos();this.focus(),this.isWysiwygMode()&&Gi(o)?this.wwEditor.setSelection(o):Array.isArray(o)&&this.mdEditor.setSelection(o)}}},t.prototype.destroy=function(){var e=this;this.wwEditor.destroy(),this.mdEditor.destroy(),this.preview.destroy(),this.scrollSync.destroy(),this.eventEmitter.emit("destroy"),this.eventEmitter.getEvents().forEach(function(r,n){return e.off(n)})},t.prototype.hide=function(){this.eventEmitter.emit("hide")},t.prototype.show=function(){this.eventEmitter.emit("show")},t.prototype.setScrollTop=function(e){this.getCurrentModeEditor().setScrollTop(e)},t.prototype.getScrollTop=function(){return this.getCurrentModeEditor().getScrollTop()},t.prototype.reset=function(){this.wwEditor.setModel([]),this.mdEditor.setMarkdown("")},t.prototype.getSelection=function(){return this.getCurrentModeEditor().getSelection()},t.prototype.setPlaceholder=function(e){this.placeholder=e,this.mdEditor.setPlaceholder(e),this.wwEditor.setPlaceholder(e)},t.prototype.getEditorElements=function(){return{mdEditor:this.mdEditor.getElement(),mdPreview:this.preview.getElement(),wwEditor:this.wwEditor.getElement()}},t.prototype.convertPosToMatchEditorMode=function(e,r,n){var i,o;r===void 0&&(r=e),n===void 0&&(n=this.mode);var a=this.mdEditor.view.state.doc,s=Array.isArray(e),u=Array.isArray(r),f=e,d=r;if(s!==u)throw new Error("Types of arguments must be same");return n==="markdown"&&!s&&!u?(i=Sf(a,e,r),f=i[0],d=i[1]):n==="wysiwyg"&&s&&u&&(o=Da(a,e,r),f=o[0],d=o[1]),[f,d]},t}();function hNe(t){for(var e,r,n=arguments,i=1,o="",a="",s=[0],u=function(d){i===1&&(d||(o=o.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?s.push(d?n[d]:o):i===3&&(d||o)?(s[1]=d?n[d]:o,i=2):i===2&&o==="..."&&d?s[2]=Tv(s[2]||{},n[d]):i===2&&o&&!d?(s[2]=s[2]||{})[o]=!0:i>=5&&(i===5?((s[2]=s[2]||{})[r]=d?o?o+n[d]:n[d]:o,i=6):(d||o)&&(s[2][r]+=d?o+n[d]:o)),o=""},f=0;f<t.length;f++){f&&(i===1&&u(),u(f));for(let d=0;d<t[f].length;d++)e=t[f][d],i===1?e==="<"?(u(),s=[s,"",null],i=3):o+=e:i===4?o==="--"&&e===">"?(i=1,o=""):o=e+o[0]:a?e===a?a="":o+=e:e==='"'||e==="'"?a=e:e===">"?(u(),i=1):i&&(e==="="?(i=5,r=o,o=""):e==="/"&&(i<5||t[f][d+1]===">")?(u(),i===3&&(s=s[0]),i=s,(s=s[0]).push(this.apply(null,i.slice(1))),i=0):e===" "||e===" "||e===`
|
|
175
|
+
`||e==="\r"?(u(),i=2):o+=e),i===3&&o==="!--"&&(i=4,s=s[0])}return u(),s.length>2?s.slice(1):s[1]}function vNe(t){return typeof t=="boolean"||t instanceof Boolean}var mNe=vNe,gNe=function(){function t(e){this.current=e,this.root=e,this.entering=!0}return t.prototype.walk=function(){var e=this,r=e.entering,n=e.current;return n?(r?n.firstChild?(this.current=n.firstChild,this.entering=!0):this.entering=!1:n===this.root?this.current=null:n.next?(this.current=n.next,this.entering=!0):(this.current=n.parent,this.entering=!1),{vnode:n,entering:r}):null},t}(),oi=function(){function t(e,r,n){this.parent=null,this.old=null,this.firstChild=null,this.next=null,this.skip=!1,this.type=e,this.props=r,this.children=n,this.props.children=n,r.ref&&(this.ref=r.ref,delete r.ref),r.key&&(this.key=r.key,delete r.key)}return t.prototype.walker=function(){return new gNe(this)},t.removalNodes=[],t}();function yNe(t){return new oi("TEXT_NODE",{nodeValue:t},[])}function OT(t,e){var r=t;mNe(t)||t==null?r=null:(ji(t)||Gi(t))&&(r=yNe(String(t))),r&&e.push(r)}function bNe(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=[];return r.forEach(function(o){Array.isArray(o)?o.forEach(function(a){OT(a,i)}):OT(o,i)}),new oi(t,e||{},i)}var lt=hNe.bind(bNe);function wNe(t){return t===Object(t)}var ENe=wNe;function xNe(t){var e;return t.type==="TEXT_NODE"?e=document.createTextNode(t.props.nodeValue):(e=document.createElement(t.type),MT(e,{},t.props)),e}function AT(t,e){t.node?e.removeChild(t.node):AT(t.firstChild,e)}function CNe(t,e,r){Object.keys(e).forEach(function(n){if(/^on/.test(n)){if(!r[n]||e[n]!==r[n]){var i=n.slice(2).toLowerCase();t.removeEventListener(i,e[n])}}else n!=="children"&&!r[n]&&!kz(t)&&t.removeAttribute(n)}),MT(t,e,r,function(n){return!Ev(e[n],r[n])})}var kNe=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function MT(t,e,r,n){Object.keys(r).forEach(function(i){if(!n||n(i))if(/^on/.test(i)){var o=i.slice(2).toLowerCase();t.addEventListener(o,r[i])}else i==="nodeValue"?t[i]=r[i]:i==="style"&&ENe(r[i])?TNe(t,e[i],r[i]):i!=="children"&&(r[i]===!1?t.removeAttribute(i):t.setAttribute(i,r[i]))})}function TNe(t,e,r){e&&Object.keys(e).forEach(function(n){t.style[n]=""}),Object.keys(r).forEach(function(n){var i=r[n];t.style[n]=Gi(i)&&!kNe.test(n)?i+"px":i})}function Bm(t){if(oi.removalNodes.forEach(function(o){return LT(o)}),t){for(var e=void 0,r=t.walker();e=r.walk();)if(t=e.vnode,e.entering)LT(t);else if($n(t.type)){var n=t.component;if(!t.old&&n.mounted&&n.mounted(),t.old&&n.updated){var i=n.prevProps||{};n.updated(i)}}}}function NT(t){for(var e=t.parent;!e.node;)e=e.parent;return e.node}function LT(t){if(!(!t||!t.parent)){if(t.node){var e=NT(t);t.effect==="A"?e.appendChild(t.node):t.effect==="U"&&CNe(t.node,t.old.props,t.props)}if(t.effect==="D"){for(var r=void 0,n=t.walker();r=n.walk();)if(t=r.vnode,!r.entering)if($n(t.type)){var i=t.component;i.beforeDestroy&&i.beforeDestroy()}else{var e=NT(t);AT(t,e)}}t.ref&&(t.component?t.ref(t.component):t.node&&t.ref(t.node))}}function SNe(t,e){var r=e.props,n=e.component;return n?(n.prevProps=n.props,n.props=e.props,n):new t(r)}function DT(t){for(var e=t;t&&!t.skip;){if($n(t.type)){var r=SNe(t.type,t);r.vnode=t,t.component=r,t.props.children=t.children=[r.render()],IT(t)}else t.node||(t.node=xNe(t)),IT(t);if(t.firstChild)t=t.firstChild;else{for(;t&&t.parent&&!t.next&&(t=t.parent,t!==e););t=t.next}}}function _Ne(t,e){return t&&e&&e.type===t.type&&(!e.key||e.key===t.key)}function IT(t){var e=t.children,r=t.old?t.old.firstChild:null,n=null;e.forEach(function(o,a){var s=_Ne(r,o);s&&(o.old=r,o.parent=t,o.node=r.node,o.component=r.component,o.effect="U"),o&&!s&&(o.old=null,o.parent=t,o.node=null,o.effect="A"),r&&!s&&(oi.removalNodes.push(r),r.effect="D"),r&&(r=r.next),a===0?t.firstChild=o:o&&(n.next=o),n=o});var i=Nr(e);if(!e.length)for(;r;)oi.removalNodes.push(r),r.effect="D",r=r.next;for(;r&&i;)r&&i.old!==r&&(oi.removalNodes.push(r),r.effect="D",r=r.next)}function ONe(t){t.effect="D",oi.removalNodes=[t],Bm(),oi.removalNodes=[]}function ANe(t){var e=t.vnode;e.effect="U",e.old=e,e.next&&(e.next.skip=!0),oi.removalNodes=[],DT(e),Bm(e),e.next&&(e.next.skip=!1)}function MNe(t,e){var r=new oi(t.tagName.toLowerCase(),{},[e]);return r.node=t,oi.removalNodes=[],DT(r),Bm(r),function(){return ONe(r.firstChild)}}var Lr=function(){function t(e){this.props=e,this.state={},this.refs={}}return t.prototype.setState=function(e){var r=q(q({},this.state),e);Ev(this.state,r)||(this.state=r,ANe(this))},t}(),NNe=function(t){be(e,t);function e(r){var n=t.call(this,r)||this;return n.state={hide:!1},n}return e.prototype.show=function(){this.setState({hide:!1})},e.prototype.hide=function(){this.setState({hide:!0})},e.prototype.render=function(){var r=this.props,n=r.editorType,i=r.eventEmitter;return lt(RT||(RT=st([`
|
|
176
|
+
<div class="`,'" style="display: ',`">
|
|
177
|
+
<div
|
|
178
|
+
class="tab-item`,`"
|
|
179
|
+
onClick=`,`
|
|
180
|
+
>
|
|
181
|
+
`,`
|
|
182
|
+
</div>
|
|
183
|
+
<div
|
|
184
|
+
class="tab-item`,`"
|
|
185
|
+
onClick=`,`
|
|
186
|
+
>
|
|
187
|
+
`,`
|
|
188
|
+
</div>
|
|
189
|
+
</div>
|
|
190
|
+
`],[`
|
|
191
|
+
<div class="`,'" style="display: ',`">
|
|
192
|
+
<div
|
|
193
|
+
class="tab-item`,`"
|
|
194
|
+
onClick=`,`
|
|
195
|
+
>
|
|
196
|
+
`,`
|
|
197
|
+
</div>
|
|
198
|
+
<div
|
|
199
|
+
class="tab-item`,`"
|
|
200
|
+
onClick=`,`
|
|
201
|
+
>
|
|
202
|
+
`,`
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
`])),_e("mode-switch"),this.state.hide?"none":"block",n==="markdown"?" active":"",function(){i.emit("needChangeMode","markdown")},Ve.get("Markdown"),n==="wysiwyg"?" active":"",function(){i.emit("needChangeMode","wysiwyg")},Ve.get("WYSIWYG"))},e}(Lr),RT;function LNe(t,e){var r,n;e=e||0;function i(){n=Array.prototype.slice.call(arguments),window.clearTimeout(r),r=window.setTimeout(function(){t.apply(null,n)},e)}return i}var DNe=LNe,INe=DNe;function RNe(t,e){var r,n=!0,i=function(d){t.apply(null,d),r=null},o,a,s;e=e||0,o=INe(i,e);function u(){if(s=Array.prototype.slice.call(arguments),n){i(s),n=!1;return}a=Number(new Date),r=r||a,o(s),a-r>=e&&i(s)}function f(){n=!0,r=null}return u.reset=f,u}var PNe=RNe,PT=function(){if(typeof Map<"u")return Map;function t(e,r){var n=-1;return e.some(function(i,o){return i[0]===r?(n=o,!0):!1}),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(r){var n=t(this.__entries__,r),i=this.__entries__[n];return i&&i[1]},e.prototype.set=function(r,n){var i=t(this.__entries__,r);~i?this.__entries__[i][1]=n:this.__entries__.push([r,n])},e.prototype.delete=function(r){var n=this.__entries__,i=t(n,r);~i&&n.splice(i,1)},e.prototype.has=function(r){return!!~t(this.__entries__,r)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var i=0,o=this.__entries__;i<o.length;i++){var a=o[i];r.call(n,a[1],a[0])}},e}()}(),$m=typeof window<"u"&&typeof document<"u"&&window.document===document,id=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),BNe=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(id):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)}}(),$Ne=2;function FNe(t,e){var r=!1,n=!1,i=0;function o(){r&&(r=!1,t()),n&&s()}function a(){BNe(o)}function s(){var u=Date.now();if(r){if(u-i<$Ne)return;n=!0}else r=!0,n=!1,setTimeout(a,e);i=u}return s}var HNe=20,UNe=["top","right","bottom","left","width","height","size","weight"],zNe=typeof MutationObserver<"u",qNe=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=FNe(this.refresh.bind(this),HNe)}return t.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},t.prototype.removeObserver=function(e){var r=this.observers_,n=r.indexOf(e);~n&&r.splice(n,1),!r.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},t.prototype.updateObservers_=function(){var e=this.observers_.filter(function(r){return r.gatherActive(),r.hasActive()});return e.forEach(function(r){return r.broadcastActive()}),e.length>0},t.prototype.connect_=function(){!$m||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),zNe?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!$m||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var r=e.propertyName,n=r===void 0?"":r,i=UNe.some(function(o){return!!~n.indexOf(o)});i&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),BT=function(t,e){for(var r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},Ys=function(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||id},$T=ad(0,0,0,0);function od(t){return parseFloat(t)||0}function FT(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return e.reduce(function(n,i){var o=t["border-"+i+"-width"];return n+od(o)},0)}function VNe(t){for(var e=["top","right","bottom","left"],r={},n=0,i=e;n<i.length;n++){var o=i[n],a=t["padding-"+o];r[o]=od(a)}return r}function WNe(t){var e=t.getBBox();return ad(0,0,e.width,e.height)}function jNe(t){var e=t.clientWidth,r=t.clientHeight;if(!e&&!r)return $T;var n=Ys(t).getComputedStyle(t),i=VNe(n),o=i.left+i.right,a=i.top+i.bottom,s=od(n.width),u=od(n.height);if(n.boxSizing==="border-box"&&(Math.round(s+o)!==e&&(s-=FT(n,"left","right")+o),Math.round(u+a)!==r&&(u-=FT(n,"top","bottom")+a)),!KNe(t)){var f=Math.round(s+o)-e,d=Math.round(u+a)-r;Math.abs(f)!==1&&(s-=f),Math.abs(d)!==1&&(u-=d)}return ad(i.left,i.top,s,u)}var GNe=function(){return typeof SVGGraphicsElement<"u"?function(t){return t instanceof Ys(t).SVGGraphicsElement}:function(t){return t instanceof Ys(t).SVGElement&&typeof t.getBBox=="function"}}();function KNe(t){return t===Ys(t).document.documentElement}function YNe(t){return $m?GNe(t)?WNe(t):jNe(t):$T}function XNe(t){var e=t.x,r=t.y,n=t.width,i=t.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,a=Object.create(o.prototype);return BT(a,{x:e,y:r,width:n,height:i,top:r,right:e+n,bottom:i+r,left:e}),a}function ad(t,e,r,n){return{x:t,y:e,width:r,height:n}}var JNe=function(){function t(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ad(0,0,0,0),this.target=e}return t.prototype.isActive=function(){var e=YNe(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},t}(),ZNe=function(){function t(e,r){var n=XNe(r);BT(this,{target:e,contentRect:n})}return t}(),QNe=function(){function t(e,r,n){if(this.activeObservations_=[],this.observations_=new PT,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=r,this.callbackCtx_=n}return t.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof Ys(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(e)||(r.set(e,new JNe(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof Ys(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(e)&&(r.delete(e),r.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&e.activeObservations_.push(r)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new ZNe(n.target,n.broadcastRect())});this.callback_.call(e,r,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),HT=typeof WeakMap<"u"?new WeakMap:new PT,UT=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=qNe.getInstance(),n=new QNe(e,r,this);HT.set(this,n)}return t}();["observe","unobserve","disconnect"].forEach(function(t){UT.prototype[t]=function(){var e;return(e=HT.get(this))[t].apply(e,arguments)}});var e2e=function(){return typeof id.ResizeObserver<"u"?id.ResizeObserver:UT}(),t2e=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.execCommand=function(r){var n=Si(r.target,"li");this.props.execCommand("heading",{level:Number(n.getAttribute("data-level"))})},e.prototype.render=function(){var r=this;return lt(qT||(qT=st([`
|
|
206
|
+
<ul
|
|
207
|
+
onClick=`,`
|
|
208
|
+
aria-role="menu"
|
|
209
|
+
aria-label="`,`"
|
|
210
|
+
>
|
|
211
|
+
`,`
|
|
212
|
+
<li data-type="Paragraph" aria-role="menuitem">
|
|
213
|
+
<div>`,`</div>
|
|
214
|
+
</li>
|
|
215
|
+
</ul>
|
|
216
|
+
`],[`
|
|
217
|
+
<ul
|
|
218
|
+
onClick=`,`
|
|
219
|
+
aria-role="menu"
|
|
220
|
+
aria-label="`,`"
|
|
221
|
+
>
|
|
222
|
+
`,`
|
|
223
|
+
<li data-type="Paragraph" aria-role="menuitem">
|
|
224
|
+
<div>`,`</div>
|
|
225
|
+
</li>
|
|
226
|
+
</ul>
|
|
227
|
+
`])),function(n){return r.execCommand(n)},Ve.get("Headings"),[1,2,3,4,5,6].map(function(n){return lt(zT||(zT=st([`
|
|
228
|
+
<li data-level="`,`" data-type="Heading" aria-role="menuitem">
|
|
229
|
+
<`,">"," ",`</$>
|
|
230
|
+
</li>
|
|
231
|
+
`],[`
|
|
232
|
+
<li data-level="`,`" data-type="Heading" aria-role="menuitem">
|
|
233
|
+
<`,">"," ",`</$>
|
|
234
|
+
</li>
|
|
235
|
+
`])),n,"h"+n,Ve.get("Heading"),n)}),Ve.get("Paragraph"))},e}(Lr),zT,qT,VT=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.toggleTab=function(r,n){this.props.onClick(r,n)},e.prototype.render=function(){var r=this;return lt(jT||(jT=st([`
|
|
236
|
+
<div class="`,`" aria-role="tabpanel">
|
|
237
|
+
`,`
|
|
238
|
+
</div>
|
|
239
|
+
`],[`
|
|
240
|
+
<div class="`,`" aria-role="tabpanel">
|
|
241
|
+
`,`
|
|
242
|
+
</div>
|
|
243
|
+
`])),_e("tabs"),this.props.tabs.map(function(n){var i=n.name,o=n.text,a=r.props.activeTab===i;return lt(WT||(WT=st([`
|
|
244
|
+
<div
|
|
245
|
+
class="tab-item`,`"
|
|
246
|
+
onClick=`,`
|
|
247
|
+
aria-role="tab"
|
|
248
|
+
aria-label="`,`"
|
|
249
|
+
aria-selected="`,`"
|
|
250
|
+
tabindex="`,`"
|
|
251
|
+
>
|
|
252
|
+
`,`
|
|
253
|
+
</div>
|
|
254
|
+
`],[`
|
|
255
|
+
<div
|
|
256
|
+
class="tab-item`,`"
|
|
257
|
+
onClick=`,`
|
|
258
|
+
aria-role="tab"
|
|
259
|
+
aria-label="`,`"
|
|
260
|
+
aria-selected="`,`"
|
|
261
|
+
tabindex="`,`"
|
|
262
|
+
>
|
|
263
|
+
`,`
|
|
264
|
+
</div>
|
|
265
|
+
`])),a?" active":"",function(s){return r.toggleTab(s,i)},Ve.get(o),a?"true":"false",a?"0":"-1",Ve.get(o))}))},e}(Lr),WT,jT,r2e="ui",n2e=function(t){be(e,t);function e(r){var n=t.call(this,r)||this;return n.initialize=function(i){i===void 0&&(i="file");var o=n.refs.url;o.value="",n.refs.altText.value="",n.refs.file.value="",ti(o,"wrong"),n.setState({activeTab:i,file:null,fileNameElClassName:""})},n.execCommand=function(){n.state.activeTab==="file"?n.emitAddImageBlob():n.emitAddImage()},n.toggleTab=function(i,o){o!==n.state.activeTab&&n.initialize(o)},n.showFileSelectBox=function(){n.refs.file.click()},n.changeFile=function(i){var o=i.target.files;o!=null&&o.length&&n.setState({file:o[0]})},n.state={activeTab:"file",file:null,fileNameElClassName:""},n.tabs=[{name:"file",text:"File"},{name:"url",text:"URL"}],n}return e.prototype.emitAddImageBlob=function(){var r=this,n=this.refs.file.files,i=this.refs.altText,o=" wrong";if(n!=null&&n.length){o="";var a=n.item(0),s=function(u,f){return r.props.execCommand("addImage",{imageUrl:u,altText:f||i.value})};this.props.eventEmitter.emit("addImageBlobHook",a,s,r2e)}this.setState({fileNameElClassName:o})},e.prototype.emitAddImage=function(){var r=this.refs.url,n=this.refs.altText,i=r.value,o=n.value||"image";if(ti(r,"wrong"),!i.length){ki(r,"wrong");return}i&&this.props.execCommand("addImage",{imageUrl:i,altText:o})},e.prototype.preventSelectStart=function(r){r.preventDefault()},e.prototype.updated=function(){this.props.show||this.initialize()},e.prototype.render=function(){var r=this,n=this.state,i=n.activeTab,o=n.file,a=n.fileNameElClassName;return lt(GT||(GT=st([`
|
|
266
|
+
<div aria-label="`,`">
|
|
267
|
+
<`," tabs="," activeTab="," onClick=",` />
|
|
268
|
+
<div style="display:`,`">
|
|
269
|
+
<label for="toastuiImageUrlInput">`,`</label>
|
|
270
|
+
<input
|
|
271
|
+
id="toastuiImageUrlInput"
|
|
272
|
+
type="text"
|
|
273
|
+
ref=`,`
|
|
274
|
+
/>
|
|
275
|
+
</div>
|
|
276
|
+
<div style="display:`,`;position: relative;">
|
|
277
|
+
<label for="toastuiImageFileInput">`,`</label>
|
|
278
|
+
<span
|
|
279
|
+
class="`,"",`"
|
|
280
|
+
onClick=`,`
|
|
281
|
+
onSelectstart=`,`
|
|
282
|
+
>
|
|
283
|
+
`,`
|
|
284
|
+
</span>
|
|
285
|
+
<button
|
|
286
|
+
type="button"
|
|
287
|
+
class="`,`"
|
|
288
|
+
onClick=`,`
|
|
289
|
+
>
|
|
290
|
+
`,`
|
|
291
|
+
</button>
|
|
292
|
+
<input
|
|
293
|
+
id="toastuiImageFileInput"
|
|
294
|
+
type="file"
|
|
295
|
+
accept="image/*"
|
|
296
|
+
onChange=`,`
|
|
297
|
+
ref=`,`
|
|
298
|
+
/>
|
|
299
|
+
</div>
|
|
300
|
+
<label for="toastuiAltTextInput">`,`</label>
|
|
301
|
+
<input
|
|
302
|
+
id="toastuiAltTextInput"
|
|
303
|
+
type="text"
|
|
304
|
+
ref=`,`
|
|
305
|
+
/>
|
|
306
|
+
<div class="`,`">
|
|
307
|
+
<button type="button" class="`,'" onClick=',`>
|
|
308
|
+
`,`
|
|
309
|
+
</button>
|
|
310
|
+
<button type="button" class="`,'" onClick=',`>
|
|
311
|
+
`,`
|
|
312
|
+
</button>
|
|
313
|
+
</div>
|
|
314
|
+
</div>
|
|
315
|
+
`],[`
|
|
316
|
+
<div aria-label="`,`">
|
|
317
|
+
<`," tabs="," activeTab="," onClick=",` />
|
|
318
|
+
<div style="display:`,`">
|
|
319
|
+
<label for="toastuiImageUrlInput">`,`</label>
|
|
320
|
+
<input
|
|
321
|
+
id="toastuiImageUrlInput"
|
|
322
|
+
type="text"
|
|
323
|
+
ref=`,`
|
|
324
|
+
/>
|
|
325
|
+
</div>
|
|
326
|
+
<div style="display:`,`;position: relative;">
|
|
327
|
+
<label for="toastuiImageFileInput">`,`</label>
|
|
328
|
+
<span
|
|
329
|
+
class="`,"",`"
|
|
330
|
+
onClick=`,`
|
|
331
|
+
onSelectstart=`,`
|
|
332
|
+
>
|
|
333
|
+
`,`
|
|
334
|
+
</span>
|
|
335
|
+
<button
|
|
336
|
+
type="button"
|
|
337
|
+
class="`,`"
|
|
338
|
+
onClick=`,`
|
|
339
|
+
>
|
|
340
|
+
`,`
|
|
341
|
+
</button>
|
|
342
|
+
<input
|
|
343
|
+
id="toastuiImageFileInput"
|
|
344
|
+
type="file"
|
|
345
|
+
accept="image/*"
|
|
346
|
+
onChange=`,`
|
|
347
|
+
ref=`,`
|
|
348
|
+
/>
|
|
349
|
+
</div>
|
|
350
|
+
<label for="toastuiAltTextInput">`,`</label>
|
|
351
|
+
<input
|
|
352
|
+
id="toastuiAltTextInput"
|
|
353
|
+
type="text"
|
|
354
|
+
ref=`,`
|
|
355
|
+
/>
|
|
356
|
+
<div class="`,`">
|
|
357
|
+
<button type="button" class="`,'" onClick=',`>
|
|
358
|
+
`,`
|
|
359
|
+
</button>
|
|
360
|
+
<button type="button" class="`,'" onClick=',`>
|
|
361
|
+
`,`
|
|
362
|
+
</button>
|
|
363
|
+
</div>
|
|
364
|
+
</div>
|
|
365
|
+
`])),Ve.get("Insert image"),VT,this.tabs,i,this.toggleTab,i==="url"?"block":"none",Ve.get("Image URL"),function(s){return r.refs.url=s},i==="file"?"block":"none",Ve.get("Select image file"),_e("file-name"),o?" has-file":a,this.showFileSelectBox,this.preventSelectStart,o?o.name:Ve.get("No file"),_e("file-select-button"),this.showFileSelectBox,Ve.get("Choose a file"),this.changeFile,function(s){return r.refs.file=s},Ve.get("Description"),function(s){return r.refs.altText=s},_e("button-container"),_e("close-button"),this.props.hidePopup,Ve.get("Cancel"),_e("ok-button"),this.execCommand,Ve.get("OK"))},e}(Lr),GT,i2e=function(t){be(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.execCommand=function(){var n=r.refs.url,i=r.refs.text;if(ti(n,"wrong"),ti(i,"wrong"),n.value.length<1){ki(n,"wrong");return}var o=ei(r.props.initialValues.linkUrl);if(o&&i.value.length<1){ki(i,"wrong");return}r.props.execCommand("addLink",{linkUrl:n.value,linkText:i.value})},r}return e.prototype.initialize=function(){var r=this.props.initialValues,n=r.linkUrl,i=r.linkText,o=this.refs.url,a=this.refs.text;ti(o,"wrong"),ti(a,"wrong","disabled"),a.removeAttribute("disabled"),n&&(ki(a,"disabled"),a.setAttribute("disabled","disabled")),o.value=n||"",a.value=i||""},e.prototype.mounted=function(){this.initialize()},e.prototype.updated=function(r){!r.show&&this.props.show&&this.initialize()},e.prototype.render=function(){var r=this;return lt(KT||(KT=st([`
|
|
366
|
+
<div aria-label="`,`">
|
|
367
|
+
<label for="toastuiLinkUrlInput">`,`</label>
|
|
368
|
+
<input
|
|
369
|
+
id="toastuiLinkUrlInput"
|
|
370
|
+
type="text"
|
|
371
|
+
ref=`,`
|
|
372
|
+
/>
|
|
373
|
+
<label for="toastuiLinkTextInput">`,`</label>
|
|
374
|
+
<input
|
|
375
|
+
id="toastuiLinkTextInput"
|
|
376
|
+
type="text"
|
|
377
|
+
ref=`,`
|
|
378
|
+
/>
|
|
379
|
+
<div class="`,`">
|
|
380
|
+
<button type="button" class="`,'" onClick=',`>
|
|
381
|
+
`,`
|
|
382
|
+
</button>
|
|
383
|
+
<button type="button" class="`,'" onClick=',`>
|
|
384
|
+
`,`
|
|
385
|
+
</button>
|
|
386
|
+
</div>
|
|
387
|
+
</div>
|
|
388
|
+
`],[`
|
|
389
|
+
<div aria-label="`,`">
|
|
390
|
+
<label for="toastuiLinkUrlInput">`,`</label>
|
|
391
|
+
<input
|
|
392
|
+
id="toastuiLinkUrlInput"
|
|
393
|
+
type="text"
|
|
394
|
+
ref=`,`
|
|
395
|
+
/>
|
|
396
|
+
<label for="toastuiLinkTextInput">`,`</label>
|
|
397
|
+
<input
|
|
398
|
+
id="toastuiLinkTextInput"
|
|
399
|
+
type="text"
|
|
400
|
+
ref=`,`
|
|
401
|
+
/>
|
|
402
|
+
<div class="`,`">
|
|
403
|
+
<button type="button" class="`,'" onClick=',`>
|
|
404
|
+
`,`
|
|
405
|
+
</button>
|
|
406
|
+
<button type="button" class="`,'" onClick=',`>
|
|
407
|
+
`,`
|
|
408
|
+
</button>
|
|
409
|
+
</div>
|
|
410
|
+
</div>
|
|
411
|
+
`])),Ve.get("Insert link"),Ve.get("URL"),function(n){return r.refs.url=n},Ve.get("Link text"),function(n){return r.refs.text=n},_e("button-container"),_e("close-button"),this.props.hidePopup,Ve.get("Cancel"),_e("ok-button"),this.execCommand,Ve.get("OK"))},e}(Lr),KT,YT=20,XT=20,JT=5,ZT=14,QT=5,eS=9,o2e=1,a2e=1,tS=1,s2e=function(t){be(e,t);function e(r){var n=t.call(this,r)||this;return n.extendSelectionRange=function(i){var o=i.pageX,a=i.pageY,s=o-n.offsetRect.left,u=a-n.offsetRect.top,f=n.getSelectionRangeByOffset(s,u);n.setState(q({},f))},n.execCommand=function(){n.props.execCommand("addTable",{rowCount:n.state.rowIdx+1,columnCount:n.state.colIdx+1})},n.state={rowIdx:-1,colIdx:-1},n}return e.prototype.getDescription=function(){return this.state.colIdx===-1?"":this.state.colIdx+1+" x "+(this.state.rowIdx+1)},e.prototype.getBoundByRange=function(r,n){return{width:(r+1)*YT,height:(n+1)*XT}},e.prototype.getRangeByOffset=function(r,n){return{colIdx:Math.floor(r/YT),rowIdx:Math.floor(n/XT)}},e.prototype.getTableRange=function(){var r=this.state,n=r.colIdx,i=r.rowIdx,o=Math.max(n,QT),a=Math.max(i,JT);return n>=QT&&o<eS&&(o+=1),i>=JT&&a<ZT&&(a+=1),{colIdx:o+1,rowIdx:a+1}},e.prototype.getSelectionAreaBound=function(){var r=this.getBoundByRange(this.state.colIdx,this.state.rowIdx),n=r.width,i=r.height;return!n&&!i?{display:"none"}:{width:n-tS,height:i-tS,display:"block"}},e.prototype.getSelectionRangeByOffset=function(r,n){var i=this.getRangeByOffset(r,n);return i.rowIdx=Math.min(Math.max(i.rowIdx,o2e),ZT),i.colIdx=Math.min(Math.max(i.colIdx,a2e),eS),i},e.prototype.updated=function(){if(!this.props.show)this.setState({colIdx:-1,rowIdx:-1});else if(this.state.colIdx===-1&&this.state.rowIdx===-1){var r=this.refs.tableEl.getBoundingClientRect(),n=r.left,i=r.top;this.offsetRect={left:window.pageXOffset+n,top:window.pageYOffset+i}}},e.prototype.createTableArea=function(r){for(var n=r.colIdx,i=r.rowIdx,o=[],a=0;a<i;a+=1){for(var s=[],u=0;u<n;u+=1){var f=""+_e("table-cell")+(a>0?"":" header");s.push(lt(rS||(rS=st(['<div class="','"></div>'],['<div class="','"></div>'])),f))}o.push(lt(nS||(nS=st(['<div class="','">',"</div>"],['<div class="','">',"</div>"])),_e("table-row"),s))}return lt(iS||(iS=st(['<div class="','">',"</div>"],['<div class="','">',"</div>"])),_e("table"),o)},e.prototype.render=function(){var r=this,n=this.getTableRange(),i=this.getSelectionAreaBound();return lt(oS||(oS=st([`
|
|
412
|
+
<div aria-label="`,`">
|
|
413
|
+
<div
|
|
414
|
+
class="`,`"
|
|
415
|
+
ref=`,`
|
|
416
|
+
onMousemove=`,`
|
|
417
|
+
onClick=`,`
|
|
418
|
+
>
|
|
419
|
+
`,`
|
|
420
|
+
<div class="`,'" style=',`></div>
|
|
421
|
+
</div>
|
|
422
|
+
<p class="`,'">',`</p>
|
|
423
|
+
</div>
|
|
424
|
+
`],[`
|
|
425
|
+
<div aria-label="`,`">
|
|
426
|
+
<div
|
|
427
|
+
class="`,`"
|
|
428
|
+
ref=`,`
|
|
429
|
+
onMousemove=`,`
|
|
430
|
+
onClick=`,`
|
|
431
|
+
>
|
|
432
|
+
`,`
|
|
433
|
+
<div class="`,'" style=',`></div>
|
|
434
|
+
</div>
|
|
435
|
+
<p class="`,'">',`</p>
|
|
436
|
+
</div>
|
|
437
|
+
`])),Ve.get("Insert table"),_e("table-selection"),function(o){return r.refs.tableEl=o},this.extendSelectionRange,this.execCommand,this.createTableArea(n),_e("table-selection-layer"),i,_e("table-description"),this.getDescription())},e}(Lr),rS,nS,iS,oS,l2e=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.mounted=function(){this.refs.el.appendChild(this.props.body)},e.prototype.updated=function(r){this.refs.el.replaceChild(this.props.body,r.body)},e.prototype.render=function(){var r=this;return lt(aS||(aS=st(["<div ref=","></div>"],["<div ref=","></div>"])),function(n){return r.refs.el=n})},e}(Lr),aS;function Fm(t){return ji(t)?c2e(t):t}function u2e(){var t=document.createElement("label"),e=document.createElement("input"),r=document.createElement("span");t.className="scroll-sync active",e.type="checkbox",e.checked=!0,r.className="switch";var n=function(i){return e.addEventListener("change",function(o){var a=o.target.checked;a?ki(t,"active"):ti(t,"active"),i("toggleScrollSync",{active:a})})};return t.appendChild(e),t.appendChild(r),{name:"scrollSync",el:t,onMounted:n}}function c2e(t){var e;switch(t){case"heading":e={name:"heading",className:"heading",tooltip:Ve.get("Headings"),state:"heading"};break;case"bold":e={name:"bold",className:"bold",command:"bold",tooltip:Ve.get("Bold"),state:"strong"};break;case"italic":e={name:"italic",className:"italic",command:"italic",tooltip:Ve.get("Italic"),state:"emph"};break;case"strike":e={name:"strike",className:"strike",command:"strike",tooltip:Ve.get("Strike"),state:"strike"};break;case"hr":e={name:"hr",className:"hrline",command:"hr",tooltip:Ve.get("Line"),state:"thematicBreak"};break;case"quote":e={name:"quote",className:"quote",command:"blockQuote",tooltip:Ve.get("Blockquote"),state:"blockQuote"};break;case"ul":e={name:"ul",className:"bullet-list",command:"bulletList",tooltip:Ve.get("Unordered list"),state:"bulletList"};break;case"ol":e={name:"ol",className:"ordered-list",command:"orderedList",tooltip:Ve.get("Ordered list"),state:"orderedList"};break;case"task":e={name:"task",className:"task-list",command:"taskList",tooltip:Ve.get("Task"),state:"taskList"};break;case"table":e={name:"table",className:"table",tooltip:Ve.get("Insert table"),state:"table"};break;case"image":e={name:"image",className:"image",tooltip:Ve.get("Insert image")};break;case"link":e={name:"link",className:"link",tooltip:Ve.get("Insert link")};break;case"code":e={name:"code",className:"code",command:"code",tooltip:Ve.get("Code"),state:"code"};break;case"codeblock":e={name:"codeblock",className:"codeblock",command:"codeBlock",tooltip:Ve.get("Insert CodeBlock"),state:"codeBlock"};break;case"indent":e={name:"indent",className:"indent",command:"indent",tooltip:Ve.get("Indent"),state:"indent"};break;case"outdent":e={name:"outdent",className:"outdent",command:"outdent",tooltip:Ve.get("Outdent"),state:"outdent"};break;case"scrollSync":e=u2e();break;case"more":e={name:"more",className:"more",tooltip:Ve.get("More")};break}return e.name!=="scrollSync"&&(e.className+=" "+_e("toolbar-icons")),e}function Hm(t,e){var r=e.el,n=e.pos,i=e.popup,o=e.initialValues;switch(t){case"heading":return{render:function(a){return lt(sS||(sS=st(["<"," ..."," />"],["<"," ..."," />"])),t2e,a)},className:_e("popup-add-heading"),fromEl:r,pos:n};case"link":return{render:function(a){return lt(lS||(lS=st(["<"," ..."," />"],["<"," ..."," />"])),i2e,a)},className:_e("popup-add-link"),fromEl:r,pos:n,initialValues:o};case"image":return{render:function(a){return lt(uS||(uS=st(["<"," ..."," />"],["<"," ..."," />"])),n2e,a)},className:_e("popup-add-image"),fromEl:r,pos:n};case"table":return{render:function(a){return lt(cS||(cS=st(["<"," ..."," />"],["<"," ..."," />"])),s2e,a)},className:_e("popup-add-table"),fromEl:r,pos:n};case"customPopupBody":return i?q({render:function(a){return lt(fS||(fS=st(["<"," ..."," body="," />"],["<"," ..."," body="," />"])),l2e,a,i.body)},fromEl:r,pos:n},i):null;default:return null}}function sd(t){t.hidden=t.length===t.filter(function(e){return e.hidden}).length}function f2e(t,e){var r=function(n){return n.hidden=n.name==="scrollSync"&&e,n};return t.reduce(function(n,i){n.push(i.map(function(a){return r(Fm(a))}));var o=n[(n.length||1)-1];return o&&sd(o),n},[])}function d2e(t,e){t.forEach(function(r){r.forEach(function(n){return n.hidden=n.name==="scrollSync"&&e}),sd(r)})}var sS,lS,uS,cS,fS,p2e=20,h2e=function(t){be(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.handleMousedown=function(n){!Si(n.target,"."+_e("popup"))&&!Si(n.target,r.props.info.fromEl)&&r.props.hidePopup()},r}return e.prototype.mounted=function(){document.addEventListener("mousedown",this.handleMousedown),this.props.eventEmitter.listen("closePopup",this.props.hidePopup)},e.prototype.beforeDestroy=function(){document.removeEventListener("mousedown",this.handleMousedown)},e.prototype.updated=function(r){var n=this.props,i=n.show,o=n.info;if(i&&o.pos&&r.show!==i){var a=q({},o.pos),s=this.refs.el.offsetWidth,u=Si(this.refs.el,"."+_e("toolbar")),f=u.offsetWidth;a.left+s>=f&&(a.left=f-s-p2e),Ev(this.state.popupPos,a)||this.setState({popupPos:a})}},e.prototype.render=function(){var r=this,n=this.props,i=n.info,o=n.show,a=n.hidePopup,s=n.eventEmitter,u=n.execCommand,f=i||{},d=f.className,p=d===void 0?"":d,v=f.style,m=f.render,g=f.initialValues,E=g===void 0?{}:g,w=q(q({display:o?"block":"none"},v),this.state.popupPos);return lt(dS||(dS=st([`
|
|
438
|
+
<div
|
|
439
|
+
class="`," ",`"
|
|
440
|
+
style=`,`
|
|
441
|
+
ref=`,`
|
|
442
|
+
aria-role="dialog"
|
|
443
|
+
>
|
|
444
|
+
<div class="`,`">
|
|
445
|
+
`,`
|
|
446
|
+
</div>
|
|
447
|
+
</div>
|
|
448
|
+
`],[`
|
|
449
|
+
<div
|
|
450
|
+
class="`," ",`"
|
|
451
|
+
style=`,`
|
|
452
|
+
ref=`,`
|
|
453
|
+
aria-role="dialog"
|
|
454
|
+
>
|
|
455
|
+
<div class="`,`">
|
|
456
|
+
`,`
|
|
457
|
+
</div>
|
|
458
|
+
</div>
|
|
459
|
+
`])),_e("popup"),p,w,function(x){return r.refs.el=x},_e("popup-body"),m&&m({eventEmitter:s,show:o,hidePopup:a,execCommand:u,initialValues:E}))},e}(Lr),dS,pS=6;function Um(t){return function(e){be(r,e);function r(n){var i=e.call(this,n)||this;return i.showTooltip=function(o){var a=i.props.item.tooltip;if(!i.props.disabled&&a){var s=i.getBound(o),u=s.left+pS+"px",f=s.top+pS+"px";Ci(i.props.tooltipRef.current,{display:"block",left:u,top:f}),i.props.tooltipRef.current.querySelector(".text").textContent=a}},i.hideTooltip=function(){Ci(i.props.tooltipRef.current,"display","none")},i.state={active:!1,disabled:n.disabled},i.addEvent(),i}return r.prototype.addEvent=function(){var n=this,i=this.props,o=i.item,a=i.eventEmitter;o.state&&a.listen("changeToolbarState",function(s){var u,f=s.toolbarState,d=(u=f[o.state])!==null&&u!==void 0?u:{},p=d.active,v=d.disabled;n.setState({active:!!p,disabled:v??n.props.disabled})})},r.prototype.getBound=function(n){var i=Wx(n,Si(n,"."+_e("toolbar"))),o=i.offsetLeft,a=i.offsetTop;return{left:o,top:n.offsetHeight+a}},r.prototype.render=function(){return lt(hS||(hS=st([`
|
|
460
|
+
<`,`
|
|
461
|
+
...`,`
|
|
462
|
+
active=`,`
|
|
463
|
+
showTooltip=`,`
|
|
464
|
+
hideTooltip=`,`
|
|
465
|
+
getBound=`,`
|
|
466
|
+
disabled=`,`
|
|
467
|
+
/>
|
|
468
|
+
`],[`
|
|
469
|
+
<`,`
|
|
470
|
+
...`,`
|
|
471
|
+
active=`,`
|
|
472
|
+
showTooltip=`,`
|
|
473
|
+
hideTooltip=`,`
|
|
474
|
+
getBound=`,`
|
|
475
|
+
disabled=`,`
|
|
476
|
+
/>
|
|
477
|
+
`])),t,this.props,this.state.active,this.showTooltip,this.hideTooltip,this.getBound,this.state.disabled||this.props.disabled)},r}(Lr)}var hS,v2e=80,m2e=function(t){be(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.showTooltip=function(){r.props.showTooltip(r.refs.el)},r.execCommand=function(){var n=r.props,i=n.item,o=n.execCommand,a=n.setPopupInfo,s=n.getBound,u=n.eventEmitter,f=i.command,d=i.name,p=i.popup;if(f)o(f);else{var v=p?"customPopupBody":d,m=u.emit("query","getPopupInitialValues",{popupName:v})[0],g=Hm(v,{el:r.refs.el,pos:s(r.refs.el),popup:p,initialValues:m});g&&a(g)}},r}return e.prototype.mounted=function(){this.setItemWidth()},e.prototype.updated=function(r){r.item.name!==this.props.item.name&&this.setItemWidth()},e.prototype.setItemWidth=function(){var r=this.props,n=r.setItemWidth,i=r.item;n&&n(i.name,Lv(this.refs.el)+(i.hidden?v2e:0))},e.prototype.render=function(){var r=this,n=this.props,i=n.hideTooltip,o=n.disabled,a=n.item,s=n.active,u=q({display:a.hidden?"none":null},a.style),f=""+(a.className||"")+(s?" active":"");return lt(vS||(vS=st([`
|
|
478
|
+
<button
|
|
479
|
+
ref=`,`
|
|
480
|
+
type="button"
|
|
481
|
+
style=`,`
|
|
482
|
+
class=`,`
|
|
483
|
+
onClick=`,`
|
|
484
|
+
onMouseover=`,`
|
|
485
|
+
onMouseout=`,`
|
|
486
|
+
disabled=`,`
|
|
487
|
+
aria-label=`,`
|
|
488
|
+
>
|
|
489
|
+
`,`
|
|
490
|
+
</button>
|
|
491
|
+
`],[`
|
|
492
|
+
<button
|
|
493
|
+
ref=`,`
|
|
494
|
+
type="button"
|
|
495
|
+
style=`,`
|
|
496
|
+
class=`,`
|
|
497
|
+
onClick=`,`
|
|
498
|
+
onMouseover=`,`
|
|
499
|
+
onMouseout=`,`
|
|
500
|
+
disabled=`,`
|
|
501
|
+
aria-label=`,`
|
|
502
|
+
>
|
|
503
|
+
`,`
|
|
504
|
+
</button>
|
|
505
|
+
`])),function(d){return r.refs.el=d},u,f,this.execCommand,this.showTooltip,i,!!o,a.text||a.tooltip||"",a.text||"")},e}(Lr),g2e=Um(m2e),vS,y2e=function(t){be(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.showTooltip=function(){r.props.showTooltip(r.refs.el)},r.showPopup=function(){var n=Hm("customPopupBody",{el:r.refs.el,pos:r.props.getBound(r.refs.el),popup:r.props.item.popup});n&&r.props.setPopupInfo(n)},r}return e.prototype.mounted=function(){var r=this.props,n=r.setItemWidth,i=r.item;this.refs.el.appendChild(i.el),n&&n(i.name,Lv(this.refs.el)),i.onMounted&&i.onMounted(this.props.execCommand)},e.prototype.updated=function(r){var n,i=this.props,o=i.item,a=i.active,s=i.disabled;(r.active!==a||r.disabled!==s)&&((n=o.onUpdated)===null||n===void 0||n.call(o,{active:a,disabled:s}))},e.prototype.render=function(){var r=this,n=this.props,i=n.disabled,o=n.item,a={display:o.hidden?"none":"inline-block"},s=function(u){return i?null:u};return lt(mS||(mS=st([`
|
|
506
|
+
<div
|
|
507
|
+
ref=`,`
|
|
508
|
+
style=`,`
|
|
509
|
+
class=`,`
|
|
510
|
+
onClick=`,`
|
|
511
|
+
onMouseover=`,`
|
|
512
|
+
onMouseout=`,`
|
|
513
|
+
></div>
|
|
514
|
+
`],[`
|
|
515
|
+
<div
|
|
516
|
+
ref=`,`
|
|
517
|
+
style=`,`
|
|
518
|
+
class=`,`
|
|
519
|
+
onClick=`,`
|
|
520
|
+
onMouseover=`,`
|
|
521
|
+
onMouseout=`,`
|
|
522
|
+
></div>
|
|
523
|
+
`])),function(u){return r.refs.el=u},a,_e("toolbar-item-wrapper"),s(this.showPopup),s(this.showTooltip),s(this.props.hideTooltip))},e}(Lr),b2e=Um(y2e),mS,gS=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(){var r=this,n=this.props,i=n.group,o=n.hiddenDivider,a=i.hidden?{display:"none"}:null,s=o?{display:"none"}:null;return lt(bS||(bS=st([`
|
|
524
|
+
<div class="`,'" style=',`>
|
|
525
|
+
`,`
|
|
526
|
+
<div class="`,'" style=',`></div>
|
|
527
|
+
</div>
|
|
528
|
+
`],[`
|
|
529
|
+
<div class="`,'" style=',`>
|
|
530
|
+
`,`
|
|
531
|
+
<div class="`,'" style=',`></div>
|
|
532
|
+
</div>
|
|
533
|
+
`])),_e("toolbar-group"),a,i.map(function(u){var f=u.el?b2e:g2e;return lt(yS||(yS=st(["<"," key="," ..."," item="," />"],["<"," key="," ..."," item="," />"])),f,u.name,r.props,u)}),_e("toolbar-divider"),s)},e}(Lr),yS,bS,w2e=4,E2e=function(t){be(e,t);function e(r){var n=t.call(this,r)||this;return n.handleClickDocument=function(i){var o=i.target;!Si(o,"."+_e("dropdown-toolbar"))&&!Si(o,".more")&&n.setState({showDropdown:!1,dropdownPos:null})},n.showTooltip=function(){n.props.showTooltip(n.refs.el)},n.state={showDropdown:!1,dropdownPos:null},n}return e.prototype.getBound=function(){var r=this.props.getBound(this.refs.el);return r.top+=w2e,q(q({},r),{left:null,right:10})},e.prototype.mounted=function(){document.addEventListener("click",this.handleClickDocument)},e.prototype.updated=function(){this.state.showDropdown&&!this.state.dropdownPos&&this.setState({dropdownPos:this.getBound()})},e.prototype.beforeDestroy=function(){document.removeEventListener("click",this.handleClickDocument)},e.prototype.render=function(){var r=this,n=this.state,i=n.showDropdown,o=n.dropdownPos,a=this.props,s=a.disabled,u=a.item,f=a.items,d=a.hideTooltip,p=f.filter(function(g){return!g.hidden}),v=p.length?null:{display:"none"},m=i?null:{display:"none"};return lt(ES||(ES=st([`
|
|
534
|
+
<div class="`,'" style=',`>
|
|
535
|
+
<button
|
|
536
|
+
ref=`,`
|
|
537
|
+
type="button"
|
|
538
|
+
class=`,`
|
|
539
|
+
onClick=`,`
|
|
540
|
+
onMouseover=`,`
|
|
541
|
+
onMouseout=`,`
|
|
542
|
+
disabled=`,`
|
|
543
|
+
></button>
|
|
544
|
+
<div
|
|
545
|
+
class="`,`"
|
|
546
|
+
style=`,`
|
|
547
|
+
ref=`,`
|
|
548
|
+
>
|
|
549
|
+
`,`
|
|
550
|
+
</div>
|
|
551
|
+
</div>
|
|
552
|
+
`],[`
|
|
553
|
+
<div class="`,'" style=',`>
|
|
554
|
+
<button
|
|
555
|
+
ref=`,`
|
|
556
|
+
type="button"
|
|
557
|
+
class=`,`
|
|
558
|
+
onClick=`,`
|
|
559
|
+
onMouseover=`,`
|
|
560
|
+
onMouseout=`,`
|
|
561
|
+
disabled=`,`
|
|
562
|
+
></button>
|
|
563
|
+
<div
|
|
564
|
+
class="`,`"
|
|
565
|
+
style=`,`
|
|
566
|
+
ref=`,`
|
|
567
|
+
>
|
|
568
|
+
`,`
|
|
569
|
+
</div>
|
|
570
|
+
</div>
|
|
571
|
+
`])),_e("toolbar-group"),v,function(g){return r.refs.el=g},u.className,function(){return r.setState({showDropdown:!0})},this.showTooltip,d,s,_e("dropdown-toolbar"),q(q({},m),o),function(g){return r.refs.dropdownEl=g},p.length?p.map(function(g,E){var w;return lt(wS||(wS=st([`
|
|
572
|
+
<`,`
|
|
573
|
+
group=`,`
|
|
574
|
+
hiddenDivider=`,`
|
|
575
|
+
...`,`
|
|
576
|
+
/>
|
|
577
|
+
`],[`
|
|
578
|
+
<`,`
|
|
579
|
+
group=`,`
|
|
580
|
+
hiddenDivider=`,`
|
|
581
|
+
...`,`
|
|
582
|
+
/>
|
|
583
|
+
`])),gS,g,E===p.length-1||((w=p[E+1])===null||w===void 0?void 0:w.hidden),r.props)}):null)},e}(Lr),x2e=Um(E2e),wS,ES,C2e=50,k2e=function(t){be(e,t);function e(r){var n=t.call(this,r)||this;return n.toggleTab=function(i,o){var a=n.props.eventEmitter;if(n.state.activeTab!==o){var s=o==="write"?"changePreviewTabWrite":"changePreviewTabPreview";a.emit(s),n.setState({activeTab:o})}},n.setItemWidth=function(i,o){n.itemWidthMap[i]=o},n.setPopupInfo=function(i){n.setState({showPopup:!0,popupInfo:i})},n.openPopup=function(i,o){o===void 0&&(o={});var a=n.refs.el.querySelector("."+_e("toolbar-group")+" ."+i);if(a){var s=Wx(a,Si(a,"."+_e("toolbar"))),u=s.offsetLeft,f=s.offsetTop,d=Hm(i,{el:a,pos:{left:u,top:a.offsetHeight+f},initialValues:o});d&&n.setPopupInfo(d)}},n.hidePopup=function(){n.state.showPopup&&n.setState({showPopup:!1})},n.execCommand=function(i,o){var a=n.props.eventEmitter;a.emit("command",i,o),n.hidePopup()},n.tabs=[{name:"write",text:"Write"},{name:"preview",text:"Preview"}],n.itemWidthMap={},n.initialItems=f2e(r.toolbarItems||[],n.hiddenScrollSync()),n.state={items:n.initialItems,dropdownItems:[],showPopup:!1,popupInfo:{},activeTab:"write"},n.tooltipRef={current:null},n.resizeObserver=new e2e(function(){return n.handleResize()}),n.addEvent(),n}return e.prototype.insertToolbarItem=function(r,n){var i=r.groupIndex,o=r.itemIndex,a=this.initialItems[i];n=Fm(n),a?a.splice(o,0,n):this.initialItems.push([n]),this.setState(this.classifyToolbarItems())},e.prototype.removeToolbarItem=function(r){var n=this;Rs(this.initialItems,function(i){var o=!1;return Rs(i,function(a,s){return a.name===r?(o=!0,i.splice(s,1),n.setState(n.classifyToolbarItems()),!1):!0}),!o})},e.prototype.addEvent=function(){var r=this,n=this.props.eventEmitter;this.handleResize=PNe(function(){r.setState({items:r.initialItems,dropdownItems:[]}),r.setState(r.classifyToolbarItems())},200),n.listen("openPopup",this.openPopup)},e.prototype.appendTooltipToRoot=function(){var r='<div class="'+_e("tooltip")+`" style="display:none">
|
|
584
|
+
<div class="arrow"></div>
|
|
585
|
+
<span class="text"></span>
|
|
586
|
+
</div>`;this.tooltipRef.current=Vx(r,this.refs.el)},e.prototype.hiddenScrollSync=function(){return this.props.editorType==="wysiwyg"||this.props.previewStyle==="tab"},e.prototype.movePrevItemToDropdownToolbar=function(r,n,i,o){var a=function(u){var f=u.pop();f&&o.push(f)};if(r>1)a(i);else{var s=Nr(n);s&&a(s)}},e.prototype.classifyToolbarItems=function(){var r=this,n=0,i=this.refs.el.clientWidth,o=this.refs.el.querySelector("."+_e("toolbar-divider")),a=o?Lv(o):0,s=[],u=[],f=!1;return this.initialItems.forEach(function(d,p){var v=[],m=[];d.forEach(function(g,E){g.hidden||(n+=r.itemWidthMap[g.name],n>i-C2e?(f||(r.movePrevItemToDropdownToolbar(E,s,v,m),f=!0),m.push(g)):v.push(g))}),v.length&&(sd(v),s.push(v)),m.length&&(sd(m),u.push(m)),p<r.state.items.length-1&&(n+=a)}),{items:s,dropdownItems:u}},e.prototype.mounted=function(){this.props.previewStyle==="tab"&&this.props.eventEmitter.emit("changePreviewTabWrite",!0),this.setState(this.classifyToolbarItems()),this.appendTooltipToRoot(),this.resizeObserver.observe(this.refs.el)},e.prototype.updated=function(r){var n=this.props,i=n.editorType,o=n.previewStyle,a=n.eventEmitter,s=o!==r.previewStyle,u=i!==r.editorType;if(s||u){d2e(this.initialItems,this.hiddenScrollSync());var f=this.classifyToolbarItems();(s||o==="tab"&&i==="markdown")&&(a.emit("changePreviewTabWrite"),f.activeTab="write"),this.setState(f)}},e.prototype.beforeDestroy=function(){window.removeEventListener("resize",this.handleResize),this.resizeObserver.disconnect(),La(this.tooltipRef.current)},e.prototype.render=function(){var r=this,n=this.props,i=n.previewStyle,o=n.eventEmitter,a=n.editorType,s=this.state,u=s.popupInfo,f=s.showPopup,d=s.activeTab,p=s.items,v=s.dropdownItems,m={eventEmitter:o,tooltipRef:this.tooltipRef,disabled:a==="markdown"&&i==="tab"&&d==="preview",execCommand:this.execCommand,setPopupInfo:this.setPopupInfo},g=i==="tab"?{borderTopLeftRadius:0}:null;return lt(CS||(CS=st([`
|
|
587
|
+
<div class="`,`">
|
|
588
|
+
<div
|
|
589
|
+
class="`,`"
|
|
590
|
+
style="display: `,`"
|
|
591
|
+
>
|
|
592
|
+
<`," tabs="," activeTab="," onClick=",` />
|
|
593
|
+
</div>
|
|
594
|
+
<div
|
|
595
|
+
class="`,`"
|
|
596
|
+
ref=`,`
|
|
597
|
+
style=`,`
|
|
598
|
+
>
|
|
599
|
+
`,`
|
|
600
|
+
<`,`
|
|
601
|
+
item=`,`
|
|
602
|
+
items=`,`
|
|
603
|
+
...`,`
|
|
604
|
+
/>
|
|
605
|
+
</div>
|
|
606
|
+
<`,`
|
|
607
|
+
info=`,`
|
|
608
|
+
show=`,`
|
|
609
|
+
eventEmitter=`,`
|
|
610
|
+
hidePopup=`,`
|
|
611
|
+
execCommand=`,`
|
|
612
|
+
/>
|
|
613
|
+
</div>
|
|
614
|
+
`],[`
|
|
615
|
+
<div class="`,`">
|
|
616
|
+
<div
|
|
617
|
+
class="`,`"
|
|
618
|
+
style="display: `,`"
|
|
619
|
+
>
|
|
620
|
+
<`," tabs="," activeTab="," onClick=",` />
|
|
621
|
+
</div>
|
|
622
|
+
<div
|
|
623
|
+
class="`,`"
|
|
624
|
+
ref=`,`
|
|
625
|
+
style=`,`
|
|
626
|
+
>
|
|
627
|
+
`,`
|
|
628
|
+
<`,`
|
|
629
|
+
item=`,`
|
|
630
|
+
items=`,`
|
|
631
|
+
...`,`
|
|
632
|
+
/>
|
|
633
|
+
</div>
|
|
634
|
+
<`,`
|
|
635
|
+
info=`,`
|
|
636
|
+
show=`,`
|
|
637
|
+
eventEmitter=`,`
|
|
638
|
+
hidePopup=`,`
|
|
639
|
+
execCommand=`,`
|
|
640
|
+
/>
|
|
641
|
+
</div>
|
|
642
|
+
`])),_e("toolbar"),_e("md-tab-container"),a==="wysiwyg"||i==="vertical"?"none":"block",VT,this.tabs,d,this.toggleTab,_e("defaultUI-toolbar"),function(E){return r.refs.el=E},g,p.map(function(E,w){var x;return lt(xS||(xS=st([`
|
|
643
|
+
<`,`
|
|
644
|
+
group=`,`
|
|
645
|
+
hiddenDivider=`,`
|
|
646
|
+
setItemWidth=`,`
|
|
647
|
+
...`,`
|
|
648
|
+
/>
|
|
649
|
+
`],[`
|
|
650
|
+
<`,`
|
|
651
|
+
group=`,`
|
|
652
|
+
hiddenDivider=`,`
|
|
653
|
+
setItemWidth=`,`
|
|
654
|
+
...`,`
|
|
655
|
+
/>
|
|
656
|
+
`])),gS,E,w===p.length-1||((x=p[w+1])===null||x===void 0?void 0:x.hidden),r.setItemWidth,m)}),x2e,Fm("more"),v,m,h2e,u,f,o,this.hidePopup,this.execCommand)},e}(Lr),xS,CS,T2e=function(t){be(e,t);function e(r){var n=t.call(this,r)||this;return n.handleClickDocument=function(i){Si(i.target,"."+_e("context-menu"))||n.setState({pos:null})},n.state={pos:null,menuGroups:[]},n.addEvent(),n}return e.prototype.addEvent=function(){var r=this;this.props.eventEmitter.listen("contextmenu",function(n){var i=n.pos,o=n.menuGroups;r.setState({pos:i,menuGroups:o})})},e.prototype.mounted=function(){document.addEventListener("click",this.handleClickDocument)},e.prototype.beforeDestroy=function(){document.removeEventListener("click",this.handleClickDocument)},e.prototype.getMenuGroupElements=function(){var r=this,n=this.state,i=n.pos,o=n.menuGroups;return i?o.reduce(function(a,s){var u=[];return s.forEach(function(f){var d=f.label,p=f.className,v=p===void 0?!1:p,m=f.disabled,g=f.onClick,E=function(){m||(g(),r.setState({pos:null}))};u.push(lt(kS||(kS=st([`
|
|
657
|
+
<li
|
|
658
|
+
onClick=`,`
|
|
659
|
+
class="menu-item`,`"
|
|
660
|
+
aria-role="menuitem"
|
|
661
|
+
>
|
|
662
|
+
<span class="`,'">',`</span>
|
|
663
|
+
</li>
|
|
664
|
+
`],[`
|
|
665
|
+
<li
|
|
666
|
+
onClick=`,`
|
|
667
|
+
class="menu-item`,`"
|
|
668
|
+
aria-role="menuitem"
|
|
669
|
+
>
|
|
670
|
+
<span class="`,'">',`</span>
|
|
671
|
+
</li>
|
|
672
|
+
`])),E,m?" disabled":"",v,d))}),a.push(lt(TS||(TS=st([`<ul class="menu-group">
|
|
673
|
+
`,`
|
|
674
|
+
</ul>`],[`<ul class="menu-group">
|
|
675
|
+
`,`
|
|
676
|
+
</ul>`])),u)),a},[]):[]},e.prototype.render=function(){var r=q({display:this.state.pos?"block":"none"},this.state.pos);return lt(SS||(SS=st(['<div class="','" style=',` aria-role="menu">
|
|
677
|
+
`,`
|
|
678
|
+
</div>`],['<div class="','" style=',` aria-role="menu">
|
|
679
|
+
`,`
|
|
680
|
+
</div>`])),_e("context-menu"),r,this.getMenuGroupElements())},e}(Lr),kS,TS,SS,S2e=function(t){be(e,t);function e(r){var n=t.call(this,r)||this;n.changeMode=function(a){a!==n.state.editorType&&n.setState({editorType:a})},n.changePreviewStyle=function(a){a!==n.state.previewStyle&&n.setState({previewStyle:a})},n.hide=function(){n.setState({hide:!0})},n.show=function(){n.setState({hide:!1})};var i=r.editorType,o=r.previewStyle;return n.state={editorType:i,previewStyle:o,hide:!1},n.addEvent(),n}return e.prototype.mounted=function(){var r=this.props.slots,n=r.wwEditor,i=r.mdEditor,o=r.mdPreview;this.refs.wwContainer.appendChild(n),this.refs.mdContainer.insertAdjacentElement("afterbegin",i),this.refs.mdContainer.appendChild(o)},e.prototype.insertToolbarItem=function(r,n){this.toolbar.insertToolbarItem(r,n)},e.prototype.removeToolbarItem=function(r){this.toolbar.removeToolbarItem(r)},e.prototype.render=function(){var r=this,n=this.props,i=n.eventEmitter,o=n.hideModeSwitch,a=n.toolbarItems,s=n.theme,u=this.state,f=u.hide,d=u.previewStyle,p=u.editorType,v=f?" hidden":"",m=_e(p==="markdown"?"md-mode":"ww-mode"),g=_e("md")+"-"+d+"-style",E=_e([s!=="light",s+" "]);return lt(OS||(OS=st([`
|
|
681
|
+
<div
|
|
682
|
+
class="`,"","",`"
|
|
683
|
+
ref=`,`
|
|
684
|
+
>
|
|
685
|
+
<`,`
|
|
686
|
+
ref=`,`
|
|
687
|
+
eventEmitter=`,`
|
|
688
|
+
previewStyle=`,`
|
|
689
|
+
toolbarItems=`,`
|
|
690
|
+
editorType=`,`
|
|
691
|
+
/>
|
|
692
|
+
<div
|
|
693
|
+
class="`," ",`"
|
|
694
|
+
ref=`,`
|
|
695
|
+
>
|
|
696
|
+
<div class="`,`">
|
|
697
|
+
<div
|
|
698
|
+
class="`," ",`"
|
|
699
|
+
ref=`,`
|
|
700
|
+
>
|
|
701
|
+
<div class="`,`"></div>
|
|
702
|
+
</div>
|
|
703
|
+
<div
|
|
704
|
+
class="`,`"
|
|
705
|
+
ref=`,`
|
|
706
|
+
/>
|
|
707
|
+
</div>
|
|
708
|
+
</div>
|
|
709
|
+
`,`
|
|
710
|
+
<`," eventEmitter=",` />
|
|
711
|
+
</div>
|
|
712
|
+
`],[`
|
|
713
|
+
<div
|
|
714
|
+
class="`,"","",`"
|
|
715
|
+
ref=`,`
|
|
716
|
+
>
|
|
717
|
+
<`,`
|
|
718
|
+
ref=`,`
|
|
719
|
+
eventEmitter=`,`
|
|
720
|
+
previewStyle=`,`
|
|
721
|
+
toolbarItems=`,`
|
|
722
|
+
editorType=`,`
|
|
723
|
+
/>
|
|
724
|
+
<div
|
|
725
|
+
class="`," ",`"
|
|
726
|
+
ref=`,`
|
|
727
|
+
>
|
|
728
|
+
<div class="`,`">
|
|
729
|
+
<div
|
|
730
|
+
class="`," ",`"
|
|
731
|
+
ref=`,`
|
|
732
|
+
>
|
|
733
|
+
<div class="`,`"></div>
|
|
734
|
+
</div>
|
|
735
|
+
<div
|
|
736
|
+
class="`,`"
|
|
737
|
+
ref=`,`
|
|
738
|
+
/>
|
|
739
|
+
</div>
|
|
740
|
+
</div>
|
|
741
|
+
`,`
|
|
742
|
+
<`," eventEmitter=",` />
|
|
743
|
+
</div>
|
|
744
|
+
`])),E,_e("defaultUI"),v,function(w){return r.refs.el=w},k2e,function(w){return r.toolbar=w},i,d,a,p,_e("main"),m,function(w){return r.refs.editorSection=w},_e("main-container"),_e("md-container"),g,function(w){return r.refs.mdContainer=w},_e("md-splitter"),_e("ww-container"),function(w){return r.refs.wwContainer=w},!o&<(_S||(_S=st(["<"," eventEmitter="," editorType="," />"],["<"," eventEmitter="," editorType="," />"])),NNe,i,p),T2e,i)},e.prototype.addEvent=function(){var r=this.props.eventEmitter;r.listen("hide",this.hide),r.listen("show",this.show),r.listen("changeMode",this.changeMode),r.listen("changePreviewStyle",this.changePreviewStyle)},e}(Lr),_S,OS,_2e=function(t){be(e,t);function e(r){var n,i=t.call(this,r)||this,o,a=MNe(i.options.el,lt(AS||(AS=st([`
|
|
745
|
+
<`,`
|
|
746
|
+
ref=`,`
|
|
747
|
+
eventEmitter=`,`
|
|
748
|
+
slots=`,`
|
|
749
|
+
hideModeSwitch=`,`
|
|
750
|
+
toolbarItems=`,`
|
|
751
|
+
previewStyle=`,`
|
|
752
|
+
editorType=`,`
|
|
753
|
+
theme=`,`
|
|
754
|
+
/>
|
|
755
|
+
`],[`
|
|
756
|
+
<`,`
|
|
757
|
+
ref=`,`
|
|
758
|
+
eventEmitter=`,`
|
|
759
|
+
slots=`,`
|
|
760
|
+
hideModeSwitch=`,`
|
|
761
|
+
toolbarItems=`,`
|
|
762
|
+
previewStyle=`,`
|
|
763
|
+
editorType=`,`
|
|
764
|
+
theme=`,`
|
|
765
|
+
/>
|
|
766
|
+
`])),S2e,function(s){return o=s},i.eventEmitter,i.getEditorElements(),i.options.hideModeSwitch,i.options.toolbarItems,i.options.previewStyle,i.options.initialEditType,i.options.theme));return i.setMinHeight(i.options.minHeight),i.setHeight(i.options.height),i.defaultUI={insertToolbarItem:o.insertToolbarItem.bind(o),removeToolbarItem:o.removeToolbarItem.bind(o),destroy:a},(n=i.pluginInfo.toolbarItems)===null||n===void 0||n.forEach(function(s){var u=s.groupIndex,f=s.itemIndex,d=s.item;i.defaultUI.insertToolbarItem({groupIndex:u,itemIndex:f},d)}),i.eventEmitter.emit("loadUI",i),i}return e.factory=function(r){return r.viewer?new kT(r):new e(r)},e.prototype.insertToolbarItem=function(r,n){this.defaultUI.insertToolbarItem(r,n)},e.prototype.removeToolbarItem=function(r){this.defaultUI.removeToolbarItem(r)},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.defaultUI.destroy()},e}(_T),AS;_T.setLanguage(["en","en-US"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Write",Preview:"Preview",Headings:"Headings",Paragraph:"Paragraph",Bold:"Bold",Italic:"Italic",Strike:"Strike",Code:"Inline code",Line:"Line",Blockquote:"Blockquote","Unordered list":"Unordered list","Ordered list":"Ordered list",Task:"Task",Indent:"Indent",Outdent:"Outdent","Insert link":"Insert link","Insert CodeBlock":"Insert codeBlock","Insert table":"Insert table","Insert image":"Insert image",Heading:"Heading","Image URL":"Image URL","Select image file":"Select image file","Choose a file":"Choose a file","No file":"No file",Description:"Description",OK:"OK",More:"More",Cancel:"Cancel",File:"File",URL:"URL","Link text":"Link text","Add row to up":"Add row to up","Add row to down":"Add row to down","Add column to left":"Add column to left","Add column to right":"Add column to right","Remove row":"Remove row","Remove column":"Remove column","Align column to left":"Align column to left","Align column to center":"Align column to center","Align column to right":"Align column to right","Remove table":"Remove table","Would you like to paste as table?":"Would you like to paste as table?","Text color":"Text color","Auto scroll enabled":"Auto scroll enabled","Auto scroll disabled":"Auto scroll disabled","Choose language":"Choose language"});const O2e=["id"],A2e=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"element-editor",props:{modelValue:{type:[String,Number],default:""}},emits:["update:modelValue"],setup(t,{emit:e}){const r=t,n=e,i=Hi.generateUuid();let o=null;const a=y.ref(null);return y.onMounted(async()=>{o=new _2e({el:document.getElementById(`tui-editor-${i}`),previewStyle:"vertical",height:"500px",initialValue:r.modelValue||"",initialEditType:"wysiwyg",events:{change:()=>n("update:modelValue",o.getHTML())}})}),y.onUnmounted(()=>{o=null}),(s,u)=>(y.openBlock(),y.createElementBlock("div",{ref_key:"tuiEditor",ref:a,id:`tui-editor-${y.unref(i)}`},null,8,O2e))}}},Symbol.toStringTag,{value:"Module"})),M2e={key:0},N2e=["id","value","checked"],L2e={class:"text"},D2e={key:0,class:"txt_tf txt_error"},I2e=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"element-multi-checkbox",props:{modelValue:{type:[String,Number],default:""},rules:{type:String,default:""},name:{type:String,default:""},immediate:{type:Boolean,default:!1},options:{type:Array,default(){return[]}}},emits:["update:modelValue"],setup(t,{emit:e}){const r=t,n=e,i=Hi.generateUuid(),o=y.ref(null),a=y.computed({get(){return r.modelValue},set(u){return n("update:modelValue",u)}});y.onMounted(async()=>{r.immediate&&await o.value.validate()});const s=async u=>{u.target.checked?a.value.push(u.target.value):a.value=a.value.filter(f=>f!==u.target.value),await y.nextTick(),r.rules.includes("required")&&await o.value.validate()};return(u,f)=>(y.openBlock(),y.createBlock(y.unref(ma),{ref_key:"veeField",ref:o,modelValue:a.value,"onUpdate:modelValue":f[1]||(f[1]=d=>a.value=d),rules:t.rules,type:"checkbox",name:t.name,class:"dms-checkbox-flex-area"},{default:y.withCtx(({field:d,errors:p})=>[t.options.length>0?(y.openBlock(),y.createElementBlock("div",M2e,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(t.options,(v,m)=>(y.openBlock(),y.createElementBlock("label",{class:"checkbox",key:m},[y.createElementVNode("input",{type:"checkbox",id:`multi-checkbox-${y.unref(i)}-${m}`,value:v.value,onClick:f[0]||(f[0]=g=>s(g)),checked:a.value.includes(v.value),class:"hide"},null,8,N2e),y.createElementVNode("span",L2e,y.toDisplayString(v.label),1)]))),128)),y.createElementVNode("input",y.mergeProps(d,{type:"hidden"}),null,16),p.length>0?(y.openBlock(),y.createElementBlock("p",D2e,y.toDisplayString(p[0]),1)):y.createCommentVNode("",!0)])):y.createCommentVNode("",!0)]),_:1},8,["modelValue","rules","name"]))}}},Symbol.toStringTag,{value:"Module"}));/**
|
|
767
|
+
* Vue Number Format 3.34.1
|
|
768
|
+
* (c) 2021-2025 Dipak Sarkar <hello@dipaksarkar.in> (https://dipaksarkar.in/)
|
|
769
|
+
* @license MIT
|
|
770
|
+
*/var zm={prefix:"",suffix:"",separator:",",decimal:".",inputmode:"numeric",precision:2,minimumFractionDigits:null,prefill:!0,reverseFill:!1,min:null,max:null,nullValue:""};function R2e(t){return e=0,r=t,n=20,Math.max(e,Math.min(r,n));var e,r,n}class qm{constructor(e){Yr(this,"options");Yr(this,"input");Yr(this,"number");Yr(this,"isClean");Yr(this,"isCustomDecimal");Yr(this,"noPreSuffix");Yr(this,"hasPreOrSuffix");Yr(this,"prefix");Yr(this,"preSufRegExp");Yr(this,"prefixRegExp");Yr(this,"suffixRegExp");Yr(this,"numberRegExp");Yr(this,"cleanRegExp");Yr(this,"negativeRegExp");this.options=Object.assign(Vm(zm),e);const{prefix:r,suffix:n,decimal:i,reverseFill:o}=this.options;this.input="",this.number="",this.isClean=!o;const a=r,s=n,u=a.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),f=s.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&");u&&(this.prefixRegExp=new RegExp(`^${u}`)),f&&(this.suffixRegExp=new RegExp(`${f}$`)),this.prefix=r,this.numberRegExp=new RegExp(`[^0-9\\${i||"."}]+`,"gi"),this.cleanRegExp=new RegExp("[^0-9]+","gi"),this.negativeRegExp=new RegExp("[^0-9\\-]+","gi"),this.isCustomDecimal=i!==".",this.noPreSuffix=!a&&!s,this.hasPreOrSuffix=!this.noPreSuffix}isNull(){return!this.numberOnly(this.isClean?this.cleanRegExp:this.negativeRegExp)}clean(e=!1){return this.isClean=e,this}sign(){if(this.input===null||this.input===void 0)return"";const e=this.input.toString().indexOf(Wo)>=0;return this.isClean?e&&this.realNumber()>0?Wo:"":e?Wo:""}toFixed(){const e=Math.pow(10,this.options.precision);return(parseFloat(this.numberOnly(/\D+/g))/e||0).toFixed(R2e(this.options.precision))}toNumber(e){return Number(e)}numberOnly(e){var n;let r=(n=this.input)==null?void 0:n.toString();return this.prefixRegExp&&(r=r.replace(this.prefixRegExp,"")),this.suffixRegExp&&(r=r.replace(this.suffixRegExp,"")),r.replace(e||this.numberRegExp,"")}inputWithPreOrSuffix(){return this.input&&this.prefixRegExp?this.prefixRegExp.test(this.input.toString()):!this.input||!this.suffixRegExp||this.suffixRegExp.test(this.input.toString())}isNegative(){return this.sign()===Wo}isNumber(e){return!isNaN(this.toNumber(e||this.input))}numbers(){var i;const{reverseFill:e,decimal:r,separator:n}=this.options;if(e)this.number=this.toFixed().replace(".",r);else{const o=(i=this.input)==null?void 0:i.toString().replace(this.prefixRegExp??"","").replace(this.suffixRegExp??"","").replace(new RegExp(Wo,"g"),""),a=this.input.toString().indexOf(r)>=0&&this.isCustomDecimal;let s=o;n&&(s=s.replace(new RegExp(`\\${n}`,"g"),"")),s=s.replace(r,"."),typeof this.input=="number"||this.isNumber()&&!a&&!this.inputWithPreOrSuffix()&&this.hasPreOrSuffix?this.number=this.parts(o,".").join(r):this.isNumber(s)&&!a&&this.inputWithPreOrSuffix()&&this.hasPreOrSuffix?this.number=this.parts(s,".").join(r):this.number=this.parts(this.numberOnly()).join(r)}return this.number}unformatNumber(){return this.numbers().toString().replace(this.options.decimal,".")}realNumber(){return parseFloat(this.unformatNumber())}parts(e,r){const{precision:n,minimumFractionDigits:i,decimal:o}=this.options;let a=e.toString().split(r||o);if(a.length>1&&(a[0]=this.toNumber(a[0])||0,a[1]=a.slice(1,a.length).join(""),a=a.slice(0,2)),this.isClean){const s=this.toNumber(a.join(".")).toFixed(n),u=this.toNumber(s),f=u.toFixed(i);a=i>=0&&u.toString().length<f.length?f.toString().split("."):u.toString().split(".")}return a.slice(0,2)}addSeparator(){const{decimal:e,separator:r}=this.options,n=this.numbers().split(e);return n[0]=n[0].toString().replace(/(\d)(?=(?:\d{3})+\b)/gm,`$1${r}`),n.join(e)}format(e){this.input=e;const{reverseFill:r,nullValue:n,prefix:i,suffix:o}=this.options;return this.isNull()&&!r?n:this.sign()+i+this.addSeparator()+o}unformat(e){this.input=e;const{reverseFill:r,nullValue:n}=this.options,i=this.realNumber(),o=this.unformatNumber();return this.isNull()||r&&i===0?n:this.sign()+o}}const Wo="-";function Vm(t){return JSON.parse(JSON.stringify(t))}function Wm(t){return new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:{facade:!0}})}function ld(t){const e=t instanceof HTMLInputElement?t:t.querySelector("input");if(!e)throw new Error("number directive requires an input element");return e}function MS(t,e){const r=()=>{t.setSelectionRange(e,e)};r(),setTimeout(r,1)}function Tu(t,e,{emit:r=!0,force:n=!1,clean:i=!1}={}){var p;const{options:o,oldValue:a}=t,{reverseFill:s,max:u,min:f}=o,d=((p=e==null?void 0:e.props)==null?void 0:p.value)||t.value;if(n||a!==d){const v=new qm(o).clean(i&&!s);let m=v.format(d),g=v.clean(!s).unformat(d);i&&(Number(u)===u&&Number(g)>u?(m=v.format(u),g=u.toString()):Number(f)===f&&Number(g)<f&&(m=v.format(f),g=f.toString())),t.oldValue=m,t.unmasked=g,t.value!==m&&(t.value=m)}return r&&t.dispatchEvent(Wm("input"))}var P2e={beforeMount:(t,{value:e,modifiers:r},n)=>{var f;t=ld(t);const i=Object.assign(Vm(zm),e,r),{reverseFill:o,precision:a,decimal:s,inputmode:u}=i;t.options=i,t.setAttribute("inputmode",u),o&&t.value?(t.value=parseFloat(new qm({...i,reverseFill:!1}).unformat(t.value)).toFixed(a),(f=n==null?void 0:n.props)!=null&&f.value&&(n.props.value=t.value)):t.value&&!isNaN(Number(t.value))&&(t.value=t.value.replace(".",s)),Tu(t,n,{force:i.prefill,clean:!0,emit:!1})},mounted:t=>{const e=(t=ld(t)).parentElement||t,r=o=>{o.target===t&&function(a){const{target:s,detail:u}=a;if(u!=null&&u.facade)return!1;a.stopPropagation();let f=s.value.length;const{oldValue:d,options:p}=s;s.selectionEnd&&(f=s.value.length-s.selectionEnd),Tu(s,null,{clean:!p.precision,emit:!1}),p.suffix&&(f=Math.max(f,p.suffix.length)),f=s.value.length-f,p.prefix&&(f=Math.max(f,p.prefix.length)),MS(s,f),d!==s.value&&s.dispatchEvent(Wm("input"))}(o)},n=o=>{o.target===t&&function(a){const{target:s}=a,{oldValue:u}=s;Tu(s,null,{force:!0,clean:!0,emit:!1}),u!==s.value&&s.dispatchEvent(Wm("input"))}(o)},i=o=>{o.target===t&&function(a,s){const{options:u}=s,{prefix:f,suffix:d,decimal:p,min:v,separator:m}=u,{key:g}=a,E=new RegExp(`${f}|${d}`,"g"),w=s.value.replace(E,""),x=v===void 0||Number(v)<0||Number(v)!==v;if(g===p)w.includes(p)?a.preventDefault():w||(s.value="0",s.dispatchEvent(new Event("input")));else if(g!==Wo||x){if(g==="Backspace"){const k=s.selectionEnd||0,_=s.value.slice(k-1,k),O=s.value.slice(k-2,k);let N=s.value.length-k;[f,Wo,m].includes(_)&&(a.preventDefault(),s.value=_===m?s.value.replace(O,""):s.value.replace(new RegExp(`[${f}${Wo}]`,"g"),""),N=Math.max(N,d.length),N=s.value.length-N,N=Math.max(N,f.length),MS(s,N),s.dispatchEvent(new Event("input")))}}else a.preventDefault()}(o,t)};e.addEventListener("input",r,!0),e.addEventListener("blur",n,!0),e.addEventListener("keydown",i,!0),t.cleanup=()=>{e.removeEventListener("input",r,!0),e.removeEventListener("blur",n,!0),e.removeEventListener("keydown",i,!0)}},updated:(t,{value:e,oldValue:r,modifiers:n},i)=>{if(t=ld(t),e!==r){const o=t.options;t.options=Object.assign(o,e,n),Tu(t,i,{force:!0,clean:!1,emit:!1})}else Tu(t,i,{emit:!1})},unmounted:t=>{var e;(e=ld(t))==null||e.cleanup()}};const Hn=Vm(zm);var jm=y.defineComponent({name:"VueNumber",directives:{number:P2e},props:{modelValue:{type:[String,Number],required:!0},nullValue:{type:[Number,String],default:Hn.nullValue},masked:Boolean,readonly:Boolean,disabled:Boolean,reverseFill:{type:Boolean,default:Hn.reverseFill},prefill:{type:Boolean,default:Hn.prefill},precision:{type:Number,default:()=>Hn.precision},minimumFractionDigits:{type:Number,default:()=>Hn.minimumFractionDigits},decimal:{type:String,default:()=>Hn.decimal},min:{type:Number,default:()=>Hn.min},max:{type:Number,default:()=>Hn.max},separator:{type:String,default:()=>Hn.separator},prefix:{type:String,default:()=>Hn.prefix},suffix:{type:String,default:()=>Hn.suffix},inputmode:{type:String,default:()=>Hn.inputmode}},emits:["update:model-value","input:model-value"],setup(t,{emit:e}){const r=y.ref(t.modelValue),n=y.ref(!1),i=y.ref(""),o=y.computed(()=>({...t})),a=new qm(o.value),s=y.computed(()=>t.masked?a.format(r.value):i.value),u=()=>{e("update:model-value",s.value)};return y.watch(()=>t.modelValue,f=>{s.value!==f&&(r.value=a.format(f))}),{config:o,maskedValue:r,unmaskedValue:i,input:f=>{const{target:d}=f;r.value=d.value,i.value=d.unmasked,n.value=!0,e("input:model-value",s.value)},blur:()=>{n.value&&s.value!==t.modelValue&&u()},change:u}}});const B2e=["value","readonly","disabled"];jm.render=function(t,e,r,n,i,o){const a=y.resolveDirective("number");return y.withDirectives((y.openBlock(),y.createElementBlock("input",{type:"text",autocomplete:"off",value:t.maskedValue,readonly:t.readonly,disabled:t.disabled,class:"v-number vue-number-format",onChange:e[0]||(e[0]=(...s)=>t.change&&t.change(...s)),onInput:e[1]||(e[1]=(...s)=>t.input&&t.input(...s)),onBlur:e[2]||(e[2]=(...s)=>t.blur&&t.blur(...s))},null,40,B2e)),[[a,t.config]])},jm.__file="src/component.vue";const $2e=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"element-number",props:{modelValue:{type:[String,Number],default:null},type:{type:String,default:"text"},name:{type:String,default:""},rules:{type:String,default:""},immediate:{type:Boolean,default:!1},isClear:{type:Boolean,default:!0},placeholder:{type:String,default:"입력해 주세요."},className:{type:String,default:"custom-input-compo"},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},isHover:{type:Boolean,default:!0},tooltipModifiers:{type:Array,default(){return[{name:"offset",options:{offset:[30,25]}},{name:"arrow",options:{padding:15}}]}},tooltipPlacement:{type:String,default:"top-end"},prefix:{type:String,default:""},suffix:{type:String,default:""},separator:{type:String,default:","},decimal:{type:String,default:"."},precision:{type:String,default:""},minimumFractionDigits:{type:String,default:""},prefill:{type:Boolean,default:!0},reverseFill:{type:Boolean,default:!1},masked:{type:Boolean,default:!1},min:{type:Number,default:null},max:{type:Number,default:null},nullValue:{type:String,default:""}},emits:["update:modelValue"],setup(t,{emit:e}){const r=t,n=e;let i=Hi.generateUuid();const o=y.ref(null),a=y.computed({get(){return i=utils.generateUuid(),r.modelValue},set(u){return n("update:modelValue",u)}});y.onMounted(async()=>{r.immediate&&await o.value.validate()});const s=()=>{a.value="",n("update:modelValue","")};return(u,f)=>(y.openBlock(),y.createBlock(y.unref(ma),{ref_key:"veeField",ref:o,modelValue:a.value,"onUpdate:modelValue":f[1]||(f[1]=d=>a.value=d),rules:t.rules,type:t.type,name:t.name},{default:y.withCtx(({field:d,errors:p})=>[y.createElementVNode("span",{class:y.normalizeClass(["ipt",p.length>0?"iptError":""])},[y.createElementVNode("input",y.mergeProps(d,{type:"hidden"}),null,16),(y.openBlock(),y.createBlock(y.unref(jm),y.mergeProps({modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=v=>a.value=v)},{prefix:t.prefix,suffix:t.suffix,separator:t.separator,decimal:t.decimal,precision:t.precision,minimumFractionDigits:t.minimumFractionDigits,prefill:t.prefill,reverseFill:t.reverseFill,masked:t.masked,min:t.min,max:t.max,nullValue:t.nullValue},{disabled:t.disabled,readonly:t.readonly,style:{"text-align":"right"},key:y.unref(i)}),null,16,["modelValue","disabled","readonly"])),p.length>0?(y.openBlock(),y.createBlock(Ml,{key:0,msg:p[0],placement:t.tooltipPlacement,modifiers:t.tooltipModifiers},{default:y.withCtx(()=>[...f[2]||(f[2]=[y.createElementVNode("span",{class:"error"},[y.createElementVNode("span",{class:"hide"},"에러")],-1)])]),_:1},8,["msg","placement","modifiers"])):y.createCommentVNode("",!0),!t.disabled&&t.isClear&&a.value?(y.openBlock(),y.createBlock(El,{key:1,className:"btn_del",onClick:s},{default:y.withCtx(()=>[...f[3]||(f[3]=[y.createElementVNode("span",{class:"hide"},"삭제",-1)])]),_:1})):y.createCommentVNode("",!0)],2)]),_:1},8,["modelValue","rules","type","name"]))}}},Symbol.toStringTag,{value:"Module"})),F2e={class:"multi-btn"},H2e=["onClick"],U2e=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"element-radio-button",props:{modelValue:{type:[String,Number],default:""},options:{type:Array,default(){return[]}}},emits:["update:modelValue","click"],setup(t,{emit:e}){const r=t,n=e,i=y.computed({get(){return r.modelValue},set(a){return n("update:modelValue",a)}}),o=a=>{n("click",a.value),i.value=a.value};return(a,s)=>(y.openBlock(),y.createElementBlock("div",F2e,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(t.options,(u,f)=>(y.openBlock(),y.createElementBlock("button",{key:f,class:y.normalizeClass([{"on-active":u.value===i.value},"btn-item"]),onClick:d=>o(u)},y.toDisplayString(u.label),11,H2e))),128))]))}}},Symbol.toStringTag,{value:"Module"})),z2e=["id","value"],q2e={class:"text"},V2e={key:0,class:"txt_tf txt_error"},W2e=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"element-radio",props:{modelValue:{type:[String,Number],default:""},options:{type:Array,default(){return[]}},rules:{type:String,default:""},name:{type:String,default:""},immediate:{type:Boolean,default:!1}},emits:["update:modelValue","click"],setup(t,{emit:e}){const r=t,n=e,i=Hi.generateUuid(),o=y.ref(null),a=y.computed({get(){return r.modelValue},set(s){return n("update:modelValue",s)}});return y.onMounted(async()=>{r.immediate&&await o.value.validate()}),(s,u)=>(y.openBlock(),y.createBlock(y.unref(ma),{ref_key:"veeField",ref:o,modelValue:a.value,"onUpdate:modelValue":u[1]||(u[1]=f=>a.value=f),rules:t.rules,type:"radio",name:t.name},{default:y.withCtx(({field:f,errors:d})=>[y.createElementVNode("div",null,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(t.options,(p,v)=>(y.openBlock(),y.createElementBlock("label",{key:v,class:"radio"},[y.withDirectives(y.createElementVNode("input",{type:"radio",id:`radio-${y.unref(i)}-${v}`,"onUpdate:modelValue":u[0]||(u[0]=m=>a.value=m),value:p.value,class:"hide"},null,8,z2e),[[y.vModelRadio,a.value]]),y.createElementVNode("span",q2e,y.toDisplayString(p.label),1),y.createElementVNode("input",y.mergeProps({ref_for:!0},f,{type:"hidden"}),null,16)]))),128)),d.length>0?(y.openBlock(),y.createElementBlock("p",V2e,y.toDisplayString(d[0]),1)):y.createCommentVNode("",!0)])]),_:1},8,["modelValue","rules","name"]))}}},Symbol.toStringTag,{value:"Module"}));/*!
|
|
771
|
+
* shared v11.2.2
|
|
772
|
+
* (c) 2025 kazuya kawaguchi
|
|
773
|
+
* Released under the MIT License.
|
|
774
|
+
*/function Ai(t,e){typeof console<"u"&&(console.warn("[intlify] "+t),e&&console.warn(e.stack))}const NS={};function j2e(t){NS[t]||(NS[t]=!0,Ai(t))}const eo=typeof window<"u";let En,Ua;if(process.env.NODE_ENV!=="production"){const t=eo&&window.performance;t&&t.mark&&t.measure&&t.clearMarks&&t.clearMeasures&&(En=e=>{t.mark(e)},Ua=(e,r,n)=>{t.measure(e,r,n),t.clearMarks(r),t.clearMarks(n)})}const G2e=/\{([0-9a-zA-Z]+)\}/g;function ud(t,...e){return e.length===1&&ct(e[0])&&(e=e[0]),(!e||!e.hasOwnProperty)&&(e={}),t.replace(G2e,(r,n)=>e.hasOwnProperty(n)?e[n]:"")}const to=(t,e=!1)=>e?Symbol.for(t):Symbol(t),K2e=(t,e,r)=>Y2e({l:t,k:e,s:r}),Y2e=t=>JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),or=t=>typeof t=="number"&&isFinite(t),X2e=t=>Gm(t)==="[object Date]",cd=t=>Gm(t)==="[object RegExp]",fd=t=>ft(t)&&Object.keys(t).length===0,ar=Object.assign,J2e=Object.create,bt=(t=null)=>J2e(t);let LS;const za=()=>LS||(LS=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:bt());function DS(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function IS(t){return t.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function Z2e(t){return t=t.replace(/(\w+)\s*=\s*"([^"]*)"/g,(n,i,o)=>`${i}="${IS(o)}"`),t=t.replace(/(\w+)\s*=\s*'([^']*)'/g,(n,i,o)=>`${i}='${IS(o)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(t)&&(process.env.NODE_ENV!=="production"&&Ai("Potentially dangerous event handlers detected in translation. Consider removing onclick, onerror, etc. from your translation messages."),t=t.replace(/(\s+)(on)(\w+\s*=)/gi,"$1on$3")),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(n=>{t=t.replace(n,"$1javascript:")}),t}const Q2e=Object.prototype.hasOwnProperty;function ai(t,e){return Q2e.call(t,e)}const Bt=Array.isArray,St=t=>typeof t=="function",xe=t=>typeof t=="string",$t=t=>typeof t=="boolean",ct=t=>t!==null&&typeof t=="object",eLe=t=>ct(t)&&St(t.then)&&St(t.catch),RS=Object.prototype.toString,Gm=t=>RS.call(t),ft=t=>Gm(t)==="[object Object]",tLe=t=>t==null?"":Bt(t)||ft(t)&&t.toString===RS?JSON.stringify(t,null,2):String(t);function Km(t,e=""){return t.reduce((r,n,i)=>i===0?r+n:r+e+n,"")}const PS=2;function rLe(t,e=0,r=t.length){const n=t.split(/\r?\n/);let i=0;const o=[];for(let a=0;a<n.length;a++)if(i+=n[a].length+1,i>=e){for(let s=a-PS;s<=a+PS||r>i;s++){if(s<0||s>=n.length)continue;const u=s+1;o.push(`${u}${" ".repeat(3-String(u).length)}| ${n[s]}`);const f=n[s].length;if(s===a){const d=e-(i-f)+1,p=Math.max(1,r>i?f-d:r-e);o.push(" | "+" ".repeat(d)+"^".repeat(p))}else if(s>a){if(r>i){const d=Math.max(Math.min(r-i,f),1);o.push(" | "+"^".repeat(d))}i+=f+1}}break}return o.join(`
|
|
775
|
+
`)}function nLe(){const t=new Map;return{events:t,on(r,n){const i=t.get(r);i&&i.push(n)||t.set(r,[n])},off(r,n){const i=t.get(r);i&&i.splice(i.indexOf(n)>>>0,1)},emit(r,n){(t.get(r)||[]).slice().map(i=>i(n)),(t.get("*")||[]).slice().map(i=>i(r,n))}}}const dd=t=>!ct(t)||Bt(t);function pd(t,e){if(dd(t)||dd(e))throw new Error("Invalid value");const r=[{src:t,des:e}];for(;r.length;){const{src:n,des:i}=r.pop();Object.keys(n).forEach(o=>{o!=="__proto__"&&(ct(n[o])&&!ct(i[o])&&(i[o]=Array.isArray(n[o])?[]:bt()),dd(i[o])||dd(n[o])?i[o]=n[o]:r.push({src:n[o],des:i[o]}))})}}/*!
|
|
776
|
+
* message-compiler v11.2.2
|
|
777
|
+
* (c) 2025 kazuya kawaguchi
|
|
778
|
+
* Released under the MIT License.
|
|
779
|
+
*/function iLe(t,e,r){return{line:t,column:e,offset:r}}function Ym(t,e,r){return{start:t,end:e}}const Be={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16},oLe=17,aLe={[Be.EXPECTED_TOKEN]:"Expected token: '{0}'",[Be.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[Be.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[Be.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[Be.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[Be.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[Be.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[Be.EMPTY_PLACEHOLDER]:"Empty placeholder",[Be.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[Be.INVALID_LINKED_FORMAT]:"Invalid linked format",[Be.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[Be.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[Be.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[Be.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[Be.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[Be.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function Xs(t,e,r={}){const{domain:n,messages:i,args:o}=r,a=process.env.NODE_ENV!=="production"?ud((i||aLe)[t]||"",...o||[]):t,s=new SyntaxError(String(a));return s.code=t,e&&(s.location=e),s.domain=n,s}function sLe(t){throw t}const lLe=/<\/?[\w\s="/.':;#-\/]+>/,uLe=t=>lLe.test(t),Mi=" ",cLe="\r",Dr=`
|
|
780
|
+
`,fLe="\u2028",dLe="\u2029";function pLe(t){const e=t;let r=0,n=1,i=1,o=0;const a=A=>e[A]===cLe&&e[A+1]===Dr,s=A=>e[A]===Dr,u=A=>e[A]===dLe,f=A=>e[A]===fLe,d=A=>a(A)||s(A)||u(A)||f(A),p=()=>r,v=()=>n,m=()=>i,g=()=>o,E=A=>a(A)||u(A)||f(A)?Dr:e[A],w=()=>E(r),x=()=>E(r+o);function k(){return o=0,d(r)&&(n++,i=0),a(r)&&r++,r++,i++,e[r]}function _(){return a(r+o)&&o++,o++,e[r+o]}function O(){r=0,n=1,i=1,o=0}function N(A=0){o=A}function L(){const A=r+o;for(;A!==r;)k();o=0}return{index:p,line:v,column:m,peekOffset:g,charAt:E,currentChar:w,currentPeek:x,next:k,peek:_,reset:O,resetPeek:N,skipToPeek:L}}const ro=void 0,hLe=".",BS="'",vLe="tokenizer";function mLe(t,e={}){const r=e.location!==!1,n=pLe(t),i=()=>n.index(),o=()=>iLe(n.line(),n.column(),n.index()),a=o(),s=i(),u={currentType:13,offset:s,startLoc:a,endLoc:a,lastType:13,lastOffset:s,lastStartLoc:a,lastEndLoc:a,braceNest:0,inLinked:!1,text:""},f=()=>u,{onError:d}=e;function p(D,R,X,...fe){const Ke=f();if(R.column+=X,R.offset+=X,d){const et=r?Ym(Ke.startLoc,R):null,je=Xs(D,et,{domain:vLe,args:fe});d(je)}}function v(D,R,X){D.endLoc=o(),D.currentType=R;const fe={type:R};return r&&(fe.loc=Ym(D.startLoc,D.endLoc)),X!=null&&(fe.value=X),fe}const m=D=>v(D,13);function g(D,R){return D.currentChar()===R?(D.next(),R):(p(Be.EXPECTED_TOKEN,o(),0,R),"")}function E(D){let R="";for(;D.currentPeek()===Mi||D.currentPeek()===Dr;)R+=D.currentPeek(),D.peek();return R}function w(D){const R=E(D);return D.skipToPeek(),R}function x(D){if(D===ro)return!1;const R=D.charCodeAt(0);return R>=97&&R<=122||R>=65&&R<=90||R===95}function k(D){if(D===ro)return!1;const R=D.charCodeAt(0);return R>=48&&R<=57}function _(D,R){const{currentType:X}=R;if(X!==2)return!1;E(D);const fe=x(D.currentPeek());return D.resetPeek(),fe}function O(D,R){const{currentType:X}=R;if(X!==2)return!1;E(D);const fe=D.currentPeek()==="-"?D.peek():D.currentPeek(),Ke=k(fe);return D.resetPeek(),Ke}function N(D,R){const{currentType:X}=R;if(X!==2)return!1;E(D);const fe=D.currentPeek()===BS;return D.resetPeek(),fe}function L(D,R){const{currentType:X}=R;if(X!==7)return!1;E(D);const fe=D.currentPeek()===".";return D.resetPeek(),fe}function A(D,R){const{currentType:X}=R;if(X!==8)return!1;E(D);const fe=x(D.currentPeek());return D.resetPeek(),fe}function P(D,R){const{currentType:X}=R;if(!(X===7||X===11))return!1;E(D);const fe=D.currentPeek()===":";return D.resetPeek(),fe}function U(D,R){const{currentType:X}=R;if(X!==9)return!1;const fe=()=>{const et=D.currentPeek();return et==="{"?x(D.peek()):et==="@"||et==="|"||et===":"||et==="."||et===Mi||!et?!1:et===Dr?(D.peek(),fe()):re(D,!1)},Ke=fe();return D.resetPeek(),Ke}function J(D){E(D);const R=D.currentPeek()==="|";return D.resetPeek(),R}function re(D,R=!0){const X=(Ke=!1,et="")=>{const je=D.currentPeek();return je==="{"||je==="@"||!je?Ke:je==="|"?!(et===Mi||et===Dr):je===Mi?(D.peek(),X(!0,Mi)):je===Dr?(D.peek(),X(!0,Dr)):!0},fe=X();return R&&D.resetPeek(),fe}function Se(D,R){const X=D.currentChar();return X===ro?ro:R(X)?(D.next(),X):null}function Fe(D){const R=D.charCodeAt(0);return R>=97&&R<=122||R>=65&&R<=90||R>=48&&R<=57||R===95||R===36}function ce(D){return Se(D,Fe)}function le(D){const R=D.charCodeAt(0);return R>=97&&R<=122||R>=65&&R<=90||R>=48&&R<=57||R===95||R===36||R===45}function Z(D){return Se(D,le)}function j(D){const R=D.charCodeAt(0);return R>=48&&R<=57}function ue(D){return Se(D,j)}function ye(D){const R=D.charCodeAt(0);return R>=48&&R<=57||R>=65&&R<=70||R>=97&&R<=102}function ve(D){return Se(D,ye)}function ke(D){let R="",X="";for(;R=ue(D);)X+=R;return X}function Te(D){let R="";for(;;){const X=D.currentChar();if(X==="{"||X==="}"||X==="@"||X==="|"||!X)break;if(X===Mi||X===Dr)if(re(D))R+=X,D.next();else{if(J(D))break;R+=X,D.next()}else R+=X,D.next()}return R}function We(D){w(D);let R="",X="";for(;R=Z(D);)X+=R;const fe=D.currentChar();if(fe&&fe!=="}"&&fe!==ro&&fe!==Mi&&fe!==Dr&&fe!==" "){const Ke=te(D);return p(Be.INVALID_TOKEN_IN_PLACEHOLDER,o(),0,X+Ke),X+Ke}return D.currentChar()===ro&&p(Be.UNTERMINATED_CLOSING_BRACE,o(),0),X}function we(D){w(D);let R="";return D.currentChar()==="-"?(D.next(),R+=`-${ke(D)}`):R+=ke(D),D.currentChar()===ro&&p(Be.UNTERMINATED_CLOSING_BRACE,o(),0),R}function De(D){return D!==BS&&D!==Dr}function pe(D){w(D),g(D,"'");let R="",X="";for(;R=Se(D,De);)R==="\\"?X+=F(D):X+=R;const fe=D.currentChar();return fe===Dr||fe===ro?(p(Be.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,o(),0),fe===Dr&&(D.next(),g(D,"'")),X):(g(D,"'"),X)}function F(D){const R=D.currentChar();switch(R){case"\\":case"'":return D.next(),`\\${R}`;case"u":return G(D,R,4);case"U":return G(D,R,6);default:return p(Be.UNKNOWN_ESCAPE_SEQUENCE,o(),0,R),""}}function G(D,R,X){g(D,R);let fe="";for(let Ke=0;Ke<X;Ke++){const et=ve(D);if(!et){p(Be.INVALID_UNICODE_ESCAPE_SEQUENCE,o(),0,`\\${R}${fe}${D.currentChar()}`);break}fe+=et}return`\\${R}${fe}`}function K(D){return D!=="{"&&D!=="}"&&D!==Mi&&D!==Dr}function te(D){w(D);let R="",X="";for(;R=Se(D,K);)X+=R;return X}function ne(D){let R="",X="";for(;R=ce(D);)X+=R;return X}function he(D){const R=X=>{const fe=D.currentChar();return fe==="{"||fe==="@"||fe==="|"||fe==="("||fe===")"||!fe||fe===Mi?X:(X+=fe,D.next(),R(X))};return R("")}function Ne(D){w(D);const R=g(D,"|");return w(D),R}function Xe(D,R){let X=null;switch(D.currentChar()){case"{":return R.braceNest>=1&&p(Be.NOT_ALLOW_NEST_PLACEHOLDER,o(),0),D.next(),X=v(R,2,"{"),w(D),R.braceNest++,X;case"}":return R.braceNest>0&&R.currentType===2&&p(Be.EMPTY_PLACEHOLDER,o(),0),D.next(),X=v(R,3,"}"),R.braceNest--,R.braceNest>0&&w(D),R.inLinked&&R.braceNest===0&&(R.inLinked=!1),X;case"@":return R.braceNest>0&&p(Be.UNTERMINATED_CLOSING_BRACE,o(),0),X=ot(D,R)||m(R),R.braceNest=0,X;default:{let Ke=!0,et=!0,je=!0;if(J(D))return R.braceNest>0&&p(Be.UNTERMINATED_CLOSING_BRACE,o(),0),X=v(R,1,Ne(D)),R.braceNest=0,R.inLinked=!1,X;if(R.braceNest>0&&(R.currentType===4||R.currentType===5||R.currentType===6))return p(Be.UNTERMINATED_CLOSING_BRACE,o(),0),R.braceNest=0,sr(D,R);if(Ke=_(D,R))return X=v(R,4,We(D)),w(D),X;if(et=O(D,R))return X=v(R,5,we(D)),w(D),X;if(je=N(D,R))return X=v(R,6,pe(D)),w(D),X;if(!Ke&&!et&&!je)return X=v(R,12,te(D)),p(Be.INVALID_TOKEN_IN_PLACEHOLDER,o(),0,X.value),w(D),X;break}}return X}function ot(D,R){const{currentType:X}=R;let fe=null;const Ke=D.currentChar();switch((X===7||X===8||X===11||X===9)&&(Ke===Dr||Ke===Mi)&&p(Be.INVALID_LINKED_FORMAT,o(),0),Ke){case"@":return D.next(),fe=v(R,7,"@"),R.inLinked=!0,fe;case".":return w(D),D.next(),v(R,8,".");case":":return w(D),D.next(),v(R,9,":");default:return J(D)?(fe=v(R,1,Ne(D)),R.braceNest=0,R.inLinked=!1,fe):L(D,R)||P(D,R)?(w(D),ot(D,R)):A(D,R)?(w(D),v(R,11,ne(D))):U(D,R)?(w(D),Ke==="{"?Xe(D,R)||fe:v(R,10,he(D))):(X===7&&p(Be.INVALID_LINKED_FORMAT,o(),0),R.braceNest=0,R.inLinked=!1,sr(D,R))}}function sr(D,R){let X={type:13};if(R.braceNest>0)return Xe(D,R)||m(R);if(R.inLinked)return ot(D,R)||m(R);switch(D.currentChar()){case"{":return Xe(D,R)||m(R);case"}":return p(Be.UNBALANCED_CLOSING_BRACE,o(),0),D.next(),v(R,3,"}");case"@":return ot(D,R)||m(R);default:{if(J(D))return X=v(R,1,Ne(D)),R.braceNest=0,R.inLinked=!1,X;if(re(D))return v(R,0,Te(D));break}}return X}function Ft(){const{currentType:D,offset:R,startLoc:X,endLoc:fe}=u;return u.lastType=D,u.lastOffset=R,u.lastStartLoc=X,u.lastEndLoc=fe,u.offset=i(),u.startLoc=o(),n.currentChar()===ro?v(u,13):sr(n,u)}return{nextToken:Ft,currentOffset:i,currentPosition:o,context:f}}const gLe="parser",yLe=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function bLe(t,e,r){switch(t){case"\\\\":return"\\";case"\\'":return"'";default:{const n=parseInt(e||r,16);return n<=55295||n>=57344?String.fromCodePoint(n):"�"}}}function wLe(t={}){const e=t.location!==!1,{onError:r}=t;function n(x,k,_,O,...N){const L=x.currentPosition();if(L.offset+=O,L.column+=O,r){const A=e?Ym(_,L):null,P=Xs(k,A,{domain:gLe,args:N});r(P)}}function i(x,k,_){const O={type:x};return e&&(O.start=k,O.end=k,O.loc={start:_,end:_}),O}function o(x,k,_,O){e&&(x.end=k,x.loc&&(x.loc.end=_))}function a(x,k){const _=x.context(),O=i(3,_.offset,_.startLoc);return O.value=k,o(O,x.currentOffset(),x.currentPosition()),O}function s(x,k){const _=x.context(),{lastOffset:O,lastStartLoc:N}=_,L=i(5,O,N);return L.index=parseInt(k,10),x.nextToken(),o(L,x.currentOffset(),x.currentPosition()),L}function u(x,k){const _=x.context(),{lastOffset:O,lastStartLoc:N}=_,L=i(4,O,N);return L.key=k,x.nextToken(),o(L,x.currentOffset(),x.currentPosition()),L}function f(x,k){const _=x.context(),{lastOffset:O,lastStartLoc:N}=_,L=i(9,O,N);return L.value=k.replace(yLe,bLe),x.nextToken(),o(L,x.currentOffset(),x.currentPosition()),L}function d(x){const k=x.nextToken(),_=x.context(),{lastOffset:O,lastStartLoc:N}=_,L=i(8,O,N);return k.type!==11?(n(x,Be.UNEXPECTED_EMPTY_LINKED_MODIFIER,_.lastStartLoc,0),L.value="",o(L,O,N),{nextConsumeToken:k,node:L}):(k.value==null&&n(x,Be.UNEXPECTED_LEXICAL_ANALYSIS,_.lastStartLoc,0,Ni(k)),L.value=k.value||"",o(L,x.currentOffset(),x.currentPosition()),{node:L})}function p(x,k){const _=x.context(),O=i(7,_.offset,_.startLoc);return O.value=k,o(O,x.currentOffset(),x.currentPosition()),O}function v(x){const k=x.context(),_=i(6,k.offset,k.startLoc);let O=x.nextToken();if(O.type===8){const N=d(x);_.modifier=N.node,O=N.nextConsumeToken||x.nextToken()}switch(O.type!==9&&n(x,Be.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ni(O)),O=x.nextToken(),O.type===2&&(O=x.nextToken()),O.type){case 10:O.value==null&&n(x,Be.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ni(O)),_.key=p(x,O.value||"");break;case 4:O.value==null&&n(x,Be.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ni(O)),_.key=u(x,O.value||"");break;case 5:O.value==null&&n(x,Be.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ni(O)),_.key=s(x,O.value||"");break;case 6:O.value==null&&n(x,Be.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ni(O)),_.key=f(x,O.value||"");break;default:{n(x,Be.UNEXPECTED_EMPTY_LINKED_KEY,k.lastStartLoc,0);const N=x.context(),L=i(7,N.offset,N.startLoc);return L.value="",o(L,N.offset,N.startLoc),_.key=L,o(_,N.offset,N.startLoc),{nextConsumeToken:O,node:_}}}return o(_,x.currentOffset(),x.currentPosition()),{node:_}}function m(x){const k=x.context(),_=k.currentType===1?x.currentOffset():k.offset,O=k.currentType===1?k.endLoc:k.startLoc,N=i(2,_,O);N.items=[];let L=null;do{const U=L||x.nextToken();switch(L=null,U.type){case 0:U.value==null&&n(x,Be.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ni(U)),N.items.push(a(x,U.value||""));break;case 5:U.value==null&&n(x,Be.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ni(U)),N.items.push(s(x,U.value||""));break;case 4:U.value==null&&n(x,Be.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ni(U)),N.items.push(u(x,U.value||""));break;case 6:U.value==null&&n(x,Be.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ni(U)),N.items.push(f(x,U.value||""));break;case 7:{const J=v(x);N.items.push(J.node),L=J.nextConsumeToken||null;break}}}while(k.currentType!==13&&k.currentType!==1);const A=k.currentType===1?k.lastOffset:x.currentOffset(),P=k.currentType===1?k.lastEndLoc:x.currentPosition();return o(N,A,P),N}function g(x,k,_,O){const N=x.context();let L=O.items.length===0;const A=i(1,k,_);A.cases=[],A.cases.push(O);do{const P=m(x);L||(L=P.items.length===0),A.cases.push(P)}while(N.currentType!==13);return L&&n(x,Be.MUST_HAVE_MESSAGES_IN_PLURAL,_,0),o(A,x.currentOffset(),x.currentPosition()),A}function E(x){const k=x.context(),{offset:_,startLoc:O}=k,N=m(x);return k.currentType===13?N:g(x,_,O,N)}function w(x){const k=mLe(x,ar({},t)),_=k.context(),O=i(0,_.offset,_.startLoc);return e&&O.loc&&(O.loc.source=x),O.body=E(k),t.onCacheKey&&(O.cacheKey=t.onCacheKey(x)),_.currentType!==13&&n(k,Be.UNEXPECTED_LEXICAL_ANALYSIS,_.lastStartLoc,0,x[_.offset]||""),o(O,k.currentOffset(),k.currentPosition()),O}return{parse:w}}function Ni(t){if(t.type===13)return"EOF";const e=(t.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function ELe(t,e={}){const r={ast:t,helpers:new Set};return{context:()=>r,helper:o=>(r.helpers.add(o),o)}}function $S(t,e){for(let r=0;r<t.length;r++)Xm(t[r],e)}function Xm(t,e){switch(t.type){case 1:$S(t.cases,e),e.helper("plural");break;case 2:$S(t.items,e);break;case 6:{Xm(t.key,e),e.helper("linked"),e.helper("type");break}case 5:e.helper("interpolate"),e.helper("list");break;case 4:e.helper("interpolate"),e.helper("named");break}}function xLe(t,e={}){const r=ELe(t);r.helper("normalize"),t.body&&Xm(t.body,r);const n=r.context();t.helpers=Array.from(n.helpers)}function CLe(t){const e=t.body;return e.type===2?FS(e):e.cases.forEach(r=>FS(r)),t}function FS(t){if(t.items.length===1){const e=t.items[0];(e.type===3||e.type===9)&&(t.static=e.value,delete e.value)}else{const e=[];for(let r=0;r<t.items.length;r++){const n=t.items[r];if(!(n.type===3||n.type===9)||n.value==null)break;e.push(n.value)}if(e.length===t.items.length){t.static=Km(e);for(let r=0;r<t.items.length;r++){const n=t.items[r];(n.type===3||n.type===9)&&delete n.value}}}}const kLe="minifier";function Js(t){switch(t.t=t.type,t.type){case 0:{const e=t;Js(e.body),e.b=e.body,delete e.body;break}case 1:{const e=t,r=e.cases;for(let n=0;n<r.length;n++)Js(r[n]);e.c=r,delete e.cases;break}case 2:{const e=t,r=e.items;for(let n=0;n<r.length;n++)Js(r[n]);e.i=r,delete e.items,e.static&&(e.s=e.static,delete e.static);break}case 3:case 9:case 8:case 7:{const e=t;e.value&&(e.v=e.value,delete e.value);break}case 6:{const e=t;Js(e.key),e.k=e.key,delete e.key,e.modifier&&(Js(e.modifier),e.m=e.modifier,delete e.modifier);break}case 5:{const e=t;e.i=e.index,delete e.index;break}case 4:{const e=t;e.k=e.key,delete e.key;break}default:if(process.env.NODE_ENV!=="production")throw Xs(Be.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:kLe,args:[t.type]})}delete t.type}const TLe="parser";function SLe(t,e){const{filename:r,breakLineCode:n,needIndent:i}=e,o=e.location!==!1,a={filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:n,needIndent:i,indentLevel:0};o&&t.loc&&(a.source=t.loc.source);const s=()=>a;function u(E,w){a.code+=E}function f(E,w=!0){const x=w?n:"";u(i?x+" ".repeat(E):x)}function d(E=!0){const w=++a.indentLevel;E&&f(w)}function p(E=!0){const w=--a.indentLevel;E&&f(w)}function v(){f(a.indentLevel)}return{context:s,push:u,indent:d,deindent:p,newline:v,helper:E=>`_${E}`,needIndent:()=>a.needIndent}}function _Le(t,e){const{helper:r}=t;t.push(`${r("linked")}(`),Zs(t,e.key),e.modifier?(t.push(", "),Zs(t,e.modifier),t.push(", _type")):t.push(", undefined, _type"),t.push(")")}function OLe(t,e){const{helper:r,needIndent:n}=t;t.push(`${r("normalize")}([`),t.indent(n());const i=e.items.length;for(let o=0;o<i&&(Zs(t,e.items[o]),o!==i-1);o++)t.push(", ");t.deindent(n()),t.push("])")}function ALe(t,e){const{helper:r,needIndent:n}=t;if(e.cases.length>1){t.push(`${r("plural")}([`),t.indent(n());const i=e.cases.length;for(let o=0;o<i&&(Zs(t,e.cases[o]),o!==i-1);o++)t.push(", ");t.deindent(n()),t.push("])")}}function MLe(t,e){e.body?Zs(t,e.body):t.push("null")}function Zs(t,e){const{helper:r}=t;switch(e.type){case 0:MLe(t,e);break;case 1:ALe(t,e);break;case 2:OLe(t,e);break;case 6:_Le(t,e);break;case 8:t.push(JSON.stringify(e.value),e);break;case 7:t.push(JSON.stringify(e.value),e);break;case 5:t.push(`${r("interpolate")}(${r("list")}(${e.index}))`,e);break;case 4:t.push(`${r("interpolate")}(${r("named")}(${JSON.stringify(e.key)}))`,e);break;case 9:t.push(JSON.stringify(e.value),e);break;case 3:t.push(JSON.stringify(e.value),e);break;default:if(process.env.NODE_ENV!=="production")throw Xs(Be.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:TLe,args:[e.type]})}}const NLe=(t,e={})=>{const r=xe(e.mode)?e.mode:"normal",n=xe(e.filename)?e.filename:"message.intl";e.sourceMap;const i=e.breakLineCode!=null?e.breakLineCode:r==="arrow"?";":`
|
|
781
|
+
`,o=e.needIndent?e.needIndent:r!=="arrow",a=t.helpers||[],s=SLe(t,{filename:n,breakLineCode:i,needIndent:o});s.push(r==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),s.indent(o),a.length>0&&(s.push(`const { ${Km(a.map(d=>`${d}: _${d}`),", ")} } = ctx`),s.newline()),s.push("return "),Zs(s,t),s.deindent(o),s.push("}"),delete t.helpers;const{code:u,map:f}=s.context();return{ast:t,code:u,map:f?f.toJSON():void 0}};function LLe(t,e={}){const r=ar({},e),n=!!r.jit,i=!!r.minify,o=r.optimize==null?!0:r.optimize,s=wLe(r).parse(t);return n?(o&&CLe(s),i&&Js(s),{ast:s,code:""}):(xLe(s,r),NLe(s,r))}/*!
|
|
782
|
+
* core-base v11.2.2
|
|
783
|
+
* (c) 2025 kazuya kawaguchi
|
|
784
|
+
* Released under the MIT License.
|
|
785
|
+
*/function DLe(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(za().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(za().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function si(t){return ct(t)&&Jm(t)===0&&(ai(t,"b")||ai(t,"body"))}const HS=["b","body"];function ILe(t){return jo(t,HS)}const US=["c","cases"];function RLe(t){return jo(t,US,[])}const zS=["s","static"];function PLe(t){return jo(t,zS)}const qS=["i","items"];function BLe(t){return jo(t,qS,[])}const VS=["t","type"];function Jm(t){return jo(t,VS)}const WS=["v","value"];function hd(t,e){const r=jo(t,WS);if(r!=null)return r;throw Su(e)}const jS=["m","modifier"];function $Le(t){return jo(t,jS)}const GS=["k","key"];function FLe(t){const e=jo(t,GS);if(e)return e;throw Su(6)}function jo(t,e,r){for(let n=0;n<e.length;n++){const i=e[n];if(ai(t,i)&&t[i]!=null)return t[i]}return r}const KS=[...HS,...US,...zS,...qS,...GS,...jS,...WS,...VS];function Su(t){return new Error(`unhandled node type: ${t}`)}function Zm(t){return r=>HLe(r,t)}function HLe(t,e){const r=ILe(e);if(r==null)throw Su(0);if(Jm(r)===1){const o=RLe(r);return t.plural(o.reduce((a,s)=>[...a,YS(t,s)],[]))}else return YS(t,r)}function YS(t,e){const r=PLe(e);if(r!=null)return t.type==="text"?r:t.normalize([r]);{const n=BLe(e).reduce((i,o)=>[...i,Qm(t,o)],[]);return t.normalize(n)}}function Qm(t,e){const r=Jm(e);switch(r){case 3:return hd(e,r);case 9:return hd(e,r);case 4:{const n=e;if(ai(n,"k")&&n.k)return t.interpolate(t.named(n.k));if(ai(n,"key")&&n.key)return t.interpolate(t.named(n.key));throw Su(r)}case 5:{const n=e;if(ai(n,"i")&&or(n.i))return t.interpolate(t.list(n.i));if(ai(n,"index")&&or(n.index))return t.interpolate(t.list(n.index));throw Su(r)}case 6:{const n=e,i=$Le(n),o=FLe(n);return t.linked(Qm(t,o),i?Qm(t,i):void 0,t.type)}case 7:return hd(e,r);case 8:return hd(e,r);default:throw new Error(`unhandled node on format message part: ${r}`)}}const ULe="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function zLe(t,e){e&&uLe(t)&&Ai(ud(ULe,{source:t}))}const qLe=t=>t;let vd=bt();function VLe(t,e={}){let r=!1;const n=e.onError||sLe;return e.onError=i=>{r=!0,n(i)},{...LLe(t,e),detectError:r}}function WLe(t,e){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&xe(t)){const r=$t(e.warnHtmlMessage)?e.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&zLe(t,r);const i=(e.onCacheKey||qLe)(t),o=vd[i];if(o)return o;const{ast:a,detectError:s}=VLe(t,{...e,location:process.env.NODE_ENV!=="production",jit:!0}),u=Zm(a);return s?u:vd[i]=u}else{if(process.env.NODE_ENV!=="production"&&!si(t))return Ai(`the message that is resolve with key '${e.key}' is not supported for jit compilation`),()=>t;const r=t.cacheKey;if(r){const n=vd[r];return n||(vd[r]=Zm(t))}else return Zm(t)}}let _u=null;function jLe(t){_u=t}function GLe(t,e,r){_u&&_u.emit("i18n:init",{timestamp:Date.now(),i18n:t,version:e,meta:r})}const KLe=YLe("function:translate");function YLe(t){return e=>_u&&_u.emit(t,e)}const Ir={INVALID_ARGUMENT:oLe,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},XLe=24;function no(t){return Xs(t,null,process.env.NODE_ENV!=="production"?{messages:JLe}:void 0)}const JLe={[Ir.INVALID_ARGUMENT]:"Invalid arguments",[Ir.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[Ir.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[Ir.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[Ir.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[Ir.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[Ir.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function eg(t,e){return e.locale!=null?XS(e.locale):XS(t.locale)}let tg;function XS(t){if(xe(t))return t;if(St(t)){if(t.resolvedOnce&&tg!=null)return tg;if(t.constructor.name==="Function"){const e=t();if(eLe(e))throw no(Ir.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return tg=e}else throw no(Ir.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw no(Ir.NOT_SUPPORT_LOCALE_TYPE)}function ZLe(t,e,r){return[...new Set([r,...Bt(e)?e:ct(e)?Object.keys(e):xe(e)?[e]:[r]])]}function JS(t,e,r){const n=xe(r)?r:gd,i=t;i.__localeChainCache||(i.__localeChainCache=new Map);let o=i.__localeChainCache.get(n);if(!o){o=[];let a=[r];for(;Bt(a);)a=ZS(o,a,e);const s=Bt(e)||!ft(e)?e:e.default?e.default:null;a=xe(s)?[s]:s,Bt(a)&&ZS(o,a,!1),i.__localeChainCache.set(n,o)}return o}function ZS(t,e,r){let n=!0;for(let i=0;i<e.length&&$t(n);i++){const o=e[i];xe(o)&&(n=QLe(t,e[i],r))}return n}function QLe(t,e,r){let n;const i=e.split("-");do{const o=i.join("-");n=eDe(t,o,r),i.splice(-1,1)}while(i.length&&n===!0);return n}function eDe(t,e,r){let n=!1;if(!t.includes(e)&&(n=!0,e)){n=e[e.length-1]!=="!";const i=e.replace(/!/g,"");t.push(i),(Bt(r)||ft(r))&&r[i]&&(n=r[i])}return n}const Go=[];Go[0]={w:[0],i:[3,0],"[":[4],o:[7]},Go[1]={w:[1],".":[2],"[":[4],o:[7]},Go[2]={w:[2],i:[3,0],0:[3,0]},Go[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Go[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Go[5]={"'":[4,0],o:8,l:[5,0]},Go[6]={'"':[4,0],o:8,l:[6,0]};const tDe=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function rDe(t){return tDe.test(t)}function nDe(t){const e=t.charCodeAt(0),r=t.charCodeAt(t.length-1);return e===r&&(e===34||e===39)?t.slice(1,-1):t}function iDe(t){if(t==null)return"o";switch(t.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return t;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function oDe(t){const e=t.trim();return t.charAt(0)==="0"&&isNaN(parseInt(t))?!1:rDe(e)?nDe(e):"*"+e}function aDe(t){const e=[];let r=-1,n=0,i=0,o,a,s,u,f,d,p;const v=[];v[0]=()=>{a===void 0?a=s:a+=s},v[1]=()=>{a!==void 0&&(e.push(a),a=void 0)},v[2]=()=>{v[0](),i++},v[3]=()=>{if(i>0)i--,n=4,v[0]();else{if(i=0,a===void 0||(a=oDe(a),a===!1))return!1;v[1]()}};function m(){const g=t[r+1];if(n===5&&g==="'"||n===6&&g==='"')return r++,s="\\"+g,v[0](),!0}for(;n!==null;)if(r++,o=t[r],!(o==="\\"&&m())){if(u=iDe(o),p=Go[n],f=p[u]||p.l||8,f===8||(n=f[0],f[1]!==void 0&&(d=v[f[1]],d&&(s=o,d()===!1))))return;if(n===7)return e}}const QS=new Map;function sDe(t,e){return ct(t)?t[e]:null}function lDe(t,e){if(!ct(t))return null;let r=QS.get(e);if(r||(r=aDe(e),r&&QS.set(e,r)),!r)return null;const n=r.length;let i=t,o=0;for(;o<n;){const a=r[o];if(KS.includes(a)&&si(i))return null;const s=i[a];if(s===void 0||St(i))return null;i=s,o++}return i}const sn={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7},uDe=8,cDe={[sn.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[sn.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[sn.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[sn.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[sn.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[sn.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[sn.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]:"This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."};function qa(t,...e){return ud(cDe[t],...e)}const fDe="11.2.2",md=-1,gd="en-US",yd="",e_=t=>`${t.charAt(0).toLocaleUpperCase()}${t.substr(1)}`;function dDe(){return{upper:(t,e)=>e==="text"&&xe(t)?t.toUpperCase():e==="vnode"&&ct(t)&&"__v_isVNode"in t?t.children.toUpperCase():t,lower:(t,e)=>e==="text"&&xe(t)?t.toLowerCase():e==="vnode"&&ct(t)&&"__v_isVNode"in t?t.children.toLowerCase():t,capitalize:(t,e)=>e==="text"&&xe(t)?e_(t):e==="vnode"&&ct(t)&&"__v_isVNode"in t?e_(t.children):t}}let t_;function pDe(t){t_=t}let r_;function hDe(t){r_=t}let n_;function vDe(t){n_=t}let i_=null;const mDe=t=>{i_=t},gDe=()=>i_;let o_=null;const a_=t=>{o_=t},yDe=()=>o_;let s_=0;function bDe(t={}){const e=St(t.onWarn)?t.onWarn:Ai,r=xe(t.version)?t.version:fDe,n=xe(t.locale)||St(t.locale)?t.locale:gd,i=St(n)?gd:n,o=Bt(t.fallbackLocale)||ft(t.fallbackLocale)||xe(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:i,a=ft(t.messages)?t.messages:rg(i),s=ft(t.datetimeFormats)?t.datetimeFormats:rg(i),u=ft(t.numberFormats)?t.numberFormats:rg(i),f=ar(bt(),t.modifiers,dDe()),d=t.pluralRules||bt(),p=St(t.missing)?t.missing:null,v=$t(t.missingWarn)||cd(t.missingWarn)?t.missingWarn:!0,m=$t(t.fallbackWarn)||cd(t.fallbackWarn)?t.fallbackWarn:!0,g=!!t.fallbackFormat,E=!!t.unresolving,w=St(t.postTranslation)?t.postTranslation:null,x=ft(t.processor)?t.processor:null,k=$t(t.warnHtmlMessage)?t.warnHtmlMessage:!0,_=!!t.escapeParameter,O=St(t.messageCompiler)?t.messageCompiler:t_;process.env.NODE_ENV!=="production"&&St(t.messageCompiler)&&j2e(qa(sn.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const N=St(t.messageResolver)?t.messageResolver:r_||sDe,L=St(t.localeFallbacker)?t.localeFallbacker:n_||ZLe,A=ct(t.fallbackContext)?t.fallbackContext:void 0,P=t,U=ct(P.__datetimeFormatters)?P.__datetimeFormatters:new Map,J=ct(P.__numberFormatters)?P.__numberFormatters:new Map,re=ct(P.__meta)?P.__meta:{};s_++;const Se={version:r,cid:s_,locale:n,fallbackLocale:o,messages:a,modifiers:f,pluralRules:d,missing:p,missingWarn:v,fallbackWarn:m,fallbackFormat:g,unresolving:E,postTranslation:w,processor:x,warnHtmlMessage:k,escapeParameter:_,messageCompiler:O,messageResolver:N,localeFallbacker:L,fallbackContext:A,onWarn:e,__meta:re};return Se.datetimeFormats=s,Se.numberFormats=u,Se.__datetimeFormatters=U,Se.__numberFormatters=J,process.env.NODE_ENV!=="production"&&(Se.__v_emitter=P.__v_emitter!=null?P.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&GLe(Se,r,re),Se}const rg=t=>({[t]:bt()});function bd(t,e){return t instanceof RegExp?t.test(e):t}function l_(t,e){return t instanceof RegExp?t.test(e):t}function ng(t,e,r,n,i){const{missing:o,onWarn:a}=t;if(process.env.NODE_ENV!=="production"){const s=t.__v_emitter;s&&s.emit("missing",{locale:r,key:e,type:i,groupId:`${i}:${e}`})}if(o!==null){const s=o(t,r,e,i);return xe(s)?s:e}else return process.env.NODE_ENV!=="production"&&l_(n,e)&&a(qa(sn.NOT_FOUND_KEY,{key:e,locale:r})),e}function Ou(t,e,r){const n=t;n.__localeChainCache=new Map,t.localeFallbacker(t,r,e)}function u_(t,e){return t===e?!1:t.split("-")[0]===e.split("-")[0]}function wDe(t,e){const r=e.indexOf(t);if(r===-1)return!1;for(let n=r+1;n<e.length;n++)if(u_(t,e[n]))return!0;return!1}const c_=typeof Intl<"u",f_={dateTimeFormat:c_&&typeof Intl.DateTimeFormat<"u",numberFormat:c_&&typeof Intl.NumberFormat<"u"};function d_(t,...e){const{datetimeFormats:r,unresolving:n,fallbackLocale:i,onWarn:o,localeFallbacker:a}=t,{__datetimeFormatters:s}=t;if(process.env.NODE_ENV!=="production"&&!f_.dateTimeFormat)return o(qa(sn.CANNOT_FORMAT_DATE)),yd;const[u,f,d,p]=ig(...e),v=$t(d.missingWarn)?d.missingWarn:t.missingWarn,m=$t(d.fallbackWarn)?d.fallbackWarn:t.fallbackWarn,g=!!d.part,E=eg(t,d),w=a(t,i,E);if(!xe(u)||u==="")return new Intl.DateTimeFormat(E,p).format(f);let x={},k,_=null,O=E,N=null;const L="datetime format";for(let U=0;U<w.length;U++){if(k=N=w[U],process.env.NODE_ENV!=="production"&&E!==k&&bd(m,u)&&o(qa(sn.FALLBACK_TO_DATE_FORMAT,{key:u,target:k})),process.env.NODE_ENV!=="production"&&E!==k){const J=t.__v_emitter;J&&J.emit("fallback",{type:L,key:u,from:O,to:N,groupId:`${L}:${u}`})}if(x=r[k]||{},_=x[u],ft(_))break;ng(t,u,k,v,L),O=N}if(!ft(_)||!xe(k))return n?md:u;let A=`${k}__${u}`;fd(p)||(A=`${A}__${JSON.stringify(p)}`);let P=s.get(A);return P||(P=new Intl.DateTimeFormat(k,ar({},_,p)),s.set(A,P)),g?P.formatToParts(f):P.format(f)}const p_=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function ig(...t){const[e,r,n,i]=t,o=bt();let a=bt(),s;if(xe(e)){const u=e.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!u)throw no(Ir.INVALID_ISO_DATE_ARGUMENT);const f=u[3]?u[3].trim().startsWith("T")?`${u[1].trim()}${u[3].trim()}`:`${u[1].trim()}T${u[3].trim()}`:u[1].trim();s=new Date(f);try{s.toISOString()}catch{throw no(Ir.INVALID_ISO_DATE_ARGUMENT)}}else if(X2e(e)){if(isNaN(e.getTime()))throw no(Ir.INVALID_DATE_ARGUMENT);s=e}else if(or(e))s=e;else throw no(Ir.INVALID_ARGUMENT);return xe(r)?o.key=r:ft(r)&&Object.keys(r).forEach(u=>{p_.includes(u)?a[u]=r[u]:o[u]=r[u]}),xe(n)?o.locale=n:ft(n)&&(a=n),ft(i)&&(a=i),[o.key||"",s,o,a]}function h_(t,e,r){const n=t;for(const i in r){const o=`${e}__${i}`;n.__datetimeFormatters.has(o)&&n.__datetimeFormatters.delete(o)}}function v_(t,...e){const{numberFormats:r,unresolving:n,fallbackLocale:i,onWarn:o,localeFallbacker:a}=t,{__numberFormatters:s}=t;if(process.env.NODE_ENV!=="production"&&!f_.numberFormat)return o(qa(sn.CANNOT_FORMAT_NUMBER)),yd;const[u,f,d,p]=og(...e),v=$t(d.missingWarn)?d.missingWarn:t.missingWarn,m=$t(d.fallbackWarn)?d.fallbackWarn:t.fallbackWarn,g=!!d.part,E=eg(t,d),w=a(t,i,E);if(!xe(u)||u==="")return new Intl.NumberFormat(E,p).format(f);let x={},k,_=null,O=E,N=null;const L="number format";for(let U=0;U<w.length;U++){if(k=N=w[U],process.env.NODE_ENV!=="production"&&E!==k&&bd(m,u)&&o(qa(sn.FALLBACK_TO_NUMBER_FORMAT,{key:u,target:k})),process.env.NODE_ENV!=="production"&&E!==k){const J=t.__v_emitter;J&&J.emit("fallback",{type:L,key:u,from:O,to:N,groupId:`${L}:${u}`})}if(x=r[k]||{},_=x[u],ft(_))break;ng(t,u,k,v,L),O=N}if(!ft(_)||!xe(k))return n?md:u;let A=`${k}__${u}`;fd(p)||(A=`${A}__${JSON.stringify(p)}`);let P=s.get(A);return P||(P=new Intl.NumberFormat(k,ar({},_,p)),s.set(A,P)),g?P.formatToParts(f):P.format(f)}const m_=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function og(...t){const[e,r,n,i]=t,o=bt();let a=bt();if(!or(e))throw no(Ir.INVALID_ARGUMENT);const s=e;return xe(r)?o.key=r:ft(r)&&Object.keys(r).forEach(u=>{m_.includes(u)?a[u]=r[u]:o[u]=r[u]}),xe(n)?o.locale=n:ft(n)&&(a=n),ft(i)&&(a=i),[o.key||"",s,o,a]}function g_(t,e,r){const n=t;for(const i in r){const o=`${e}__${i}`;n.__numberFormatters.has(o)&&n.__numberFormatters.delete(o)}}const EDe=t=>t,xDe=t=>"",CDe="text",kDe=t=>t.length===0?"":Km(t),TDe=tLe;function y_(t,e){return t=Math.abs(t),e===2?t?t>1?1:0:1:t?Math.min(t,2):0}function SDe(t){const e=or(t.pluralIndex)?t.pluralIndex:-1;return t.named&&(or(t.named.count)||or(t.named.n))?or(t.named.count)?t.named.count:or(t.named.n)?t.named.n:e:e}function _De(t,e){e.count||(e.count=t),e.n||(e.n=t)}function ODe(t={}){const e=t.locale,r=SDe(t),n=ct(t.pluralRules)&&xe(e)&&St(t.pluralRules[e])?t.pluralRules[e]:y_,i=ct(t.pluralRules)&&xe(e)&&St(t.pluralRules[e])?y_:void 0,o=x=>x[n(r,x.length,i)],a=t.list||[],s=x=>a[x],u=t.named||bt();or(t.pluralIndex)&&_De(r,u);const f=x=>u[x];function d(x,k){const _=St(t.messages)?t.messages(x,!!k):ct(t.messages)?t.messages[x]:!1;return _||(t.parent?t.parent.message(x):xDe)}const p=x=>t.modifiers?t.modifiers[x]:EDe,v=ft(t.processor)&&St(t.processor.normalize)?t.processor.normalize:kDe,m=ft(t.processor)&&St(t.processor.interpolate)?t.processor.interpolate:TDe,g=ft(t.processor)&&xe(t.processor.type)?t.processor.type:CDe,w={list:s,named:f,plural:o,linked:(x,...k)=>{const[_,O]=k;let N="text",L="";k.length===1?ct(_)?(L=_.modifier||L,N=_.type||N):xe(_)&&(L=_||L):k.length===2&&(xe(_)&&(L=_||L),xe(O)&&(N=O||N));const A=d(x,!0)(w),P=N==="vnode"&&Bt(A)&&L?A[0]:A;return L?p(L)(P,N):P},message:d,type:g,interpolate:m,normalize:v,values:ar(bt(),a,u)};return w}const b_=()=>"",Un=t=>St(t);function w_(t,...e){const{fallbackFormat:r,postTranslation:n,unresolving:i,messageCompiler:o,fallbackLocale:a,messages:s}=t,[u,f]=ag(...e),d=$t(f.missingWarn)?f.missingWarn:t.missingWarn,p=$t(f.fallbackWarn)?f.fallbackWarn:t.fallbackWarn,v=$t(f.escapeParameter)?f.escapeParameter:t.escapeParameter,m=!!f.resolvedMessage,g=xe(f.default)||$t(f.default)?$t(f.default)?o?u:()=>u:f.default:r?o?u:()=>u:null,E=r||g!=null&&(xe(g)||St(g)),w=eg(t,f);v&&ADe(f);let[x,k,_]=m?[u,w,s[w]||bt()]:E_(t,u,w,a,p,d),O=x,N=u;if(!m&&!(xe(O)||si(O)||Un(O))&&E&&(O=g,N=O),!m&&(!(xe(O)||si(O)||Un(O))||!xe(k)))return i?md:u;if(process.env.NODE_ENV!=="production"&&xe(O)&&t.messageCompiler==null)return Ai(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${u}'.`),u;let L=!1;const A=()=>{L=!0},P=Un(O)?O:x_(t,u,k,O,N,A);if(L)return O;const U=DDe(t,k,_,f),J=ODe(U),re=MDe(t,P,J);let Se=n?n(re,u):re;if(v&&xe(Se)&&(Se=Z2e(Se)),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const Fe={timestamp:Date.now(),key:xe(u)?u:Un(O)?O.key:"",locale:k||(Un(O)?O.locale:""),format:xe(O)?O:Un(O)?O.source:"",message:Se};Fe.meta=ar({},t.__meta,gDe()||{}),KLe(Fe)}return Se}function ADe(t){Bt(t.list)?t.list=t.list.map(e=>xe(e)?DS(e):e):ct(t.named)&&Object.keys(t.named).forEach(e=>{xe(t.named[e])&&(t.named[e]=DS(t.named[e]))})}function E_(t,e,r,n,i,o){const{messages:a,onWarn:s,messageResolver:u,localeFallbacker:f}=t,d=f(t,n,r);let p=bt(),v,m=null,g=r,E=null;const w="translate";for(let x=0;x<d.length;x++){if(v=E=d[x],process.env.NODE_ENV!=="production"&&r!==v&&!u_(r,v)&&bd(i,e)&&s(qa(sn.FALLBACK_TO_TRANSLATE,{key:e,target:v})),process.env.NODE_ENV!=="production"&&r!==v){const N=t.__v_emitter;N&&N.emit("fallback",{type:w,key:e,from:g,to:E,groupId:`${w}:${e}`})}p=a[v]||bt();let k=null,_,O;if(process.env.NODE_ENV!=="production"&&eo&&(k=window.performance.now(),_="intlify-message-resolve-start",O="intlify-message-resolve-end",En&&En(_)),(m=u(p,e))===null&&(m=p[e]),process.env.NODE_ENV!=="production"&&eo){const N=window.performance.now(),L=t.__v_emitter;L&&k&&m&&L.emit("message-resolve",{type:"message-resolve",key:e,message:m,time:N-k,groupId:`${w}:${e}`}),_&&O&&En&&Ua&&(En(O),Ua("intlify message resolve",_,O))}if(xe(m)||si(m)||Un(m))break;if(!wDe(v,d)){const N=ng(t,e,v,o,w);N!==e&&(m=N)}g=E}return[m,v,p]}function x_(t,e,r,n,i,o){const{messageCompiler:a,warnHtmlMessage:s}=t;if(Un(n)){const v=n;return v.locale=v.locale||r,v.key=v.key||e,v}if(a==null){const v=()=>n;return v.locale=r,v.key=e,v}let u=null,f,d;process.env.NODE_ENV!=="production"&&eo&&(u=window.performance.now(),f="intlify-message-compilation-start",d="intlify-message-compilation-end",En&&En(f));const p=a(n,NDe(t,r,i,n,s,o));if(process.env.NODE_ENV!=="production"&&eo){const v=window.performance.now(),m=t.__v_emitter;m&&u&&m.emit("message-compilation",{type:"message-compilation",message:n,time:v-u,groupId:`translate:${e}`}),f&&d&&En&&Ua&&(En(d),Ua("intlify message compilation",f,d))}return p.locale=r,p.key=e,p.source=n,p}function MDe(t,e,r){let n=null,i,o;process.env.NODE_ENV!=="production"&&eo&&(n=window.performance.now(),i="intlify-message-evaluation-start",o="intlify-message-evaluation-end",En&&En(i));const a=e(r);if(process.env.NODE_ENV!=="production"&&eo){const s=window.performance.now(),u=t.__v_emitter;u&&n&&u.emit("message-evaluation",{type:"message-evaluation",value:a,time:s-n,groupId:`translate:${e.key}`}),i&&o&&En&&Ua&&(En(o),Ua("intlify message evaluation",i,o))}return a}function ag(...t){const[e,r,n]=t,i=bt();if(!xe(e)&&!or(e)&&!Un(e)&&!si(e))throw no(Ir.INVALID_ARGUMENT);const o=or(e)?String(e):(Un(e),e);return or(r)?i.plural=r:xe(r)?i.default=r:ft(r)&&!fd(r)?i.named=r:Bt(r)&&(i.list=r),or(n)?i.plural=n:xe(n)?i.default=n:ft(n)&&ar(i,n),[o,i]}function NDe(t,e,r,n,i,o){return{locale:e,key:r,warnHtmlMessage:i,onError:a=>{if(o&&o(a),process.env.NODE_ENV!=="production"){const s=LDe(n),u=`Message compilation error: ${a.message}`,f=a.location&&s&&rLe(s,a.location.start.offset,a.location.end.offset),d=t.__v_emitter;d&&s&&d.emit("compile-error",{message:s,error:a.message,start:a.location&&a.location.start.offset,end:a.location&&a.location.end.offset,groupId:`translate:${r}`}),console.error(f?`${u}
|
|
786
|
+
${f}`:u)}else throw a},onCacheKey:a=>K2e(e,r,a)}}function LDe(t){if(xe(t))return t;if(t.loc&&t.loc.source)return t.loc.source}function DDe(t,e,r,n){const{modifiers:i,pluralRules:o,messageResolver:a,fallbackLocale:s,fallbackWarn:u,missingWarn:f,fallbackContext:d}=t,v={locale:e,modifiers:i,pluralRules:o,messages:(m,g)=>{let E=a(r,m);if(E==null&&(d||g)){const[,,w]=E_(d||t,m,e,s,u,f);E=a(w,m)}if(xe(E)||si(E)){let w=!1;const k=x_(t,m,e,E,m,()=>{w=!0});return w?b_:k}else return Un(E)?E:b_}};return t.processor&&(v.processor=t.processor),n.list&&(v.list=n.list),n.named&&(v.named=n.named),or(n.plural)&&(v.pluralIndex=n.plural),v}DLe();/*!
|
|
787
|
+
* vue-i18n v11.2.2
|
|
788
|
+
* (c) 2025 kazuya kawaguchi
|
|
789
|
+
* Released under the MIT License.
|
|
790
|
+
*/const IDe="11.2.2";function RDe(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(za().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(za().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(za().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(za().__INTLIFY_PROD_DEVTOOLS__=!1)}const br={UNEXPECTED_RETURN_TYPE:XLe,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function Au(t,...e){return Xs(t,null,process.env.NODE_ENV!=="production"?{messages:PDe,args:e}:void 0)}const PDe={[br.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[br.INVALID_ARGUMENT]:"Invalid argument",[br.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[br.NOT_INSTALLED]:"Need to install with `app.use` function",[br.UNEXPECTED_ERROR]:"Unexpected error",[br.REQUIRED_VALUE]:"Required in value: {0}",[br.INVALID_VALUE]:"Invalid value",[br.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[br.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[br.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[br.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},sg=to("__translateVNode"),lg=to("__datetimeParts"),ug=to("__numberParts"),cg=to("__enableEmitter"),fg=to("__disableEmitter"),BDe=to("__setPluralRules"),C_=to("__injectWithOption"),dg=to("__dispose"),Li={FALLBACK_TO_ROOT:uDe,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_LEGACY_MODE:11,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:12,DUPLICATE_USE_I18N_CALLING:13},$De={[Li.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[Li.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[Li.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[Li.DEPRECATE_LEGACY_MODE]:`Legacy API mode has been deprecated in v11. Use Composition API mode instead.
|
|
791
|
+
About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[Li.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:"'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.",[Li.DUPLICATE_USE_I18N_CALLING]:"Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component."};function wd(t,...e){return ud($De[t],...e)}function Mu(t){if(!ct(t)||si(t))return t;for(const e in t)if(ai(t,e))if(!e.includes("."))ct(t[e])&&Mu(t[e]);else{const r=e.split("."),n=r.length-1;let i=t,o=!1;for(let a=0;a<n;a++){if(r[a]==="__proto__")throw new Error(`unsafe key: ${r[a]}`);if(r[a]in i||(i[r[a]]=bt()),!ct(i[r[a]])){process.env.NODE_ENV!=="production"&&Ai(wd(Li.IGNORE_OBJ_FLATTEN,{key:r[a]})),o=!0;break}i=i[r[a]]}if(o||(si(i)?KS.includes(r[n])||delete t[e]:(i[r[n]]=t[e],delete t[e])),!si(i)){const a=i[r[n]];ct(a)&&Mu(a)}}return t}function k_(t,e){const{messages:r,__i18n:n,messageResolver:i,flatJson:o}=e,a=ft(r)?r:Bt(n)?bt():{[t]:bt()};if(Bt(n)&&n.forEach(s=>{if("locale"in s&&"resource"in s){const{locale:u,resource:f}=s;u?(a[u]=a[u]||bt(),pd(f,a[u])):pd(f,a)}else xe(s)&&pd(JSON.parse(s),a)}),i==null&&o)for(const s in a)ai(a,s)&&Mu(a[s]);return a}function T_(t){return t.type}function FDe(t,e,r){let n=ct(e.messages)?e.messages:bt();"__i18nGlobal"in r&&(n=k_(t.locale.value,{messages:n,__i18n:r.__i18nGlobal}));const i=Object.keys(n);i.length&&i.forEach(o=>{t.mergeLocaleMessage(o,n[o])});{if(ct(e.datetimeFormats)){const o=Object.keys(e.datetimeFormats);o.length&&o.forEach(a=>{t.mergeDateTimeFormat(a,e.datetimeFormats[a])})}if(ct(e.numberFormats)){const o=Object.keys(e.numberFormats);o.length&&o.forEach(a=>{t.mergeNumberFormat(a,e.numberFormats[a])})}}}function S_(t){return y.createVNode(y.Text,null,t,0)}function pg(){return"currentInstance"in Ep?Ep["currentInstance"]:Ep.getCurrentInstance()}const __="__INTLIFY_META__",O_=()=>[],HDe=()=>!1;let A_=0;function M_(t){return(e,r,n,i)=>t(r,n,pg()||void 0,i)}const UDe=()=>{const t=pg();let e=null;return t&&(e=T_(t)[__])?{[__]:e}:null};function zDe(t={}){const{__root:e,__injectWithOption:r}=t,n=e===void 0,i=t.flatJson,o=eo?y.ref:y.shallowRef;let a=$t(t.inheritLocale)?t.inheritLocale:!0;const s=o(e&&a?e.locale.value:xe(t.locale)?t.locale:gd),u=o(e&&a?e.fallbackLocale.value:xe(t.fallbackLocale)||Bt(t.fallbackLocale)||ft(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:s.value),f=o(k_(s.value,t)),d=o(ft(t.datetimeFormats)?t.datetimeFormats:{[s.value]:{}}),p=o(ft(t.numberFormats)?t.numberFormats:{[s.value]:{}});let v=e?e.missingWarn:$t(t.missingWarn)||cd(t.missingWarn)?t.missingWarn:!0,m=e?e.fallbackWarn:$t(t.fallbackWarn)||cd(t.fallbackWarn)?t.fallbackWarn:!0,g=e?e.fallbackRoot:$t(t.fallbackRoot)?t.fallbackRoot:!0,E=!!t.fallbackFormat,w=St(t.missing)?t.missing:null,x=St(t.missing)?M_(t.missing):null,k=St(t.postTranslation)?t.postTranslation:null,_=e?e.warnHtmlMessage:$t(t.warnHtmlMessage)?t.warnHtmlMessage:!0,O=!!t.escapeParameter;const N=e?e.modifiers:ft(t.modifiers)?t.modifiers:{};let L=t.pluralRules||e&&e.pluralRules,A;A=(()=>{n&&a_(null);const V={version:IDe,locale:s.value,fallbackLocale:u.value,messages:f.value,modifiers:N,pluralRules:L,missing:x===null?void 0:x,missingWarn:v,fallbackWarn:m,fallbackFormat:E,unresolving:!0,postTranslation:k===null?void 0:k,warnHtmlMessage:_,escapeParameter:O,messageResolver:t.messageResolver,messageCompiler:t.messageCompiler,__meta:{framework:"vue"}};V.datetimeFormats=d.value,V.numberFormats=p.value,V.__datetimeFormatters=ft(A)?A.__datetimeFormatters:void 0,V.__numberFormatters=ft(A)?A.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(V.__v_emitter=ft(A)?A.__v_emitter:void 0);const se=bDe(V);return n&&a_(se),se})(),Ou(A,s.value,u.value);function U(){return[s.value,u.value,f.value,d.value,p.value]}const J=y.computed({get:()=>s.value,set:V=>{A.locale=V,s.value=V}}),re=y.computed({get:()=>u.value,set:V=>{A.fallbackLocale=V,u.value=V,Ou(A,s.value,V)}}),Se=y.computed(()=>f.value),Fe=y.computed(()=>d.value),ce=y.computed(()=>p.value);function le(){return St(k)?k:null}function Z(V){k=V,A.postTranslation=V}function j(){return w}function ue(V){V!==null&&(x=M_(V)),w=V,A.missing=x}function ye(V,se){return V!=="translate"||!se.resolvedMessage}const ve=(V,se,Ue,at,Wr,zn)=>{U();let Yt;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,n||(A.fallbackContext=e?yDe():void 0),Yt=V(A)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,n||(A.fallbackContext=void 0)}if(Ue!=="translate exists"&&or(Yt)&&Yt===md||Ue==="translate exists"&&!Yt){const[Rr,oo]=se();if(process.env.NODE_ENV!=="production"&&e&&xe(Rr)&&ye(Ue,oo)&&(g&&(bd(m,Rr)||l_(v,Rr))&&Ai(wd(Li.FALLBACK_TO_ROOT,{key:Rr,type:Ue})),process.env.NODE_ENV!=="production")){const{__v_emitter:Cn}=A;Cn&&g&&Cn.emit("fallback",{type:Ue,key:Rr,to:"global",groupId:`${Ue}:${Rr}`})}return e&&g?at(e):Wr(Rr)}else{if(zn(Yt))return Yt;throw Au(br.UNEXPECTED_RETURN_TYPE)}};function ke(...V){return ve(se=>Reflect.apply(w_,null,[se,...V]),()=>ag(...V),"translate",se=>Reflect.apply(se.t,se,[...V]),se=>se,se=>xe(se))}function Te(...V){const[se,Ue,at]=V;if(at&&!ct(at))throw Au(br.INVALID_ARGUMENT);return ke(se,Ue,ar({resolvedMessage:!0},at||{}))}function We(...V){return ve(se=>Reflect.apply(d_,null,[se,...V]),()=>ig(...V),"datetime format",se=>Reflect.apply(se.d,se,[...V]),()=>yd,se=>xe(se)||Bt(se))}function we(...V){return ve(se=>Reflect.apply(v_,null,[se,...V]),()=>og(...V),"number format",se=>Reflect.apply(se.n,se,[...V]),()=>yd,se=>xe(se)||Bt(se))}function De(V){return V.map(se=>xe(se)||or(se)||$t(se)?S_(String(se)):se)}const F={normalize:De,interpolate:V=>V,type:"vnode"};function G(...V){return ve(se=>{let Ue;const at=se;try{at.processor=F,Ue=Reflect.apply(w_,null,[at,...V])}finally{at.processor=null}return Ue},()=>ag(...V),"translate",se=>se[sg](...V),se=>[S_(se)],se=>Bt(se))}function K(...V){return ve(se=>Reflect.apply(v_,null,[se,...V]),()=>og(...V),"number format",se=>se[ug](...V),O_,se=>xe(se)||Bt(se))}function te(...V){return ve(se=>Reflect.apply(d_,null,[se,...V]),()=>ig(...V),"datetime format",se=>se[lg](...V),O_,se=>xe(se)||Bt(se))}function ne(V){L=V,A.pluralRules=L}function he(V,se){return ve(()=>{if(!V)return!1;const Ue=xe(se)?se:s.value,at=ot(Ue),Wr=A.messageResolver(at,V);return si(Wr)||Un(Wr)||xe(Wr)},()=>[V],"translate exists",Ue=>Reflect.apply(Ue.te,Ue,[V,se]),HDe,Ue=>$t(Ue))}function Ne(V){let se=null;const Ue=JS(A,u.value,s.value);for(let at=0;at<Ue.length;at++){const Wr=f.value[Ue[at]]||{},zn=A.messageResolver(Wr,V);if(zn!=null){se=zn;break}}return se}function Xe(V){const se=Ne(V);return se??(e?e.tm(V)||{}:{})}function ot(V){return f.value[V]||{}}function sr(V,se){if(i){const Ue={[V]:se};for(const at in Ue)ai(Ue,at)&&Mu(Ue[at]);se=Ue[V]}f.value[V]=se,A.messages=f.value}function Ft(V,se){f.value[V]=f.value[V]||{};const Ue={[V]:se};if(i)for(const at in Ue)ai(Ue,at)&&Mu(Ue[at]);se=Ue[V],pd(se,f.value[V]),A.messages=f.value}function D(V){return d.value[V]||{}}function R(V,se){d.value[V]=se,A.datetimeFormats=d.value,h_(A,V,se)}function X(V,se){d.value[V]=ar(d.value[V]||{},se),A.datetimeFormats=d.value,h_(A,V,se)}function fe(V){return p.value[V]||{}}function Ke(V,se){p.value[V]=se,A.numberFormats=p.value,g_(A,V,se)}function et(V,se){p.value[V]=ar(p.value[V]||{},se),A.numberFormats=p.value,g_(A,V,se)}A_++,e&&eo&&(y.watch(e.locale,V=>{a&&(s.value=V,A.locale=V,Ou(A,s.value,u.value))}),y.watch(e.fallbackLocale,V=>{a&&(u.value=V,A.fallbackLocale=V,Ou(A,s.value,u.value))}));const je={id:A_,locale:J,fallbackLocale:re,get inheritLocale(){return a},set inheritLocale(V){a=V,V&&e&&(s.value=e.locale.value,u.value=e.fallbackLocale.value,Ou(A,s.value,u.value))},get availableLocales(){return Object.keys(f.value).sort()},messages:Se,get modifiers(){return N},get pluralRules(){return L||{}},get isGlobal(){return n},get missingWarn(){return v},set missingWarn(V){v=V,A.missingWarn=v},get fallbackWarn(){return m},set fallbackWarn(V){m=V,A.fallbackWarn=m},get fallbackRoot(){return g},set fallbackRoot(V){g=V},get fallbackFormat(){return E},set fallbackFormat(V){E=V,A.fallbackFormat=E},get warnHtmlMessage(){return _},set warnHtmlMessage(V){_=V,A.warnHtmlMessage=V},get escapeParameter(){return O},set escapeParameter(V){O=V,A.escapeParameter=V},t:ke,getLocaleMessage:ot,setLocaleMessage:sr,mergeLocaleMessage:Ft,getPostTranslationHandler:le,setPostTranslationHandler:Z,getMissingHandler:j,setMissingHandler:ue,[BDe]:ne};return je.datetimeFormats=Fe,je.numberFormats=ce,je.rt=Te,je.te=he,je.tm=Xe,je.d=We,je.n=we,je.getDateTimeFormat=D,je.setDateTimeFormat=R,je.mergeDateTimeFormat=X,je.getNumberFormat=fe,je.setNumberFormat=Ke,je.mergeNumberFormat=et,je[C_]=r,je[sg]=G,je[lg]=te,je[ug]=K,process.env.NODE_ENV!=="production"&&(je[cg]=V=>{A.__v_emitter=V},je[fg]=()=>{A.__v_emitter=void 0}),je}function N_(t,e){}const hg={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:t=>t==="parent"||t==="global",default:"parent"},i18n:{type:Object}};function qDe({slots:t},e){return e.length===1&&e[0]==="default"?(t.default?t.default():[]).reduce((n,i)=>[...n,...i.type===y.Fragment?i.children:[i]],[]):e.reduce((r,n)=>{const i=t[n];return i&&(r[n]=i()),r},bt())}function L_(){return y.Fragment}ar({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:t=>or(t)||!isNaN(t)}},hg);function VDe(t){return Bt(t)&&!xe(t[0])}function D_(t,e,r,n){const{slots:i,attrs:o}=e;return()=>{const a={part:!0};let s=bt();t.locale&&(a.locale=t.locale),xe(t.format)?a.key=t.format:ct(t.format)&&(xe(t.format.key)&&(a.key=t.format.key),s=Object.keys(t.format).reduce((v,m)=>r.includes(m)?ar(bt(),v,{[m]:t.format[m]}):v,bt()));const u=n(t.value,a,s);let f=[a.key];Bt(u)?f=u.map((v,m)=>{const g=i[v.type],E=g?g({[v.type]:v.value,index:m,parts:u}):[v.value];return VDe(E)&&(E[0].key=`${v.type}-${m}`),E}):xe(u)&&(f=[u]);const d=ar(bt(),o),p=xe(t.tag)||ct(t.tag)?t.tag:L_();return y.h(p,d,f)}}ar({value:{type:Number,required:!0},format:{type:[String,Object]}},hg);const WDe=to("global-vue-i18n");function Nu(t={}){const e=pg();if(e==null)throw Au(br.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw Au(br.NOT_INSTALLED);const r=jDe(e),n=KDe(r),i=T_(e),o=GDe(t,i);if(o==="global")return FDe(n,t,i),n;if(o==="parent"){let u=YDe(r,e,t.__useComponent);return u==null&&(process.env.NODE_ENV!=="production"&&Ai(wd(Li.NOT_FOUND_PARENT_SCOPE)),u=n),u}const a=r;let s=a.__getInstance(e);if(s==null){const u=ar({},t);"__i18n"in i&&(u.__i18n=i.__i18n),n&&(u.__root=n),s=zDe(u),a.__composerExtend&&(s[dg]=a.__composerExtend(s)),JDe(a,e,s),a.__setInstance(e,s)}else process.env.NODE_ENV!=="production"&&o==="local"&&Ai(wd(Li.DUPLICATE_USE_I18N_CALLING));return s}function jDe(t){const e=y.inject(t.isCE?WDe:t.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw Au(t.isCE?br.NOT_INSTALLED_WITH_PROVIDE:br.UNEXPECTED_ERROR);return e}function GDe(t,e){return fd(t)?"__i18n"in e?"local":"global":t.useScope?t.useScope:"local"}function KDe(t){return t.mode==="composition"?t.global:t.global.__composer}function YDe(t,e,r=!1){let n=null;const i=e.root;let o=XDe(e,r);for(;o!=null;){const a=t;if(t.mode==="composition")n=a.__getInstance(o);else if(__VUE_I18N_LEGACY_API__){const s=a.__getInstance(o);s!=null&&(n=s.__composer,r&&n&&!n[C_]&&(n=null))}if(n!=null||i===o)break;o=o.parent}return n}function XDe(t,e=!1){return t==null?null:e&&t.vnode.ctx||t.parent}function JDe(t,e,r){let n=null;y.onMounted(()=>{if(process.env.NODE_ENV!=="production"){e.__VUE_I18N__=r,n=nLe();const i=r;i[cg]&&i[cg](n),n.on("*",N_)}},e),y.onUnmounted(()=>{const i=r;process.env.NODE_ENV!=="production"&&(n&&n.off("*",N_),i[fg]&&i[fg](),delete e.__VUE_I18N__),t.__deleteInstance(e);const o=i[dg];o&&(o(),delete i[dg])},e)}if(ar({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},hg),RDe(),pDe(WLe),hDe(lDe),vDe(JS),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const t=za();t.__INTLIFY__=!0,jLe(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;function vg(t){return t===0?!1:Array.isArray(t)&&t.length===0?!0:!t}function ZDe(t){return(...e)=>!t(...e)}function QDe(t,e){return t===void 0&&(t="undefined"),t===null&&(t="null"),t===!1&&(t="false"),t.toString().toLowerCase().indexOf(e.trim())!==-1}function eIe(t){return t.filter(e=>!e.$isLabel)}function mg(t,e){return r=>r.reduce((n,i)=>i[t]&&i[t].length?(n.push({$groupLabel:i[e],$isLabel:!0}),n.concat(i[t])):n,[])}const I_=(...t)=>e=>t.reduce((r,n)=>n(r),e);var tIe={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(t,e){return vg(t)?"":e?t[e]:t}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1},preventAutofocus:{type:Boolean,default:!1},filteringSortFunc:{type:Function,default:null}},mounted(){!this.multiple&&this.max&&console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."),this.preselectFirst&&!this.internalValue.length&&this.options.length&&this.select(this.filteredOptions[0])},computed:{internalValue(){return this.modelValue||this.modelValue===0?Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]:[]},filteredOptions(){const t=this.search||"",e=t.toLowerCase().trim();let r=this.options.concat();return this.internalSearch?r=this.groupValues?this.filterAndFlat(r,e,this.label):this.filterOptions(r,e,this.label,this.customLabel):r=this.groupValues?mg(this.groupValues,this.groupLabel)(r):r,r=this.hideSelected?r.filter(ZDe(this.isSelected)):r,this.taggable&&e.length&&!this.isExistingOption(e)&&(this.tagPosition==="bottom"?r.push({isTag:!0,label:t}):r.unshift({isTag:!0,label:t})),r.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map(t=>t[this.trackBy]):this.internalValue},optionKeys(){return(this.groupValues?this.flatAndStrip(this.options):this.options).map(e=>this.customLabel(e,this.label).toString().toLowerCase())},currentOptionLabel(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue:{handler(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("update:modelValue",this.multiple?[]:null))},deep:!0},search(){this.$emit("search-change",this.search)}},emits:["open","search-change","close","select","update:modelValue","remove","tag"],methods:{getValue(){return this.multiple?this.internalValue:this.internalValue.length===0?null:this.internalValue[0]},filterAndFlat(t,e,r){return I_(this.filterGroups(e,r,this.groupValues,this.groupLabel,this.customLabel),mg(this.groupValues,this.groupLabel))(t)},flatAndStrip(t){return I_(mg(this.groupValues,this.groupLabel),eIe)(t)},updateSearch(t){this.search=t},isExistingOption(t){return this.options?this.optionKeys.indexOf(t)>-1:!1},isSelected(t){const e=this.trackBy?t[this.trackBy]:t;return this.valueKeys.indexOf(e)>-1},isOptionDisabled(t){return!!t.$isDisabled},getOptionLabel(t){if(vg(t))return"";if(t.isTag)return t.label;if(t.$isLabel)return t.$groupLabel;const e=this.customLabel(t,this.label);return vg(e)?"":e},select(t,e){if(t.$isLabel&&this.groupSelect){this.selectGroup(t);return}if(!(this.blockKeys.indexOf(e)!==-1||this.disabled||t.$isDisabled||t.$isLabel)&&!(this.max&&this.multiple&&this.internalValue.length===this.max)&&!(e==="Tab"&&!this.pointerDirty)){if(t.isTag)this.$emit("tag",t.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(t)){e!=="Tab"&&this.removeElement(t);return}this.multiple?this.$emit("update:modelValue",this.internalValue.concat([t])):this.$emit("update:modelValue",t),this.$emit("select",t,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup(t){const e=this.options.find(r=>r[this.groupLabel]===t.$groupLabel);if(e){if(this.wholeGroupSelected(e)){this.$emit("remove",e[this.groupValues],this.id);const r=this.trackBy?e[this.groupValues].map(i=>i[this.trackBy]):e[this.groupValues],n=this.internalValue.filter(i=>r.indexOf(this.trackBy?i[this.trackBy]:i)===-1);this.$emit("update:modelValue",n)}else{const r=e[this.groupValues].filter(n=>!(this.isOptionDisabled(n)||this.isSelected(n)));this.max&&r.splice(this.max-this.internalValue.length),this.$emit("select",r,this.id),this.$emit("update:modelValue",this.internalValue.concat(r))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(t){return t[this.groupValues].every(e=>this.isSelected(e)||this.isOptionDisabled(e))},wholeGroupDisabled(t){return t[this.groupValues].every(this.isOptionDisabled)},removeElement(t,e=!0){if(this.disabled||t.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1){this.deactivate();return}const r=typeof t=="object"?this.valueKeys.indexOf(t[this.trackBy]):this.valueKeys.indexOf(t);if(this.multiple){const n=this.internalValue.slice(0,r).concat(this.internalValue.slice(r+1));this.$emit("update:modelValue",n)}else this.$emit("update:modelValue",null);this.$emit("remove",t,this.id),this.closeOnSelect&&e&&this.deactivate()},removeLastElement(){this.blockKeys.indexOf("Delete")===-1&&this.search.length===0&&Array.isArray(this.internalValue)&&this.internalValue.length&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate(){this.isOpen||this.disabled||(this.adjustPosition(),this.groupValues&&this.pointer===0&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.preventAutofocus||this.$nextTick(()=>this.$refs.search&&this.$refs.search.focus())):this.preventAutofocus||typeof this.$el<"u"&&this.$el.focus(),this.$emit("open",this.id))},deactivate(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search!==null&&typeof this.$refs.search<"u"&&this.$refs.search.blur():typeof this.$el<"u"&&this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle(){this.isOpen?this.deactivate():this.activate()},adjustPosition(){if(typeof window>"u")return;const t=this.$el.getBoundingClientRect().top,e=window.innerHeight-this.$el.getBoundingClientRect().bottom;e>this.maxHeight||e>t||this.openDirection==="below"||this.openDirection==="bottom"?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(e-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(t-40,this.maxHeight))},filterOptions(t,e,r,n){return e?t.filter(i=>QDe(n(i,r),e)).sort((i,o)=>typeof this.filteringSortFunc=="function"?this.filteringSortFunc(i,o):n(i,r).length-n(o,r).length):t},filterGroups(t,e,r,n,i){return o=>o.map(a=>{if(!a[r])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const s=this.filterOptions(a[r],t,e,i);return s.length?{[n]:a[n],[r]:s}:[]})}}},rIe={data(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition(){return this.pointer*this.optionHeight},visibleElements(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions(){this.pointerAdjust()},isOpen(){this.pointerDirty=!1},pointer(){this.$refs.search&&this.$refs.search.setAttribute("aria-activedescendant",this.id+"-"+this.pointer.toString())}},methods:{optionHighlight(t,e){return{"multiselect__option--highlight":t===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(e)}},groupHighlight(t,e){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":e.$isLabel}];const r=this.options.find(n=>n[this.groupLabel]===e.$groupLabel);return r&&!this.wholeGroupDisabled(r)?["multiselect__option--group",{"multiselect__option--highlight":t===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(r)}]:"multiselect__option--disabled"},addPointerElement({key:t}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],t),this.pointerReset()},pointerForward(){var t;this.pointer<this.filteredOptions.length-1&&(this.pointer++,((t=this.$refs.list)==null?void 0:t.scrollTop)<=this.pointerPosition-(this.visibleElements-1)*this.optionHeight&&(this.$refs.list.scrollTop=this.pointerPosition-(this.visibleElements-1)*this.optionHeight),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()),this.pointerDirty=!0},pointerBackward(){var t;this.pointer>0?(this.pointer--,((t=this.$refs.list)==null?void 0:t.scrollTop)>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet(t){this.pointer=t,this.pointerDirty=!0}}},R_={name:"vue-multiselect",mixins:[tIe,rIe],compatConfig:{MODE:3,ATTR_ENUMERATED_COERCION:!1},props:{name:{type:String,default:""},modelValue:{type:null,default(){return[]}},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:t=>`and ${t} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},spellcheck:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0},required:{type:Boolean,default:!1},useTeleport:{type:Boolean,default:!1},contentWrapperClass:{type:[String,Array,Object],default:""}},data(){return{dropdownStyles:{},ready:!1}},computed:{hasOptionGroup(){return this.groupValues&&this.groupLabel&&this.groupSelect},isSingleLabelVisible(){return(this.singleValue||this.singleValue===0)&&(!this.isOpen||!this.searchable)&&!this.visibleValues.length},isPlaceholderVisible(){return!this.internalValue.length&&(!this.searchable||!this.isOpen)},visibleValues(){return this.multiple?this.internalValue.slice(0,this.limit):[]},singleValue(){return this.internalValue[0]},deselectLabelText(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText(){return this.showLabels?this.selectLabel:""},selectGroupLabelText(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText(){return this.showLabels?this.selectedLabel:""},inputStyle(){return this.searchable||this.multiple&&this.modelValue&&this.modelValue.length?this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}:""},contentStyle(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove(){return this.openDirection==="above"||this.openDirection==="top"?!0:this.openDirection==="below"||this.openDirection==="bottom"?!1:this.preferredOpenDirection==="above"},showSearchInput(){return this.searchable&&(this.hasSingleSelectedSlot&&(this.visibleSingleValue||this.visibleSingleValue===0)?this.isOpen:!0)},isRequired(){return this.required===!1?!1:this.internalValue.length<=0}},watch:{isOpen(t){t&&(this.useTeleport?(this.ready=!1,this.$nextTick(()=>{const e=this.$el.getBoundingClientRect();this.dropdownStyles={position:"absolute",top:`${e.bottom+window.scrollY}px`,left:`${e.left+window.scrollX}px`,width:`${e.width}px`,zIndex:9999},this.ready=!0})):this.ready=!0)}}};const nIe=["tabindex","aria-expanded","aria-owns","aria-activedescendant"],iIe={ref:"tags",class:"multiselect__tags"},oIe={class:"multiselect__tags-wrap"},aIe=["textContent"],sIe=["onKeydown","onMousedown"],lIe=["textContent"],uIe={class:"multiselect__spinner"},cIe=["name","id","spellcheck","placeholder","required","value","disabled","tabindex","aria-label","aria-controls"],fIe=["id","aria-multiselectable"],dIe={key:0},pIe={class:"multiselect__option"},hIe=["aria-selected","id","role"],vIe=["onClick","onMouseenter","data-select","data-selected","data-deselect"],mIe=["data-select","data-deselect","onMouseenter","onMousedown"],gIe={class:"multiselect__option"},yIe={class:"multiselect__option"};function bIe(t,e,r,n,i,o){return y.openBlock(),y.createElementBlock("div",{tabindex:t.searchable?-1:r.tabindex,class:y.normalizeClass([{"multiselect--active":t.isOpen,"multiselect--disabled":r.disabled,"multiselect--above":o.isAbove,"multiselect--has-options-group":o.hasOptionGroup},"multiselect"]),onFocus:e[14]||(e[14]=a=>t.activate()),onBlur:e[15]||(e[15]=a=>t.searchable?!1:t.deactivate()),onKeydown:[e[16]||(e[16]=y.withKeys(y.withModifiers(a=>t.pointerForward(),["self","prevent"]),["down"])),e[17]||(e[17]=y.withKeys(y.withModifiers(a=>t.pointerBackward(),["self","prevent"]),["up"])),e[18]||(e[18]=y.withKeys(y.withModifiers(a=>t.addPointerElement(a),["stop","self"]),["enter","tab"]))],onKeyup:e[19]||(e[19]=y.withKeys(a=>t.deactivate(),["esc"])),role:"combobox","aria-expanded":t.isOpen,"aria-owns":"listbox-"+t.id,"aria-activedescendant":t.isOpen&&t.pointer!==null?t.id+"-"+t.pointer:null},[y.renderSlot(t.$slots,"caret",{toggle:t.toggle},()=>[y.createElementVNode("div",{onMousedown:e[0]||(e[0]=y.withModifiers(a=>t.toggle(),["prevent","stop"])),class:"multiselect__select"},null,32)]),y.renderSlot(t.$slots,"clear",{search:t.search}),y.createElementVNode("div",iIe,[y.renderSlot(t.$slots,"selection",{search:t.search,remove:t.removeElement,values:o.visibleValues,isOpen:t.isOpen},()=>[y.withDirectives(y.createElementVNode("div",oIe,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(o.visibleValues,(a,s)=>y.renderSlot(t.$slots,"tag",{option:a,search:t.search,remove:t.removeElement},()=>[(y.openBlock(),y.createElementBlock("span",{class:"multiselect__tag",key:s,onMousedown:e[1]||(e[1]=y.withModifiers(()=>{},["prevent"]))},[y.createElementVNode("span",{textContent:y.toDisplayString(t.getOptionLabel(a))},null,8,aIe),y.createElementVNode("i",{tabindex:"1",onKeydown:y.withKeys(y.withModifiers(u=>t.removeElement(a),["prevent"]),["enter"]),onMousedown:y.withModifiers(u=>t.removeElement(a),["prevent"]),class:"multiselect__tag-icon"},null,40,sIe)],32))])),256))],512),[[y.vShow,o.visibleValues.length>0]]),t.internalValue&&t.internalValue.length>r.limit?y.renderSlot(t.$slots,"limit",{key:0},()=>[y.createElementVNode("strong",{class:"multiselect__strong",textContent:y.toDisplayString(r.limitText(t.internalValue.length-r.limit))},null,8,lIe)]):y.createCommentVNode("v-if",!0)]),y.createVNode(y.Transition,{name:"multiselect__loading"},{default:y.withCtx(()=>[y.renderSlot(t.$slots,"loading",{},()=>[y.withDirectives(y.createElementVNode("div",uIe,null,512),[[y.vShow,r.loading]])])]),_:3}),t.searchable?(y.openBlock(),y.createElementBlock("input",{key:0,ref:"search",name:r.name,id:t.id,type:"text",autocomplete:"off",spellcheck:r.spellcheck,placeholder:t.placeholder,required:o.isRequired,style:y.normalizeStyle(o.inputStyle),value:t.search,disabled:r.disabled,tabindex:r.tabindex,"aria-label":r.name+"-searchbox",onInput:e[2]||(e[2]=a=>t.updateSearch(a.target.value)),onFocus:e[3]||(e[3]=y.withModifiers(a=>t.activate(),["prevent"])),onBlur:e[4]||(e[4]=y.withModifiers(a=>t.deactivate(),["prevent"])),onKeyup:e[5]||(e[5]=y.withKeys(a=>t.deactivate(),["esc"])),onKeydown:[e[6]||(e[6]=y.withKeys(y.withModifiers(a=>t.pointerForward(),["prevent"]),["down"])),e[7]||(e[7]=y.withKeys(y.withModifiers(a=>t.pointerBackward(),["prevent"]),["up"])),e[8]||(e[8]=y.withKeys(y.withModifiers(a=>t.addPointerElement(a),["prevent","stop","self"]),["enter"])),e[9]||(e[9]=y.withKeys(y.withModifiers(a=>t.removeLastElement(),["stop"]),["delete"]))],class:"multiselect__input","aria-controls":"listbox-"+t.id},null,44,cIe)):y.createCommentVNode("v-if",!0),o.isSingleLabelVisible?(y.openBlock(),y.createElementBlock("span",{key:1,class:"multiselect__single",onMousedown:e[10]||(e[10]=y.withModifiers((...a)=>t.toggle&&t.toggle(...a),["prevent"]))},[y.renderSlot(t.$slots,"singleLabel",{option:o.singleValue},()=>[y.createTextVNode(y.toDisplayString(t.currentOptionLabel),1)])],32)):y.createCommentVNode("v-if",!0),o.isPlaceholderVisible?(y.openBlock(),y.createElementBlock("span",{key:2,class:"multiselect__placeholder",onMousedown:e[11]||(e[11]=y.withModifiers((...a)=>t.toggle&&t.toggle(...a),["prevent"]))},[y.renderSlot(t.$slots,"placeholder",{},()=>[y.createTextVNode(y.toDisplayString(t.placeholder),1)])],32)):y.createCommentVNode("v-if",!0)],512),(y.openBlock(),y.createBlock(y.Teleport,{to:"body",disabled:!r.useTeleport},[y.createVNode(y.Transition,{name:"multiselect"},{default:y.withCtx(()=>[t.isOpen&&i.ready?(y.openBlock(),y.createElementBlock("div",{key:0,class:y.normalizeClass(["multiselect__content-wrapper",r.contentWrapperClass]),onFocus:e[12]||(e[12]=(...a)=>t.activate&&t.activate(...a)),tabindex:"-1",onMousedown:e[13]||(e[13]=y.withModifiers(()=>{},["prevent"])),style:y.normalizeStyle([i.dropdownStyles,{maxHeight:t.optimizedHeight+"px"}]),ref:"list"},[y.createElementVNode("ul",{class:"multiselect__content",style:y.normalizeStyle(o.contentStyle),role:"listbox",id:"listbox-"+t.id,"aria-multiselectable":t.multiple},[y.renderSlot(t.$slots,"beforeList"),t.multiple&&t.max===t.internalValue.length?(y.openBlock(),y.createElementBlock("li",dIe,[y.createElementVNode("span",pIe,[y.renderSlot(t.$slots,"maxElements",{},()=>[y.createTextVNode("Maximum of "+y.toDisplayString(t.max)+" options selected. First remove a selected option to select another.",1)])])])):y.createCommentVNode("v-if",!0),!t.max||t.internalValue.length<t.max?(y.openBlock(!0),y.createElementBlock(y.Fragment,{key:1},y.renderList(t.filteredOptions,(a,s)=>(y.openBlock(),y.createElementBlock("li",{class:"multiselect__element",key:s,"aria-selected":t.isSelected(a),id:t.id+"-"+s,role:a&&(a.$isLabel||a.$isDisabled)?null:"option"},[a&&(a.$isLabel||a.$isDisabled)?y.createCommentVNode("v-if",!0):(y.openBlock(),y.createElementBlock("span",{key:0,class:y.normalizeClass([t.optionHighlight(s,a),"multiselect__option"]),onClick:y.withModifiers(u=>t.select(a),["stop"]),onMouseenter:y.withModifiers(u=>t.pointerSet(s),["self"]),"data-select":a&&a.isTag?t.tagPlaceholder:o.selectLabelText,"data-selected":o.selectedLabelText,"data-deselect":o.deselectLabelText},[y.renderSlot(t.$slots,"option",{option:a,search:t.search,index:s},()=>[y.createElementVNode("span",null,y.toDisplayString(t.getOptionLabel(a)),1)])],42,vIe)),a&&(a.$isLabel||a.$isDisabled)?(y.openBlock(),y.createElementBlock("span",{key:1,"data-select":t.groupSelect&&o.selectGroupLabelText,"data-deselect":t.groupSelect&&o.deselectGroupLabelText,class:y.normalizeClass([t.groupHighlight(s,a),"multiselect__option"]),onMouseenter:y.withModifiers(u=>t.groupSelect&&t.pointerSet(s),["self"]),onMousedown:y.withModifiers(u=>t.selectGroup(a),["prevent"])},[y.renderSlot(t.$slots,"option",{option:a,search:t.search,index:s},()=>[y.createElementVNode("span",null,y.toDisplayString(t.getOptionLabel(a)),1)])],42,mIe)):y.createCommentVNode("v-if",!0)],8,hIe))),128)):y.createCommentVNode("v-if",!0),y.withDirectives(y.createElementVNode("li",null,[y.createElementVNode("span",gIe,[y.renderSlot(t.$slots,"noResult",{search:t.search},()=>[e[20]||(e[20]=y.createTextVNode("No elements found. Consider changing the search query."))])])],512),[[y.vShow,r.showNoResults&&t.filteredOptions.length===0&&t.search&&!r.loading]]),y.withDirectives(y.createElementVNode("li",null,[y.createElementVNode("span",yIe,[y.renderSlot(t.$slots,"noOptions",{},()=>[e[21]||(e[21]=y.createTextVNode("List is empty."))])])],512),[[y.vShow,r.showNoOptions&&(t.options.length===0||o.hasOptionGroup===!0&&t.filteredOptions.length===0)&&!t.search&&!r.loading]]),y.renderSlot(t.$slots,"afterList")],12,fIe)],38)):y.createCommentVNode("v-if",!0)]),_:3})],8,["disabled"]))],42,nIe)}R_.render=bIe;const wIe=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"element-select",props:{modelValue:{type:[String,Number,Object],default:""},type:{type:String,default:"single"},name:{type:String,default:""},rules:{type:String,default:""},immediate:{type:Boolean,default:!1},isClear:{type:Boolean,default:!1},placeholder:{type:String,default:""},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},isSearch:{type:Boolean,default:!1},defaultOptions:{type:Object,default(){return{}}},options:{type:Array,default(){return[]}},label:{type:String,default:"label"},code:{type:[String,Number],default:"value"},tooltipModifiers:{type:Array,default(){return[{name:"offset",options:{offset:[30,25]}},{name:"arrow",options:{padding:15}}]}},tooltipPlacement:{type:String,default:"top-end"}},emits:["update:modelValue","change"],setup(t,{emit:e}){const{t:r}=Nu(),n=t,i=e,o=y.ref(null),a=y.reactive({inputVal:n.type==="multiple"?[]:{}}),{inputVal:s}=y.toRefs(a),u=y.ref(null),f=y.computed(()=>{const g=Hi.cloneDeep(n.options)||[];return Object.keys(n.defaultOptions).length>0&&g.unshift(n.defaultOptions),g.forEach(E=>{E!=null&&E[n.label]&&(E[n.label]=r(E[n.label]))}),g});y.watch(()=>n.modelValue,g=>d(g)),y.onMounted(async()=>{var g;d(n.modelValue),await n.immediate&&await((g=o.value)==null?void 0:g.validate())});const d=g=>{if(n.type==="multiple"){const E=[];(g||"").split(",").forEach(w=>{const x=f.value.find(k=>k[n.code]===w);x&&E.push(x)}),s.value=E}else{const E=f.value.find(w=>w[n.code]===g);s.value=E??null}u.value=s.value},p=async g=>{var E;n.type==="multiple"?(u.value=s.value.map(w=>w[n.code]).join(","),i("update:modelValue",u.value),i("change",s.value)):(u.value=(g==null?void 0:g[n.code])??"",i("update:modelValue",u.value),i("change",g)),await y.nextTick(),n.rules.includes("required")&&await((E=o.value)==null?void 0:E.validate())},v=async()=>{var g;n.type==="multiple"&&(u.value=s.value.map(E=>E[n.code]).join(","),i("update:modelValue",u.value),i("change",s.value)),await y.nextTick(),n.rules.includes("required")&&await((g=o.value)==null?void 0:g.validate())},m=()=>{s.value="",u.value="",i("update:modelValue","")};return(g,E)=>(y.openBlock(),y.createBlock(y.unref(ma),{ref_key:"veeField",ref:o,modelValue:u.value,"onUpdate:modelValue":E[1]||(E[1]=w=>u.value=w),rules:t.rules,type:"text",name:t.name},{default:y.withCtx(({field:w,errors:x})=>[y.createElementVNode("span",{class:y.normalizeClass(["ipt",x.length>0?"iptError":""]),style:{gap:"0px"}},[y.createElementVNode("input",y.mergeProps(w,{type:"hidden"}),null,16),y.createVNode(y.unref(R_),{modelValue:y.unref(s),"onUpdate:modelValue":E[0]||(E[0]=k=>y.isRef(s)?s.value=k:null),options:f.value,"track-by":t.code,label:t.label,searchable:t.isSearch,placeholder:t.placeholder,"show-labels":!1,multiple:n.type==="multiple","close-on-select":!0,onSelect:p,onRemove:v,style:{width:"100%"}},{singleLabel:y.withCtx(({option:k})=>[y.createTextVNode(y.toDisplayString(y.unref(r)((k==null?void 0:k[t.label])??"")),1)]),option:y.withCtx(({option:k})=>[y.createTextVNode(y.toDisplayString(y.unref(r)(k[t.label])),1)]),_:1},8,["modelValue","options","track-by","label","searchable","placeholder","multiple"]),x.length>0?(y.openBlock(),y.createBlock(Ml,{key:0,msg:x[0],placement:t.tooltipPlacement,modifiers:t.tooltipModifiers},{default:y.withCtx(()=>[...E[2]||(E[2]=[y.createElementVNode("span",{class:"error"},[y.createElementVNode("span",{class:"hide"},"에러")],-1)])]),_:1},8,["msg","placement","modifiers"])):y.createCommentVNode("",!0),!t.disabled&&t.isClear&&u.value?(y.openBlock(),y.createBlock(El,{key:1,className:"btn_del",onClick:m},{default:y.withCtx(()=>[...E[3]||(E[3]=[y.createElementVNode("span",{class:"hide"},"삭제",-1)])]),_:1})):y.createCommentVNode("",!0)],2)]),_:1},8,["modelValue","rules","name"]))}}},Symbol.toStringTag,{value:"Module"})),EIe=["type","placeholder","readonly","disabled","maxlength"],xIe={key:0,class:"txt_maxLen"},CIe=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"element-text",props:{modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},name:{type:String,default:""},rules:{type:String,default:""},immediate:{type:Boolean,default:!1},isClear:{type:Boolean,default:!0},placeholder:{type:String,default:""},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},maxLenType:{type:String,default:""},maxLength:{type:[String,Number],default:-1},tooltipModifiers:{type:Array,default(){return[{name:"offset",options:{offset:[30,25]}},{name:"arrow",options:{padding:15}}]}},tooltipPlacement:{type:String,default:"top-end"}},emits:["update:modelValue"],setup(t,{emit:e}){const{t:r}=Nu(),n=t,i=e,o=y.ref(null),a=y.computed({get(){return n.modelValue},set(d){const p=u(d);i("update:modelValue",p)}});y.onMounted(async()=>{n.immediate&&await o.value.validate()});const s=()=>{a.value="",i("update:modelValue","")},u=d=>!n.maxLength||n.maxLength<1?d:n.maxLenType==="text"?d.slice(0,n.maxLength):n.maxLenType==="byte"?Hi.trimStringByByte(d,n.maxLength):d,f=d=>{const p=u(d.target.value);p!==d.target.value&&(d.target.value=p),i("update:modelValue",p)};return(d,p)=>(y.openBlock(),y.createBlock(y.unref(ma),{ref_key:"veeField",ref:o,modelValue:a.value,"onUpdate:modelValue":p[0]||(p[0]=v=>a.value=v),rules:t.rules,type:t.type,name:t.name},{default:y.withCtx(({field:v,errors:m})=>[y.createElementVNode("span",{class:y.normalizeClass(["ipt",m.length>0?"iptError":""])},[y.createElementVNode("input",y.mergeProps(v,{type:t.type,placeholder:t.placeholder,readonly:t.readonly,disabled:t.disabled,maxlength:t.maxLenType==="text"?t.maxLength:null,autocomplete:"off",onKeyup:f,onKeydown:f}),null,16,EIe),t.maxLenType?(y.openBlock(),y.createElementBlock("span",xIe,[t.maxLenType==="text"?(y.openBlock(),y.createElementBlock(y.Fragment,{key:0},[y.createTextVNode(y.toDisplayString(y.unref(r)("common.text.maxText",{nowLen:a.value.length,maxLen:t.maxLength})),1)],64)):(y.openBlock(),y.createElementBlock(y.Fragment,{key:1},[y.createTextVNode(y.toDisplayString(y.unref(r)("common.text.maxByte",{nowLen:y.unref(Hi).getByteLength(a.value),maxLen:t.maxLength})),1)],64))])):y.createCommentVNode("",!0),m.length>0?(y.openBlock(),y.createBlock(Ml,{key:1,msg:m[0],placement:t.tooltipPlacement,modifiers:t.tooltipModifiers},{default:y.withCtx(()=>[...p[1]||(p[1]=[y.createElementVNode("span",{class:"error"},[y.createElementVNode("span",{class:"hide"},"에러")],-1)])]),_:1},8,["msg","placement","modifiers"])):y.createCommentVNode("",!0),t.isClear&&a.value.length>0?(y.openBlock(),y.createBlock(El,{key:2,className:"btn_del",onClick:s},{default:y.withCtx(()=>[...p[2]||(p[2]=[y.createElementVNode("span",{class:"hide"},"삭제",-1)])]),_:1})):y.createCommentVNode("",!0)],2)]),_:1},8,["modelValue","rules","type","name"]))}}},Symbol.toStringTag,{value:"Module"}));(function(){try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".vue-toggles{--toggle-transition-duration: .2s;--toggle-transition-timing: ease;display:flex;align-items:center;border-radius:9999px;overflow:hidden;transition:background-color var(--toggle-transition-duration) var(--toggle-transition-timing),width var(--toggle-transition-duration) var(--toggle-transition-timing),height var(--toggle-transition-duration) var(--toggle-transition-timing)}.vue-toggles__dot{position:relative;display:flex;align-items:center;border-radius:9999px;box-shadow:0 1px 3px #0000001a,0 1px 2px #0000000f;transition:margin ease .2s}.vue-toggles__text{position:absolute;font-family:inherit;-webkit-user-select:none;user-select:none;white-space:nowrap}@media (prefers-reduced-motion){.vue-toggles,.vue-toggles *,.vue-toggles *:before,.vue-toggles *:after{animation:none!important;transition:none!important;transition-duration:none!important}}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();const kIe=["aria-checked","aria-readonly","onKeyup"],TIe=8,gg=5,io=3,SIe=y.defineComponent({__name:"VueToggles",props:{modelValue:{type:Boolean,default:void 0},value:{type:Boolean,default:void 0},disabled:{type:Boolean},reverse:{type:Boolean},width:{default:75},height:{default:25},dotColor:{default:"#ffffff"},dotSize:{default:0},uncheckedBg:{default:"#939393"},checkedBg:{default:"#5850ec"},uncheckedTextColor:{default:"#ffffff"},checkedTextColor:{default:"#ffffff"},uncheckedText:{default:""},checkedText:{default:""},fontSize:{default:12},fontWeight:{default:"normal"}},emits:["update:modelValue","click"],setup(t,{emit:e}){const r=t,n=e,i=y.ref(r.value||r.modelValue),o=y.computed(()=>({width:`${r.width}px`,height:`${r.height}px`,background:i.value?r.checkedBg:r.uncheckedBg,opacity:r.disabled?"0.5":"1",cursor:r.disabled?"not-allowed":"pointer"})),a=y.computed(()=>{const f=r.dotSize||r.height-TIe,d={background:r.dotColor,width:`${f}px`,height:`${f}px`,"min-width":`${f}px`,"min-height":`${f}px`,"margin-left":i.value?`${r.width-f-io}px`:`${gg}px`};return i.value?r.reverse?d["margin-left"]=`${gg}px`:d["margin-left"]=`${r.width-f-io}px`:r.reverse?d["margin-left"]=`${r.width-f-io}px`:d["margin-left"]=`${gg}px`,d}),s=y.computed(()=>{const f={"font-weight":r.fontWeight,"font-size":`${r.fontSize}px`,color:i.value&&!r.disabled?r.checkedTextColor:r.uncheckedTextColor,right:i.value?`${r.height-io}px`:"auto",left:i.value?"auto":`${r.height-io}px`};return i.value?r.reverse?(f.left=`${r.height-io}px`,f.right="auto"):(f.right=`${r.height-io}px`,f.left="auto"):r.reverse?(f.right=`${r.height-io}px`,f.left="auto"):(f.left=`${r.height-io}px`,f.right="auto"),f}),u=()=>{r.disabled||(i.value=!i.value,n("update:modelValue",i.value),n("click"))};return y.watchEffect(()=>{r.value!==void 0&&r.modelValue!==void 0&&console.warn('Avoid using both "v-model" and ":value" at the same time. Choose one for better predictability.'),i.value=r.value||r.modelValue}),(f,d)=>(y.openBlock(),y.createElementBlock("span",{class:"vue-toggles",style:y.normalizeStyle(o.value),role:"switch",tabindex:"0","aria-checked":i.value,"aria-readonly":f.disabled,"test-id":"toggle",onKeyup:[y.withKeys(y.withModifiers(u,["prevent"]),["enter"]),y.withKeys(y.withModifiers(u,["prevent"]),["space"])],onClick:u},[y.createElementVNode("span",{"aria-hidden":"true",style:y.normalizeStyle(a.value),class:"vue-toggles__dot","test-id":"dot"},[f.checkedText||f.uncheckedText?(y.openBlock(),y.createElementBlock("span",{key:0,class:"vue-toggles__text",style:y.normalizeStyle(s.value),"test-id":"text"},y.toDisplayString(i.value?f.checkedText:f.uncheckedText),5)):y.createCommentVNode("",!0)],4)],44,kIe))}}),_Ie=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"element-toggle",props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue","click"],setup(t,{emit:e}){const r=t,n=e,i=y.computed({get(){return r.modelValue},set(a){return n("update:modelValue",a)}}),o=()=>{i.value=!i.value};return(a,s)=>(y.openBlock(),y.createBlock(y.unref(SIe),{value:i.value,height:"22",width:"40",checkedBg:"#9983FF",uncheckedBg:"#d5dbe3",onClick:o},null,8,["value"]))}}},Symbol.toStringTag,{value:"Module"})),OIe=["onClick"],AIe=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"element-tab",props:{modelValue:{type:[String,Number],default:""},options:{type:Array,default(){return[]}},className:{type:String,default:"tab_primary"}},emits:["update:modelValue","click"],setup(t,{emit:e}){const r=t,n=e,i=y.computed({get(){return r.modelValue},set(a){return n("update:modelValue",a)}}),o=async a=>{i.value=a.value,await y.nextTick(),n("click",a.value)};return(a,s)=>(y.openBlock(),y.createElementBlock("div",{class:y.normalizeClass(t.className)},[y.createElementVNode("ul",null,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(t.options,u=>(y.openBlock(),y.createElementBlock("li",{key:u.value,class:y.normalizeClass([u.value===i.value?"active":""])},[y.createElementVNode("button",{type:"button",onClick:f=>o(u)},y.toDisplayString(u.label),9,OIe)],2))),128))])],2))}}},Symbol.toStringTag,{value:"Module"})),P_=B_;(function(t,e){const r=B_,n=t();for(;;)try{if(-parseInt(r(422))/1*(-parseInt(r(427))/2)+-parseInt(r(441))/3+parseInt(r(420))/4*(parseInt(r(421))/5)+-parseInt(r(428))/6*(-parseInt(r(440))/7)+parseInt(r(430))/8*(-parseInt(r(439))/9)+-parseInt(r(429))/10*(parseInt(r(436))/11)+parseInt(r(424))/12*(parseInt(r(426))/13)===e)break;n.push(n.shift())}catch{n.push(n.shift())}})(Ed,394642);function B_(t,e){return t=t-420,Ed()[t]}function Ed(){const t=["8302WinsSW","toUpperCase","804crONcj","forEach","63752XeQNwU","76xrxtdj","438MOpCIZ","6509060rhCdfD","32VTknWN","component","assign",".vue","replace","split","11aubyRj","charAt","map","140823qxgMPg","23618YjcgOX","1348527uLOcpt","46828WUnFYn","285QHvqQA"];return Ed=function(){return t},Ed()}const MIe=Object[P_(432)]({"./components/KButton.vue":XN,"./components/KText.vue":e2,"./components/containment/element-button.vue":t2,"./components/containment/element-tooltip.vue":wL,"./components/display/element-scroll.vue":QL,"./components/display/element-split-panes.vue":P$,"./components/form/element-checkbox.vue":RF,"./components/form/element-date-picker.vue":PF,"./components/form/element-editor.vue":A2e,"./components/form/element-multi-checkbox.vue":I2e,"./components/form/element-number.vue":$2e,"./components/form/element-radio-button.vue":U2e,"./components/form/element-radio.vue":W2e,"./components/form/element-select.vue":wIe,"./components/form/element-text.vue":CIe,"./components/form/element-toggle.vue":_Ie,"./components/navigation/element-tab.vue":AIe}),NIe={install(t){const e=P_;Object.entries(MIe)[e(425)](([r,n])=>{const i=e,o=n.default;if(!o)return;const a=r[i(435)]("/").pop()[i(434)](i(433),""),s=a.split("-")[i(438)](u=>u[i(437)](0)[i(423)]()+u.slice(1)).join("");t[i(431)](s,o)})}};var LIe=Object.create,$_=Object.defineProperty,DIe=Object.getOwnPropertyDescriptor,yg=Object.getOwnPropertyNames,IIe=Object.getPrototypeOf,RIe=Object.prototype.hasOwnProperty,PIe=(t,e)=>function(){return t&&(e=(0,t[yg(t)[0]])(t=0)),e},BIe=(t,e)=>function(){return e||(0,t[yg(t)[0]])((e={exports:{}}).exports,e),e.exports},$Ie=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of yg(e))!RIe.call(t,i)&&i!==r&&$_(t,i,{get:()=>e[i],enumerable:!(n=DIe(e,i))||n.enumerable});return t},FIe=(t,e,r)=>(r=t!=null?LIe(IIe(t)):{},$Ie($_(r,"default",{value:t,enumerable:!0}),t)),Lu=PIe({"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"(){}}),HIe=BIe({"../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(t,e){Lu(),e.exports=n;function r(o){return o instanceof Buffer?Buffer.from(o):new o.constructor(o.buffer.slice(),o.byteOffset,o.length)}function n(o){if(o=o||{},o.circles)return i(o);const a=new Map;if(a.set(Date,p=>new Date(p)),a.set(Map,(p,v)=>new Map(u(Array.from(p),v))),a.set(Set,(p,v)=>new Set(u(Array.from(p),v))),o.constructorHandlers)for(const p of o.constructorHandlers)a.set(p[0],p[1]);let s=null;return o.proto?d:f;function u(p,v){const m=Object.keys(p),g=new Array(m.length);for(let E=0;E<m.length;E++){const w=m[E],x=p[w];typeof x!="object"||x===null?g[w]=x:x.constructor!==Object&&(s=a.get(x.constructor))?g[w]=s(x,v):ArrayBuffer.isView(x)?g[w]=r(x):g[w]=v(x)}return g}function f(p){if(typeof p!="object"||p===null)return p;if(Array.isArray(p))return u(p,f);if(p.constructor!==Object&&(s=a.get(p.constructor)))return s(p,f);const v={};for(const m in p){if(Object.hasOwnProperty.call(p,m)===!1)continue;const g=p[m];typeof g!="object"||g===null?v[m]=g:g.constructor!==Object&&(s=a.get(g.constructor))?v[m]=s(g,f):ArrayBuffer.isView(g)?v[m]=r(g):v[m]=f(g)}return v}function d(p){if(typeof p!="object"||p===null)return p;if(Array.isArray(p))return u(p,d);if(p.constructor!==Object&&(s=a.get(p.constructor)))return s(p,d);const v={};for(const m in p){const g=p[m];typeof g!="object"||g===null?v[m]=g:g.constructor!==Object&&(s=a.get(g.constructor))?v[m]=s(g,d):ArrayBuffer.isView(g)?v[m]=r(g):v[m]=d(g)}return v}}function i(o){const a=[],s=[],u=new Map;if(u.set(Date,m=>new Date(m)),u.set(Map,(m,g)=>new Map(d(Array.from(m),g))),u.set(Set,(m,g)=>new Set(d(Array.from(m),g))),o.constructorHandlers)for(const m of o.constructorHandlers)u.set(m[0],m[1]);let f=null;return o.proto?v:p;function d(m,g){const E=Object.keys(m),w=new Array(E.length);for(let x=0;x<E.length;x++){const k=E[x],_=m[k];if(typeof _!="object"||_===null)w[k]=_;else if(_.constructor!==Object&&(f=u.get(_.constructor)))w[k]=f(_,g);else if(ArrayBuffer.isView(_))w[k]=r(_);else{const O=a.indexOf(_);O!==-1?w[k]=s[O]:w[k]=g(_)}}return w}function p(m){if(typeof m!="object"||m===null)return m;if(Array.isArray(m))return d(m,p);if(m.constructor!==Object&&(f=u.get(m.constructor)))return f(m,p);const g={};a.push(m),s.push(g);for(const E in m){if(Object.hasOwnProperty.call(m,E)===!1)continue;const w=m[E];if(typeof w!="object"||w===null)g[E]=w;else if(w.constructor!==Object&&(f=u.get(w.constructor)))g[E]=f(w,p);else if(ArrayBuffer.isView(w))g[E]=r(w);else{const x=a.indexOf(w);x!==-1?g[E]=s[x]:g[E]=p(w)}}return a.pop(),s.pop(),g}function v(m){if(typeof m!="object"||m===null)return m;if(Array.isArray(m))return d(m,v);if(m.constructor!==Object&&(f=u.get(m.constructor)))return f(m,v);const g={};a.push(m),s.push(g);for(const E in m){const w=m[E];if(typeof w!="object"||w===null)g[E]=w;else if(w.constructor!==Object&&(f=u.get(w.constructor)))g[E]=f(w,v);else if(ArrayBuffer.isView(w))g[E]=r(w);else{const x=a.indexOf(w);x!==-1?g[E]=s[x]:g[E]=v(w)}}return a.pop(),s.pop(),g}}}});Lu(),Lu(),Lu();var F_=typeof navigator<"u",Ce=typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof global<"u"?global:{};typeof Ce.chrome<"u"&&Ce.chrome.devtools,F_&&(Ce.self,Ce.top);var H_;typeof navigator<"u"&&((H_=navigator.userAgent)==null||H_.toLowerCase().includes("electron")),Lu();var UIe=FIe(HIe()),zIe=/(?:^|[-_/])(\w)/g;function qIe(t,e){return e?e.toUpperCase():""}function VIe(t){return t&&`${t}`.replace(zIe,qIe)}function WIe(t,e){let r=t.replace(/^[a-z]:/i,"").replace(/\\/g,"/");r.endsWith(`index${e}`)&&(r=r.replace(`/index${e}`,e));const n=r.lastIndexOf("/"),i=r.substring(n+1);{const o=i.lastIndexOf(e);return i.substring(0,o)}}var U_=(0,UIe.default)({circles:!0});const jIe={trailing:!0};function Qs(t,e=25,r={}){if(r={...jIe,...r},!Number.isFinite(e))throw new TypeError("Expected `wait` to be a finite number");let n,i,o=[],a,s;const u=(f,d)=>(a=GIe(t,f,d),a.finally(()=>{if(a=null,r.trailing&&s&&!i){const p=u(f,s);return s=null,p}}),a);return function(...f){return a?(r.trailing&&(s=f),a):new Promise(d=>{const p=!i&&r.leading;clearTimeout(i),i=setTimeout(()=>{i=null;const v=r.leading?n:u(this,f);for(const m of o)m(v);o=[]},e),p?(n=u(this,f),d(n)):o.push(d)})}}async function GIe(t,e,r){return await t.apply(e,r)}function bg(t,e={},r){for(const n in t){const i=t[n],o=r?`${r}:${n}`:n;typeof i=="object"&&i!==null?bg(i,e,o):typeof i=="function"&&(e[o]=i)}return e}const KIe={run:t=>t()},YIe=()=>KIe,z_=typeof console.createTask<"u"?console.createTask:YIe;function XIe(t,e){const r=e.shift(),n=z_(r);return t.reduce((i,o)=>i.then(()=>n.run(()=>o(...e))),Promise.resolve())}function JIe(t,e){const r=e.shift(),n=z_(r);return Promise.all(t.map(i=>n.run(()=>i(...e))))}function wg(t,e){for(const r of[...t])r(e)}class ZIe{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(e,r,n={}){if(!e||typeof r!="function")return()=>{};const i=e;let o;for(;this._deprecatedHooks[e];)o=this._deprecatedHooks[e],e=o.to;if(o&&!n.allowDeprecated){let a=o.message;a||(a=`${i} hook has been deprecated`+(o.to?`, please use ${o.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(a)||(console.warn(a),this._deprecatedMessages.add(a))}if(!r.name)try{Object.defineProperty(r,"name",{get:()=>"_"+e.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[e]=this._hooks[e]||[],this._hooks[e].push(r),()=>{r&&(this.removeHook(e,r),r=void 0)}}hookOnce(e,r){let n,i=(...o)=>(typeof n=="function"&&n(),n=void 0,i=void 0,r(...o));return n=this.hook(e,i),n}removeHook(e,r){if(this._hooks[e]){const n=this._hooks[e].indexOf(r);n!==-1&&this._hooks[e].splice(n,1),this._hooks[e].length===0&&delete this._hooks[e]}}deprecateHook(e,r){this._deprecatedHooks[e]=typeof r=="string"?{to:r}:r;const n=this._hooks[e]||[];delete this._hooks[e];for(const i of n)this.hook(e,i)}deprecateHooks(e){Object.assign(this._deprecatedHooks,e);for(const r in e)this.deprecateHook(r,e[r])}addHooks(e){const r=bg(e),n=Object.keys(r).map(i=>this.hook(i,r[i]));return()=>{for(const i of n.splice(0,n.length))i()}}removeHooks(e){const r=bg(e);for(const n in r)this.removeHook(n,r[n])}removeAllHooks(){for(const e in this._hooks)delete this._hooks[e]}callHook(e,...r){return r.unshift(e),this.callHookWith(XIe,e,...r)}callHookParallel(e,...r){return r.unshift(e),this.callHookWith(JIe,e,...r)}callHookWith(e,r,...n){const i=this._before||this._after?{name:r,args:n,context:{}}:void 0;this._before&&wg(this._before,i);const o=e(r in this._hooks?[...this._hooks[r]]:[],n);return o instanceof Promise?o.finally(()=>{this._after&&i&&wg(this._after,i)}):(this._after&&i&&wg(this._after,i),o)}beforeEach(e){return this._before=this._before||[],this._before.push(e),()=>{if(this._before!==void 0){const r=this._before.indexOf(e);r!==-1&&this._before.splice(r,1)}}}afterEach(e){return this._after=this._after||[],this._after.push(e),()=>{if(this._after!==void 0){const r=this._after.indexOf(e);r!==-1&&this._after.splice(r,1)}}}}function q_(){return new ZIe}var QIe=Object.create,V_=Object.defineProperty,eRe=Object.getOwnPropertyDescriptor,Eg=Object.getOwnPropertyNames,tRe=Object.getPrototypeOf,rRe=Object.prototype.hasOwnProperty,nRe=(t,e)=>function(){return t&&(e=(0,t[Eg(t)[0]])(t=0)),e},W_=(t,e)=>function(){return e||(0,t[Eg(t)[0]])((e={exports:{}}).exports,e),e.exports},iRe=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Eg(e))!rRe.call(t,i)&&i!==r&&V_(t,i,{get:()=>e[i],enumerable:!(n=eRe(e,i))||n.enumerable});return t},oRe=(t,e,r)=>(r=t!=null?QIe(tRe(t)):{},iRe(V_(r,"default",{value:t,enumerable:!0}),t)),ae=nRe({"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"(){}}),aRe=W_({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js"(t,e){ae(),function(r){var n={À:"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",إ:"i",آ:"aa",ؤ:"u",ئ:"e",ء:"a",ب:"b",ت:"t",ث:"th",ج:"j",ح:"h",خ:"kh",د:"d",ذ:"th",ر:"r",ز:"z",س:"s",ش:"sh",ص:"s",ض:"dh",ط:"t",ظ:"z",ع:"a",غ:"gh",ف:"f",ق:"q",ك:"k",ل:"l",م:"m",ن:"n",ه:"h",و:"w",ي:"y",ى:"a",ة:"h",ﻻ:"la",ﻷ:"laa",ﻹ:"lai",ﻵ:"laa",گ:"g",چ:"ch",پ:"p",ژ:"zh",ک:"k",ی:"y","َ":"a","ً":"an","ِ":"e","ٍ":"en","ُ":"u","ٌ":"on","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9",က:"k",ခ:"kh",ဂ:"g",ဃ:"ga",င:"ng",စ:"s",ဆ:"sa",ဇ:"z","စျ":"za",ည:"ny",ဋ:"t",ဌ:"ta",ဍ:"d",ဎ:"da",ဏ:"na",တ:"t",ထ:"ta",ဒ:"d",ဓ:"da",န:"n",ပ:"p",ဖ:"pa",ဗ:"b",ဘ:"ba",မ:"m",ယ:"y",ရ:"ya",လ:"l",ဝ:"w",သ:"th",ဟ:"h",ဠ:"la",အ:"a","ြ":"y","ျ":"ya","ွ":"w","ြွ":"yw","ျွ":"ywa","ှ":"h",ဧ:"e","၏":"-e",ဣ:"i",ဤ:"-i",ဉ:"u",ဦ:"-u",ဩ:"aw","သြော":"aw",ဪ:"aw","၀":"0","၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","္":"","့":"","း":"",č:"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",ბ:"b",გ:"g",დ:"d",ე:"e",ვ:"v",ზ:"z",თ:"t",ი:"i",კ:"k",ლ:"l",მ:"m",ნ:"n",ო:"o",პ:"p",ჟ:"zh",რ:"r",ს:"s",ტ:"t",უ:"u",ფ:"p",ქ:"k",ღ:"gh",ყ:"q",შ:"sh",ჩ:"ch",ც:"ts",ძ:"dz",წ:"ts",ჭ:"ch",ხ:"kh",ჯ:"j",ჰ:"h",α:"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",Ќ:"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",ă:"a",Ă:"A",ș:"s",Ș:"S",ț:"t",Ț:"T",ţ:"t",Ţ:"T",а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"i",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"c",ч:"ch",ш:"sh",щ:"sh",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"Yo",Ж:"Zh",З:"Z",И:"I",Й:"I",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"Kh",Ц:"C",Ч:"Ch",Ш:"Sh",Щ:"Sh",Ъ:"",Ы:"Y",Ь:"",Э:"E",Ю:"Yu",Я:"Ya",ђ:"dj",ј:"j",ћ:"c",џ:"dz",Ђ:"Dj",Ј:"j",Ћ:"C",Џ:"Dz",ľ:"l",ĺ:"l",ŕ:"r",Ľ:"L",Ĺ:"L",Ŕ:"R",ş:"s",Ş:"S",ı:"i",İ:"I",ğ:"g",Ğ:"G",ả:"a",Ả:"A",ẳ:"a",Ẳ:"A",ẩ:"a",Ẩ:"A",đ:"d",Đ:"D",ẹ:"e",Ẹ:"E",ẽ:"e",Ẽ:"E",ẻ:"e",Ẻ:"E",ế:"e",Ế:"E",ề:"e",Ề:"E",ệ:"e",Ệ:"E",ễ:"e",Ễ:"E",ể:"e",Ể:"E",ỏ:"o",ọ:"o",Ọ:"o",ố:"o",Ố:"O",ồ:"o",Ồ:"O",ổ:"o",Ổ:"O",ộ:"o",Ộ:"O",ỗ:"o",Ỗ:"O",ơ:"o",Ơ:"O",ớ:"o",Ớ:"O",ờ:"o",Ờ:"O",ợ:"o",Ợ:"O",ỡ:"o",Ỡ:"O",Ở:"o",ở:"o",ị:"i",Ị:"I",ĩ:"i",Ĩ:"I",ỉ:"i",Ỉ:"i",ủ:"u",Ủ:"U",ụ:"u",Ụ:"U",ũ:"u",Ũ:"U",ư:"u",Ư:"U",ứ:"u",Ứ:"U",ừ:"u",Ừ:"U",ự:"u",Ự:"U",ữ:"u",Ữ:"U",ử:"u",Ử:"ư",ỷ:"y",Ỷ:"y",ỳ:"y",Ỳ:"Y",ỵ:"y",Ỵ:"Y",ỹ:"y",Ỹ:"Y",ạ:"a",Ạ:"A",ấ:"a",Ấ:"A",ầ:"a",Ầ:"A",ậ:"a",Ậ:"A",ẫ:"a",Ẫ:"A",ắ:"a",Ắ:"A",ằ:"a",Ằ:"A",ặ:"a",Ặ:"A",ẵ:"a",Ẵ:"A","⓪":"0","①":"1","②":"2","③":"3","④":"4","⑤":"5","⑥":"6","⑦":"7","⑧":"8","⑨":"9","⑩":"10","⑪":"11","⑫":"12","⑬":"13","⑭":"14","⑮":"15","⑯":"16","⑰":"17","⑱":"18","⑲":"18","⑳":"18","⓵":"1","⓶":"2","⓷":"3","⓸":"4","⓹":"5","⓺":"6","⓻":"7","⓼":"8","⓽":"9","⓾":"10","⓿":"0","⓫":"11","⓬":"12","⓭":"13","⓮":"14","⓯":"15","⓰":"16","⓱":"17","⓲":"18","⓳":"19","⓴":"20","Ⓐ":"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","“":'"',"”":'"',"‘":"'","’":"'","∂":"d",ƒ:"f","™":"(TM)","©":"(C)",œ:"oe",Œ:"OE","®":"(R)","†":"+","℠":"(SM)","…":"...","˚":"o",º:"o",ª:"a","•":"*","၊":",","။":".",$:"USD","€":"EUR","₢":"BRN","₣":"FRF","£":"GBP","₤":"ITL","₦":"NGN","₧":"ESP","₩":"KRW","₪":"ILS","₫":"VND","₭":"LAK","₮":"MNT","₯":"GRD","₱":"ARS","₲":"PYG","₳":"ARA","₴":"UAH","₵":"GHS","¢":"cent","¥":"CNY",元:"CNY",円:"YEN","﷼":"IRR","₠":"EWE","฿":"THB","₨":"INR","₹":"INR","₰":"PF","₺":"TRY","؋":"AFN","₼":"AZN",лв:"BGN","៛":"KHR","₡":"CRC","₸":"KZT",ден:"MKD",zł:"PLN","₽":"RUB","₾":"GEL"},i=["်","ް"],o={"ာ":"a","ါ":"a","ေ":"e","ဲ":"e","ိ":"i","ီ":"i","ို":"o","ု":"u","ူ":"u","ေါင်":"aung","ော":"aw","ော်":"aw","ေါ":"aw","ေါ်":"aw","်":"်","က်":"et","ိုက်":"aik","ောက်":"auk","င်":"in","ိုင်":"aing","ောင်":"aung","စ်":"it","ည်":"i","တ်":"at","ိတ်":"eik","ုတ်":"ok","ွတ်":"ut","ေတ်":"it","ဒ်":"d","ိုဒ်":"ok","ုဒ်":"ait","န်":"an","ာန်":"an","ိန်":"ein","ုန်":"on","ွန်":"un","ပ်":"at","ိပ်":"eik","ုပ်":"ok","ွပ်":"ut","န်ုပ်":"nub","မ်":"an","ိမ်":"ein","ုမ်":"on","ွမ်":"un","ယ်":"e","ိုလ်":"ol","ဉ်":"in","ံ":"an","ိံ":"ein","ုံ":"on","ައް":"ah","ަށް":"ah"},a={en:{},az:{ç:"c",ə:"e",ğ:"g",ı:"i",ö:"o",ş:"s",ü:"u",Ç:"C",Ə:"E",Ğ:"G",İ:"I",Ö:"O",Ş:"S",Ü:"U"},cs:{č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z"},fi:{ä:"a",Ä:"A",ö:"o",Ö:"O"},hu:{ä:"a",Ä:"A",ö:"o",Ö:"O",ü:"u",Ü:"U",ű:"u",Ű:"U"},lt:{ą:"a",č:"c",ę:"e",ė:"e",į:"i",š:"s",ų:"u",ū:"u",ž:"z",Ą:"A",Č:"C",Ę:"E",Ė:"E",Į:"I",Š:"S",Ų:"U",Ū:"U"},lv:{ā:"a",č:"c",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",š:"s",ū:"u",ž:"z",Ā:"A",Č:"C",Ē:"E",Ģ:"G",Ī:"i",Ķ:"k",Ļ:"L",Ņ:"N",Š:"S",Ū:"u",Ž:"Z"},pl:{ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ó:"o",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"e",Ł:"L",Ń:"N",Ó:"O",Ś:"S",Ź:"Z",Ż:"Z"},sv:{ä:"a",Ä:"A",ö:"o",Ö:"O"},sk:{ä:"a",Ä:"A"},sr:{љ:"lj",њ:"nj",Љ:"Lj",Њ:"Nj",đ:"dj",Đ:"Dj"},tr:{Ü:"U",Ö:"O",ü:"u",ö:"o"}},s={ar:{"∆":"delta","∞":"la-nihaya","♥":"hob","&":"wa","|":"aw","<":"aqal-men",">":"akbar-men","∑":"majmou","¤":"omla"},az:{},ca:{"∆":"delta","∞":"infinit","♥":"amor","&":"i","|":"o","<":"menys que",">":"mes que","∑":"suma dels","¤":"moneda"},cs:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"nebo","<":"mensi nez",">":"vetsi nez","∑":"soucet","¤":"mena"},de:{"∆":"delta","∞":"unendlich","♥":"Liebe","&":"und","|":"oder","<":"kleiner als",">":"groesser als","∑":"Summe von","¤":"Waehrung"},dv:{"∆":"delta","∞":"kolunulaa","♥":"loabi","&":"aai","|":"noonee","<":"ah vure kuda",">":"ah vure bodu","∑":"jumula","¤":"faisaa"},en:{"∆":"delta","∞":"infinity","♥":"love","&":"and","|":"or","<":"less than",">":"greater than","∑":"sum","¤":"currency"},es:{"∆":"delta","∞":"infinito","♥":"amor","&":"y","|":"u","<":"menos que",">":"mas que","∑":"suma de los","¤":"moneda"},fa:{"∆":"delta","∞":"bi-nahayat","♥":"eshgh","&":"va","|":"ya","<":"kamtar-az",">":"bishtar-az","∑":"majmooe","¤":"vahed"},fi:{"∆":"delta","∞":"aarettomyys","♥":"rakkaus","&":"ja","|":"tai","<":"pienempi kuin",">":"suurempi kuin","∑":"summa","¤":"valuutta"},fr:{"∆":"delta","∞":"infiniment","♥":"Amour","&":"et","|":"ou","<":"moins que",">":"superieure a","∑":"somme des","¤":"monnaie"},ge:{"∆":"delta","∞":"usasruloba","♥":"siqvaruli","&":"da","|":"an","<":"naklebi",">":"meti","∑":"jami","¤":"valuta"},gr:{},hu:{"∆":"delta","∞":"vegtelen","♥":"szerelem","&":"es","|":"vagy","<":"kisebb mint",">":"nagyobb mint","∑":"szumma","¤":"penznem"},it:{"∆":"delta","∞":"infinito","♥":"amore","&":"e","|":"o","<":"minore di",">":"maggiore di","∑":"somma","¤":"moneta"},lt:{"∆":"delta","∞":"begalybe","♥":"meile","&":"ir","|":"ar","<":"maziau nei",">":"daugiau nei","∑":"suma","¤":"valiuta"},lv:{"∆":"delta","∞":"bezgaliba","♥":"milestiba","&":"un","|":"vai","<":"mazak neka",">":"lielaks neka","∑":"summa","¤":"valuta"},my:{"∆":"kwahkhyaet","∞":"asaonasme","♥":"akhyait","&":"nhin","|":"tho","<":"ngethaw",">":"kyithaw","∑":"paungld","¤":"ngwekye"},mk:{},nl:{"∆":"delta","∞":"oneindig","♥":"liefde","&":"en","|":"of","<":"kleiner dan",">":"groter dan","∑":"som","¤":"valuta"},pl:{"∆":"delta","∞":"nieskonczonosc","♥":"milosc","&":"i","|":"lub","<":"mniejsze niz",">":"wieksze niz","∑":"suma","¤":"waluta"},pt:{"∆":"delta","∞":"infinito","♥":"amor","&":"e","|":"ou","<":"menor que",">":"maior que","∑":"soma","¤":"moeda"},ro:{"∆":"delta","∞":"infinit","♥":"dragoste","&":"si","|":"sau","<":"mai mic ca",">":"mai mare ca","∑":"suma","¤":"valuta"},ru:{"∆":"delta","∞":"beskonechno","♥":"lubov","&":"i","|":"ili","<":"menshe",">":"bolshe","∑":"summa","¤":"valjuta"},sk:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"alebo","<":"menej ako",">":"viac ako","∑":"sucet","¤":"mena"},sr:{},tr:{"∆":"delta","∞":"sonsuzluk","♥":"ask","&":"ve","|":"veya","<":"kucuktur",">":"buyuktur","∑":"toplam","¤":"para birimi"},uk:{"∆":"delta","∞":"bezkinechnist","♥":"lubov","&":"i","|":"abo","<":"menshe",">":"bilshe","∑":"suma","¤":"valjuta"},vn:{"∆":"delta","∞":"vo cuc","♥":"yeu","&":"va","|":"hoac","<":"nho hon",">":"lon hon","∑":"tong","¤":"tien te"}},u=[";","?",":","@","&","=","+","$",",","/"].join(""),f=[";","?",":","@","&","=","+","$",","].join(""),d=[".","!","~","*","'","(",")"].join(""),p=function(w,x){var k="-",_="",O="",N=!0,L={},A,P,U,J,re,Se,Fe,ce,le,Z,j,ue,ye,ve,ke="";if(typeof w!="string")return"";if(typeof x=="string"&&(k=x),Fe=s.en,ce=a.en,typeof x=="object"){A=x.maintainCase||!1,L=x.custom&&typeof x.custom=="object"?x.custom:L,U=+x.truncate>1&&x.truncate||!1,J=x.uric||!1,re=x.uricNoSlash||!1,Se=x.mark||!1,N=!(x.symbols===!1||x.lang===!1),k=x.separator||k,J&&(ke+=u),re&&(ke+=f),Se&&(ke+=d),Fe=x.lang&&s[x.lang]&&N?s[x.lang]:N?s.en:{},ce=x.lang&&a[x.lang]?a[x.lang]:x.lang===!1||x.lang===!0?{}:a.en,x.titleCase&&typeof x.titleCase.length=="number"&&Array.prototype.toString.call(x.titleCase)?(x.titleCase.forEach(function(Te){L[Te+""]=Te+""}),P=!0):P=!!x.titleCase,x.custom&&typeof x.custom.length=="number"&&Array.prototype.toString.call(x.custom)&&x.custom.forEach(function(Te){L[Te+""]=Te+""}),Object.keys(L).forEach(function(Te){var We;Te.length>1?We=new RegExp("\\b"+m(Te)+"\\b","gi"):We=new RegExp(m(Te),"gi"),w=w.replace(We,L[Te])});for(j in L)ke+=j}for(ke+=k,ke=m(ke),w=w.replace(/(^\s+|\s+$)/g,""),ye=!1,ve=!1,Z=0,ue=w.length;Z<ue;Z++)j=w[Z],g(j,L)?ye=!1:ce[j]?(j=ye&&ce[j].match(/[A-Za-z0-9]/)?" "+ce[j]:ce[j],ye=!1):j in n?(Z+1<ue&&i.indexOf(w[Z+1])>=0?(O+=j,j=""):ve===!0?(j=o[O]+n[j],O=""):j=ye&&n[j].match(/[A-Za-z0-9]/)?" "+n[j]:n[j],ye=!1,ve=!1):j in o?(O+=j,j="",Z===ue-1&&(j=o[O]),ve=!0):Fe[j]&&!(J&&u.indexOf(j)!==-1)&&!(re&&f.indexOf(j)!==-1)?(j=ye||_.substr(-1).match(/[A-Za-z0-9]/)?k+Fe[j]:Fe[j],j+=w[Z+1]!==void 0&&w[Z+1].match(/[A-Za-z0-9]/)?k:"",ye=!0):(ve===!0?(j=o[O]+j,O="",ve=!1):ye&&(/[A-Za-z0-9]/.test(j)||_.substr(-1).match(/A-Za-z0-9]/))&&(j=" "+j),ye=!1),_+=j.replace(new RegExp("[^\\w\\s"+ke+"_-]","g"),k);return P&&(_=_.replace(/(\w)(\S*)/g,function(Te,We,we){var De=We.toUpperCase()+(we!==null?we:"");return Object.keys(L).indexOf(De.toLowerCase())<0?De:De.toLowerCase()})),_=_.replace(/\s+/g,k).replace(new RegExp("\\"+k+"+","g"),k).replace(new RegExp("(^\\"+k+"+|\\"+k+"+$)","g"),""),U&&_.length>U&&(le=_.charAt(U)===k,_=_.slice(0,U),le||(_=_.slice(0,_.lastIndexOf(k)))),!A&&!P&&(_=_.toLowerCase()),_},v=function(w){return function(k){return p(k,w)}},m=function(w){return w.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},g=function(E,w){for(var x in w)if(w[x]===E)return!0};if(typeof e<"u"&&e.exports)e.exports=p,e.exports.createSlug=v;else if(typeof define<"u"&&define.amd)define([],function(){return p});else try{if(r.getSlug||r.createSlug)throw"speakingurl: globals exists /(getSlug|createSlug)/";r.getSlug=p,r.createSlug=v}catch{}}(t)}}),sRe=W_({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js"(t,e){ae(),e.exports=aRe()}});ae(),ae(),ae(),ae(),ae(),ae(),ae(),ae();function lRe(t){var e;const r=t.name||t._componentTag||t.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__||t.__name;return r==="index"&&((e=t.__file)!=null&&e.endsWith("index.vue"))?"":r}function uRe(t){const e=t.__file;if(e)return VIe(WIe(e,".vue"))}function j_(t,e){return t.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__=e,e}function xg(t){if(t.__VUE_DEVTOOLS_NEXT_APP_RECORD__)return t.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(t.root)return t.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__}function G_(t){var e,r;const n=(e=t.subTree)==null?void 0:e.type,i=xg(t);return i?((r=i==null?void 0:i.types)==null?void 0:r.Fragment)===n:!1}function xd(t){var e,r,n;const i=lRe((t==null?void 0:t.type)||{});if(i)return i;if((t==null?void 0:t.root)===t)return"Root";for(const a in(r=(e=t.parent)==null?void 0:e.type)==null?void 0:r.components)if(t.parent.type.components[a]===(t==null?void 0:t.type))return j_(t,a);for(const a in(n=t.appContext)==null?void 0:n.components)if(t.appContext.components[a]===(t==null?void 0:t.type))return j_(t,a);const o=uRe((t==null?void 0:t.type)||{});return o||"Anonymous Component"}function cRe(t){var e,r,n;const i=(n=(r=(e=t==null?void 0:t.appContext)==null?void 0:e.app)==null?void 0:r.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__)!=null?n:0,o=t===(t==null?void 0:t.root)?"root":t.uid;return`${i}:${o}`}function Cg(t,e){return e=e||`${t.id}:root`,t.instanceMap.get(e)||t.instanceMap.get(":root")}function fRe(){const t={top:0,bottom:0,left:0,right:0,get width(){return t.right-t.left},get height(){return t.bottom-t.top}};return t}var Cd;function dRe(t){return Cd||(Cd=document.createRange()),Cd.selectNode(t),Cd.getBoundingClientRect()}function pRe(t){const e=fRe();if(!t.children)return e;for(let r=0,n=t.children.length;r<n;r++){const i=t.children[r];let o;if(i.component)o=Va(i.component);else if(i.el){const a=i.el;a.nodeType===1||a.getBoundingClientRect?o=a.getBoundingClientRect():a.nodeType===3&&a.data.trim()&&(o=dRe(a))}o&&hRe(e,o)}return e}function hRe(t,e){return(!t.top||e.top<t.top)&&(t.top=e.top),(!t.bottom||e.bottom>t.bottom)&&(t.bottom=e.bottom),(!t.left||e.left<t.left)&&(t.left=e.left),(!t.right||e.right>t.right)&&(t.right=e.right),t}var K_={top:0,left:0,right:0,bottom:0,width:0,height:0};function Va(t){const e=t.subTree.el;return typeof window>"u"?K_:G_(t)?pRe(t.subTree):(e==null?void 0:e.nodeType)===1?e==null?void 0:e.getBoundingClientRect():t.subTree.component?Va(t.subTree.component):K_}ae();function kg(t){return G_(t)?vRe(t.subTree):t.subTree?[t.subTree.el]:[]}function vRe(t){if(!t.children)return[];const e=[];return t.children.forEach(r=>{r.component?e.push(...kg(r.component)):r!=null&&r.el&&e.push(r.el)}),e}var Y_="__vue-devtools-component-inspector__",X_="__vue-devtools-component-inspector__card__",J_="__vue-devtools-component-inspector__name__",Z_="__vue-devtools-component-inspector__indicator__",Q_={display:"block",zIndex:2147483640,position:"fixed",backgroundColor:"#42b88325",border:"1px solid #42b88350",borderRadius:"5px",transition:"all 0.1s ease-in",pointerEvents:"none"},mRe={fontFamily:"Arial, Helvetica, sans-serif",padding:"5px 8px",borderRadius:"4px",textAlign:"left",position:"absolute",left:0,color:"#e9e9e9",fontSize:"14px",fontWeight:600,lineHeight:"24px",backgroundColor:"#42b883",boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"},gRe={display:"inline-block",fontWeight:400,fontStyle:"normal",fontSize:"12px",opacity:.7};function el(){return document.getElementById(Y_)}function yRe(){return document.getElementById(X_)}function bRe(){return document.getElementById(Z_)}function wRe(){return document.getElementById(J_)}function Tg(t){return{left:`${Math.round(t.left*100)/100}px`,top:`${Math.round(t.top*100)/100}px`,width:`${Math.round(t.width*100)/100}px`,height:`${Math.round(t.height*100)/100}px`}}function Sg(t){var e;const r=document.createElement("div");r.id=(e=t.elementId)!=null?e:Y_,Object.assign(r.style,{...Q_,...Tg(t.bounds),...t.style});const n=document.createElement("span");n.id=X_,Object.assign(n.style,{...mRe,top:t.bounds.top<35?0:"-35px"});const i=document.createElement("span");i.id=J_,i.innerHTML=`<${t.name}> `;const o=document.createElement("i");return o.id=Z_,o.innerHTML=`${Math.round(t.bounds.width*100)/100} x ${Math.round(t.bounds.height*100)/100}`,Object.assign(o.style,gRe),n.appendChild(i),n.appendChild(o),r.appendChild(n),document.body.appendChild(r),r}function _g(t){const e=el(),r=yRe(),n=wRe(),i=bRe();e&&(Object.assign(e.style,{...Q_,...Tg(t.bounds)}),Object.assign(r.style,{top:t.bounds.top<35?0:"-35px"}),n.innerHTML=`<${t.name}> `,i.innerHTML=`${Math.round(t.bounds.width*100)/100} x ${Math.round(t.bounds.height*100)/100}`)}function ERe(t){const e=Va(t);if(!e.width&&!e.height)return;const r=xd(t);el()?_g({bounds:e,name:r}):Sg({bounds:e,name:r})}function eO(){const t=el();t&&(t.style.display="none")}var Og=null;function Ag(t){const e=t.target;if(e){const r=e.__vueParentComponent;if(r&&(Og=r,r.vnode.el)){const i=Va(r),o=xd(r);el()?_g({bounds:i,name:o}):Sg({bounds:i,name:o})}}}function xRe(t,e){if(t.preventDefault(),t.stopPropagation(),Og){const r=cRe(Og);e(r)}}var kd=null;function CRe(){eO(),window.removeEventListener("mouseover",Ag),window.removeEventListener("click",kd,!0),kd=null}function kRe(){return window.addEventListener("mouseover",Ag),new Promise(t=>{function e(r){r.preventDefault(),r.stopPropagation(),xRe(r,n=>{window.removeEventListener("click",e,!0),kd=null,window.removeEventListener("mouseover",Ag);const i=el();i&&(i.style.display="none"),t(JSON.stringify({id:n}))})}kd=e,window.addEventListener("click",e,!0)})}function TRe(t){const e=Cg(Vr.value,t.id);if(e){const[r]=kg(e);if(typeof r.scrollIntoView=="function")r.scrollIntoView({behavior:"smooth"});else{const n=Va(e),i=document.createElement("div"),o={...Tg(n),position:"absolute"};Object.assign(i.style,o),document.body.appendChild(i),i.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{document.body.removeChild(i)},2e3)}setTimeout(()=>{const n=Va(e);if(n.width||n.height){const i=xd(e),o=el();o?_g({...t,name:i,bounds:n}):Sg({...t,name:i,bounds:n}),setTimeout(()=>{o&&(o.style.display="none")},1500)}},1200)}}ae();var tO,rO;(rO=(tO=Ce).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__)!=null||(tO.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__=!0);function SRe(t){let e=0;const r=setInterval(()=>{Ce.__VUE_INSPECTOR__&&(clearInterval(r),e+=30,t()),e>=5e3&&clearInterval(r)},30)}function _Re(){const t=Ce.__VUE_INSPECTOR__,e=t.openInEditor;t.openInEditor=async(...r)=>{t.disable(),e(...r)}}function ORe(){return new Promise(t=>{function e(){_Re(),t(Ce.__VUE_INSPECTOR__)}Ce.__VUE_INSPECTOR__?e():SRe(()=>{e()})})}ae(),ae();function ARe(t){return!!(t&&t.__v_isReadonly)}function nO(t){return ARe(t)?nO(t.__v_raw):!!(t&&t.__v_isReactive)}function Mg(t){return!!(t&&t.__v_isRef===!0)}function Du(t){const e=t&&t.__v_raw;return e?Du(e):t}var MRe=class{constructor(){this.refEditor=new NRe}set(t,e,r,n){const i=Array.isArray(e)?e:e.split(".");for(;i.length>1;){const s=i.shift();t instanceof Map?t=t.get(s):t instanceof Set?t=Array.from(t.values())[s]:t=t[s],this.refEditor.isRef(t)&&(t=this.refEditor.get(t))}const o=i[0],a=this.refEditor.get(t)[o];n?n(t,o,r):this.refEditor.isRef(a)?this.refEditor.set(a,r):t[o]=r}get(t,e){const r=Array.isArray(e)?e:e.split(".");for(let n=0;n<r.length;n++)if(t instanceof Map?t=t.get(r[n]):t=t[r[n]],this.refEditor.isRef(t)&&(t=this.refEditor.get(t)),!t)return;return t}has(t,e,r=!1){if(typeof t>"u")return!1;const n=Array.isArray(e)?e.slice():e.split("."),i=r?2:1;for(;t&&n.length>i;){const o=n.shift();t=t[o],this.refEditor.isRef(t)&&(t=this.refEditor.get(t))}return t!=null&&Object.prototype.hasOwnProperty.call(t,n[0])}createDefaultSetCallback(t){return(e,r,n)=>{if((t.remove||t.newKey)&&(Array.isArray(e)?e.splice(r,1):Du(e)instanceof Map?e.delete(r):Du(e)instanceof Set?e.delete(Array.from(e.values())[r]):Reflect.deleteProperty(e,r)),!t.remove){const i=e[t.newKey||r];this.refEditor.isRef(i)?this.refEditor.set(i,n):Du(e)instanceof Map?e.set(t.newKey||r,n):Du(e)instanceof Set?e.add(n):e[t.newKey||r]=n}}}},NRe=class{set(t,e){if(Mg(t))t.value=e;else{if(t instanceof Set&&Array.isArray(e)){t.clear(),e.forEach(i=>t.add(i));return}const r=Object.keys(e);if(t instanceof Map){const i=new Set(t.keys());r.forEach(o=>{t.set(o,Reflect.get(e,o)),i.delete(o)}),i.forEach(o=>t.delete(o));return}const n=new Set(Object.keys(t));r.forEach(i=>{Reflect.set(t,i,Reflect.get(e,i)),n.delete(i)}),n.forEach(i=>Reflect.deleteProperty(t,i))}}get(t){return Mg(t)?t.value:t}isRef(t){return Mg(t)||nO(t)}};ae(),ae(),ae();var LRe="__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";function DRe(){if(typeof window>"u"||!F_||typeof localStorage>"u"||localStorage===null)return{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""};const t=typeof localStorage.getItem<"u"?localStorage.getItem(LRe):null;return t?JSON.parse(t):{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""}}ae(),ae(),ae();var iO,oO;(oO=(iO=Ce).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS)!=null||(iO.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS=[]);var IRe=new Proxy(Ce.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS,{get(t,e,r){return Reflect.get(t,e,r)}});function RRe(t,e){Kt.timelineLayersState[e.id]=!1,IRe.push({...t,descriptorId:e.id,appRecord:xg(e.app)})}var aO,sO;(sO=(aO=Ce).__VUE_DEVTOOLS_KIT_INSPECTOR__)!=null||(aO.__VUE_DEVTOOLS_KIT_INSPECTOR__=[]);var Ng=new Proxy(Ce.__VUE_DEVTOOLS_KIT_INSPECTOR__,{get(t,e,r){return Reflect.get(t,e,r)}}),lO=Qs(()=>{rl.hooks.callHook("sendInspectorToClient",uO())});function PRe(t,e){var r,n;Ng.push({options:t,descriptor:e,treeFilterPlaceholder:(r=t.treeFilterPlaceholder)!=null?r:"Search tree...",stateFilterPlaceholder:(n=t.stateFilterPlaceholder)!=null?n:"Search state...",treeFilter:"",selectedNodeId:"",appRecord:xg(e.app)}),lO()}function uO(){return Ng.filter(t=>t.descriptor.app===Vr.value.app).filter(t=>t.descriptor.id!=="components").map(t=>{var e;const r=t.descriptor,n=t.options;return{id:n.id,label:n.label,logo:r.logo,icon:`custom-ic-baseline-${(e=n==null?void 0:n.icon)==null?void 0:e.replace(/_/g,"-")}`,packageName:r.packageName,homepage:r.homepage,pluginId:r.id}})}function Td(t,e){return Ng.find(r=>r.options.id===t&&(e?r.descriptor.app===e:!0))}function BRe(){const t=q_();t.hook("addInspector",({inspector:n,plugin:i})=>{PRe(n,i.descriptor)});const e=Qs(async({inspectorId:n,plugin:i})=>{var o;if(!n||!((o=i==null?void 0:i.descriptor)!=null&&o.app)||Kt.highPerfModeEnabled)return;const a=Td(n,i.descriptor.app),s={app:i.descriptor.app,inspectorId:n,filter:(a==null?void 0:a.treeFilter)||"",rootNodes:[]};await new Promise(u=>{t.callHookWith(async f=>{await Promise.all(f.map(d=>d(s))),u()},"getInspectorTree")}),t.callHookWith(async u=>{await Promise.all(u.map(f=>f({inspectorId:n,rootNodes:s.rootNodes})))},"sendInspectorTreeToClient")},120);t.hook("sendInspectorTree",e);const r=Qs(async({inspectorId:n,plugin:i})=>{var o;if(!n||!((o=i==null?void 0:i.descriptor)!=null&&o.app)||Kt.highPerfModeEnabled)return;const a=Td(n,i.descriptor.app),s={app:i.descriptor.app,inspectorId:n,nodeId:(a==null?void 0:a.selectedNodeId)||"",state:null},u={currentTab:`custom-inspector:${n}`};s.nodeId&&await new Promise(f=>{t.callHookWith(async d=>{await Promise.all(d.map(p=>p(s,u))),f()},"getInspectorState")}),t.callHookWith(async f=>{await Promise.all(f.map(d=>d({inspectorId:n,nodeId:s.nodeId,state:s.state})))},"sendInspectorStateToClient")},120);return t.hook("sendInspectorState",r),t.hook("customInspectorSelectNode",({inspectorId:n,nodeId:i,plugin:o})=>{const a=Td(n,o.descriptor.app);a&&(a.selectedNodeId=i)}),t.hook("timelineLayerAdded",({options:n,plugin:i})=>{RRe(n,i.descriptor)}),t.hook("timelineEventAdded",({options:n,plugin:i})=>{var o;const a=["performance","component-event","keyboard","mouse"];Kt.highPerfModeEnabled||!((o=Kt.timelineLayersState)!=null&&o[i.descriptor.id])&&!a.includes(n.layerId)||t.callHookWith(async s=>{await Promise.all(s.map(u=>u(n)))},"sendTimelineEventToClient")}),t.hook("getComponentInstances",async({app:n})=>{const i=n.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(!i)return null;const o=i.id.toString();return[...i.instanceMap].filter(([s])=>s.split(":")[0]===o).map(([,s])=>s)}),t.hook("getComponentBounds",async({instance:n})=>Va(n)),t.hook("getComponentName",({instance:n})=>xd(n)),t.hook("componentHighlight",({uid:n})=>{const i=Vr.value.instanceMap.get(n);i&&ERe(i)}),t.hook("componentUnhighlight",()=>{eO()}),t}var cO,fO;(fO=(cO=Ce).__VUE_DEVTOOLS_KIT_APP_RECORDS__)!=null||(cO.__VUE_DEVTOOLS_KIT_APP_RECORDS__=[]);var dO,pO;(pO=(dO=Ce).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__)!=null||(dO.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__={});var hO,vO;(vO=(hO=Ce).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__)!=null||(hO.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__="");var mO,gO;(gO=(mO=Ce).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__)!=null||(mO.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__=[]);var yO,bO;(bO=(yO=Ce).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__)!=null||(yO.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__=[]);var Wa="__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";function $Re(){return{connected:!1,clientConnected:!1,vitePluginDetected:!0,appRecords:[],activeAppRecordId:"",tabs:[],commands:[],highPerfModeEnabled:!0,devtoolsClientDetected:{},perfUniqueGroupId:0,timelineLayersState:DRe()}}var wO,EO;(EO=(wO=Ce)[Wa])!=null||(wO[Wa]=$Re());var FRe=Qs(t=>{rl.hooks.callHook("devtoolsStateUpdated",{state:t})});Qs((t,e)=>{rl.hooks.callHook("devtoolsConnectedUpdated",{state:t,oldState:e})});var Sd=new Proxy(Ce.__VUE_DEVTOOLS_KIT_APP_RECORDS__,{get(t,e,r){return e==="value"?Ce.__VUE_DEVTOOLS_KIT_APP_RECORDS__:Ce.__VUE_DEVTOOLS_KIT_APP_RECORDS__[e]}}),Vr=new Proxy(Ce.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__,{get(t,e,r){return e==="value"?Ce.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__:e==="id"?Ce.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__:Ce.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[e]}});function xO(){FRe({...Ce[Wa],appRecords:Sd.value,activeAppRecordId:Vr.id,tabs:Ce.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,commands:Ce.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__})}function HRe(t){Ce.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__=t,xO()}function URe(t){Ce.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__=t,xO()}var Kt=new Proxy(Ce[Wa],{get(t,e){return e==="appRecords"?Sd:e==="activeAppRecordId"?Vr.id:e==="tabs"?Ce.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__:e==="commands"?Ce.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__:Ce[Wa][e]},deleteProperty(t,e){return delete t[e],!0},set(t,e,r){return{...Ce[Wa]},t[e]=r,Ce[Wa][e]=r,!0}});function zRe(t={}){var e,r,n;const{file:i,host:o,baseUrl:a=window.location.origin,line:s=0,column:u=0}=t;if(i){if(o==="chrome-extension"){const f=i.replace(/\\/g,"\\\\"),d=(r=(e=window.VUE_DEVTOOLS_CONFIG)==null?void 0:e.openInEditorHost)!=null?r:"/";fetch(`${d}__open-in-editor?file=${encodeURI(i)}`).then(p=>{if(!p.ok){const v=`Opening component ${f} failed`;console.log(`%c${v}`,"color:red")}})}else if(Kt.vitePluginDetected){const f=(n=Ce.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__)!=null?n:a;Ce.__VUE_INSPECTOR__.openInEditor(f,i,s,u)}}}ae(),ae(),ae(),ae(),ae();var CO,kO;(kO=(CO=Ce).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__)!=null||(CO.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__=[]);var Lg=new Proxy(Ce.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__,{get(t,e,r){return Reflect.get(t,e,r)}});function Dg(t){const e={};return Object.keys(t).forEach(r=>{e[r]=t[r].defaultValue}),e}function Ig(t){return`__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${t}__`}function qRe(t){var e,r,n;const i=(r=(e=Lg.find(o=>{var a;return o[0].id===t&&!!((a=o[0])!=null&&a.settings)}))==null?void 0:e[0])!=null?r:null;return(n=i==null?void 0:i.settings)!=null?n:null}function TO(t,e){var r,n,i;const o=Ig(t);if(o){const a=localStorage.getItem(o);if(a)return JSON.parse(a)}if(t){const a=(n=(r=Lg.find(s=>s[0].id===t))==null?void 0:r[0])!=null?n:null;return Dg((i=a==null?void 0:a.settings)!=null?i:{})}return Dg(e)}function VRe(t,e){const r=Ig(t);localStorage.getItem(r)||localStorage.setItem(r,JSON.stringify(Dg(e)))}function WRe(t,e,r){const n=Ig(t),i=localStorage.getItem(n),o=JSON.parse(i||"{}"),a={...o,[e]:r};localStorage.setItem(n,JSON.stringify(a)),rl.hooks.callHookWith(s=>{s.forEach(u=>u({pluginId:t,key:e,oldValue:o[e],newValue:r,settings:a}))},"setPluginSettings")}ae(),ae(),ae(),ae(),ae(),ae(),ae(),ae(),ae(),ae(),ae();var SO,_O,xn=(_O=(SO=Ce).__VUE_DEVTOOLS_HOOK)!=null?_O:SO.__VUE_DEVTOOLS_HOOK=q_(),jRe={vueAppInit(t){xn.hook("app:init",t)},vueAppUnmount(t){xn.hook("app:unmount",t)},vueAppConnected(t){xn.hook("app:connected",t)},componentAdded(t){return xn.hook("component:added",t)},componentEmit(t){return xn.hook("component:emit",t)},componentUpdated(t){return xn.hook("component:updated",t)},componentRemoved(t){return xn.hook("component:removed",t)},setupDevtoolsPlugin(t){xn.hook("devtools-plugin:setup",t)},perfStart(t){return xn.hook("perf:start",t)},perfEnd(t){return xn.hook("perf:end",t)}},OO={on:jRe,setupDevToolsPlugin(t,e){return xn.callHook("devtools-plugin:setup",t,e)}},GRe=class{constructor({plugin:t,ctx:e}){this.hooks=e.hooks,this.plugin=t}get on(){return{visitComponentTree:t=>{this.hooks.hook("visitComponentTree",t)},inspectComponent:t=>{this.hooks.hook("inspectComponent",t)},editComponentState:t=>{this.hooks.hook("editComponentState",t)},getInspectorTree:t=>{this.hooks.hook("getInspectorTree",t)},getInspectorState:t=>{this.hooks.hook("getInspectorState",t)},editInspectorState:t=>{this.hooks.hook("editInspectorState",t)},inspectTimelineEvent:t=>{this.hooks.hook("inspectTimelineEvent",t)},timelineCleared:t=>{this.hooks.hook("timelineCleared",t)},setPluginSettings:t=>{this.hooks.hook("setPluginSettings",t)}}}notifyComponentUpdate(t){var e;if(Kt.highPerfModeEnabled)return;const r=uO().find(n=>n.packageName===this.plugin.descriptor.packageName);if(r!=null&&r.id){if(t){const n=[t.appContext.app,t.uid,(e=t.parent)==null?void 0:e.uid,t];xn.callHook("component:updated",...n)}else xn.callHook("component:updated");this.hooks.callHook("sendInspectorState",{inspectorId:r.id,plugin:this.plugin})}}addInspector(t){this.hooks.callHook("addInspector",{inspector:t,plugin:this.plugin}),this.plugin.descriptor.settings&&VRe(t.id,this.plugin.descriptor.settings)}sendInspectorTree(t){Kt.highPerfModeEnabled||this.hooks.callHook("sendInspectorTree",{inspectorId:t,plugin:this.plugin})}sendInspectorState(t){Kt.highPerfModeEnabled||this.hooks.callHook("sendInspectorState",{inspectorId:t,plugin:this.plugin})}selectInspectorNode(t,e){this.hooks.callHook("customInspectorSelectNode",{inspectorId:t,nodeId:e,plugin:this.plugin})}visitComponentTree(t){return this.hooks.callHook("visitComponentTree",t)}now(){return Kt.highPerfModeEnabled?0:Date.now()}addTimelineLayer(t){this.hooks.callHook("timelineLayerAdded",{options:t,plugin:this.plugin})}addTimelineEvent(t){Kt.highPerfModeEnabled||this.hooks.callHook("timelineEventAdded",{options:t,plugin:this.plugin})}getSettings(t){return TO(t??this.plugin.descriptor.id,this.plugin.descriptor.settings)}getComponentInstances(t){return this.hooks.callHook("getComponentInstances",{app:t})}getComponentBounds(t){return this.hooks.callHook("getComponentBounds",{instance:t})}getComponentName(t){return this.hooks.callHook("getComponentName",{instance:t})}highlightElement(t){const e=t.__VUE_DEVTOOLS_NEXT_UID__;return this.hooks.callHook("componentHighlight",{uid:e})}unhighlightElement(){return this.hooks.callHook("componentUnhighlight")}},KRe=GRe;ae(),ae(),ae(),ae();var YRe="__vue_devtool_undefined__",XRe="__vue_devtool_infinity__",JRe="__vue_devtool_negative_infinity__",ZRe="__vue_devtool_nan__";ae(),ae();var QRe={[YRe]:"undefined",[ZRe]:"NaN",[XRe]:"Infinity",[JRe]:"-Infinity"};Object.entries(QRe).reduce((t,[e,r])=>(t[r]=e,t),{}),ae(),ae(),ae(),ae(),ae();var AO,MO;(MO=(AO=Ce).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__)!=null||(AO.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__=new Set);function NO(t,e){return OO.setupDevToolsPlugin(t,e)}function ePe(t,e){const[r,n]=t;if(r.app!==e)return;const i=new KRe({plugin:{setupFn:n,descriptor:r},ctx:rl});r.packageName==="vuex"&&i.on.editInspectorState(o=>{i.sendInspectorState(o.inspectorId)}),n(i)}function LO(t,e){Ce.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(t)||Kt.highPerfModeEnabled&&!(e!=null&&e.inspectingComponent)||(Ce.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(t),Lg.forEach(r=>{ePe(r,t)}))}ae(),ae();var Iu="__VUE_DEVTOOLS_ROUTER__",tl="__VUE_DEVTOOLS_ROUTER_INFO__",DO,IO;(IO=(DO=Ce)[tl])!=null||(DO[tl]={currentRoute:null,routes:[]});var RO,PO;(PO=(RO=Ce)[Iu])!=null||(RO[Iu]={}),new Proxy(Ce[tl],{get(t,e){return Ce[tl][e]}}),new Proxy(Ce[Iu],{get(t,e){if(e==="value")return Ce[Iu]}});function tPe(t){const e=new Map;return((t==null?void 0:t.getRoutes())||[]).filter(r=>!e.has(r.path)&&e.set(r.path,1))}function Rg(t){return t.map(e=>{let{path:r,name:n,children:i,meta:o}=e;return i!=null&&i.length&&(i=Rg(i)),{path:r,name:n,children:i,meta:o}})}function rPe(t){if(t){const{fullPath:e,hash:r,href:n,path:i,name:o,matched:a,params:s,query:u}=t;return{fullPath:e,hash:r,href:n,path:i,name:o,params:s,query:u,matched:Rg(a)}}return t}function nPe(t,e){function r(){var n;const i=(n=t.app)==null?void 0:n.config.globalProperties.$router,o=rPe(i==null?void 0:i.currentRoute.value),a=Rg(tPe(i)),s=console.warn;console.warn=()=>{},Ce[tl]={currentRoute:o?U_(o):{},routes:U_(a)},Ce[Iu]=i,console.warn=s}r(),OO.on.componentUpdated(Qs(()=>{var n;((n=e.value)==null?void 0:n.app)===t.app&&(r(),!Kt.highPerfModeEnabled&&rl.hooks.callHook("routerInfoUpdated",{state:Ce[tl]}))},200))}function iPe(t){return{async getInspectorTree(e){const r={...e,app:Vr.value.app,rootNodes:[]};return await new Promise(n=>{t.callHookWith(async i=>{await Promise.all(i.map(o=>o(r))),n()},"getInspectorTree")}),r.rootNodes},async getInspectorState(e){const r={...e,app:Vr.value.app,state:null},n={currentTab:`custom-inspector:${e.inspectorId}`};return await new Promise(i=>{t.callHookWith(async o=>{await Promise.all(o.map(a=>a(r,n))),i()},"getInspectorState")}),r.state},editInspectorState(e){const r=new MRe,n={...e,app:Vr.value.app,set:(i,o=e.path,a=e.state.value,s)=>{r.set(i,o,a,s||r.createDefaultSetCallback(e.state))}};t.callHookWith(i=>{i.forEach(o=>o(n))},"editInspectorState")},sendInspectorState(e){const r=Td(e);t.callHook("sendInspectorState",{inspectorId:e,plugin:{descriptor:r.descriptor,setupFn:()=>({})}})},inspectComponentInspector(){return kRe()},cancelInspectComponentInspector(){return CRe()},getComponentRenderCode(e){const r=Cg(Vr.value,e);if(r)return typeof(r==null?void 0:r.type)!="function"?r.render.toString():r.type.toString()},scrollToComponent(e){return TRe({id:e})},openInEditor:zRe,getVueInspector:ORe,toggleApp(e,r){const n=Sd.value.find(i=>i.id===e);n&&(URe(e),HRe(n),nPe(n,Vr),lO(),LO(n.app,r))},inspectDOM(e){const r=Cg(Vr.value,e);if(r){const[n]=kg(r);n&&(Ce.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__=n)}},updatePluginSettings(e,r,n){WRe(e,r,n)},getPluginSettings(e){return{options:qRe(e),values:TO(e)}}}}ae();var BO,$O;($O=(BO=Ce).__VUE_DEVTOOLS_ENV__)!=null||(BO.__VUE_DEVTOOLS_ENV__={vitePluginDetected:!1});var FO=BRe(),HO,UO;(UO=(HO=Ce).__VUE_DEVTOOLS_KIT_CONTEXT__)!=null||(HO.__VUE_DEVTOOLS_KIT_CONTEXT__={hooks:FO,get state(){return{...Kt,activeAppRecordId:Vr.id,activeAppRecord:Vr.value,appRecords:Sd.value}},api:iPe(FO)});var rl=Ce.__VUE_DEVTOOLS_KIT_CONTEXT__;ae(),oRe(sRe());var zO,qO;(qO=(zO=Ce).__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__)!=null||(zO.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__={id:0,appIds:new Set}),ae(),ae();function oPe(t){Kt.highPerfModeEnabled=t??!Kt.highPerfModeEnabled,!t&&Vr.value&&LO(Vr.value.app)}ae(),ae(),ae();function aPe(t){Kt.devtoolsClientDetected={...Kt.devtoolsClientDetected,...t};const e=Object.values(Kt.devtoolsClientDetected).some(Boolean);oPe(!e)}var VO,WO;(WO=(VO=Ce).__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__)!=null||(VO.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__=aPe),ae(),ae(),ae(),ae(),ae(),ae(),ae();var sPe=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(t,e){this.keyToValue.set(t,e),this.valueToKey.set(e,t)}getByKey(t){return this.keyToValue.get(t)}getByValue(t){return this.valueToKey.get(t)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},jO=class{constructor(t){this.generateIdentifier=t,this.kv=new sPe}register(t,e){this.kv.getByValue(t)||(e||(e=this.generateIdentifier(t)),this.kv.set(e,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}},lPe=class extends jO{constructor(){super(t=>t.name),this.classToAllowedProps=new Map}register(t,e){typeof e=="object"?(e.allowProps&&this.classToAllowedProps.set(t,e.allowProps),super.register(t,e.identifier)):super.register(t,e)}getAllowedProps(t){return this.classToAllowedProps.get(t)}};ae(),ae();function uPe(t){if("values"in Object)return Object.values(t);const e=[];for(const r in t)t.hasOwnProperty(r)&&e.push(t[r]);return e}function cPe(t,e){const r=uPe(t);if("find"in r)return r.find(e);const n=r;for(let i=0;i<n.length;i++){const o=n[i];if(e(o))return o}}function nl(t,e){Object.entries(t).forEach(([r,n])=>e(n,r))}function _d(t,e){return t.indexOf(e)!==-1}function GO(t,e){for(let r=0;r<t.length;r++){const n=t[r];if(e(n))return n}}var fPe=class{constructor(){this.transfomers={}}register(t){this.transfomers[t.name]=t}findApplicable(t){return cPe(this.transfomers,e=>e.isApplicable(t))}findByName(t){return this.transfomers[t]}};ae(),ae();var dPe=t=>Object.prototype.toString.call(t).slice(8,-1),KO=t=>typeof t>"u",pPe=t=>t===null,Ru=t=>typeof t!="object"||t===null||t===Object.prototype?!1:Object.getPrototypeOf(t)===null?!0:Object.getPrototypeOf(t)===Object.prototype,Pg=t=>Ru(t)&&Object.keys(t).length===0,Ko=t=>Array.isArray(t),hPe=t=>typeof t=="string",vPe=t=>typeof t=="number"&&!isNaN(t),mPe=t=>typeof t=="boolean",gPe=t=>t instanceof RegExp,Pu=t=>t instanceof Map,Bu=t=>t instanceof Set,YO=t=>dPe(t)==="Symbol",yPe=t=>t instanceof Date&&!isNaN(t.valueOf()),bPe=t=>t instanceof Error,XO=t=>typeof t=="number"&&isNaN(t),wPe=t=>mPe(t)||pPe(t)||KO(t)||vPe(t)||hPe(t)||YO(t),EPe=t=>typeof t=="bigint",xPe=t=>t===1/0||t===-1/0,CPe=t=>ArrayBuffer.isView(t)&&!(t instanceof DataView),kPe=t=>t instanceof URL;ae();var JO=t=>t.replace(/\./g,"\\."),Bg=t=>t.map(String).map(JO).join("."),$u=t=>{const e=[];let r="";for(let i=0;i<t.length;i++){let o=t.charAt(i);if(o==="\\"&&t.charAt(i+1)==="."){r+=".",i++;continue}if(o==="."){e.push(r),r="";continue}r+=o}const n=r;return e.push(n),e};ae();function Di(t,e,r,n){return{isApplicable:t,annotation:e,transform:r,untransform:n}}var ZO=[Di(KO,"undefined",()=>null,()=>{}),Di(EPe,"bigint",t=>t.toString(),t=>typeof BigInt<"u"?BigInt(t):(console.error("Please add a BigInt polyfill."),t)),Di(yPe,"Date",t=>t.toISOString(),t=>new Date(t)),Di(bPe,"Error",(t,e)=>{const r={name:t.name,message:t.message};return e.allowedErrorProps.forEach(n=>{r[n]=t[n]}),r},(t,e)=>{const r=new Error(t.message);return r.name=t.name,r.stack=t.stack,e.allowedErrorProps.forEach(n=>{r[n]=t[n]}),r}),Di(gPe,"regexp",t=>""+t,t=>{const e=t.slice(1,t.lastIndexOf("/")),r=t.slice(t.lastIndexOf("/")+1);return new RegExp(e,r)}),Di(Bu,"set",t=>[...t.values()],t=>new Set(t)),Di(Pu,"map",t=>[...t.entries()],t=>new Map(t)),Di(t=>XO(t)||xPe(t),"number",t=>XO(t)?"NaN":t>0?"Infinity":"-Infinity",Number),Di(t=>t===0&&1/t===-1/0,"number",()=>"-0",Number),Di(kPe,"URL",t=>t.toString(),t=>new URL(t))];function Od(t,e,r,n){return{isApplicable:t,annotation:e,transform:r,untransform:n}}var QO=Od((t,e)=>YO(t)?!!e.symbolRegistry.getIdentifier(t):!1,(t,e)=>["symbol",e.symbolRegistry.getIdentifier(t)],t=>t.description,(t,e,r)=>{const n=r.symbolRegistry.getValue(e[1]);if(!n)throw new Error("Trying to deserialize unknown symbol");return n}),TPe=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((t,e)=>(t[e.name]=e,t),{}),eA=Od(CPe,t=>["typed-array",t.constructor.name],t=>[...t],(t,e)=>{const r=TPe[e[1]];if(!r)throw new Error("Trying to deserialize unknown typed array");return new r(t)});function tA(t,e){return t!=null&&t.constructor?!!e.classRegistry.getIdentifier(t.constructor):!1}var rA=Od(tA,(t,e)=>["class",e.classRegistry.getIdentifier(t.constructor)],(t,e)=>{const r=e.classRegistry.getAllowedProps(t.constructor);if(!r)return{...t};const n={};return r.forEach(i=>{n[i]=t[i]}),n},(t,e,r)=>{const n=r.classRegistry.getValue(e[1]);if(!n)throw new Error(`Trying to deserialize unknown class '${e[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(n.prototype),t)}),nA=Od((t,e)=>!!e.customTransformerRegistry.findApplicable(t),(t,e)=>["custom",e.customTransformerRegistry.findApplicable(t).name],(t,e)=>e.customTransformerRegistry.findApplicable(t).serialize(t),(t,e,r)=>{const n=r.customTransformerRegistry.findByName(e[1]);if(!n)throw new Error("Trying to deserialize unknown custom value");return n.deserialize(t)}),SPe=[rA,QO,nA,eA],iA=(t,e)=>{const r=GO(SPe,i=>i.isApplicable(t,e));if(r)return{value:r.transform(t,e),type:r.annotation(t,e)};const n=GO(ZO,i=>i.isApplicable(t,e));if(n)return{value:n.transform(t,e),type:n.annotation}},oA={};ZO.forEach(t=>{oA[t.annotation]=t});var _Pe=(t,e,r)=>{if(Ko(e))switch(e[0]){case"symbol":return QO.untransform(t,e,r);case"class":return rA.untransform(t,e,r);case"custom":return nA.untransform(t,e,r);case"typed-array":return eA.untransform(t,e,r);default:throw new Error("Unknown transformation: "+e)}else{const n=oA[e];if(!n)throw new Error("Unknown transformation: "+e);return n.untransform(t,r)}};ae();var il=(t,e)=>{if(e>t.size)throw new Error("index out of bounds");const r=t.keys();for(;e>0;)r.next(),e--;return r.next().value};function aA(t){if(_d(t,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(_d(t,"prototype"))throw new Error("prototype is not allowed as a property");if(_d(t,"constructor"))throw new Error("constructor is not allowed as a property")}var OPe=(t,e)=>{aA(e);for(let r=0;r<e.length;r++){const n=e[r];if(Bu(t))t=il(t,+n);else if(Pu(t)){const i=+n,o=+e[++r]==0?"key":"value",a=il(t,i);switch(o){case"key":t=a;break;case"value":t=t.get(a);break}}else t=t[n]}return t},$g=(t,e,r)=>{if(aA(e),e.length===0)return r(t);let n=t;for(let o=0;o<e.length-1;o++){const a=e[o];if(Ko(n)){const s=+a;n=n[s]}else if(Ru(n))n=n[a];else if(Bu(n)){const s=+a;n=il(n,s)}else if(Pu(n)){if(o===e.length-2)break;const u=+a,f=+e[++o]==0?"key":"value",d=il(n,u);switch(f){case"key":n=d;break;case"value":n=n.get(d);break}}}const i=e[e.length-1];if(Ko(n)?n[+i]=r(n[+i]):Ru(n)&&(n[i]=r(n[i])),Bu(n)){const o=il(n,+i),a=r(o);o!==a&&(n.delete(o),n.add(a))}if(Pu(n)){const o=+e[e.length-2],a=il(n,o);switch(+i==0?"key":"value"){case"key":{const u=r(a);n.set(u,n.get(a)),u!==a&&n.delete(a);break}case"value":{n.set(a,r(n.get(a)));break}}}return t};function Fg(t,e,r=[]){if(!t)return;if(!Ko(t)){nl(t,(o,a)=>Fg(o,e,[...r,...$u(a)]));return}const[n,i]=t;i&&nl(i,(o,a)=>{Fg(o,e,[...r,...$u(a)])}),e(n,r)}function APe(t,e,r){return Fg(e,(n,i)=>{t=$g(t,i,o=>_Pe(o,n,r))}),t}function MPe(t,e){function r(n,i){const o=OPe(t,$u(i));n.map($u).forEach(a=>{t=$g(t,a,()=>o)})}if(Ko(e)){const[n,i]=e;n.forEach(o=>{t=$g(t,$u(o),()=>t)}),i&&nl(i,r)}else nl(e,r);return t}var NPe=(t,e)=>Ru(t)||Ko(t)||Pu(t)||Bu(t)||tA(t,e);function LPe(t,e,r){const n=r.get(t);n?n.push(e):r.set(t,[e])}function DPe(t,e){const r={};let n;return t.forEach(i=>{if(i.length<=1)return;e||(i=i.map(s=>s.map(String)).sort((s,u)=>s.length-u.length));const[o,...a]=i;o.length===0?n=a.map(Bg):r[Bg(o)]=a.map(Bg)}),n?Pg(r)?[n]:[n,r]:Pg(r)?void 0:r}var sA=(t,e,r,n,i=[],o=[],a=new Map)=>{var s;const u=wPe(t);if(!u){LPe(t,i,e);const g=a.get(t);if(g)return n?{transformedValue:null}:g}if(!NPe(t,r)){const g=iA(t,r),E=g?{transformedValue:g.value,annotations:[g.type]}:{transformedValue:t};return u||a.set(t,E),E}if(_d(o,t))return{transformedValue:null};const f=iA(t,r),d=(s=f==null?void 0:f.value)!=null?s:t,p=Ko(d)?[]:{},v={};nl(d,(g,E)=>{if(E==="__proto__"||E==="constructor"||E==="prototype")throw new Error(`Detected property ${E}. This is a prototype pollution risk, please remove it from your object.`);const w=sA(g,e,r,n,[...i,E],[...o,t],a);p[E]=w.transformedValue,Ko(w.annotations)?v[E]=w.annotations:Ru(w.annotations)&&nl(w.annotations,(x,k)=>{v[JO(E)+"."+k]=x})});const m=Pg(v)?{transformedValue:p,annotations:f?[f.type]:void 0}:{transformedValue:p,annotations:f?[f.type,v]:v};return u||a.set(t,m),m};ae(),ae();function lA(t){return Object.prototype.toString.call(t).slice(8,-1)}function uA(t){return lA(t)==="Array"}function IPe(t){if(lA(t)!=="Object")return!1;const e=Object.getPrototypeOf(t);return!!e&&e.constructor===Object&&e===Object.prototype}function RPe(t,e,r,n,i){const o={}.propertyIsEnumerable.call(n,e)?"enumerable":"nonenumerable";o==="enumerable"&&(t[e]=r),i&&o==="nonenumerable"&&Object.defineProperty(t,e,{value:r,enumerable:!1,writable:!0,configurable:!0})}function Hg(t,e={}){if(uA(t))return t.map(i=>Hg(i,e));if(!IPe(t))return t;const r=Object.getOwnPropertyNames(t),n=Object.getOwnPropertySymbols(t);return[...r,...n].reduce((i,o)=>{if(uA(e.props)&&!e.props.includes(o))return i;const a=t[o],s=Hg(a,e);return RPe(i,o,s,t,e.nonenumerable),i},{})}var xt=class{constructor({dedupe:t=!1}={}){this.classRegistry=new lPe,this.symbolRegistry=new jO(e=>{var r;return(r=e.description)!=null?r:""}),this.customTransformerRegistry=new fPe,this.allowedErrorProps=[],this.dedupe=t}serialize(t){const e=new Map,r=sA(t,e,this,this.dedupe),n={json:r.transformedValue};r.annotations&&(n.meta={...n.meta,values:r.annotations});const i=DPe(e,this.dedupe);return i&&(n.meta={...n.meta,referentialEqualities:i}),n}deserialize(t){const{json:e,meta:r}=t;let n=Hg(e);return r!=null&&r.values&&(n=APe(n,r.values,this)),r!=null&&r.referentialEqualities&&(n=MPe(n,r.referentialEqualities)),n}stringify(t){return JSON.stringify(this.serialize(t))}parse(t){return this.deserialize(JSON.parse(t))}registerClass(t,e){this.classRegistry.register(t,e)}registerSymbol(t,e){this.symbolRegistry.register(t,e)}registerCustom(t,e){this.customTransformerRegistry.register({name:e,...t})}allowErrorProps(...t){this.allowedErrorProps.push(...t)}};xt.defaultInstance=new xt,xt.serialize=xt.defaultInstance.serialize.bind(xt.defaultInstance),xt.deserialize=xt.defaultInstance.deserialize.bind(xt.defaultInstance),xt.stringify=xt.defaultInstance.stringify.bind(xt.defaultInstance),xt.parse=xt.defaultInstance.parse.bind(xt.defaultInstance),xt.registerClass=xt.defaultInstance.registerClass.bind(xt.defaultInstance),xt.registerSymbol=xt.defaultInstance.registerSymbol.bind(xt.defaultInstance),xt.registerCustom=xt.defaultInstance.registerCustom.bind(xt.defaultInstance),xt.allowErrorProps=xt.defaultInstance.allowErrorProps.bind(xt.defaultInstance),ae(),ae(),ae(),ae(),ae(),ae(),ae(),ae(),ae(),ae(),ae(),ae(),ae(),ae(),ae(),ae(),ae(),ae(),ae(),ae(),ae(),ae(),ae();var cA,fA;(fA=(cA=Ce).__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__)!=null||(cA.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__=[]);var dA,pA;(pA=(dA=Ce).__VUE_DEVTOOLS_KIT_RPC_CLIENT__)!=null||(dA.__VUE_DEVTOOLS_KIT_RPC_CLIENT__=null);var hA,vA;(vA=(hA=Ce).__VUE_DEVTOOLS_KIT_RPC_SERVER__)!=null||(hA.__VUE_DEVTOOLS_KIT_RPC_SERVER__=null);var mA,gA;(gA=(mA=Ce).__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__)!=null||(mA.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__=null);var yA,bA;(bA=(yA=Ce).__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__)!=null||(yA.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__=null);var wA,EA;(EA=(wA=Ce).__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__)!=null||(wA.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__=null),ae(),ae(),ae(),ae(),ae(),ae(),ae();const PPe=Object.freeze(Object.defineProperty({__proto__:null,setupDevToolsPlugin:NO,setupDevtoolsPlugin:NO},Symbol.toStringTag,{value:"Module"}));return NIe});
|