@pksep/yui 0.1.293 → 0.1.294

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.
@@ -1615,7 +1615,7 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
1615
1615
  * Copyright 2024 Hyunje Jun, MDBootstrap and Contributors
1616
1616
  * Licensed under MIT
1617
1617
  */function yl(C){return getComputedStyle(C)}function Di(C,g){for(var I in g){var e=g[I];typeof e=="number"&&(e=e+"px"),C.style[I]=e}return C}function WB(C){var g=document.createElement("div");return g.className=C,g}var HF=typeof Element<"u"&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function na(C,g){if(!HF)throw new Error("No element matching method supported");return HF.call(C,g)}function IZ(C){C.remove?C.remove():C.parentNode&&C.parentNode.removeChild(C)}function fF(C,g){return Array.prototype.filter.call(C.children,function(I){return na(I,g)})}var fe={main:"ps",rtl:"ps__rtl",element:{thumb:function(C){return"ps__thumb-"+C},rail:function(C){return"ps__rail-"+C},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(C){return"ps--active-"+C},scrolling:function(C){return"ps--scrolling-"+C}}},SF={x:null,y:null};function DF(C,g){var I=C.element.classList,e=fe.state.scrolling(g);I.contains(e)?clearTimeout(SF[g]):I.add(e)}function kF(C,g){SF[g]=setTimeout(function(){return C.isAlive&&C.element.classList.remove(fe.state.scrolling(g))},C.settings.scrollingThreshold)}function KOg(C,g){DF(C,g),kF(C,g)}var Ku=function(g){this.element=g,this.handlers={}},FF={isEmpty:{configurable:!0}};Ku.prototype.bind=function(g,I){typeof this.handlers[g]>"u"&&(this.handlers[g]=[]),this.handlers[g].push(I),this.element.addEventListener(g,I,!1)},Ku.prototype.unbind=function(g,I){var e=this;this.handlers[g]=this.handlers[g].filter(function(t){return I&&t!==I?!0:(e.element.removeEventListener(g,t,!1),!1)})},Ku.prototype.unbindAll=function(){for(var g in this.handlers)this.unbind(g)},FF.isEmpty.get=function(){var C=this;return Object.keys(this.handlers).every(function(g){return C.handlers[g].length===0})},Object.defineProperties(Ku.prototype,FF);var CZ=function(){this.eventElements=[]};CZ.prototype.eventElement=function(g){var I=this.eventElements.filter(function(e){return e.element===g})[0];return I||(I=new Ku(g),this.eventElements.push(I)),I},CZ.prototype.bind=function(g,I,e){this.eventElement(g).bind(I,e)},CZ.prototype.unbind=function(g,I,e){var t=this.eventElement(g);t.unbind(I,e),t.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(t),1)},CZ.prototype.unbindAll=function(){this.eventElements.forEach(function(g){return g.unbindAll()}),this.eventElements=[]},CZ.prototype.once=function(g,I,e){var t=this.eventElement(g),i=function(A){t.unbind(I,i),e(A)};t.bind(I,i)};function BB(C){if(typeof window.CustomEvent=="function")return new CustomEvent(C);var g=document.createEvent("CustomEvent");return g.initCustomEvent(C,!1,!1,void 0),g}function pB(C,g,I,e,t){e===void 0&&(e=!0),t===void 0&&(t=!1);var i;if(g==="top")i=["contentHeight","containerHeight","scrollTop","y","up","down"];else if(g==="left")i=["contentWidth","containerWidth","scrollLeft","x","left","right"];else throw new Error("A proper axis should be provided");zOg(C,I,i,e,t)}function zOg(C,g,I,e,t){var i=I[0],A=I[1],n=I[2],s=I[3],o=I[4],a=I[5];e===void 0&&(e=!0),t===void 0&&(t=!1);var d=C.element;C.reach[s]=null,d[n]<1&&(C.reach[s]="start"),d[n]>C[i]-C[A]-1&&(C.reach[s]="end"),g&&(d.dispatchEvent(BB("ps-scroll-"+s)),g<0?d.dispatchEvent(BB("ps-scroll-"+o)):g>0&&d.dispatchEvent(BB("ps-scroll-"+a)),e&&KOg(C,s)),C.reach[s]&&(g||t)&&d.dispatchEvent(BB("ps-"+s+"-reach-"+C.reach[s]))}function ge(C){return parseInt(C,10)||0}function JOg(C){return na(C,"input,[contenteditable]")||na(C,"select,[contenteditable]")||na(C,"textarea,[contenteditable]")||na(C,"button,[contenteditable]")}function xOg(C){var g=yl(C);return ge(g.width)+ge(g.paddingLeft)+ge(g.paddingRight)+ge(g.borderLeftWidth)+ge(g.borderRightWidth)}var eZ={isWebKit:typeof document<"u"&&"WebkitAppearance"in document.documentElement.style,supportsTouch:typeof window<"u"&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:typeof navigator<"u"&&navigator.msMaxTouchPoints,isChrome:typeof navigator<"u"&&/Chrome/i.test(navigator&&navigator.userAgent)};function Ws(C){var g=C.element,I=Math.floor(g.scrollTop),e=g.getBoundingClientRect();C.containerWidth=Math.floor(e.width),C.containerHeight=Math.floor(e.height),C.contentWidth=g.scrollWidth,C.contentHeight=g.scrollHeight,g.contains(C.scrollbarXRail)||(fF(g,fe.element.rail("x")).forEach(function(t){return IZ(t)}),g.appendChild(C.scrollbarXRail)),g.contains(C.scrollbarYRail)||(fF(g,fe.element.rail("y")).forEach(function(t){return IZ(t)}),g.appendChild(C.scrollbarYRail)),!C.settings.suppressScrollX&&C.containerWidth+C.settings.scrollXMarginOffset<C.contentWidth?(C.scrollbarXActive=!0,C.railXWidth=C.containerWidth-C.railXMarginWidth,C.railXRatio=C.containerWidth/C.railXWidth,C.scrollbarXWidth=KF(C,ge(C.railXWidth*C.containerWidth/C.contentWidth)),C.scrollbarXLeft=ge((C.negativeScrollAdjustment+g.scrollLeft)*(C.railXWidth-C.scrollbarXWidth)/(C.contentWidth-C.containerWidth))):C.scrollbarXActive=!1,!C.settings.suppressScrollY&&C.containerHeight+C.settings.scrollYMarginOffset<C.contentHeight?(C.scrollbarYActive=!0,C.railYHeight=C.containerHeight-C.railYMarginHeight,C.railYRatio=C.containerHeight/C.railYHeight,C.scrollbarYHeight=KF(C,ge(C.railYHeight*C.containerHeight/C.contentHeight)),C.scrollbarYTop=ge(I*(C.railYHeight-C.scrollbarYHeight)/(C.contentHeight-C.containerHeight))):C.scrollbarYActive=!1,C.scrollbarXLeft>=C.railXWidth-C.scrollbarXWidth&&(C.scrollbarXLeft=C.railXWidth-C.scrollbarXWidth),C.scrollbarYTop>=C.railYHeight-C.scrollbarYHeight&&(C.scrollbarYTop=C.railYHeight-C.scrollbarYHeight),TOg(g,C),C.scrollbarXActive?g.classList.add(fe.state.active("x")):(g.classList.remove(fe.state.active("x")),C.scrollbarXWidth=0,C.scrollbarXLeft=0,g.scrollLeft=C.isRtl===!0?C.contentWidth:0),C.scrollbarYActive?g.classList.add(fe.state.active("y")):(g.classList.remove(fe.state.active("y")),C.scrollbarYHeight=0,C.scrollbarYTop=0,g.scrollTop=0)}function KF(C,g){return C.settings.minScrollbarLength&&(g=Math.max(g,C.settings.minScrollbarLength)),C.settings.maxScrollbarLength&&(g=Math.min(g,C.settings.maxScrollbarLength)),g}function TOg(C,g){var I={width:g.railXWidth},e=Math.floor(C.scrollTop);g.isRtl?I.left=g.negativeScrollAdjustment+C.scrollLeft+g.containerWidth-g.contentWidth:I.left=C.scrollLeft,g.isScrollbarXUsingBottom?I.bottom=g.scrollbarXBottom-e:I.top=g.scrollbarXTop+e,Di(g.scrollbarXRail,I);var t={top:e,height:g.railYHeight};g.isScrollbarYUsingRight?g.isRtl?t.right=g.contentWidth-(g.negativeScrollAdjustment+C.scrollLeft)-g.scrollbarYRight-g.scrollbarYOuterWidth-9:t.right=g.scrollbarYRight-C.scrollLeft:g.isRtl?t.left=g.negativeScrollAdjustment+C.scrollLeft+g.containerWidth*2-g.contentWidth-g.scrollbarYLeft-g.scrollbarYOuterWidth:t.left=g.scrollbarYLeft+C.scrollLeft,Di(g.scrollbarYRail,t),Di(g.scrollbarX,{left:g.scrollbarXLeft,width:g.scrollbarXWidth-g.railBorderXWidth}),Di(g.scrollbarY,{top:g.scrollbarYTop,height:g.scrollbarYHeight-g.railBorderYWidth})}function LOg(C){C.event.bind(C.scrollbarY,"mousedown",function(g){return g.stopPropagation()}),C.event.bind(C.scrollbarYRail,"mousedown",function(g){var I=g.pageY-window.pageYOffset-C.scrollbarYRail.getBoundingClientRect().top,e=I>C.scrollbarYTop?1:-1;C.element.scrollTop+=e*C.containerHeight,Ws(C),g.stopPropagation()}),C.event.bind(C.scrollbarX,"mousedown",function(g){return g.stopPropagation()}),C.event.bind(C.scrollbarXRail,"mousedown",function(g){var I=g.pageX-window.pageXOffset-C.scrollbarXRail.getBoundingClientRect().left,e=I>C.scrollbarXLeft?1:-1;C.element.scrollLeft+=e*C.containerWidth,Ws(C),g.stopPropagation()})}var YB=null;function vOg(C){zF(C,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"]),zF(C,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"])}function zF(C,g){var I=g[0],e=g[1],t=g[2],i=g[3],A=g[4],n=g[5],s=g[6],o=g[7],a=g[8],d=C.element,m=null,Z=null,b=null;function h(B){B.touches&&B.touches[0]&&(B[t]=B.touches[0]["page"+o.toUpperCase()]),YB===A&&(d[s]=m+b*(B[t]-Z),DF(C,o),Ws(C),B.stopPropagation(),B.preventDefault())}function G(){kF(C,o),C[a].classList.remove(fe.state.clicking),document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",G),document.removeEventListener("touchmove",h),document.removeEventListener("touchend",G),YB=null}function w(B){YB===null&&(YB=A,m=d[s],B.touches&&(B[t]=B.touches[0]["page"+o.toUpperCase()]),Z=B[t],b=(C[e]-C[I])/(C[i]-C[n]),B.touches?(document.addEventListener("touchmove",h,{passive:!1}),document.addEventListener("touchend",G)):(document.addEventListener("mousemove",h),document.addEventListener("mouseup",G)),C[a].classList.add(fe.state.clicking)),B.stopPropagation(),B.cancelable&&B.preventDefault()}C[A].addEventListener("mousedown",w),C[A].addEventListener("touchstart",w)}function jOg(C){var g=C.element,I=function(){return na(g,":hover")},e=function(){return na(C.scrollbarX,":focus")||na(C.scrollbarY,":focus")};function t(i,A){var n=Math.floor(g.scrollTop);if(i===0){if(!C.scrollbarYActive)return!1;if(n===0&&A>0||n>=C.contentHeight-C.containerHeight&&A<0)return!C.settings.wheelPropagation}var s=g.scrollLeft;if(A===0){if(!C.scrollbarXActive)return!1;if(s===0&&i<0||s>=C.contentWidth-C.containerWidth&&i>0)return!C.settings.wheelPropagation}return!0}C.event.bind(C.ownerDocument,"keydown",function(i){if(!(i.isDefaultPrevented&&i.isDefaultPrevented()||i.defaultPrevented)&&!(!I()&&!e())){var A=document.activeElement?document.activeElement:C.ownerDocument.activeElement;if(A){if(A.tagName==="IFRAME")A=A.contentDocument.activeElement;else for(;A.shadowRoot;)A=A.shadowRoot.activeElement;if(JOg(A))return}var n=0,s=0;switch(i.which){case 37:i.metaKey?n=-C.contentWidth:i.altKey?n=-C.containerWidth:n=-30;break;case 38:i.metaKey?s=C.contentHeight:i.altKey?s=C.containerHeight:s=30;break;case 39:i.metaKey?n=C.contentWidth:i.altKey?n=C.containerWidth:n=30;break;case 40:i.metaKey?s=-C.contentHeight:i.altKey?s=-C.containerHeight:s=-30;break;case 32:i.shiftKey?s=C.containerHeight:s=-C.containerHeight;break;case 33:s=C.containerHeight;break;case 34:s=-C.containerHeight;break;case 36:s=C.contentHeight;break;case 35:s=-C.contentHeight;break;default:return}C.settings.suppressScrollX&&n!==0||C.settings.suppressScrollY&&s!==0||(g.scrollTop-=s,g.scrollLeft+=n,Ws(C),t(n,s)&&i.preventDefault())}})}function QOg(C){var g=C.element;function I(A,n){var s=Math.floor(g.scrollTop),o=g.scrollTop===0,a=s+g.offsetHeight===g.scrollHeight,d=g.scrollLeft===0,m=g.scrollLeft+g.offsetWidth===g.scrollWidth,Z;return Math.abs(n)>Math.abs(A)?Z=o||a:Z=d||m,Z?!C.settings.wheelPropagation:!0}function e(A){var n=A.deltaX,s=-1*A.deltaY;return(typeof n>"u"||typeof s>"u")&&(n=-1*A.wheelDeltaX/6,s=A.wheelDeltaY/6),A.deltaMode&&A.deltaMode===1&&(n*=10,s*=10),n!==n&&s!==s&&(n=0,s=A.wheelDelta),A.shiftKey?[-s,-n]:[n,s]}function t(A,n,s){if(!eZ.isWebKit&&g.querySelector("select:focus"))return!0;if(!g.contains(A))return!1;for(var o=A;o&&o!==g;){if(o.classList.contains(fe.element.consuming))return!0;var a=yl(o);if(s&&a.overflowY.match(/(scroll|auto)/)){var d=o.scrollHeight-o.clientHeight;if(d>0&&(o.scrollTop>0&&s<0||o.scrollTop<d&&s>0))return!0}if(n&&a.overflowX.match(/(scroll|auto)/)){var m=o.scrollWidth-o.clientWidth;if(m>0&&(o.scrollLeft>0&&n<0||o.scrollLeft<m&&n>0))return!0}o=o.parentNode}return!1}function i(A){var n=e(A),s=n[0],o=n[1];if(!t(A.target,s,o)){var a=!1;C.settings.useBothWheelAxes?C.scrollbarYActive&&!C.scrollbarXActive?(o?g.scrollTop-=o*C.settings.wheelSpeed:g.scrollTop+=s*C.settings.wheelSpeed,a=!0):C.scrollbarXActive&&!C.scrollbarYActive&&(s?g.scrollLeft+=s*C.settings.wheelSpeed:g.scrollLeft-=o*C.settings.wheelSpeed,a=!0):(g.scrollTop-=o*C.settings.wheelSpeed,g.scrollLeft+=s*C.settings.wheelSpeed),Ws(C),a=a||I(s,o),a&&!A.ctrlKey&&(A.stopPropagation(),A.preventDefault())}}typeof window.onwheel<"u"?C.event.bind(g,"wheel",i):typeof window.onmousewheel<"u"&&C.event.bind(g,"mousewheel",i)}function OOg(C){if(!eZ.supportsTouch&&!eZ.supportsIePointer)return;var g=C.element,I={startOffset:{},startTime:0,speed:{},easingLoop:null};function e(d,m){var Z=Math.floor(g.scrollTop),b=g.scrollLeft,h=Math.abs(d),G=Math.abs(m);if(G>h){if(m<0&&Z===C.contentHeight-C.containerHeight||m>0&&Z===0)return window.scrollY===0&&m>0&&eZ.isChrome}else if(h>G&&(d<0&&b===C.contentWidth-C.containerWidth||d>0&&b===0))return!0;return!0}function t(d,m){g.scrollTop-=m,g.scrollLeft-=d,Ws(C)}function i(d){return d.targetTouches?d.targetTouches[0]:d}function A(d){return d.target===C.scrollbarX||d.target===C.scrollbarY||d.pointerType&&d.pointerType==="pen"&&d.buttons===0?!1:!!(d.targetTouches&&d.targetTouches.length===1||d.pointerType&&d.pointerType!=="mouse"&&d.pointerType!==d.MSPOINTER_TYPE_MOUSE)}function n(d){if(A(d)){var m=i(d);I.startOffset.pageX=m.pageX,I.startOffset.pageY=m.pageY,I.startTime=new Date().getTime(),I.easingLoop!==null&&clearInterval(I.easingLoop)}}function s(d,m,Z){if(!g.contains(d))return!1;for(var b=d;b&&b!==g;){if(b.classList.contains(fe.element.consuming))return!0;var h=yl(b);if(Z&&h.overflowY.match(/(scroll|auto)/)){var G=b.scrollHeight-b.clientHeight;if(G>0&&(b.scrollTop>0&&Z<0||b.scrollTop<G&&Z>0))return!0}if(m&&h.overflowX.match(/(scroll|auto)/)){var w=b.scrollWidth-b.clientWidth;if(w>0&&(b.scrollLeft>0&&m<0||b.scrollLeft<w&&m>0))return!0}b=b.parentNode}return!1}function o(d){if(A(d)){var m=i(d),Z={pageX:m.pageX,pageY:m.pageY},b=Z.pageX-I.startOffset.pageX,h=Z.pageY-I.startOffset.pageY;if(s(d.target,b,h))return;t(b,h),I.startOffset=Z;var G=new Date().getTime(),w=G-I.startTime;w>0&&(I.speed.x=b/w,I.speed.y=h/w,I.startTime=G),e(b,h)&&d.cancelable&&d.preventDefault()}}function a(){C.settings.swipeEasing&&(clearInterval(I.easingLoop),I.easingLoop=setInterval(function(){if(C.isInitialized){clearInterval(I.easingLoop);return}if(!I.speed.x&&!I.speed.y){clearInterval(I.easingLoop);return}if(Math.abs(I.speed.x)<.01&&Math.abs(I.speed.y)<.01){clearInterval(I.easingLoop);return}t(I.speed.x*30,I.speed.y*30),I.speed.x*=.8,I.speed.y*=.8},10))}eZ.supportsTouch?(C.event.bind(g,"touchstart",n),C.event.bind(g,"touchmove",o),C.event.bind(g,"touchend",a)):eZ.supportsIePointer&&(window.PointerEvent?(C.event.bind(g,"pointerdown",n),C.event.bind(g,"pointermove",o),C.event.bind(g,"pointerup",a)):window.MSPointerEvent&&(C.event.bind(g,"MSPointerDown",n),C.event.bind(g,"MSPointerMove",o),C.event.bind(g,"MSPointerUp",a)))}var UOg=function(){return{handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1}},EOg={"click-rail":LOg,"drag-thumb":vOg,keyboard:jOg,wheel:QOg,touch:OOg},zu=function(g,I){var e=this;if(I===void 0&&(I={}),typeof g=="string"&&(g=document.querySelector(g)),!g||!g.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");this.element=g,g.classList.add(fe.main),this.settings=UOg();for(var t in I)this.settings[t]=I[t];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var i=function(){return g.classList.add(fe.state.focus)},A=function(){return g.classList.remove(fe.state.focus)};this.isRtl=yl(g).direction==="rtl",this.isRtl===!0&&g.classList.add(fe.rtl),this.isNegativeScroll=function(){var o=g.scrollLeft,a=null;return g.scrollLeft=-1,a=g.scrollLeft<0,g.scrollLeft=o,a}(),this.negativeScrollAdjustment=this.isNegativeScroll?g.scrollWidth-g.clientWidth:0,this.event=new CZ,this.ownerDocument=g.ownerDocument||document,this.scrollbarXRail=WB(fe.element.rail("x")),g.appendChild(this.scrollbarXRail),this.scrollbarX=WB(fe.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",i),this.event.bind(this.scrollbarX,"blur",A),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var n=yl(this.scrollbarXRail);this.scrollbarXBottom=parseInt(n.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=ge(n.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=ge(n.borderLeftWidth)+ge(n.borderRightWidth),Di(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=ge(n.marginLeft)+ge(n.marginRight),Di(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=WB(fe.element.rail("y")),g.appendChild(this.scrollbarYRail),this.scrollbarY=WB(fe.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",i),this.event.bind(this.scrollbarY,"blur",A),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var s=yl(this.scrollbarYRail);this.scrollbarYRight=parseInt(s.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=ge(s.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?xOg(this.scrollbarY):null,this.railBorderYWidth=ge(s.borderTopWidth)+ge(s.borderBottomWidth),Di(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=ge(s.marginTop)+ge(s.marginBottom),Di(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:g.scrollLeft<=0?"start":g.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:g.scrollTop<=0?"start":g.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(o){return EOg[o](e)}),this.lastScrollTop=Math.floor(g.scrollTop),this.lastScrollLeft=g.scrollLeft,this.event.bind(this.element,"scroll",function(o){return e.onScroll(o)}),Ws(this)};zu.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,Di(this.scrollbarXRail,{display:"block"}),Di(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=ge(yl(this.scrollbarXRail).marginLeft)+ge(yl(this.scrollbarXRail).marginRight),this.railYMarginHeight=ge(yl(this.scrollbarYRail).marginTop)+ge(yl(this.scrollbarYRail).marginBottom),Di(this.scrollbarXRail,{display:"none"}),Di(this.scrollbarYRail,{display:"none"}),Ws(this),pB(this,"top",0,!1,!0),pB(this,"left",0,!1,!0),Di(this.scrollbarXRail,{display:""}),Di(this.scrollbarYRail,{display:""}))},zu.prototype.onScroll=function(g){this.isAlive&&(Ws(this),pB(this,"top",this.element.scrollTop-this.lastScrollTop),pB(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},zu.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),IZ(this.scrollbarX),IZ(this.scrollbarY),IZ(this.scrollbarXRail),IZ(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},zu.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(g){return!g.match(/^ps([-_].+|)$/)}).join(" ")};const POg=l.defineComponent({__name:"PerfectScrollbar",props:{tag:{default:"div"},options:{default:()=>({})}},emits:["scroll","ps-scroll-y","ps-scroll-x","ps-scroll-up","ps-scroll-down","ps-scroll-left","ps-scroll-right","ps-y-reach-start","ps-y-reach-end","ps-x-reach-start","ps-x-reach-end"],setup(C,{expose:g,emit:I}){const e=C,t=I,i=l.ref(null),A=l.ref(null);l.watch(()=>e.options,()=>{s(),n()},{deep:!0}),l.onMounted(()=>{i.value&&n()}),l.onBeforeUnmount(()=>{s()});function n(){i.value&&(A.value=new zu(i.value,e.options),d())}function s(){A.value&&(d(!1),A.value.destroy(),A.value=null)}const o={scroll:a("scroll"),"ps-scroll-y":a("ps-scroll-y"),"ps-scroll-x":a("ps-scroll-x"),"ps-scroll-up":a("ps-scroll-up"),"ps-scroll-down":a("ps-scroll-down"),"ps-scroll-left":a("ps-scroll-left"),"ps-scroll-right":a("ps-scroll-right"),"ps-y-reach-start":a("ps-y-reach-start"),"ps-y-reach-end":a("ps-y-reach-end"),"ps-x-reach-start":a("ps-x-reach-start"),"ps-x-reach-end":a("ps-x-reach-end")};function a(m){return function(Z){t(m,Z)}}function d(m=!0){var Z;(Z=A.value)!=null&&Z.element&&Object.entries(o).forEach(([b,h])=>{var G,w;m?(G=A.value)==null||G.element.addEventListener(b,h):(w=A.value)==null||w.element.removeEventListener(b,h)})}return g({ps:A}),(m,Z)=>(l.openBlock(),l.createBlock(l.resolveDynamicComponent(m.tag),{ref_key:"scrollbar",ref:i,class:"ps"},{default:l.withCtx(()=>[l.renderSlot(m.$slots,"default")]),_:3},512))}}),_Og=["data-testid"],XX=l.defineComponent({__name:"Scrollbar",props:{options:{},tag:{},class:{},style:{},thrumbStyle:{},railStyle:{},dataTestid:{default:"ScrollBar"}},emits:["scroll","ps-scroll-y","ps-scroll-x","ps-scroll-up","ps-scroll-down","ps-scroll-left","ps-scroll-right","ps-y-reach-start","ps-y-reach-end","ps-x-reach-start","ps-x-reach-end"],setup(C,{expose:g,emit:I}){const e=C,t=l.ref(null),i=I,A=d=>{i("scroll",d)},n={attributes:!0,attributeFilter:["style"]},s=(d,m)=>Z=>{for(const b of Z)b.type==="attributes"&&b.attributeName==="style"&&d.style.right!==m&&(d.style.right=m)},o=()=>{var w,B,p,Y,y,R,X,K,D,F,z,v,O,eg,E,T,q,cg,og,Wg,fg,Vg,Bg,kg;if(!t.value)return;const d=t.value.querySelector(".ps__thumb-y"),m=t.value.querySelector(".ps__thumb-x"),Z=t.value.querySelector(".ps__rail-y"),b=t.value.querySelector(".ps__rail-x");d.style.background=((B=(w=e.thrumbStyle)==null?void 0:w.y)==null?void 0:B.background)||"var(--text-brand)",d.style.width=((Y=(p=e.thrumbStyle)==null?void 0:p.y)==null?void 0:Y.width)||"6px",d.style.right="0px",m.style.background=((R=(y=e.thrumbStyle)==null?void 0:y.x)==null?void 0:R.background)||"var(--text-brand)",m.style.width=((K=(X=e.thrumbStyle)==null?void 0:X.x)==null?void 0:K.width)||"6px",m.style.right="0px",Z.style.background=((F=(D=e.railStyle)==null?void 0:D.y)==null?void 0:F.background)||"var(--button-neutral-color)",Z.style.width=((v=(z=e.thrumbStyle)==null?void 0:z.y)==null?void 0:v.width)||"6px",Z.style.right=((eg=(O=e.railStyle)==null?void 0:O.y)==null?void 0:eg.right)||"0px",b.style.background=((T=(E=e.railStyle)==null?void 0:E.x)==null?void 0:T.background)||"var(--button-neutral-color)",b.style.width=((cg=(q=e.thrumbStyle)==null?void 0:q.x)==null?void 0:cg.width)||"6px",b.style.right=((Wg=(og=e.railStyle)==null?void 0:og.x)==null?void 0:Wg.right)||"0px";const h=new MutationObserver(s(Z,((Vg=(fg=e.railStyle)==null?void 0:fg.y)==null?void 0:Vg.right)||"0px")),G=new MutationObserver(s(b,((kg=(Bg=e.railStyle)==null?void 0:Bg.x)==null?void 0:kg.right)||"0px"));h.observe(Z,n),G.observe(b,n)};return l.watch(()=>e,()=>{o()},{immediate:!0}),g({scrollToTop:()=>{t.value&&(t.value.children[0].scrollTop=0)}}),l.onMounted(()=>{o()}),(d,m)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"scrollbar",ref:t,"data-testid":e.dataTestid},[l.createVNode(l.unref(POg),{onScroll:A,options:e.options,tag:e.tag,class:l.normalizeClass(e.class),style:l.normalizeStyle(e.style),"data-testid":`${e.dataTestid}-Scroll`,ref_key:"scrollbar",ref:t},{default:l.withCtx(()=>[l.renderSlot(d.$slots,"default")]),_:3},8,["options","tag","class","style","data-testid"])],8,_Og))}});var yB=(C=>(C.small="small",C.medium="medium",C.big="big",C))(yB||{}),NB=(C=>(C.circled="circled",C.rounded="rounded",C))(NB||{}),JF=(C=>(C.blue="blue",C.red="red",C))(JF||{});const qOg=["data-testid","checked","disabled"],$Og=l.defineComponent({__name:"Checkbox",props:{size:{default:yB.medium},circular:{default:NB.rounded},color:{default:JF.blue},checked:{type:Boolean},modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},dataTestid:{default:"Checkbox"}},emits:["change","update:modelValue"],setup(C,{emit:g}){const I=C,e=g,t=l.reactive({isChecked:I.modelValue});l.watchEffect(()=>{t.isChecked=I.modelValue});const i=()=>{t.isChecked=!t.isChecked,e("change",t.isChecked),e("update:modelValue",t.isChecked)};return(A,n)=>(l.openBlock(),l.createElementBlock("label",{class:l.normalizeClass(`label-checkbox checkbox-yui-kit_${I.size} checkbox-yui-kit_${I.circular} checkbox-yui-kit_${I.color}`)},[l.createElementVNode("input",{type:"checkbox",class:l.normalizeClass("checkbox-yui-kit "),"data-testid":`${I.dataTestid}`,tabindex:"0",onChange:i,checked:t.isChecked,disabled:I.disabled,onKeyup:l.withKeys(i,["enter"])},null,40,qOg),l.createVNode(Yg,{class:"checkbox__icon",name:l.unref(mg).checked},null,8,["name"])],2))}}),RX=vg($Og,[["__scopeId","data-v-e79cdfc4"]]);var ZC=(C=>(C.profile="profile",C.theme="theme",C.options="options",C.exit="exit",C.qrAuth="qr-auth",C.downloadChat="download-chat",C.help="help",C))(ZC||{});const gUg=["data-testid"],IUg=["src","alt"],CUg={key:1,class:"avatar-yui-kit__fallback"},eUg=["src"],tUg={key:1,class:"avatar-yui-kit__text"},MX=new Set,HX=new Set,Ju=vg(l.defineComponent({__name:"Avatar",props:{initials:{},url:{},isIcon:{type:Boolean},alt:{},defaultImage:{},isOnline:{type:Boolean},dataTestid:{}},setup(C){const g=C,I=l.ref(null),e=l.ref(!1),t=l.ref(!1),i=l.computed(()=>g.initials?g.initials.charAt(0).toUpperCase():""),A=["var(--error-color)","var(--orange4)","var(--green2)","var(--blue24)","var(--blue22)","var(--blue4)","var(--violet2)","var(--pink-color)"],n=l.computed(()=>{if(g.defaultImage)return"transparent";if(!i.value)return A[0];const d=i.value.charCodeAt(0);return A[d%A.length]}),s=l.computed(()=>!g.url||!e.value||t.value),o=()=>{g.url&&(MX.add(g.url),HX.delete(g.url)),e.value=!0,t.value=!1},a=()=>{g.url&&(HX.add(g.url),MX.delete(g.url)),t.value=!0,e.value=!1};return l.watch(()=>g.url,async d=>{var m;if(e.value=!1,t.value=!1,!!d){if(MX.has(d)){e.value=!0;return}if(HX.has(d)){t.value=!0;return}await l.nextTick(),(m=I.value)!=null&&m.complete&&I.value.naturalWidth>0&&(e.value=!0)}},{immediate:!0}),(d,m)=>(l.openBlock(),l.createElementBlock("div",{"data-testid":g.dataTestid,class:l.normalizeClass(["avatar-yui-kit",{"is-online":g.isOnline}]),style:l.normalizeStyle({backgroundColor:n.value})},[g.url?(l.openBlock(),l.createElementBlock("img",{key:0,ref_key:"imageRef",ref:I,src:g.url,alt:g.alt,class:l.normalizeClass(["avatar-yui-kit__image",{"is-visible":e.value}]),onLoad:o,onError:a},null,42,IUg)):l.createCommentVNode("",!0),s.value?(l.openBlock(),l.createElementBlock("div",CUg,[g.defaultImage?(l.openBlock(),l.createElementBlock("img",{key:0,src:g.defaultImage,class:"avatar-yui-kit__image avatar-yui-kit__image--default is-visible"},null,8,eUg)):(l.openBlock(),l.createElementBlock("div",tUg,l.toDisplayString(i.value),1))])):l.createCommentVNode("",!0)],14,gUg))}}),[["__scopeId","data-v-fa31dc83"]]),iUg=["data-testid"],AUg={class:"list-yui-kit__item-text"},nUg=vg(l.defineComponent({__name:"MenuItem",props:{active:{type:Boolean},disabled:{type:Boolean},dataTestid:{},iconName:{},text:{},menuType:{}},emits:["click"],setup(C,{emit:g}){const I=g,e=()=>{C.disabled||I("click",C.menuType)};return(t,i)=>(l.openBlock(),l.createElementBlock("li",{class:l.normalizeClass(["list-yui-kit__item",{"list-yui-kit__item--disabled":C.disabled,"list-yui-kit__item--active":C.active}]),onClick:e,"data-testid":C.dataTestid},[l.createVNode(Yg,{name:C.iconName},null,8,["name"]),l.createElementVNode("span",AUg,l.toDisplayString(C.text),1),l.renderSlot(t.$slots,"default",{},void 0,!0)],10,iUg))}}),[["__scopeId","data-v-3da3cf72"]]),lUg={class:"menu-yui-kit__list"},sUg={class:"list-yui-kit"},oUg=vg(l.defineComponent({__name:"UserMenuList",props:{closeAfterClick:{type:Boolean},menuOpen:{type:Boolean},categories:{},texts:{},user:{},languages:{},isBlackTheme:{type:Boolean,default:!1},dataTestid:{default:"UserMenuList"}},emits:["click","unmount-qr-auth","theme-change","languageSwitch"],setup(C,{emit:g}){const I=C,e=g,t=l.ref(null),i=l.ref(I.isBlackTheme);l.watch(()=>I.menuOpen,m=>{m||(t.value=null)});const A=m=>{if(m===ZC.qrAuth){e("unmount-qr-auth");return}e("click",m),m===ZC.theme&&(i.value=!i.value,e("theme-change"))},n=m=>{e("languageSwitch",m)},s=()=>{e("theme-change")},o=m=>({[ZC.profile]:"Profile",[ZC.qrAuth]:"Auth with QR",[ZC.downloadChat]:"Auth with QR",[ZC.theme]:"Theme",[ZC.options]:"Settings",[ZC.exit]:"Log Out",[ZC.help]:"Help"})[m]??"",a=m=>({[ZC.profile]:mg.profile,[ZC.qrAuth]:mg.qrCode,[ZC.downloadChat]:mg.download,[ZC.theme]:mg.darkThemeSwitcher,[ZC.options]:mg.settings,[ZC.exit]:mg.logout,[ZC.help]:mg.help})[m]??mg.profile,d=m=>({[ZC.profile]:"Profile",[ZC.qrAuth]:"QR",[ZC.downloadChat]:"Chat",[ZC.theme]:"Theme",[ZC.options]:"Settings",[ZC.exit]:"Exit",[ZC.help]:"Help"})[m]??m;return(m,Z)=>{var b,h,G;return l.openBlock(),l.createElementBlock("div",lUg,[l.createElementVNode("ul",sUg,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(I.categories,w=>{var B;return l.openBlock(),l.createBlock(nUg,{key:w,"data-testid":`${I.dataTestid}-${d(w)}-Item`,iconName:a(w),text:((B=I.texts)==null?void 0:B[w])??o(w),menuType:w,active:t.value===w,onClick:()=>A(w)},{default:l.withCtx(()=>[w===l.unref(ZC).theme?(l.openBlock(),l.createBlock(wB,{key:0,modelValue:i.value,"onUpdate:modelValue":Z[0]||(Z[0]=p=>i.value=p),disabled:"",onChange:s},null,8,["modelValue"])):l.createCommentVNode("",!0)]),_:2},1032,["data-testid","iconName","text","menuType","active","onClick"])}),128))]),(b=I.languages)!=null&&b.items?(l.openBlock(),l.createBlock(Nw,{key:0,items:(h=I.languages)==null?void 0:h.items,theme:"contrast","default-value":(G=I.languages)==null?void 0:G.defaultValue,onChange:n,"data-testid":`${I.dataTestid}-Language-Switch`},null,8,["items","default-value","data-testid"])):l.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-971715e8"]]),aUg=["data-testid"],dUg={class:"menu-yui-kit__wrapper"},cUg={class:"menu-yui-kit__names"},mUg={class:"menu-yui-kit__name"},rUg={class:"menu-yui-kit__role"},ZUg={key:0,class:"menu-yui-kit__dropdown"},fX=vg(l.defineComponent({__name:"UserMenu",props:{closeAfterClick:{type:Boolean},menuOpen:{type:Boolean},categories:{},texts:{},user:{},languages:{},isBlackTheme:{type:Boolean},dataTestid:{default:"UserMenu"}},emits:["click","unmount-qr-auth","theme-change","languageSwitch"],setup(C,{emit:g}){const I=C,e=l.reactive({isShow:!1,isBlackTheme:I.isBlackTheme??!1}),t=g,i=l.computed(()=>({"menu-yui-kit__heading":!0,"active-yui-kit":e.isShow}));function A(Z){t("click",Z),Z!==ZC.theme&&I.closeAfterClick&&(e.isShow=!1)}const n=l.computed(()=>e.isShow?mg.chevronUp:mg.chevronDown),s=()=>{e.isShow=!e.isShow},o=()=>{e.isShow=!1};function a(){e.isBlackTheme=!e.isBlackTheme,t("theme-change",e.isBlackTheme)}const d=Z=>{I.closeAfterClick&&(e.isShow=!1),t("languageSwitch",Z)},m=()=>{I.closeAfterClick&&(e.isShow=!1),t("unmount-qr-auth")};return(Z,b)=>{var h,G,w;return l.openBlock(),l.createElementBlock("div",{class:"menu-yui-kit","data-testid":I.dataTestid},[l.withDirectives((l.openBlock(),l.createElementBlock("div",dUg,[l.createElementVNode("div",{class:l.normalizeClass(i.value),onClick:s},[l.createVNode(Ju,{class:"menu-yui-kit__avatar",url:(h=I.user)==null?void 0:h.avatar,alt:"user-avatar","data-testid":`${I.dataTestid}-Avatar`},null,8,["url","data-testid"]),l.createElementVNode("div",cUg,[l.createElementVNode("p",mUg,l.toDisplayString((G=I.user)==null?void 0:G.name),1),l.createElementVNode("p",rUg,l.toDisplayString((w=I.user)==null?void 0:w.role),1)]),l.createVNode(nI,{type:l.unref(II).ghost,class:"menu-yui-kit__button","data-testid":`${I.dataTestid}-Toggle`},{default:l.withCtx(()=>[l.createVNode(Yg,{class:"menu-yui-kit__button-icon",name:n.value},null,8,["name"])]),_:1},8,["type","data-testid"])],2),e.isShow?(l.openBlock(),l.createElementBlock("div",ZUg,[l.createVNode(oUg,{"data-testid":`${I.dataTestid}-List`,"is-black-theme":e.isBlackTheme,"menu-open":e.isShow,languages:I.languages,categories:I.categories,texts:I.texts,onClick:A,onThemeChange:a,onLanguageSwitch:d,onUnmountQrAuth:m},null,8,["data-testid","is-black-theme","menu-open","languages","categories","texts"])])):l.createCommentVNode("",!0)])),[[l.unref(To),o,void 0,{bubble:!0}]])],8,aUg)}}}),[["__scopeId","data-v-cc3618cb"]]);var VB=(C=>(C.default="default",C.minor="minor",C))(VB||{});const bUg=["data-testid"],uUg=["data-testid"],hUg=["data-testid"],GUg=["data-testid","placeholder","required","maxlength","readonly"],wUg=l.defineComponent({__name:"Textarea",props:{placeholder:{},inputMessage:{},required:{type:Boolean,default:!1},maxlength:{},modelValue:{default:""},readonly:{type:Boolean,default:!1},type:{default:VB.default},modelModifiers:{default:()=>({})},dataTestid:{default:"Textarea"}},emits:["update:modelValue"],setup(C,{emit:g}){const I=C,e=g,t=l.reactive({isPressed:!1,inputElement:I.modelValue}),i=l.computed(()=>[{pressed:t.isPressed,readonly:I.readonly,[I.type]:!0}]),A=()=>{e("update:modelValue",t.inputElement)},n=()=>{I.readonly||(t.isPressed=!0)},s=()=>{t.isPressed=!1};return l.watch(()=>I.modelValue,o=>{t.inputElement=o}),(o,a)=>(l.openBlock(),l.createElementBlock("fieldset",{class:l.normalizeClass(["input-yui-kit",i.value]),onFocusout:s,"data-testid":I.dataTestid},[I.inputMessage?(l.openBlock(),l.createElementBlock("legend",{key:0,class:"input-yui-kit__legend","data-testid":`${I.dataTestid}-Legend`},[l.createTextVNode(l.toDisplayString(I.inputMessage)+" ",1),I.required?(l.openBlock(),l.createElementBlock("sup",{key:0,class:"input-yui-kit__star","data-testid":`${I.dataTestid}-Legend-Star`},"*",8,hUg)):l.createCommentVNode("",!0)],8,uUg)):l.createCommentVNode("",!0),l.withDirectives(l.createElementVNode("textarea",{"onUpdate:modelValue":a[0]||(a[0]=d=>t.inputElement=d),onFocus:n,onInput:A,"data-testid":`${I.dataTestid}-Textarea`,class:"input-yui-kit__input",placeholder:I.placeholder,required:I.required,maxlength:I.maxlength,readonly:I.readonly},null,40,GUg),[[l.vModelText,t.inputElement]])],42,bUg))}}),SX=vg(wUg,[["__scopeId","data-v-fbef4fcf"]]);var DX=(C=>(C.img="img",C.pdf="pdf",C.docx="docx",C))(DX||{});const WUg=["data-testid"],BUg=["data-testid"],pUg=["src","alt","data-testid"],YUg=["src","data-testid"],yUg=["data-testid"],NUg=["data-testid"],VUg=["data-testid"],kX=vg(l.defineComponent({__name:"Picture",props:{type:{},alt:{},url:{},caption:{},dataTestid:{default:"Picture"}},setup(C){const g=C,I=l.reactive({isLoad:!1,isError:!1}),e=l.computed(()=>I.isError?!1:!g.url||!g.type||g.type==DX.img?!0:Er(g.url)),t=()=>{I.isLoad=!0},i=()=>{I.isError=!0},A=()=>{I.isLoad=!1,I.isError=!1};return l.watch(()=>g.url,()=>{A()}),(n,s)=>(l.openBlock(),l.createElementBlock("figure",{class:"picture-yui-kit","data-testid":g.dataTestid},[g.type==l.unref(DX).img?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createElementVNode("picture",{class:"picture-yui-kit__picture","data-testid":`${g.dataTestid}-Picture`},[!I.isError&&g.url?(l.openBlock(),l.createElementBlock("img",{key:0,class:"picture-yui-kit__picture_image",src:g.url,alt:g.alt,"data-testid":`${g.dataTestid}-Picture-Img`,onLoad:t,onError:i},null,40,pUg)):(l.openBlock(),l.createElementBlock("img",{key:1,src:l.unref(Zs),alt:"not found",class:"picture-yui-kit__picture_image","data-testid":`${g.dataTestid}-Picture-Img`},null,8,YUg))],8,BUg),l.createElementVNode("figcaption",{class:"picture-yui-kit__picture__caption","data-testid":`${g.dataTestid}-Caption`},l.toDisplayString(g.caption),9,yUg)],64)):l.unref(Er)(g.url)?(l.openBlock(),l.createBlock(ws,{key:1,class:"picture-yui-kit__picture_image",src:g.url,page:1,dataTestid:`${g.dataTestid}-PdfPreview`,onLoad:t},null,8,["src","dataTestid"])):(l.openBlock(),l.createElementBlock("div",{key:2,class:"picture-yui-kit__caption","data-testid":`${g.dataTestid}-Caption-Box`},[l.createElementVNode("h4",{class:"picture-yui-kit__caption__title","data-testid":`${g.dataTestid}-Caption-Title`},l.toDisplayString(g.caption),9,VUg)],8,NUg)),!I.isLoad&&e.value?(l.openBlock(),l.createBlock(ku,{key:3,class:"picture-yui-kit__loader"})):l.createCommentVNode("",!0)],8,WUg))}}),[["__scopeId","data-v-2d2ca4d2"]]);var XB=(C=>(C.success="success",C.warning="warning",C.error="error",C.info="info",C))(XB||{}),xF=(C=>(C.success="Успешно",C.warning="Предупреждение",C.error="Ошибка",C.info="Уведомление",C))(xF||{}),TF=(C=>(C[C.success=mg.checkbox]="success",C[C.warning=mg.alertTriangle]="warning",C[C.error=mg.exitCircle]="error",C[C.info=mg.info]="info",C))(TF||{});const XUg=["id","data-testid"],RUg=["data-testid"],MUg=["data-testid"],HUg=["data-testid"],fUg=["data-testid"],SUg=l.defineComponent({__name:"Notification",props:{type:{default:XB.info},title:{},pushKey:{},description:{default:""},timeout:{default:3},showPopover:{type:Boolean,default:!0},dataTestid:{default:"Notification"}},emits:["close"],setup(C,{expose:g,emit:I}){const e=C,t=I,i=l.ref(null);hg(i,"toggle",()=>{e.timeout>0&&setTimeout(()=>{var o;return(o=i.value)==null?void 0:o.hidePopover()},e.timeout*1e3)});const A=()=>(t("close"),"hide"),n=()=>{var o;(o=i.value)==null||o.showPopover()},s=l.reactive({message:{icon:TF[e.type],title:e.title||xF[e.type],description:e.description}});return l.onMounted(()=>{var o;e.showPopover&&((o=i.value)==null||o.showPopover())}),g({showPopover:n}),(o,a)=>(l.openBlock(),l.createElementBlock("div",{popover:"manual",id:e.pushKey.toString(),class:l.normalizeClass(`push-notification-yui-kit push-notification-yui-kit_${e.type}`),"data-testid":e.dataTestid,ref_key:"popover",ref:i},[l.createElementVNode("div",{class:"notification-yui-kit","data-testid":`${e.dataTestid}-Notification`},[l.createElementVNode("div",{class:"notification-yui-kit__block","data-testid":`${e.dataTestid}-Notification-Block`},[l.createVNode(Yg,{name:s.message.icon,class:"notification-yui-kit__block-icon","data-testid":`${e.dataTestid}-Notification-Icon`},null,8,["name","data-testid"]),l.createElementVNode("h4",{class:"notification-yui-kit__block-title","data-testid":`${e.dataTestid}-Notification-Title`},l.toDisplayString(s.message.title),9,HUg),l.createElementVNode("span",{class:"notification-yui-kit__block-text","data-testid":`${e.dataTestid}-Notification-Description`},l.toDisplayString(s.message.description),9,fUg)],8,MUg),l.createVNode(nI,{class:"notification-yui-kit__exit",type:l.unref(II).ghost,popovertarget:e.pushKey.toString(),popovertargetaction:A,"data-testid":`${e.dataTestid}-Notification-Button`},{default:l.withCtx(()=>[l.createVNode(Yg,{name:l.unref(mg).crossSmall,"data-testid":`${e.dataTestid}-Notification-Icon`},null,8,["name","data-testid"])]),_:1},8,["type","popovertarget","data-testid"])],8,RUg)],10,XUg))}}),FX=vg(SUg,[["__scopeId","data-v-1e282a05"]]),KX=l.defineComponent({__name:"CopyIcon",props:{content:{default:""},dataTestid:{default:"CopyIcon"}},setup(C){const g=C,I=()=>{const e=g.content,t=document.createElement("textarea");t.value=e;const i=document.querySelectorAll("dialog[open]"),A=i.length?i[i.length-1]:null;A?A.append(t):document.body.append(t),t.select(),t.setSelectionRange(0,99999),document.execCommand("copy"),t.remove()};return(e,t)=>(l.openBlock(),l.createBlock(Yg,{class:"copy-icon-yui-kit",name:l.unref(mg).copy,"data-testid":g.dataTestid,onClick:I},null,8,["name","data-testid"]))}}),DUg=["data-testid"],kUg=["data-testid"],FUg=["data-testid"],KUg=["data-testid"],zUg=["data-testid"],JUg=["data-testid"],xUg=["data-testid"],TUg=["data-testid"],LUg=["data-testid"],vUg=["data-testid"],jUg=["data-testid"],QUg=["data-testid"],OUg=["data-testid"],UUg=["data-testid"],EUg=l.defineComponent({__name:"FilterTag",props:{title:{},iconName:{default:mg.filter},options:{default:()=>[]},selectedValues:{default:()=>[]},multiply:{type:Boolean,default:!0},maxShowCount:{default:5},showClearButton:{type:Boolean,default:!1},disallowNull:{type:Boolean,default:!1},dataTestid:{default:"FilterTag"}},emits:["change"],setup(C,{emit:g}){const I=C,e=l.reactive({isShow:!1,options:[]}),t=g,i=l.computed(()=>({"filter-yui-kit__wrapper":!0,"active-yui-kit":e.isShow})),A=()=>e.isShow=!e.isShow,n=()=>{e.isShow=!1},s=l.computed(()=>e.options.filter(Z=>Z.chose)),o=l.computed(()=>e.options.filter(Z=>!Z.chose)),a=Z=>{I.disallowNull&&Z.chose||(Z.chose=!Z.chose,I.multiply||(e.options=e.options.map(b=>({...b,chose:Z.value===b.value&&Z.chose}))),e.options.every(b=>b.chose)&&(e.options=e.options.map(b=>({...b,chose:!1}))),t("change",s.value.map(b=>b.value)),e.isShow=!1)},d=()=>{e.options=e.options.map(Z=>({...Z,chose:!1})),e.isShow=!1,t("change",[])},m=()=>{e.options=I.options.map(Z=>({...Z,chose:I.selectedValues.includes(Z.value)})),e.options.every(Z=>Z.chose)&&(e.options=e.options.map(Z=>({...Z,chose:!1})))};return l.watch(()=>[I.options,I.selectedValues],m),l.watch(()=>I.selectedValues,m),l.onMounted(m),(Z,b)=>l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:"filter-yui-kit","data-testid":I.dataTestid},[l.createElementVNode("div",{class:l.normalizeClass(i.value),onClick:A,"data-testid":`${I.dataTestid}-Wrapper`},[I.iconName?(l.openBlock(),l.createBlock(Yg,{key:0,name:I.iconName,"data-testid":`${I.dataTestid}-Icon`},null,8,["name","data-testid"])):l.createCommentVNode("",!0),I.title?(l.openBlock(),l.createElementBlock("span",{key:1,"data-testid":`${I.dataTestid}-Title`},l.toDisplayString(I.title),9,FUg)):l.createCommentVNode("",!0),!s.value.length&&!I.disallowNull?(l.openBlock(),l.createBlock(Ht,{key:2,disabled:"",text:"Все","data-testid":`${I.dataTestid}-Badges-All`},null,8,["data-testid"])):(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:3},l.renderList(s.value.filter((h,G)=>G<I.maxShowCount),(h,G)=>(l.openBlock(),l.createBlock(Ht,{key:h.value,type:h.type,disabled:"","data-testid":`${I.dataTestid}-Badges${G}`,text:h.label},null,8,["type","data-testid","text"]))),128)),I.maxShowCount<s.value.length?(l.openBlock(),l.createElementBlock("div",{key:4,class:"filter-yui-kit__counter","data-testid":`${I.dataTestid}-MaxShowCount-Counter`},[l.createTextVNode(" +"+l.toDisplayString(s.value.length-I.maxShowCount)+" ",1),l.createElementVNode("div",{class:"filter-yui-kit__counter-content","data-testid":`${I.dataTestid}-MaxShowCount-Content`},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.value.filter((h,G)=>G>=I.maxShowCount),(h,G)=>(l.openBlock(),l.createBlock(Ht,{key:h.value,type:h.type,disabled:"",text:h.label,"data-testid":`${I.dataTestid}-MaxShow-Badges${G}`},null,8,["type","text","data-testid"]))),128))],8,zUg)],8,KUg)):l.createCommentVNode("",!0),I.showClearButton&&s.value.length>0?(l.openBlock(),l.createElementBlock("button",{key:5,type:"button",class:"filter-yui-kit__close",onClick:l.withModifiers(d,["stop"]),"data-testid":`${I.dataTestid}-Filter-CloseButton`},[l.createVNode(Yg,{name:l.unref(mg).crossSmall,"data-testid":`${I.dataTestid}-CloseButton-Icon`},null,8,["name","data-testid"])],8,JUg)):l.createCommentVNode("",!0)],10,kUg),e.isShow?(l.openBlock(),l.createElementBlock("div",{key:0,class:"filter-yui-kit__select-wrapper","data-testid":`${I.dataTestid}-Select-Wrapper`},[l.createElementVNode("ul",{class:"filter-yui-kit__select-list selected-yui-kit","data-testid":`${I.dataTestid}-Select-List`},[s.value.length?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("li",{key:0,class:"filter-yui-kit__select-item","data-testid":`${I.dataTestid}-Select-Item`},[l.createVNode(Ht,{disabled:"",text:"Все","data-testid":`${I.dataTestid}-Select-Badges`},null,8,["data-testid"])],8,LUg)),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.value,(h,G)=>(l.openBlock(),l.createElementBlock("li",{class:"filter-yui-kit__select-item",key:h.value,"data-testid":`${I.dataTestid}-Select-Item${G}`},[l.createVNode(Ht,{disabled:!0,choosed:!I.disallowNull&&h.chose,type:h.type,onClick:w=>a(h),text:h.label,"data-testid":`${I.dataTestid}-Select-Badges${G}`},null,8,["choosed","type","onClick","text","data-testid"])],8,vUg))),128))],8,TUg),l.createElementVNode("div",{class:"filter-yui-kit__select__divider","data-testid":`${I.dataTestid}-Select-Divider`},null,8,jUg),e.isShow?(l.openBlock(),l.createElementBlock("ul",{key:0,class:"filter-yui-kit__select-list","data-testid":`${I.dataTestid}-Select-List`},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(o.value,(h,G)=>(l.openBlock(),l.createElementBlock("li",{class:"filter-yui-kit__select-item",key:h.value,"data-testid":`${I.dataTestid}-Select-List${G}`},[l.createVNode(Ht,{disabled:!0,choosed:!1,type:h.type,text:h.label,"data-testid":`${I.dataTestid}-Select-Badges${G}`,onClick:w=>a(h)},null,8,["type","text","data-testid","onClick"])],8,OUg))),128)),C.disallowNull?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("li",{key:0,class:"filter-yui-kit__select-item","data-testid":`${I.dataTestid}-Select-Item`},[s.value.length?(l.openBlock(),l.createBlock(Ht,{key:0,disabled:"","data-testid":`${I.dataTestid}-Select-Badges`,text:"Все",onClick:d},null,8,["data-testid"])):l.createCommentVNode("",!0)],8,UUg))],8,QUg)):l.createCommentVNode("",!0)],8,xUg)):l.createCommentVNode("",!0)],8,DUg)),[[l.unref(To),n,void 0,{bubble:!0}]])}}),zX=vg(EUg,[["__scopeId","data-v-e56b5a22"]]),PUg=["data-testid"],_Ug=["data-testid"],qUg=["data-testid"],$Ug=["data-testid"],JX=vg(l.defineComponent({__name:"CircularProgress",props:{percent:{},dataTestid:{default:"CircularProgress"}},setup(C){const g=C,I=()=>{const e=Math.min(Math.max(g.percent,0),100),t=e/100*360;if(e<=25)return`polygon(50% 50%, 50% 0%, calc(50% + 50% * cos(${t-90}deg)) 0,calc(50% + 50% * cos(${t-90}deg)) calc(50% + 50% * sin(${t-90}deg)), 50% 50%)`;if(e<=50)return`polygon(50% 50%, 50% 0%, 100% 0%, 100% calc(50% + 50% * sin(${t-90}deg)), calc(50% + 50% * cos(${t-90}deg)) calc(50% + 50% * sin(${t-90}deg)), 50% 50%)`;if(e<=75)return`polygon(50% 50%, 50% 0%, 100% 0%, 100% 100%,
1618
- calc(50% + 50% * cos(${t-90}deg)) 100%, calc(50% + 50% * cos(${t-90}deg)) calc(50% + 50% * sin(${t-90}deg)), 50% 50%)`;if(e<=100)return`polygon(50% 50%, 50% 0%, 100% 0%, 100% 100%,0% 100%, 0% calc(50% + 50% * sin(${t-90}deg)), 50% 50%)`};return(e,t)=>g.percent<100?(l.openBlock(),l.createElementBlock("div",{key:0,class:"pie-chart","data-testid":`${g.dataTestid}-PieChart`},[l.createElementVNode("div",{class:"pie-chart-border",style:l.normalizeStyle({"border-color":g.percent<50?"var(--status-errorLight)":"var(--orange-color)"}),"data-testid":`${g.dataTestid}-PieChart-Border`},[l.createElementVNode("div",{class:"sector",style:l.normalizeStyle({clipPath:I(),"background-color":g.percent<50?"var(--status-errorLight)":"var(--orange-color)"}),"data-testid":`${g.dataTestid}-PieChart-Sector`},null,12,qUg)],12,_Ug)],8,PUg)):(l.openBlock(),l.createElementBlock("svg",{key:1,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","data-testid":`${g.dataTestid}-Icon`,xmlns:"http://www.w3.org/2000/svg"},[...t[0]||(t[0]=[l.createElementVNode("path",{d:"M8 1C4.136 1 1 4.136 1 8C1 11.864 4.136 15 8 15C11.864 15 15 11.864 15 8C15 4.136 11.864 1 8 1ZM8 13.6C4.906 13.6 2.4 11.094 2.4 8C2.4 4.906 4.906 2.4 8 2.4C11.094 2.4 13.6 4.906 13.6 8C13.6 11.094 11.094 13.6 8 13.6Z",fill:"#3BC648"},null,-1),l.createElementVNode("circle",{cx:"8",cy:"8",r:"4",transform:"rotate(-180 8 8)",fill:"#3BC648"},null,-1),l.createElementVNode("path",{d:"M10 6L7.5 9.83935L6 8.5",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])],8,$Ug))}}),[["__scopeId","data-v-3a5767de"]]),g7g=["data-testid","aria-label"],I7g=["data-testid"],Zt=vg(l.defineComponent({name:"Tooltip",__name:"Tooltip",props:{hint:{},isShow:{type:Boolean,default:!1},isCanShow:{type:Boolean,default:!0},position:{default:"bottom-center"},size:{default:"small"},type:{default:"black"},hintGap:{},hintClass:{default:""},dataTestid:{default:"Tooltip"}},setup(C){const g=C,I=CSS.supports("top","anchor(bottom)"),e=l.useId(),t=l.computed(()=>`--anchor-tooltip-${e}`),i=l.ref(null),A=l.ref(null),n=l.reactive({isShow:!1}),s=l.computed(()=>g.isCanShow&&(g.isShow||n.isShow)),o=l.computed(()=>[{"tooltip-yui-kit__hint_show":s.value,"tooltip-yui-kit__hint_bottom-center":g.position==="bottom-center","tooltip-yui-kit__hint_bottom-left":g.position==="bottom-left","tooltip-yui-kit__hint_bottom-right":g.position==="bottom-right","tooltip-yui-kit__hint_top-center":g.position==="top-center","tooltip-yui-kit__hint_top-left":g.position==="top-left","tooltip-yui-kit__hint_top-right":g.position==="top-right","tooltip-yui-kit__hint_left-top":g.position==="left-top","tooltip-yui-kit__hint_left-center":g.position==="left-center","tooltip-yui-kit__hint_left-bottom":g.position==="left-bottom","tooltip-yui-kit__hint_right-top":g.position==="right-top","tooltip-yui-kit__hint_right-center":g.position==="right-center","tooltip-yui-kit__hint_right-bottom":g.position==="right-bottom","tooltip-yui-kit__hint_small":g.size==="small","tooltip-yui-kit__hint_medium":g.size==="medium","tooltip-yui-kit__hint_large":g.size==="large","tooltip-yui-kit__hint_black":g.type==="black","tooltip-yui-kit__hint_blue":g.type==="blue","tooltip-yui-kit__hint_white":g.type==="white",[g.hintClass]:!0}]),a=l.computed(()=>{var q;const T=(q=i.value)==null?void 0:q.closest("dialog");return T||"body"}),d=()=>{p()},m=()=>{Y()},Z=()=>{h()},b=l.computed(()=>g.isCanShow?{mouseenter:d,mouseleave:m}:{}),h=()=>{requestAnimationFrame(()=>{if(!i.value||!A.value||!s.value)return;const T={"--hint-top":"anchor(top)","--hint-left":"anchor(left)","--hint-measured-width":"0","--hint-height":"0","--tooltip-width":"0","--tooltip-height":"0","--hint-visibility":"visible"};I||(T["--hint-top"]="0",T["--hint-left"]="0");const q=i.value.getBoundingClientRect(),cg=A.value.getBoundingClientRect();let og=q.top,Wg=q.left;const fg=i.value.closest("dialog");if(fg){const gI=fg.getBoundingClientRect();og=q.top-gI.top,Wg=q.left-gI.left;const qg=fg.scrollTop,UI=fg.scrollLeft;og+=qg,Wg+=UI}const Vg=q.width,Bg=q.height,kg=cg.width,Rg=cg.height;I||(T["--hint-top"]=`${og}px`,T["--hint-left"]=`${Wg}px`),T["--tooltip-width"]=`${Vg}px`,T["--tooltip-height"]=`${Bg}px`,T["--hint-measured-width"]=`${kg}px`,T["--hint-height"]=`${Rg}px`,A.value&&jI(T,A.value)})},G=()=>{requestAnimationFrame(()=>{!A.value||g.hintGap===void 0||!s.value||jI({"--tooltip-hint-gap":g.hintGap+"px"},A.value)})},w=()=>{g.isCanShow&&s.value&&A.value&&(jI({"position-anchor":`${t.value}`},A.value),h())},B=()=>{!g.isCanShow||!i.value||jI({"anchor-name":`${t.value}`},i.value)};l.watch(()=>g.hintGap,()=>{s.value&&G()}),l.watch(()=>g.isCanShow,T=>{if(!T){Y(),O();return}l.nextTick(()=>{B(),s.value&&eg()})});const p=()=>{g.isCanShow&&(n.isShow=!0)},Y=()=>{n.isShow=!1};let y=null,R=null,X=!1;const K=new Set,D=()=>(y||(y=new MutationObserver(()=>{s.value&&h()})),y),F=()=>(R||(R=new ResizeObserver(()=>{var T;if(s.value){if(!((T=i.value)!=null&&T.matches(":hover"))){Y();return}h()}})),R),z=()=>{I||X||(window.addEventListener("scroll",h,!0),window.addEventListener("resize",h),X=!0)},v=()=>{X&&(window.removeEventListener("scroll",h,!0),window.removeEventListener("resize",h),X=!1)},O=()=>{R==null||R.disconnect(),y==null||y.disconnect(),K.clear(),v()},eg=()=>{!g.isCanShow||!s.value||l.nextTick(()=>{!g.isCanShow||!s.value||(B(),w(),G(),A.value&&E(A.value),i.value&&E(i.value),z(),h())})},E=T=>{K.has(T)||(D().observe(T,{childList:!0,attributes:!0,characterData:!0}),F().observe(T),K.add(T))};return l.watch(s,T=>{if(T){eg();return}O()},{flush:"post"}),l.onMounted(()=>{g.isCanShow&&(B(),s.value&&eg())}),l.onUnmounted(()=>{O()}),(T,q)=>(l.openBlock(),l.createElementBlock("div",l.mergeProps({ref_key:"tooltipRef",ref:i,class:"tooltip-yui-kit","data-testid":g.dataTestid,"aria-label":C.hint},l.toHandlers(b.value,!0)),[l.renderSlot(T.$slots,"default",{},void 0,!0),g.isCanShow?(l.openBlock(),l.createBlock(l.Teleport,{key:0,to:a.value},[l.createVNode(l.Transition,{name:"hint-animate",onEnter:Z},{default:l.withCtx(()=>[s.value?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"hintRef",ref:A,class:l.normalizeClass(["tooltip-yui-kit__hint",o.value]),"data-testid":g.dataTestid},l.toDisplayString(C.hint),11,I7g)):l.createCommentVNode("",!0)]),_:1})],8,["to"])):l.createCommentVNode("",!0)],16,g7g))}}),[["__scopeId","data-v-4e84ce69"]]),C7g=["data-testid"],e7g=["data-testid"],t7g=["data-testid"],i7g=["onClick","data-testid"],A7g=l.defineComponent({__name:"Popover",props:{isShow:{type:Boolean},iconName:{default:mg.moreVertical},options:{default:()=>[]},tooltip:{default:""},tooltipPosition:{default:"top-left"},isWCUse:{type:Boolean},translateY:{default:"0"},dataTestid:{default:"Popover"}},emits:["close"],setup(C,{emit:g}){const I=C,e=g,t=l.reactive({isShow:!1}),i=l.computed(()=>{var K;const X=(K=o.value)==null?void 0:K.closest("dialog");return X||"body"}),A=CSS.supports("top","anchor(bottom)"),n=l.useId(),s=l.computed(()=>`--anchor-popover-${n}`),o=l.ref(null),a=l.ref(null),d=l.ref(null),m=l.computed(()=>({"popover-yui-kit__wrapper":!0,"active-yui-kit":t.isShow,"empty-yui-kit":I.options.length===0})),Z=()=>t.isShow=!t.isShow,b=()=>{t.isShow=!1,e("close")},h=X=>{X.function(),b()},G=()=>{requestAnimationFrame(()=>{if(!o.value||!a.value||!t.isShow)return;const X={},K=o.value.getBoundingClientRect(),D=window.pageYOffset||document.documentElement.scrollTop,F=window.pageXOffset||document.documentElement.scrollLeft;let z=K.bottom+D,v=K.left+F;const O=o.value.closest("dialog");if(O){const E=O.getBoundingClientRect();z=K.top-E.top,v=K.left-E.left;const T=O.scrollTop,q=O.scrollLeft;z+=T,v+=q,z+=10}z+=10,X["--popover-top"]=`${z}px`,A||(X["--popover-left"]=`${v}px`),jI(X,a.value),(()=>{if(!a.value)return;const E=a.value.getBoundingClientRect();E.right>window.innerWidth&&(A?X["--popover-right"]="anchor(right) ":X["--popover-right"]=`${K.right-E.width}px`)})(),X["--popover-right"]&&(X.left="auto",jI(X,a.value))})},w=X=>{const K=X.getBoundingClientRect(),D=document.elementFromPoint(K.left,K.top),F=document.elementFromPoint(K.right,K.bottom);!(D&&X.contains(D))&&!(F&&X.contains(F))&&b()},B=new IntersectionObserver(X=>{X.forEach(K=>{K.isIntersecting||b()})}),p=()=>{o.value&&a.value&&(window.addEventListener("scroll",G,!0),window.addEventListener("resize",G))},Y=()=>{o.value&&a.value&&(window.removeEventListener("scroll",G,!0),window.removeEventListener("resize",G))},y=()=>{o.value&&window.addEventListener("scroll",w.bind(null,o.value),!0)},R=()=>{o.value&&window.removeEventListener("scroll",w.bind(null,o.value),!0)};return l.watch(()=>I.isShow,()=>t.isShow=I.isShow),l.watch(()=>t.isShow,()=>{t.isShow?(G(),y()):R(),!A&&(t.isShow?p():Y())}),l.onMounted(()=>{o.value&&jI({"anchor-name":`${s.value}`},o.value),a.value&&jI({"position-anchor":`${s.value}`},a.value),d.value&&B.observe(d.value),A||G()}),l.onUnmounted(()=>{B.disconnect(),R(),A||Y()}),(X,K)=>(l.openBlock(),l.createBlock(Zt,{hint:I.tooltip,size:"small",type:"black",position:I.tooltipPosition,"data-testid":I.dataTestid,"is-can-show":!!I.tooltip&&!t.isShow&&I.options.length>0},{default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:"popover-yui-kit",ref_key:"popover",ref:d,"data-testid":`${I.dataTestid}-Popover`},[l.createElementVNode("div",{ref_key:"reference",ref:o,class:l.normalizeClass(m.value),"data-testid":`${I.dataTestid}-PopoverShow`,onClick:Z},[l.renderSlot(X.$slots,"trigger",{},()=>[l.createVNode(Yg,{class:"popover-yui-kit__icon",name:I.iconName,"data-testid":`${I.dataTestid}-PopoverShow-Icon`},null,8,["name","data-testid"])],!0)],10,e7g),(l.openBlock(),l.createBlock(l.Teleport,{to:i.value,disabled:I.isWCUse},[l.createVNode(l.Transition,{name:"popover-animate"},{default:l.withCtx(()=>[l.withDirectives(l.createElementVNode("div",{class:"popover-yui-kit__content",style:l.normalizeStyle({transform:`translateY(${I.translateY})`}),ref_key:"floating",ref:a},[l.renderSlot(X.$slots,"default",{},()=>{var D;return[(D=I.options)!=null&&D.length?(l.openBlock(),l.createElementBlock("div",{key:0,class:"popover-yui-kit__options","data-testid":`${I.dataTestid}-PopoverShow-Options`},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(I.options,(F,z)=>(l.openBlock(),l.createElementBlock("div",{class:"popover-yui-kit__options__item",key:z,style:l.normalizeStyle(F.style),onClick:l.withModifiers(v=>h(F),["stop"]),"data-testid":`${I.dataTestid}-Item${z}`},[F.iconName?(l.openBlock(),l.createBlock(Yg,{key:0,name:F.iconName,"data-testid":`${I.dataTestid}-Item${z}-Icon`},null,8,["name","data-testid"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(F.value),1)],12,i7g))),128))],8,t7g)):l.createCommentVNode("",!0)]},!0)],4),[[l.vShow,t.isShow]])]),_:3})],8,["to","disabled"]))],8,C7g)),[[l.unref(To),b,void 0,{bubble:!0}]])]),_:3},8,["hint","position","data-testid","is-can-show"]))}}),tZ=vg(A7g,[["__scopeId","data-v-869ead7f"]]),n7g=["colspan","rowspan","data-testid"],iZ=vg(l.defineComponent({name:"TableTh",__name:"TableTh",props:{colspan:{default:1},rowspan:{default:1},dataTestid:{default:"DataHeader"}},setup(C){const g=C;return(I,e)=>(l.openBlock(),l.createElementBlock("th",{colspan:C.colspan,rowspan:C.rowspan,"data-testid":g.dataTestid,class:"table-th"},[l.renderSlot(I.$slots,"default",{},void 0,!0)],8,n7g))}}),[["__scopeId","data-v-7ef41ecf"]]),l7g=["data-testid"],xu=vg(l.defineComponent({name:"HeadTableRow",__name:"HeadTableRow",props:{dataTestid:{default:"TableRow"}},setup(C){const g=C;return(I,e)=>(l.openBlock(),l.createElementBlock("tr",{class:"head-table-row","data-testid":g.dataTestid},[l.renderSlot(I.$slots,"default",{},void 0,!0)],8,l7g))}}),[["__scopeId","data-v-b85bc9aa"]]),LF=(C,g,I,e)=>{const t=l.ref(!1),i=l.ref(100);let A=0,n=0;const s=l.computed(()=>[{"scroll-wrapper__track_hide":i.value===100,"scroll-wrapper__track_drag":t.value}]),o=l.computed(()=>i.value<100),a=()=>{if(C.value){const w=C.value.clientWidth,B=C.value.scrollWidth;return w>=B?100:w/B*100}return 100},d=()=>{if(!C.value||!g.value||!I.value||!e.value)return;const{scrollLeft:w,scrollWidth:B,clientWidth:p}=C.value,Y=B-p;if(Y<=0)return;const y=w/Y,R=e.value.clientWidth,X=I.value.clientWidth,K=R-X,D=y*K;requestAnimationFrame(()=>{g.value&&jI({"--scroll-bar-left-position":`${D}px`},g.value)})},m=w=>{!C.value||!g.value||(t.value=!0,A=w.clientX,n=C.value.scrollLeft,document.addEventListener("pointermove",Z),document.addEventListener("pointerup",b,!0))},Z=w=>{if(t.value&&C.value&&I.value){const B=w.clientX-A,p=(C.value.scrollWidth-C.value.clientWidth)/(C.value.clientWidth-I.value.clientWidth);C.value.scrollLeft=n+B*p,d()}},b=()=>{t.value=!1,document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",b,!0)};return{onDrag:Z,onTrackClick:w=>{if(C.value&&I.value){const B=w.currentTarget.getBoundingClientRect(),p=w.clientX-B.left,Y=I.value.clientWidth,y=B.width;let R=(p-Y/2)*((C.value.scrollWidth-C.value.clientWidth)/(y-Y));R=Math.max(0,Math.min(R,C.value.scrollWidth-C.value.clientWidth)),C.value.scrollLeft=R,d()}},startDrag:m,getPercentHorizontalView:a,changeBarPosition:d,isDragging:t,scrollHorizontalWidthPercent:i,setHorizontalBarWidth:()=>{if(!C.value||!g.value)return;const w=a();i.value=w,jI({"--scroll-horizontal-bar-width":`${w}%`},g.value)},horizontalTrackClass:s,isExistHorizontalTrack:o}},vF=(C,g,I,e)=>{const t=l.ref(!1),i=l.ref(100);let A=0,n=0;const s=l.computed(()=>[{"scroll-wrapper__track_hide":i.value===100,"scroll-wrapper__track_drag":t.value}]),o=l.computed(()=>i.value<100),a=()=>{if(C.value){const w=C.value.clientHeight,B=C.value.scrollHeight;if(w>=B)return 100;if(w<B)return w/B*100}return 100},d=()=>{if(!C.value||!g.value||!I.value||!e.value)return;const{scrollTop:w,scrollHeight:B,clientHeight:p}=C.value,Y=B-p;if(Y<=0)return;const y=w/Y,R=e.value.clientHeight,X=I.value.clientHeight,K=R-X,D=y*K;requestAnimationFrame(()=>{g.value&&jI({"--scroll-bar-top-postion":`${D}px`},g.value)})},m=w=>{!C.value||!g.value||(t.value=!0,A=w.clientY,n=C.value.scrollTop,document.addEventListener("pointermove",Z),document.addEventListener("pointerup",b))},Z=w=>{if(t.value&&C.value&&I.value){const B=w.clientY-A,p=(C.value.scrollHeight-C.value.clientHeight)/(C.value.clientHeight-I.value.clientHeight);C.value.scrollTop=n+B*p,d()}},b=()=>{t.value=!1,document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",b)};return{onDrag:Z,onTrackClick:w=>{if(C.value&&I.value){const B=w.currentTarget.getBoundingClientRect(),p=w.clientY-B.top,Y=I.value.clientHeight,y=B.height;let R=(p-Y/2)*((C.value.scrollHeight-C.value.clientHeight)/(y-Y));R=Math.max(0,Math.min(R,C.value.scrollHeight-C.value.clientHeight)),C.value.scrollTop=R,d()}},startDrag:m,getProcentVerticalView:a,changeBarPosition:d,isDragging:t,scrollVerticalHeightProcent:i,setVerticalBarHeight:()=>{if(!C.value||!g.value)return;const w=a();i.value=w,jI({"--scroll-vertical-bar-height":`${w}%`},g.value)},verticalTrackClass:s,isExistVerticalTrack:o}},s7g={class:"scroll-wrapper__vertical-wrapper"},o7g={class:"scroll-wrapper__horizont-wrapper"},Tu=vg(l.defineComponent({name:"ScrollWrapper",__name:"ScrollWrapper",props:{isShowVerticalScroll:{type:Boolean,default:!1},isShowHorizontalScroll:{type:Boolean,default:!1}},emits:["unmount-scroll","unmount-paginate","on-mounted"],setup(C,{expose:g,emit:I}){const e=I,t=l.ref(null),i=l.ref(null),A=l.ref(null),n=l.ref(null),s=l.ref(null),o=l.ref(null),{onTrackClick:a,startDrag:d,changeBarPosition:m,setVerticalBarHeight:Z,verticalTrackClass:b,isExistVerticalTrack:h}=vF(t,i,n,A),{changeBarPosition:G,startDrag:w,onTrackClick:B,setHorizontalBarWidth:p,horizontalTrackClass:Y,isExistHorizontalTrack:y}=LF(t,i,o,s),R=T=>{m(),G(),e("unmount-scroll",T)},X=()=>{requestAnimationFrame(()=>{K(),D()})},K=()=>{if(!t.value||!i.value)return;const T=getComputedStyle(i.value),q=i.value.style.minHeight||T.minHeight,cg=i.value.style.maxHeight||T.maxHeight,og=i.value.style.height;jI({"--scroll-wrapper-height":`${og}`,"--scroll-wrapper-max-height":`${cg}`,"--scroll-wrapper-min-height":`${q}`},i.value)},D=()=>{Z(),p(),m(),G()},F=()=>{t.value&&t.value.addEventListener("scroll",R)},z=()=>{t.value&&(t.value.scrollTop=0)},v=()=>{t.value&&(t.value.scrollHeight<=t.value.clientHeight?e("unmount-paginate",!0):e("unmount-paginate",!1))},O=new MutationObserver(()=>{X(),v()}),eg=new ResizeObserver(()=>{X(),v()}),E=T=>{O.observe(T,{childList:!0,subtree:!0,attributes:!0}),eg.observe(T)};return g({scrollToTop:z,setHeightSlot:K,slotRef:t}),l.onMounted(()=>{X(),F(),i.value&&E(i.value),A.value&&E(A.value),window.addEventListener("resize",X),e("on-mounted")}),l.onUnmounted(()=>{window.removeEventListener("resize",X)}),(T,q)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"scrollWrapperRef",ref:i,class:"scroll-wrapper"},[l.createElementVNode("div",s7g,[l.createElementVNode("div",o7g,[l.createElementVNode("div",{ref_key:"slotRef",ref:t,class:"scroll-wrapper__slot"},[l.renderSlot(T.$slots,"default",{},void 0,!0)],512),l.unref(y)||C.isShowHorizontalScroll?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"horizontTrackRef",ref:s,class:l.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_horizont",l.unref(Y)]),onClick:q[1]||(q[1]=l.withModifiers((...cg)=>l.unref(B)&&l.unref(B)(...cg),["self","prevent","left"]))},[l.createElementVNode("div",{ref_key:"horizontBarRef",ref:o,class:"scroll-wrapper__bar",onPointerdown:q[0]||(q[0]=l.withModifiers((...cg)=>l.unref(w)&&l.unref(w)(...cg),["prevent","left"]))},null,544)],2)):l.createCommentVNode("",!0)]),l.unref(h)||C.isShowVerticalScroll?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"verticalTrackRef",ref:A,class:l.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_vertical",l.unref(b)]),onClick:q[3]||(q[3]=l.withModifiers((...cg)=>l.unref(a)&&l.unref(a)(...cg),["self","prevent","left"]))},[l.createElementVNode("div",{ref_key:"verticalBarRef",ref:n,class:"scroll-wrapper__bar",onPointerdown:q[2]||(q[2]=l.withModifiers((...cg)=>l.unref(d)&&l.unref(d)(...cg),["prevent","left"]))},null,544)],2)):l.createCommentVNode("",!0)])],512))}}),[["__scopeId","data-v-5a7ca6f4"]]),a7g=["id","data-testid"],d7g=["id","data-testid"],c7g=["id","data-testid"],m7g={key:0,class:"table__error-wrapper"},r7g={class:"table__error-content"},Z7g={class:"table__wrapper"},xX=vg(l.defineComponent({name:"YTable",__name:"Table",props:{tableId:{},search:{},tbodyId:{},theadId:{},columnCount:{},isError:{type:Boolean,default:!1},onErrorHandler:{},errorLabel:{default:"Обновить таблицу"},dataTestid:{default:"Table"},isShowVerticalScroll:{type:Boolean,default:!1},isShowHorizontalScroll:{type:Boolean,default:!1}},emits:["unmount-scroll","unmount-paginate"],setup(C,{expose:g,emit:I}){var p;const e=C,t=I,i=l.reactive({headHeight:0,maxColumnCount:0}),A=l.ref(null),n=l.ref(null),s=l.ref(null),o=l.ref(null),a=l.ref(null),d=Y=>{e.isError||t("unmount-scroll",Y)},m=Y=>{e.isError||t("unmount-paginate",Y)},Z=()=>{if(!A.value||!a.value)return;const Y=A.value.querySelector("thead");if(!Y)return;const y=Y.getBoundingClientRect().height;i.headHeight=y,jI({"--scroll-track-margin-top":`${y}px`},a.value.$el)},b=()=>{a.value&&a.value.scrollToTop()},h=()=>{if(a.value&&o.value){const Y=getComputedStyle(a.value.$el),y=Number(Y.minHeight.replace(/\D/g,""));if(y&&y>0)return;jI({"min-height":`${i.headHeight+108}px`},a.value.$el)}},G=()=>{let Y=1;if(n.value){for(let y=0;y<n.value.children.length;y++)Y=Math.max(n.value.children[y].children.length,Y);i.maxColumnCount=Y}},w=new MutationObserver(()=>{G()}),B=new ResizeObserver(()=>{Z()});return g({scrollToTop:b,setHeightSlot:(p=a.value)==null?void 0:p.setHeightSlot,scrollWrapperRef:a,tbodyRef:s,tableRef:A,theadRef:n}),l.onMounted(()=>{Z(),G(),window.addEventListener("resize",Z),A.value&&B.observe(A.value),n.value&&w.observe(n.value,{childList:!0,subtree:!0}),h()}),(Y,y)=>(l.openBlock(),l.createBlock(Tu,{ref_key:"scrollWrapperRef",ref:a,class:"table",onUnmountScroll:d,onUnmountPaginate:m,"is-show-vertical-scroll":e.isShowVerticalScroll,"is-show-horizontal-scroll":e.isShowHorizontalScroll,"data-testid":`${e.dataTestid}-ScrollWrapper`},{default:l.withCtx(()=>[l.createElementVNode("table",{ref_key:"tableRef",ref:A,id:e.tableId,class:"table__table","data-testid":`${e.dataTestid}`},[l.renderSlot(Y.$slots,"default",{},()=>{var R;return[l.createElementVNode("colgroup",null,[l.renderSlot(Y.$slots,"colspan",{},void 0,!0)]),Y.$slots.head?(l.openBlock(),l.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:n,id:e.theadId,class:"table__head","data-testid":`${e.dataTestid}-Thead`},[l.renderSlot(Y.$slots,"head",{},void 0,!0),Y.$slots.search?(l.openBlock(),l.createBlock(xu,{key:0,class:"table__search-tr",id:(R=e.search)==null?void 0:R.rowId,ref_key:"searchRowRef",ref:o,"data-testid":`${e.dataTestid}-Search-Row`},{default:l.withCtx(()=>{var X;return[l.createVNode(iZ,{colspan:e.columnCount||i.maxColumnCount,class:"table__search-th",id:(X=e.search)==null?void 0:X.headId,"data-testid":`${e.dataTestid}-SearchRow-Search`},{default:l.withCtx(()=>[l.renderSlot(Y.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","id","data-testid"])]}),_:3},8,["id","data-testid"])):l.createCommentVNode("",!0)],8,d7g)):l.createCommentVNode("",!0),C.isError?l.createCommentVNode("",!0):l.renderSlot(Y.$slots,"body-group",{key:1},()=>[Y.$slots.body?(l.openBlock(),l.createElementBlock("tbody",{key:0,id:e.tbodyId,ref_key:"tbodyRef",ref:s,class:"table__body","data-testid":`${e.dataTestid}-Tbody`},[l.renderSlot(Y.$slots,"body",{},void 0,!0)],8,c7g)):l.createCommentVNode("",!0)],!0)]},!0)],8,a7g),e.isError?(l.openBlock(),l.createElementBlock("div",m7g,[l.createElementVNode("div",r7g,[l.createVNode(Yg,{class:"table__error-icon",width:112,height:100,name:l.unref(mg).tableError},null,8,["name"]),y[0]||(y[0]=l.createElementVNode("div",{class:"table__error-header"},"Таблица не загрузилась",-1)),y[1]||(y[1]=l.createElementVNode("div",{class:"table__error-text"}," Не удалось получить данные. Проверьте соединение с интернетом или попробуйте обновить таблицу ",-1))]),l.renderSlot(Y.$slots,"error-button",{},()=>[C.onErrorHandler?(l.openBlock(),l.createBlock(nI,{key:0,class:"table__error-button",size:l.unref(YI).small,onClick:C.onErrorHandler},{"left-icon":l.withCtx(()=>[l.createElementVNode("div",Z7g,[l.createVNode(Yg,{name:l.unref(mg).rearrange,width:16,height:16},null,8,["name"])])]),default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(C.errorLabel),1)]),_:1},8,["size","onClick"])):l.createCommentVNode("",!0)],!0)])):l.createCommentVNode("",!0)]),_:3},8,["is-show-vertical-scroll","is-show-horizontal-scroll","data-testid"]))}}),[["__scopeId","data-v-0593ff94"]]),b7g=["rowspan","colspan","data-testid"],Lu=l.defineComponent({name:"TableTd",__name:"TableTd",props:{colspan:{default:1},rowspan:{default:1},dataTestid:{default:"DataCell"}},setup(C){const g=C;return(I,e)=>(l.openBlock(),l.createElementBlock("td",{rowspan:C.rowspan,colspan:C.colspan,class:"table-td","data-testid":g.dataTestid},[l.renderSlot(I.$slots,"default")],8,b7g))}}),u7g={class:"skeleton"},RB=vg(l.defineComponent({name:"Skeleton",__name:"Skeleton",setup(C){return(g,I)=>(l.openBlock(),l.createElementBlock("div",u7g))}}),[["__scopeId","data-v-f0b64f04"]]),h7g=["data-testid"],MB=vg(l.defineComponent({name:"TableRow",__name:"TableRow",props:{type:{default:"default"},isObserved:{type:Boolean,default:!1},observer:{},scrolledElement:{},dataTestid:{},colspan:{default:1},rowspan:{default:1}},setup(C){const g=C,I=l.reactive({isShow:!g.isObserved,observer:null}),e=l.ref(null),t=l.computed(()=>[{"table-row_active":g.type==="selected","table-row_is-stub":g.isObserved}]),i=()=>{const n=new IntersectionObserver(s=>{s.forEach(o=>{o.isIntersecting&&(I.isShow=!0,n.unobserve(o.target))})},{root:g.scrolledElement,rootMargin:"600px"});return n},A=()=>{g.isObserved&&e.value&&(I.observer=i(),I.observer.observe(e.value))};return l.watch(()=>g.scrolledElement,()=>{var n;(n=I.observer)==null||n.disconnect(),A()}),l.onMounted(()=>{A()}),l.onUnmounted(()=>{var n;(n=I.observer)==null||n.disconnect()}),(n,s)=>(l.openBlock(),l.createElementBlock("tr",{ref_key:"row",ref:e,class:l.normalizeClass(["table-row",t.value]),"data-testid":g.dataTestid},[I.isShow?l.renderSlot(n.$slots,"default",{key:0},void 0,!0):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[n.$slots.skeleton?l.renderSlot(n.$slots,"skeleton",{key:0},void 0,!0):(l.openBlock(),l.createBlock(Lu,{key:1,class:"table-row__td table-row__td_stub",colspan:g.colspan,rowspan:g.rowspan},{default:l.withCtx(()=>[l.createVNode(RB,{class:"table-row__skeleton"})]),_:1},8,["colspan","rowspan"]))],64))],10,h7g))}}),[["__scopeId","data-v-0250f09b"]]),TX=vg(l.defineComponent({name:"SectionTableRow",__name:"SectionTableRow",props:{colspan:{},dataTestid:{default:"SectionTableRow"}},setup(C){const g=C;return(I,e)=>(l.openBlock(),l.createBlock(MB,{class:"section-table-row","data-testid":g.dataTestid},{default:l.withCtx(()=>[l.createVNode(Lu,{colspan:C.colspan,class:"section-table-row__td","data-testid":`${g.dataTestid}-DataCell`},{default:l.withCtx(()=>[l.renderSlot(I.$slots,"default",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"]))}}),[["__scopeId","data-v-6434dd04"]]),G7g=["disabled","name","value","data-testid"],LX=vg(l.defineComponent({name:"Radio",__name:"Radio",props:l.mergeModels({name:{},value:{},disabled:{type:Boolean,default:!1},dataTestid:{default:"Radio"}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(C){const g=C,I=l.useModel(C,"modelValue");return(e,t)=>l.withDirectives((l.openBlock(),l.createElementBlock("input",{"onUpdate:modelValue":t[0]||(t[0]=i=>I.value=i),type:"radio",disabled:C.disabled,name:C.name,value:C.value,class:"radio","data-testid":g.dataTestid},null,8,G7g)),[[l.vModelRadio,I.value]])}}),[["__scopeId","data-v-43bb3ae4"]]),w7g=["data-testid"],W7g=["data-testid"],jF=vg(l.defineComponent({name:"ChoosenMiniOptions",__name:"ChoosenMiniOptions",props:{options:{},dataTestid:{default:"ChoosenMiniOptions"}},emits:["remove"],setup(C,{emit:g}){const I=C,e=g,t=i=>{e("remove",i)};return(i,A)=>(l.openBlock(),l.createElementBlock("div",{class:"choosen-mini-options","data-testid":I.dataTestid},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(C.options,(n,s)=>(l.openBlock(),l.createElementBlock("div",{key:n.key,class:"choosen-mini-options__option","data-testid":`${I.dataTestid}-Option-Item${s}`},[l.createVNode(Ht,{"data-testid":`${I.dataTestid}-Badge${s}`,type:l.unref(QI).blue,text:l.unref(eN)(n)?n.hint:n.value,class:"choosen-mini-options__badges",disabled:""},null,8,["data-testid","type","text"]),l.createVNode(Yg,{"data-testid":`${I.dataTestid}-Icon${s}`,name:l.unref(mg).crossLarge,width:10,height:10,class:"choosen-mini-options__cross",onClick:o=>t(n.key)},null,8,["data-testid","name","onClick"])],8,W7g))),128))],8,w7g))}}),[["__scopeId","data-v-d27a190a"]]),B7g=["data-testid"],p7g=["data-testid"],Y7g=["data-testid"],y7g=["data-testid"],N7g=["data-testid"],V7g=["data-testid"],vX=vg(l.defineComponent({name:"BaseFilter",__name:"BaseFilter",props:l.mergeModels({options:{},title:{},isSearch:{type:Boolean,default:!1},isPosibleToClear:{type:Boolean,default:!1},isShowMiniOptions:{type:Boolean,default:!1},isUseAnchor:{type:Boolean,default:!0},isOpened:{type:Boolean,default:!1},tooltipPosition:{default:"top-center"},disabled:{type:Boolean,default:!1},onUnmountPagination:{},defaultOption:{default:"Выберите значение"},class:{},dataTestid:{default:"BaseFilter"}},{modelValue:{},modelModifiers:{}}),emits:l.mergeModels(["change","disabled-click","unmount-open","unmount-search","unmount-search-enter","unmount-pagination"],["update:modelValue"]),setup(C,{emit:g}){const I=C,e=l.reactive({isHovered:!1}),t=g,i=l.ref(null),A=l.ref(null),n=l.useModel(C,"modelValue"),s=l.ref(I.isOpened),o=l.computed(()=>[{filter_disabled:I.disabled},I.class]);l.watch(s,()=>{t("unmount-open",s.value),a.value=""}),l.watch(()=>I.isOpened,()=>{if(I.disabled){s.value=!1;return}s.value=I.isOpened}),l.watch(()=>I.onUnmountPagination,()=>{z()});const a=l.ref(""),d=l.computed(()=>{let v=[];return a.value?(jb(I.options)?v=I.options.filter(O=>{var eg;return O.value.toLowerCase().includes(a.value.toLowerCase())||((eg=O==null?void 0:O.hint)==null?void 0:eg.toLowerCase().includes(a.value.toLowerCase()))}):v=I.options.filter(O=>O.value.toLowerCase().includes(a.value.toLowerCase())),v):(jb(I.options),v=I.options,v)}),m=l.computed(()=>{var O;return((O=I.options.find(eg=>Gl.isArray(n.value)?n.value.includes(eg.key):eg.key===String(n.value)))==null?void 0:O.value)||I.defaultOption}),Z=l.computed(()=>I.options.filter(v=>Gl.isArray(n.value)?n.value.includes(v.key)&&v.value!==m.value:v.key===String(n.value))),b=l.computed(()=>I.options.filter(v=>Gl.isArray(n.value)?n.value.includes(v.key)&&v.value===m.value:v.key===String(n.value))),h=l.computed(()=>{var eg,E,T;const v=I.options;let O;return Gl.isArray(n.value)?jb(v)?O=(eg=v.find(q=>q.value===m.value))==null?void 0:eg.hint:O=(E=v.find(q=>q.value===m.value))==null?void 0:E.value:O=(T=v.find(q=>q.key===String(n.value)))==null?void 0:T.value,O||""}),G=()=>{e.isHovered=!0},w=()=>{e.isHovered=!1},B=l.computed(()=>{var v;return jb(I.options)?e.isHovered&&!!h.value:((v=i.value)==null?void 0:v.isSpanOverflow)||!1}),p=l.computed(()=>Gl.isArray(n.value)?I.isPosibleToClear&&n.value.length>0:I.isPosibleToClear&&n.value),Y=l.computed(()=>Gl.isArray(n.value)&&n.value.length>1),y=l.computed(()=>Gl.isArray(n.value)?n.value.length:null),R=v=>{t("disabled-click",v)},X=async v=>{if(I.disabled){s.value=!1;return}if(Gl.isArray(n.value))n.value.includes(v)?n.value=n.value.filter(O=>O!==v):n.value=[...n.value,v];else{let O=I.options.find(eg=>eg.key===v);!O&&jb(I.options)&&(O=I.options.find(eg=>eg.hint===v)),n.value=(O==null?void 0:O.key)||"",s.value=!1}await l.nextTick(),t("change",String(n.value))},K=v=>{if(I.disabled){s.value=!1;return}s.value=v},D=async()=>{I.disabled||(Gl.isArray(n.value)?n.value=[]:n.value="",await l.nextTick(),t("change",n.value))},F=new IntersectionObserver(v=>{v.forEach(O=>{O.isIntersecting&&t("unmount-pagination")})}),z=()=>{A.value&&I.onUnmountPagination&&(F.unobserve(A.value),F.observe(A.value))};return l.onMounted(()=>{z()}),l.onUnmounted(()=>{F.disconnect()}),(v,O)=>(l.openBlock(),l.createBlock(Mr,{"header-classes":"filter__header","options-classes":"filter__options","is-opened":s.value,class:l.normalizeClass(["filter",o.value]),"is-use-anchor":C.isUseAnchor,"data-testid":I.dataTestid,disabled:C.disabled,onChange:K},l.createSlots({header:l.withCtx(()=>[l.renderSlot(v.$slots,"header",{},()=>[l.createElementVNode("span",{class:l.normalizeClass(["filter__header-title",{"filter__header-title__active":s.value}]),"data-testid":`${I.dataTestid}-Title`},l.toDisplayString(C.title),11,B7g),l.createVNode(Zt,{position:C.tooltipPosition,type:"blue","is-can-show":B.value&&!(Y.value&&C.isShowMiniOptions),hint:h.value,class:"filter__header-tooltip","data-testid":`${I.dataTestid}-Tooltip`},{default:l.withCtx(()=>[l.createVNode(Ht,{ref_key:"badgesRef",ref:i,type:C.disabled?l.unref(QI).disabled:m.value===I.defaultOption?l.unref(QI).default:l.unref(QI).blue,class:"filter__options-badge","data-testid":`${I.dataTestid}-Badge`,text:m.value,onMouseenter:G,onMouseleave:w,disabled:""},null,8,["type","data-testid","text"]),Y.value&&C.isShowMiniOptions?(l.openBlock(),l.createElementBlock("div",{key:0,class:"filter__values","data-testid":`${I.dataTestid}-Filter-Value`},[l.createVNode(jF,{"data-testid":`${I.dataTestid}-Filter-Value-MiniOptions`,onClick:O[0]||(O[0]=l.withModifiers(()=>{},["stop"])),options:b.value,onRemove:X},null,8,["data-testid","options"])],8,p7g)):l.createCommentVNode("",!0)]),_:1},8,["position","is-can-show","hint","data-testid"]),y.value&&y.value>1?(l.openBlock(),l.createElementBlock("span",{key:0,class:"filter__count","data-testid":`${I.dataTestid}-Filter-Count`},[l.createTextVNode(" +"+l.toDisplayString(y.value-1)+" ",1),Y.value?(l.openBlock(),l.createElementBlock("div",{key:0,class:"filter__values","data-testid":`${I.dataTestid}-Filter-Values`},[l.createVNode(jF,{onClick:O[1]||(O[1]=l.withModifiers(()=>{},["stop"])),options:Z.value,onRemove:X,"data-testid":`${I.dataTestid}-MiniOptions`},null,8,["options","data-testid"])],8,y7g)):l.createCommentVNode("",!0)],8,Y7g)):l.createCommentVNode("",!0),p.value?(l.openBlock(),l.createElementBlock("span",{key:1,class:"filter__cross",onClick:l.withModifiers(D,["stop"]),"data-testid":`${I.dataTestid}-Filter-Cross`},[l.createVNode(Yg,{name:l.unref(mg).crossLarge,width:16,height:16},null,8,["name"])],8,N7g)):l.createCommentVNode("",!0)],!0)]),options:l.withCtx(()=>[C.isSearch?(l.openBlock(),l.createBlock(du,{key:0,modelValue:a.value,"onUpdate:modelValue":O[2]||(O[2]=eg=>a.value=eg),"show-history":!1,"data-testid":`${I.dataTestid}-Search`,onInput:O[3]||(O[3]=eg=>v.$emit("unmount-search",eg)),onEnter:O[4]||(O[4]=eg=>v.$emit("unmount-search-enter",eg))},null,8,["modelValue","data-testid"])):l.createCommentVNode("",!0),l.createVNode(tN,{"data-testid":`${I.dataTestid}-Options`,class:"filter__options-option",options:d.value,"default-option":m.value,onChange:X,onDisabledClick:R},{default:l.withCtx(()=>[l.createElementVNode("li",{class:"filter__options-underline","data-testid":`${I.dataTestid}-Underline`},[...O[5]||(O[5]=[l.createElementVNode("hr",{class:"filter__options-underline-hr"},null,-1)])],8,V7g)]),_:1},8,["data-testid","options","default-option"]),l.withDirectives(l.createElementVNode("div",{ref_key:"lastOptionRef",ref:A,class:"filter__last-option"},null,512),[[l.vShow,C.onUnmountPagination]])]),_:2},[v.$slots.body?{name:"body",fn:l.withCtx(eg=>[l.renderSlot(v.$slots,"body",{closeOpenList:eg.closeOpenList},void 0,!0)]),key:"0"}:void 0]),1032,["is-opened","class","is-use-anchor","data-testid","disabled"]))}}),[["__scopeId","data-v-69e4b417"]]),X7g=["data-testid"],HB=vg(l.defineComponent({name:"Range",__name:"Range",props:l.mergeModels({min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1},dataTestid:{default:"Range"}},{modelValue:{default:0},modelModifiers:{}}),emits:l.mergeModels(["unmount-change","unmount-input"],["update:modelValue"]),setup(C,{emit:g}){const I=C,e=g,t=l.useModel(C,"modelValue"),i=l.ref(null);l.watch(t,()=>{n()});const A=()=>(t.value-I.min)/(I.max-I.min)*100,n=()=>{requestAnimationFrame(()=>{i.value&&jI({"--progress":A()+"%"},i.value)})},s=a=>{const d=a.target;d&&e("unmount-change",Number(d.value))},o=a=>{const d=a.target;d&&e("unmount-change",Number(d.value))};return l.onMounted(()=>{n()}),(a,d)=>l.withDirectives((l.openBlock(),l.createElementBlock("input",l.mergeProps({ref_key:"input",ref:i,type:"range"},I,{class:"range","onUpdate:modelValue":d[0]||(d[0]=m=>t.value=m),onChange:s,onInput:o,"data-testid":I.dataTestid}),null,16,X7g)),[[l.vModelText,t.value]])}}),[["__scopeId","data-v-8a0e1679"]]),R7g=["id","data-testid"],M7g=["data-testid"],H7g=["data-testid"],jX=vg(l.defineComponent({name:"TableNew",__name:"TableNew",props:{tableId:{},search:{},tbodyId:{},theadId:{},columnCount:{},isError:{type:Boolean},onErrorHandler:{},errorLabel:{},dataTestid:{default:"Table"},isShowVerticalScroll:{type:Boolean,default:!1},isShowHorizontalScroll:{type:Boolean,default:!1}},emits:["unmount-scroll","unmount-paginate"],setup(C,{expose:g,emit:I}){var B;const e=C,t=I,i=l.reactive({headHeight:0,maxColumnCount:0}),A=l.ref(null),n=l.ref(null),s=l.ref(null),o=l.ref(null),a=l.ref(null),d=p=>{t("unmount-scroll",p)},m=()=>{if(!A.value||!a.value)return;const p=A.value.querySelector("thead");if(!p)return;const Y=p.getBoundingClientRect().height;i.headHeight=Y,jI({"--scroll-track-margin-top":`${Y}px`},a.value.$el)},Z=()=>{a.value&&a.value.scrollToTop()},b=()=>{if(a.value&&o.value){const p=getComputedStyle(a.value.$el),Y=Number(p.minHeight.replace(/\D/g,""));if(Y&&Y>0)return;jI({"min-height":`${i.headHeight+108}px`},a.value.$el)}},h=()=>{let p=1;if(n.value){for(let Y=0;Y<n.value.children.length;Y++)p=Math.max(n.value.children[Y].children.length,p);i.maxColumnCount=p}},G=new MutationObserver(()=>{h()}),w=new ResizeObserver(()=>{m()});return g({scrollToTop:Z,setHeightSlot:(B=a.value)==null?void 0:B.setHeightSlot,tbodyRef:s,tableRef:A,theadRef:n}),l.onMounted(()=>{m(),h(),window.addEventListener("resize",m),A.value&&w.observe(A.value),n.value&&G.observe(n.value,{childList:!0,subtree:!0}),b()}),(p,Y)=>(l.openBlock(),l.createBlock(Tu,{ref_key:"scrollWrapperRef",ref:a,class:"table",onUnmountScroll:d,"is-show-vertical-scroll":e.isShowVerticalScroll,"is-show-horizontal-scroll":e.isShowHorizontalScroll,"data-testid":`${e.dataTestid}-ScrollWrapper`},{default:l.withCtx(()=>[l.createElementVNode("table",{ref_key:"tableRef",ref:A,id:e.tableId,class:"table__table","data-testid":`${e.dataTestid}`},[l.renderSlot(p.$slots,"default",{},()=>[l.createElementVNode("colgroup",null,[l.renderSlot(p.$slots,"colspan",{},void 0,!0)]),p.$slots.head?(l.openBlock(),l.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:n,class:"table__head","data-testid":`${e.dataTestid}-Thead`},[l.renderSlot(p.$slots,"head",{},void 0,!0),p.$slots.search?(l.openBlock(),l.createBlock(xu,{key:0,class:"table__search-tr",ref_key:"searchRowRef",ref:o,"data-testid":`${e.dataTestid}-Search-Row`},{default:l.withCtx(()=>[l.createVNode(iZ,{colspan:i.maxColumnCount,class:"table__search-th","data-testid":`${e.dataTestid}-SearchRow-Search`},{default:l.withCtx(()=>[l.renderSlot(p.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"])):l.createCommentVNode("",!0)],8,M7g)):l.createCommentVNode("",!0),l.renderSlot(p.$slots,"body-group",{},()=>[p.$slots.body?(l.openBlock(),l.createElementBlock("tbody",{key:0,ref_key:"tbodyRef",ref:s,class:"table__body","data-testid":`${e.dataTestid}-Tbody`},[l.renderSlot(p.$slots,"body",{},void 0,!0)],8,H7g)):l.createCommentVNode("",!0)],!0)],!0)],8,R7g)]),_:3},8,["is-show-vertical-scroll","is-show-horizontal-scroll","data-testid"]))}}),[["__scopeId","data-v-114a4670"]]),f7g=["data-testid"],QX=vg(l.defineComponent({name:"TableRow",__name:"TableRowNew",props:{type:{default:"default"},isObserved:{type:Boolean},observer:{},scrolledElement:{},dataTestid:{},colspan:{default:1},rowspan:{}},setup(C){const g=C,I=l.computed(()=>[{"table-row_active":g.type==="selected"}]);return(e,t)=>(l.openBlock(),l.createElementBlock("tr",{class:l.normalizeClass(["table-row",I.value]),"data-testid":g.dataTestid},[l.renderSlot(e.$slots,"default",{},void 0,!0)],10,f7g))}}),[["__scopeId","data-v-c206465d"]]),S7g=["data-testid"],fB=vg(l.defineComponent({name:"HeadTableRow",__name:"HeadTableRowNew",props:{dataTestid:{default:"TableRow"}},setup(C){const g=C;return(I,e)=>(l.openBlock(),l.createElementBlock("tr",{class:"head-table-row","data-testid":g.dataTestid},[l.renderSlot(I.$slots,"default",{},void 0,!0)],8,S7g))}}),[["__scopeId","data-v-3c1412bd"]]),D7g={class:"scroll-wrapper__vertical-wrapper"},k7g={class:"scroll-wrapper__horizont-wrapper"},F7g=vg(l.defineComponent({name:"ScrollWrapper",__name:"ScrollWrapperNew",props:{isShowVerticalScroll:{type:Boolean,default:!1},isShowHorizontalScroll:{type:Boolean,default:!1}},emits:["unmount-scroll","unmount-paginate","on-mounted"],setup(C,{expose:g,emit:I}){const e=I,t=l.ref(null),i=l.ref(null),A=l.ref(null),n=l.ref(null),s=l.ref(null),o=l.ref(null),{onTrackClick:a,startDrag:d,changeBarPosition:m,setVerticalBarHeight:Z,verticalTrackClass:b,isExistVerticalTrack:h}=vF(t,i,n,A),{changeBarPosition:G,startDrag:w,onTrackClick:B,setHorizontalBarWidth:p,horizontalTrackClass:Y,isExistHorizontalTrack:y}=LF(t,i,o,s),R=E=>{m(),G(),e("unmount-scroll",E)},X=()=>{requestAnimationFrame(()=>{K(),D()})},K=()=>{if(!t.value||!i.value)return;const E=getComputedStyle(i.value),T=i.value.style.minHeight||E.minHeight,q=i.value.style.maxHeight||E.maxHeight,cg=i.value.style.height;jI({"--scroll-wrapper-height":`${cg}`,"--scroll-wrapper-max-height":`${q}`,"--scroll-wrapper-min-height":`${T}`},i.value)},D=()=>{Z(),p(),m(),G()},F=()=>{t.value&&t.value.addEventListener("scroll",R)},z=()=>{t.value&&(t.value.scrollTop=0)},v=new MutationObserver(()=>{X()}),O=new ResizeObserver(()=>{X()}),eg=E=>{v.observe(E,{childList:!0,subtree:!0,attributes:!0}),O.observe(E)};return g({scrollToTop:z,setHeightSlot:K}),l.onMounted(()=>{X(),F(),i.value&&eg(i.value),A.value&&eg(A.value),window.addEventListener("resize",X),e("on-mounted")}),l.onUnmounted(()=>{window.removeEventListener("resize",X)}),(E,T)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"scrollWrapperRef",ref:i,class:"scroll-wrapper"},[l.createElementVNode("div",D7g,[l.createElementVNode("div",k7g,[l.createElementVNode("div",{ref_key:"slotRef",ref:t,class:"scroll-wrapper__slot"},[l.renderSlot(E.$slots,"default",{},void 0,!0)],512),l.unref(y)||C.isShowHorizontalScroll?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"horizontTrackRef",ref:s,class:l.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_horizont",l.unref(Y)]),onClick:T[1]||(T[1]=l.withModifiers((...q)=>l.unref(B)&&l.unref(B)(...q),["prevent","left"]))},[l.createElementVNode("div",{ref_key:"horizontBarRef",ref:o,class:"scroll-wrapper__bar",onMousedown:T[0]||(T[0]=l.withModifiers((...q)=>l.unref(w)&&l.unref(w)(...q),["prevent","left"]))},null,544)],2)):l.createCommentVNode("",!0)]),l.unref(h)||C.isShowVerticalScroll?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"verticalTrackRef",ref:A,class:l.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_vertical",l.unref(b)]),onClick:T[3]||(T[3]=l.withModifiers((...q)=>l.unref(a)&&l.unref(a)(...q),["prevent","left"]))},[l.createElementVNode("div",{ref_key:"verticalBarRef",ref:n,class:"scroll-wrapper__bar",onMousedown:T[2]||(T[2]=l.withModifiers((...q)=>l.unref(d)&&l.unref(d)(...q),["prevent","left"]))},null,544)],2)):l.createCommentVNode("",!0)])],512))}}),[["__scopeId","data-v-47c0a1a0"]]),K7g=["data-testid"],z7g=["data-testid"],J7g=["data-testid"],OX=vg(l.defineComponent({name:"TableSimple",__name:"TableSimple",props:{dataTestid:{default:"TableSimple"}},setup(C,{expose:g}){const I=C,e=l.ref(null),t=l.ref(null),i=l.ref(null),A=l.ref(null),n=l.computed(()=>{let s=1;if(t.value)for(let o=0;o<t.value.children.length;o++)s=Math.max(t.value.children[o].children.length,s);return s});return g({tbodyRef:i,tableRef:e,theadRef:t}),(s,o)=>(l.openBlock(),l.createElementBlock("table",{ref_key:"tableRef",ref:e,class:"simple-table-yui-kit","data-testid":`${I.dataTestid}`},[l.renderSlot(s.$slots,"default",{},()=>[l.renderSlot(s.$slots,"colspan",{},void 0,!0),s.$slots.head?(l.openBlock(),l.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:t,class:"simple-table-yui-kit__head","data-testid":`${I.dataTestid}-Thead`},[l.renderSlot(s.$slots,"head",{},void 0,!0),s.$slots.search?(l.openBlock(),l.createBlock(fB,{key:0,class:"table-new-yui-kit__search",ref_key:"searchRowRef",ref:A,"data-testid":`${I.dataTestid}-Search-Row`},{default:l.withCtx(()=>[l.createVNode(iZ,{colspan:n.value,class:"table-new-yui-kit__th","data-testid":`${I.dataTestid}-SearchRow-Search`},{default:l.withCtx(()=>[l.renderSlot(s.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"])):l.createCommentVNode("",!0)],8,z7g)):l.createCommentVNode("",!0),l.renderSlot(s.$slots,"body-group",{},()=>[s.$slots.body?(l.openBlock(),l.createElementBlock("tbody",{key:0,ref_key:"tbodyRef",ref:i,class:"simple-table-yui-kit__body","data-testid":`${I.dataTestid}-Tbody`},[l.renderSlot(s.$slots,"body",{},void 0,!0)],8,J7g)):l.createCommentVNode("",!0)],!0)],!0)],8,K7g))}}),[["__scopeId","data-v-1ea4994c"]]),x7g=["data-testid"],T7g=["data-testid"],L7g=["onClick","data-testid"],v7g=["data-testid"],UX=vg(l.defineComponent({name:"Tabs",__name:"Tabs",props:{defaultActiveTabId:{},tabCount:{},dataTestid:{default:"Tabs"}},emits:["unmount-tab"],setup(C,{emit:g}){const I=C,e=g,t=l.reactive({activeTab:1}),i=n=>Array.from({length:n},(s,o)=>o+1);l.watch(()=>I.defaultActiveTabId,()=>{I.defaultActiveTabId&&(t.activeTab=I.defaultActiveTabId)},{immediate:!0});const A=n=>{t.activeTab=n,e("unmount-tab",n)};return(n,s)=>(l.openBlock(),l.createElementBlock("div",{"data-testid":I.dataTestid,class:"tabs"},[l.createElementVNode("nav",{class:"tabs__navigation","data-testid":`${I.dataTestid}-Navigation`},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i(I.tabCount),o=>(l.openBlock(),l.createElementBlock("button",{key:o,onClick:a=>A(o),class:l.normalizeClass(["tabs__navigation-button",{active:t.activeTab===o}]),"data-testid":`${I.dataTestid}-Navigation-Button`},[l.renderSlot(n.$slots,`header${o}`,{},void 0,!0)],10,L7g))),128))],8,T7g),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i(I.tabCount),o=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:o},[t.activeTab===o?(l.openBlock(),l.createElementBlock("article",{key:0,"data-testid":`${I.dataTestid}-Content`,class:"tabs__navigation-content"},[l.renderSlot(n.$slots,`tab${o}`,{},void 0,!0)],8,v7g)):l.createCommentVNode("",!0)],64))),128))],8,x7g))}}),[["__scopeId","data-v-298e57cf"]]);function bt(C){this.content=C}bt.prototype={constructor:bt,find:function(C){for(var g=0;g<this.content.length;g+=2)if(this.content[g]===C)return g;return-1},get:function(C){var g=this.find(C);return g==-1?void 0:this.content[g+1]},update:function(C,g,I){var e=I&&I!=C?this.remove(I):this,t=e.find(C),i=e.content.slice();return t==-1?i.push(I||C,g):(i[t+1]=g,I&&(i[t]=I)),new bt(i)},remove:function(C){var g=this.find(C);if(g==-1)return this;var I=this.content.slice();return I.splice(g,2),new bt(I)},addToStart:function(C,g){return new bt([C,g].concat(this.remove(C).content))},addToEnd:function(C,g){var I=this.remove(C).content.slice();return I.push(C,g),new bt(I)},addBefore:function(C,g,I){var e=this.remove(g),t=e.content.slice(),i=e.find(C);return t.splice(i==-1?t.length:i,0,g,I),new bt(t)},forEach:function(C){for(var g=0;g<this.content.length;g+=2)C(this.content[g],this.content[g+1])},prepend:function(C){return C=bt.from(C),C.size?new bt(C.content.concat(this.subtract(C).content)):this},append:function(C){return C=bt.from(C),C.size?new bt(this.subtract(C).content.concat(C.content)):this},subtract:function(C){var g=this;C=bt.from(C);for(var I=0;I<C.content.length;I+=2)g=g.remove(C.content[I]);return g},toObject:function(){var C={};return this.forEach(function(g,I){C[g]=I}),C},get size(){return this.content.length>>1}},bt.from=function(C){if(C instanceof bt)return C;var g=[];if(C)for(var I in C)g.push(I,C[I]);return new bt(g)};function QF(C,g,I){for(let e=0;;e++){if(e==C.childCount||e==g.childCount)return C.childCount==g.childCount?null:I;let t=C.child(e),i=g.child(e);if(t==i){I+=t.nodeSize;continue}if(!t.sameMarkup(i))return I;if(t.isText&&t.text!=i.text){let A=t.text,n=i.text,s=0;for(;A[s]==n[s];s++)I++;return s&&s<A.length&&s<n.length&&EF(A.charCodeAt(s-1))&&UF(A.charCodeAt(s))&&I--,I}if(t.content.size||i.content.size){let A=QF(t.content,i.content,I+1);if(A!=null)return A}I+=t.nodeSize}}function OF(C,g,I,e){for(let t=C.childCount,i=g.childCount;;){if(t==0||i==0)return t==i?null:{a:I,b:e};let A=C.child(--t),n=g.child(--i),s=A.nodeSize;if(A==n){I-=s,e-=s;continue}if(!A.sameMarkup(n))return{a:I,b:e};if(A.isText&&A.text!=n.text){let o=A.text,a=n.text,d=o.length,m=a.length;for(;d>0&&m>0&&o[d-1]==a[m-1];)d--,m--,I--,e--;return d&&m&&d<o.length&&EF(o.charCodeAt(d-1))&&UF(o.charCodeAt(d))&&(I++,e++),{a:I,b:e}}if(A.content.size||n.content.size){let o=OF(A.content,n.content,I-1,e-1);if(o)return o}I-=s,e-=s}}function UF(C){return C>=56320&&C<57344}function EF(C){return C>=55296&&C<56320}let Mg=class Vi{constructor(g,I){if(this.content=g,this.size=I||0,I==null)for(let e=0;e<g.length;e++)this.size+=g[e].nodeSize}nodesBetween(g,I,e,t=0,i){for(let A=0,n=0;n<I;A++){let s=this.content[A],o=n+s.nodeSize;if(o>g&&e(s,t+n,i||null,A)!==!1&&s.content.size){let a=n+1;s.nodesBetween(Math.max(0,g-a),Math.min(s.content.size,I-a),e,t+a)}n=o}}descendants(g){this.nodesBetween(0,this.size,g)}textBetween(g,I,e,t){let i="",A=!0;return this.nodesBetween(g,I,(n,s)=>{let o=n.isText?n.text.slice(Math.max(g,s)-s,I-s):n.isLeaf?t?typeof t=="function"?t(n):t:n.type.spec.leafText?n.type.spec.leafText(n):"":"";n.isBlock&&(n.isLeaf&&o||n.isTextblock)&&e&&(A?A=!1:i+=e),i+=o},0),i}append(g){if(!g.size)return this;if(!this.size)return g;let I=this.lastChild,e=g.firstChild,t=this.content.slice(),i=0;for(I.isText&&I.sameMarkup(e)&&(t[t.length-1]=I.withText(I.text+e.text),i=1);i<g.content.length;i++)t.push(g.content[i]);return new Vi(t,this.size+g.size)}cut(g,I=this.size){if(g==0&&I==this.size)return this;let e=[],t=0;if(I>g)for(let i=0,A=0;A<I;i++){let n=this.content[i],s=A+n.nodeSize;s>g&&((A<g||s>I)&&(n.isText?n=n.cut(Math.max(0,g-A),Math.min(n.text.length,I-A)):n=n.cut(Math.max(0,g-A-1),Math.min(n.content.size,I-A-1))),e.push(n),t+=n.nodeSize),A=s}return new Vi(e,t)}cutByIndex(g,I){return g==I?Vi.empty:g==0&&I==this.content.length?this:new Vi(this.content.slice(g,I))}replaceChild(g,I){let e=this.content[g];if(e==I)return this;let t=this.content.slice(),i=this.size+I.nodeSize-e.nodeSize;return t[g]=I,new Vi(t,i)}addToStart(g){return new Vi([g].concat(this.content),this.size+g.nodeSize)}addToEnd(g){return new Vi(this.content.concat(g),this.size+g.nodeSize)}eq(g){if(this.content.length!=g.content.length)return!1;for(let I=0;I<this.content.length;I++)if(!this.content[I].eq(g.content[I]))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(g){let I=this.content[g];if(!I)throw new RangeError("Index "+g+" out of range for "+this);return I}maybeChild(g){return this.content[g]||null}forEach(g){for(let I=0,e=0;I<this.content.length;I++){let t=this.content[I];g(t,e,I),e+=t.nodeSize}}findDiffStart(g,I=0){return QF(this,g,I)}findDiffEnd(g,I=this.size,e=g.size){return OF(this,g,I,e)}findIndex(g){if(g==0)return SB(0,g);if(g==this.size)return SB(this.content.length,g);if(g>this.size||g<0)throw new RangeError(`Position ${g} outside of fragment (${this})`);for(let I=0,e=0;;I++){let t=this.child(I),i=e+t.nodeSize;if(i>=g)return i==g?SB(I+1,i):SB(I,e);e=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(g=>g.toJSON()):null}static fromJSON(g,I){if(!I)return Vi.empty;if(!Array.isArray(I))throw new RangeError("Invalid input for Fragment.fromJSON");return Vi.fromArray(I.map(g.nodeFromJSON))}static fromArray(g){if(!g.length)return Vi.empty;let I,e=0;for(let t=0;t<g.length;t++){let i=g[t];e+=i.nodeSize,t&&i.isText&&g[t-1].sameMarkup(i)?(I||(I=g.slice(0,t)),I[I.length-1]=i.withText(I[I.length-1].text+i.text)):I&&I.push(i)}return new Vi(I||g,e)}static from(g){if(!g)return Vi.empty;if(g instanceof Vi)return g;if(Array.isArray(g))return this.fromArray(g);if(g.attrs)return new Vi([g],g.nodeSize);throw new RangeError("Can not convert "+g+" to a Fragment"+(g.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};Mg.empty=new Mg([],0);const EX={index:0,offset:0};function SB(C,g){return EX.index=C,EX.offset=g,EX}function DB(C,g){if(C===g)return!0;if(!(C&&typeof C=="object")||!(g&&typeof g=="object"))return!1;let I=Array.isArray(C);if(Array.isArray(g)!=I)return!1;if(I){if(C.length!=g.length)return!1;for(let e=0;e<C.length;e++)if(!DB(C[e],g[e]))return!1}else{for(let e in C)if(!(e in g)||!DB(C[e],g[e]))return!1;for(let e in g)if(!(e in C))return!1}return!0}let pC=class RH{constructor(g,I){this.type=g,this.attrs=I}addToSet(g){let I,e=!1;for(let t=0;t<g.length;t++){let i=g[t];if(this.eq(i))return g;if(this.type.excludes(i.type))I||(I=g.slice(0,t));else{if(i.type.excludes(this.type))return g;!e&&i.type.rank>this.type.rank&&(I||(I=g.slice(0,t)),I.push(this),e=!0),I&&I.push(i)}}return I||(I=g.slice()),e||I.push(this),I}removeFromSet(g){for(let I=0;I<g.length;I++)if(this.eq(g[I]))return g.slice(0,I).concat(g.slice(I+1));return g}isInSet(g){for(let I=0;I<g.length;I++)if(this.eq(g[I]))return!0;return!1}eq(g){return this==g||this.type==g.type&&DB(this.attrs,g.attrs)}toJSON(){let g={type:this.type.name};for(let I in this.attrs){g.attrs=this.attrs;break}return g}static fromJSON(g,I){if(!I)throw new RangeError("Invalid input for Mark.fromJSON");let e=g.marks[I.type];if(!e)throw new RangeError(`There is no mark type ${I.type} in this schema`);let t=e.create(I.attrs);return e.checkAttrs(t.attrs),t}static sameSet(g,I){if(g==I)return!0;if(g.length!=I.length)return!1;for(let e=0;e<g.length;e++)if(!g[e].eq(I[e]))return!1;return!0}static setFrom(g){if(!g||Array.isArray(g)&&g.length==0)return RH.none;if(g instanceof RH)return[g];let I=g.slice();return I.sort((e,t)=>e.type.rank-t.type.rank),I}};pC.none=[];let vu=class extends Error{},jg=class Mb{constructor(g,I,e){this.content=g,this.openStart=I,this.openEnd=e}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(g,I){let e=_F(this.content,g+this.openStart,I,this.openStart+1,this.openEnd+1);return e&&new Mb(e,this.openStart,this.openEnd)}removeBetween(g,I){return new Mb(PF(this.content,g+this.openStart,I+this.openStart),this.openStart,this.openEnd)}eq(g){return this.content.eq(g.content)&&this.openStart==g.openStart&&this.openEnd==g.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let g={content:this.content.toJSON()};return this.openStart>0&&(g.openStart=this.openStart),this.openEnd>0&&(g.openEnd=this.openEnd),g}static fromJSON(g,I){if(!I)return Mb.empty;let e=I.openStart||0,t=I.openEnd||0;if(typeof e!="number"||typeof t!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Mb(Mg.fromJSON(g,I.content),e,t)}static maxOpen(g,I=!0){let e=0,t=0;for(let i=g.firstChild;i&&!i.isLeaf&&(I||!i.type.spec.isolating);i=i.firstChild)e++;for(let i=g.lastChild;i&&!i.isLeaf&&(I||!i.type.spec.isolating);i=i.lastChild)t++;return new Mb(g,e,t)}};jg.empty=new jg(Mg.empty,0,0);function PF(C,g,I){let{index:e,offset:t}=C.findIndex(g),i=C.maybeChild(e),{index:A,offset:n}=C.findIndex(I);if(t==g||i.isText){if(n!=I&&!C.child(A).isText)throw new RangeError("Removing non-flat range");return C.cut(0,g).append(C.cut(I))}if(e!=A)throw new RangeError("Removing non-flat range");return C.replaceChild(e,i.copy(PF(i.content,g-t-1,I-t-1)))}function _F(C,g,I,e,t,i){let{index:A,offset:n}=C.findIndex(g),s=C.maybeChild(A);if(n==g||s.isText)return i&&e<=0&&t<=0&&!i.canReplace(A,A,I)?null:C.cut(0,g).append(I).append(C.cut(g));let o=_F(s.content,g-n-1,I,A==0?e-1:0,A==C.childCount-1?t-1:0,s);return o&&C.replaceChild(A,s.copy(o))}function j7g(C,g,I){if(I.openStart>C.depth)throw new vu("Inserted content deeper than insertion position");if(C.depth-I.openStart!=g.depth-I.openEnd)throw new vu("Inconsistent open depths");return qF(C,g,I,0)}function qF(C,g,I,e){let t=C.index(e),i=C.node(e);if(t==g.index(e)&&e<C.depth-I.openStart){let A=qF(C,g,I,e+1);return i.copy(i.content.replaceChild(t,A))}else if(I.content.size)if(!I.openStart&&!I.openEnd&&C.depth==e&&g.depth==e){let A=C.parent,n=A.content;return Zc(A,n.cut(0,C.parentOffset).append(I.content).append(n.cut(g.parentOffset)))}else{let{start:A,end:n}=Q7g(I,C);return Zc(i,gK(C,A,n,g,e))}else return Zc(i,kB(C,g,e))}function $F(C,g){if(!g.type.compatibleContent(C.type))throw new vu("Cannot join "+g.type.name+" onto "+C.type.name)}function PX(C,g,I){let e=C.node(I);return $F(e,g.node(I)),e}function rc(C,g){let I=g.length-1;I>=0&&C.isText&&C.sameMarkup(g[I])?g[I]=C.withText(g[I].text+C.text):g.push(C)}function ju(C,g,I,e){let t=(g||C).node(I),i=0,A=g?g.index(I):t.childCount;C&&(i=C.index(I),C.depth>I?i++:C.textOffset&&(rc(C.nodeAfter,e),i++));for(let n=i;n<A;n++)rc(t.child(n),e);g&&g.depth==I&&g.textOffset&&rc(g.nodeBefore,e)}function Zc(C,g){if(!C.type.validContent(g))throw new vu("Invalid content for node "+C.type.name);return C.copy(g)}function gK(C,g,I,e,t){let i=C.depth>t&&PX(C,g,t+1),A=e.depth>t&&PX(I,e,t+1),n=[];return ju(null,C,t,n),i&&A&&g.index(t)==I.index(t)?($F(i,A),rc(Zc(i,gK(C,g,I,e,t+1)),n)):(i&&rc(Zc(i,kB(C,g,t+1)),n),ju(g,I,t,n),A&&rc(Zc(A,kB(I,e,t+1)),n)),ju(e,null,t,n),new Mg(n)}function kB(C,g,I){let e=[];if(ju(null,C,I,e),C.depth>I){let t=PX(C,g,I+1);rc(Zc(t,kB(C,g,I+1)),e)}return ju(g,null,I,e),new Mg(e)}function Q7g(C,g){let I=g.depth-C.openStart,t=g.node(I).copy(C.content);for(let i=I-1;i>=0;i--)t=g.node(i).copy(Mg.from(t));return{start:t.resolveNoCache(C.openStart+I),end:t.resolveNoCache(t.content.size-C.openEnd-I)}}class Qu{constructor(g,I,e){this.pos=g,this.path=I,this.parentOffset=e,this.depth=I.length/3-1}resolveDepth(g){return g==null?this.depth:g<0?this.depth+g:g}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(g){return this.path[this.resolveDepth(g)*3]}index(g){return this.path[this.resolveDepth(g)*3+1]}indexAfter(g){return g=this.resolveDepth(g),this.index(g)+(g==this.depth&&!this.textOffset?0:1)}start(g){return g=this.resolveDepth(g),g==0?0:this.path[g*3-1]+1}end(g){return g=this.resolveDepth(g),this.start(g)+this.node(g).content.size}before(g){if(g=this.resolveDepth(g),!g)throw new RangeError("There is no position before the top-level node");return g==this.depth+1?this.pos:this.path[g*3-1]}after(g){if(g=this.resolveDepth(g),!g)throw new RangeError("There is no position after the top-level node");return g==this.depth+1?this.pos:this.path[g*3-1]+this.path[g*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let g=this.parent,I=this.index(this.depth);if(I==g.childCount)return null;let e=this.pos-this.path[this.path.length-1],t=g.child(I);return e?g.child(I).cut(e):t}get nodeBefore(){let g=this.index(this.depth),I=this.pos-this.path[this.path.length-1];return I?this.parent.child(g).cut(0,I):g==0?null:this.parent.child(g-1)}posAtIndex(g,I){I=this.resolveDepth(I);let e=this.path[I*3],t=I==0?0:this.path[I*3-1]+1;for(let i=0;i<g;i++)t+=e.child(i).nodeSize;return t}marks(){let g=this.parent,I=this.index();if(g.content.size==0)return pC.none;if(this.textOffset)return g.child(I).marks;let e=g.maybeChild(I-1),t=g.maybeChild(I);if(!e){let n=e;e=t,t=n}let i=e.marks;for(var A=0;A<i.length;A++)i[A].type.spec.inclusive===!1&&(!t||!i[A].isInSet(t.marks))&&(i=i[A--].removeFromSet(i));return i}marksAcross(g){let I=this.parent.maybeChild(this.index());if(!I||!I.isInline)return null;let e=I.marks,t=g.parent.maybeChild(g.index());for(var i=0;i<e.length;i++)e[i].type.spec.inclusive===!1&&(!t||!e[i].isInSet(t.marks))&&(e=e[i--].removeFromSet(e));return e}sharedDepth(g){for(let I=this.depth;I>0;I--)if(this.start(I)<=g&&this.end(I)>=g)return I;return 0}blockRange(g=this,I){if(g.pos<this.pos)return g.blockRange(this);for(let e=this.depth-(this.parent.inlineContent||this.pos==g.pos?1:0);e>=0;e--)if(g.pos<=this.end(e)&&(!I||I(this.node(e))))return new FB(this,g,e);return null}sameParent(g){return this.pos-this.parentOffset==g.pos-g.parentOffset}max(g){return g.pos>this.pos?g:this}min(g){return g.pos<this.pos?g:this}toString(){let g="";for(let I=1;I<=this.depth;I++)g+=(g?"/":"")+this.node(I).type.name+"_"+this.index(I-1);return g+":"+this.parentOffset}static resolve(g,I){if(!(I>=0&&I<=g.content.size))throw new RangeError("Position "+I+" out of range");let e=[],t=0,i=I;for(let A=g;;){let{index:n,offset:s}=A.content.findIndex(i),o=i-s;if(e.push(A,n,t+s),!o||(A=A.child(n),A.isText))break;i=o-1,t+=s+1}return new Qu(I,e,i)}static resolveCached(g,I){let e=IK.get(g);if(e)for(let i=0;i<e.elts.length;i++){let A=e.elts[i];if(A.pos==I)return A}else IK.set(g,e=new O7g);let t=e.elts[e.i]=Qu.resolve(g,I);return e.i=(e.i+1)%U7g,t}}class O7g{constructor(){this.elts=[],this.i=0}}const U7g=12,IK=new WeakMap;class FB{constructor(g,I,e){this.$from=g,this.$to=I,this.depth=e}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 E7g=Object.create(null);let la=class MH{constructor(g,I,e,t=pC.none){this.type=g,this.attrs=I,this.marks=t,this.content=e||Mg.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(g){return this.content.child(g)}maybeChild(g){return this.content.maybeChild(g)}forEach(g){this.content.forEach(g)}nodesBetween(g,I,e,t=0){this.content.nodesBetween(g,I,e,t,this)}descendants(g){this.nodesBetween(0,this.content.size,g)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(g,I,e,t){return this.content.textBetween(g,I,e,t)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(g){return this==g||this.sameMarkup(g)&&this.content.eq(g.content)}sameMarkup(g){return this.hasMarkup(g.type,g.attrs,g.marks)}hasMarkup(g,I,e){return this.type==g&&DB(this.attrs,I||g.defaultAttrs||E7g)&&pC.sameSet(this.marks,e||pC.none)}copy(g=null){return g==this.content?this:new MH(this.type,this.attrs,g,this.marks)}mark(g){return g==this.marks?this:new MH(this.type,this.attrs,this.content,g)}cut(g,I=this.content.size){return g==0&&I==this.content.size?this:this.copy(this.content.cut(g,I))}slice(g,I=this.content.size,e=!1){if(g==I)return jg.empty;let t=this.resolve(g),i=this.resolve(I),A=e?0:t.sharedDepth(I),n=t.start(A),o=t.node(A).content.cut(t.pos-n,i.pos-n);return new jg(o,t.depth-A,i.depth-A)}replace(g,I,e){return j7g(this.resolve(g),this.resolve(I),e)}nodeAt(g){for(let I=this;;){let{index:e,offset:t}=I.content.findIndex(g);if(I=I.maybeChild(e),!I)return null;if(t==g||I.isText)return I;g-=t+1}}childAfter(g){let{index:I,offset:e}=this.content.findIndex(g);return{node:this.content.maybeChild(I),index:I,offset:e}}childBefore(g){if(g==0)return{node:null,index:0,offset:0};let{index:I,offset:e}=this.content.findIndex(g);if(e<g)return{node:this.content.child(I),index:I,offset:e};let t=this.content.child(I-1);return{node:t,index:I-1,offset:e-t.nodeSize}}resolve(g){return Qu.resolveCached(this,g)}resolveNoCache(g){return Qu.resolve(this,g)}rangeHasMark(g,I,e){let t=!1;return I>g&&this.nodesBetween(g,I,i=>(e.isInSet(i.marks)&&(t=!0),!t)),t}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 g=this.type.name;return this.content.size&&(g+="("+this.content.toStringInner()+")"),CK(this.marks,g)}contentMatchAt(g){let I=this.type.contentMatch.matchFragment(this.content,0,g);if(!I)throw new Error("Called contentMatchAt on a node with invalid content");return I}canReplace(g,I,e=Mg.empty,t=0,i=e.childCount){let A=this.contentMatchAt(g).matchFragment(e,t,i),n=A&&A.matchFragment(this.content,I);if(!n||!n.validEnd)return!1;for(let s=t;s<i;s++)if(!this.type.allowsMarks(e.child(s).marks))return!1;return!0}canReplaceWith(g,I,e,t){if(t&&!this.type.allowsMarks(t))return!1;let i=this.contentMatchAt(g).matchType(e),A=i&&i.matchFragment(this.content,I);return A?A.validEnd:!1}canAppend(g){return g.content.size?this.canReplace(this.childCount,this.childCount,g.content):this.type.compatibleContent(g.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let g=pC.none;for(let I=0;I<this.marks.length;I++){let e=this.marks[I];e.type.checkAttrs(e.attrs),g=e.addToSet(g)}if(!pC.sameSet(g,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(I=>I.type.name)}`);this.content.forEach(I=>I.check())}toJSON(){let g={type:this.type.name};for(let I in this.attrs){g.attrs=this.attrs;break}return this.content.size&&(g.content=this.content.toJSON()),this.marks.length&&(g.marks=this.marks.map(I=>I.toJSON())),g}static fromJSON(g,I){if(!I)throw new RangeError("Invalid input for Node.fromJSON");let e;if(I.marks){if(!Array.isArray(I.marks))throw new RangeError("Invalid mark data for Node.fromJSON");e=I.marks.map(g.markFromJSON)}if(I.type=="text"){if(typeof I.text!="string")throw new RangeError("Invalid text node in JSON");return g.text(I.text,e)}let t=Mg.fromJSON(g,I.content),i=g.nodeType(I.type).create(I.attrs,t,e);return i.type.checkAttrs(i.attrs),i}};la.prototype.text=void 0;class KB extends la{constructor(g,I,e,t){if(super(g,I,null,t),!e)throw new RangeError("Empty text nodes are not allowed");this.text=e}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):CK(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(g,I){return this.text.slice(g,I)}get nodeSize(){return this.text.length}mark(g){return g==this.marks?this:new KB(this.type,this.attrs,this.text,g)}withText(g){return g==this.text?this:new KB(this.type,this.attrs,g,this.marks)}cut(g=0,I=this.text.length){return g==0&&I==this.text.length?this:this.withText(this.text.slice(g,I))}eq(g){return this.sameMarkup(g)&&this.text==g.text}toJSON(){let g=super.toJSON();return g.text=this.text,g}}function CK(C,g){for(let I=C.length-1;I>=0;I--)g=C[I].type.name+"("+g+")";return g}class bc{constructor(g){this.validEnd=g,this.next=[],this.wrapCache=[]}static parse(g,I){let e=new P7g(g,I);if(e.next==null)return bc.empty;let t=eK(e);e.next&&e.err("Unexpected trailing text");let i=eEg(CEg(t));return tEg(i,e),i}matchType(g){for(let I=0;I<this.next.length;I++)if(this.next[I].type==g)return this.next[I].next;return null}matchFragment(g,I=0,e=g.childCount){let t=this;for(let i=I;t&&i<e;i++)t=t.matchType(g.child(i).type);return t}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let g=0;g<this.next.length;g++){let{type:I}=this.next[g];if(!(I.isText||I.hasRequiredAttrs()))return I}return null}compatible(g){for(let I=0;I<this.next.length;I++)for(let e=0;e<g.next.length;e++)if(this.next[I].type==g.next[e].type)return!0;return!1}fillBefore(g,I=!1,e=0){let t=[this];function i(A,n){let s=A.matchFragment(g,e);if(s&&(!I||s.validEnd))return Mg.from(n.map(o=>o.createAndFill()));for(let o=0;o<A.next.length;o++){let{type:a,next:d}=A.next[o];if(!(a.isText||a.hasRequiredAttrs())&&t.indexOf(d)==-1){t.push(d);let m=i(d,n.concat(a));if(m)return m}}return null}return i(this,[])}findWrapping(g){for(let e=0;e<this.wrapCache.length;e+=2)if(this.wrapCache[e]==g)return this.wrapCache[e+1];let I=this.computeWrapping(g);return this.wrapCache.push(g,I),I}computeWrapping(g){let I=Object.create(null),e=[{match:this,type:null,via:null}];for(;e.length;){let t=e.shift(),i=t.match;if(i.matchType(g)){let A=[];for(let n=t;n.type;n=n.via)A.push(n.type);return A.reverse()}for(let A=0;A<i.next.length;A++){let{type:n,next:s}=i.next[A];!n.isLeaf&&!n.hasRequiredAttrs()&&!(n.name in I)&&(!t.type||s.validEnd)&&(e.push({match:n.contentMatch,type:n,via:t}),I[n.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(g){if(g>=this.next.length)throw new RangeError(`There's no ${g}th edge in this content match`);return this.next[g]}toString(){let g=[];function I(e){g.push(e);for(let t=0;t<e.next.length;t++)g.indexOf(e.next[t].next)==-1&&I(e.next[t].next)}return I(this),g.map((e,t)=>{let i=t+(e.validEnd?"*":" ")+" ";for(let A=0;A<e.next.length;A++)i+=(A?", ":"")+e.next[A].type.name+"->"+g.indexOf(e.next[A].next);return i}).join(`
1618
+ calc(50% + 50% * cos(${t-90}deg)) 100%, calc(50% + 50% * cos(${t-90}deg)) calc(50% + 50% * sin(${t-90}deg)), 50% 50%)`;if(e<=100)return`polygon(50% 50%, 50% 0%, 100% 0%, 100% 100%,0% 100%, 0% calc(50% + 50% * sin(${t-90}deg)), 50% 50%)`};return(e,t)=>g.percent<100?(l.openBlock(),l.createElementBlock("div",{key:0,class:"pie-chart","data-testid":`${g.dataTestid}-PieChart`},[l.createElementVNode("div",{class:"pie-chart-border",style:l.normalizeStyle({"border-color":g.percent<50?"var(--status-errorLight)":"var(--orange-color)"}),"data-testid":`${g.dataTestid}-PieChart-Border`},[l.createElementVNode("div",{class:"sector",style:l.normalizeStyle({clipPath:I(),"background-color":g.percent<50?"var(--status-errorLight)":"var(--orange-color)"}),"data-testid":`${g.dataTestid}-PieChart-Sector`},null,12,qUg)],12,_Ug)],8,PUg)):(l.openBlock(),l.createElementBlock("svg",{key:1,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","data-testid":`${g.dataTestid}-Icon`,xmlns:"http://www.w3.org/2000/svg"},[...t[0]||(t[0]=[l.createElementVNode("path",{d:"M8 1C4.136 1 1 4.136 1 8C1 11.864 4.136 15 8 15C11.864 15 15 11.864 15 8C15 4.136 11.864 1 8 1ZM8 13.6C4.906 13.6 2.4 11.094 2.4 8C2.4 4.906 4.906 2.4 8 2.4C11.094 2.4 13.6 4.906 13.6 8C13.6 11.094 11.094 13.6 8 13.6Z",fill:"#3BC648"},null,-1),l.createElementVNode("circle",{cx:"8",cy:"8",r:"4",transform:"rotate(-180 8 8)",fill:"#3BC648"},null,-1),l.createElementVNode("path",{d:"M10 6L7.5 9.83935L6 8.5",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])],8,$Ug))}}),[["__scopeId","data-v-3a5767de"]]),g7g=["data-testid","aria-label"],I7g=["data-testid"],Zt=vg(l.defineComponent({name:"Tooltip",__name:"Tooltip",props:{hint:{},isShow:{type:Boolean,default:!1},isCanShow:{type:Boolean,default:!0},position:{default:"bottom-center"},size:{default:"small"},type:{default:"black"},hintGap:{},hintClass:{default:""},dataTestid:{default:"Tooltip"}},setup(C){const g=C,I=CSS.supports("top","anchor(bottom)"),e=l.useId(),t=l.computed(()=>`--anchor-tooltip-${e}`),i=l.ref(null),A=l.ref(null),n=l.reactive({isShow:!1}),s=l.computed(()=>g.isCanShow&&(g.isShow||n.isShow)),o=l.computed(()=>[{"tooltip-yui-kit__hint_show":s.value,"tooltip-yui-kit__hint_bottom-center":g.position==="bottom-center","tooltip-yui-kit__hint_bottom-left":g.position==="bottom-left","tooltip-yui-kit__hint_bottom-right":g.position==="bottom-right","tooltip-yui-kit__hint_top-center":g.position==="top-center","tooltip-yui-kit__hint_top-left":g.position==="top-left","tooltip-yui-kit__hint_top-right":g.position==="top-right","tooltip-yui-kit__hint_left-top":g.position==="left-top","tooltip-yui-kit__hint_left-center":g.position==="left-center","tooltip-yui-kit__hint_left-bottom":g.position==="left-bottom","tooltip-yui-kit__hint_right-top":g.position==="right-top","tooltip-yui-kit__hint_right-center":g.position==="right-center","tooltip-yui-kit__hint_right-bottom":g.position==="right-bottom","tooltip-yui-kit__hint_small":g.size==="small","tooltip-yui-kit__hint_medium":g.size==="medium","tooltip-yui-kit__hint_large":g.size==="large","tooltip-yui-kit__hint_black":g.type==="black","tooltip-yui-kit__hint_blue":g.type==="blue","tooltip-yui-kit__hint_white":g.type==="white",[g.hintClass]:!0}]),a=l.computed(()=>{var q;const T=(q=i.value)==null?void 0:q.closest("dialog");return T||"body"}),d=()=>{p()},m=()=>{Y()},Z=()=>{h()},b=l.computed(()=>g.isCanShow?{mouseenter:d,mouseleave:m}:{}),h=()=>{requestAnimationFrame(()=>{if(!i.value||!A.value||!s.value)return;const T={"--hint-top":"anchor(top)","--hint-left":"anchor(left)","--hint-measured-width":"0","--hint-height":"0","--tooltip-width":"0","--tooltip-height":"0","--hint-visibility":"visible"};I||(T["--hint-top"]="0",T["--hint-left"]="0");const q=i.value.getBoundingClientRect(),cg=A.value.getBoundingClientRect();let og=q.top,Wg=q.left;const fg=i.value.closest("dialog");if(fg){const gI=fg.getBoundingClientRect();og=q.top-gI.top,Wg=q.left-gI.left;const qg=fg.scrollTop,UI=fg.scrollLeft;og+=qg,Wg+=UI}const Vg=q.width,Bg=q.height,kg=cg.width,Rg=cg.height;I||(T["--hint-top"]=`${og}px`,T["--hint-left"]=`${Wg}px`),T["--tooltip-width"]=`${Vg}px`,T["--tooltip-height"]=`${Bg}px`,T["--hint-measured-width"]=`${kg}px`,T["--hint-height"]=`${Rg}px`,A.value&&jI(T,A.value)})},G=()=>{requestAnimationFrame(()=>{!A.value||g.hintGap===void 0||!s.value||jI({"--tooltip-hint-gap":g.hintGap+"px"},A.value)})},w=()=>{g.isCanShow&&s.value&&A.value&&(jI({"position-anchor":`${t.value}`},A.value),h())},B=()=>{!g.isCanShow||!i.value||jI({"anchor-name":`${t.value}`},i.value)};l.watch(()=>g.hintGap,()=>{s.value&&G()}),l.watch(()=>g.isCanShow,T=>{if(!T){Y(),O();return}l.nextTick(()=>{B(),s.value&&eg()})});const p=()=>{g.isCanShow&&(n.isShow=!0)},Y=()=>{n.isShow=!1};let y=null,R=null,X=!1;const K=new Set,D=()=>(y||(y=new MutationObserver(()=>{s.value&&h()})),y),F=()=>(R||(R=new ResizeObserver(()=>{var T;if(s.value){if(!((T=i.value)!=null&&T.matches(":hover"))){Y();return}h()}})),R),z=()=>{I||X||(window.addEventListener("scroll",h,!0),window.addEventListener("resize",h),X=!0)},v=()=>{X&&(window.removeEventListener("scroll",h,!0),window.removeEventListener("resize",h),X=!1)},O=()=>{R==null||R.disconnect(),y==null||y.disconnect(),K.clear(),v()},eg=()=>{!g.isCanShow||!s.value||l.nextTick(()=>{!g.isCanShow||!s.value||(B(),w(),G(),A.value&&E(A.value),i.value&&E(i.value),z(),h())})},E=T=>{K.has(T)||(D().observe(T,{childList:!0,attributes:!0,characterData:!0}),F().observe(T),K.add(T))};return l.watch(s,T=>{if(T){eg();return}O()},{flush:"post"}),l.onMounted(()=>{g.isCanShow&&(B(),s.value&&eg())}),l.onUnmounted(()=>{O()}),(T,q)=>(l.openBlock(),l.createElementBlock("div",l.mergeProps({ref_key:"tooltipRef",ref:i,class:"tooltip-yui-kit","data-testid":g.dataTestid,"aria-label":C.hint},l.toHandlers(b.value,!0)),[l.renderSlot(T.$slots,"default",{},void 0,!0),g.isCanShow?(l.openBlock(),l.createBlock(l.Teleport,{key:0,to:a.value},[l.createVNode(l.Transition,{name:"hint-animate",onEnter:Z},{default:l.withCtx(()=>[s.value?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"hintRef",ref:A,class:l.normalizeClass(["tooltip-yui-kit__hint",o.value]),"data-testid":g.dataTestid},l.toDisplayString(C.hint),11,I7g)):l.createCommentVNode("",!0)]),_:1})],8,["to"])):l.createCommentVNode("",!0)],16,g7g))}}),[["__scopeId","data-v-4e84ce69"]]),C7g=["data-testid"],e7g=["data-testid"],t7g=["data-testid"],i7g=["onClick","data-testid"],A7g=l.defineComponent({__name:"Popover",props:{isShow:{type:Boolean},iconName:{default:mg.moreVertical},options:{default:()=>[]},tooltip:{default:""},tooltipPosition:{default:"top-left"},isWCUse:{type:Boolean},translateY:{default:"0"},dataTestid:{default:"Popover"}},emits:["close"],setup(C,{emit:g}){const I=C,e=g,t=l.reactive({isShow:!1}),i=l.computed(()=>{var K;const X=(K=o.value)==null?void 0:K.closest("dialog");return X||"body"}),A=CSS.supports("top","anchor(bottom)"),n=l.useId(),s=l.computed(()=>`--anchor-popover-${n}`),o=l.ref(null),a=l.ref(null),d=l.ref(null),m=l.computed(()=>({"popover-yui-kit__wrapper":!0,"active-yui-kit":t.isShow,"empty-yui-kit":I.options.length===0})),Z=()=>t.isShow=!t.isShow,b=()=>{t.isShow=!1,e("close")},h=X=>{X.function(),b()},G=()=>{requestAnimationFrame(()=>{if(!o.value||!a.value||!t.isShow)return;const X={},K=o.value.getBoundingClientRect(),D=window.pageYOffset||document.documentElement.scrollTop,F=window.pageXOffset||document.documentElement.scrollLeft;let z=K.bottom+D,v=K.left+F;const O=o.value.closest("dialog");if(O){const E=O.getBoundingClientRect();z=K.top-E.top,v=K.left-E.left;const T=O.scrollTop,q=O.scrollLeft;z+=T,v+=q,z+=10}z+=10,X["--popover-top"]=`${z}px`,A||(X["--popover-left"]=`${v}px`),jI(X,a.value),(()=>{if(!a.value)return;const E=a.value.getBoundingClientRect();E.right>window.innerWidth&&(A?X["--popover-right"]="anchor(right) ":X["--popover-right"]=`${K.right-E.width}px`)})(),X["--popover-right"]&&(X.left="auto",jI(X,a.value))})},w=X=>{const K=X.getBoundingClientRect(),D=document.elementFromPoint(K.left,K.top),F=document.elementFromPoint(K.right,K.bottom);!(D&&X.contains(D))&&!(F&&X.contains(F))&&b()},B=new IntersectionObserver(X=>{X.forEach(K=>{K.isIntersecting||b()})}),p=()=>{o.value&&a.value&&(window.addEventListener("scroll",G,!0),window.addEventListener("resize",G))},Y=()=>{o.value&&a.value&&(window.removeEventListener("scroll",G,!0),window.removeEventListener("resize",G))},y=()=>{o.value&&window.addEventListener("scroll",w.bind(null,o.value),!0)},R=()=>{o.value&&window.removeEventListener("scroll",w.bind(null,o.value),!0)};return l.watch(()=>I.isShow,()=>t.isShow=I.isShow),l.watch(()=>t.isShow,()=>{t.isShow?(G(),y()):R(),!A&&(t.isShow?p():Y())}),l.onMounted(()=>{o.value&&jI({"anchor-name":`${s.value}`},o.value),a.value&&jI({"position-anchor":`${s.value}`},a.value),d.value&&B.observe(d.value),A||G()}),l.onUnmounted(()=>{B.disconnect(),R(),A||Y()}),(X,K)=>(l.openBlock(),l.createBlock(Zt,{hint:I.tooltip,size:"small",type:"black",position:I.tooltipPosition,"data-testid":I.dataTestid,"is-can-show":!!I.tooltip&&!t.isShow&&I.options.length>0},{default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:"popover-yui-kit",ref_key:"popover",ref:d,"data-testid":`${I.dataTestid}-Popover`},[l.createElementVNode("div",{ref_key:"reference",ref:o,class:l.normalizeClass(m.value),"data-testid":`${I.dataTestid}-PopoverShow`,onClick:Z},[l.renderSlot(X.$slots,"trigger",{},()=>[l.createVNode(Yg,{class:"popover-yui-kit__icon",name:I.iconName,"data-testid":`${I.dataTestid}-PopoverShow-Icon`},null,8,["name","data-testid"])],!0)],10,e7g),(l.openBlock(),l.createBlock(l.Teleport,{to:i.value,disabled:I.isWCUse},[l.createVNode(l.Transition,{name:"popover-animate"},{default:l.withCtx(()=>[l.withDirectives(l.createElementVNode("div",{class:"popover-yui-kit__content",style:l.normalizeStyle({transform:`translateY(${I.translateY})`}),ref_key:"floating",ref:a},[l.renderSlot(X.$slots,"default",{},()=>{var D;return[(D=I.options)!=null&&D.length?(l.openBlock(),l.createElementBlock("div",{key:0,class:"popover-yui-kit__options","data-testid":`${I.dataTestid}-PopoverShow-Options`},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(I.options,(F,z)=>(l.openBlock(),l.createElementBlock("div",{class:"popover-yui-kit__options__item",key:z,style:l.normalizeStyle(F.style),onClick:l.withModifiers(v=>h(F),["stop"]),"data-testid":`${I.dataTestid}-Item${z}`},[F.iconName?(l.openBlock(),l.createBlock(Yg,{key:0,name:F.iconName,"data-testid":`${I.dataTestid}-Item${z}-Icon`},null,8,["name","data-testid"])):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(F.value),1)],12,i7g))),128))],8,t7g)):l.createCommentVNode("",!0)]},!0)],4),[[l.vShow,t.isShow]])]),_:3})],8,["to","disabled"]))],8,C7g)),[[l.unref(To),b,void 0,{bubble:!0}]])]),_:3},8,["hint","position","data-testid","is-can-show"]))}}),tZ=vg(A7g,[["__scopeId","data-v-869ead7f"]]),n7g=["colspan","rowspan","data-testid"],iZ=vg(l.defineComponent({name:"TableTh",__name:"TableTh",props:{colspan:{default:1},rowspan:{default:1},dataTestid:{default:"DataHeader"}},setup(C){const g=C;return(I,e)=>(l.openBlock(),l.createElementBlock("th",{colspan:C.colspan,rowspan:C.rowspan,"data-testid":g.dataTestid,class:"table-th"},[l.renderSlot(I.$slots,"default",{},void 0,!0)],8,n7g))}}),[["__scopeId","data-v-7ef41ecf"]]),l7g=["data-testid"],xu=vg(l.defineComponent({name:"HeadTableRow",__name:"HeadTableRow",props:{dataTestid:{default:"TableRow"}},setup(C){const g=C;return(I,e)=>(l.openBlock(),l.createElementBlock("tr",{class:"head-table-row","data-testid":g.dataTestid},[l.renderSlot(I.$slots,"default",{},void 0,!0)],8,l7g))}}),[["__scopeId","data-v-b85bc9aa"]]),LF=(C,g,I,e)=>{const t=l.ref(!1),i=l.ref(100);let A=0,n=0;const s=l.computed(()=>[{"scroll-wrapper__track_hide":i.value===100,"scroll-wrapper__track_drag":t.value}]),o=l.computed(()=>i.value<100),a=()=>{if(C.value){const w=C.value.clientWidth,B=C.value.scrollWidth;return w>=B?100:w/B*100}return 100},d=()=>{if(!C.value||!g.value||!I.value||!e.value)return;const{scrollLeft:w,scrollWidth:B,clientWidth:p}=C.value,Y=B-p;if(Y<=0)return;const y=w/Y,R=e.value.clientWidth,X=I.value.clientWidth,K=R-X,D=y*K;requestAnimationFrame(()=>{g.value&&jI({"--scroll-bar-left-position":`${D}px`},g.value)})},m=w=>{!C.value||!g.value||(t.value=!0,A=w.clientX,n=C.value.scrollLeft,document.addEventListener("pointermove",Z),document.addEventListener("pointerup",b,!0))},Z=w=>{if(t.value&&C.value&&I.value){const B=w.clientX-A,p=(C.value.scrollWidth-C.value.clientWidth)/(C.value.clientWidth-I.value.clientWidth);C.value.scrollLeft=n+B*p,d()}},b=()=>{t.value=!1,document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",b,!0)};return{onDrag:Z,onTrackClick:w=>{if(C.value&&I.value){const B=w.currentTarget.getBoundingClientRect(),p=w.clientX-B.left,Y=I.value.clientWidth,y=B.width;let R=(p-Y/2)*((C.value.scrollWidth-C.value.clientWidth)/(y-Y));R=Math.max(0,Math.min(R,C.value.scrollWidth-C.value.clientWidth)),C.value.scrollLeft=R,d()}},startDrag:m,getPercentHorizontalView:a,changeBarPosition:d,isDragging:t,scrollHorizontalWidthPercent:i,setHorizontalBarWidth:()=>{if(!C.value||!g.value)return;const w=a();i.value=w,jI({"--scroll-horizontal-bar-width":`${w}%`},g.value)},horizontalTrackClass:s,isExistHorizontalTrack:o}},vF=(C,g,I,e)=>{const t=l.ref(!1),i=l.ref(100);let A=0,n=0;const s=l.computed(()=>[{"scroll-wrapper__track_hide":i.value===100,"scroll-wrapper__track_drag":t.value}]),o=l.computed(()=>i.value<100),a=()=>{if(C.value){const w=C.value.clientHeight,B=C.value.scrollHeight;if(w>=B)return 100;if(w<B)return w/B*100}return 100},d=()=>{if(!C.value||!g.value||!I.value||!e.value)return;const{scrollTop:w,scrollHeight:B,clientHeight:p}=C.value,Y=B-p;if(Y<=0)return;const y=w/Y,R=e.value.clientHeight,X=I.value.clientHeight,K=R-X,D=y*K;requestAnimationFrame(()=>{g.value&&jI({"--scroll-bar-top-postion":`${D}px`},g.value)})},m=w=>{!C.value||!g.value||(t.value=!0,A=w.clientY,n=C.value.scrollTop,document.addEventListener("pointermove",Z),document.addEventListener("pointerup",b))},Z=w=>{if(t.value&&C.value&&I.value){const B=w.clientY-A,p=(C.value.scrollHeight-C.value.clientHeight)/(C.value.clientHeight-I.value.clientHeight);C.value.scrollTop=n+B*p,d()}},b=()=>{t.value=!1,document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",b)};return{onDrag:Z,onTrackClick:w=>{if(C.value&&I.value){const B=w.currentTarget.getBoundingClientRect(),p=w.clientY-B.top,Y=I.value.clientHeight,y=B.height;let R=(p-Y/2)*((C.value.scrollHeight-C.value.clientHeight)/(y-Y));R=Math.max(0,Math.min(R,C.value.scrollHeight-C.value.clientHeight)),C.value.scrollTop=R,d()}},startDrag:m,getProcentVerticalView:a,changeBarPosition:d,isDragging:t,scrollVerticalHeightProcent:i,setVerticalBarHeight:()=>{if(!C.value||!g.value)return;const w=a();i.value=w,jI({"--scroll-vertical-bar-height":`${w}%`},g.value)},verticalTrackClass:s,isExistVerticalTrack:o}},s7g={class:"scroll-wrapper__vertical-wrapper"},o7g={class:"scroll-wrapper__horizont-wrapper"},Tu=vg(l.defineComponent({name:"ScrollWrapper",__name:"ScrollWrapper",props:{isShowVerticalScroll:{type:Boolean,default:!1},isShowHorizontalScroll:{type:Boolean,default:!1}},emits:["unmount-scroll","unmount-paginate","on-mounted"],setup(C,{expose:g,emit:I}){const e=I,t=l.ref(null),i=l.ref(null),A=l.ref(null),n=l.ref(null),s=l.ref(null),o=l.ref(null),{onTrackClick:a,startDrag:d,changeBarPosition:m,setVerticalBarHeight:Z,verticalTrackClass:b,isExistVerticalTrack:h}=vF(t,i,n,A),{changeBarPosition:G,startDrag:w,onTrackClick:B,setHorizontalBarWidth:p,horizontalTrackClass:Y,isExistHorizontalTrack:y}=LF(t,i,o,s),R=T=>{m(),G(),e("unmount-scroll",T)},X=()=>{requestAnimationFrame(()=>{K(),D()})},K=()=>{if(!t.value||!i.value)return;const T=getComputedStyle(i.value),q=i.value.style.minHeight||T.minHeight,cg=i.value.style.maxHeight||T.maxHeight,og=i.value.style.height;jI({"--scroll-wrapper-height":`${og}`,"--scroll-wrapper-max-height":`${cg}`,"--scroll-wrapper-min-height":`${q}`},i.value)},D=()=>{Z(),p(),m(),G()},F=()=>{t.value&&t.value.addEventListener("scroll",R)},z=()=>{t.value&&(t.value.scrollTop=0)},v=()=>{t.value&&(t.value.scrollHeight<=t.value.clientHeight?e("unmount-paginate",!0):e("unmount-paginate",!1))},O=new MutationObserver(()=>{X(),v()}),eg=new ResizeObserver(()=>{X(),v()}),E=T=>{O.observe(T,{childList:!0,subtree:!0,attributes:!0}),eg.observe(T)};return g({scrollToTop:z,setHeightSlot:K,slotRef:t}),l.onMounted(()=>{X(),F(),i.value&&E(i.value),A.value&&E(A.value),window.addEventListener("resize",X),e("on-mounted")}),l.onUnmounted(()=>{window.removeEventListener("resize",X)}),(T,q)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"scrollWrapperRef",ref:i,class:"scroll-wrapper"},[l.createElementVNode("div",s7g,[l.createElementVNode("div",o7g,[l.createElementVNode("div",{ref_key:"slotRef",ref:t,class:"scroll-wrapper__slot"},[l.renderSlot(T.$slots,"default",{},void 0,!0)],512),l.unref(y)||C.isShowHorizontalScroll?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"horizontTrackRef",ref:s,class:l.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_horizont",l.unref(Y)]),onClick:q[1]||(q[1]=l.withModifiers((...cg)=>l.unref(B)&&l.unref(B)(...cg),["self","prevent","left"]))},[l.createElementVNode("div",{ref_key:"horizontBarRef",ref:o,class:"scroll-wrapper__bar",onPointerdown:q[0]||(q[0]=l.withModifiers((...cg)=>l.unref(w)&&l.unref(w)(...cg),["prevent","left"]))},null,544)],2)):l.createCommentVNode("",!0)]),l.unref(h)||C.isShowVerticalScroll?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"verticalTrackRef",ref:A,class:l.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_vertical",l.unref(b)]),onClick:q[3]||(q[3]=l.withModifiers((...cg)=>l.unref(a)&&l.unref(a)(...cg),["self","prevent","left"]))},[l.createElementVNode("div",{ref_key:"verticalBarRef",ref:n,class:"scroll-wrapper__bar",onPointerdown:q[2]||(q[2]=l.withModifiers((...cg)=>l.unref(d)&&l.unref(d)(...cg),["prevent","left"]))},null,544)],2)):l.createCommentVNode("",!0)])],512))}}),[["__scopeId","data-v-5a7ca6f4"]]),a7g=["id","data-testid"],d7g=["id","data-testid"],c7g=["id","data-testid"],m7g={key:0,class:"table__error-wrapper"},r7g={class:"table__error-content"},Z7g={class:"table__wrapper"},xX=vg(l.defineComponent({name:"YTable",__name:"Table",props:{tableId:{},search:{},tbodyId:{},theadId:{},columnCount:{},isError:{type:Boolean,default:!1},onErrorHandler:{},errorLabel:{default:"Обновить таблицу"},dataTestid:{default:"Table"},isShowVerticalScroll:{type:Boolean,default:!1},isShowHorizontalScroll:{type:Boolean,default:!1}},emits:["unmount-scroll","unmount-paginate"],setup(C,{expose:g,emit:I}){var p;const e=C,t=I,i=l.reactive({headHeight:0,maxColumnCount:0}),A=l.ref(null),n=l.ref(null),s=l.ref(null),o=l.ref(null),a=l.ref(null),d=Y=>{e.isError||t("unmount-scroll",Y)},m=Y=>{e.isError||t("unmount-paginate",Y)},Z=()=>{if(!A.value||!a.value)return;const Y=A.value.querySelector("thead");if(!Y)return;const y=Y.getBoundingClientRect().height;i.headHeight=y,jI({"--scroll-track-margin-top":`${y}px`},a.value.$el)},b=()=>{a.value&&a.value.scrollToTop()},h=()=>{if(a.value&&o.value){const Y=getComputedStyle(a.value.$el),y=Number(Y.minHeight.replace(/\D/g,""));if(y&&y>0)return;jI({"min-height":`${i.headHeight+108}px`},a.value.$el)}},G=()=>{let Y=1;if(n.value){for(let y=0;y<n.value.children.length;y++)Y=Math.max(n.value.children[y].children.length,Y);i.maxColumnCount=Y}},w=new MutationObserver(()=>{G()}),B=new ResizeObserver(()=>{Z()});return g({scrollToTop:b,setHeightSlot:(p=a.value)==null?void 0:p.setHeightSlot,scrollWrapperRef:a,tbodyRef:s,tableRef:A,theadRef:n}),l.onMounted(()=>{Z(),G(),window.addEventListener("resize",Z),A.value&&B.observe(A.value),n.value&&w.observe(n.value,{childList:!0,subtree:!0}),h()}),(Y,y)=>(l.openBlock(),l.createBlock(Tu,{ref_key:"scrollWrapperRef",ref:a,class:"table",onUnmountScroll:d,onUnmountPaginate:m,"is-show-vertical-scroll":e.isShowVerticalScroll,"is-show-horizontal-scroll":e.isShowHorizontalScroll,"data-testid":`${e.dataTestid}-ScrollWrapper`},{default:l.withCtx(()=>[l.createElementVNode("table",{ref_key:"tableRef",ref:A,id:e.tableId,class:"table__table","data-testid":`${e.dataTestid}`},[l.renderSlot(Y.$slots,"default",{},()=>{var R;return[l.createElementVNode("colgroup",null,[l.renderSlot(Y.$slots,"colspan",{},void 0,!0)]),Y.$slots.head?(l.openBlock(),l.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:n,id:e.theadId,class:"table__head","data-testid":`${e.dataTestid}-Thead`},[l.renderSlot(Y.$slots,"head",{},void 0,!0),Y.$slots.search?(l.openBlock(),l.createBlock(xu,{key:0,class:"table__search-tr",id:(R=e.search)==null?void 0:R.rowId,ref_key:"searchRowRef",ref:o,"data-testid":`${e.dataTestid}-Search-Row`},{default:l.withCtx(()=>{var X;return[l.createVNode(iZ,{colspan:e.columnCount||i.maxColumnCount,class:"table__search-th",id:(X=e.search)==null?void 0:X.headId,"data-testid":`${e.dataTestid}-SearchRow-Search`},{default:l.withCtx(()=>[l.renderSlot(Y.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","id","data-testid"])]}),_:3},8,["id","data-testid"])):l.createCommentVNode("",!0)],8,d7g)):l.createCommentVNode("",!0),C.isError?l.createCommentVNode("",!0):l.renderSlot(Y.$slots,"body-group",{key:1},()=>[Y.$slots.body?(l.openBlock(),l.createElementBlock("tbody",{key:0,id:e.tbodyId,ref_key:"tbodyRef",ref:s,class:"table__body","data-testid":`${e.dataTestid}-Tbody`},[l.renderSlot(Y.$slots,"body",{},void 0,!0)],8,c7g)):l.createCommentVNode("",!0)],!0)]},!0)],8,a7g),e.isError?(l.openBlock(),l.createElementBlock("div",m7g,[l.createElementVNode("div",r7g,[l.createVNode(Yg,{class:"table__error-icon",width:112,height:100,name:l.unref(mg).tableError},null,8,["name"]),y[0]||(y[0]=l.createElementVNode("div",{class:"table__error-header"},"Таблица не загрузилась",-1)),y[1]||(y[1]=l.createElementVNode("div",{class:"table__error-text"}," Не удалось получить данные. Проверьте соединение с интернетом или попробуйте обновить таблицу ",-1))]),l.renderSlot(Y.$slots,"error-button",{},()=>[C.onErrorHandler?(l.openBlock(),l.createBlock(nI,{key:0,class:"table__error-button",size:l.unref(YI).small,onClick:C.onErrorHandler},{"left-icon":l.withCtx(()=>[l.createElementVNode("div",Z7g,[l.createVNode(Yg,{name:l.unref(mg).rearrange,width:16,height:16},null,8,["name"])])]),default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(C.errorLabel),1)]),_:1},8,["size","onClick"])):l.createCommentVNode("",!0)],!0)])):l.createCommentVNode("",!0)]),_:3},8,["is-show-vertical-scroll","is-show-horizontal-scroll","data-testid"]))}}),[["__scopeId","data-v-0593ff94"]]),b7g=["rowspan","colspan","data-testid"],Lu=l.defineComponent({name:"TableTd",__name:"TableTd",props:{colspan:{default:1},rowspan:{default:1},dataTestid:{default:"DataCell"}},setup(C){const g=C;return(I,e)=>(l.openBlock(),l.createElementBlock("td",{rowspan:C.rowspan,colspan:C.colspan,class:"table-td","data-testid":g.dataTestid},[l.renderSlot(I.$slots,"default")],8,b7g))}}),u7g={class:"skeleton"},RB=vg(l.defineComponent({name:"Skeleton",__name:"Skeleton",setup(C){return(g,I)=>(l.openBlock(),l.createElementBlock("div",u7g))}}),[["__scopeId","data-v-f0b64f04"]]),h7g=["data-testid"],MB=vg(l.defineComponent({name:"TableRow",__name:"TableRow",props:{type:{default:"default"},isObserved:{type:Boolean,default:!1},observer:{},scrolledElement:{},dataTestid:{},colspan:{default:1},rowspan:{default:1}},setup(C){const g=C,I=l.reactive({isShow:!g.isObserved,observer:null}),e=l.ref(null),t=l.computed(()=>[{"table-row_active":g.type==="selected","table-row_is-stub":g.isObserved}]),i=()=>{const n=new IntersectionObserver(s=>{s.forEach(o=>{o.isIntersecting&&(I.isShow=!0,n.unobserve(o.target))})},{root:g.scrolledElement,rootMargin:"600px"});return n},A=()=>{g.isObserved&&e.value&&(I.observer=i(),I.observer.observe(e.value))};return l.watch(()=>g.scrolledElement,()=>{var n;(n=I.observer)==null||n.disconnect(),A()}),l.onMounted(()=>{A()}),l.onUnmounted(()=>{var n;(n=I.observer)==null||n.disconnect()}),(n,s)=>(l.openBlock(),l.createElementBlock("tr",{ref_key:"row",ref:e,class:l.normalizeClass(["table-row",t.value]),"data-testid":g.dataTestid},[I.isShow?l.renderSlot(n.$slots,"default",{key:0},void 0,!0):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[n.$slots.skeleton?l.renderSlot(n.$slots,"skeleton",{key:0},void 0,!0):(l.openBlock(),l.createBlock(Lu,{key:1,class:"table-row__td table-row__td_stub",colspan:g.colspan,rowspan:g.rowspan},{default:l.withCtx(()=>[l.createVNode(RB,{class:"table-row__skeleton"})]),_:1},8,["colspan","rowspan"]))],64))],10,h7g))}}),[["__scopeId","data-v-0250f09b"]]),TX=vg(l.defineComponent({name:"SectionTableRow",__name:"SectionTableRow",props:{colspan:{},dataTestid:{default:"SectionTableRow"}},setup(C){const g=C;return(I,e)=>(l.openBlock(),l.createBlock(MB,{class:"section-table-row","data-testid":g.dataTestid},{default:l.withCtx(()=>[l.createVNode(Lu,{colspan:C.colspan,class:"section-table-row__td","data-testid":`${g.dataTestid}-DataCell`},{default:l.withCtx(()=>[l.renderSlot(I.$slots,"default",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"]))}}),[["__scopeId","data-v-6434dd04"]]),G7g=["disabled","name","value","data-testid"],LX=vg(l.defineComponent({name:"Radio",__name:"Radio",props:l.mergeModels({name:{},value:{},disabled:{type:Boolean,default:!1},dataTestid:{default:"Radio"}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(C){const g=C,I=l.useModel(C,"modelValue");return(e,t)=>l.withDirectives((l.openBlock(),l.createElementBlock("input",{"onUpdate:modelValue":t[0]||(t[0]=i=>I.value=i),type:"radio",disabled:C.disabled,name:C.name,value:C.value,class:"radio","data-testid":g.dataTestid},null,8,G7g)),[[l.vModelRadio,I.value]])}}),[["__scopeId","data-v-43bb3ae4"]]),w7g=["data-testid"],W7g=["data-testid"],jF=vg(l.defineComponent({name:"ChoosenMiniOptions",__name:"ChoosenMiniOptions",props:{options:{},dataTestid:{default:"ChoosenMiniOptions"}},emits:["remove"],setup(C,{emit:g}){const I=C,e=g,t=i=>{e("remove",i)};return(i,A)=>(l.openBlock(),l.createElementBlock("div",{class:"choosen-mini-options","data-testid":I.dataTestid},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(C.options,(n,s)=>(l.openBlock(),l.createElementBlock("div",{key:n.key,class:"choosen-mini-options__option","data-testid":`${I.dataTestid}-Option-Item${s}`},[l.createVNode(Ht,{"data-testid":`${I.dataTestid}-Badge${s}`,type:l.unref(QI).blue,text:l.unref(eN)(n)?n.hint:n.value,class:"choosen-mini-options__badges",disabled:""},null,8,["data-testid","type","text"]),l.createVNode(Yg,{"data-testid":`${I.dataTestid}-Icon${s}`,name:l.unref(mg).crossLarge,width:10,height:10,class:"choosen-mini-options__cross",onClick:o=>t(n.key)},null,8,["data-testid","name","onClick"])],8,W7g))),128))],8,w7g))}}),[["__scopeId","data-v-d27a190a"]]),B7g=["data-testid"],p7g=["data-testid"],Y7g=["data-testid"],y7g=["data-testid"],N7g=["data-testid"],V7g=["data-testid"],vX=vg(l.defineComponent({name:"BaseFilter",__name:"BaseFilter",props:l.mergeModels({options:{},title:{},isSearch:{type:Boolean,default:!1},isPosibleToClear:{type:Boolean,default:!1},isShowMiniOptions:{type:Boolean,default:!1},isUseAnchor:{type:Boolean,default:!0},isOpened:{type:Boolean,default:!1},tooltipPosition:{default:"top-center"},disabled:{type:Boolean,default:!1},onUnmountPagination:{},defaultOption:{default:"Выберите значение"},class:{},dataTestid:{default:"BaseFilter"}},{modelValue:{},modelModifiers:{}}),emits:l.mergeModels(["change","disabled-click","unmount-open","unmount-search","unmount-search-enter","unmount-pagination"],["update:modelValue"]),setup(C,{emit:g}){const I=C,e=l.reactive({isHovered:!1}),t=g,i=l.ref(null),A=l.ref(null),n=l.useModel(C,"modelValue"),s=l.ref(I.isOpened),o=l.computed(()=>[{filter_disabled:I.disabled},I.class]);l.watch(s,()=>{t("unmount-open",s.value),a.value=""}),l.watch(()=>I.isOpened,()=>{if(I.disabled){s.value=!1;return}s.value=I.isOpened}),l.watch(()=>I.onUnmountPagination,()=>{z()});const a=l.ref(""),d=l.computed(()=>{let v=[];return a.value?(jb(I.options)?v=I.options.filter(O=>{var eg;return O.value.toLowerCase().includes(a.value.toLowerCase())||((eg=O==null?void 0:O.hint)==null?void 0:eg.toLowerCase().includes(a.value.toLowerCase()))}):v=I.options.filter(O=>O.value.toLowerCase().includes(a.value.toLowerCase())),v):(jb(I.options),v=I.options,v)}),m=l.computed(()=>{var O;return((O=I.options.find(eg=>Gl.isArray(n.value)?n.value.includes(eg.key):eg.key===String(n.value)))==null?void 0:O.value)||I.defaultOption}),Z=l.computed(()=>I.options.filter(v=>Gl.isArray(n.value)?n.value.includes(v.key)&&v.value!==m.value:v.key===String(n.value))),b=l.computed(()=>I.options.filter(v=>Gl.isArray(n.value)?n.value.includes(v.key)&&v.value===m.value:v.key===String(n.value))),h=l.computed(()=>{var eg,E,T;const v=I.options;let O;return Gl.isArray(n.value)?jb(v)?O=(eg=v.find(q=>q.value===m.value))==null?void 0:eg.hint:O=(E=v.find(q=>q.value===m.value))==null?void 0:E.value:O=(T=v.find(q=>q.key===String(n.value)))==null?void 0:T.value,O||""}),G=()=>{e.isHovered=!0},w=()=>{e.isHovered=!1},B=l.computed(()=>{var v;return jb(I.options)?e.isHovered&&!!h.value:((v=i.value)==null?void 0:v.isSpanOverflow)||!1}),p=l.computed(()=>Gl.isArray(n.value)?I.isPosibleToClear&&n.value.length>0:I.isPosibleToClear&&n.value),Y=l.computed(()=>Gl.isArray(n.value)&&n.value.length>1),y=l.computed(()=>Gl.isArray(n.value)?n.value.length:null),R=v=>{t("disabled-click",v)},X=async v=>{if(I.disabled){s.value=!1;return}if(Gl.isArray(n.value))n.value.includes(v)?n.value=n.value.filter(O=>O!==v):n.value=[...n.value,v];else{let O=I.options.find(eg=>eg.key===v);!O&&jb(I.options)&&(O=I.options.find(eg=>eg.hint===v)),n.value=(O==null?void 0:O.key)||"",s.value=!1}await l.nextTick(),t("change",String(n.value))},K=v=>{if(I.disabled){s.value=!1;return}s.value=v},D=async()=>{I.disabled||(Gl.isArray(n.value)?n.value=[]:n.value="",await l.nextTick(),t("change",n.value))},F=new IntersectionObserver(v=>{v.forEach(O=>{O.isIntersecting&&t("unmount-pagination")})}),z=()=>{A.value&&I.onUnmountPagination&&(F.unobserve(A.value),F.observe(A.value))};return l.onMounted(()=>{z()}),l.onUnmounted(()=>{F.disconnect()}),(v,O)=>(l.openBlock(),l.createBlock(Mr,{"header-classes":"filter__header","options-classes":"filter__options","is-opened":s.value,class:l.normalizeClass(["filter",o.value]),"is-use-anchor":C.isUseAnchor,"data-testid":I.dataTestid,disabled:C.disabled,onChange:K},l.createSlots({header:l.withCtx(()=>[l.renderSlot(v.$slots,"header",{},()=>[l.createElementVNode("span",{class:l.normalizeClass(["filter__header-title",{"filter__header-title__active":s.value}]),"data-testid":`${I.dataTestid}-Title`},l.toDisplayString(C.title),11,B7g),l.createVNode(Zt,{position:C.tooltipPosition,type:"blue","is-can-show":B.value&&!(Y.value&&C.isShowMiniOptions),hint:h.value,class:"filter__header-tooltip","data-testid":`${I.dataTestid}-Tooltip`},{default:l.withCtx(()=>[l.createVNode(Ht,{ref_key:"badgesRef",ref:i,type:C.disabled?l.unref(QI).disabled:m.value===I.defaultOption?l.unref(QI).default:l.unref(QI).blue,class:"filter__options-badge","data-testid":`${I.dataTestid}-Badge`,text:m.value,onMouseenter:G,onMouseleave:w,disabled:""},null,8,["type","data-testid","text"]),Y.value&&C.isShowMiniOptions?(l.openBlock(),l.createElementBlock("div",{key:0,class:"filter__values","data-testid":`${I.dataTestid}-Filter-Value`},[l.createVNode(jF,{"data-testid":`${I.dataTestid}-Filter-Value-MiniOptions`,onClick:O[0]||(O[0]=l.withModifiers(()=>{},["stop"])),options:b.value,onRemove:X},null,8,["data-testid","options"])],8,p7g)):l.createCommentVNode("",!0)]),_:1},8,["position","is-can-show","hint","data-testid"]),y.value&&y.value>1?(l.openBlock(),l.createElementBlock("span",{key:0,class:"filter__count","data-testid":`${I.dataTestid}-Filter-Count`},[l.createTextVNode(" +"+l.toDisplayString(y.value-1)+" ",1),Y.value?(l.openBlock(),l.createElementBlock("div",{key:0,class:"filter__values","data-testid":`${I.dataTestid}-Filter-Values`},[l.createVNode(jF,{onClick:O[1]||(O[1]=l.withModifiers(()=>{},["stop"])),options:Z.value,onRemove:X,"data-testid":`${I.dataTestid}-MiniOptions`},null,8,["options","data-testid"])],8,y7g)):l.createCommentVNode("",!0)],8,Y7g)):l.createCommentVNode("",!0),p.value?(l.openBlock(),l.createElementBlock("span",{key:1,class:"filter__cross",onClick:l.withModifiers(D,["stop"]),"data-testid":`${I.dataTestid}-Filter-Cross`},[l.createVNode(Yg,{name:l.unref(mg).crossLarge,width:16,height:16},null,8,["name"])],8,N7g)):l.createCommentVNode("",!0)],!0)]),options:l.withCtx(()=>[C.isSearch?(l.openBlock(),l.createBlock(du,{key:0,modelValue:a.value,"onUpdate:modelValue":O[2]||(O[2]=eg=>a.value=eg),"show-history":!1,"data-testid":`${I.dataTestid}-Search`,onInput:O[3]||(O[3]=eg=>v.$emit("unmount-search",eg)),onEnter:O[4]||(O[4]=eg=>v.$emit("unmount-search-enter",eg))},null,8,["modelValue","data-testid"])):l.createCommentVNode("",!0),l.createVNode(tN,{"data-testid":`${I.dataTestid}-Options`,class:"filter__options-option",options:d.value,"default-option":m.value,onChange:X,onDisabledClick:R},{default:l.withCtx(()=>[l.createElementVNode("li",{class:"filter__options-underline","data-testid":`${I.dataTestid}-Underline`},[...O[5]||(O[5]=[l.createElementVNode("hr",{class:"filter__options-underline-hr"},null,-1)])],8,V7g)]),_:1},8,["data-testid","options","default-option"]),l.withDirectives(l.createElementVNode("div",{ref_key:"lastOptionRef",ref:A,class:"filter__last-option"},null,512),[[l.vShow,C.onUnmountPagination]])]),_:2},[v.$slots.body?{name:"body",fn:l.withCtx(eg=>[l.renderSlot(v.$slots,"body",{closeOpenList:eg.closeOpenList},void 0,!0)]),key:"0"}:void 0]),1032,["is-opened","class","is-use-anchor","data-testid","disabled"]))}}),[["__scopeId","data-v-fd1b8425"]]),X7g=["data-testid"],HB=vg(l.defineComponent({name:"Range",__name:"Range",props:l.mergeModels({min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1},dataTestid:{default:"Range"}},{modelValue:{default:0},modelModifiers:{}}),emits:l.mergeModels(["unmount-change","unmount-input"],["update:modelValue"]),setup(C,{emit:g}){const I=C,e=g,t=l.useModel(C,"modelValue"),i=l.ref(null);l.watch(t,()=>{n()});const A=()=>(t.value-I.min)/(I.max-I.min)*100,n=()=>{requestAnimationFrame(()=>{i.value&&jI({"--progress":A()+"%"},i.value)})},s=a=>{const d=a.target;d&&e("unmount-change",Number(d.value))},o=a=>{const d=a.target;d&&e("unmount-change",Number(d.value))};return l.onMounted(()=>{n()}),(a,d)=>l.withDirectives((l.openBlock(),l.createElementBlock("input",l.mergeProps({ref_key:"input",ref:i,type:"range"},I,{class:"range","onUpdate:modelValue":d[0]||(d[0]=m=>t.value=m),onChange:s,onInput:o,"data-testid":I.dataTestid}),null,16,X7g)),[[l.vModelText,t.value]])}}),[["__scopeId","data-v-8a0e1679"]]),R7g=["id","data-testid"],M7g=["data-testid"],H7g=["data-testid"],jX=vg(l.defineComponent({name:"TableNew",__name:"TableNew",props:{tableId:{},search:{},tbodyId:{},theadId:{},columnCount:{},isError:{type:Boolean},onErrorHandler:{},errorLabel:{},dataTestid:{default:"Table"},isShowVerticalScroll:{type:Boolean,default:!1},isShowHorizontalScroll:{type:Boolean,default:!1}},emits:["unmount-scroll","unmount-paginate"],setup(C,{expose:g,emit:I}){var B;const e=C,t=I,i=l.reactive({headHeight:0,maxColumnCount:0}),A=l.ref(null),n=l.ref(null),s=l.ref(null),o=l.ref(null),a=l.ref(null),d=p=>{t("unmount-scroll",p)},m=()=>{if(!A.value||!a.value)return;const p=A.value.querySelector("thead");if(!p)return;const Y=p.getBoundingClientRect().height;i.headHeight=Y,jI({"--scroll-track-margin-top":`${Y}px`},a.value.$el)},Z=()=>{a.value&&a.value.scrollToTop()},b=()=>{if(a.value&&o.value){const p=getComputedStyle(a.value.$el),Y=Number(p.minHeight.replace(/\D/g,""));if(Y&&Y>0)return;jI({"min-height":`${i.headHeight+108}px`},a.value.$el)}},h=()=>{let p=1;if(n.value){for(let Y=0;Y<n.value.children.length;Y++)p=Math.max(n.value.children[Y].children.length,p);i.maxColumnCount=p}},G=new MutationObserver(()=>{h()}),w=new ResizeObserver(()=>{m()});return g({scrollToTop:Z,setHeightSlot:(B=a.value)==null?void 0:B.setHeightSlot,tbodyRef:s,tableRef:A,theadRef:n}),l.onMounted(()=>{m(),h(),window.addEventListener("resize",m),A.value&&w.observe(A.value),n.value&&G.observe(n.value,{childList:!0,subtree:!0}),b()}),(p,Y)=>(l.openBlock(),l.createBlock(Tu,{ref_key:"scrollWrapperRef",ref:a,class:"table",onUnmountScroll:d,"is-show-vertical-scroll":e.isShowVerticalScroll,"is-show-horizontal-scroll":e.isShowHorizontalScroll,"data-testid":`${e.dataTestid}-ScrollWrapper`},{default:l.withCtx(()=>[l.createElementVNode("table",{ref_key:"tableRef",ref:A,id:e.tableId,class:"table__table","data-testid":`${e.dataTestid}`},[l.renderSlot(p.$slots,"default",{},()=>[l.createElementVNode("colgroup",null,[l.renderSlot(p.$slots,"colspan",{},void 0,!0)]),p.$slots.head?(l.openBlock(),l.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:n,class:"table__head","data-testid":`${e.dataTestid}-Thead`},[l.renderSlot(p.$slots,"head",{},void 0,!0),p.$slots.search?(l.openBlock(),l.createBlock(xu,{key:0,class:"table__search-tr",ref_key:"searchRowRef",ref:o,"data-testid":`${e.dataTestid}-Search-Row`},{default:l.withCtx(()=>[l.createVNode(iZ,{colspan:i.maxColumnCount,class:"table__search-th","data-testid":`${e.dataTestid}-SearchRow-Search`},{default:l.withCtx(()=>[l.renderSlot(p.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"])):l.createCommentVNode("",!0)],8,M7g)):l.createCommentVNode("",!0),l.renderSlot(p.$slots,"body-group",{},()=>[p.$slots.body?(l.openBlock(),l.createElementBlock("tbody",{key:0,ref_key:"tbodyRef",ref:s,class:"table__body","data-testid":`${e.dataTestid}-Tbody`},[l.renderSlot(p.$slots,"body",{},void 0,!0)],8,H7g)):l.createCommentVNode("",!0)],!0)],!0)],8,R7g)]),_:3},8,["is-show-vertical-scroll","is-show-horizontal-scroll","data-testid"]))}}),[["__scopeId","data-v-114a4670"]]),f7g=["data-testid"],QX=vg(l.defineComponent({name:"TableRow",__name:"TableRowNew",props:{type:{default:"default"},isObserved:{type:Boolean},observer:{},scrolledElement:{},dataTestid:{},colspan:{default:1},rowspan:{}},setup(C){const g=C,I=l.computed(()=>[{"table-row_active":g.type==="selected"}]);return(e,t)=>(l.openBlock(),l.createElementBlock("tr",{class:l.normalizeClass(["table-row",I.value]),"data-testid":g.dataTestid},[l.renderSlot(e.$slots,"default",{},void 0,!0)],10,f7g))}}),[["__scopeId","data-v-c206465d"]]),S7g=["data-testid"],fB=vg(l.defineComponent({name:"HeadTableRow",__name:"HeadTableRowNew",props:{dataTestid:{default:"TableRow"}},setup(C){const g=C;return(I,e)=>(l.openBlock(),l.createElementBlock("tr",{class:"head-table-row","data-testid":g.dataTestid},[l.renderSlot(I.$slots,"default",{},void 0,!0)],8,S7g))}}),[["__scopeId","data-v-3c1412bd"]]),D7g={class:"scroll-wrapper__vertical-wrapper"},k7g={class:"scroll-wrapper__horizont-wrapper"},F7g=vg(l.defineComponent({name:"ScrollWrapper",__name:"ScrollWrapperNew",props:{isShowVerticalScroll:{type:Boolean,default:!1},isShowHorizontalScroll:{type:Boolean,default:!1}},emits:["unmount-scroll","unmount-paginate","on-mounted"],setup(C,{expose:g,emit:I}){const e=I,t=l.ref(null),i=l.ref(null),A=l.ref(null),n=l.ref(null),s=l.ref(null),o=l.ref(null),{onTrackClick:a,startDrag:d,changeBarPosition:m,setVerticalBarHeight:Z,verticalTrackClass:b,isExistVerticalTrack:h}=vF(t,i,n,A),{changeBarPosition:G,startDrag:w,onTrackClick:B,setHorizontalBarWidth:p,horizontalTrackClass:Y,isExistHorizontalTrack:y}=LF(t,i,o,s),R=E=>{m(),G(),e("unmount-scroll",E)},X=()=>{requestAnimationFrame(()=>{K(),D()})},K=()=>{if(!t.value||!i.value)return;const E=getComputedStyle(i.value),T=i.value.style.minHeight||E.minHeight,q=i.value.style.maxHeight||E.maxHeight,cg=i.value.style.height;jI({"--scroll-wrapper-height":`${cg}`,"--scroll-wrapper-max-height":`${q}`,"--scroll-wrapper-min-height":`${T}`},i.value)},D=()=>{Z(),p(),m(),G()},F=()=>{t.value&&t.value.addEventListener("scroll",R)},z=()=>{t.value&&(t.value.scrollTop=0)},v=new MutationObserver(()=>{X()}),O=new ResizeObserver(()=>{X()}),eg=E=>{v.observe(E,{childList:!0,subtree:!0,attributes:!0}),O.observe(E)};return g({scrollToTop:z,setHeightSlot:K}),l.onMounted(()=>{X(),F(),i.value&&eg(i.value),A.value&&eg(A.value),window.addEventListener("resize",X),e("on-mounted")}),l.onUnmounted(()=>{window.removeEventListener("resize",X)}),(E,T)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"scrollWrapperRef",ref:i,class:"scroll-wrapper"},[l.createElementVNode("div",D7g,[l.createElementVNode("div",k7g,[l.createElementVNode("div",{ref_key:"slotRef",ref:t,class:"scroll-wrapper__slot"},[l.renderSlot(E.$slots,"default",{},void 0,!0)],512),l.unref(y)||C.isShowHorizontalScroll?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"horizontTrackRef",ref:s,class:l.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_horizont",l.unref(Y)]),onClick:T[1]||(T[1]=l.withModifiers((...q)=>l.unref(B)&&l.unref(B)(...q),["prevent","left"]))},[l.createElementVNode("div",{ref_key:"horizontBarRef",ref:o,class:"scroll-wrapper__bar",onMousedown:T[0]||(T[0]=l.withModifiers((...q)=>l.unref(w)&&l.unref(w)(...q),["prevent","left"]))},null,544)],2)):l.createCommentVNode("",!0)]),l.unref(h)||C.isShowVerticalScroll?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"verticalTrackRef",ref:A,class:l.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_vertical",l.unref(b)]),onClick:T[3]||(T[3]=l.withModifiers((...q)=>l.unref(a)&&l.unref(a)(...q),["prevent","left"]))},[l.createElementVNode("div",{ref_key:"verticalBarRef",ref:n,class:"scroll-wrapper__bar",onMousedown:T[2]||(T[2]=l.withModifiers((...q)=>l.unref(d)&&l.unref(d)(...q),["prevent","left"]))},null,544)],2)):l.createCommentVNode("",!0)])],512))}}),[["__scopeId","data-v-47c0a1a0"]]),K7g=["data-testid"],z7g=["data-testid"],J7g=["data-testid"],OX=vg(l.defineComponent({name:"TableSimple",__name:"TableSimple",props:{dataTestid:{default:"TableSimple"}},setup(C,{expose:g}){const I=C,e=l.ref(null),t=l.ref(null),i=l.ref(null),A=l.ref(null),n=l.computed(()=>{let s=1;if(t.value)for(let o=0;o<t.value.children.length;o++)s=Math.max(t.value.children[o].children.length,s);return s});return g({tbodyRef:i,tableRef:e,theadRef:t}),(s,o)=>(l.openBlock(),l.createElementBlock("table",{ref_key:"tableRef",ref:e,class:"simple-table-yui-kit","data-testid":`${I.dataTestid}`},[l.renderSlot(s.$slots,"default",{},()=>[l.renderSlot(s.$slots,"colspan",{},void 0,!0),s.$slots.head?(l.openBlock(),l.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:t,class:"simple-table-yui-kit__head","data-testid":`${I.dataTestid}-Thead`},[l.renderSlot(s.$slots,"head",{},void 0,!0),s.$slots.search?(l.openBlock(),l.createBlock(fB,{key:0,class:"table-new-yui-kit__search",ref_key:"searchRowRef",ref:A,"data-testid":`${I.dataTestid}-Search-Row`},{default:l.withCtx(()=>[l.createVNode(iZ,{colspan:n.value,class:"table-new-yui-kit__th","data-testid":`${I.dataTestid}-SearchRow-Search`},{default:l.withCtx(()=>[l.renderSlot(s.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"])):l.createCommentVNode("",!0)],8,z7g)):l.createCommentVNode("",!0),l.renderSlot(s.$slots,"body-group",{},()=>[s.$slots.body?(l.openBlock(),l.createElementBlock("tbody",{key:0,ref_key:"tbodyRef",ref:i,class:"simple-table-yui-kit__body","data-testid":`${I.dataTestid}-Tbody`},[l.renderSlot(s.$slots,"body",{},void 0,!0)],8,J7g)):l.createCommentVNode("",!0)],!0)],!0)],8,K7g))}}),[["__scopeId","data-v-1ea4994c"]]),x7g=["data-testid"],T7g=["data-testid"],L7g=["onClick","data-testid"],v7g=["data-testid"],UX=vg(l.defineComponent({name:"Tabs",__name:"Tabs",props:{defaultActiveTabId:{},tabCount:{},dataTestid:{default:"Tabs"}},emits:["unmount-tab"],setup(C,{emit:g}){const I=C,e=g,t=l.reactive({activeTab:1}),i=n=>Array.from({length:n},(s,o)=>o+1);l.watch(()=>I.defaultActiveTabId,()=>{I.defaultActiveTabId&&(t.activeTab=I.defaultActiveTabId)},{immediate:!0});const A=n=>{t.activeTab=n,e("unmount-tab",n)};return(n,s)=>(l.openBlock(),l.createElementBlock("div",{"data-testid":I.dataTestid,class:"tabs"},[l.createElementVNode("nav",{class:"tabs__navigation","data-testid":`${I.dataTestid}-Navigation`},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i(I.tabCount),o=>(l.openBlock(),l.createElementBlock("button",{key:o,onClick:a=>A(o),class:l.normalizeClass(["tabs__navigation-button",{active:t.activeTab===o}]),"data-testid":`${I.dataTestid}-Navigation-Button`},[l.renderSlot(n.$slots,`header${o}`,{},void 0,!0)],10,L7g))),128))],8,T7g),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i(I.tabCount),o=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:o},[t.activeTab===o?(l.openBlock(),l.createElementBlock("article",{key:0,"data-testid":`${I.dataTestid}-Content`,class:"tabs__navigation-content"},[l.renderSlot(n.$slots,`tab${o}`,{},void 0,!0)],8,v7g)):l.createCommentVNode("",!0)],64))),128))],8,x7g))}}),[["__scopeId","data-v-298e57cf"]]);function bt(C){this.content=C}bt.prototype={constructor:bt,find:function(C){for(var g=0;g<this.content.length;g+=2)if(this.content[g]===C)return g;return-1},get:function(C){var g=this.find(C);return g==-1?void 0:this.content[g+1]},update:function(C,g,I){var e=I&&I!=C?this.remove(I):this,t=e.find(C),i=e.content.slice();return t==-1?i.push(I||C,g):(i[t+1]=g,I&&(i[t]=I)),new bt(i)},remove:function(C){var g=this.find(C);if(g==-1)return this;var I=this.content.slice();return I.splice(g,2),new bt(I)},addToStart:function(C,g){return new bt([C,g].concat(this.remove(C).content))},addToEnd:function(C,g){var I=this.remove(C).content.slice();return I.push(C,g),new bt(I)},addBefore:function(C,g,I){var e=this.remove(g),t=e.content.slice(),i=e.find(C);return t.splice(i==-1?t.length:i,0,g,I),new bt(t)},forEach:function(C){for(var g=0;g<this.content.length;g+=2)C(this.content[g],this.content[g+1])},prepend:function(C){return C=bt.from(C),C.size?new bt(C.content.concat(this.subtract(C).content)):this},append:function(C){return C=bt.from(C),C.size?new bt(this.subtract(C).content.concat(C.content)):this},subtract:function(C){var g=this;C=bt.from(C);for(var I=0;I<C.content.length;I+=2)g=g.remove(C.content[I]);return g},toObject:function(){var C={};return this.forEach(function(g,I){C[g]=I}),C},get size(){return this.content.length>>1}},bt.from=function(C){if(C instanceof bt)return C;var g=[];if(C)for(var I in C)g.push(I,C[I]);return new bt(g)};function QF(C,g,I){for(let e=0;;e++){if(e==C.childCount||e==g.childCount)return C.childCount==g.childCount?null:I;let t=C.child(e),i=g.child(e);if(t==i){I+=t.nodeSize;continue}if(!t.sameMarkup(i))return I;if(t.isText&&t.text!=i.text){let A=t.text,n=i.text,s=0;for(;A[s]==n[s];s++)I++;return s&&s<A.length&&s<n.length&&EF(A.charCodeAt(s-1))&&UF(A.charCodeAt(s))&&I--,I}if(t.content.size||i.content.size){let A=QF(t.content,i.content,I+1);if(A!=null)return A}I+=t.nodeSize}}function OF(C,g,I,e){for(let t=C.childCount,i=g.childCount;;){if(t==0||i==0)return t==i?null:{a:I,b:e};let A=C.child(--t),n=g.child(--i),s=A.nodeSize;if(A==n){I-=s,e-=s;continue}if(!A.sameMarkup(n))return{a:I,b:e};if(A.isText&&A.text!=n.text){let o=A.text,a=n.text,d=o.length,m=a.length;for(;d>0&&m>0&&o[d-1]==a[m-1];)d--,m--,I--,e--;return d&&m&&d<o.length&&EF(o.charCodeAt(d-1))&&UF(o.charCodeAt(d))&&(I++,e++),{a:I,b:e}}if(A.content.size||n.content.size){let o=OF(A.content,n.content,I-1,e-1);if(o)return o}I-=s,e-=s}}function UF(C){return C>=56320&&C<57344}function EF(C){return C>=55296&&C<56320}let Mg=class Vi{constructor(g,I){if(this.content=g,this.size=I||0,I==null)for(let e=0;e<g.length;e++)this.size+=g[e].nodeSize}nodesBetween(g,I,e,t=0,i){for(let A=0,n=0;n<I;A++){let s=this.content[A],o=n+s.nodeSize;if(o>g&&e(s,t+n,i||null,A)!==!1&&s.content.size){let a=n+1;s.nodesBetween(Math.max(0,g-a),Math.min(s.content.size,I-a),e,t+a)}n=o}}descendants(g){this.nodesBetween(0,this.size,g)}textBetween(g,I,e,t){let i="",A=!0;return this.nodesBetween(g,I,(n,s)=>{let o=n.isText?n.text.slice(Math.max(g,s)-s,I-s):n.isLeaf?t?typeof t=="function"?t(n):t:n.type.spec.leafText?n.type.spec.leafText(n):"":"";n.isBlock&&(n.isLeaf&&o||n.isTextblock)&&e&&(A?A=!1:i+=e),i+=o},0),i}append(g){if(!g.size)return this;if(!this.size)return g;let I=this.lastChild,e=g.firstChild,t=this.content.slice(),i=0;for(I.isText&&I.sameMarkup(e)&&(t[t.length-1]=I.withText(I.text+e.text),i=1);i<g.content.length;i++)t.push(g.content[i]);return new Vi(t,this.size+g.size)}cut(g,I=this.size){if(g==0&&I==this.size)return this;let e=[],t=0;if(I>g)for(let i=0,A=0;A<I;i++){let n=this.content[i],s=A+n.nodeSize;s>g&&((A<g||s>I)&&(n.isText?n=n.cut(Math.max(0,g-A),Math.min(n.text.length,I-A)):n=n.cut(Math.max(0,g-A-1),Math.min(n.content.size,I-A-1))),e.push(n),t+=n.nodeSize),A=s}return new Vi(e,t)}cutByIndex(g,I){return g==I?Vi.empty:g==0&&I==this.content.length?this:new Vi(this.content.slice(g,I))}replaceChild(g,I){let e=this.content[g];if(e==I)return this;let t=this.content.slice(),i=this.size+I.nodeSize-e.nodeSize;return t[g]=I,new Vi(t,i)}addToStart(g){return new Vi([g].concat(this.content),this.size+g.nodeSize)}addToEnd(g){return new Vi(this.content.concat(g),this.size+g.nodeSize)}eq(g){if(this.content.length!=g.content.length)return!1;for(let I=0;I<this.content.length;I++)if(!this.content[I].eq(g.content[I]))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(g){let I=this.content[g];if(!I)throw new RangeError("Index "+g+" out of range for "+this);return I}maybeChild(g){return this.content[g]||null}forEach(g){for(let I=0,e=0;I<this.content.length;I++){let t=this.content[I];g(t,e,I),e+=t.nodeSize}}findDiffStart(g,I=0){return QF(this,g,I)}findDiffEnd(g,I=this.size,e=g.size){return OF(this,g,I,e)}findIndex(g){if(g==0)return SB(0,g);if(g==this.size)return SB(this.content.length,g);if(g>this.size||g<0)throw new RangeError(`Position ${g} outside of fragment (${this})`);for(let I=0,e=0;;I++){let t=this.child(I),i=e+t.nodeSize;if(i>=g)return i==g?SB(I+1,i):SB(I,e);e=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(g=>g.toJSON()):null}static fromJSON(g,I){if(!I)return Vi.empty;if(!Array.isArray(I))throw new RangeError("Invalid input for Fragment.fromJSON");return Vi.fromArray(I.map(g.nodeFromJSON))}static fromArray(g){if(!g.length)return Vi.empty;let I,e=0;for(let t=0;t<g.length;t++){let i=g[t];e+=i.nodeSize,t&&i.isText&&g[t-1].sameMarkup(i)?(I||(I=g.slice(0,t)),I[I.length-1]=i.withText(I[I.length-1].text+i.text)):I&&I.push(i)}return new Vi(I||g,e)}static from(g){if(!g)return Vi.empty;if(g instanceof Vi)return g;if(Array.isArray(g))return this.fromArray(g);if(g.attrs)return new Vi([g],g.nodeSize);throw new RangeError("Can not convert "+g+" to a Fragment"+(g.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};Mg.empty=new Mg([],0);const EX={index:0,offset:0};function SB(C,g){return EX.index=C,EX.offset=g,EX}function DB(C,g){if(C===g)return!0;if(!(C&&typeof C=="object")||!(g&&typeof g=="object"))return!1;let I=Array.isArray(C);if(Array.isArray(g)!=I)return!1;if(I){if(C.length!=g.length)return!1;for(let e=0;e<C.length;e++)if(!DB(C[e],g[e]))return!1}else{for(let e in C)if(!(e in g)||!DB(C[e],g[e]))return!1;for(let e in g)if(!(e in C))return!1}return!0}let pC=class RH{constructor(g,I){this.type=g,this.attrs=I}addToSet(g){let I,e=!1;for(let t=0;t<g.length;t++){let i=g[t];if(this.eq(i))return g;if(this.type.excludes(i.type))I||(I=g.slice(0,t));else{if(i.type.excludes(this.type))return g;!e&&i.type.rank>this.type.rank&&(I||(I=g.slice(0,t)),I.push(this),e=!0),I&&I.push(i)}}return I||(I=g.slice()),e||I.push(this),I}removeFromSet(g){for(let I=0;I<g.length;I++)if(this.eq(g[I]))return g.slice(0,I).concat(g.slice(I+1));return g}isInSet(g){for(let I=0;I<g.length;I++)if(this.eq(g[I]))return!0;return!1}eq(g){return this==g||this.type==g.type&&DB(this.attrs,g.attrs)}toJSON(){let g={type:this.type.name};for(let I in this.attrs){g.attrs=this.attrs;break}return g}static fromJSON(g,I){if(!I)throw new RangeError("Invalid input for Mark.fromJSON");let e=g.marks[I.type];if(!e)throw new RangeError(`There is no mark type ${I.type} in this schema`);let t=e.create(I.attrs);return e.checkAttrs(t.attrs),t}static sameSet(g,I){if(g==I)return!0;if(g.length!=I.length)return!1;for(let e=0;e<g.length;e++)if(!g[e].eq(I[e]))return!1;return!0}static setFrom(g){if(!g||Array.isArray(g)&&g.length==0)return RH.none;if(g instanceof RH)return[g];let I=g.slice();return I.sort((e,t)=>e.type.rank-t.type.rank),I}};pC.none=[];let vu=class extends Error{},jg=class Mb{constructor(g,I,e){this.content=g,this.openStart=I,this.openEnd=e}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(g,I){let e=_F(this.content,g+this.openStart,I,this.openStart+1,this.openEnd+1);return e&&new Mb(e,this.openStart,this.openEnd)}removeBetween(g,I){return new Mb(PF(this.content,g+this.openStart,I+this.openStart),this.openStart,this.openEnd)}eq(g){return this.content.eq(g.content)&&this.openStart==g.openStart&&this.openEnd==g.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let g={content:this.content.toJSON()};return this.openStart>0&&(g.openStart=this.openStart),this.openEnd>0&&(g.openEnd=this.openEnd),g}static fromJSON(g,I){if(!I)return Mb.empty;let e=I.openStart||0,t=I.openEnd||0;if(typeof e!="number"||typeof t!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Mb(Mg.fromJSON(g,I.content),e,t)}static maxOpen(g,I=!0){let e=0,t=0;for(let i=g.firstChild;i&&!i.isLeaf&&(I||!i.type.spec.isolating);i=i.firstChild)e++;for(let i=g.lastChild;i&&!i.isLeaf&&(I||!i.type.spec.isolating);i=i.lastChild)t++;return new Mb(g,e,t)}};jg.empty=new jg(Mg.empty,0,0);function PF(C,g,I){let{index:e,offset:t}=C.findIndex(g),i=C.maybeChild(e),{index:A,offset:n}=C.findIndex(I);if(t==g||i.isText){if(n!=I&&!C.child(A).isText)throw new RangeError("Removing non-flat range");return C.cut(0,g).append(C.cut(I))}if(e!=A)throw new RangeError("Removing non-flat range");return C.replaceChild(e,i.copy(PF(i.content,g-t-1,I-t-1)))}function _F(C,g,I,e,t,i){let{index:A,offset:n}=C.findIndex(g),s=C.maybeChild(A);if(n==g||s.isText)return i&&e<=0&&t<=0&&!i.canReplace(A,A,I)?null:C.cut(0,g).append(I).append(C.cut(g));let o=_F(s.content,g-n-1,I,A==0?e-1:0,A==C.childCount-1?t-1:0,s);return o&&C.replaceChild(A,s.copy(o))}function j7g(C,g,I){if(I.openStart>C.depth)throw new vu("Inserted content deeper than insertion position");if(C.depth-I.openStart!=g.depth-I.openEnd)throw new vu("Inconsistent open depths");return qF(C,g,I,0)}function qF(C,g,I,e){let t=C.index(e),i=C.node(e);if(t==g.index(e)&&e<C.depth-I.openStart){let A=qF(C,g,I,e+1);return i.copy(i.content.replaceChild(t,A))}else if(I.content.size)if(!I.openStart&&!I.openEnd&&C.depth==e&&g.depth==e){let A=C.parent,n=A.content;return Zc(A,n.cut(0,C.parentOffset).append(I.content).append(n.cut(g.parentOffset)))}else{let{start:A,end:n}=Q7g(I,C);return Zc(i,gK(C,A,n,g,e))}else return Zc(i,kB(C,g,e))}function $F(C,g){if(!g.type.compatibleContent(C.type))throw new vu("Cannot join "+g.type.name+" onto "+C.type.name)}function PX(C,g,I){let e=C.node(I);return $F(e,g.node(I)),e}function rc(C,g){let I=g.length-1;I>=0&&C.isText&&C.sameMarkup(g[I])?g[I]=C.withText(g[I].text+C.text):g.push(C)}function ju(C,g,I,e){let t=(g||C).node(I),i=0,A=g?g.index(I):t.childCount;C&&(i=C.index(I),C.depth>I?i++:C.textOffset&&(rc(C.nodeAfter,e),i++));for(let n=i;n<A;n++)rc(t.child(n),e);g&&g.depth==I&&g.textOffset&&rc(g.nodeBefore,e)}function Zc(C,g){if(!C.type.validContent(g))throw new vu("Invalid content for node "+C.type.name);return C.copy(g)}function gK(C,g,I,e,t){let i=C.depth>t&&PX(C,g,t+1),A=e.depth>t&&PX(I,e,t+1),n=[];return ju(null,C,t,n),i&&A&&g.index(t)==I.index(t)?($F(i,A),rc(Zc(i,gK(C,g,I,e,t+1)),n)):(i&&rc(Zc(i,kB(C,g,t+1)),n),ju(g,I,t,n),A&&rc(Zc(A,kB(I,e,t+1)),n)),ju(e,null,t,n),new Mg(n)}function kB(C,g,I){let e=[];if(ju(null,C,I,e),C.depth>I){let t=PX(C,g,I+1);rc(Zc(t,kB(C,g,I+1)),e)}return ju(g,null,I,e),new Mg(e)}function Q7g(C,g){let I=g.depth-C.openStart,t=g.node(I).copy(C.content);for(let i=I-1;i>=0;i--)t=g.node(i).copy(Mg.from(t));return{start:t.resolveNoCache(C.openStart+I),end:t.resolveNoCache(t.content.size-C.openEnd-I)}}class Qu{constructor(g,I,e){this.pos=g,this.path=I,this.parentOffset=e,this.depth=I.length/3-1}resolveDepth(g){return g==null?this.depth:g<0?this.depth+g:g}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(g){return this.path[this.resolveDepth(g)*3]}index(g){return this.path[this.resolveDepth(g)*3+1]}indexAfter(g){return g=this.resolveDepth(g),this.index(g)+(g==this.depth&&!this.textOffset?0:1)}start(g){return g=this.resolveDepth(g),g==0?0:this.path[g*3-1]+1}end(g){return g=this.resolveDepth(g),this.start(g)+this.node(g).content.size}before(g){if(g=this.resolveDepth(g),!g)throw new RangeError("There is no position before the top-level node");return g==this.depth+1?this.pos:this.path[g*3-1]}after(g){if(g=this.resolveDepth(g),!g)throw new RangeError("There is no position after the top-level node");return g==this.depth+1?this.pos:this.path[g*3-1]+this.path[g*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let g=this.parent,I=this.index(this.depth);if(I==g.childCount)return null;let e=this.pos-this.path[this.path.length-1],t=g.child(I);return e?g.child(I).cut(e):t}get nodeBefore(){let g=this.index(this.depth),I=this.pos-this.path[this.path.length-1];return I?this.parent.child(g).cut(0,I):g==0?null:this.parent.child(g-1)}posAtIndex(g,I){I=this.resolveDepth(I);let e=this.path[I*3],t=I==0?0:this.path[I*3-1]+1;for(let i=0;i<g;i++)t+=e.child(i).nodeSize;return t}marks(){let g=this.parent,I=this.index();if(g.content.size==0)return pC.none;if(this.textOffset)return g.child(I).marks;let e=g.maybeChild(I-1),t=g.maybeChild(I);if(!e){let n=e;e=t,t=n}let i=e.marks;for(var A=0;A<i.length;A++)i[A].type.spec.inclusive===!1&&(!t||!i[A].isInSet(t.marks))&&(i=i[A--].removeFromSet(i));return i}marksAcross(g){let I=this.parent.maybeChild(this.index());if(!I||!I.isInline)return null;let e=I.marks,t=g.parent.maybeChild(g.index());for(var i=0;i<e.length;i++)e[i].type.spec.inclusive===!1&&(!t||!e[i].isInSet(t.marks))&&(e=e[i--].removeFromSet(e));return e}sharedDepth(g){for(let I=this.depth;I>0;I--)if(this.start(I)<=g&&this.end(I)>=g)return I;return 0}blockRange(g=this,I){if(g.pos<this.pos)return g.blockRange(this);for(let e=this.depth-(this.parent.inlineContent||this.pos==g.pos?1:0);e>=0;e--)if(g.pos<=this.end(e)&&(!I||I(this.node(e))))return new FB(this,g,e);return null}sameParent(g){return this.pos-this.parentOffset==g.pos-g.parentOffset}max(g){return g.pos>this.pos?g:this}min(g){return g.pos<this.pos?g:this}toString(){let g="";for(let I=1;I<=this.depth;I++)g+=(g?"/":"")+this.node(I).type.name+"_"+this.index(I-1);return g+":"+this.parentOffset}static resolve(g,I){if(!(I>=0&&I<=g.content.size))throw new RangeError("Position "+I+" out of range");let e=[],t=0,i=I;for(let A=g;;){let{index:n,offset:s}=A.content.findIndex(i),o=i-s;if(e.push(A,n,t+s),!o||(A=A.child(n),A.isText))break;i=o-1,t+=s+1}return new Qu(I,e,i)}static resolveCached(g,I){let e=IK.get(g);if(e)for(let i=0;i<e.elts.length;i++){let A=e.elts[i];if(A.pos==I)return A}else IK.set(g,e=new O7g);let t=e.elts[e.i]=Qu.resolve(g,I);return e.i=(e.i+1)%U7g,t}}class O7g{constructor(){this.elts=[],this.i=0}}const U7g=12,IK=new WeakMap;class FB{constructor(g,I,e){this.$from=g,this.$to=I,this.depth=e}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 E7g=Object.create(null);let la=class MH{constructor(g,I,e,t=pC.none){this.type=g,this.attrs=I,this.marks=t,this.content=e||Mg.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(g){return this.content.child(g)}maybeChild(g){return this.content.maybeChild(g)}forEach(g){this.content.forEach(g)}nodesBetween(g,I,e,t=0){this.content.nodesBetween(g,I,e,t,this)}descendants(g){this.nodesBetween(0,this.content.size,g)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(g,I,e,t){return this.content.textBetween(g,I,e,t)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(g){return this==g||this.sameMarkup(g)&&this.content.eq(g.content)}sameMarkup(g){return this.hasMarkup(g.type,g.attrs,g.marks)}hasMarkup(g,I,e){return this.type==g&&DB(this.attrs,I||g.defaultAttrs||E7g)&&pC.sameSet(this.marks,e||pC.none)}copy(g=null){return g==this.content?this:new MH(this.type,this.attrs,g,this.marks)}mark(g){return g==this.marks?this:new MH(this.type,this.attrs,this.content,g)}cut(g,I=this.content.size){return g==0&&I==this.content.size?this:this.copy(this.content.cut(g,I))}slice(g,I=this.content.size,e=!1){if(g==I)return jg.empty;let t=this.resolve(g),i=this.resolve(I),A=e?0:t.sharedDepth(I),n=t.start(A),o=t.node(A).content.cut(t.pos-n,i.pos-n);return new jg(o,t.depth-A,i.depth-A)}replace(g,I,e){return j7g(this.resolve(g),this.resolve(I),e)}nodeAt(g){for(let I=this;;){let{index:e,offset:t}=I.content.findIndex(g);if(I=I.maybeChild(e),!I)return null;if(t==g||I.isText)return I;g-=t+1}}childAfter(g){let{index:I,offset:e}=this.content.findIndex(g);return{node:this.content.maybeChild(I),index:I,offset:e}}childBefore(g){if(g==0)return{node:null,index:0,offset:0};let{index:I,offset:e}=this.content.findIndex(g);if(e<g)return{node:this.content.child(I),index:I,offset:e};let t=this.content.child(I-1);return{node:t,index:I-1,offset:e-t.nodeSize}}resolve(g){return Qu.resolveCached(this,g)}resolveNoCache(g){return Qu.resolve(this,g)}rangeHasMark(g,I,e){let t=!1;return I>g&&this.nodesBetween(g,I,i=>(e.isInSet(i.marks)&&(t=!0),!t)),t}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 g=this.type.name;return this.content.size&&(g+="("+this.content.toStringInner()+")"),CK(this.marks,g)}contentMatchAt(g){let I=this.type.contentMatch.matchFragment(this.content,0,g);if(!I)throw new Error("Called contentMatchAt on a node with invalid content");return I}canReplace(g,I,e=Mg.empty,t=0,i=e.childCount){let A=this.contentMatchAt(g).matchFragment(e,t,i),n=A&&A.matchFragment(this.content,I);if(!n||!n.validEnd)return!1;for(let s=t;s<i;s++)if(!this.type.allowsMarks(e.child(s).marks))return!1;return!0}canReplaceWith(g,I,e,t){if(t&&!this.type.allowsMarks(t))return!1;let i=this.contentMatchAt(g).matchType(e),A=i&&i.matchFragment(this.content,I);return A?A.validEnd:!1}canAppend(g){return g.content.size?this.canReplace(this.childCount,this.childCount,g.content):this.type.compatibleContent(g.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let g=pC.none;for(let I=0;I<this.marks.length;I++){let e=this.marks[I];e.type.checkAttrs(e.attrs),g=e.addToSet(g)}if(!pC.sameSet(g,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(I=>I.type.name)}`);this.content.forEach(I=>I.check())}toJSON(){let g={type:this.type.name};for(let I in this.attrs){g.attrs=this.attrs;break}return this.content.size&&(g.content=this.content.toJSON()),this.marks.length&&(g.marks=this.marks.map(I=>I.toJSON())),g}static fromJSON(g,I){if(!I)throw new RangeError("Invalid input for Node.fromJSON");let e;if(I.marks){if(!Array.isArray(I.marks))throw new RangeError("Invalid mark data for Node.fromJSON");e=I.marks.map(g.markFromJSON)}if(I.type=="text"){if(typeof I.text!="string")throw new RangeError("Invalid text node in JSON");return g.text(I.text,e)}let t=Mg.fromJSON(g,I.content),i=g.nodeType(I.type).create(I.attrs,t,e);return i.type.checkAttrs(i.attrs),i}};la.prototype.text=void 0;class KB extends la{constructor(g,I,e,t){if(super(g,I,null,t),!e)throw new RangeError("Empty text nodes are not allowed");this.text=e}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):CK(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(g,I){return this.text.slice(g,I)}get nodeSize(){return this.text.length}mark(g){return g==this.marks?this:new KB(this.type,this.attrs,this.text,g)}withText(g){return g==this.text?this:new KB(this.type,this.attrs,g,this.marks)}cut(g=0,I=this.text.length){return g==0&&I==this.text.length?this:this.withText(this.text.slice(g,I))}eq(g){return this.sameMarkup(g)&&this.text==g.text}toJSON(){let g=super.toJSON();return g.text=this.text,g}}function CK(C,g){for(let I=C.length-1;I>=0;I--)g=C[I].type.name+"("+g+")";return g}class bc{constructor(g){this.validEnd=g,this.next=[],this.wrapCache=[]}static parse(g,I){let e=new P7g(g,I);if(e.next==null)return bc.empty;let t=eK(e);e.next&&e.err("Unexpected trailing text");let i=eEg(CEg(t));return tEg(i,e),i}matchType(g){for(let I=0;I<this.next.length;I++)if(this.next[I].type==g)return this.next[I].next;return null}matchFragment(g,I=0,e=g.childCount){let t=this;for(let i=I;t&&i<e;i++)t=t.matchType(g.child(i).type);return t}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let g=0;g<this.next.length;g++){let{type:I}=this.next[g];if(!(I.isText||I.hasRequiredAttrs()))return I}return null}compatible(g){for(let I=0;I<this.next.length;I++)for(let e=0;e<g.next.length;e++)if(this.next[I].type==g.next[e].type)return!0;return!1}fillBefore(g,I=!1,e=0){let t=[this];function i(A,n){let s=A.matchFragment(g,e);if(s&&(!I||s.validEnd))return Mg.from(n.map(o=>o.createAndFill()));for(let o=0;o<A.next.length;o++){let{type:a,next:d}=A.next[o];if(!(a.isText||a.hasRequiredAttrs())&&t.indexOf(d)==-1){t.push(d);let m=i(d,n.concat(a));if(m)return m}}return null}return i(this,[])}findWrapping(g){for(let e=0;e<this.wrapCache.length;e+=2)if(this.wrapCache[e]==g)return this.wrapCache[e+1];let I=this.computeWrapping(g);return this.wrapCache.push(g,I),I}computeWrapping(g){let I=Object.create(null),e=[{match:this,type:null,via:null}];for(;e.length;){let t=e.shift(),i=t.match;if(i.matchType(g)){let A=[];for(let n=t;n.type;n=n.via)A.push(n.type);return A.reverse()}for(let A=0;A<i.next.length;A++){let{type:n,next:s}=i.next[A];!n.isLeaf&&!n.hasRequiredAttrs()&&!(n.name in I)&&(!t.type||s.validEnd)&&(e.push({match:n.contentMatch,type:n,via:t}),I[n.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(g){if(g>=this.next.length)throw new RangeError(`There's no ${g}th edge in this content match`);return this.next[g]}toString(){let g=[];function I(e){g.push(e);for(let t=0;t<e.next.length;t++)g.indexOf(e.next[t].next)==-1&&I(e.next[t].next)}return I(this),g.map((e,t)=>{let i=t+(e.validEnd?"*":" ")+" ";for(let A=0;A<e.next.length;A++)i+=(A?", ":"")+e.next[A].type.name+"->"+g.indexOf(e.next[A].next);return i}).join(`
1619
1619
  `)}}bc.empty=new bc(!0);class P7g{constructor(g,I){this.string=g,this.nodeTypes=I,this.inline=null,this.pos=0,this.tokens=g.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(g){return this.next==g&&(this.pos++||!0)}err(g){throw new SyntaxError(g+" (in content expression '"+this.string+"')")}}function eK(C){let g=[];do g.push(_7g(C));while(C.eat("|"));return g.length==1?g[0]:{type:"choice",exprs:g}}function _7g(C){let g=[];do g.push(q7g(C));while(C.next&&C.next!=")"&&C.next!="|");return g.length==1?g[0]:{type:"seq",exprs:g}}function q7g(C){let g=IEg(C);for(;;)if(C.eat("+"))g={type:"plus",expr:g};else if(C.eat("*"))g={type:"star",expr:g};else if(C.eat("?"))g={type:"opt",expr:g};else if(C.eat("{"))g=$7g(C,g);else break;return g}function tK(C){/\D/.test(C.next)&&C.err("Expected number, got '"+C.next+"'");let g=Number(C.next);return C.pos++,g}function $7g(C,g){let I=tK(C),e=I;return C.eat(",")&&(C.next!="}"?e=tK(C):e=-1),C.eat("}")||C.err("Unclosed braced range"),{type:"range",min:I,max:e,expr:g}}function gEg(C,g){let I=C.nodeTypes,e=I[g];if(e)return[e];let t=[];for(let i in I){let A=I[i];A.isInGroup(g)&&t.push(A)}return t.length==0&&C.err("No node type or group '"+g+"' found"),t}function IEg(C){if(C.eat("(")){let g=eK(C);return C.eat(")")||C.err("Missing closing paren"),g}else if(/\W/.test(C.next))C.err("Unexpected token '"+C.next+"'");else{let g=gEg(C,C.next).map(I=>(C.inline==null?C.inline=I.isInline:C.inline!=I.isInline&&C.err("Mixing inline and block content"),{type:"name",value:I}));return C.pos++,g.length==1?g[0]:{type:"choice",exprs:g}}}function CEg(C){let g=[[]];return t(i(C,0),I()),g;function I(){return g.push([])-1}function e(A,n,s){let o={term:s,to:n};return g[A].push(o),o}function t(A,n){A.forEach(s=>s.to=n)}function i(A,n){if(A.type=="choice")return A.exprs.reduce((s,o)=>s.concat(i(o,n)),[]);if(A.type=="seq")for(let s=0;;s++){let o=i(A.exprs[s],n);if(s==A.exprs.length-1)return o;t(o,n=I())}else if(A.type=="star"){let s=I();return e(n,s),t(i(A.expr,s),s),[e(s)]}else if(A.type=="plus"){let s=I();return t(i(A.expr,n),s),t(i(A.expr,s),s),[e(s)]}else{if(A.type=="opt")return[e(n)].concat(i(A.expr,n));if(A.type=="range"){let s=n;for(let o=0;o<A.min;o++){let a=I();t(i(A.expr,s),a),s=a}if(A.max==-1)t(i(A.expr,s),s);else for(let o=A.min;o<A.max;o++){let a=I();e(s,a),t(i(A.expr,s),a),s=a}return[e(s)]}else{if(A.type=="name")return[e(n,void 0,A.value)];throw new Error("Unknown expr type")}}}}function iK(C,g){return g-C}function AK(C,g){let I=[];return e(g),I.sort(iK);function e(t){let i=C[t];if(i.length==1&&!i[0].term)return e(i[0].to);I.push(t);for(let A=0;A<i.length;A++){let{term:n,to:s}=i[A];!n&&I.indexOf(s)==-1&&e(s)}}}function eEg(C){let g=Object.create(null);return I(AK(C,0));function I(e){let t=[];e.forEach(A=>{C[A].forEach(({term:n,to:s})=>{if(!n)return;let o;for(let a=0;a<t.length;a++)t[a][0]==n&&(o=t[a][1]);AK(C,s).forEach(a=>{o||t.push([n,o=[]]),o.indexOf(a)==-1&&o.push(a)})})});let i=g[e.join(",")]=new bc(e.indexOf(C.length-1)>-1);for(let A=0;A<t.length;A++){let n=t[A][1].sort(iK);i.next.push({type:t[A][0],next:g[n.join(",")]||I(n)})}return i}}function tEg(C,g){for(let I=0,e=[C];I<e.length;I++){let t=e[I],i=!t.validEnd,A=[];for(let n=0;n<t.next.length;n++){let{type:s,next:o}=t.next[n];A.push(s.name),i&&!(s.isText||s.hasRequiredAttrs())&&(i=!1),e.indexOf(o)==-1&&e.push(o)}i&&g.err("Only non-generatable nodes ("+A.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function nK(C){let g=Object.create(null);for(let I in C){let e=C[I];if(!e.hasDefault)return null;g[I]=e.default}return g}function lK(C,g){let I=Object.create(null);for(let e in C){let t=g&&g[e];if(t===void 0){let i=C[e];if(i.hasDefault)t=i.default;else throw new RangeError("No value supplied for attribute "+e)}I[e]=t}return I}function sK(C,g,I,e){for(let t in g)if(!(t in C))throw new RangeError(`Unsupported attribute ${t} for ${I} of type ${e}`);for(let t in C)C[t].validate&&C[t].validate(g[t])}function oK(C,g){let I=Object.create(null);if(g)for(let e in g)I[e]=new AEg(C,e,g[e]);return I}let aK=class mQ{constructor(g,I,e){this.name=g,this.schema=I,this.spec=e,this.markSet=null,this.groups=e.group?e.group.split(" "):[],this.attrs=oK(g,e.attrs),this.defaultAttrs=nK(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(e.inline||g=="text"),this.isText=g=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==bc.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(g){return this.groups.indexOf(g)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let g in this.attrs)if(this.attrs[g].isRequired)return!0;return!1}compatibleContent(g){return this==g||this.contentMatch.compatible(g.contentMatch)}computeAttrs(g){return!g&&this.defaultAttrs?this.defaultAttrs:lK(this.attrs,g)}create(g=null,I,e){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new la(this,this.computeAttrs(g),Mg.from(I),pC.setFrom(e))}createChecked(g=null,I,e){return I=Mg.from(I),this.checkContent(I),new la(this,this.computeAttrs(g),I,pC.setFrom(e))}createAndFill(g=null,I,e){if(g=this.computeAttrs(g),I=Mg.from(I),I.size){let A=this.contentMatch.fillBefore(I);if(!A)return null;I=A.append(I)}let t=this.contentMatch.matchFragment(I),i=t&&t.fillBefore(Mg.empty,!0);return i?new la(this,g,I.append(i),pC.setFrom(e)):null}validContent(g){let I=this.contentMatch.matchFragment(g);if(!I||!I.validEnd)return!1;for(let e=0;e<g.childCount;e++)if(!this.allowsMarks(g.child(e).marks))return!1;return!0}checkContent(g){if(!this.validContent(g))throw new RangeError(`Invalid content for node ${this.name}: ${g.toString().slice(0,50)}`)}checkAttrs(g){sK(this.attrs,g,"node",this.name)}allowsMarkType(g){return this.markSet==null||this.markSet.indexOf(g)>-1}allowsMarks(g){if(this.markSet==null)return!0;for(let I=0;I<g.length;I++)if(!this.allowsMarkType(g[I].type))return!1;return!0}allowedMarks(g){if(this.markSet==null)return g;let I;for(let e=0;e<g.length;e++)this.allowsMarkType(g[e].type)?I&&I.push(g[e]):I||(I=g.slice(0,e));return I?I.length?I:pC.none:g}static compile(g,I){let e=Object.create(null);g.forEach((i,A)=>e[i]=new mQ(i,I,A));let t=I.spec.topNode||"doc";if(!e[t])throw new RangeError("Schema is missing its top node type ('"+t+"')");if(!e.text)throw new RangeError("Every schema needs a 'text' type");for(let i in e.text.attrs)throw new RangeError("The text node type should not have attributes");return e}};function iEg(C,g,I){let e=I.split("|");return t=>{let i=t===null?"null":typeof t;if(e.indexOf(i)<0)throw new RangeError(`Expected value of type ${e} for attribute ${g} on type ${C}, got ${i}`)}}class AEg{constructor(g,I,e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default,this.validate=typeof e.validate=="string"?iEg(g,I,e.validate):e.validate}get isRequired(){return!this.hasDefault}}class zB{constructor(g,I,e,t){this.name=g,this.rank=I,this.schema=e,this.spec=t,this.attrs=oK(g,t.attrs),this.excluded=null;let i=nK(this.attrs);this.instance=i?new pC(this,i):null}create(g=null){return!g&&this.instance?this.instance:new pC(this,lK(this.attrs,g))}static compile(g,I){let e=Object.create(null),t=0;return g.forEach((i,A)=>e[i]=new zB(i,t++,I,A)),e}removeFromSet(g){for(var I=0;I<g.length;I++)g[I].type==this&&(g=g.slice(0,I).concat(g.slice(I+1)),I--);return g}isInSet(g){for(let I=0;I<g.length;I++)if(g[I].type==this)return g[I]}checkAttrs(g){sK(this.attrs,g,"mark",this.name)}excludes(g){return this.excluded.indexOf(g)>-1}}class dK{constructor(g){this.linebreakReplacement=null,this.cached=Object.create(null);let I=this.spec={};for(let t in g)I[t]=g[t];I.nodes=bt.from(g.nodes),I.marks=bt.from(g.marks||{}),this.nodes=aK.compile(this.spec.nodes,this),this.marks=zB.compile(this.spec.marks,this);let e=Object.create(null);for(let t in this.nodes){if(t in this.marks)throw new RangeError(t+" can not be both a node and a mark");let i=this.nodes[t],A=i.spec.content||"",n=i.spec.marks;if(i.contentMatch=e[A]||(e[A]=bc.parse(A,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=n=="_"?null:n?cK(this,n.split(" ")):n==""||!i.inlineContent?[]:null}for(let t in this.marks){let i=this.marks[t],A=i.spec.excludes;i.excluded=A==null?[i]:A==""?[]:cK(this,A.split(" "))}this.nodeFromJSON=t=>la.fromJSON(this,t),this.markFromJSON=t=>pC.fromJSON(this,t),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(g,I=null,e,t){if(typeof g=="string")g=this.nodeType(g);else if(g instanceof aK){if(g.schema!=this)throw new RangeError("Node type from different schema used ("+g.name+")")}else throw new RangeError("Invalid node type: "+g);return g.createChecked(I,e,t)}text(g,I){let e=this.nodes.text;return new KB(e,e.defaultAttrs,g,pC.setFrom(I))}mark(g,I){return typeof g=="string"&&(g=this.marks[g]),g.create(I)}nodeType(g){let I=this.nodes[g];if(!I)throw new RangeError("Unknown node type: "+g);return I}}function cK(C,g){let I=[];for(let e=0;e<g.length;e++){let t=g[e],i=C.marks[t],A=i;if(i)I.push(i);else for(let n in C.marks){let s=C.marks[n];(t=="_"||s.spec.group&&s.spec.group.split(" ").indexOf(t)>-1)&&I.push(A=s)}if(!A)throw new SyntaxError("Unknown mark type: '"+g[e]+"'")}return I}function nEg(C){return C.tag!=null}function lEg(C){return C.style!=null}class sa{constructor(g,I){this.schema=g,this.rules=I,this.tags=[],this.styles=[];let e=this.matchedStyles=[];I.forEach(t=>{if(nEg(t))this.tags.push(t);else if(lEg(t)){let i=/[^=]*/.exec(t.style)[0];e.indexOf(i)<0&&e.push(i),this.styles.push(t)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let i=g.nodes[t.node];return i.contentMatch.matchType(i)})}parse(g,I={}){let e=new bK(this,I,!1);return e.addAll(g,pC.none,I.from,I.to),e.finish()}parseSlice(g,I={}){let e=new bK(this,I,!0);return e.addAll(g,pC.none,I.from,I.to),jg.maxOpen(e.finish())}matchTag(g,I,e){for(let t=e?this.tags.indexOf(e)+1:0;t<this.tags.length;t++){let i=this.tags[t];if(aEg(g,i.tag)&&(i.namespace===void 0||g.namespaceURI==i.namespace)&&(!i.context||I.matchesContext(i.context))){if(i.getAttrs){let A=i.getAttrs(g);if(A===!1)continue;i.attrs=A||void 0}return i}}}matchStyle(g,I,e,t){for(let i=t?this.styles.indexOf(t)+1:0;i<this.styles.length;i++){let A=this.styles[i],n=A.style;if(!(n.indexOf(g)!=0||A.context&&!e.matchesContext(A.context)||n.length>g.length&&(n.charCodeAt(g.length)!=61||n.slice(g.length+1)!=I))){if(A.getAttrs){let s=A.getAttrs(I);if(s===!1)continue;A.attrs=s||void 0}return A}}}static schemaRules(g){let I=[];function e(t){let i=t.priority==null?50:t.priority,A=0;for(;A<I.length;A++){let n=I[A];if((n.priority==null?50:n.priority)<i)break}I.splice(A,0,t)}for(let t in g.marks){let i=g.marks[t].spec.parseDOM;i&&i.forEach(A=>{e(A=uK(A)),A.mark||A.ignore||A.clearMark||(A.mark=t)})}for(let t in g.nodes){let i=g.nodes[t].spec.parseDOM;i&&i.forEach(A=>{e(A=uK(A)),A.node||A.ignore||A.mark||(A.node=t)})}return I}static fromSchema(g){return g.cached.domParser||(g.cached.domParser=new sa(g,sa.schemaRules(g)))}}const mK={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},sEg={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},rK={ol:!0,ul:!0},Ou=1,_X=2,Uu=4;function ZK(C,g,I){return g!=null?(g?Ou:0)|(g==="full"?_X:0):C&&C.whitespace=="pre"?Ou|_X:I&~Uu}class JB{constructor(g,I,e,t,i,A){this.type=g,this.attrs=I,this.marks=e,this.solid=t,this.options=A,this.content=[],this.activeMarks=pC.none,this.match=i||(A&Uu?null:g.contentMatch)}findWrapping(g){if(!this.match){if(!this.type)return[];let I=this.type.contentMatch.fillBefore(Mg.from(g));if(I)this.match=this.type.contentMatch.matchFragment(I);else{let e=this.type.contentMatch,t;return(t=e.findWrapping(g.type))?(this.match=e,t):null}}return this.match.findWrapping(g.type)}finish(g){if(!(this.options&Ou)){let e=this.content[this.content.length-1],t;if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let i=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-t[0].length))}}let I=Mg.from(this.content);return!g&&this.match&&(I=I.append(this.match.fillBefore(Mg.empty,!0))),this.type?this.type.create(this.attrs,I,this.marks):I}inlineContext(g){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:g.parentNode&&!mK.hasOwnProperty(g.parentNode.nodeName.toLowerCase())}}class bK{constructor(g,I,e){this.parser=g,this.options=I,this.isOpen=e,this.open=0,this.localPreserveWS=!1;let t=I.topNode,i,A=ZK(null,I.preserveWhitespace,0)|(e?Uu:0);t?i=new JB(t.type,t.attrs,pC.none,!0,I.topMatch||t.type.contentMatch,A):e?i=new JB(null,null,pC.none,!0,null,A):i=new JB(g.schema.topNodeType,null,pC.none,!0,null,A),this.nodes=[i],this.find=I.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(g,I){g.nodeType==3?this.addTextNode(g,I):g.nodeType==1&&this.addElement(g,I)}addTextNode(g,I){let e=g.nodeValue,t=this.top,i=t.options&_X?"full":this.localPreserveWS||(t.options&Ou)>0,{schema:A}=this.parser;if(i==="full"||t.inlineContext(g)||/[^ \t\r\n\u000c]/.test(e)){if(i)if(i==="full")e=e.replace(/\r\n?/g,`
1620
1620
  `);else if(A.linebreakReplacement&&/[\r\n]/.test(e)&&this.top.findWrapping(A.linebreakReplacement.create())){let n=e.split(/\r?\n|\r/);for(let s=0;s<n.length;s++)s&&this.insertNode(A.linebreakReplacement.create(),I,!0),n[s]&&this.insertNode(A.text(n[s]),I,!/\S/.test(n[s]));e=""}else e=e.replace(/\r?\n|\r/g," ");else if(e=e.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(e)&&this.open==this.nodes.length-1){let n=t.content[t.content.length-1],s=g.previousSibling;(!n||s&&s.nodeName=="BR"||n.isText&&/[ \t\r\n\u000c]$/.test(n.text))&&(e=e.slice(1))}e&&this.insertNode(A.text(e),I,!/\S/.test(e)),this.findInText(g)}else this.findInside(g)}addElement(g,I,e){let t=this.localPreserveWS,i=this.top;(g.tagName=="PRE"||/pre/.test(g.style&&g.style.whiteSpace))&&(this.localPreserveWS=!0);let A=g.nodeName.toLowerCase(),n;rK.hasOwnProperty(A)&&this.parser.normalizeLists&&oEg(g);let s=this.options.ruleFromNode&&this.options.ruleFromNode(g)||(n=this.parser.matchTag(g,this,e));g:if(s?s.ignore:sEg.hasOwnProperty(A))this.findInside(g),this.ignoreFallback(g,I);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(g=s.skip);let o,a=this.needsBlock;if(mK.hasOwnProperty(A))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),o=!0,i.type||(this.needsBlock=!0);else if(!g.firstChild){this.leafFallback(g,I);break g}let d=s&&s.skip?I:this.readStyles(g,I);d&&this.addAll(g,d),o&&this.sync(i),this.needsBlock=a}else{let o=this.readStyles(g,I);o&&this.addElementByRule(g,s,o,s.consuming===!1?n:void 0)}this.localPreserveWS=t}leafFallback(g,I){g.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(g.ownerDocument.createTextNode(`
1621
1621
  `),I)}ignoreFallback(g,I){g.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),I,!0)}readStyles(g,I){let e=g.style;if(e&&e.length)for(let t=0;t<this.parser.matchedStyles.length;t++){let i=this.parser.matchedStyles[t],A=e.getPropertyValue(i);if(A)for(let n=void 0;;){let s=this.parser.matchStyle(i,A,this,n);if(!s)break;if(s.ignore)return null;if(s.clearMark?I=I.filter(o=>!s.clearMark(o)):I=I.concat(this.parser.schema.marks[s.mark].create(s.attrs)),s.consuming===!1)n=s;else break}}return I}addElementByRule(g,I,e,t){let i,A;if(I.node)if(A=this.parser.schema.nodes[I.node],A.isLeaf)this.insertNode(A.create(I.attrs),e,g.nodeName=="BR")||this.leafFallback(g,e);else{let s=this.enter(A,I.attrs||null,e,I.preserveWhitespace);s&&(i=!0,e=s)}else{let s=this.parser.schema.marks[I.mark];e=e.concat(s.create(I.attrs))}let n=this.top;if(A&&A.isLeaf)this.findInside(g);else if(t)this.addElement(g,e,t);else if(I.getContent)this.findInside(g),I.getContent(g,this.parser.schema).forEach(s=>this.insertNode(s,e,!1));else{let s=g;typeof I.contentElement=="string"?s=g.querySelector(I.contentElement):typeof I.contentElement=="function"?s=I.contentElement(g):I.contentElement&&(s=I.contentElement),this.findAround(g,s,!0),this.addAll(s,e),this.findAround(g,s,!1)}i&&this.sync(n)&&this.open--}addAll(g,I,e,t){let i=e||0;for(let A=e?g.childNodes[e]:g.firstChild,n=t==null?null:g.childNodes[t];A!=n;A=A.nextSibling,++i)this.findAtPoint(g,i),this.addDOM(A,I);this.findAtPoint(g,i)}findPlace(g,I,e){let t,i;for(let A=this.open,n=0;A>=0;A--){let s=this.nodes[A],o=s.findWrapping(g);if(o&&(!t||t.length>o.length+n)&&(t=o,i=s,!o.length))break;if(s.solid){if(e)break;n+=2}}if(!t)return null;this.sync(i);for(let A=0;A<t.length;A++)I=this.enterInner(t[A],null,I,!1);return I}insertNode(g,I,e){if(g.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(I=this.enterInner(i,null,I))}let t=this.findPlace(g,I,e);if(t){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(g.type));let A=pC.none;for(let n of t.concat(g.marks))(i.type?i.type.allowsMarkType(n.type):hK(n.type,g.type))&&(A=n.addToSet(A));return i.content.push(g.mark(A)),!0}return!1}enter(g,I,e,t){let i=this.findPlace(g.create(I),e,!1);return i&&(i=this.enterInner(g,I,e,!0,t)),i}enterInner(g,I,e,t=!1,i){this.closeExtra();let A=this.top;A.match=A.match&&A.match.matchType(g);let n=ZK(g,i,A.options);A.options&Uu&&A.content.length==0&&(n|=Uu);let s=pC.none;return e=e.filter(o=>(A.type?A.type.allowsMarkType(o.type):hK(o.type,g))?(s=o.addToSet(s),!1):!0),this.nodes.push(new JB(g,I,s,t,null,n)),this.open++,e}closeExtra(g=!1){let I=this.nodes.length-1;if(I>this.open){for(;I>this.open;I--)this.nodes[I-1].content.push(this.nodes[I].finish(g));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(g){for(let I=this.open;I>=0;I--){if(this.nodes[I]==g)return this.open=I,!0;this.localPreserveWS&&(this.nodes[I].options|=Ou)}return!1}get currentPos(){this.closeExtra();let g=0;for(let I=this.open;I>=0;I--){let e=this.nodes[I].content;for(let t=e.length-1;t>=0;t--)g+=e[t].nodeSize;I&&g++}return g}findAtPoint(g,I){if(this.find)for(let e=0;e<this.find.length;e++)this.find[e].node==g&&this.find[e].offset==I&&(this.find[e].pos=this.currentPos)}findInside(g){if(this.find)for(let I=0;I<this.find.length;I++)this.find[I].pos==null&&g.nodeType==1&&g.contains(this.find[I].node)&&(this.find[I].pos=this.currentPos)}findAround(g,I,e){if(g!=I&&this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&g.nodeType==1&&g.contains(this.find[t].node)&&I.compareDocumentPosition(this.find[t].node)&(e?2:4)&&(this.find[t].pos=this.currentPos)}findInText(g){if(this.find)for(let I=0;I<this.find.length;I++)this.find[I].node==g&&(this.find[I].pos=this.currentPos-(g.nodeValue.length-this.find[I].offset))}matchesContext(g){if(g.indexOf("|")>-1)return g.split(/\s*\|\s*/).some(this.matchesContext,this);let I=g.split("/"),e=this.options.context,t=!this.isOpen&&(!e||e.parent.type==this.nodes[0].type),i=-(e?e.depth+1:0)+(t?0:1),A=(n,s)=>{for(;n>=0;n--){let o=I[n];if(o==""){if(n==I.length-1||n==0)continue;for(;s>=i;s--)if(A(n-1,s))return!0;return!1}else{let a=s>0||s==0&&t?this.nodes[s].type:e&&s>=i?e.node(s-i).type:null;if(!a||a.name!=o&&!a.isInGroup(o))return!1;s--}}return!0};return A(I.length-1,this.open)}textblockFromContext(){let g=this.options.context;if(g)for(let I=g.depth;I>=0;I--){let e=g.node(I).contentMatchAt(g.indexAfter(I)).defaultType;if(e&&e.isTextblock&&e.defaultAttrs)return e}for(let I in this.parser.schema.nodes){let e=this.parser.schema.nodes[I];if(e.isTextblock&&e.defaultAttrs)return e}}}function oEg(C){for(let g=C.firstChild,I=null;g;g=g.nextSibling){let e=g.nodeType==1?g.nodeName.toLowerCase():null;e&&rK.hasOwnProperty(e)&&I?(I.appendChild(g),g=I):e=="li"?I=g:e&&(I=null)}}function aEg(C,g){return(C.matches||C.msMatchesSelector||C.webkitMatchesSelector||C.mozMatchesSelector).call(C,g)}function uK(C){let g={};for(let I in C)g[I]=C[I];return g}function hK(C,g){let I=g.schema.nodes;for(let e in I){let t=I[e];if(!t.allowsMarkType(C))continue;let i=[],A=n=>{i.push(n);for(let s=0;s<n.edgeCount;s++){let{type:o,next:a}=n.edge(s);if(o==g||i.indexOf(a)<0&&A(a))return!0}};if(A(t.contentMatch))return!0}}class uc{constructor(g,I){this.nodes=g,this.marks=I}serializeFragment(g,I={},e){e||(e=xB(I).createDocumentFragment());let t=e,i=[];return g.forEach(A=>{if(i.length||A.marks.length){let n=0,s=0;for(;n<i.length&&s<A.marks.length;){let o=A.marks[s];if(!this.marks[o.type.name]){s++;continue}if(!o.eq(i[n][0])||o.type.spec.spanning===!1)break;n++,s++}for(;n<i.length;)t=i.pop()[1];for(;s<A.marks.length;){let o=A.marks[s++],a=this.serializeMark(o,A.isInline,I);a&&(i.push([o,t]),t.appendChild(a.dom),t=a.contentDOM||a.dom)}}t.appendChild(this.serializeNodeInner(A,I))}),e}serializeNodeInner(g,I){if(g.isText)return xB(I).createTextNode(g.text);let{dom:e,contentDOM:t}=TB(xB(I),this.nodes[g.type.name](g),null,g.attrs);if(t){if(g.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(g.content,I,t)}return e}serializeNode(g,I={}){let e=this.serializeNodeInner(g,I);for(let t=g.marks.length-1;t>=0;t--){let i=this.serializeMark(g.marks[t],g.isInline,I);i&&((i.contentDOM||i.dom).appendChild(e),e=i.dom)}return e}serializeMark(g,I,e={}){let t=this.marks[g.type.name];return t&&TB(xB(e),t(g,I),null,g.attrs)}static renderSpec(g,I,e=null,t){return typeof I=="string"?{dom:g.createTextNode(I)}:TB(g,I,e,t)}static fromSchema(g){return g.cached.domSerializer||(g.cached.domSerializer=new uc(this.nodesFromSchema(g),this.marksFromSchema(g)))}static nodesFromSchema(g){let I=GK(g.nodes);return I.text||(I.text=e=>e.text),I}static marksFromSchema(g){return GK(g.marks)}}function GK(C){let g={};for(let I in C){let e=C[I].spec.toDOM;e&&(g[I]=e)}return g}function xB(C){return C.document||window.document}const wK=new WeakMap;function dEg(C){let g=wK.get(C);return g===void 0&&wK.set(C,g=cEg(C)),g}function cEg(C){let g=null;function I(e){if(e&&typeof e=="object")if(Array.isArray(e))if(typeof e[0]=="string")g||(g=[]),g.push(e);else for(let t=0;t<e.length;t++)I(e[t]);else for(let t in e)I(e[t])}return I(C),g}function TB(C,g,I,e){if(g.nodeType==1)return{dom:g};if(g.dom&&g.dom.nodeType==1)return g;let t=g[0],i;if(typeof t!="string")throw new RangeError("Invalid array passed to renderSpec");if(e&&(i=dEg(e))&&i.indexOf(g)>-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=t.indexOf(" ");A>0&&(I=t.slice(0,A),t=t.slice(A+1));let n,s=I?C.createElementNS(I,t):C.createElement(t),o=g[1],a=1;if(o&&typeof o=="object"&&o.nodeType==null&&!Array.isArray(o)){a=2;for(let d in o)if(o[d]!=null){let m=d.indexOf(" ");m>0?s.setAttributeNS(d.slice(0,m),d.slice(m+1),o[d]):d=="style"&&s.style?s.style.cssText=o[d]:s.setAttribute(d,o[d])}}for(let d=a;d<g.length;d++){let m=g[d];if(m===0){if(d<g.length-1||d>a)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}else if(typeof m=="string")s.appendChild(C.createTextNode(m));else{let{dom:Z,contentDOM:b}=TB(C,m,I,e);if(s.appendChild(Z),b){if(n)throw new RangeError("Multiple content holes");n=b}}}return{dom:s,contentDOM:n}}const WK=65535,BK=Math.pow(2,16);function mEg(C,g){return C+g*BK}function pK(C){return C&WK}function rEg(C){return(C-(C&WK))/BK}const YK=1,yK=2,LB=4,NK=8;let qX=class{constructor(g,I,e){this.pos=g,this.delInfo=I,this.recover=e}get deleted(){return(this.delInfo&NK)>0}get deletedBefore(){return(this.delInfo&(YK|LB))>0}get deletedAfter(){return(this.delInfo&(yK|LB))>0}get deletedAcross(){return(this.delInfo&LB)>0}},hc=class Hb{constructor(g,I=!1){if(this.ranges=g,this.inverted=I,!g.length&&Hb.empty)return Hb.empty}recover(g){let I=0,e=pK(g);if(!this.inverted)for(let t=0;t<e;t++)I+=this.ranges[t*3+2]-this.ranges[t*3+1];return this.ranges[e*3]+I+rEg(g)}mapResult(g,I=1){return this._map(g,I,!1)}map(g,I=1){return this._map(g,I,!0)}_map(g,I,e){let t=0,i=this.inverted?2:1,A=this.inverted?1:2;for(let n=0;n<this.ranges.length;n+=3){let s=this.ranges[n]-(this.inverted?t:0);if(s>g)break;let o=this.ranges[n+i],a=this.ranges[n+A],d=s+o;if(g<=d){let m=o?g==s?-1:g==d?1:I:I,Z=s+t+(m<0?0:a);if(e)return Z;let b=g==(I<0?s:d)?null:mEg(n/3,g-s),h=g==s?yK:g==d?YK:LB;return(I<0?g!=s:g!=d)&&(h|=NK),new qX(Z,h,b)}t+=a-o}return e?g+t:new qX(g+t,0,null)}touches(g,I){let e=0,t=pK(I),i=this.inverted?2:1,A=this.inverted?1:2;for(let n=0;n<this.ranges.length;n+=3){let s=this.ranges[n]-(this.inverted?e:0);if(s>g)break;let o=this.ranges[n+i],a=s+o;if(g<=a&&n==t*3)return!0;e+=this.ranges[n+A]-o}return!1}forEach(g){let I=this.inverted?2:1,e=this.inverted?1:2;for(let t=0,i=0;t<this.ranges.length;t+=3){let A=this.ranges[t],n=A-(this.inverted?i:0),s=A+(this.inverted?0:i),o=this.ranges[t+I],a=this.ranges[t+e];g(n,n+o,s,s+a),i+=a-o}}invert(){return new Hb(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(g){return g==0?Hb.empty:new Hb(g<0?[0,-g,0]:[0,0,g])}};hc.empty=new hc([]);class Eu{constructor(g,I,e=0,t=g?g.length:0){this.mirror=I,this.from=e,this.to=t,this._maps=g||[],this.ownData=!(g||I)}get maps(){return this._maps}slice(g=0,I=this.maps.length){return new Eu(this._maps,this.mirror,g,I)}appendMap(g,I){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(g),I!=null&&this.setMirror(this._maps.length-1,I)}appendMapping(g){for(let I=0,e=this._maps.length;I<g._maps.length;I++){let t=g.getMirror(I);this.appendMap(g._maps[I],t!=null&&t<I?e+t:void 0)}}getMirror(g){if(this.mirror){for(let I=0;I<this.mirror.length;I++)if(this.mirror[I]==g)return this.mirror[I+(I%2?-1:1)]}}setMirror(g,I){this.mirror||(this.mirror=[]),this.mirror.push(g,I)}appendMappingInverted(g){for(let I=g.maps.length-1,e=this._maps.length+g._maps.length;I>=0;I--){let t=g.getMirror(I);this.appendMap(g._maps[I].invert(),t!=null&&t>I?e-t-1:void 0)}}invert(){let g=new Eu;return g.appendMappingInverted(this),g}map(g,I=1){if(this.mirror)return this._map(g,I,!0);for(let e=this.from;e<this.to;e++)g=this._maps[e].map(g,I);return g}mapResult(g,I=1){return this._map(g,I,!1)}_map(g,I,e){let t=0;for(let i=this.from;i<this.to;i++){let A=this._maps[i],n=A.mapResult(g,I);if(n.recover!=null){let s=this.getMirror(i);if(s!=null&&s>i&&s<this.to){i=s,g=this._maps[s].recover(n.recover);continue}}t|=n.delInfo,g=n.pos}return e?g:new qX(g,t,null)}}const $X=Object.create(null);let Ft=class{getMap(){return hc.empty}merge(g){return null}static fromJSON(g,I){if(!I||!I.stepType)throw new RangeError("Invalid input for Step.fromJSON");let e=$X[I.stepType];if(!e)throw new RangeError(`No step type ${I.stepType} defined`);return e.fromJSON(g,I)}static jsonID(g,I){if(g in $X)throw new RangeError("Duplicate use of step JSON ID "+g);return $X[g]=I,I.prototype.jsonID=g,I}},ii=class mw{constructor(g,I){this.doc=g,this.failed=I}static ok(g){return new mw(g,null)}static fail(g){return new mw(null,g)}static fromReplace(g,I,e,t){try{return mw.ok(g.replace(I,e,t))}catch(i){if(i instanceof vu)return mw.fail(i.message);throw i}}};function g5(C,g,I){let e=[];for(let t=0;t<C.childCount;t++){let i=C.child(t);i.content.size&&(i=i.copy(g5(i.content,g,i))),i.isInline&&(i=g(i,I,t)),e.push(i)}return Mg.fromArray(e)}let I5=class rw extends Ft{constructor(g,I,e){super(),this.from=g,this.to=I,this.mark=e}apply(g){let I=g.slice(this.from,this.to),e=g.resolve(this.from),t=e.node(e.sharedDepth(this.to)),i=new jg(g5(I.content,(A,n)=>!A.isAtom||!n.type.allowsMarkType(this.mark.type)?A:A.mark(this.mark.addToSet(A.marks)),t),I.openStart,I.openEnd);return ii.fromReplace(g,this.from,this.to,i)}invert(){return new AZ(this.from,this.to,this.mark)}map(g){let I=g.mapResult(this.from,1),e=g.mapResult(this.to,-1);return I.deleted&&e.deleted||I.pos>=e.pos?null:new rw(I.pos,e.pos,this.mark)}merge(g){return g instanceof rw&&g.mark.eq(this.mark)&&this.from<=g.to&&this.to>=g.from?new rw(Math.min(this.from,g.from),Math.max(this.to,g.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(g,I){if(typeof I.from!="number"||typeof I.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new rw(I.from,I.to,g.markFromJSON(I.mark))}};Ft.jsonID("addMark",I5);let AZ=class Zw extends Ft{constructor(g,I,e){super(),this.from=g,this.to=I,this.mark=e}apply(g){let I=g.slice(this.from,this.to),e=new jg(g5(I.content,t=>t.mark(this.mark.removeFromSet(t.marks)),g),I.openStart,I.openEnd);return ii.fromReplace(g,this.from,this.to,e)}invert(){return new I5(this.from,this.to,this.mark)}map(g){let I=g.mapResult(this.from,1),e=g.mapResult(this.to,-1);return I.deleted&&e.deleted||I.pos>=e.pos?null:new Zw(I.pos,e.pos,this.mark)}merge(g){return g instanceof Zw&&g.mark.eq(this.mark)&&this.from<=g.to&&this.to>=g.from?new Zw(Math.min(this.from,g.from),Math.max(this.to,g.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(g,I){if(typeof I.from!="number"||typeof I.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Zw(I.from,I.to,g.markFromJSON(I.mark))}};Ft.jsonID("removeMark",AZ);let C5=class bw extends Ft{constructor(g,I){super(),this.pos=g,this.mark=I}apply(g){let I=g.nodeAt(this.pos);if(!I)return ii.fail("No node at mark step's position");let e=I.type.create(I.attrs,null,this.mark.addToSet(I.marks));return ii.fromReplace(g,this.pos,this.pos+1,new jg(Mg.from(e),0,I.isLeaf?0:1))}invert(g){let I=g.nodeAt(this.pos);if(I){let e=this.mark.addToSet(I.marks);if(e.length==I.marks.length){for(let t=0;t<I.marks.length;t++)if(!I.marks[t].isInSet(e))return new bw(this.pos,I.marks[t]);return new bw(this.pos,this.mark)}}return new vB(this.pos,this.mark)}map(g){let I=g.mapResult(this.pos,1);return I.deletedAfter?null:new bw(I.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(g,I){if(typeof I.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new bw(I.pos,g.markFromJSON(I.mark))}};Ft.jsonID("addNodeMark",C5);let vB=class HH extends Ft{constructor(g,I){super(),this.pos=g,this.mark=I}apply(g){let I=g.nodeAt(this.pos);if(!I)return ii.fail("No node at mark step's position");let e=I.type.create(I.attrs,null,this.mark.removeFromSet(I.marks));return ii.fromReplace(g,this.pos,this.pos+1,new jg(Mg.from(e),0,I.isLeaf?0:1))}invert(g){let I=g.nodeAt(this.pos);return!I||!this.mark.isInSet(I.marks)?this:new C5(this.pos,this.mark)}map(g){let I=g.mapResult(this.pos,1);return I.deletedAfter?null:new HH(I.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(g,I){if(typeof I.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new HH(I.pos,g.markFromJSON(I.mark))}};Ft.jsonID("removeNodeMark",vB);let QA=class kd extends Ft{constructor(g,I,e,t=!1){super(),this.from=g,this.to=I,this.slice=e,this.structure=t}apply(g){return this.structure&&e5(g,this.from,this.to)?ii.fail("Structure replace would overwrite content"):ii.fromReplace(g,this.from,this.to,this.slice)}getMap(){return new hc([this.from,this.to-this.from,this.slice.size])}invert(g){return new kd(this.from,this.from+this.slice.size,g.slice(this.from,this.to))}map(g){let I=g.mapResult(this.to,-1),e=this.from==this.to&&kd.MAP_BIAS<0?I:g.mapResult(this.from,1);return e.deletedAcross&&I.deletedAcross?null:new kd(e.pos,Math.max(e.pos,I.pos),this.slice,this.structure)}merge(g){if(!(g instanceof kd)||g.structure||this.structure)return null;if(this.from+this.slice.size==g.from&&!this.slice.openEnd&&!g.slice.openStart){let I=this.slice.size+g.slice.size==0?jg.empty:new jg(this.slice.content.append(g.slice.content),this.slice.openStart,g.slice.openEnd);return new kd(this.from,this.to+(g.to-g.from),I,this.structure)}else if(g.to==this.from&&!this.slice.openStart&&!g.slice.openEnd){let I=this.slice.size+g.slice.size==0?jg.empty:new jg(g.slice.content.append(this.slice.content),g.slice.openStart,this.slice.openEnd);return new kd(g.from,this.to,I,this.structure)}else return null}toJSON(){let g={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(g.slice=this.slice.toJSON()),this.structure&&(g.structure=!0),g}static fromJSON(g,I){if(typeof I.from!="number"||typeof I.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new kd(I.from,I.to,jg.fromJSON(g,I.slice),!!I.structure)}};QA.MAP_BIAS=1,Ft.jsonID("replace",QA);let ki=class cy extends Ft{constructor(g,I,e,t,i,A,n=!1){super(),this.from=g,this.to=I,this.gapFrom=e,this.gapTo=t,this.slice=i,this.insert=A,this.structure=n}apply(g){if(this.structure&&(e5(g,this.from,this.gapFrom)||e5(g,this.gapTo,this.to)))return ii.fail("Structure gap-replace would overwrite content");let I=g.slice(this.gapFrom,this.gapTo);if(I.openStart||I.openEnd)return ii.fail("Gap is not a flat range");let e=this.slice.insertAt(this.insert,I.content);return e?ii.fromReplace(g,this.from,this.to,e):ii.fail("Content does not fit in gap")}getMap(){return new hc([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(g){let I=this.gapTo-this.gapFrom;return new cy(this.from,this.from+this.slice.size+I,this.from+this.insert,this.from+this.insert+I,g.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(g){let I=g.mapResult(this.from,1),e=g.mapResult(this.to,-1),t=this.from==this.gapFrom?I.pos:g.map(this.gapFrom,-1),i=this.to==this.gapTo?e.pos:g.map(this.gapTo,1);return I.deletedAcross&&e.deletedAcross||t<I.pos||i>e.pos?null:new cy(I.pos,e.pos,t,i,this.slice,this.insert,this.structure)}toJSON(){let g={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(g.slice=this.slice.toJSON()),this.structure&&(g.structure=!0),g}static fromJSON(g,I){if(typeof I.from!="number"||typeof I.to!="number"||typeof I.gapFrom!="number"||typeof I.gapTo!="number"||typeof I.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new cy(I.from,I.to,I.gapFrom,I.gapTo,jg.fromJSON(g,I.slice),I.insert,!!I.structure)}};Ft.jsonID("replaceAround",ki);function e5(C,g,I){let e=C.resolve(g),t=I-g,i=e.depth;for(;t>0&&i>0&&e.indexAfter(i)==e.node(i).childCount;)i--,t--;if(t>0){let A=e.node(i).maybeChild(e.indexAfter(i));for(;t>0;){if(!A||A.isLeaf)return!0;A=A.firstChild,t--}}return!1}function ZEg(C,g,I,e){let t=[],i=[],A,n;C.doc.nodesBetween(g,I,(s,o,a)=>{if(!s.isInline)return;let d=s.marks;if(!e.isInSet(d)&&a.type.allowsMarkType(e.type)){let m=Math.max(o,g),Z=Math.min(o+s.nodeSize,I),b=e.addToSet(d);for(let h=0;h<d.length;h++)d[h].isInSet(b)||(A&&A.to==m&&A.mark.eq(d[h])?A.to=Z:t.push(A=new AZ(m,Z,d[h])));n&&n.to==m?n.to=Z:i.push(n=new I5(m,Z,e))}}),t.forEach(s=>C.step(s)),i.forEach(s=>C.step(s))}function bEg(C,g,I,e){let t=[],i=0;C.doc.nodesBetween(g,I,(A,n)=>{if(!A.isInline)return;i++;let s=null;if(e instanceof zB){let o=A.marks,a;for(;a=e.isInSet(o);)(s||(s=[])).push(a),o=a.removeFromSet(o)}else e?e.isInSet(A.marks)&&(s=[e]):s=A.marks;if(s&&s.length){let o=Math.min(n+A.nodeSize,I);for(let a=0;a<s.length;a++){let d=s[a],m;for(let Z=0;Z<t.length;Z++){let b=t[Z];b.step==i-1&&d.eq(t[Z].style)&&(m=b)}m?(m.to=o,m.step=i):t.push({style:d,from:Math.max(n,g),to:o,step:i})}}}),t.forEach(A=>C.step(new AZ(A.from,A.to,A.style)))}function t5(C,g,I,e=I.contentMatch,t=!0){let i=C.doc.nodeAt(g),A=[],n=g+1;for(let s=0;s<i.childCount;s++){let o=i.child(s),a=n+o.nodeSize,d=e.matchType(o.type);if(!d)A.push(new QA(n,a,jg.empty));else{e=d;for(let m=0;m<o.marks.length;m++)I.allowsMarkType(o.marks[m].type)||C.step(new AZ(n,a,o.marks[m]));if(t&&o.isText&&I.whitespace!="pre"){let m,Z=/\r?\n|\r/g,b;for(;m=Z.exec(o.text);)b||(b=new jg(Mg.from(I.schema.text(" ",I.allowedMarks(o.marks))),0,0)),A.push(new QA(n+m.index,n+m.index+m[0].length,b))}}n=a}if(!e.validEnd){let s=e.fillBefore(Mg.empty,!0);C.replace(n,n,new jg(s,0,0))}for(let s=A.length-1;s>=0;s--)C.step(A[s])}function uEg(C,g,I){return(g==0||C.canReplace(g,C.childCount))&&(I==C.childCount||C.canReplace(0,I))}function nZ(C){let I=C.parent.content.cutByIndex(C.startIndex,C.endIndex);for(let e=C.depth,t=0,i=0;;--e){let A=C.$from.node(e),n=C.$from.index(e)+t,s=C.$to.indexAfter(e)-i;if(e<C.depth&&A.canReplace(n,s,I))return e;if(e==0||A.type.spec.isolating||!uEg(A,n,s))break;n&&(t=1),s<A.childCount&&(i=1)}return null}function hEg(C,g,I){let{$from:e,$to:t,depth:i}=g,A=e.before(i+1),n=t.after(i+1),s=A,o=n,a=Mg.empty,d=0;for(let b=i,h=!1;b>I;b--)h||e.index(b)>0?(h=!0,a=Mg.from(e.node(b).copy(a)),d++):s--;let m=Mg.empty,Z=0;for(let b=i,h=!1;b>I;b--)h||t.after(b+1)<t.end(b)?(h=!0,m=Mg.from(t.node(b).copy(m)),Z++):o++;C.step(new ki(s,o,A,n,new jg(a.append(m),d,Z),a.size-d,!0))}function jB(C,g,I=null,e=C){let t=GEg(C,g),i=t&&wEg(e,g);return i?t.map(VK).concat({type:g,attrs:I}).concat(i.map(VK)):null}function VK(C){return{type:C,attrs:null}}function GEg(C,g){let{parent:I,startIndex:e,endIndex:t}=C,i=I.contentMatchAt(e).findWrapping(g);if(!i)return null;let A=i.length?i[0]:g;return I.canReplaceWith(e,t,A)?i:null}function wEg(C,g){let{parent:I,startIndex:e,endIndex:t}=C,i=I.child(e),A=g.contentMatch.findWrapping(i.type);if(!A)return null;let s=(A.length?A[A.length-1]:g).contentMatch;for(let o=e;s&&o<t;o++)s=s.matchType(I.child(o).type);return!s||!s.validEnd?null:A}function WEg(C,g,I){let e=Mg.empty;for(let A=I.length-1;A>=0;A--){if(e.size){let n=I[A].type.contentMatch.matchFragment(e);if(!n||!n.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}e=Mg.from(I[A].type.create(I[A].attrs,e))}let t=g.start,i=g.end;C.step(new ki(t,i,t,i,new jg(e,0,0),I.length,!0))}function BEg(C,g,I,e,t){if(!e.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=C.steps.length;C.doc.nodesBetween(g,I,(A,n)=>{let s=typeof t=="function"?t(A):t;if(A.isTextblock&&!A.hasMarkup(e,s)&&pEg(C.doc,C.mapping.slice(i).map(n),e)){let o=null;if(e.schema.linebreakReplacement){let Z=e.whitespace=="pre",b=!!e.contentMatch.matchType(e.schema.linebreakReplacement);Z&&!b?o=!1:!Z&&b&&(o=!0)}o===!1&&RK(C,A,n,i),t5(C,C.mapping.slice(i).map(n,1),e,void 0,o===null);let a=C.mapping.slice(i),d=a.map(n,1),m=a.map(n+A.nodeSize,1);return C.step(new ki(d,m,d+1,m-1,new jg(Mg.from(e.create(s,null,A.marks)),0,0),1,!0)),o===!0&&XK(C,A,n,i),!1}})}function XK(C,g,I,e){g.forEach((t,i)=>{if(t.isText){let A,n=/\r?\n|\r/g;for(;A=n.exec(t.text);){let s=C.mapping.slice(e).map(I+1+i+A.index);C.replaceWith(s,s+1,g.type.schema.linebreakReplacement.create())}}})}function RK(C,g,I,e){g.forEach((t,i)=>{if(t.type==t.type.schema.linebreakReplacement){let A=C.mapping.slice(e).map(I+1+i);C.replaceWith(A,A+1,g.type.schema.text(`