@pksep/yui 0.1.147 → 0.1.148
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sep-yui.es.ts +2 -2
- package/dist/sep-yui.umd.ts +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/sep-yui.umd.ts
CHANGED
|
@@ -1305,8 +1305,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
1305
1305
|
* perfect-scrollbar v1.5.3
|
|
1306
1306
|
* Copyright 2021 Hyunje Jun, MDBootstrap and Contributors
|
|
1307
1307
|
* Licensed under MIT
|
|
1308
|
-
*/function Bi(e){return getComputedStyle(e)}function Sn(e,t){for(var n in t){var i=t[n];typeof i=="number"&&(i=i+"px"),e.style[n]=i}return e}function Fd(e){var t=document.createElement("div");return t.className=e,t}var u3=typeof Element<"u"&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function Hr(e,t){if(!u3)throw new Error("No element matching method supported");return u3.call(e,t)}function Yo(e){e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}function d3(e,t){return Array.prototype.filter.call(e.children,function(n){return Hr(n,t)})}var Ct={main:"ps",rtl:"ps__rtl",element:{thumb:function(e){return"ps__thumb-"+e},rail:function(e){return"ps__rail-"+e},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(e){return"ps--active-"+e},scrolling:function(e){return"ps--scrolling-"+e}}},c3={x:null,y:null};function f3(e,t){var n=e.element.classList,i=Ct.state.scrolling(t);n.contains(i)?clearTimeout(c3[t]):n.add(i)}function h3(e,t){c3[t]=setTimeout(function(){return e.isAlive&&e.element.classList.remove(Ct.state.scrolling(t))},e.settings.scrollingThreshold)}function u8e(e,t){f3(e,t),h3(e,t)}var kl=function(t){this.element=t,this.handlers={}},m3={isEmpty:{configurable:!0}};kl.prototype.bind=function(t,n){typeof this.handlers[t]>"u"&&(this.handlers[t]=[]),this.handlers[t].push(n),this.element.addEventListener(t,n,!1)},kl.prototype.unbind=function(t,n){var i=this;this.handlers[t]=this.handlers[t].filter(function(r){return n&&r!==n?!0:(i.element.removeEventListener(t,r,!1),!1)})},kl.prototype.unbindAll=function(){for(var t in this.handlers)this.unbind(t)},m3.isEmpty.get=function(){var e=this;return Object.keys(this.handlers).every(function(t){return e.handlers[t].length===0})},Object.defineProperties(kl.prototype,m3);var Xo=function(){this.eventElements=[]};Xo.prototype.eventElement=function(t){var n=this.eventElements.filter(function(i){return i.element===t})[0];return n||(n=new kl(t),this.eventElements.push(n)),n},Xo.prototype.bind=function(t,n,i){this.eventElement(t).bind(n,i)},Xo.prototype.unbind=function(t,n,i){var r=this.eventElement(t);r.unbind(n,i),r.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(r),1)},Xo.prototype.unbindAll=function(){this.eventElements.forEach(function(t){return t.unbindAll()}),this.eventElements=[]},Xo.prototype.once=function(t,n,i){var r=this.eventElement(t),a=function(o){r.unbind(n,a),i(o)};r.bind(n,a)};function Ud(e){if(typeof window.CustomEvent=="function")return new CustomEvent(e);var t=document.createEvent("CustomEvent");return t.initCustomEvent(e,!1,!1,void 0),t}function Yd(e,t,n,i,r){i===void 0&&(i=!0),r===void 0&&(r=!1);var a;if(t==="top")a=["contentHeight","containerHeight","scrollTop","y","up","down"];else if(t==="left")a=["contentWidth","containerWidth","scrollLeft","x","left","right"];else throw new Error("A proper axis should be provided");d8e(e,n,a,i,r)}function d8e(e,t,n,i,r){var a=n[0],o=n[1],s=n[2],u=n[3],c=n[4],f=n[5];i===void 0&&(i=!0),r===void 0&&(r=!1);var h=e.element;e.reach[u]=null,h[s]<1&&(e.reach[u]="start"),h[s]>e[a]-e[o]-1&&(e.reach[u]="end"),t&&(h.dispatchEvent(Ud("ps-scroll-"+u)),t<0?h.dispatchEvent(Ud("ps-scroll-"+c)):t>0&&h.dispatchEvent(Ud("ps-scroll-"+f)),i&&u8e(e,u)),e.reach[u]&&(t||r)&&h.dispatchEvent(Ud("ps-"+u+"-reach-"+e.reach[u]))}function lt(e){return parseInt(e,10)||0}function c8e(e){return Hr(e,"input,[contenteditable]")||Hr(e,"select,[contenteditable]")||Hr(e,"textarea,[contenteditable]")||Hr(e,"button,[contenteditable]")}function f8e(e){var t=Bi(e);return lt(t.width)+lt(t.paddingLeft)+lt(t.paddingRight)+lt(t.borderLeftWidth)+lt(t.borderRightWidth)}var qo={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 ar(e){var t=e.element,n=Math.floor(t.scrollTop),i=t.getBoundingClientRect();e.containerWidth=Math.round(i.width),e.containerHeight=Math.round(i.height),e.contentWidth=t.scrollWidth,e.contentHeight=t.scrollHeight,t.contains(e.scrollbarXRail)||(d3(t,Ct.element.rail("x")).forEach(function(r){return Yo(r)}),t.appendChild(e.scrollbarXRail)),t.contains(e.scrollbarYRail)||(d3(t,Ct.element.rail("y")).forEach(function(r){return Yo(r)}),t.appendChild(e.scrollbarYRail)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset<e.contentWidth?(e.scrollbarXActive=!0,e.railXWidth=e.containerWidth-e.railXMarginWidth,e.railXRatio=e.containerWidth/e.railXWidth,e.scrollbarXWidth=p3(e,lt(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=lt((e.negativeScrollAdjustment+t.scrollLeft)*(e.railXWidth-e.scrollbarXWidth)/(e.contentWidth-e.containerWidth))):e.scrollbarXActive=!1,!e.settings.suppressScrollY&&e.containerHeight+e.settings.scrollYMarginOffset<e.contentHeight?(e.scrollbarYActive=!0,e.railYHeight=e.containerHeight-e.railYMarginHeight,e.railYRatio=e.containerHeight/e.railYHeight,e.scrollbarYHeight=p3(e,lt(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTop=lt(n*(e.railYHeight-e.scrollbarYHeight)/(e.contentHeight-e.containerHeight))):e.scrollbarYActive=!1,e.scrollbarXLeft>=e.railXWidth-e.scrollbarXWidth&&(e.scrollbarXLeft=e.railXWidth-e.scrollbarXWidth),e.scrollbarYTop>=e.railYHeight-e.scrollbarYHeight&&(e.scrollbarYTop=e.railYHeight-e.scrollbarYHeight),h8e(t,e),e.scrollbarXActive?t.classList.add(Ct.state.active("x")):(t.classList.remove(Ct.state.active("x")),e.scrollbarXWidth=0,e.scrollbarXLeft=0,t.scrollLeft=e.isRtl===!0?e.contentWidth:0),e.scrollbarYActive?t.classList.add(Ct.state.active("y")):(t.classList.remove(Ct.state.active("y")),e.scrollbarYHeight=0,e.scrollbarYTop=0,t.scrollTop=0)}function p3(e,t){return e.settings.minScrollbarLength&&(t=Math.max(t,e.settings.minScrollbarLength)),e.settings.maxScrollbarLength&&(t=Math.min(t,e.settings.maxScrollbarLength)),t}function h8e(e,t){var n={width:t.railXWidth},i=Math.floor(e.scrollTop);t.isRtl?n.left=t.negativeScrollAdjustment+e.scrollLeft+t.containerWidth-t.contentWidth:n.left=e.scrollLeft,t.isScrollbarXUsingBottom?n.bottom=t.scrollbarXBottom-i:n.top=t.scrollbarXTop+i,Sn(t.scrollbarXRail,n);var r={top:i,height:t.railYHeight};t.isScrollbarYUsingRight?t.isRtl?r.right=t.contentWidth-(t.negativeScrollAdjustment+e.scrollLeft)-t.scrollbarYRight-t.scrollbarYOuterWidth-9:r.right=t.scrollbarYRight-e.scrollLeft:t.isRtl?r.left=t.negativeScrollAdjustment+e.scrollLeft+t.containerWidth*2-t.contentWidth-t.scrollbarYLeft-t.scrollbarYOuterWidth:r.left=t.scrollbarYLeft+e.scrollLeft,Sn(t.scrollbarYRail,r),Sn(t.scrollbarX,{left:t.scrollbarXLeft,width:t.scrollbarXWidth-t.railBorderXWidth}),Sn(t.scrollbarY,{top:t.scrollbarYTop,height:t.scrollbarYHeight-t.railBorderYWidth})}function m8e(e){e.element,e.event.bind(e.scrollbarY,"mousedown",function(t){return t.stopPropagation()}),e.event.bind(e.scrollbarYRail,"mousedown",function(t){var n=t.pageY-window.pageYOffset-e.scrollbarYRail.getBoundingClientRect().top,i=n>e.scrollbarYTop?1:-1;e.element.scrollTop+=i*e.containerHeight,ar(e),t.stopPropagation()}),e.event.bind(e.scrollbarX,"mousedown",function(t){return t.stopPropagation()}),e.event.bind(e.scrollbarXRail,"mousedown",function(t){var n=t.pageX-window.pageXOffset-e.scrollbarXRail.getBoundingClientRect().left,i=n>e.scrollbarXLeft?1:-1;e.element.scrollLeft+=i*e.containerWidth,ar(e),t.stopPropagation()})}function p8e(e){g3(e,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),g3(e,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])}function g3(e,t){var n=t[0],i=t[1],r=t[2],a=t[3],o=t[4],s=t[5],u=t[6],c=t[7],f=t[8],h=e.element,g=null,p=null,y=null;function v(M){M.touches&&M.touches[0]&&(M[r]=M.touches[0].pageY),h[u]=g+y*(M[r]-p),f3(e,c),ar(e),M.stopPropagation(),M.type.startsWith("touch")&&M.changedTouches.length>1&&M.preventDefault()}function k(){h3(e,c),e[f].classList.remove(Ct.state.clicking),e.event.unbind(e.ownerDocument,"mousemove",v)}function w(M,x){g=h[u],x&&M.touches&&(M[r]=M.touches[0].pageY),p=M[r],y=(e[i]-e[n])/(e[a]-e[s]),x?e.event.bind(e.ownerDocument,"touchmove",v):(e.event.bind(e.ownerDocument,"mousemove",v),e.event.once(e.ownerDocument,"mouseup",k),M.preventDefault()),e[f].classList.add(Ct.state.clicking),M.stopPropagation()}e.event.bind(e[o],"mousedown",function(M){w(M)}),e.event.bind(e[o],"touchstart",function(M){w(M,!0)})}function g8e(e){var t=e.element,n=function(){return Hr(t,":hover")},i=function(){return Hr(e.scrollbarX,":focus")||Hr(e.scrollbarY,":focus")};function r(a,o){var s=Math.floor(t.scrollTop);if(a===0){if(!e.scrollbarYActive)return!1;if(s===0&&o>0||s>=e.contentHeight-e.containerHeight&&o<0)return!e.settings.wheelPropagation}var u=t.scrollLeft;if(o===0){if(!e.scrollbarXActive)return!1;if(u===0&&a<0||u>=e.contentWidth-e.containerWidth&&a>0)return!e.settings.wheelPropagation}return!0}e.event.bind(e.ownerDocument,"keydown",function(a){if(!(a.isDefaultPrevented&&a.isDefaultPrevented()||a.defaultPrevented)&&!(!n()&&!i())){var o=document.activeElement?document.activeElement:e.ownerDocument.activeElement;if(o){if(o.tagName==="IFRAME")o=o.contentDocument.activeElement;else for(;o.shadowRoot;)o=o.shadowRoot.activeElement;if(c8e(o))return}var s=0,u=0;switch(a.which){case 37:a.metaKey?s=-e.contentWidth:a.altKey?s=-e.containerWidth:s=-30;break;case 38:a.metaKey?u=e.contentHeight:a.altKey?u=e.containerHeight:u=30;break;case 39:a.metaKey?s=e.contentWidth:a.altKey?s=e.containerWidth:s=30;break;case 40:a.metaKey?u=-e.contentHeight:a.altKey?u=-e.containerHeight:u=-30;break;case 32:a.shiftKey?u=e.containerHeight:u=-e.containerHeight;break;case 33:u=e.containerHeight;break;case 34:u=-e.containerHeight;break;case 36:u=e.contentHeight;break;case 35:u=-e.contentHeight;break;default:return}e.settings.suppressScrollX&&s!==0||e.settings.suppressScrollY&&u!==0||(t.scrollTop-=u,t.scrollLeft+=s,ar(e),r(s,u)&&a.preventDefault())}})}function y8e(e){var t=e.element;function n(o,s){var u=Math.floor(t.scrollTop),c=t.scrollTop===0,f=u+t.offsetHeight===t.scrollHeight,h=t.scrollLeft===0,g=t.scrollLeft+t.offsetWidth===t.scrollWidth,p;return Math.abs(s)>Math.abs(o)?p=c||f:p=h||g,p?!e.settings.wheelPropagation:!0}function i(o){var s=o.deltaX,u=-1*o.deltaY;return(typeof s>"u"||typeof u>"u")&&(s=-1*o.wheelDeltaX/6,u=o.wheelDeltaY/6),o.deltaMode&&o.deltaMode===1&&(s*=10,u*=10),s!==s&&u!==u&&(s=0,u=o.wheelDelta),o.shiftKey?[-u,-s]:[s,u]}function r(o,s,u){if(!qo.isWebKit&&t.querySelector("select:focus"))return!0;if(!t.contains(o))return!1;for(var c=o;c&&c!==t;){if(c.classList.contains(Ct.element.consuming))return!0;var f=Bi(c);if(u&&f.overflowY.match(/(scroll|auto)/)){var h=c.scrollHeight-c.clientHeight;if(h>0&&(c.scrollTop>0&&u<0||c.scrollTop<h&&u>0))return!0}if(s&&f.overflowX.match(/(scroll|auto)/)){var g=c.scrollWidth-c.clientWidth;if(g>0&&(c.scrollLeft>0&&s<0||c.scrollLeft<g&&s>0))return!0}c=c.parentNode}return!1}function a(o){var s=i(o),u=s[0],c=s[1];if(!r(o.target,u,c)){var f=!1;e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(c?t.scrollTop-=c*e.settings.wheelSpeed:t.scrollTop+=u*e.settings.wheelSpeed,f=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(u?t.scrollLeft+=u*e.settings.wheelSpeed:t.scrollLeft-=c*e.settings.wheelSpeed,f=!0):(t.scrollTop-=c*e.settings.wheelSpeed,t.scrollLeft+=u*e.settings.wheelSpeed),ar(e),f=f||n(u,c),f&&!o.ctrlKey&&(o.stopPropagation(),o.preventDefault())}}typeof window.onwheel<"u"?e.event.bind(t,"wheel",a):typeof window.onmousewheel<"u"&&e.event.bind(t,"mousewheel",a)}function b8e(e){if(!qo.supportsTouch&&!qo.supportsIePointer)return;var t=e.element;function n(y,v){var k=Math.floor(t.scrollTop),w=t.scrollLeft,M=Math.abs(y),x=Math.abs(v);if(x>M){if(v<0&&k===e.contentHeight-e.containerHeight||v>0&&k===0)return window.scrollY===0&&v>0&&qo.isChrome}else if(M>x&&(y<0&&w===e.contentWidth-e.containerWidth||y>0&&w===0))return!0;return!0}function i(y,v){t.scrollTop-=v,t.scrollLeft-=y,ar(e)}var r={},a=0,o={},s=null;function u(y){return y.targetTouches?y.targetTouches[0]:y}function c(y){return y.pointerType&&y.pointerType==="pen"&&y.buttons===0?!1:!!(y.targetTouches&&y.targetTouches.length===1||y.pointerType&&y.pointerType!=="mouse"&&y.pointerType!==y.MSPOINTER_TYPE_MOUSE)}function f(y){if(c(y)){var v=u(y);r.pageX=v.pageX,r.pageY=v.pageY,a=new Date().getTime(),s!==null&&clearInterval(s)}}function h(y,v,k){if(!t.contains(y))return!1;for(var w=y;w&&w!==t;){if(w.classList.contains(Ct.element.consuming))return!0;var M=Bi(w);if(k&&M.overflowY.match(/(scroll|auto)/)){var x=w.scrollHeight-w.clientHeight;if(x>0&&(w.scrollTop>0&&k<0||w.scrollTop<x&&k>0))return!0}if(v&&M.overflowX.match(/(scroll|auto)/)){var _=w.scrollWidth-w.clientWidth;if(_>0&&(w.scrollLeft>0&&v<0||w.scrollLeft<_&&v>0))return!0}w=w.parentNode}return!1}function g(y){if(c(y)){var v=u(y),k={pageX:v.pageX,pageY:v.pageY},w=k.pageX-r.pageX,M=k.pageY-r.pageY;if(h(y.target,w,M))return;i(w,M),r=k;var x=new Date().getTime(),_=x-a;_>0&&(o.x=w/_,o.y=M/_,a=x),n(w,M)&&y.preventDefault()}}function p(){e.settings.swipeEasing&&(clearInterval(s),s=setInterval(function(){if(e.isInitialized){clearInterval(s);return}if(!o.x&&!o.y){clearInterval(s);return}if(Math.abs(o.x)<.01&&Math.abs(o.y)<.01){clearInterval(s);return}if(!e.element){clearInterval(s);return}i(o.x*30,o.y*30),o.x*=.8,o.y*=.8},10))}qo.supportsTouch?(e.event.bind(t,"touchstart",f),e.event.bind(t,"touchmove",g),e.event.bind(t,"touchend",p)):qo.supportsIePointer&&(window.PointerEvent?(e.event.bind(t,"pointerdown",f),e.event.bind(t,"pointermove",g),e.event.bind(t,"pointerup",p)):window.MSPointerEvent&&(e.event.bind(t,"MSPointerDown",f),e.event.bind(t,"MSPointerMove",g),e.event.bind(t,"MSPointerUp",p)))}var w8e=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}},v8e={"click-rail":m8e,"drag-thumb":p8e,keyboard:g8e,wheel:y8e,touch:b8e},Ml=function(t,n){var i=this;if(n===void 0&&(n={}),typeof t=="string"&&(t=document.querySelector(t)),!t||!t.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");this.element=t,t.classList.add(Ct.main),this.settings=w8e();for(var r in n)this.settings[r]=n[r];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var a=function(){return t.classList.add(Ct.state.focus)},o=function(){return t.classList.remove(Ct.state.focus)};this.isRtl=Bi(t).direction==="rtl",this.isRtl===!0&&t.classList.add(Ct.rtl),this.isNegativeScroll=function(){var c=t.scrollLeft,f=null;return t.scrollLeft=-1,f=t.scrollLeft<0,t.scrollLeft=c,f}(),this.negativeScrollAdjustment=this.isNegativeScroll?t.scrollWidth-t.clientWidth:0,this.event=new Xo,this.ownerDocument=t.ownerDocument||document,this.scrollbarXRail=Fd(Ct.element.rail("x")),t.appendChild(this.scrollbarXRail),this.scrollbarX=Fd(Ct.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",a),this.event.bind(this.scrollbarX,"blur",o),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var s=Bi(this.scrollbarXRail);this.scrollbarXBottom=parseInt(s.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=lt(s.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=lt(s.borderLeftWidth)+lt(s.borderRightWidth),Sn(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=lt(s.marginLeft)+lt(s.marginRight),Sn(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=Fd(Ct.element.rail("y")),t.appendChild(this.scrollbarYRail),this.scrollbarY=Fd(Ct.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",a),this.event.bind(this.scrollbarY,"blur",o),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var u=Bi(this.scrollbarYRail);this.scrollbarYRight=parseInt(u.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=lt(u.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?f8e(this.scrollbarY):null,this.railBorderYWidth=lt(u.borderTopWidth)+lt(u.borderBottomWidth),Sn(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=lt(u.marginTop)+lt(u.marginBottom),Sn(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:t.scrollLeft<=0?"start":t.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:t.scrollTop<=0?"start":t.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(c){return v8e[c](i)}),this.lastScrollTop=Math.floor(t.scrollTop),this.lastScrollLeft=t.scrollLeft,this.event.bind(this.element,"scroll",function(c){return i.onScroll(c)}),ar(this)};Ml.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,Sn(this.scrollbarXRail,{display:"block"}),Sn(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=lt(Bi(this.scrollbarXRail).marginLeft)+lt(Bi(this.scrollbarXRail).marginRight),this.railYMarginHeight=lt(Bi(this.scrollbarYRail).marginTop)+lt(Bi(this.scrollbarYRail).marginBottom),Sn(this.scrollbarXRail,{display:"none"}),Sn(this.scrollbarYRail,{display:"none"}),ar(this),Yd(this,"top",0,!1,!0),Yd(this,"left",0,!1,!0),Sn(this.scrollbarXRail,{display:""}),Sn(this.scrollbarYRail,{display:""}))},Ml.prototype.onScroll=function(t){this.isAlive&&(ar(this),Yd(this,"top",this.element.scrollTop-this.lastScrollTop),Yd(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},Ml.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),Yo(this.scrollbarX),Yo(this.scrollbarY),Yo(this.scrollbarXRail),Yo(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},Ml.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(t){return!t.match(/^ps([-_].+|)$/)}).join(" ")};const k8e=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(e,{expose:t,emit:n}){const i=e,r=n,a=l.ref(null),o=l.ref(null);l.watch(()=>i.options,()=>{u(),s()},{deep:!0}),l.onMounted(()=>{a.value&&s()}),l.onBeforeUnmount(()=>{u()});function s(){a.value&&(o.value=new Ml(a.value,i.options),h())}function u(){o.value&&(h(!1),o.value.destroy(),o.value=null)}const c={scroll:f("scroll"),"ps-scroll-y":f("ps-scroll-y"),"ps-scroll-x":f("ps-scroll-x"),"ps-scroll-up":f("ps-scroll-up"),"ps-scroll-down":f("ps-scroll-down"),"ps-scroll-left":f("ps-scroll-left"),"ps-scroll-right":f("ps-scroll-right"),"ps-y-reach-start":f("ps-y-reach-start"),"ps-y-reach-end":f("ps-y-reach-end"),"ps-x-reach-start":f("ps-x-reach-start"),"ps-x-reach-end":f("ps-x-reach-end")};function f(g){return function(p){r(g,p)}}function h(g=!0){var p;(p=o.value)!=null&&p.element&&Object.entries(c).forEach(([y,v])=>{var k,w;g?(k=o.value)==null||k.element.addEventListener(y,v):(w=o.value)==null||w.element.removeEventListener(y,v)})}return t({ps:o}),(g,p)=>(l.openBlock(),l.createBlock(l.resolveDynamicComponent(g.tag),{ref_key:"scrollbar",ref:a,class:"ps"},{default:l.withCtx(()=>[l.renderSlot(g.$slots,"default")]),_:3},512))}}),M8e=["data-testid"],A1=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(e,{expose:t,emit:n}){const i=e,r=l.ref(null),a=n,o=h=>{a("scroll",h)},s={attributes:!0,attributeFilter:["style"]},u=(h,g)=>p=>{for(const y of p)y.type==="attributes"&&y.attributeName==="style"&&h.style.right!==g&&(h.style.right=g)},c=()=>{var w,M,x,_,S,N,T,I,L,D,z,H,X,re,ee,q,Z,de,Ae,at,Tt,Jt,Bt,qe;if(!r.value)return;const h=r.value.querySelector(".ps__thumb-y"),g=r.value.querySelector(".ps__thumb-x"),p=r.value.querySelector(".ps__rail-y"),y=r.value.querySelector(".ps__rail-x");h.style.background=((M=(w=i.thrumbStyle)==null?void 0:w.y)==null?void 0:M.background)||"#77a6ff",h.style.width=((_=(x=i.thrumbStyle)==null?void 0:x.y)==null?void 0:_.width)||"6px",h.style.right="0px",g.style.background=((N=(S=i.thrumbStyle)==null?void 0:S.x)==null?void 0:N.background)||"#77a6ff",g.style.width=((I=(T=i.thrumbStyle)==null?void 0:T.x)==null?void 0:I.width)||"6px",g.style.right="0px",p.style.background=((D=(L=i.railStyle)==null?void 0:L.y)==null?void 0:D.background)||"#F5F5F5",p.style.width=((H=(z=i.thrumbStyle)==null?void 0:z.y)==null?void 0:H.width)||"6px",p.style.right=((re=(X=i.railStyle)==null?void 0:X.y)==null?void 0:re.right)||"0px",y.style.background=((q=(ee=i.railStyle)==null?void 0:ee.x)==null?void 0:q.background)||"#F5F5F5",y.style.width=((de=(Z=i.thrumbStyle)==null?void 0:Z.x)==null?void 0:de.width)||"6px",y.style.right=((at=(Ae=i.railStyle)==null?void 0:Ae.x)==null?void 0:at.right)||"0px";const v=new MutationObserver(u(p,((Jt=(Tt=i.railStyle)==null?void 0:Tt.y)==null?void 0:Jt.right)||"0px")),k=new MutationObserver(u(y,((qe=(Bt=i.railStyle)==null?void 0:Bt.x)==null?void 0:qe.right)||"0px"));v.observe(p,s),k.observe(y,s)};return l.watch(()=>i,()=>{c()},{immediate:!0}),t({scrollToTop:()=>{r.value&&(r.value.children[0].scrollTop=0)}}),l.onMounted(()=>{c()}),(h,g)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"scrollbar",ref:r,"data-testid":i.dataTestid},[l.createVNode(l.unref(k8e),{onScroll:o,options:i.options,tag:i.tag,class:l.normalizeClass(i.class),style:l.normalizeStyle(i.style),"data-testid":`${i.dataTestid}-Scroll`,ref_key:"scrollbar",ref:r},{default:l.withCtx(()=>[l.renderSlot(h.$slots,"default")]),_:3},8,["options","tag","class","style","data-testid"])],8,M8e))}});function bt(e,t=document.documentElement){for(const[n,i]of Object.entries(e))t.style.setProperty(n,String(i))}const C8e=()=>{const e=l.ref(0),t=l.ref([]),n=l.ref(null),i=u=>{t.value.push(u),a(u),o()},r=()=>{t.value.pop(),s(),t.value.length?a(t.value[t.value.length-1]):n.value=null},a=u=>{n.value=u},o=()=>{e.value+=1},s=()=>{e.value>0&&(e.value-=1)};return{countOpenedModal:e,openedModals:t,lastOpenedModal:n,addOpenedModal:i,reduceOpenedModal:r,setLastOpenedModal:a,incrementCountModal:o,decrementCountModal:s}},x8e=["data-testid"],S8e=["data-testid"],_8e=me(l.defineComponent({__name:"Modal",props:{open:{type:Boolean},position:{default:"right"},width:{},height:{},dataTestid:{default:"Modal"}},emits:["close","unmounted"],setup(e,{expose:t,emit:n}){const{lastOpenedModal:i,addOpenedModal:r,reduceOpenedModal:a}=C8e(),o=e,s=l.ref(null),u=l.useAttrs(),c=l.ref(!1),f=l.computed(()=>({width:o.width,height:o.height})),h=n;let g=0;const p=()=>{g=Date.now(),s.value&&(o.open?(s.value.showModal(),r(s.value)):y())},y=()=>{Date.now()-g<300||(a(),h("close"))},v=()=>{var _;(_=s.value)==null||_.close(),document.documentElement.focus(),M()},k=_=>{_.key==="Escape"&&i.value===s.value&&y()},w=()=>{if(document.querySelectorAll(".modal-yui-kit").length===1)return window.innerWidth-document.documentElement.clientWidth;{const S=document.body.style.paddingRight;return Number(S.replace(/\D/g,""))||0}},M=()=>{document.querySelectorAll(".modal-yui-kit").length===0&&bt({overflow:"","padding-right":""},document.body)},x=_=>{_.target===s.value&&y()};return t({closeDialog:v}),l.onMounted(()=>{l.watchEffect(()=>{o.open!==c.value&&(p(),c.value=o.open)}),s.value&&s.value.addEventListener("cancel",S=>{S.preventDefault()});const _=w();bt({overflow:"hidden","padding-right":`${_}px`},document.body),document.addEventListener("keydown",k)}),l.onUnmounted(()=>{M(),document.removeEventListener("keydown",k),h("unmounted")}),(_,S)=>(l.openBlock(),l.createElementBlock("dialog",l.mergeProps({ref_key:"dialog",ref:s},l.unref(u),{class:["modal-yui-kit",`modal-yui-kit_${o.position}`],"data-testid":o.dataTestid,onClick:l.withModifiers(x,["self","left"])}),[l.createElementVNode("div",{class:"modal-yui-kit__modal-content",style:l.normalizeStyle(f.value),"data-testid":`${o.dataTestid}-ModalContent`},[l.renderSlot(_.$slots,"default",{},void 0,!0)],12,S8e)],16,x8e))}}),[["__scopeId","data-v-3750bc76"]]);var y3=(e=>(e.slideTop="slide-top",e.slideLeft="slide-left",e.fadeAndScale="fade-and-scale",e.fade="fade",e))(y3||{});const Xd=me(l.defineComponent({__name:"ModalAnimated",props:{animateType:{},open:{type:Boolean},position:{default:"right"},width:{},height:{},dataTestid:{default:"Modal"}},emits:["close","unmounted","end-animation"],setup(e,{emit:t}){const n=e,i=t,r=l.computed(()=>n.animateType===y3.fade?"fade":n.position==="bottom"?"slide-bottom":n.position==="right"?"slide-left":"fade-and-scale"),a=l.ref(null),o=l.reactive({function:()=>{}}),s=()=>{h()},u=()=>{i("unmounted")},c=()=>{h()},f=()=>{o.function(),i("end-animation")},h=()=>{var p;a.value&&(o.function=(p=a.value)==null?void 0:p.closeDialog)},g=()=>{h(),i("close")};return(p,y)=>(l.openBlock(),l.createBlock(l.Transition,{name:r.value,onAfterLeave:f,onBeforeLeave:c,onAfterEnter:s},{default:l.withCtx(()=>[n.open?(l.openBlock(),l.createBlock(_8e,{key:0,ref_key:"modalRef",ref:a,open:n.open,position:n.position,width:n.width,height:n.height,"data-testid":n.dataTestid,onClose:g,onUnmounted:u},{default:l.withCtx(()=>[l.renderSlot(p.$slots,"default",{},void 0,!0)]),_:3},8,["open","position","width","height","data-testid"])):l.createCommentVNode("",!0)]),_:3},8,["name"]))}}),[["__scopeId","data-v-b0e210a3"]]);var qd=(e=>(e.small="small",e.medium="medium",e.big="big",e))(qd||{}),b3=(e=>(e.circled="circled",e.rounded="rounded",e))(b3||{}),w3=(e=>(e.blue="blue",e.red="red",e))(w3||{});const T8e=["data-testid","checked","disabled"],P8e=l.defineComponent({__name:"Checkbox",props:{size:{default:qd.medium},circular:{default:b3.rounded},color:{default:w3.blue},checked:{type:Boolean},modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},dataTestid:{default:"Checkbox"}},emits:["change","update:modelValue"],setup(e,{emit:t}){const n=e,i=t,r=l.reactive({isChecked:n.modelValue});l.watchEffect(()=>{r.isChecked=n.modelValue});const a=()=>{r.isChecked=!r.isChecked,i("change",r.isChecked),i("update:modelValue",r.isChecked)};return(o,s)=>(l.openBlock(),l.createElementBlock("input",{type:"checkbox",class:l.normalizeClass(`checkbox-yui-kit checkbox-yui-kit_${n.size} checkbox-yui-kit_${n.circular} checkbox-yui-kit_${n.color}`),"data-testid":`${n.dataTestid}`,tabindex:"0",onChange:a,checked:r.isChecked,disabled:n.disabled,onKeyup:l.withKeys(a,["enter"])},null,42,T8e))}}),D1=me(P8e,[["__scopeId","data-v-77e5e5df"]]),E8e=["data-testid"],A8e=["src","alt"],D8e=["src"],N8e={key:1,class:"avatar-yui-kit__text"},Gd=me(l.defineComponent({__name:"Avatar",props:{initials:{},url:{},isIcon:{type:Boolean},alt:{},defaultImage:{},dataTestid:{}},setup(e){const t=e,n=l.ref(!1),i=l.ref(!1);l.watch(()=>t.url,()=>{n.value=!1,i.value=!1});const r=()=>t.initials?t.initials.charAt(0):"";return(a,o)=>(l.openBlock(),l.createElementBlock("div",{"data-testid":t.dataTestid,class:"avatar-yui-kit"},[t.url&&!n.value?(l.openBlock(),l.createElementBlock("img",{key:0,src:t.url,alt:t.alt,class:"avatar-yui-kit__image",style:l.normalizeStyle({visibility:i.value?"visible":"hidden"}),onLoad:o[0]||(o[0]=s=>i.value=!0),onError:o[1]||(o[1]=s=>n.value=!0)},null,44,A8e)):l.createCommentVNode("",!0),n.value||!t.url?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[t.defaultImage?(l.openBlock(),l.createElementBlock("img",{key:0,src:t.defaultImage,class:"avatar-yui-kit__image"},null,8,D8e)):(l.openBlock(),l.createElementBlock("div",N8e,l.toDisplayString(r()),1))],64)):l.createCommentVNode("",!0)],8,E8e))}}),[["__scopeId","data-v-4406755f"]]),j8e=["data-testid","aria-label"],I8e=["data-testid"],Cl=me(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(e){const t=e,n=CSS.supports("top","anchor(bottom)"),i=l.useId(),r=l.computed(()=>`--anchor-tooltip-${i}`),a=l.ref(null),o=l.ref(null),s=l.computed(()=>[{"tooltip-yui-kit__hint_show":t.isShow||c.isShow,"tooltip-yui-kit__hint_bottom-center":t.position==="bottom-center","tooltip-yui-kit__hint_bottom-left":t.position==="bottom-left","tooltip-yui-kit__hint_bottom-right":t.position==="bottom-right","tooltip-yui-kit__hint_top-center":t.position==="top-center","tooltip-yui-kit__hint_top-left":t.position==="top-left","tooltip-yui-kit__hint_top-right":t.position==="top-right","tooltip-yui-kit__hint_left-top":t.position==="left-top","tooltip-yui-kit__hint_left-center":t.position==="left-center","tooltip-yui-kit__hint_left-bottom":t.position==="left-bottom","tooltip-yui-kit__hint_right-top":t.position==="right-top","tooltip-yui-kit__hint_right-center":t.position==="right-center","tooltip-yui-kit__hint_right-bottom":t.position==="right-bottom","tooltip-yui-kit__hint_small":t.size==="small","tooltip-yui-kit__hint_medium":t.size==="medium","tooltip-yui-kit__hint_large":t.size==="large","tooltip-yui-kit__hint_black":t.type==="black","tooltip-yui-kit__hint_blue":t.type==="blue","tooltip-yui-kit__hint_white":t.type==="white",[t.hintClass]:!0}]),u=l.computed(()=>{var N;const S=(N=a.value)==null?void 0:N.closest("dialog");return S||"body"}),c=l.reactive({isShow:!1}),f=()=>{k()},h=()=>{w()},g=()=>{p()},p=()=>{requestAnimationFrame(()=>{if(!a.value||!o.value||!c.isShow&&!t.isShow)return;const S={"--hint-top":"anchor(top)","--hint-left":"anchor(left)","--hint-width":"0","--hint-height":"0","--tooltip-width":"0","--tooltip-height":"0","--hint-visibility":"visible"};n||(S["--hint-top"]="0",S["--hint-left"]="0");const N=a.value.getBoundingClientRect(),T=o.value.getBoundingClientRect(),I=window.pageYOffset||document.documentElement.scrollTop,L=window.pageXOffset||document.documentElement.scrollLeft;let D=N.top+I,z=N.left+L;const H=a.value.closest("dialog");if(H){const Z=H.getBoundingClientRect();D=N.top-Z.top,z=N.left-Z.left;const de=H.scrollTop,Ae=H.scrollLeft;D+=de,z+=Ae}const X=N.width,re=N.height,ee=T.width,q=T.height;n||(S["--hint-top"]=`${D}px`,S["--hint-left"]=`${z}px`),S["--tooltip-width"]=`${X}px`,S["--tooltip-height"]=`${re}px`,S["--hint-width"]=`${ee}px`,S["--hint-height"]=`${q}px`,o.value&&bt(S,o.value)})},y=()=>{requestAnimationFrame(()=>{!o.value||t.hintGap===void 0||bt({"--tooltip-hint-gap":t.hintGap},o.value)})},v=()=>{o.value&&(bt({"position-anchor":`${r.value}`},o.value),p())};l.watch(()=>t.hintGap,y,{immediate:!0}),l.watch(()=>t.isCanShow,()=>{l.nextTick(()=>{v()})});const k=()=>{c.isShow=!0},w=()=>{c.isShow=!1},M=new MutationObserver(()=>{p()}),x=new ResizeObserver(()=>{var S;(c.isShow||t.isShow)&&!((S=a.value)!=null&&S.matches(":hover"))?w():p()}),_=S=>{M.observe(S,{childList:!0,attributes:!0,characterData:!0}),x.observe(S)};return l.onMounted(()=>{a.value&&bt({"anchor-name":`${r.value}`},a.value),v(),o.value&&_(o.value),a.value&&_(a.value),n||(window.addEventListener("scroll",p,!0),window.addEventListener("resize",p))}),l.onUnmounted(()=>{x.disconnect(),M.disconnect(),window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p)}),(S,N)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"tooltipRef",ref:a,class:"tooltip-yui-kit","data-testid":t.dataTestid,"aria-label":e.hint,onMouseenter:f,onMouseleave:h},[l.renderSlot(S.$slots,"default",{},void 0,!0),e.isCanShow?(l.openBlock(),l.createBlock(l.Teleport,{key:0,to:u.value},[l.createVNode(l.Transition,{name:"hint-animate",onEnter:g},{default:l.withCtx(()=>[l.withDirectives(l.createElementVNode("div",{ref_key:"hintRef",ref:o,class:l.normalizeClass(["tooltip-yui-kit__hint",s.value]),"data-testid":t.dataTestid},l.toDisplayString(e.hint),11,I8e),[[l.vShow,e.isShow||c.isShow]])]),_:1})],8,["to"])):l.createCommentVNode("",!0)],40,j8e))}}),[["__scopeId","data-v-0080a212"]]),W8e=["data-testid"],O8e=["data-testid"],z8e=["data-testid"],L8e=["onClick","data-testid"],$8e=l.defineComponent({__name:"Popover",props:{isShow:{type:Boolean},iconName:{default:se.moreVertical},options:{default:()=>[]},tooltip:{default:""},tooltipPosition:{default:"top-left"},isWCUse:{type:Boolean},translateY:{default:"0"},dataTestid:{default:"Popover"}},emits:["close"],setup(e,{emit:t}){const n=e,i=t,r=l.reactive({isShow:!1}),a=l.computed(()=>{var I;const T=(I=c.value)==null?void 0:I.closest("dialog");return T||"body"}),o=CSS.supports("top","anchor(bottom)"),s=l.useId(),u=l.computed(()=>`--anchor-popover-${s}`),c=l.ref(null),f=l.ref(null),h=l.ref(null),g=l.computed(()=>({"popover-yui-kit__wrapper":!0,"active-yui-kit":r.isShow,"empty-yui-kit":n.options.length===0})),p=()=>r.isShow=!r.isShow,y=()=>{r.isShow=!1,i("close")},v=T=>{T.function(),y()},k=()=>{requestAnimationFrame(()=>{if(!c.value||!f.value||!r.isShow)return;const T={},I=c.value.getBoundingClientRect(),L=window.pageYOffset||document.documentElement.scrollTop,D=window.pageXOffset||document.documentElement.scrollLeft;let z=I.bottom+L,H=I.left+D;const X=c.value.closest("dialog");if(X){const ee=X.getBoundingClientRect();z=I.top-ee.top,H=I.left-ee.left;const q=X.scrollTop,Z=X.scrollLeft;z+=q,H+=Z,z+=10}z+=10,T["--popover-top"]=`${z}px`,o||(T["--popover-left"]=`${H}px`),bt(T,f.value),(()=>{if(!f.value)return;const ee=f.value.getBoundingClientRect();ee.right>window.innerWidth&&(o?T["--popover-right"]="anchor(right) ":T["--popover-right"]=`${I.right-ee.width}px`)})(),T["--popover-right"]&&(T.left="auto",bt(T,f.value))})},w=T=>{const I=T.getBoundingClientRect(),L=document.elementFromPoint(I.left,I.top),D=document.elementFromPoint(I.right,I.bottom);!(L&&T.contains(L))&&!(D&&T.contains(D))&&y()},M=new IntersectionObserver(T=>{T.forEach(I=>{I.isIntersecting||y()})}),x=()=>{c.value&&f.value&&(window.addEventListener("scroll",k,!0),window.addEventListener("resize",k))},_=()=>{c.value&&f.value&&(window.removeEventListener("scroll",k,!0),window.removeEventListener("resize",k))},S=()=>{c.value&&window.addEventListener("scroll",w.bind(null,c.value),!0)},N=()=>{c.value&&window.removeEventListener("scroll",w.bind(null,c.value),!0)};return l.watch(()=>n.isShow,()=>r.isShow=n.isShow),l.watch(()=>r.isShow,()=>{r.isShow?(k(),S()):N(),!o&&(r.isShow?x():_())}),l.onMounted(()=>{c.value&&bt({"anchor-name":`${u.value}`},c.value),f.value&&bt({"position-anchor":`${u.value}`},f.value),h.value&&M.observe(h.value),o||k()}),l.onUnmounted(()=>{M.disconnect(),N(),o||_()}),(T,I)=>(l.openBlock(),l.createBlock(Cl,{hint:n.tooltip,size:"small",type:"black",position:n.tooltipPosition,"data-testid":n.dataTestid,"is-can-show":!!n.tooltip&&!r.isShow&&n.options.length>0},{default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:"popover-yui-kit",ref_key:"popover",ref:h,"data-testid":`${n.dataTestid}-Popover`},[l.createElementVNode("div",{ref_key:"reference",ref:c,class:l.normalizeClass(g.value),"data-testid":`${n.dataTestid}-PopoverShow`,onClick:p},[l.renderSlot(T.$slots,"trigger",{},()=>[l.createVNode(we,{class:"popover-yui-kit__icon",name:n.iconName,"data-testid":`${n.dataTestid}-PopoverShow-Icon`},null,8,["name","data-testid"])],!0)],10,O8e),(l.openBlock(),l.createBlock(l.Teleport,{to:a.value,disabled:n.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(${n.translateY})`}),ref_key:"floating",ref:f},[l.renderSlot(T.$slots,"default",{},()=>{var L;return[(L=n.options)!=null&&L.length?(l.openBlock(),l.createElementBlock("div",{key:0,class:"popover-yui-kit__options","data-testid":`${n.dataTestid}-PopoverShow-Options`},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.options,(D,z)=>(l.openBlock(),l.createElementBlock("div",{class:"popover-yui-kit__options__item",key:z,style:l.normalizeStyle(D.style),onClick:l.withModifiers(H=>v(D),["stop"]),"data-testid":`${n.dataTestid}-Item${z}`},l.toDisplayString(D.value),13,L8e))),128))],8,z8e)):l.createCommentVNode("",!0)]},!0)],4),[[l.vShow,r.isShow]])]),_:3})],8,["to","disabled"]))],8,W8e)),[[l.unref(vo),y,void 0,{bubble:!0}]])]),_:3},8,["hint","position","data-testid","is-can-show"]))}}),Go=me($8e,[["__scopeId","data-v-21b94369"]]),H8e=["data-testid"],R8e={class:"list-yui-kit__item-text"},B8e=me(l.defineComponent({__name:"MenuItem",props:{active:{type:Boolean},disabled:{type:Boolean},dataTestid:{},iconName:{},text:{},menuType:{}},emits:["click"],setup(e,{emit:t}){const n=t,i=()=>{e.disabled||n("click",e.menuType)};return(r,a)=>(l.openBlock(),l.createElementBlock("li",{class:l.normalizeClass(["list-yui-kit__item",{"list-yui-kit__item--disabled":e.disabled,"list-yui-kit__item--active":e.active}]),onClick:i,"data-testid":e.dataTestid},[l.createVNode(we,{name:e.iconName},null,8,["name"]),l.createElementVNode("span",R8e,l.toDisplayString(e.text),1),l.renderSlot(r.$slots,"default",{},void 0,!0)],10,H8e))}}),[["__scopeId","data-v-2617a6b9"]]);var rt=(e=>(e.profile="profile",e.theme="theme",e.options="options",e.exit="exit",e.qrAuth="qr-auth",e.help="help",e))(rt||{});const V8e={class:"menu-yui-kit__list"},F8e={class:"list-yui-kit"},U8e=me(l.defineComponent({__name:"UserMenuList",props:{closeAfterClick:{type:Boolean},menuOpen:{type:Boolean},categories:{},texts:{},user:{},languages:{},isBlackTheme:{type:Boolean},dataTestid:{default:"UserMenuList"}},emits:["click","unmount-qr-auth","themeChange","languageSwitch"],setup(e,{emit:t}){const n=e,i=t,r=l.ref(null);l.watch(()=>n.menuOpen,g=>{g||(r.value=null)});const a=g=>{if(r.value=g,g===rt.qrAuth){i("unmount-qr-auth");return}i("click",g)},o=g=>{i("languageSwitch",g)},s=()=>!1,u=g=>({[rt.profile]:"Profile",[rt.qrAuth]:"Auth with QR",[rt.theme]:"Theme",[rt.options]:"Settings",[rt.exit]:"Log Out",[rt.help]:"Help"})[g]??"",c=g=>({[rt.profile]:se.profile,[rt.qrAuth]:se.qrCode,[rt.theme]:se.darkThemeSwitcher,[rt.options]:se.settings,[rt.exit]:se.logout,[rt.help]:se.help})[g]??se.profile,f=g=>({[rt.profile]:"Profile",[rt.qrAuth]:"QR",[rt.theme]:"Theme",[rt.options]:"Settings",[rt.exit]:"Exit",[rt.help]:"Help"})[g]??g,h=g=>g===rt.theme;return(g,p)=>{var y,v,k;return l.openBlock(),l.createElementBlock("div",V8e,[l.createElementVNode("ul",F8e,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.categories,w=>{var M;return l.openBlock(),l.createBlock(B8e,{key:w,"data-testid":`${n.dataTestid}-${f(w)}-Item`,iconName:c(w),text:((M=n.texts)==null?void 0:M[w])??u(w),menuType:w,disabled:h(w),active:r.value===w,onClick:()=>a(w)},{default:l.withCtx(()=>[w===l.unref(rt).theme?(l.openBlock(),l.createBlock(Vd,{key:0,disabled:"",onChange:s})):l.createCommentVNode("",!0)]),_:2},1032,["data-testid","iconName","text","menuType","disabled","active","onClick"])}),128))]),(y=n.languages)!=null&&y.items?(l.openBlock(),l.createBlock(Eu,{key:0,items:(v=n.languages)==null?void 0:v.items,"default-value":(k=n.languages)==null?void 0:k.defaultValue,onChange:o,"data-testid":`${n.dataTestid}-Language-Switch`},null,8,["items","default-value","data-testid"])):l.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-f2c557cf"]]),Y8e=["data-testid"],X8e={class:"menu-yui-kit__wrapper"},q8e={class:"menu-yui-kit__names"},G8e={class:"menu-yui-kit__name"},K8e={class:"menu-yui-kit__role"},N1=me(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","themeChange","languageSwitch"],setup(e,{emit:t}){const n=e,i=l.reactive({isShow:!1,isBlackTheme:n.isBlackTheme??!1}),r=t,a=l.computed(()=>({"menu-yui-kit__heading":!0,"active-yui-kit":i.isShow}));function o(g){r("click",g),n.closeAfterClick&&(i.isShow=!1)}const s=l.computed(()=>i.isShow?se.chevronUp:se.chevronDown),u=()=>{i.isShow=!i.isShow};function c(g){n.closeAfterClick&&(i.isShow=!1),r("themeChange",g),i.isBlackTheme=g}const f=g=>{n.closeAfterClick&&(i.isShow=!1),r("languageSwitch",g)},h=()=>{n.closeAfterClick&&(i.isShow=!1),r("unmount-qr-auth")};return(g,p)=>(l.openBlock(),l.createElementBlock("div",{class:"menu-yui-kit","data-testid":n.dataTestid},[l.createElementVNode("div",X8e,[l.createVNode(Go,{open:i.isShow,onClose:p[0]||(p[0]=y=>i.isShow=!1),placement:"bottom-start","data-testid":`${n.dataTestid}-Popover`},{trigger:l.withCtx(()=>{var y,v,k;return[l.createElementVNode("div",{class:l.normalizeClass(a.value),onClick:u},[l.createVNode(Gd,{class:"menu-yui-kit__avatar",url:(y=n.user)==null?void 0:y.avatar,alt:"user-avatar","data-testid":`${n.dataTestid}-Avatar`},null,8,["url","data-testid"]),l.createElementVNode("div",q8e,[l.createElementVNode("p",G8e,l.toDisplayString((v=n.user)==null?void 0:v.name),1),l.createElementVNode("p",K8e,l.toDisplayString((k=n.user)==null?void 0:k.role),1)]),l.createVNode(yt,{type:l.unref(Qe).ghost,class:"menu-yui-kit__button","data-testid":`${n.dataTestid}-Toggle`},{default:l.withCtx(()=>[l.createVNode(we,{class:"menu-yui-kit__button-icon",name:s.value},null,8,["name"])]),_:1},8,["type","data-testid"])],2)]}),default:l.withCtx(()=>[l.createVNode(U8e,{"data-testid":`${n.dataTestid}-List`,"is-black-theme":i.isBlackTheme,"menu-open":i.isShow,languages:n.languages,categories:n.categories,texts:n.texts,onClick:o,onThemeChange:c,onLanguageSwitch:f,onUnmountQrAuth:h},null,8,["data-testid","is-black-theme","menu-open","languages","categories","texts"])]),_:1},8,["open","data-testid"])])],8,Y8e))}}),[["__scopeId","data-v-38df3478"]]);var Kd=(e=>(e.default="default",e.minor="minor",e))(Kd||{});const Q8e=["data-testid"],J8e=["data-testid"],Z8e=["data-testid"],e7e=["data-testid","placeholder","required","maxlength","readonly"],t7e=l.defineComponent({__name:"Textarea",props:{placeholder:{},inputMessage:{},required:{type:Boolean,default:!1},maxlength:{},modelValue:{default:""},readonly:{type:Boolean,default:!1},type:{default:Kd.default},modelModifiers:{default:()=>({})},dataTestid:{default:"Textarea"}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=t,r=l.reactive({isPressed:!1,inputElement:n.modelValue}),a=l.computed(()=>[{pressed:r.isPressed,readonly:n.readonly,[n.type]:!0}]),o=()=>{i("update:modelValue",r.inputElement)},s=()=>{n.readonly||(r.isPressed=!0)},u=()=>{r.isPressed=!1};return l.watch(()=>n.modelValue,c=>{r.inputElement=c}),(c,f)=>(l.openBlock(),l.createElementBlock("fieldset",{class:l.normalizeClass(["input-yui-kit",a.value]),onFocusout:u,"data-testid":n.dataTestid},[n.inputMessage?(l.openBlock(),l.createElementBlock("legend",{key:0,class:"input-yui-kit__legend","data-testid":`${n.dataTestid}-Legend`},[l.createTextVNode(l.toDisplayString(n.inputMessage)+" ",1),n.required?(l.openBlock(),l.createElementBlock("sup",{key:0,class:"input-yui-kit__star","data-testid":`${n.dataTestid}-Legend-Star`},"*",8,Z8e)):l.createCommentVNode("",!0)],8,J8e)):l.createCommentVNode("",!0),l.withDirectives(l.createElementVNode("textarea",{"onUpdate:modelValue":f[0]||(f[0]=h=>r.inputElement=h),onFocus:s,onInput:o,"data-testid":`${n.dataTestid}-Textarea`,class:"input-yui-kit__input",placeholder:n.placeholder,required:n.required,maxlength:n.maxlength,readonly:n.readonly},null,40,e7e),[[l.vModelText,r.inputElement]])],42,Q8e))}}),j1=me(t7e,[["__scopeId","data-v-d71a57d3"]]);var v3=(e=>(e.img="img",e.pdf="pdf",e.docx="docx",e))(v3||{});const n7e=["data-testid"],i7e=["data-testid"],r7e=["src","alt","data-testid"],a7e=["data-testid"],o7e=["data-testid"],s7e=["data-testid"],I1=me(l.defineComponent({__name:"Picture",props:{type:{},alt:{},url:{},caption:{},dataTestid:{default:"Picture"}},setup(e){const t=e;return(n,i)=>(l.openBlock(),l.createElementBlock("figure",{class:"picture-yui-kit","data-testid":t.dataTestid},[t.type==l.unref(v3).img?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createElementVNode("picture",{class:"picture-yui-kit__picture","data-testid":`${t.dataTestid}-Picture`},[l.createElementVNode("img",{class:"picture-yui-kit__picture__image",src:t.url,alt:t.alt,"data-testid":`${t.dataTestid}-Picture-Img`},null,8,r7e)],8,i7e),l.createElementVNode("figcaption",{class:"picture-yui-kit__picture__caption","data-testid":`${t.dataTestid}-Caption`},l.toDisplayString(t.caption),9,a7e)],64)):(l.openBlock(),l.createElementBlock("div",{key:1,class:"picture-yui-kit__caption","data-testid":`${t.dataTestid}-Caption-Box`},[l.createElementVNode("h4",{class:"picture-yui-kit__caption__title","data-testid":`${t.dataTestid}-Caption-Title`},l.toDisplayString(t.caption),9,s7e)],8,o7e))],8,n7e))}}),[["__scopeId","data-v-b6eba94c"]]);var k3=(e=>(e.success="success",e.warning="warning",e.error="error",e.info="info",e))(k3||{}),M3=(e=>(e.success="Успешно",e.warning="Предупреждение",e.error="Ошибка",e.info="Уведомление",e))(M3||{}),C3=(e=>(e[e.success=se.checkbox]="success",e[e.warning=se.alertTriangle]="warning",e[e.error=se.exitCircle]="error",e[e.info=se.info]="info",e))(C3||{});const l7e=["id","data-testid"],u7e=["data-testid"],d7e=["data-testid"],c7e=["data-testid"],f7e=["data-testid"],h7e=l.defineComponent({__name:"Notification",props:{type:{default:k3.info},title:{},pushKey:{},description:{default:""},timeout:{default:3},showPopover:{type:Boolean,default:!0},dataTestid:{default:"Notification"}},emits:["close"],setup(e,{expose:t,emit:n}){const i=e,r=n,a=l.ref(null);K(a,"toggle",()=>{i.timeout>0&&setTimeout(()=>{var c;return(c=a.value)==null?void 0:c.hidePopover()},i.timeout*1e3)});const o=()=>(r("close"),"hide"),s=()=>{var c;(c=a.value)==null||c.showPopover()},u=l.reactive({message:{icon:C3[i.type],title:i.title||M3[i.type],description:i.description}});return l.onMounted(()=>{var c;i.showPopover&&((c=a.value)==null||c.showPopover())}),t({showPopover:s}),(c,f)=>(l.openBlock(),l.createElementBlock("div",{popover:"manual",id:i.pushKey.toString(),class:l.normalizeClass(`push-notification-yui-kit push-notification-yui-kit_${i.type}`),"data-testid":i.dataTestid,ref_key:"popover",ref:a},[l.createElementVNode("div",{class:"notification-yui-kit","data-testid":`${i.dataTestid}-Notification`},[l.createElementVNode("div",{class:"notification-yui-kit__block","data-testid":`${i.dataTestid}-Notification-Block`},[l.createVNode(we,{name:u.message.icon,class:"notification-yui-kit__block-icon","data-testid":`${i.dataTestid}-Notification-Icon`},null,8,["name","data-testid"]),l.createElementVNode("h4",{class:"notification-yui-kit__block-title","data-testid":`${i.dataTestid}-Notification-Title`},l.toDisplayString(u.message.title),9,c7e),l.createElementVNode("span",{class:"notification-yui-kit__block-text","data-testid":`${i.dataTestid}-Notification-Description`},l.toDisplayString(u.message.description),9,f7e)],8,d7e),l.createVNode(yt,{class:"notification-yui-kit__exit",type:l.unref(Qe).ghost,popovertarget:i.pushKey.toString(),popovertargetaction:o,"data-testid":`${i.dataTestid}-Notification-Button`},{default:l.withCtx(()=>[l.createVNode(we,{name:l.unref(se).crossSmall,"data-testid":`${i.dataTestid}-Notification-Icon`},null,8,["name","data-testid"])]),_:1},8,["type","popovertarget","data-testid"])],8,u7e)],10,l7e))}}),W1=me(h7e,[["__scopeId","data-v-51a00a13"]]),O1=l.defineComponent({__name:"CopyIcon",props:{content:{default:""},dataTestid:{default:"CopyIcon"}},setup(e){const t=e,n=()=>{const i=t.content,r=document.createElement("textarea");r.value=i;const a=document.querySelectorAll("dialog[open]"),o=a.length?a[a.length-1]:null;o?o.append(r):document.body.append(r),r.select(),r.setSelectionRange(0,99999),document.execCommand("copy"),r.remove()};return(i,r)=>(l.openBlock(),l.createBlock(we,{class:"copy-icon-yui-kit",name:l.unref(se).copy,"data-testid":t.dataTestid,onClick:n},null,8,["name","data-testid"]))}}),m7e=["data-testid"],p7e=["data-testid"],g7e=["data-testid"],y7e=["data-testid"],b7e=["data-testid"],z1=me(l.defineComponent({__name:"Loader",props:{title:{default:"Загрузка..."},dataTestid:{default:"Loader"}},setup(e){const t=e;return(n,i)=>(l.openBlock(),l.createElementBlock("div",{class:"loader","data-testid":t.dataTestid},[l.createElementVNode("div",{class:"loader__area","data-testid":`${t.dataTestid}-Area`},[l.createElementVNode("div",{class:"loader__circle loader__circle--light-blue","data-testid":`${t.dataTestid}-Loader-LightBlue1`},null,8,g7e),l.createElementVNode("div",{class:"loader__circle loader__circle--blue","data-testid":`${t.dataTestid}-Loader-LightBlue2`},null,8,y7e)],8,p7e),t.title?(l.openBlock(),l.createElementBlock("span",{key:0,class:"loader__span","data-testid":`${t.dataTestid}-Loader-Title`},l.toDisplayString(t.title),9,b7e)):l.createCommentVNode("",!0)],8,m7e))}}),[["__scopeId","data-v-12d4e463"]]),w7e=["data-testid"],v7e=["data-testid"],k7e=["data-testid"],M7e=["data-testid"],C7e=["data-testid"],x7e=["data-testid"],S7e=["data-testid"],_7e=["data-testid"],T7e=["data-testid"],P7e=["data-testid"],E7e=["data-testid"],A7e=["data-testid"],D7e=["data-testid"],N7e=["data-testid"],j7e=l.defineComponent({__name:"FilterTag",props:{title:{},iconName:{default:se.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(e,{emit:t}){const n=e,i=l.reactive({isShow:!1,options:[]}),r=t,a=l.computed(()=>({"filter-yui-kit__wrapper":!0,"active-yui-kit":i.isShow})),o=()=>i.isShow=!i.isShow,s=()=>{i.isShow=!1},u=l.computed(()=>i.options.filter(p=>p.chose)),c=l.computed(()=>i.options.filter(p=>!p.chose)),f=p=>{n.disallowNull&&p.chose||(p.chose=!p.chose,n.multiply||(i.options=i.options.map(y=>({...y,chose:p.value===y.value&&p.chose}))),i.options.every(y=>y.chose)&&(i.options=i.options.map(y=>({...y,chose:!1}))),r("change",u.value.map(y=>y.value)),i.isShow=!1)},h=()=>{i.options=i.options.map(p=>({...p,chose:!1})),i.isShow=!1,r("change",[])},g=()=>{i.options=n.options.map(p=>({...p,chose:n.selectedValues.includes(p.value)})),i.options.every(p=>p.chose)&&(i.options=i.options.map(p=>({...p,chose:!1})))};return l.watch(()=>[n.options,n.selectedValues],g),l.watch(()=>n.selectedValues,g),l.onMounted(g),(p,y)=>l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:"filter-yui-kit","data-testid":n.dataTestid},[l.createElementVNode("div",{class:l.normalizeClass(a.value),onClick:o,"data-testid":`${n.dataTestid}-Wrapper`},[n.iconName?(l.openBlock(),l.createBlock(we,{key:0,name:n.iconName,"data-testid":`${n.dataTestid}-Icon`},null,8,["name","data-testid"])):l.createCommentVNode("",!0),n.title?(l.openBlock(),l.createElementBlock("span",{key:1,"data-testid":`${n.dataTestid}-Title`},l.toDisplayString(n.title),9,k7e)):l.createCommentVNode("",!0),!u.value.length&&!n.disallowNull?(l.openBlock(),l.createBlock(Ut,{key:2,disabled:"",text:"Все","data-testid":`${n.dataTestid}-Badges-All`},null,8,["data-testid"])):(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:3},l.renderList(u.value.filter((v,k)=>k<n.maxShowCount),(v,k)=>(l.openBlock(),l.createBlock(Ut,{key:v.value,type:v.type,disabled:"","data-testid":`${n.dataTestid}-Badges${k}`,text:v.label},null,8,["type","data-testid","text"]))),128)),n.maxShowCount<u.value.length?(l.openBlock(),l.createElementBlock("div",{key:4,class:"filter-yui-kit__counter","data-testid":`${n.dataTestid}-MaxShowCount-Counter`},[l.createTextVNode(" +"+l.toDisplayString(u.value.length-n.maxShowCount)+" ",1),l.createElementVNode("div",{class:"filter-yui-kit__counter-content","data-testid":`${n.dataTestid}-MaxShowCount-Content`},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(u.value.filter((v,k)=>k>=n.maxShowCount),(v,k)=>(l.openBlock(),l.createBlock(Ut,{key:v.value,type:v.type,disabled:"",text:v.label,"data-testid":`${n.dataTestid}-MaxShow-Badges${k}`},null,8,["type","text","data-testid"]))),128))],8,C7e)],8,M7e)):l.createCommentVNode("",!0),n.showClearButton&&u.value.length>0?(l.openBlock(),l.createElementBlock("button",{key:5,type:"button",class:"filter-yui-kit__close",onClick:l.withModifiers(h,["stop"]),"data-testid":`${n.dataTestid}-Filter-CloseButton`},[l.createVNode(we,{name:l.unref(se).crossSmall,"data-testid":`${n.dataTestid}-CloseButton-Icon`},null,8,["name","data-testid"])],8,x7e)):l.createCommentVNode("",!0)],10,v7e),i.isShow?(l.openBlock(),l.createElementBlock("div",{key:0,class:"filter-yui-kit__select-wrapper","data-testid":`${n.dataTestid}-Select-Wrapper`},[l.createElementVNode("ul",{class:"filter-yui-kit__select-list selected-yui-kit","data-testid":`${n.dataTestid}-Select-List`},[u.value.length?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("li",{key:0,class:"filter-yui-kit__select-item","data-testid":`${n.dataTestid}-Select-Item`},[l.createVNode(Ut,{disabled:"",text:"Все","data-testid":`${n.dataTestid}-Select-Badges`},null,8,["data-testid"])],8,T7e)),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(u.value,(v,k)=>(l.openBlock(),l.createElementBlock("li",{class:"filter-yui-kit__select-item",key:v.value,"data-testid":`${n.dataTestid}-Select-Item${k}`},[l.createVNode(Ut,{disabled:!0,choosed:!n.disallowNull&&v.chose,type:v.type,onClick:w=>f(v),text:v.label,"data-testid":`${n.dataTestid}-Select-Badges${k}`},null,8,["choosed","type","onClick","text","data-testid"])],8,P7e))),128))],8,_7e),l.createElementVNode("div",{class:"filter-yui-kit__select__divider","data-testid":`${n.dataTestid}-Select-Divider`},null,8,E7e),i.isShow?(l.openBlock(),l.createElementBlock("ul",{key:0,class:"filter-yui-kit__select-list","data-testid":`${n.dataTestid}-Select-List`},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(c.value,(v,k)=>(l.openBlock(),l.createElementBlock("li",{class:"filter-yui-kit__select-item",key:v.value,"data-testid":`${n.dataTestid}-Select-List${k}`},[l.createVNode(Ut,{disabled:!0,choosed:!1,type:v.type,text:v.label,"data-testid":`${n.dataTestid}-Select-Badges${k}`,onClick:w=>f(v)},null,8,["type","text","data-testid","onClick"])],8,D7e))),128)),e.disallowNull?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("li",{key:0,class:"filter-yui-kit__select-item","data-testid":`${n.dataTestid}-Select-Item`},[u.value.length?(l.openBlock(),l.createBlock(Ut,{key:0,disabled:"","data-testid":`${n.dataTestid}-Select-Badges`,text:"Все",onClick:h},null,8,["data-testid"])):l.createCommentVNode("",!0)],8,N7e))],8,A7e)):l.createCommentVNode("",!0)],8,S7e)):l.createCommentVNode("",!0)],8,w7e)),[[l.unref(vo),s,void 0,{bubble:!0}]])}}),L1=me(j7e,[["__scopeId","data-v-41d2f43b"]]),I7e=["data-testid"],W7e=["data-testid"],O7e=["data-testid"],z7e=["data-testid"],$1=me(l.defineComponent({__name:"CircularProgress",props:{percent:{},dataTestid:{default:"CircularProgress"}},setup(e){const t=e,n=()=>{const i=Math.min(Math.max(t.percent,0),100),r=i/100*360;if(i<=25)return`polygon(50% 50%, 50% 0%, calc(50% + 50% * cos(${r-90}deg)) 0,calc(50% + 50% * cos(${r-90}deg)) calc(50% + 50% * sin(${r-90}deg)), 50% 50%)`;if(i<=50)return`polygon(50% 50%, 50% 0%, 100% 0%, 100% calc(50% + 50% * sin(${r-90}deg)), calc(50% + 50% * cos(${r-90}deg)) calc(50% + 50% * sin(${r-90}deg)), 50% 50%)`;if(i<=75)return`polygon(50% 50%, 50% 0%, 100% 0%, 100% 100%,
|
|
1309
|
-
calc(50% + 50% * cos(${r-90}deg)) 100%, calc(50% + 50% * cos(${r-90}deg)) calc(50% + 50% * sin(${r-90}deg)), 50% 50%)`;if(i<=100)return`polygon(50% 50%, 50% 0%, 100% 0%, 100% 100%,0% 100%, 0% calc(50% + 50% * sin(${r-90}deg)), 50% 50%)`};return(i,r)=>t.percent<100?(l.openBlock(),l.createElementBlock("div",{key:0,class:"pie-chart","data-testid":`${t.dataTestid}-PieChart`},[l.createElementVNode("div",{class:"pie-chart-border",style:l.normalizeStyle({"border-color":t.percent<50?"#ef9b8f":"#ffcc00"}),"data-testid":`${t.dataTestid}-PieChart-Border`},[l.createElementVNode("div",{class:"sector",style:l.normalizeStyle({clipPath:n(),"background-color":t.percent<50?"#ef9b8f":"#ffcc00"}),"data-testid":`${t.dataTestid}-PieChart-Sector`},null,12,O7e)],12,W7e)],8,I7e)):(l.openBlock(),l.createElementBlock("svg",{key:1,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","data-testid":`${t.dataTestid}-Icon`,xmlns:"http://www.w3.org/2000/svg"},[...r[0]||(r[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,z7e))}}),[["__scopeId","data-v-03d46e7b"]]),L7e=["colspan","rowspan","data-testid"],Ko=me(l.defineComponent({name:"TableTh",__name:"TableTh",props:{colspan:{default:1},rowspan:{default:1},dataTestid:{default:"DataHeader"}},setup(e){const t=e;return(n,i)=>(l.openBlock(),l.createElementBlock("th",{colspan:e.colspan,rowspan:e.rowspan,"data-testid":t.dataTestid,class:"table-th"},[l.renderSlot(n.$slots,"default",{},void 0,!0)],8,L7e))}}),[["__scopeId","data-v-273b8b5e"]]),$7e=["data-testid"],xl=me(l.defineComponent({name:"HeadTableRow",__name:"HeadTableRow",props:{dataTestid:{default:"TableRow"}},setup(e){const t=e;return(n,i)=>(l.openBlock(),l.createElementBlock("tr",{class:"head-table-row","data-testid":t.dataTestid},[l.renderSlot(n.$slots,"default",{},void 0,!0)],8,$7e))}}),[["__scopeId","data-v-e226d64f"]]),x3=(e,t,n,i)=>{const r=l.ref(!1),a=l.ref(100);let o=0,s=0;const u=l.computed(()=>[{"scroll-wrapper__track_hide":a.value===100,"scroll-wrapper__track_drag":r.value}]),c=l.computed(()=>a.value<100),f=()=>{if(e.value){const w=e.value.clientWidth,M=e.value.scrollWidth;return w>=M?100:w/M*100}return 100},h=()=>{if(!e.value||!t.value||!n.value||!i.value)return;const{scrollLeft:w,scrollWidth:M,clientWidth:x}=e.value,_=M-x;if(_<=0)return;const S=w/_,N=i.value.clientWidth,T=n.value.clientWidth,I=N-T,L=S*I;requestAnimationFrame(()=>{t.value&&bt({"--scroll-bar-left-position":`${L}px`},t.value)})},g=w=>{!e.value||!t.value||(r.value=!0,o=w.clientX,s=e.value.scrollLeft,document.addEventListener("pointermove",p),document.addEventListener("pointerup",y,!0))},p=w=>{if(r.value&&e.value&&n.value){const M=w.clientX-o,x=(e.value.scrollWidth-e.value.clientWidth)/(e.value.clientWidth-n.value.clientWidth);e.value.scrollLeft=s+M*x,h()}},y=()=>{r.value=!1,document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",y,!0)};return{onDrag:p,onTrackClick:w=>{if(e.value&&n.value){const M=w.currentTarget.getBoundingClientRect(),x=w.clientX-M.left,_=n.value.clientWidth,S=M.width;let N=(x-_/2)*((e.value.scrollWidth-e.value.clientWidth)/(S-_));N=Math.max(0,Math.min(N,e.value.scrollWidth-e.value.clientWidth)),e.value.scrollLeft=N,h()}},startDrag:g,getPercentHorizontalView:f,changeBarPosition:h,isDragging:r,scrollHorizontalWidthPercent:a,setHorizontalBarWidth:()=>{if(!e.value||!t.value)return;const w=f();a.value=w,bt({"--scroll-horizontal-bar-width":`${w}%`},t.value)},horizontalTrackClass:u,isExistHorizontalTrack:c}},S3=(e,t,n,i)=>{const r=l.ref(!1),a=l.ref(100);let o=0,s=0;const u=l.computed(()=>[{"scroll-wrapper__track_hide":a.value===100,"scroll-wrapper__track_drag":r.value}]),c=l.computed(()=>a.value<100),f=()=>{if(e.value){const w=e.value.clientHeight,M=e.value.scrollHeight;if(w>=M)return 100;if(w<M)return w/M*100}return 100},h=()=>{if(!e.value||!t.value||!n.value||!i.value)return;const{scrollTop:w,scrollHeight:M,clientHeight:x}=e.value,_=M-x;if(_<=0)return;const S=w/_,N=i.value.clientHeight,T=n.value.clientHeight,I=N-T,L=S*I;requestAnimationFrame(()=>{t.value&&bt({"--scroll-bar-top-postion":`${L}px`},t.value)})},g=w=>{!e.value||!t.value||(r.value=!0,o=w.clientY,s=e.value.scrollTop,document.addEventListener("pointermove",p),document.addEventListener("pointerup",y))},p=w=>{if(r.value&&e.value&&n.value){const M=w.clientY-o,x=(e.value.scrollHeight-e.value.clientHeight)/(e.value.clientHeight-n.value.clientHeight);e.value.scrollTop=s+M*x,h()}},y=()=>{r.value=!1,document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",y)};return{onDrag:p,onTrackClick:w=>{if(e.value&&n.value){const M=w.currentTarget.getBoundingClientRect(),x=w.clientY-M.top,_=n.value.clientHeight,S=M.height;let N=(x-_/2)*((e.value.scrollHeight-e.value.clientHeight)/(S-_));N=Math.max(0,Math.min(N,e.value.scrollHeight-e.value.clientHeight)),e.value.scrollTop=N,h()}},startDrag:g,getProcentVerticalView:f,changeBarPosition:h,isDragging:r,scrollVerticalHeightProcent:a,setVerticalBarHeight:()=>{if(!e.value||!t.value)return;const w=f();a.value=w,bt({"--scroll-vertical-bar-height":`${w}%`},t.value)},verticalTrackClass:u,isExistVerticalTrack:c}},H7e={class:"scroll-wrapper__vertical-wrapper"},R7e={class:"scroll-wrapper__horizont-wrapper"},Sl=me(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(e,{expose:t,emit:n}){const i=n,r=l.ref(null),a=l.ref(null),o=l.ref(null),s=l.ref(null),u=l.ref(null),c=l.ref(null),{onTrackClick:f,startDrag:h,changeBarPosition:g,setVerticalBarHeight:p,verticalTrackClass:y,isExistVerticalTrack:v}=S3(r,a,s,o),{changeBarPosition:k,startDrag:w,onTrackClick:M,setHorizontalBarWidth:x,horizontalTrackClass:_,isExistHorizontalTrack:S}=x3(r,a,c,u),N=q=>{g(),k(),i("unmount-scroll",q)},T=()=>{requestAnimationFrame(()=>{I(),L()})},I=()=>{if(!r.value||!a.value)return;const q=getComputedStyle(a.value),Z=a.value.style.minHeight||q.minHeight,de=a.value.style.maxHeight||q.maxHeight,Ae=a.value.style.height;bt({"--scroll-wrapper-height":`${Ae}`,"--scroll-wrapper-max-height":`${de}`,"--scroll-wrapper-min-height":`${Z}`},a.value)},L=()=>{p(),x(),g(),k()},D=()=>{r.value&&r.value.addEventListener("scroll",N)},z=()=>{r.value&&(r.value.scrollTop=0)},H=()=>{r.value&&(r.value.scrollHeight<=r.value.clientHeight?i("unmount-paginate",!0):i("unmount-paginate",!1))},X=new MutationObserver(()=>{T(),H()}),re=new ResizeObserver(()=>{T(),H()}),ee=q=>{X.observe(q,{childList:!0,subtree:!0,attributes:!0}),re.observe(q)};return t({scrollToTop:z,setHeightSlot:I}),l.onMounted(()=>{T(),D(),a.value&&ee(a.value),o.value&&ee(o.value),window.addEventListener("resize",T),i("on-mounted")}),l.onUnmounted(()=>{window.removeEventListener("resize",T)}),(q,Z)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"scrollWrapperRef",ref:a,class:"scroll-wrapper"},[l.createElementVNode("div",H7e,[l.createElementVNode("div",R7e,[l.createElementVNode("div",{ref_key:"slotRef",ref:r,class:"scroll-wrapper__slot"},[l.renderSlot(q.$slots,"default",{},void 0,!0)],512),l.unref(S)||e.isShowHorizontalScroll?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"horizontTrackRef",ref:u,class:l.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_horizont",l.unref(_)]),onClick:Z[1]||(Z[1]=l.withModifiers((...de)=>l.unref(M)&&l.unref(M)(...de),["self","prevent","left"]))},[l.createElementVNode("div",{ref_key:"horizontBarRef",ref:c,class:"scroll-wrapper__bar",onPointerdown:Z[0]||(Z[0]=l.withModifiers((...de)=>l.unref(w)&&l.unref(w)(...de),["prevent","left"]))},null,544)],2)):l.createCommentVNode("",!0)]),l.unref(v)||e.isShowVerticalScroll?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"verticalTrackRef",ref:o,class:l.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_vertical",l.unref(y)]),onClick:Z[3]||(Z[3]=l.withModifiers((...de)=>l.unref(f)&&l.unref(f)(...de),["self","prevent","left"]))},[l.createElementVNode("div",{ref_key:"verticalBarRef",ref:s,class:"scroll-wrapper__bar",onPointerdown:Z[2]||(Z[2]=l.withModifiers((...de)=>l.unref(h)&&l.unref(h)(...de),["prevent","left"]))},null,544)],2)):l.createCommentVNode("",!0)])],512))}}),[["__scopeId","data-v-a4798f10"]]),B7e=["id","data-testid"],V7e=["id","data-testid"],F7e=["id","data-testid"],H1=me(l.defineComponent({name:"TableNew",__name:"Table",props:{tableId:{},search:{},tbodyId:{},theadId:{},columnCount:{},dataTestid:{default:"Table"},isShowVerticalScroll:{type:Boolean,default:!1},isShowHorizontalScroll:{type:Boolean,default:!1}},emits:["unmount-scroll","unmount-paginate"],setup(e,{expose:t,emit:n}){var x;const i=e,r=n,a=l.reactive({headHeight:0,maxColumnCount:0}),o=l.ref(null),s=l.ref(null),u=l.ref(null),c=l.ref(null),f=l.ref(null),h=_=>{r("unmount-scroll",_)},g=_=>r("unmount-paginate",_),p=()=>{if(!o.value||!f.value)return;const _=o.value.querySelector("thead");if(!_)return;const S=_.getBoundingClientRect().height;a.headHeight=S,bt({"--scroll-track-margin-top":`${S}px`},f.value.$el)},y=()=>{f.value&&f.value.scrollToTop()},v=()=>{if(f.value&&c.value){const _=getComputedStyle(f.value.$el),S=Number(_.minHeight.replace(/\D/g,""));if(S&&S>0)return;bt({"min-height":`${a.headHeight+108}px`},f.value.$el)}},k=()=>{let _=1;if(s.value){for(let S=0;S<s.value.children.length;S++)_=Math.max(s.value.children[S].children.length,_);a.maxColumnCount=_}},w=new MutationObserver(()=>{k()}),M=new ResizeObserver(()=>{p()});return t({scrollToTop:y,setHeightSlot:(x=f.value)==null?void 0:x.setHeightSlot,tbodyRef:u,tableRef:o,theadRef:s}),l.onMounted(()=>{p(),k(),window.addEventListener("resize",p),o.value&&M.observe(o.value),s.value&&w.observe(s.value,{childList:!0,subtree:!0}),v()}),(_,S)=>(l.openBlock(),l.createBlock(Sl,{ref_key:"scrollWrapperRef",ref:f,class:"table",onUnmountScroll:h,onUnmountPaginate:g,"is-show-vertical-scroll":i.isShowVerticalScroll,"is-show-horizontal-scroll":i.isShowHorizontalScroll,"data-testid":`${i.dataTestid}-ScrollWrapper`},{default:l.withCtx(()=>[l.createElementVNode("table",{ref_key:"tableRef",ref:o,id:i.tableId,class:"table__table","data-testid":`${i.dataTestid}`},[l.renderSlot(_.$slots,"default",{},()=>{var N;return[l.createElementVNode("colgroup",null,[l.renderSlot(_.$slots,"colspan",{},void 0,!0)]),_.$slots.head?(l.openBlock(),l.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:s,id:i.theadId,class:"table__head","data-testid":`${i.dataTestid}-Thead`},[l.renderSlot(_.$slots,"head",{},void 0,!0),_.$slots.search?(l.openBlock(),l.createBlock(xl,{key:0,class:"table__search-tr",id:(N=i.search)==null?void 0:N.rowId,ref_key:"searchRowRef",ref:c,"data-testid":`${i.dataTestid}-Search-Row`},{default:l.withCtx(()=>{var T;return[l.createVNode(Ko,{colspan:i.columnCount||a.maxColumnCount,class:"table__search-th",id:(T=i.search)==null?void 0:T.headId,"data-testid":`${i.dataTestid}-SearchRow-Search`},{default:l.withCtx(()=>[l.renderSlot(_.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","id","data-testid"])]}),_:3},8,["id","data-testid"])):l.createCommentVNode("",!0)],8,V7e)):l.createCommentVNode("",!0),l.renderSlot(_.$slots,"body-group",{},()=>[_.$slots.body?(l.openBlock(),l.createElementBlock("tbody",{key:0,id:i.tbodyId,ref_key:"tbodyRef",ref:u,class:"table__body","data-testid":`${i.dataTestid}-Tbody`},[l.renderSlot(_.$slots,"body",{},void 0,!0)],8,F7e)):l.createCommentVNode("",!0)],!0)]},!0)],8,B7e)]),_:3},8,["is-show-vertical-scroll","is-show-horizontal-scroll","data-testid"]))}}),[["__scopeId","data-v-58c866b5"]]),U7e=["data-testid"],Qd=me(l.defineComponent({name:"TableRow",__name:"TableRow",props:{type:{default:"default"},dataTestid:{}},setup(e){const t=e,n=l.computed(()=>[{"table-row_active":t.type==="selected"}]);return(i,r)=>(l.openBlock(),l.createElementBlock("tr",{class:l.normalizeClass(["table-row",n.value]),"data-testid":t.dataTestid},[l.renderSlot(i.$slots,"default",{},void 0,!0)],10,U7e))}}),[["__scopeId","data-v-a57d78ee"]]),Y7e=["rowspan","colspan","data-testid"],Jd=l.defineComponent({name:"TableTd",__name:"TableTd",props:{colspan:{default:1},rowspan:{default:1},dataTestid:{default:"DataCell"}},setup(e){const t=e;return(n,i)=>(l.openBlock(),l.createElementBlock("td",{rowspan:e.rowspan,colspan:e.colspan,class:"table-td","data-testid":t.dataTestid},[l.renderSlot(n.$slots,"default")],8,Y7e))}}),R1=me(l.defineComponent({name:"SectionTableRow",__name:"SectionTableRow",props:{colspan:{},dataTestid:{default:"SectionTableRow"}},setup(e){const t=e;return(n,i)=>(l.openBlock(),l.createBlock(Qd,{class:"section-table-row","data-testid":t.dataTestid},{default:l.withCtx(()=>[l.createVNode(Jd,{colspan:e.colspan,class:"section-table-row__td","data-testid":`${t.dataTestid}-DataCell`},{default:l.withCtx(()=>[l.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"]))}}),[["__scopeId","data-v-e4d9fcd4"]]),X7e=["disabled","name","value","data-testid"],B1=me(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(e){const t=e,n=l.useModel(e,"modelValue");return(i,r)=>l.withDirectives((l.openBlock(),l.createElementBlock("input",{"onUpdate:modelValue":r[0]||(r[0]=a=>n.value=a),type:"radio",disabled:e.disabled,name:e.name,value:e.value,class:"radio","data-testid":t.dataTestid},null,8,X7e)),[[l.vModelRadio,n.value]])}}),[["__scopeId","data-v-5fca4dd8"]]),q7e=["data-testid"],G7e=["data-testid"],_3=me(l.defineComponent({name:"ChoosenMiniOptions",__name:"ChoosenMiniOptions",props:{options:{},dataTestid:{default:"ChoosenMiniOptions"}},emits:["remove"],setup(e,{emit:t}){const n=e,i=t,r=a=>{i("remove",a)};return(a,o)=>(l.openBlock(),l.createElementBlock("div",{class:"choosen-mini-options","data-testid":n.dataTestid},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.options,(s,u)=>(l.openBlock(),l.createElementBlock("div",{key:s.key,class:"choosen-mini-options__option","data-testid":`${n.dataTestid}-Option-Item${u}`},[l.createVNode(Ut,{"data-testid":`${n.dataTestid}-Badge${u}`,type:l.unref(nt).blue,text:l.unref(Lh)(s)?s.hint:s.value,class:"choosen-mini-options__badges",disabled:""},null,8,["data-testid","type","text"]),l.createVNode(we,{"data-testid":`${n.dataTestid}-Icon${u}`,name:l.unref(se).crossLarge,width:10,height:10,class:"choosen-mini-options__cross",onClick:c=>r(s.key)},null,8,["data-testid","name","onClick"])],8,G7e))),128))],8,q7e))}}),[["__scopeId","data-v-b99473c0"]]),K7e=["data-testid"],Q7e=["data-testid"],J7e=["data-testid"],Z7e=["data-testid"],eCe=["data-testid"],tCe=["data-testid"],V1=me(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},isOpened:{type:Boolean,default:!1},tooltipPosition:{default:"top-center"},onUnmountPagination:{},defaultOption:{default:"Выберите значение"},class:{},disabled:{type:Boolean},dataTestid:{default:"BaseFilter"}},{modelValue:{},modelModifiers:{}}),emits:l.mergeModels(["change","unmount-open","unmount-search","unmount-search-enter","unmount-pagination"],["update:modelValue"]),setup(e,{emit:t}){const n=e,i=l.reactive({isHovered:!1}),r=t,a=l.ref(null),o=l.ref(null),s=l.useModel(e,"modelValue"),u=l.ref(n.isOpened);l.watch(u,()=>r("unmount-open",u.value)),l.watch(()=>n.isOpened,()=>{u.value=n.isOpened}),l.watch(()=>n.onUnmountPagination,()=>{L()});const c=l.ref(""),f=l.computed(()=>{let D=[];return c.value?(Hs(n.options)?D=n.options.filter(z=>{var H;return z.value.toLowerCase().includes(c.value.toLowerCase())||((H=z==null?void 0:z.hint)==null?void 0:H.toLowerCase().includes(c.value.toLowerCase()))}):D=n.options.filter(z=>z.value.toLowerCase().includes(c.value.toLowerCase())),D):(Hs(n.options),D=n.options,D)}),h=l.computed(()=>{var z;return((z=n.options.find(H=>Ri.isArray(s.value)?s.value.includes(H.key):H.key===String(s.value)))==null?void 0:z.value)||n.defaultOption}),g=l.computed(()=>n.options.filter(D=>Ri.isArray(s.value)?s.value.includes(D.key)&&D.value!==h.value:D.key===String(s.value))),p=l.computed(()=>n.options.filter(D=>Ri.isArray(s.value)?s.value.includes(D.key)&&D.value===h.value:D.key===String(s.value))),y=l.computed(()=>{var H,X,re;const D=n.options;let z;return Ri.isArray(s.value)?Hs(D)?z=(H=D.find(ee=>ee.value===h.value))==null?void 0:H.hint:z=(X=D.find(ee=>ee.value===h.value))==null?void 0:X.value:z=(re=D.find(ee=>ee.key===String(s.value)))==null?void 0:re.value,z||""}),v=()=>{i.isHovered=!0},k=()=>{i.isHovered=!1},w=l.computed(()=>{var D;return Hs(n.options)?i.isHovered&&!!y.value:((D=a.value)==null?void 0:D.isSpanOverflow)||!1}),M=l.computed(()=>Ri.isArray(s.value)?n.isPosibleToClear&&s.value.length>0:n.isPosibleToClear&&s.value),x=l.computed(()=>Ri.isArray(s.value)&&s.value.length>1),_=l.computed(()=>Ri.isArray(s.value)?s.value.length:null),S=async D=>{if(Ri.isArray(s.value))s.value.includes(D)?s.value=s.value.filter(z=>z!==D):s.value=[...s.value,D];else{let z=n.options.find(H=>H.key===D);!z&&Hs(n.options)&&(z=n.options.find(H=>H.hint===D)),s.value=(z==null?void 0:z.key)||"",u.value=!1}await l.nextTick(),r("change",String(s.value))},N=D=>{u.value=D},T=async()=>{Ri.isArray(s.value)?s.value=[]:s.value="",await l.nextTick(),r("change",s.value)},I=new IntersectionObserver(D=>{D.forEach(z=>{z.isIntersecting&&r("unmount-pagination")})}),L=()=>{o.value&&n.onUnmountPagination&&(I.unobserve(o.value),I.observe(o.value))};return l.onMounted(()=>{L()}),l.onUnmounted(()=>{I.disconnect()}),(D,z)=>(l.openBlock(),l.createBlock(ko,{onChange:N,"is-opened":u.value,class:l.normalizeClass(n.class),"header-classes":"filter__header","options-classes":"filter__options","data-testid":n.dataTestid},{header:l.withCtx(()=>[l.createElementVNode("span",{class:l.normalizeClass(["filter__header-title",{"filter__header-title__active":u.value}]),"data-testid":`${n.dataTestid}-Title`},l.toDisplayString(e.title),11,K7e),l.createVNode(Cl,{position:e.tooltipPosition,type:"blue","is-can-show":w.value&&!(x.value&&e.isShowMiniOptions),hint:y.value,"hint-gap":28,class:"filter__header-tooltip","data-testid":`${n.dataTestid}-Tooltip`},{default:l.withCtx(()=>[l.createVNode(Ut,{ref_key:"badgesRef",ref:a,type:h.value===n.defaultOption?l.unref(nt).default:l.unref(nt).blue,class:"filter__options-badge","data-testid":`${n.dataTestid}-Badge`,text:h.value,onMouseenter:v,onMouseleave:k,disabled:""},null,8,["type","data-testid","text"]),x.value&&e.isShowMiniOptions?(l.openBlock(),l.createElementBlock("div",{key:0,class:"filter__values","data-testid":`${n.dataTestid}-Filter-Value`},[l.createVNode(_3,{"data-testid":`${n.dataTestid}-Filter-Value-MiniOptions`,onClick:z[0]||(z[0]=l.withModifiers(()=>{},["stop"])),options:p.value,onRemove:S},null,8,["data-testid","options"])],8,Q7e)):l.createCommentVNode("",!0)]),_:1},8,["position","is-can-show","hint","data-testid"]),_.value&&_.value>1?(l.openBlock(),l.createElementBlock("span",{key:0,class:"filter__count","data-testid":`${n.dataTestid}-Filter-Count`},[l.createTextVNode(" +"+l.toDisplayString(_.value-1)+" ",1),x.value?(l.openBlock(),l.createElementBlock("div",{key:0,class:"filter__values","data-testid":`${n.dataTestid}-Filter-Values`},[l.createVNode(_3,{onClick:z[1]||(z[1]=l.withModifiers(()=>{},["stop"])),options:g.value,onRemove:S,"data-testid":`${n.dataTestid}-MiniOptions`},null,8,["options","data-testid"])],8,Z7e)):l.createCommentVNode("",!0)],8,J7e)):l.createCommentVNode("",!0),M.value?(l.openBlock(),l.createElementBlock("span",{key:1,class:"filter__cross",onClick:l.withModifiers(T,["stop"]),"data-testid":`${n.dataTestid}-Filter-Cross`},[l.createVNode(we,{name:l.unref(se).crossLarge,width:16,height:16},null,8,["name"])],8,eCe)):l.createCommentVNode("",!0)]),options:l.withCtx(()=>[e.isSearch?(l.openBlock(),l.createBlock(yl,{key:0,modelValue:c.value,"onUpdate:modelValue":z[2]||(z[2]=H=>c.value=H),"show-history":!1,"data-testid":`${n.dataTestid}-Search`,onInput:z[3]||(z[3]=H=>D.$emit("unmount-search",H)),onEnter:z[4]||(z[4]=H=>D.$emit("unmount-search-enter",H))},null,8,["modelValue","data-testid"])):l.createCommentVNode("",!0),l.createVNode($h,{"data-testid":`${n.dataTestid}-Options`,class:"filter__options-option",options:f.value,"default-option":h.value,onChange:S},{default:l.withCtx(()=>[l.createElementVNode("li",{class:"filter__options-underline","data-testid":`${n.dataTestid}-Underline`},[...z[5]||(z[5]=[l.createElementVNode("hr",{class:"filter__options-underline-hr"},null,-1)])],8,tCe)]),_:1},8,["data-testid","options","default-option"]),l.withDirectives(l.createElementVNode("div",{ref_key:"lastOptionRef",ref:o,class:"filter__last-option"},null,512),[[l.vShow,e.onUnmountPagination]])]),_:1},8,["is-opened","class","data-testid"]))}}),[["__scopeId","data-v-0b671aa1"]]),nCe=["data-testid"],Zd=me(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(e,{emit:t}){const n=e,i=t,r=l.useModel(e,"modelValue"),a=l.ref(null);l.watch(r,()=>{s()});const o=()=>(r.value-n.min)/(n.max-n.min)*100,s=()=>{requestAnimationFrame(()=>{a.value&&bt({"--progress":o()+"%"},a.value)})},u=f=>{const h=f.target;h&&i("unmount-change",Number(h.value))},c=f=>{const h=f.target;h&&i("unmount-change",Number(h.value))};return l.onMounted(()=>{s()}),(f,h)=>l.withDirectives((l.openBlock(),l.createElementBlock("input",l.mergeProps({ref_key:"input",ref:a,type:"range"},n,{class:"range","onUpdate:modelValue":h[0]||(h[0]=g=>r.value=g),onChange:u,onInput:c,"data-testid":n.dataTestid}),null,16,nCe)),[[l.vModelText,r.value]])}}),[["__scopeId","data-v-4c8abd39"]]),iCe=["id","data-testid"],rCe=["data-testid"],aCe=["data-testid"],F1=me(l.defineComponent({name:"TableNew",__name:"TableNew",props:{tableId:{},search:{},tbodyId:{},theadId:{},columnCount:{},dataTestid:{default:"Table"},isShowVerticalScroll:{type:Boolean,default:!1},isShowHorizontalScroll:{type:Boolean,default:!1}},emits:["unmount-scroll","unmount-paginate"],setup(e,{expose:t,emit:n}){var M;const i=e,r=n,a=l.reactive({headHeight:0,maxColumnCount:0}),o=l.ref(null),s=l.ref(null),u=l.ref(null),c=l.ref(null),f=l.ref(null),h=x=>{r("unmount-scroll",x)},g=()=>{if(!o.value||!f.value)return;const x=o.value.querySelector("thead");if(!x)return;const _=x.getBoundingClientRect().height;a.headHeight=_,bt({"--scroll-track-margin-top":`${_}px`},f.value.$el)},p=()=>{f.value&&f.value.scrollToTop()},y=()=>{if(f.value&&c.value){const x=getComputedStyle(f.value.$el),_=Number(x.minHeight.replace(/\D/g,""));if(_&&_>0)return;bt({"min-height":`${a.headHeight+108}px`},f.value.$el)}},v=()=>{let x=1;if(s.value){for(let _=0;_<s.value.children.length;_++)x=Math.max(s.value.children[_].children.length,x);a.maxColumnCount=x}},k=new MutationObserver(()=>{v()}),w=new ResizeObserver(()=>{g()});return t({scrollToTop:p,setHeightSlot:(M=f.value)==null?void 0:M.setHeightSlot,tbodyRef:u,tableRef:o,theadRef:s}),l.onMounted(()=>{g(),v(),window.addEventListener("resize",g),o.value&&w.observe(o.value),s.value&&k.observe(s.value,{childList:!0,subtree:!0}),y()}),(x,_)=>(l.openBlock(),l.createBlock(Sl,{ref_key:"scrollWrapperRef",ref:f,class:"table",onUnmountScroll:h,"is-show-vertical-scroll":i.isShowVerticalScroll,"is-show-horizontal-scroll":i.isShowHorizontalScroll,"data-testid":`${i.dataTestid}-ScrollWrapper`},{default:l.withCtx(()=>[l.createElementVNode("table",{ref_key:"tableRef",ref:o,id:i.tableId,class:"table__table","data-testid":`${i.dataTestid}`},[l.renderSlot(x.$slots,"default",{},()=>[l.createElementVNode("colgroup",null,[l.renderSlot(x.$slots,"colspan",{},void 0,!0)]),x.$slots.head?(l.openBlock(),l.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:s,class:"table__head","data-testid":`${i.dataTestid}-Thead`},[l.renderSlot(x.$slots,"head",{},void 0,!0),x.$slots.search?(l.openBlock(),l.createBlock(xl,{key:0,class:"table__search-tr",ref_key:"searchRowRef",ref:c,"data-testid":`${i.dataTestid}-Search-Row`},{default:l.withCtx(()=>[l.createVNode(Ko,{colspan:a.maxColumnCount,class:"table__search-th","data-testid":`${i.dataTestid}-SearchRow-Search`},{default:l.withCtx(()=>[l.renderSlot(x.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"])):l.createCommentVNode("",!0)],8,rCe)):l.createCommentVNode("",!0),l.renderSlot(x.$slots,"body-group",{},()=>[x.$slots.body?(l.openBlock(),l.createElementBlock("tbody",{key:0,ref_key:"tbodyRef",ref:u,class:"table__body","data-testid":`${i.dataTestid}-Tbody`},[l.renderSlot(x.$slots,"body",{},void 0,!0)],8,aCe)):l.createCommentVNode("",!0)],!0)],!0)],8,iCe)]),_:3},8,["is-show-vertical-scroll","is-show-horizontal-scroll","data-testid"]))}}),[["__scopeId","data-v-7bc532c5"]]),oCe=["data-testid"],U1=me(l.defineComponent({name:"TableRow",__name:"TableRowNew",props:{type:{default:"default"},dataTestid:{}},setup(e){const t=e,n=l.computed(()=>[{"table-row_active":t.type==="selected"}]);return(i,r)=>(l.openBlock(),l.createElementBlock("tr",{class:l.normalizeClass(["table-row",n.value]),"data-testid":t.dataTestid},[l.renderSlot(i.$slots,"default",{},void 0,!0)],10,oCe))}}),[["__scopeId","data-v-a1577458"]]),sCe=["data-testid"],ec=me(l.defineComponent({name:"HeadTableRow",__name:"HeadTableRowNew",props:{dataTestid:{default:"TableRow"}},setup(e){const t=e;return(n,i)=>(l.openBlock(),l.createElementBlock("tr",{class:"head-table-row","data-testid":t.dataTestid},[l.renderSlot(n.$slots,"default",{},void 0,!0)],8,sCe))}}),[["__scopeId","data-v-9e5765d8"]]),lCe={class:"scroll-wrapper__vertical-wrapper"},uCe={class:"scroll-wrapper__horizont-wrapper"},dCe=me(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(e,{expose:t,emit:n}){const i=n,r=l.ref(null),a=l.ref(null),o=l.ref(null),s=l.ref(null),u=l.ref(null),c=l.ref(null),{onTrackClick:f,startDrag:h,changeBarPosition:g,setVerticalBarHeight:p,verticalTrackClass:y,isExistVerticalTrack:v}=S3(r,a,s,o),{changeBarPosition:k,startDrag:w,onTrackClick:M,setHorizontalBarWidth:x,horizontalTrackClass:_,isExistHorizontalTrack:S}=x3(r,a,c,u),N=ee=>{g(),k(),i("unmount-scroll",ee)},T=()=>{requestAnimationFrame(()=>{I(),L()})},I=()=>{if(!r.value||!a.value)return;const ee=getComputedStyle(a.value),q=a.value.style.minHeight||ee.minHeight,Z=a.value.style.maxHeight||ee.maxHeight,de=a.value.style.height;bt({"--scroll-wrapper-height":`${de}`,"--scroll-wrapper-max-height":`${Z}`,"--scroll-wrapper-min-height":`${q}`},a.value)},L=()=>{p(),x(),g(),k()},D=()=>{r.value&&r.value.addEventListener("scroll",N)},z=()=>{r.value&&(r.value.scrollTop=0)},H=new MutationObserver(()=>{T()}),X=new ResizeObserver(()=>{T()}),re=ee=>{H.observe(ee,{childList:!0,subtree:!0,attributes:!0}),X.observe(ee)};return t({scrollToTop:z,setHeightSlot:I}),l.onMounted(()=>{T(),D(),a.value&&re(a.value),o.value&&re(o.value),window.addEventListener("resize",T),i("on-mounted")}),l.onUnmounted(()=>{window.removeEventListener("resize",T)}),(ee,q)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"scrollWrapperRef",ref:a,class:"scroll-wrapper"},[l.createElementVNode("div",lCe,[l.createElementVNode("div",uCe,[l.createElementVNode("div",{ref_key:"slotRef",ref:r,class:"scroll-wrapper__slot"},[l.renderSlot(ee.$slots,"default",{},void 0,!0)],512),l.unref(S)||e.isShowHorizontalScroll?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"horizontTrackRef",ref:u,class:l.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_horizont",l.unref(_)]),onClick:q[1]||(q[1]=l.withModifiers((...Z)=>l.unref(M)&&l.unref(M)(...Z),["prevent","left"]))},[l.createElementVNode("div",{ref_key:"horizontBarRef",ref:c,class:"scroll-wrapper__bar",onMousedown:q[0]||(q[0]=l.withModifiers((...Z)=>l.unref(w)&&l.unref(w)(...Z),["prevent","left"]))},null,544)],2)):l.createCommentVNode("",!0)]),l.unref(v)||e.isShowVerticalScroll?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"verticalTrackRef",ref:o,class:l.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_vertical",l.unref(y)]),onClick:q[3]||(q[3]=l.withModifiers((...Z)=>l.unref(f)&&l.unref(f)(...Z),["prevent","left"]))},[l.createElementVNode("div",{ref_key:"verticalBarRef",ref:s,class:"scroll-wrapper__bar",onMousedown:q[2]||(q[2]=l.withModifiers((...Z)=>l.unref(h)&&l.unref(h)(...Z),["prevent","left"]))},null,544)],2)):l.createCommentVNode("",!0)])],512))}}),[["__scopeId","data-v-acb87209"]]),cCe=["data-testid"],fCe=["data-testid"],hCe=["data-testid"],Y1=me(l.defineComponent({name:"TableSimple",__name:"TableSimple",props:{dataTestid:{default:"TableSimple"}},setup(e,{expose:t}){const n=e,i=l.ref(null),r=l.ref(null),a=l.ref(null),o=l.ref(null),s=l.computed(()=>{let u=1;if(r.value)for(let c=0;c<r.value.children.length;c++)u=Math.max(r.value.children[c].children.length,u);return u});return t({tbodyRef:a,tableRef:i,theadRef:r}),(u,c)=>(l.openBlock(),l.createElementBlock("table",{ref_key:"tableRef",ref:i,class:"simple-table-yui-kit","data-testid":`${n.dataTestid}`},[l.renderSlot(u.$slots,"default",{},()=>[l.renderSlot(u.$slots,"colspan",{},void 0,!0),u.$slots.head?(l.openBlock(),l.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:r,class:"simple-table-yui-kit__head","data-testid":`${n.dataTestid}-Thead`},[l.renderSlot(u.$slots,"head",{},void 0,!0),u.$slots.search?(l.openBlock(),l.createBlock(ec,{key:0,class:"table-new-yui-kit__search",ref_key:"searchRowRef",ref:o,"data-testid":`${n.dataTestid}-Search-Row`},{default:l.withCtx(()=>[l.createVNode(Ko,{colspan:s.value,class:"table-new-yui-kit__th","data-testid":`${n.dataTestid}-SearchRow-Search`},{default:l.withCtx(()=>[l.renderSlot(u.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"])):l.createCommentVNode("",!0)],8,fCe)):l.createCommentVNode("",!0),l.renderSlot(u.$slots,"body-group",{},()=>[u.$slots.body?(l.openBlock(),l.createElementBlock("tbody",{key:0,ref_key:"tbodyRef",ref:a,class:"simple-table-yui-kit__body","data-testid":`${n.dataTestid}-Tbody`},[l.renderSlot(u.$slots,"body",{},void 0,!0)],8,hCe)):l.createCommentVNode("",!0)],!0)],!0)],8,cCe))}}),[["__scopeId","data-v-532e43bc"]]),mCe=["data-testid"],pCe=["data-testid"],gCe=["onClick","data-testid"],yCe=["data-testid"],X1=me(l.defineComponent({name:"Tabs",__name:"Tabs",props:{defaultActiveTabId:{},tabCount:{},dataTestid:{default:"Tabs"}},emits:["unmount-tab"],setup(e,{emit:t}){const n=e,i=t,r=l.reactive({activeTab:1}),a=s=>Array.from({length:s},(u,c)=>c+1);l.watch(()=>n.defaultActiveTabId,()=>{n.defaultActiveTabId&&(r.activeTab=n.defaultActiveTabId)},{immediate:!0});const o=s=>{r.activeTab=s,i("unmount-tab",s)};return(s,u)=>(l.openBlock(),l.createElementBlock("div",{"data-testid":n.dataTestid,class:"tabs"},[l.createElementVNode("nav",{class:"tabs__navigation","data-testid":`${n.dataTestid}-Navigation`},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a(n.tabCount),c=>(l.openBlock(),l.createElementBlock("button",{key:c,onClick:f=>o(c),class:l.normalizeClass(["tabs__navigation-button",{active:r.activeTab===c}]),"data-testid":`${n.dataTestid}-Navigation-Button`},[l.renderSlot(s.$slots,`header${c}`,{},void 0,!0)],10,gCe))),128))],8,pCe),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a(n.tabCount),c=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:c},[r.activeTab===c?(l.openBlock(),l.createElementBlock("article",{key:0,"data-testid":`${n.dataTestid}-Content`,class:"tabs__navigation-content"},[l.renderSlot(s.$slots,`tab${c}`,{},void 0,!0)],8,yCe)):l.createCommentVNode("",!0)],64))),128))],8,mCe))}}),[["__scopeId","data-v-0e453d9a"]]);function $t(e){this.content=e}$t.prototype={constructor:$t,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var i=n&&n!=e?this.remove(n):this,r=i.find(e),a=i.content.slice();return r==-1?a.push(n||e,t):(a[r+1]=t,n&&(a[r]=n)),new $t(a)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new $t(n)},addToStart:function(e,t){return new $t([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new $t(n)},addBefore:function(e,t,n){var i=this.remove(t),r=i.content.slice(),a=i.find(e);return r.splice(a==-1?r.length:a,0,t,n),new $t(r)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=$t.from(e),e.size?new $t(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=$t.from(e),e.size?new $t(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=$t.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},$t.from=function(e){if(e instanceof $t)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new $t(t)};function T3(e,t,n){for(let i=0;;i++){if(i==e.childCount||i==t.childCount)return e.childCount==t.childCount?null:n;let r=e.child(i),a=t.child(i);if(r==a){n+=r.nodeSize;continue}if(!r.sameMarkup(a))return n;if(r.isText&&r.text!=a.text){for(let o=0;r.text[o]==a.text[o];o++)n++;return n}if(r.content.size||a.content.size){let o=T3(r.content,a.content,n+1);if(o!=null)return o}n+=r.nodeSize}}function P3(e,t,n,i){for(let r=e.childCount,a=t.childCount;;){if(r==0||a==0)return r==a?null:{a:n,b:i};let o=e.child(--r),s=t.child(--a),u=o.nodeSize;if(o==s){n-=u,i-=u;continue}if(!o.sameMarkup(s))return{a:n,b:i};if(o.isText&&o.text!=s.text){let c=0,f=Math.min(o.text.length,s.text.length);for(;c<f&&o.text[o.text.length-c-1]==s.text[s.text.length-c-1];)c++,n--,i--;return{a:n,b:i}}if(o.content.size||s.content.size){let c=P3(o.content,s.content,n-1,i-1);if(c)return c}n-=u,i-=u}}class ne{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let i=0;i<t.length;i++)this.size+=t[i].nodeSize}nodesBetween(t,n,i,r=0,a){for(let o=0,s=0;s<n;o++){let u=this.content[o],c=s+u.nodeSize;if(c>t&&i(u,r+s,a||null,o)!==!1&&u.content.size){let f=s+1;u.nodesBetween(Math.max(0,t-f),Math.min(u.content.size,n-f),i,r+f)}s=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,i,r){let a="",o=!0;return this.nodesBetween(t,n,(s,u)=>{let c=s.isText?s.text.slice(Math.max(t,u)-u,n-u):s.isLeaf?r?typeof r=="function"?r(s):r:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&c||s.isTextblock)&&i&&(o?o=!1:a+=i),a+=c},0),a}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,i=t.firstChild,r=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(i)&&(r[r.length-1]=n.withText(n.text+i.text),a=1);a<t.content.length;a++)r.push(t.content[a]);return new ne(r,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let i=[],r=0;if(n>t)for(let a=0,o=0;o<n;a++){let s=this.content[a],u=o+s.nodeSize;u>t&&((o<t||u>n)&&(s.isText?s=s.cut(Math.max(0,t-o),Math.min(s.text.length,n-o)):s=s.cut(Math.max(0,t-o-1),Math.min(s.content.size,n-o-1))),i.push(s),r+=s.nodeSize),o=u}return new ne(i,r)}cutByIndex(t,n){return t==n?ne.empty:t==0&&n==this.content.length?this:new ne(this.content.slice(t,n))}replaceChild(t,n){let i=this.content[t];if(i==n)return this;let r=this.content.slice(),a=this.size+n.nodeSize-i.nodeSize;return r[t]=n,new ne(r,a)}addToStart(t){return new ne([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new ne(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,i=0;n<this.content.length;n++){let r=this.content[n];t(r,i,n),i+=r.nodeSize}}findDiffStart(t,n=0){return T3(this,t,n)}findDiffEnd(t,n=this.size,i=t.size){return P3(this,t,n,i)}findIndex(t){if(t==0)return tc(0,t);if(t==this.size)return tc(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,i=0;;n++){let r=this.child(n),a=i+r.nodeSize;if(a>=t)return a==t?tc(n+1,a):tc(n,i);i=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return ne.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new ne(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return ne.empty;let n,i=0;for(let r=0;r<t.length;r++){let a=t[r];i+=a.nodeSize,r&&a.isText&&t[r-1].sameMarkup(a)?(n||(n=t.slice(0,r)),n[n.length-1]=a.withText(n[n.length-1].text+a.text)):n&&n.push(a)}return new ne(n||t,i)}static from(t){if(!t)return ne.empty;if(t instanceof ne)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new ne([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}ne.empty=new ne([],0);const q1={index:0,offset:0};function tc(e,t){return q1.index=e,q1.offset=t,q1}function nc(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++)if(!nc(e[i],t[i]))return!1}else{for(let i in e)if(!(i in t)||!nc(e[i],t[i]))return!1;for(let i in t)if(!(i in e))return!1}return!0}let Ge=class gy{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,i=!1;for(let r=0;r<t.length;r++){let a=t[r];if(this.eq(a))return t;if(this.type.excludes(a.type))n||(n=t.slice(0,r));else{if(a.type.excludes(this.type))return t;!i&&a.type.rank>this.type.rank&&(n||(n=t.slice(0,r)),n.push(this),i=!0),n&&n.push(a)}}return n||(n=t.slice()),i||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&nc(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let i=t.marks[n.type];if(!i)throw new RangeError(`There is no mark type ${n.type} in this schema`);let r=i.create(n.attrs);return i.checkAttrs(r.attrs),r}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let i=0;i<t.length;i++)if(!t[i].eq(n[i]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return gy.none;if(t instanceof gy)return[t];let n=t.slice();return n.sort((i,r)=>i.type.rank-r.type.rank),n}};Ge.none=[];class ic extends Error{}class ue{constructor(t,n,i){this.content=t,this.openStart=n,this.openEnd=i}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let i=A3(this.content,t+this.openStart,n);return i&&new ue(i,this.openStart,this.openEnd)}removeBetween(t,n){return new ue(E3(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return ue.empty;let i=n.openStart||0,r=n.openEnd||0;if(typeof i!="number"||typeof r!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ue(ne.fromJSON(t,n.content),i,r)}static maxOpen(t,n=!0){let i=0,r=0;for(let a=t.firstChild;a&&!a.isLeaf&&(n||!a.type.spec.isolating);a=a.firstChild)i++;for(let a=t.lastChild;a&&!a.isLeaf&&(n||!a.type.spec.isolating);a=a.lastChild)r++;return new ue(t,i,r)}}ue.empty=new ue(ne.empty,0,0);function E3(e,t,n){let{index:i,offset:r}=e.findIndex(t),a=e.maybeChild(i),{index:o,offset:s}=e.findIndex(n);if(r==t||a.isText){if(s!=n&&!e.child(o).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(i!=o)throw new RangeError("Removing non-flat range");return e.replaceChild(i,a.copy(E3(a.content,t-r-1,n-r-1)))}function A3(e,t,n,i){let{index:r,offset:a}=e.findIndex(t),o=e.maybeChild(r);if(a==t||o.isText)return i&&!i.canReplace(r,r,n)?null:e.cut(0,t).append(n).append(e.cut(t));let s=A3(o.content,t-a-1,n,o);return s&&e.replaceChild(r,o.copy(s))}function bCe(e,t,n){if(n.openStart>e.depth)throw new ic("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new ic("Inconsistent open depths");return D3(e,t,n,0)}function D3(e,t,n,i){let r=e.index(i),a=e.node(i);if(r==t.index(i)&&i<e.depth-n.openStart){let o=D3(e,t,n,i+1);return a.copy(a.content.replaceChild(r,o))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==i&&t.depth==i){let o=e.parent,s=o.content;return Fa(o,s.cut(0,e.parentOffset).append(n.content).append(s.cut(t.parentOffset)))}else{let{start:o,end:s}=wCe(n,e);return Fa(a,j3(e,o,s,t,i))}else return Fa(a,rc(e,t,i))}function N3(e,t){if(!t.type.compatibleContent(e.type))throw new ic("Cannot join "+t.type.name+" onto "+e.type.name)}function G1(e,t,n){let i=e.node(n);return N3(i,t.node(n)),i}function Va(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function _l(e,t,n,i){let r=(t||e).node(n),a=0,o=t?t.index(n):r.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(Va(e.nodeAfter,i),a++));for(let s=a;s<o;s++)Va(r.child(s),i);t&&t.depth==n&&t.textOffset&&Va(t.nodeBefore,i)}function Fa(e,t){return e.type.checkContent(t),e.copy(t)}function j3(e,t,n,i,r){let a=e.depth>r&&G1(e,t,r+1),o=i.depth>r&&G1(n,i,r+1),s=[];return _l(null,e,r,s),a&&o&&t.index(r)==n.index(r)?(N3(a,o),Va(Fa(a,j3(e,t,n,i,r+1)),s)):(a&&Va(Fa(a,rc(e,t,r+1)),s),_l(t,n,r,s),o&&Va(Fa(o,rc(n,i,r+1)),s)),_l(i,null,r,s),new ne(s)}function rc(e,t,n){let i=[];if(_l(null,e,n,i),e.depth>n){let r=G1(e,t,n+1);Va(Fa(r,rc(e,t,n+1)),i)}return _l(t,null,n,i),new ne(i)}function wCe(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let a=n-1;a>=0;a--)r=t.node(a).copy(ne.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}class Tl{constructor(t,n,i){this.pos=t,this.path=n,this.parentOffset=i,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let i=this.pos-this.path[this.path.length-1],r=t.child(n);return i?t.child(n).cut(i):r}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let i=this.path[n*3],r=n==0?0:this.path[n*3-1]+1;for(let a=0;a<t;a++)r+=i.child(a).nodeSize;return r}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return Ge.none;if(this.textOffset)return t.child(n).marks;let i=t.maybeChild(n-1),r=t.maybeChild(n);if(!i){let s=i;i=r,r=s}let a=i.marks;for(var o=0;o<a.length;o++)a[o].type.spec.inclusive===!1&&(!r||!a[o].isInSet(r.marks))&&(a=a[o--].removeFromSet(a));return a}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let i=n.marks,r=t.parent.maybeChild(t.index());for(var a=0;a<i.length;a++)i[a].type.spec.inclusive===!1&&(!r||!i[a].isInSet(r.marks))&&(i=i[a--].removeFromSet(i));return i}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let i=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);i>=0;i--)if(t.pos<=this.end(i)&&(!n||n(this.node(i))))return new ac(this,t,i);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let i=[],r=0,a=n;for(let o=t;;){let{index:s,offset:u}=o.content.findIndex(a),c=a-u;if(i.push(o,s,r+u),!c||(o=o.child(s),o.isText))break;a=c-1,r+=u+1}return new Tl(n,i,a)}static resolveCached(t,n){let i=I3.get(t);if(i)for(let a=0;a<i.elts.length;a++){let o=i.elts[a];if(o.pos==n)return o}else I3.set(t,i=new vCe);let r=i.elts[i.i]=Tl.resolve(t,n);return i.i=(i.i+1)%kCe,r}}class vCe{constructor(){this.elts=[],this.i=0}}const kCe=12,I3=new WeakMap;class ac{constructor(t,n,i){this.$from=t,this.$to=n,this.depth=i}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 MCe=Object.create(null);let Rr=class yy{constructor(t,n,i,r=Ge.none){this.type=t,this.attrs=n,this.marks=r,this.content=i||ne.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,i,r=0){this.content.nodesBetween(t,n,i,r,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,i,r){return this.content.textBetween(t,n,i,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,i){return this.type==t&&nc(this.attrs,n||t.defaultAttrs||MCe)&&Ge.sameSet(this.marks,i||Ge.none)}copy(t=null){return t==this.content?this:new yy(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new yy(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,i=!1){if(t==n)return ue.empty;let r=this.resolve(t),a=this.resolve(n),o=i?0:r.sharedDepth(n),s=r.start(o),c=r.node(o).content.cut(r.pos-s,a.pos-s);return new ue(c,r.depth-o,a.depth-o)}replace(t,n,i){return bCe(this.resolve(t),this.resolve(n),i)}nodeAt(t){for(let n=this;;){let{index:i,offset:r}=n.content.findIndex(t);if(n=n.maybeChild(i),!n)return null;if(r==t||n.isText)return n;t-=r+1}}childAfter(t){let{index:n,offset:i}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:i}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:i}=this.content.findIndex(t);if(i<t)return{node:this.content.child(n),index:n,offset:i};let r=this.content.child(n-1);return{node:r,index:n-1,offset:i-r.nodeSize}}resolve(t){return Tl.resolveCached(this,t)}resolveNoCache(t){return Tl.resolve(this,t)}rangeHasMark(t,n,i){let r=!1;return n>t&&this.nodesBetween(t,n,a=>(i.isInSet(a.marks)&&(r=!0),!r)),r}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 t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),W3(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,i=ne.empty,r=0,a=i.childCount){let o=this.contentMatchAt(t).matchFragment(i,r,a),s=o&&o.matchFragment(this.content,n);if(!s||!s.validEnd)return!1;for(let u=r;u<a;u++)if(!this.type.allowsMarks(i.child(u).marks))return!1;return!0}canReplaceWith(t,n,i,r){if(r&&!this.type.allowsMarks(r))return!1;let a=this.contentMatchAt(t).matchType(i),o=a&&a.matchFragment(this.content,n);return o?o.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=Ge.none;for(let n=0;n<this.marks.length;n++){let i=this.marks[n];i.type.checkAttrs(i.attrs),t=i.addToSet(t)}if(!Ge.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let i;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,i)}let r=ne.fromJSON(t,n.content),a=t.nodeType(n.type).create(n.attrs,r,i);return a.type.checkAttrs(a.attrs),a}};Rr.prototype.text=void 0;class oc extends Rr{constructor(t,n,i,r){if(super(t,n,null,r),!i)throw new RangeError("Empty text nodes are not allowed");this.text=i}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):W3(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new oc(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new oc(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function W3(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Ua{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let i=new CCe(t,n);if(i.next==null)return Ua.empty;let r=O3(i);i.next&&i.err("Unexpected trailing text");let a=ACe(ECe(r));return DCe(a,i),a}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,i=t.childCount){let r=this;for(let a=n;r&&a<i;a++)r=r.matchType(t.child(a).type);return r}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let i=0;i<t.next.length;i++)if(this.next[n].type==t.next[i].type)return!0;return!1}fillBefore(t,n=!1,i=0){let r=[this];function a(o,s){let u=o.matchFragment(t,i);if(u&&(!n||u.validEnd))return ne.from(s.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:f,next:h}=o.next[c];if(!(f.isText||f.hasRequiredAttrs())&&r.indexOf(h)==-1){r.push(h);let g=a(h,s.concat(f));if(g)return g}}return null}return a(this,[])}findWrapping(t){for(let i=0;i<this.wrapCache.length;i+=2)if(this.wrapCache[i]==t)return this.wrapCache[i+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),i=[{match:this,type:null,via:null}];for(;i.length;){let r=i.shift(),a=r.match;if(a.matchType(t)){let o=[];for(let s=r;s.type;s=s.via)o.push(s.type);return o.reverse()}for(let o=0;o<a.next.length;o++){let{type:s,next:u}=a.next[o];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in n)&&(!r.type||u.validEnd)&&(i.push({match:s.contentMatch,type:s,via:r}),n[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(i){t.push(i);for(let r=0;r<i.next.length;r++)t.indexOf(i.next[r].next)==-1&&n(i.next[r].next)}return n(this),t.map((i,r)=>{let a=r+(i.validEnd?"*":" ")+" ";for(let o=0;o<i.next.length;o++)a+=(o?", ":"")+i.next[o].type.name+"->"+t.indexOf(i.next[o].next);return a}).join(`
|
|
1308
|
+
*/function Bi(e){return getComputedStyle(e)}function Sn(e,t){for(var n in t){var i=t[n];typeof i=="number"&&(i=i+"px"),e.style[n]=i}return e}function Fd(e){var t=document.createElement("div");return t.className=e,t}var u3=typeof Element<"u"&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function Hr(e,t){if(!u3)throw new Error("No element matching method supported");return u3.call(e,t)}function Yo(e){e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}function d3(e,t){return Array.prototype.filter.call(e.children,function(n){return Hr(n,t)})}var Ct={main:"ps",rtl:"ps__rtl",element:{thumb:function(e){return"ps__thumb-"+e},rail:function(e){return"ps__rail-"+e},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(e){return"ps--active-"+e},scrolling:function(e){return"ps--scrolling-"+e}}},c3={x:null,y:null};function f3(e,t){var n=e.element.classList,i=Ct.state.scrolling(t);n.contains(i)?clearTimeout(c3[t]):n.add(i)}function h3(e,t){c3[t]=setTimeout(function(){return e.isAlive&&e.element.classList.remove(Ct.state.scrolling(t))},e.settings.scrollingThreshold)}function u8e(e,t){f3(e,t),h3(e,t)}var kl=function(t){this.element=t,this.handlers={}},m3={isEmpty:{configurable:!0}};kl.prototype.bind=function(t,n){typeof this.handlers[t]>"u"&&(this.handlers[t]=[]),this.handlers[t].push(n),this.element.addEventListener(t,n,!1)},kl.prototype.unbind=function(t,n){var i=this;this.handlers[t]=this.handlers[t].filter(function(r){return n&&r!==n?!0:(i.element.removeEventListener(t,r,!1),!1)})},kl.prototype.unbindAll=function(){for(var t in this.handlers)this.unbind(t)},m3.isEmpty.get=function(){var e=this;return Object.keys(this.handlers).every(function(t){return e.handlers[t].length===0})},Object.defineProperties(kl.prototype,m3);var Xo=function(){this.eventElements=[]};Xo.prototype.eventElement=function(t){var n=this.eventElements.filter(function(i){return i.element===t})[0];return n||(n=new kl(t),this.eventElements.push(n)),n},Xo.prototype.bind=function(t,n,i){this.eventElement(t).bind(n,i)},Xo.prototype.unbind=function(t,n,i){var r=this.eventElement(t);r.unbind(n,i),r.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(r),1)},Xo.prototype.unbindAll=function(){this.eventElements.forEach(function(t){return t.unbindAll()}),this.eventElements=[]},Xo.prototype.once=function(t,n,i){var r=this.eventElement(t),a=function(o){r.unbind(n,a),i(o)};r.bind(n,a)};function Ud(e){if(typeof window.CustomEvent=="function")return new CustomEvent(e);var t=document.createEvent("CustomEvent");return t.initCustomEvent(e,!1,!1,void 0),t}function Yd(e,t,n,i,r){i===void 0&&(i=!0),r===void 0&&(r=!1);var a;if(t==="top")a=["contentHeight","containerHeight","scrollTop","y","up","down"];else if(t==="left")a=["contentWidth","containerWidth","scrollLeft","x","left","right"];else throw new Error("A proper axis should be provided");d8e(e,n,a,i,r)}function d8e(e,t,n,i,r){var a=n[0],o=n[1],s=n[2],u=n[3],c=n[4],f=n[5];i===void 0&&(i=!0),r===void 0&&(r=!1);var h=e.element;e.reach[u]=null,h[s]<1&&(e.reach[u]="start"),h[s]>e[a]-e[o]-1&&(e.reach[u]="end"),t&&(h.dispatchEvent(Ud("ps-scroll-"+u)),t<0?h.dispatchEvent(Ud("ps-scroll-"+c)):t>0&&h.dispatchEvent(Ud("ps-scroll-"+f)),i&&u8e(e,u)),e.reach[u]&&(t||r)&&h.dispatchEvent(Ud("ps-"+u+"-reach-"+e.reach[u]))}function lt(e){return parseInt(e,10)||0}function c8e(e){return Hr(e,"input,[contenteditable]")||Hr(e,"select,[contenteditable]")||Hr(e,"textarea,[contenteditable]")||Hr(e,"button,[contenteditable]")}function f8e(e){var t=Bi(e);return lt(t.width)+lt(t.paddingLeft)+lt(t.paddingRight)+lt(t.borderLeftWidth)+lt(t.borderRightWidth)}var qo={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 ar(e){var t=e.element,n=Math.floor(t.scrollTop),i=t.getBoundingClientRect();e.containerWidth=Math.round(i.width),e.containerHeight=Math.round(i.height),e.contentWidth=t.scrollWidth,e.contentHeight=t.scrollHeight,t.contains(e.scrollbarXRail)||(d3(t,Ct.element.rail("x")).forEach(function(r){return Yo(r)}),t.appendChild(e.scrollbarXRail)),t.contains(e.scrollbarYRail)||(d3(t,Ct.element.rail("y")).forEach(function(r){return Yo(r)}),t.appendChild(e.scrollbarYRail)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset<e.contentWidth?(e.scrollbarXActive=!0,e.railXWidth=e.containerWidth-e.railXMarginWidth,e.railXRatio=e.containerWidth/e.railXWidth,e.scrollbarXWidth=p3(e,lt(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=lt((e.negativeScrollAdjustment+t.scrollLeft)*(e.railXWidth-e.scrollbarXWidth)/(e.contentWidth-e.containerWidth))):e.scrollbarXActive=!1,!e.settings.suppressScrollY&&e.containerHeight+e.settings.scrollYMarginOffset<e.contentHeight?(e.scrollbarYActive=!0,e.railYHeight=e.containerHeight-e.railYMarginHeight,e.railYRatio=e.containerHeight/e.railYHeight,e.scrollbarYHeight=p3(e,lt(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTop=lt(n*(e.railYHeight-e.scrollbarYHeight)/(e.contentHeight-e.containerHeight))):e.scrollbarYActive=!1,e.scrollbarXLeft>=e.railXWidth-e.scrollbarXWidth&&(e.scrollbarXLeft=e.railXWidth-e.scrollbarXWidth),e.scrollbarYTop>=e.railYHeight-e.scrollbarYHeight&&(e.scrollbarYTop=e.railYHeight-e.scrollbarYHeight),h8e(t,e),e.scrollbarXActive?t.classList.add(Ct.state.active("x")):(t.classList.remove(Ct.state.active("x")),e.scrollbarXWidth=0,e.scrollbarXLeft=0,t.scrollLeft=e.isRtl===!0?e.contentWidth:0),e.scrollbarYActive?t.classList.add(Ct.state.active("y")):(t.classList.remove(Ct.state.active("y")),e.scrollbarYHeight=0,e.scrollbarYTop=0,t.scrollTop=0)}function p3(e,t){return e.settings.minScrollbarLength&&(t=Math.max(t,e.settings.minScrollbarLength)),e.settings.maxScrollbarLength&&(t=Math.min(t,e.settings.maxScrollbarLength)),t}function h8e(e,t){var n={width:t.railXWidth},i=Math.floor(e.scrollTop);t.isRtl?n.left=t.negativeScrollAdjustment+e.scrollLeft+t.containerWidth-t.contentWidth:n.left=e.scrollLeft,t.isScrollbarXUsingBottom?n.bottom=t.scrollbarXBottom-i:n.top=t.scrollbarXTop+i,Sn(t.scrollbarXRail,n);var r={top:i,height:t.railYHeight};t.isScrollbarYUsingRight?t.isRtl?r.right=t.contentWidth-(t.negativeScrollAdjustment+e.scrollLeft)-t.scrollbarYRight-t.scrollbarYOuterWidth-9:r.right=t.scrollbarYRight-e.scrollLeft:t.isRtl?r.left=t.negativeScrollAdjustment+e.scrollLeft+t.containerWidth*2-t.contentWidth-t.scrollbarYLeft-t.scrollbarYOuterWidth:r.left=t.scrollbarYLeft+e.scrollLeft,Sn(t.scrollbarYRail,r),Sn(t.scrollbarX,{left:t.scrollbarXLeft,width:t.scrollbarXWidth-t.railBorderXWidth}),Sn(t.scrollbarY,{top:t.scrollbarYTop,height:t.scrollbarYHeight-t.railBorderYWidth})}function m8e(e){e.element,e.event.bind(e.scrollbarY,"mousedown",function(t){return t.stopPropagation()}),e.event.bind(e.scrollbarYRail,"mousedown",function(t){var n=t.pageY-window.pageYOffset-e.scrollbarYRail.getBoundingClientRect().top,i=n>e.scrollbarYTop?1:-1;e.element.scrollTop+=i*e.containerHeight,ar(e),t.stopPropagation()}),e.event.bind(e.scrollbarX,"mousedown",function(t){return t.stopPropagation()}),e.event.bind(e.scrollbarXRail,"mousedown",function(t){var n=t.pageX-window.pageXOffset-e.scrollbarXRail.getBoundingClientRect().left,i=n>e.scrollbarXLeft?1:-1;e.element.scrollLeft+=i*e.containerWidth,ar(e),t.stopPropagation()})}function p8e(e){g3(e,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),g3(e,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])}function g3(e,t){var n=t[0],i=t[1],r=t[2],a=t[3],o=t[4],s=t[5],u=t[6],c=t[7],f=t[8],h=e.element,g=null,p=null,y=null;function v(M){M.touches&&M.touches[0]&&(M[r]=M.touches[0].pageY),h[u]=g+y*(M[r]-p),f3(e,c),ar(e),M.stopPropagation(),M.type.startsWith("touch")&&M.changedTouches.length>1&&M.preventDefault()}function k(){h3(e,c),e[f].classList.remove(Ct.state.clicking),e.event.unbind(e.ownerDocument,"mousemove",v)}function w(M,x){g=h[u],x&&M.touches&&(M[r]=M.touches[0].pageY),p=M[r],y=(e[i]-e[n])/(e[a]-e[s]),x?e.event.bind(e.ownerDocument,"touchmove",v):(e.event.bind(e.ownerDocument,"mousemove",v),e.event.once(e.ownerDocument,"mouseup",k),M.preventDefault()),e[f].classList.add(Ct.state.clicking),M.stopPropagation()}e.event.bind(e[o],"mousedown",function(M){w(M)}),e.event.bind(e[o],"touchstart",function(M){w(M,!0)})}function g8e(e){var t=e.element,n=function(){return Hr(t,":hover")},i=function(){return Hr(e.scrollbarX,":focus")||Hr(e.scrollbarY,":focus")};function r(a,o){var s=Math.floor(t.scrollTop);if(a===0){if(!e.scrollbarYActive)return!1;if(s===0&&o>0||s>=e.contentHeight-e.containerHeight&&o<0)return!e.settings.wheelPropagation}var u=t.scrollLeft;if(o===0){if(!e.scrollbarXActive)return!1;if(u===0&&a<0||u>=e.contentWidth-e.containerWidth&&a>0)return!e.settings.wheelPropagation}return!0}e.event.bind(e.ownerDocument,"keydown",function(a){if(!(a.isDefaultPrevented&&a.isDefaultPrevented()||a.defaultPrevented)&&!(!n()&&!i())){var o=document.activeElement?document.activeElement:e.ownerDocument.activeElement;if(o){if(o.tagName==="IFRAME")o=o.contentDocument.activeElement;else for(;o.shadowRoot;)o=o.shadowRoot.activeElement;if(c8e(o))return}var s=0,u=0;switch(a.which){case 37:a.metaKey?s=-e.contentWidth:a.altKey?s=-e.containerWidth:s=-30;break;case 38:a.metaKey?u=e.contentHeight:a.altKey?u=e.containerHeight:u=30;break;case 39:a.metaKey?s=e.contentWidth:a.altKey?s=e.containerWidth:s=30;break;case 40:a.metaKey?u=-e.contentHeight:a.altKey?u=-e.containerHeight:u=-30;break;case 32:a.shiftKey?u=e.containerHeight:u=-e.containerHeight;break;case 33:u=e.containerHeight;break;case 34:u=-e.containerHeight;break;case 36:u=e.contentHeight;break;case 35:u=-e.contentHeight;break;default:return}e.settings.suppressScrollX&&s!==0||e.settings.suppressScrollY&&u!==0||(t.scrollTop-=u,t.scrollLeft+=s,ar(e),r(s,u)&&a.preventDefault())}})}function y8e(e){var t=e.element;function n(o,s){var u=Math.floor(t.scrollTop),c=t.scrollTop===0,f=u+t.offsetHeight===t.scrollHeight,h=t.scrollLeft===0,g=t.scrollLeft+t.offsetWidth===t.scrollWidth,p;return Math.abs(s)>Math.abs(o)?p=c||f:p=h||g,p?!e.settings.wheelPropagation:!0}function i(o){var s=o.deltaX,u=-1*o.deltaY;return(typeof s>"u"||typeof u>"u")&&(s=-1*o.wheelDeltaX/6,u=o.wheelDeltaY/6),o.deltaMode&&o.deltaMode===1&&(s*=10,u*=10),s!==s&&u!==u&&(s=0,u=o.wheelDelta),o.shiftKey?[-u,-s]:[s,u]}function r(o,s,u){if(!qo.isWebKit&&t.querySelector("select:focus"))return!0;if(!t.contains(o))return!1;for(var c=o;c&&c!==t;){if(c.classList.contains(Ct.element.consuming))return!0;var f=Bi(c);if(u&&f.overflowY.match(/(scroll|auto)/)){var h=c.scrollHeight-c.clientHeight;if(h>0&&(c.scrollTop>0&&u<0||c.scrollTop<h&&u>0))return!0}if(s&&f.overflowX.match(/(scroll|auto)/)){var g=c.scrollWidth-c.clientWidth;if(g>0&&(c.scrollLeft>0&&s<0||c.scrollLeft<g&&s>0))return!0}c=c.parentNode}return!1}function a(o){var s=i(o),u=s[0],c=s[1];if(!r(o.target,u,c)){var f=!1;e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(c?t.scrollTop-=c*e.settings.wheelSpeed:t.scrollTop+=u*e.settings.wheelSpeed,f=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(u?t.scrollLeft+=u*e.settings.wheelSpeed:t.scrollLeft-=c*e.settings.wheelSpeed,f=!0):(t.scrollTop-=c*e.settings.wheelSpeed,t.scrollLeft+=u*e.settings.wheelSpeed),ar(e),f=f||n(u,c),f&&!o.ctrlKey&&(o.stopPropagation(),o.preventDefault())}}typeof window.onwheel<"u"?e.event.bind(t,"wheel",a):typeof window.onmousewheel<"u"&&e.event.bind(t,"mousewheel",a)}function b8e(e){if(!qo.supportsTouch&&!qo.supportsIePointer)return;var t=e.element;function n(y,v){var k=Math.floor(t.scrollTop),w=t.scrollLeft,M=Math.abs(y),x=Math.abs(v);if(x>M){if(v<0&&k===e.contentHeight-e.containerHeight||v>0&&k===0)return window.scrollY===0&&v>0&&qo.isChrome}else if(M>x&&(y<0&&w===e.contentWidth-e.containerWidth||y>0&&w===0))return!0;return!0}function i(y,v){t.scrollTop-=v,t.scrollLeft-=y,ar(e)}var r={},a=0,o={},s=null;function u(y){return y.targetTouches?y.targetTouches[0]:y}function c(y){return y.pointerType&&y.pointerType==="pen"&&y.buttons===0?!1:!!(y.targetTouches&&y.targetTouches.length===1||y.pointerType&&y.pointerType!=="mouse"&&y.pointerType!==y.MSPOINTER_TYPE_MOUSE)}function f(y){if(c(y)){var v=u(y);r.pageX=v.pageX,r.pageY=v.pageY,a=new Date().getTime(),s!==null&&clearInterval(s)}}function h(y,v,k){if(!t.contains(y))return!1;for(var w=y;w&&w!==t;){if(w.classList.contains(Ct.element.consuming))return!0;var M=Bi(w);if(k&&M.overflowY.match(/(scroll|auto)/)){var x=w.scrollHeight-w.clientHeight;if(x>0&&(w.scrollTop>0&&k<0||w.scrollTop<x&&k>0))return!0}if(v&&M.overflowX.match(/(scroll|auto)/)){var _=w.scrollWidth-w.clientWidth;if(_>0&&(w.scrollLeft>0&&v<0||w.scrollLeft<_&&v>0))return!0}w=w.parentNode}return!1}function g(y){if(c(y)){var v=u(y),k={pageX:v.pageX,pageY:v.pageY},w=k.pageX-r.pageX,M=k.pageY-r.pageY;if(h(y.target,w,M))return;i(w,M),r=k;var x=new Date().getTime(),_=x-a;_>0&&(o.x=w/_,o.y=M/_,a=x),n(w,M)&&y.preventDefault()}}function p(){e.settings.swipeEasing&&(clearInterval(s),s=setInterval(function(){if(e.isInitialized){clearInterval(s);return}if(!o.x&&!o.y){clearInterval(s);return}if(Math.abs(o.x)<.01&&Math.abs(o.y)<.01){clearInterval(s);return}if(!e.element){clearInterval(s);return}i(o.x*30,o.y*30),o.x*=.8,o.y*=.8},10))}qo.supportsTouch?(e.event.bind(t,"touchstart",f),e.event.bind(t,"touchmove",g),e.event.bind(t,"touchend",p)):qo.supportsIePointer&&(window.PointerEvent?(e.event.bind(t,"pointerdown",f),e.event.bind(t,"pointermove",g),e.event.bind(t,"pointerup",p)):window.MSPointerEvent&&(e.event.bind(t,"MSPointerDown",f),e.event.bind(t,"MSPointerMove",g),e.event.bind(t,"MSPointerUp",p)))}var w8e=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}},v8e={"click-rail":m8e,"drag-thumb":p8e,keyboard:g8e,wheel:y8e,touch:b8e},Ml=function(t,n){var i=this;if(n===void 0&&(n={}),typeof t=="string"&&(t=document.querySelector(t)),!t||!t.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");this.element=t,t.classList.add(Ct.main),this.settings=w8e();for(var r in n)this.settings[r]=n[r];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var a=function(){return t.classList.add(Ct.state.focus)},o=function(){return t.classList.remove(Ct.state.focus)};this.isRtl=Bi(t).direction==="rtl",this.isRtl===!0&&t.classList.add(Ct.rtl),this.isNegativeScroll=function(){var c=t.scrollLeft,f=null;return t.scrollLeft=-1,f=t.scrollLeft<0,t.scrollLeft=c,f}(),this.negativeScrollAdjustment=this.isNegativeScroll?t.scrollWidth-t.clientWidth:0,this.event=new Xo,this.ownerDocument=t.ownerDocument||document,this.scrollbarXRail=Fd(Ct.element.rail("x")),t.appendChild(this.scrollbarXRail),this.scrollbarX=Fd(Ct.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",a),this.event.bind(this.scrollbarX,"blur",o),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var s=Bi(this.scrollbarXRail);this.scrollbarXBottom=parseInt(s.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=lt(s.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=lt(s.borderLeftWidth)+lt(s.borderRightWidth),Sn(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=lt(s.marginLeft)+lt(s.marginRight),Sn(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=Fd(Ct.element.rail("y")),t.appendChild(this.scrollbarYRail),this.scrollbarY=Fd(Ct.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",a),this.event.bind(this.scrollbarY,"blur",o),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var u=Bi(this.scrollbarYRail);this.scrollbarYRight=parseInt(u.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=lt(u.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?f8e(this.scrollbarY):null,this.railBorderYWidth=lt(u.borderTopWidth)+lt(u.borderBottomWidth),Sn(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=lt(u.marginTop)+lt(u.marginBottom),Sn(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:t.scrollLeft<=0?"start":t.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:t.scrollTop<=0?"start":t.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(c){return v8e[c](i)}),this.lastScrollTop=Math.floor(t.scrollTop),this.lastScrollLeft=t.scrollLeft,this.event.bind(this.element,"scroll",function(c){return i.onScroll(c)}),ar(this)};Ml.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,Sn(this.scrollbarXRail,{display:"block"}),Sn(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=lt(Bi(this.scrollbarXRail).marginLeft)+lt(Bi(this.scrollbarXRail).marginRight),this.railYMarginHeight=lt(Bi(this.scrollbarYRail).marginTop)+lt(Bi(this.scrollbarYRail).marginBottom),Sn(this.scrollbarXRail,{display:"none"}),Sn(this.scrollbarYRail,{display:"none"}),ar(this),Yd(this,"top",0,!1,!0),Yd(this,"left",0,!1,!0),Sn(this.scrollbarXRail,{display:""}),Sn(this.scrollbarYRail,{display:""}))},Ml.prototype.onScroll=function(t){this.isAlive&&(ar(this),Yd(this,"top",this.element.scrollTop-this.lastScrollTop),Yd(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},Ml.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),Yo(this.scrollbarX),Yo(this.scrollbarY),Yo(this.scrollbarXRail),Yo(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},Ml.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(t){return!t.match(/^ps([-_].+|)$/)}).join(" ")};const k8e=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(e,{expose:t,emit:n}){const i=e,r=n,a=l.ref(null),o=l.ref(null);l.watch(()=>i.options,()=>{u(),s()},{deep:!0}),l.onMounted(()=>{a.value&&s()}),l.onBeforeUnmount(()=>{u()});function s(){a.value&&(o.value=new Ml(a.value,i.options),h())}function u(){o.value&&(h(!1),o.value.destroy(),o.value=null)}const c={scroll:f("scroll"),"ps-scroll-y":f("ps-scroll-y"),"ps-scroll-x":f("ps-scroll-x"),"ps-scroll-up":f("ps-scroll-up"),"ps-scroll-down":f("ps-scroll-down"),"ps-scroll-left":f("ps-scroll-left"),"ps-scroll-right":f("ps-scroll-right"),"ps-y-reach-start":f("ps-y-reach-start"),"ps-y-reach-end":f("ps-y-reach-end"),"ps-x-reach-start":f("ps-x-reach-start"),"ps-x-reach-end":f("ps-x-reach-end")};function f(g){return function(p){r(g,p)}}function h(g=!0){var p;(p=o.value)!=null&&p.element&&Object.entries(c).forEach(([y,v])=>{var k,w;g?(k=o.value)==null||k.element.addEventListener(y,v):(w=o.value)==null||w.element.removeEventListener(y,v)})}return t({ps:o}),(g,p)=>(l.openBlock(),l.createBlock(l.resolveDynamicComponent(g.tag),{ref_key:"scrollbar",ref:a,class:"ps"},{default:l.withCtx(()=>[l.renderSlot(g.$slots,"default")]),_:3},512))}}),M8e=["data-testid"],A1=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(e,{expose:t,emit:n}){const i=e,r=l.ref(null),a=n,o=h=>{a("scroll",h)},s={attributes:!0,attributeFilter:["style"]},u=(h,g)=>p=>{for(const y of p)y.type==="attributes"&&y.attributeName==="style"&&h.style.right!==g&&(h.style.right=g)},c=()=>{var w,M,x,_,S,N,T,I,L,D,z,H,X,re,ee,q,Z,de,Ae,at,Tt,Jt,Bt,qe;if(!r.value)return;const h=r.value.querySelector(".ps__thumb-y"),g=r.value.querySelector(".ps__thumb-x"),p=r.value.querySelector(".ps__rail-y"),y=r.value.querySelector(".ps__rail-x");h.style.background=((M=(w=i.thrumbStyle)==null?void 0:w.y)==null?void 0:M.background)||"#77a6ff",h.style.width=((_=(x=i.thrumbStyle)==null?void 0:x.y)==null?void 0:_.width)||"6px",h.style.right="0px",g.style.background=((N=(S=i.thrumbStyle)==null?void 0:S.x)==null?void 0:N.background)||"#77a6ff",g.style.width=((I=(T=i.thrumbStyle)==null?void 0:T.x)==null?void 0:I.width)||"6px",g.style.right="0px",p.style.background=((D=(L=i.railStyle)==null?void 0:L.y)==null?void 0:D.background)||"#F5F5F5",p.style.width=((H=(z=i.thrumbStyle)==null?void 0:z.y)==null?void 0:H.width)||"6px",p.style.right=((re=(X=i.railStyle)==null?void 0:X.y)==null?void 0:re.right)||"0px",y.style.background=((q=(ee=i.railStyle)==null?void 0:ee.x)==null?void 0:q.background)||"#F5F5F5",y.style.width=((de=(Z=i.thrumbStyle)==null?void 0:Z.x)==null?void 0:de.width)||"6px",y.style.right=((at=(Ae=i.railStyle)==null?void 0:Ae.x)==null?void 0:at.right)||"0px";const v=new MutationObserver(u(p,((Jt=(Tt=i.railStyle)==null?void 0:Tt.y)==null?void 0:Jt.right)||"0px")),k=new MutationObserver(u(y,((qe=(Bt=i.railStyle)==null?void 0:Bt.x)==null?void 0:qe.right)||"0px"));v.observe(p,s),k.observe(y,s)};return l.watch(()=>i,()=>{c()},{immediate:!0}),t({scrollToTop:()=>{r.value&&(r.value.children[0].scrollTop=0)}}),l.onMounted(()=>{c()}),(h,g)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"scrollbar",ref:r,"data-testid":i.dataTestid},[l.createVNode(l.unref(k8e),{onScroll:o,options:i.options,tag:i.tag,class:l.normalizeClass(i.class),style:l.normalizeStyle(i.style),"data-testid":`${i.dataTestid}-Scroll`,ref_key:"scrollbar",ref:r},{default:l.withCtx(()=>[l.renderSlot(h.$slots,"default")]),_:3},8,["options","tag","class","style","data-testid"])],8,M8e))}});function bt(e,t=document.documentElement){for(const[n,i]of Object.entries(e))t.style.setProperty(n,String(i))}const C8e=()=>{const e=l.ref(0),t=l.ref([]),n=l.ref(null),i=u=>{t.value.push(u),a(u),o()},r=()=>{t.value.pop(),s(),t.value.length?a(t.value[t.value.length-1]):n.value=null},a=u=>{n.value=u},o=()=>{e.value+=1},s=()=>{e.value>0&&(e.value-=1)};return{countOpenedModal:e,openedModals:t,lastOpenedModal:n,addOpenedModal:i,reduceOpenedModal:r,setLastOpenedModal:a,incrementCountModal:o,decrementCountModal:s}},x8e=["data-testid"],S8e=["data-testid"],_8e=me(l.defineComponent({__name:"Modal",props:{open:{type:Boolean},position:{default:"right"},width:{},height:{},dataTestid:{default:"Modal"}},emits:["close","unmounted"],setup(e,{expose:t,emit:n}){const{lastOpenedModal:i,addOpenedModal:r,reduceOpenedModal:a}=C8e(),o=e,s=l.ref(null),u=l.useAttrs(),c=l.ref(!1),f=l.computed(()=>({width:o.width,height:o.height})),h=n;let g=0;const p=()=>{g=Date.now(),s.value&&(o.open?(s.value.showModal(),r(s.value)):y())},y=()=>{Date.now()-g<300||(a(),h("close"))},v=()=>{var _;(_=s.value)==null||_.close(),document.documentElement.focus(),M()},k=_=>{_.key==="Escape"&&i.value===s.value&&y()},w=()=>{if(document.querySelectorAll(".modal-yui-kit").length===1)return window.innerWidth-document.documentElement.clientWidth;{const S=document.body.style.paddingRight;return Number(S.replace(/\D/g,""))||0}},M=()=>{document.querySelectorAll(".modal-yui-kit").length===0&&bt({overflow:"","padding-right":""},document.body)},x=_=>{_.target===s.value&&y()};return t({closeDialog:v}),l.onMounted(()=>{l.watchEffect(()=>{o.open!==c.value&&(p(),c.value=o.open)}),s.value&&s.value.addEventListener("cancel",S=>{S.preventDefault()});const _=w();bt({overflow:"hidden","padding-right":`${_}px`},document.body),document.addEventListener("keydown",k)}),l.onUnmounted(()=>{M(),document.removeEventListener("keydown",k),h("unmounted")}),(_,S)=>(l.openBlock(),l.createElementBlock("dialog",l.mergeProps({ref_key:"dialog",ref:s},l.unref(u),{class:["modal-yui-kit",`modal-yui-kit_${o.position}`],"data-testid":o.dataTestid,onClick:l.withModifiers(x,["self","left"])}),[l.createElementVNode("div",{class:"modal-yui-kit__modal-content",style:l.normalizeStyle(f.value),"data-testid":`${o.dataTestid}-ModalContent`},[l.renderSlot(_.$slots,"default",{},void 0,!0)],12,S8e)],16,x8e))}}),[["__scopeId","data-v-3750bc76"]]);var y3=(e=>(e.slideTop="slide-top",e.slideLeft="slide-left",e.fadeAndScale="fade-and-scale",e.fade="fade",e))(y3||{});const Xd=me(l.defineComponent({__name:"ModalAnimated",props:{animateType:{},open:{type:Boolean},position:{default:"right"},width:{},height:{},dataTestid:{default:"Modal"}},emits:["close","unmounted","end-animation"],setup(e,{emit:t}){const n=e,i=t,r=l.computed(()=>n.animateType===y3.fade?"fade":n.position==="bottom"?"slide-bottom":n.position==="right"?"slide-left":"fade-and-scale"),a=l.ref(null),o=l.reactive({function:()=>{}}),s=()=>{h()},u=()=>{i("unmounted")},c=()=>{h()},f=()=>{o.function(),i("end-animation")},h=()=>{var p;a.value&&(o.function=(p=a.value)==null?void 0:p.closeDialog)},g=()=>{h(),i("close")};return(p,y)=>(l.openBlock(),l.createBlock(l.Transition,{name:r.value,onAfterLeave:f,onBeforeLeave:c,onAfterEnter:s},{default:l.withCtx(()=>[n.open?(l.openBlock(),l.createBlock(_8e,{key:0,ref_key:"modalRef",ref:a,open:n.open,position:n.position,width:n.width,height:n.height,"data-testid":n.dataTestid,onClose:g,onUnmounted:u},{default:l.withCtx(()=>[l.renderSlot(p.$slots,"default",{},void 0,!0)]),_:3},8,["open","position","width","height","data-testid"])):l.createCommentVNode("",!0)]),_:3},8,["name"]))}}),[["__scopeId","data-v-b0e210a3"]]);var qd=(e=>(e.small="small",e.medium="medium",e.big="big",e))(qd||{}),b3=(e=>(e.circled="circled",e.rounded="rounded",e))(b3||{}),w3=(e=>(e.blue="blue",e.red="red",e))(w3||{});const T8e=["data-testid","checked","disabled"],P8e=l.defineComponent({__name:"Checkbox",props:{size:{default:qd.medium},circular:{default:b3.rounded},color:{default:w3.blue},checked:{type:Boolean},modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},dataTestid:{default:"Checkbox"}},emits:["change","update:modelValue"],setup(e,{emit:t}){const n=e,i=t,r=l.reactive({isChecked:n.modelValue});l.watchEffect(()=>{r.isChecked=n.modelValue});const a=()=>{r.isChecked=!r.isChecked,i("change",r.isChecked),i("update:modelValue",r.isChecked)};return(o,s)=>(l.openBlock(),l.createElementBlock("input",{type:"checkbox",class:l.normalizeClass(`checkbox-yui-kit checkbox-yui-kit_${n.size} checkbox-yui-kit_${n.circular} checkbox-yui-kit_${n.color}`),"data-testid":`${n.dataTestid}`,tabindex:"0",onChange:a,checked:r.isChecked,disabled:n.disabled,onKeyup:l.withKeys(a,["enter"])},null,42,T8e))}}),D1=me(P8e,[["__scopeId","data-v-77e5e5df"]]),E8e=["data-testid"],A8e=["src","alt"],D8e=["src"],N8e={key:1,class:"avatar-yui-kit__text"},Gd=me(l.defineComponent({__name:"Avatar",props:{initials:{},url:{},isIcon:{type:Boolean},alt:{},defaultImage:{},dataTestid:{}},setup(e){const t=e,n=l.ref(!1),i=l.ref(!1);l.watch(()=>t.url,()=>{n.value=!1,i.value=!1});const r=()=>t.initials?t.initials.charAt(0):"";return(a,o)=>(l.openBlock(),l.createElementBlock("div",{"data-testid":t.dataTestid,class:"avatar-yui-kit"},[t.url&&!n.value?(l.openBlock(),l.createElementBlock("img",{key:0,src:t.url,alt:t.alt,class:"avatar-yui-kit__image",style:l.normalizeStyle({visibility:i.value?"visible":"hidden"}),onLoad:o[0]||(o[0]=s=>i.value=!0),onError:o[1]||(o[1]=s=>n.value=!0)},null,44,A8e)):l.createCommentVNode("",!0),n.value||!t.url?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[t.defaultImage?(l.openBlock(),l.createElementBlock("img",{key:0,src:t.defaultImage,class:"avatar-yui-kit__image"},null,8,D8e)):(l.openBlock(),l.createElementBlock("div",N8e,l.toDisplayString(r()),1))],64)):l.createCommentVNode("",!0)],8,E8e))}}),[["__scopeId","data-v-fba4bf34"]]),j8e=["data-testid","aria-label"],I8e=["data-testid"],Cl=me(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(e){const t=e,n=CSS.supports("top","anchor(bottom)"),i=l.useId(),r=l.computed(()=>`--anchor-tooltip-${i}`),a=l.ref(null),o=l.ref(null),s=l.computed(()=>[{"tooltip-yui-kit__hint_show":t.isShow||c.isShow,"tooltip-yui-kit__hint_bottom-center":t.position==="bottom-center","tooltip-yui-kit__hint_bottom-left":t.position==="bottom-left","tooltip-yui-kit__hint_bottom-right":t.position==="bottom-right","tooltip-yui-kit__hint_top-center":t.position==="top-center","tooltip-yui-kit__hint_top-left":t.position==="top-left","tooltip-yui-kit__hint_top-right":t.position==="top-right","tooltip-yui-kit__hint_left-top":t.position==="left-top","tooltip-yui-kit__hint_left-center":t.position==="left-center","tooltip-yui-kit__hint_left-bottom":t.position==="left-bottom","tooltip-yui-kit__hint_right-top":t.position==="right-top","tooltip-yui-kit__hint_right-center":t.position==="right-center","tooltip-yui-kit__hint_right-bottom":t.position==="right-bottom","tooltip-yui-kit__hint_small":t.size==="small","tooltip-yui-kit__hint_medium":t.size==="medium","tooltip-yui-kit__hint_large":t.size==="large","tooltip-yui-kit__hint_black":t.type==="black","tooltip-yui-kit__hint_blue":t.type==="blue","tooltip-yui-kit__hint_white":t.type==="white",[t.hintClass]:!0}]),u=l.computed(()=>{var N;const S=(N=a.value)==null?void 0:N.closest("dialog");return S||"body"}),c=l.reactive({isShow:!1}),f=()=>{k()},h=()=>{w()},g=()=>{p()},p=()=>{requestAnimationFrame(()=>{if(!a.value||!o.value||!c.isShow&&!t.isShow)return;const S={"--hint-top":"anchor(top)","--hint-left":"anchor(left)","--hint-width":"0","--hint-height":"0","--tooltip-width":"0","--tooltip-height":"0","--hint-visibility":"visible"};n||(S["--hint-top"]="0",S["--hint-left"]="0");const N=a.value.getBoundingClientRect(),T=o.value.getBoundingClientRect(),I=window.pageYOffset||document.documentElement.scrollTop,L=window.pageXOffset||document.documentElement.scrollLeft;let D=N.top+I,z=N.left+L;const H=a.value.closest("dialog");if(H){const Z=H.getBoundingClientRect();D=N.top-Z.top,z=N.left-Z.left;const de=H.scrollTop,Ae=H.scrollLeft;D+=de,z+=Ae}const X=N.width,re=N.height,ee=T.width,q=T.height;n||(S["--hint-top"]=`${D}px`,S["--hint-left"]=`${z}px`),S["--tooltip-width"]=`${X}px`,S["--tooltip-height"]=`${re}px`,S["--hint-width"]=`${ee}px`,S["--hint-height"]=`${q}px`,o.value&&bt(S,o.value)})},y=()=>{requestAnimationFrame(()=>{!o.value||t.hintGap===void 0||bt({"--tooltip-hint-gap":t.hintGap},o.value)})},v=()=>{o.value&&(bt({"position-anchor":`${r.value}`},o.value),p())};l.watch(()=>t.hintGap,y,{immediate:!0}),l.watch(()=>t.isCanShow,()=>{l.nextTick(()=>{v()})});const k=()=>{c.isShow=!0},w=()=>{c.isShow=!1},M=new MutationObserver(()=>{p()}),x=new ResizeObserver(()=>{var S;(c.isShow||t.isShow)&&!((S=a.value)!=null&&S.matches(":hover"))?w():p()}),_=S=>{M.observe(S,{childList:!0,attributes:!0,characterData:!0}),x.observe(S)};return l.onMounted(()=>{a.value&&bt({"anchor-name":`${r.value}`},a.value),v(),o.value&&_(o.value),a.value&&_(a.value),n||(window.addEventListener("scroll",p,!0),window.addEventListener("resize",p))}),l.onUnmounted(()=>{x.disconnect(),M.disconnect(),window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p)}),(S,N)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"tooltipRef",ref:a,class:"tooltip-yui-kit","data-testid":t.dataTestid,"aria-label":e.hint,onMouseenter:f,onMouseleave:h},[l.renderSlot(S.$slots,"default",{},void 0,!0),e.isCanShow?(l.openBlock(),l.createBlock(l.Teleport,{key:0,to:u.value},[l.createVNode(l.Transition,{name:"hint-animate",onEnter:g},{default:l.withCtx(()=>[l.withDirectives(l.createElementVNode("div",{ref_key:"hintRef",ref:o,class:l.normalizeClass(["tooltip-yui-kit__hint",s.value]),"data-testid":t.dataTestid},l.toDisplayString(e.hint),11,I8e),[[l.vShow,e.isShow||c.isShow]])]),_:1})],8,["to"])):l.createCommentVNode("",!0)],40,j8e))}}),[["__scopeId","data-v-0080a212"]]),W8e=["data-testid"],O8e=["data-testid"],z8e=["data-testid"],L8e=["onClick","data-testid"],$8e=l.defineComponent({__name:"Popover",props:{isShow:{type:Boolean},iconName:{default:se.moreVertical},options:{default:()=>[]},tooltip:{default:""},tooltipPosition:{default:"top-left"},isWCUse:{type:Boolean},translateY:{default:"0"},dataTestid:{default:"Popover"}},emits:["close"],setup(e,{emit:t}){const n=e,i=t,r=l.reactive({isShow:!1}),a=l.computed(()=>{var I;const T=(I=c.value)==null?void 0:I.closest("dialog");return T||"body"}),o=CSS.supports("top","anchor(bottom)"),s=l.useId(),u=l.computed(()=>`--anchor-popover-${s}`),c=l.ref(null),f=l.ref(null),h=l.ref(null),g=l.computed(()=>({"popover-yui-kit__wrapper":!0,"active-yui-kit":r.isShow,"empty-yui-kit":n.options.length===0})),p=()=>r.isShow=!r.isShow,y=()=>{r.isShow=!1,i("close")},v=T=>{T.function(),y()},k=()=>{requestAnimationFrame(()=>{if(!c.value||!f.value||!r.isShow)return;const T={},I=c.value.getBoundingClientRect(),L=window.pageYOffset||document.documentElement.scrollTop,D=window.pageXOffset||document.documentElement.scrollLeft;let z=I.bottom+L,H=I.left+D;const X=c.value.closest("dialog");if(X){const ee=X.getBoundingClientRect();z=I.top-ee.top,H=I.left-ee.left;const q=X.scrollTop,Z=X.scrollLeft;z+=q,H+=Z,z+=10}z+=10,T["--popover-top"]=`${z}px`,o||(T["--popover-left"]=`${H}px`),bt(T,f.value),(()=>{if(!f.value)return;const ee=f.value.getBoundingClientRect();ee.right>window.innerWidth&&(o?T["--popover-right"]="anchor(right) ":T["--popover-right"]=`${I.right-ee.width}px`)})(),T["--popover-right"]&&(T.left="auto",bt(T,f.value))})},w=T=>{const I=T.getBoundingClientRect(),L=document.elementFromPoint(I.left,I.top),D=document.elementFromPoint(I.right,I.bottom);!(L&&T.contains(L))&&!(D&&T.contains(D))&&y()},M=new IntersectionObserver(T=>{T.forEach(I=>{I.isIntersecting||y()})}),x=()=>{c.value&&f.value&&(window.addEventListener("scroll",k,!0),window.addEventListener("resize",k))},_=()=>{c.value&&f.value&&(window.removeEventListener("scroll",k,!0),window.removeEventListener("resize",k))},S=()=>{c.value&&window.addEventListener("scroll",w.bind(null,c.value),!0)},N=()=>{c.value&&window.removeEventListener("scroll",w.bind(null,c.value),!0)};return l.watch(()=>n.isShow,()=>r.isShow=n.isShow),l.watch(()=>r.isShow,()=>{r.isShow?(k(),S()):N(),!o&&(r.isShow?x():_())}),l.onMounted(()=>{c.value&&bt({"anchor-name":`${u.value}`},c.value),f.value&&bt({"position-anchor":`${u.value}`},f.value),h.value&&M.observe(h.value),o||k()}),l.onUnmounted(()=>{M.disconnect(),N(),o||_()}),(T,I)=>(l.openBlock(),l.createBlock(Cl,{hint:n.tooltip,size:"small",type:"black",position:n.tooltipPosition,"data-testid":n.dataTestid,"is-can-show":!!n.tooltip&&!r.isShow&&n.options.length>0},{default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:"popover-yui-kit",ref_key:"popover",ref:h,"data-testid":`${n.dataTestid}-Popover`},[l.createElementVNode("div",{ref_key:"reference",ref:c,class:l.normalizeClass(g.value),"data-testid":`${n.dataTestid}-PopoverShow`,onClick:p},[l.renderSlot(T.$slots,"trigger",{},()=>[l.createVNode(we,{class:"popover-yui-kit__icon",name:n.iconName,"data-testid":`${n.dataTestid}-PopoverShow-Icon`},null,8,["name","data-testid"])],!0)],10,O8e),(l.openBlock(),l.createBlock(l.Teleport,{to:a.value,disabled:n.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(${n.translateY})`}),ref_key:"floating",ref:f},[l.renderSlot(T.$slots,"default",{},()=>{var L;return[(L=n.options)!=null&&L.length?(l.openBlock(),l.createElementBlock("div",{key:0,class:"popover-yui-kit__options","data-testid":`${n.dataTestid}-PopoverShow-Options`},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.options,(D,z)=>(l.openBlock(),l.createElementBlock("div",{class:"popover-yui-kit__options__item",key:z,style:l.normalizeStyle(D.style),onClick:l.withModifiers(H=>v(D),["stop"]),"data-testid":`${n.dataTestid}-Item${z}`},l.toDisplayString(D.value),13,L8e))),128))],8,z8e)):l.createCommentVNode("",!0)]},!0)],4),[[l.vShow,r.isShow]])]),_:3})],8,["to","disabled"]))],8,W8e)),[[l.unref(vo),y,void 0,{bubble:!0}]])]),_:3},8,["hint","position","data-testid","is-can-show"]))}}),Go=me($8e,[["__scopeId","data-v-21b94369"]]),H8e=["data-testid"],R8e={class:"list-yui-kit__item-text"},B8e=me(l.defineComponent({__name:"MenuItem",props:{active:{type:Boolean},disabled:{type:Boolean},dataTestid:{},iconName:{},text:{},menuType:{}},emits:["click"],setup(e,{emit:t}){const n=t,i=()=>{e.disabled||n("click",e.menuType)};return(r,a)=>(l.openBlock(),l.createElementBlock("li",{class:l.normalizeClass(["list-yui-kit__item",{"list-yui-kit__item--disabled":e.disabled,"list-yui-kit__item--active":e.active}]),onClick:i,"data-testid":e.dataTestid},[l.createVNode(we,{name:e.iconName},null,8,["name"]),l.createElementVNode("span",R8e,l.toDisplayString(e.text),1),l.renderSlot(r.$slots,"default",{},void 0,!0)],10,H8e))}}),[["__scopeId","data-v-2617a6b9"]]);var rt=(e=>(e.profile="profile",e.theme="theme",e.options="options",e.exit="exit",e.qrAuth="qr-auth",e.help="help",e))(rt||{});const V8e={class:"menu-yui-kit__list"},F8e={class:"list-yui-kit"},U8e=me(l.defineComponent({__name:"UserMenuList",props:{closeAfterClick:{type:Boolean},menuOpen:{type:Boolean},categories:{},texts:{},user:{},languages:{},isBlackTheme:{type:Boolean},dataTestid:{default:"UserMenuList"}},emits:["click","unmount-qr-auth","themeChange","languageSwitch"],setup(e,{emit:t}){const n=e,i=t,r=l.ref(null);l.watch(()=>n.menuOpen,g=>{g||(r.value=null)});const a=g=>{if(r.value=g,g===rt.qrAuth){i("unmount-qr-auth");return}i("click",g)},o=g=>{i("languageSwitch",g)},s=()=>!1,u=g=>({[rt.profile]:"Profile",[rt.qrAuth]:"Auth with QR",[rt.theme]:"Theme",[rt.options]:"Settings",[rt.exit]:"Log Out",[rt.help]:"Help"})[g]??"",c=g=>({[rt.profile]:se.profile,[rt.qrAuth]:se.qrCode,[rt.theme]:se.darkThemeSwitcher,[rt.options]:se.settings,[rt.exit]:se.logout,[rt.help]:se.help})[g]??se.profile,f=g=>({[rt.profile]:"Profile",[rt.qrAuth]:"QR",[rt.theme]:"Theme",[rt.options]:"Settings",[rt.exit]:"Exit",[rt.help]:"Help"})[g]??g,h=g=>g===rt.theme;return(g,p)=>{var y,v,k;return l.openBlock(),l.createElementBlock("div",V8e,[l.createElementVNode("ul",F8e,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.categories,w=>{var M;return l.openBlock(),l.createBlock(B8e,{key:w,"data-testid":`${n.dataTestid}-${f(w)}-Item`,iconName:c(w),text:((M=n.texts)==null?void 0:M[w])??u(w),menuType:w,disabled:h(w),active:r.value===w,onClick:()=>a(w)},{default:l.withCtx(()=>[w===l.unref(rt).theme?(l.openBlock(),l.createBlock(Vd,{key:0,disabled:"",onChange:s})):l.createCommentVNode("",!0)]),_:2},1032,["data-testid","iconName","text","menuType","disabled","active","onClick"])}),128))]),(y=n.languages)!=null&&y.items?(l.openBlock(),l.createBlock(Eu,{key:0,items:(v=n.languages)==null?void 0:v.items,"default-value":(k=n.languages)==null?void 0:k.defaultValue,onChange:o,"data-testid":`${n.dataTestid}-Language-Switch`},null,8,["items","default-value","data-testid"])):l.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-f2c557cf"]]),Y8e=["data-testid"],X8e={class:"menu-yui-kit__wrapper"},q8e={class:"menu-yui-kit__names"},G8e={class:"menu-yui-kit__name"},K8e={class:"menu-yui-kit__role"},N1=me(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","themeChange","languageSwitch"],setup(e,{emit:t}){const n=e,i=l.reactive({isShow:!1,isBlackTheme:n.isBlackTheme??!1}),r=t,a=l.computed(()=>({"menu-yui-kit__heading":!0,"active-yui-kit":i.isShow}));function o(g){r("click",g),n.closeAfterClick&&(i.isShow=!1)}const s=l.computed(()=>i.isShow?se.chevronUp:se.chevronDown),u=()=>{i.isShow=!i.isShow};function c(g){n.closeAfterClick&&(i.isShow=!1),r("themeChange",g),i.isBlackTheme=g}const f=g=>{n.closeAfterClick&&(i.isShow=!1),r("languageSwitch",g)},h=()=>{n.closeAfterClick&&(i.isShow=!1),r("unmount-qr-auth")};return(g,p)=>(l.openBlock(),l.createElementBlock("div",{class:"menu-yui-kit","data-testid":n.dataTestid},[l.createElementVNode("div",X8e,[l.createVNode(Go,{open:i.isShow,onClose:p[0]||(p[0]=y=>i.isShow=!1),placement:"bottom-start","data-testid":`${n.dataTestid}-Popover`},{trigger:l.withCtx(()=>{var y,v,k;return[l.createElementVNode("div",{class:l.normalizeClass(a.value),onClick:u},[l.createVNode(Gd,{class:"menu-yui-kit__avatar",url:(y=n.user)==null?void 0:y.avatar,alt:"user-avatar","data-testid":`${n.dataTestid}-Avatar`},null,8,["url","data-testid"]),l.createElementVNode("div",q8e,[l.createElementVNode("p",G8e,l.toDisplayString((v=n.user)==null?void 0:v.name),1),l.createElementVNode("p",K8e,l.toDisplayString((k=n.user)==null?void 0:k.role),1)]),l.createVNode(yt,{type:l.unref(Qe).ghost,class:"menu-yui-kit__button","data-testid":`${n.dataTestid}-Toggle`},{default:l.withCtx(()=>[l.createVNode(we,{class:"menu-yui-kit__button-icon",name:s.value},null,8,["name"])]),_:1},8,["type","data-testid"])],2)]}),default:l.withCtx(()=>[l.createVNode(U8e,{"data-testid":`${n.dataTestid}-List`,"is-black-theme":i.isBlackTheme,"menu-open":i.isShow,languages:n.languages,categories:n.categories,texts:n.texts,onClick:o,onThemeChange:c,onLanguageSwitch:f,onUnmountQrAuth:h},null,8,["data-testid","is-black-theme","menu-open","languages","categories","texts"])]),_:1},8,["open","data-testid"])])],8,Y8e))}}),[["__scopeId","data-v-38df3478"]]);var Kd=(e=>(e.default="default",e.minor="minor",e))(Kd||{});const Q8e=["data-testid"],J8e=["data-testid"],Z8e=["data-testid"],e7e=["data-testid","placeholder","required","maxlength","readonly"],t7e=l.defineComponent({__name:"Textarea",props:{placeholder:{},inputMessage:{},required:{type:Boolean,default:!1},maxlength:{},modelValue:{default:""},readonly:{type:Boolean,default:!1},type:{default:Kd.default},modelModifiers:{default:()=>({})},dataTestid:{default:"Textarea"}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=t,r=l.reactive({isPressed:!1,inputElement:n.modelValue}),a=l.computed(()=>[{pressed:r.isPressed,readonly:n.readonly,[n.type]:!0}]),o=()=>{i("update:modelValue",r.inputElement)},s=()=>{n.readonly||(r.isPressed=!0)},u=()=>{r.isPressed=!1};return l.watch(()=>n.modelValue,c=>{r.inputElement=c}),(c,f)=>(l.openBlock(),l.createElementBlock("fieldset",{class:l.normalizeClass(["input-yui-kit",a.value]),onFocusout:u,"data-testid":n.dataTestid},[n.inputMessage?(l.openBlock(),l.createElementBlock("legend",{key:0,class:"input-yui-kit__legend","data-testid":`${n.dataTestid}-Legend`},[l.createTextVNode(l.toDisplayString(n.inputMessage)+" ",1),n.required?(l.openBlock(),l.createElementBlock("sup",{key:0,class:"input-yui-kit__star","data-testid":`${n.dataTestid}-Legend-Star`},"*",8,Z8e)):l.createCommentVNode("",!0)],8,J8e)):l.createCommentVNode("",!0),l.withDirectives(l.createElementVNode("textarea",{"onUpdate:modelValue":f[0]||(f[0]=h=>r.inputElement=h),onFocus:s,onInput:o,"data-testid":`${n.dataTestid}-Textarea`,class:"input-yui-kit__input",placeholder:n.placeholder,required:n.required,maxlength:n.maxlength,readonly:n.readonly},null,40,e7e),[[l.vModelText,r.inputElement]])],42,Q8e))}}),j1=me(t7e,[["__scopeId","data-v-d71a57d3"]]);var v3=(e=>(e.img="img",e.pdf="pdf",e.docx="docx",e))(v3||{});const n7e=["data-testid"],i7e=["data-testid"],r7e=["src","alt","data-testid"],a7e=["data-testid"],o7e=["data-testid"],s7e=["data-testid"],I1=me(l.defineComponent({__name:"Picture",props:{type:{},alt:{},url:{},caption:{},dataTestid:{default:"Picture"}},setup(e){const t=e;return(n,i)=>(l.openBlock(),l.createElementBlock("figure",{class:"picture-yui-kit","data-testid":t.dataTestid},[t.type==l.unref(v3).img?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createElementVNode("picture",{class:"picture-yui-kit__picture","data-testid":`${t.dataTestid}-Picture`},[l.createElementVNode("img",{class:"picture-yui-kit__picture__image",src:t.url,alt:t.alt,"data-testid":`${t.dataTestid}-Picture-Img`},null,8,r7e)],8,i7e),l.createElementVNode("figcaption",{class:"picture-yui-kit__picture__caption","data-testid":`${t.dataTestid}-Caption`},l.toDisplayString(t.caption),9,a7e)],64)):(l.openBlock(),l.createElementBlock("div",{key:1,class:"picture-yui-kit__caption","data-testid":`${t.dataTestid}-Caption-Box`},[l.createElementVNode("h4",{class:"picture-yui-kit__caption__title","data-testid":`${t.dataTestid}-Caption-Title`},l.toDisplayString(t.caption),9,s7e)],8,o7e))],8,n7e))}}),[["__scopeId","data-v-b6eba94c"]]);var k3=(e=>(e.success="success",e.warning="warning",e.error="error",e.info="info",e))(k3||{}),M3=(e=>(e.success="Успешно",e.warning="Предупреждение",e.error="Ошибка",e.info="Уведомление",e))(M3||{}),C3=(e=>(e[e.success=se.checkbox]="success",e[e.warning=se.alertTriangle]="warning",e[e.error=se.exitCircle]="error",e[e.info=se.info]="info",e))(C3||{});const l7e=["id","data-testid"],u7e=["data-testid"],d7e=["data-testid"],c7e=["data-testid"],f7e=["data-testid"],h7e=l.defineComponent({__name:"Notification",props:{type:{default:k3.info},title:{},pushKey:{},description:{default:""},timeout:{default:3},showPopover:{type:Boolean,default:!0},dataTestid:{default:"Notification"}},emits:["close"],setup(e,{expose:t,emit:n}){const i=e,r=n,a=l.ref(null);K(a,"toggle",()=>{i.timeout>0&&setTimeout(()=>{var c;return(c=a.value)==null?void 0:c.hidePopover()},i.timeout*1e3)});const o=()=>(r("close"),"hide"),s=()=>{var c;(c=a.value)==null||c.showPopover()},u=l.reactive({message:{icon:C3[i.type],title:i.title||M3[i.type],description:i.description}});return l.onMounted(()=>{var c;i.showPopover&&((c=a.value)==null||c.showPopover())}),t({showPopover:s}),(c,f)=>(l.openBlock(),l.createElementBlock("div",{popover:"manual",id:i.pushKey.toString(),class:l.normalizeClass(`push-notification-yui-kit push-notification-yui-kit_${i.type}`),"data-testid":i.dataTestid,ref_key:"popover",ref:a},[l.createElementVNode("div",{class:"notification-yui-kit","data-testid":`${i.dataTestid}-Notification`},[l.createElementVNode("div",{class:"notification-yui-kit__block","data-testid":`${i.dataTestid}-Notification-Block`},[l.createVNode(we,{name:u.message.icon,class:"notification-yui-kit__block-icon","data-testid":`${i.dataTestid}-Notification-Icon`},null,8,["name","data-testid"]),l.createElementVNode("h4",{class:"notification-yui-kit__block-title","data-testid":`${i.dataTestid}-Notification-Title`},l.toDisplayString(u.message.title),9,c7e),l.createElementVNode("span",{class:"notification-yui-kit__block-text","data-testid":`${i.dataTestid}-Notification-Description`},l.toDisplayString(u.message.description),9,f7e)],8,d7e),l.createVNode(yt,{class:"notification-yui-kit__exit",type:l.unref(Qe).ghost,popovertarget:i.pushKey.toString(),popovertargetaction:o,"data-testid":`${i.dataTestid}-Notification-Button`},{default:l.withCtx(()=>[l.createVNode(we,{name:l.unref(se).crossSmall,"data-testid":`${i.dataTestid}-Notification-Icon`},null,8,["name","data-testid"])]),_:1},8,["type","popovertarget","data-testid"])],8,u7e)],10,l7e))}}),W1=me(h7e,[["__scopeId","data-v-51a00a13"]]),O1=l.defineComponent({__name:"CopyIcon",props:{content:{default:""},dataTestid:{default:"CopyIcon"}},setup(e){const t=e,n=()=>{const i=t.content,r=document.createElement("textarea");r.value=i;const a=document.querySelectorAll("dialog[open]"),o=a.length?a[a.length-1]:null;o?o.append(r):document.body.append(r),r.select(),r.setSelectionRange(0,99999),document.execCommand("copy"),r.remove()};return(i,r)=>(l.openBlock(),l.createBlock(we,{class:"copy-icon-yui-kit",name:l.unref(se).copy,"data-testid":t.dataTestid,onClick:n},null,8,["name","data-testid"]))}}),m7e=["data-testid"],p7e=["data-testid"],g7e=["data-testid"],y7e=["data-testid"],b7e=["data-testid"],z1=me(l.defineComponent({__name:"Loader",props:{title:{default:"Загрузка..."},dataTestid:{default:"Loader"}},setup(e){const t=e;return(n,i)=>(l.openBlock(),l.createElementBlock("div",{class:"loader","data-testid":t.dataTestid},[l.createElementVNode("div",{class:"loader__area","data-testid":`${t.dataTestid}-Area`},[l.createElementVNode("div",{class:"loader__circle loader__circle--light-blue","data-testid":`${t.dataTestid}-Loader-LightBlue1`},null,8,g7e),l.createElementVNode("div",{class:"loader__circle loader__circle--blue","data-testid":`${t.dataTestid}-Loader-LightBlue2`},null,8,y7e)],8,p7e),t.title?(l.openBlock(),l.createElementBlock("span",{key:0,class:"loader__span","data-testid":`${t.dataTestid}-Loader-Title`},l.toDisplayString(t.title),9,b7e)):l.createCommentVNode("",!0)],8,m7e))}}),[["__scopeId","data-v-12d4e463"]]),w7e=["data-testid"],v7e=["data-testid"],k7e=["data-testid"],M7e=["data-testid"],C7e=["data-testid"],x7e=["data-testid"],S7e=["data-testid"],_7e=["data-testid"],T7e=["data-testid"],P7e=["data-testid"],E7e=["data-testid"],A7e=["data-testid"],D7e=["data-testid"],N7e=["data-testid"],j7e=l.defineComponent({__name:"FilterTag",props:{title:{},iconName:{default:se.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(e,{emit:t}){const n=e,i=l.reactive({isShow:!1,options:[]}),r=t,a=l.computed(()=>({"filter-yui-kit__wrapper":!0,"active-yui-kit":i.isShow})),o=()=>i.isShow=!i.isShow,s=()=>{i.isShow=!1},u=l.computed(()=>i.options.filter(p=>p.chose)),c=l.computed(()=>i.options.filter(p=>!p.chose)),f=p=>{n.disallowNull&&p.chose||(p.chose=!p.chose,n.multiply||(i.options=i.options.map(y=>({...y,chose:p.value===y.value&&p.chose}))),i.options.every(y=>y.chose)&&(i.options=i.options.map(y=>({...y,chose:!1}))),r("change",u.value.map(y=>y.value)),i.isShow=!1)},h=()=>{i.options=i.options.map(p=>({...p,chose:!1})),i.isShow=!1,r("change",[])},g=()=>{i.options=n.options.map(p=>({...p,chose:n.selectedValues.includes(p.value)})),i.options.every(p=>p.chose)&&(i.options=i.options.map(p=>({...p,chose:!1})))};return l.watch(()=>[n.options,n.selectedValues],g),l.watch(()=>n.selectedValues,g),l.onMounted(g),(p,y)=>l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:"filter-yui-kit","data-testid":n.dataTestid},[l.createElementVNode("div",{class:l.normalizeClass(a.value),onClick:o,"data-testid":`${n.dataTestid}-Wrapper`},[n.iconName?(l.openBlock(),l.createBlock(we,{key:0,name:n.iconName,"data-testid":`${n.dataTestid}-Icon`},null,8,["name","data-testid"])):l.createCommentVNode("",!0),n.title?(l.openBlock(),l.createElementBlock("span",{key:1,"data-testid":`${n.dataTestid}-Title`},l.toDisplayString(n.title),9,k7e)):l.createCommentVNode("",!0),!u.value.length&&!n.disallowNull?(l.openBlock(),l.createBlock(Ut,{key:2,disabled:"",text:"Все","data-testid":`${n.dataTestid}-Badges-All`},null,8,["data-testid"])):(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:3},l.renderList(u.value.filter((v,k)=>k<n.maxShowCount),(v,k)=>(l.openBlock(),l.createBlock(Ut,{key:v.value,type:v.type,disabled:"","data-testid":`${n.dataTestid}-Badges${k}`,text:v.label},null,8,["type","data-testid","text"]))),128)),n.maxShowCount<u.value.length?(l.openBlock(),l.createElementBlock("div",{key:4,class:"filter-yui-kit__counter","data-testid":`${n.dataTestid}-MaxShowCount-Counter`},[l.createTextVNode(" +"+l.toDisplayString(u.value.length-n.maxShowCount)+" ",1),l.createElementVNode("div",{class:"filter-yui-kit__counter-content","data-testid":`${n.dataTestid}-MaxShowCount-Content`},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(u.value.filter((v,k)=>k>=n.maxShowCount),(v,k)=>(l.openBlock(),l.createBlock(Ut,{key:v.value,type:v.type,disabled:"",text:v.label,"data-testid":`${n.dataTestid}-MaxShow-Badges${k}`},null,8,["type","text","data-testid"]))),128))],8,C7e)],8,M7e)):l.createCommentVNode("",!0),n.showClearButton&&u.value.length>0?(l.openBlock(),l.createElementBlock("button",{key:5,type:"button",class:"filter-yui-kit__close",onClick:l.withModifiers(h,["stop"]),"data-testid":`${n.dataTestid}-Filter-CloseButton`},[l.createVNode(we,{name:l.unref(se).crossSmall,"data-testid":`${n.dataTestid}-CloseButton-Icon`},null,8,["name","data-testid"])],8,x7e)):l.createCommentVNode("",!0)],10,v7e),i.isShow?(l.openBlock(),l.createElementBlock("div",{key:0,class:"filter-yui-kit__select-wrapper","data-testid":`${n.dataTestid}-Select-Wrapper`},[l.createElementVNode("ul",{class:"filter-yui-kit__select-list selected-yui-kit","data-testid":`${n.dataTestid}-Select-List`},[u.value.length?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("li",{key:0,class:"filter-yui-kit__select-item","data-testid":`${n.dataTestid}-Select-Item`},[l.createVNode(Ut,{disabled:"",text:"Все","data-testid":`${n.dataTestid}-Select-Badges`},null,8,["data-testid"])],8,T7e)),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(u.value,(v,k)=>(l.openBlock(),l.createElementBlock("li",{class:"filter-yui-kit__select-item",key:v.value,"data-testid":`${n.dataTestid}-Select-Item${k}`},[l.createVNode(Ut,{disabled:!0,choosed:!n.disallowNull&&v.chose,type:v.type,onClick:w=>f(v),text:v.label,"data-testid":`${n.dataTestid}-Select-Badges${k}`},null,8,["choosed","type","onClick","text","data-testid"])],8,P7e))),128))],8,_7e),l.createElementVNode("div",{class:"filter-yui-kit__select__divider","data-testid":`${n.dataTestid}-Select-Divider`},null,8,E7e),i.isShow?(l.openBlock(),l.createElementBlock("ul",{key:0,class:"filter-yui-kit__select-list","data-testid":`${n.dataTestid}-Select-List`},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(c.value,(v,k)=>(l.openBlock(),l.createElementBlock("li",{class:"filter-yui-kit__select-item",key:v.value,"data-testid":`${n.dataTestid}-Select-List${k}`},[l.createVNode(Ut,{disabled:!0,choosed:!1,type:v.type,text:v.label,"data-testid":`${n.dataTestid}-Select-Badges${k}`,onClick:w=>f(v)},null,8,["type","text","data-testid","onClick"])],8,D7e))),128)),e.disallowNull?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("li",{key:0,class:"filter-yui-kit__select-item","data-testid":`${n.dataTestid}-Select-Item`},[u.value.length?(l.openBlock(),l.createBlock(Ut,{key:0,disabled:"","data-testid":`${n.dataTestid}-Select-Badges`,text:"Все",onClick:h},null,8,["data-testid"])):l.createCommentVNode("",!0)],8,N7e))],8,A7e)):l.createCommentVNode("",!0)],8,S7e)):l.createCommentVNode("",!0)],8,w7e)),[[l.unref(vo),s,void 0,{bubble:!0}]])}}),L1=me(j7e,[["__scopeId","data-v-41d2f43b"]]),I7e=["data-testid"],W7e=["data-testid"],O7e=["data-testid"],z7e=["data-testid"],$1=me(l.defineComponent({__name:"CircularProgress",props:{percent:{},dataTestid:{default:"CircularProgress"}},setup(e){const t=e,n=()=>{const i=Math.min(Math.max(t.percent,0),100),r=i/100*360;if(i<=25)return`polygon(50% 50%, 50% 0%, calc(50% + 50% * cos(${r-90}deg)) 0,calc(50% + 50% * cos(${r-90}deg)) calc(50% + 50% * sin(${r-90}deg)), 50% 50%)`;if(i<=50)return`polygon(50% 50%, 50% 0%, 100% 0%, 100% calc(50% + 50% * sin(${r-90}deg)), calc(50% + 50% * cos(${r-90}deg)) calc(50% + 50% * sin(${r-90}deg)), 50% 50%)`;if(i<=75)return`polygon(50% 50%, 50% 0%, 100% 0%, 100% 100%,
|
|
1309
|
+
calc(50% + 50% * cos(${r-90}deg)) 100%, calc(50% + 50% * cos(${r-90}deg)) calc(50% + 50% * sin(${r-90}deg)), 50% 50%)`;if(i<=100)return`polygon(50% 50%, 50% 0%, 100% 0%, 100% 100%,0% 100%, 0% calc(50% + 50% * sin(${r-90}deg)), 50% 50%)`};return(i,r)=>t.percent<100?(l.openBlock(),l.createElementBlock("div",{key:0,class:"pie-chart","data-testid":`${t.dataTestid}-PieChart`},[l.createElementVNode("div",{class:"pie-chart-border",style:l.normalizeStyle({"border-color":t.percent<50?"#ef9b8f":"#ffcc00"}),"data-testid":`${t.dataTestid}-PieChart-Border`},[l.createElementVNode("div",{class:"sector",style:l.normalizeStyle({clipPath:n(),"background-color":t.percent<50?"#ef9b8f":"#ffcc00"}),"data-testid":`${t.dataTestid}-PieChart-Sector`},null,12,O7e)],12,W7e)],8,I7e)):(l.openBlock(),l.createElementBlock("svg",{key:1,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","data-testid":`${t.dataTestid}-Icon`,xmlns:"http://www.w3.org/2000/svg"},[...r[0]||(r[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,z7e))}}),[["__scopeId","data-v-03d46e7b"]]),L7e=["colspan","rowspan","data-testid"],Ko=me(l.defineComponent({name:"TableTh",__name:"TableTh",props:{colspan:{default:1},rowspan:{default:1},dataTestid:{default:"DataHeader"}},setup(e){const t=e;return(n,i)=>(l.openBlock(),l.createElementBlock("th",{colspan:e.colspan,rowspan:e.rowspan,"data-testid":t.dataTestid,class:"table-th"},[l.renderSlot(n.$slots,"default",{},void 0,!0)],8,L7e))}}),[["__scopeId","data-v-273b8b5e"]]),$7e=["data-testid"],xl=me(l.defineComponent({name:"HeadTableRow",__name:"HeadTableRow",props:{dataTestid:{default:"TableRow"}},setup(e){const t=e;return(n,i)=>(l.openBlock(),l.createElementBlock("tr",{class:"head-table-row","data-testid":t.dataTestid},[l.renderSlot(n.$slots,"default",{},void 0,!0)],8,$7e))}}),[["__scopeId","data-v-e226d64f"]]),x3=(e,t,n,i)=>{const r=l.ref(!1),a=l.ref(100);let o=0,s=0;const u=l.computed(()=>[{"scroll-wrapper__track_hide":a.value===100,"scroll-wrapper__track_drag":r.value}]),c=l.computed(()=>a.value<100),f=()=>{if(e.value){const w=e.value.clientWidth,M=e.value.scrollWidth;return w>=M?100:w/M*100}return 100},h=()=>{if(!e.value||!t.value||!n.value||!i.value)return;const{scrollLeft:w,scrollWidth:M,clientWidth:x}=e.value,_=M-x;if(_<=0)return;const S=w/_,N=i.value.clientWidth,T=n.value.clientWidth,I=N-T,L=S*I;requestAnimationFrame(()=>{t.value&&bt({"--scroll-bar-left-position":`${L}px`},t.value)})},g=w=>{!e.value||!t.value||(r.value=!0,o=w.clientX,s=e.value.scrollLeft,document.addEventListener("pointermove",p),document.addEventListener("pointerup",y,!0))},p=w=>{if(r.value&&e.value&&n.value){const M=w.clientX-o,x=(e.value.scrollWidth-e.value.clientWidth)/(e.value.clientWidth-n.value.clientWidth);e.value.scrollLeft=s+M*x,h()}},y=()=>{r.value=!1,document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",y,!0)};return{onDrag:p,onTrackClick:w=>{if(e.value&&n.value){const M=w.currentTarget.getBoundingClientRect(),x=w.clientX-M.left,_=n.value.clientWidth,S=M.width;let N=(x-_/2)*((e.value.scrollWidth-e.value.clientWidth)/(S-_));N=Math.max(0,Math.min(N,e.value.scrollWidth-e.value.clientWidth)),e.value.scrollLeft=N,h()}},startDrag:g,getPercentHorizontalView:f,changeBarPosition:h,isDragging:r,scrollHorizontalWidthPercent:a,setHorizontalBarWidth:()=>{if(!e.value||!t.value)return;const w=f();a.value=w,bt({"--scroll-horizontal-bar-width":`${w}%`},t.value)},horizontalTrackClass:u,isExistHorizontalTrack:c}},S3=(e,t,n,i)=>{const r=l.ref(!1),a=l.ref(100);let o=0,s=0;const u=l.computed(()=>[{"scroll-wrapper__track_hide":a.value===100,"scroll-wrapper__track_drag":r.value}]),c=l.computed(()=>a.value<100),f=()=>{if(e.value){const w=e.value.clientHeight,M=e.value.scrollHeight;if(w>=M)return 100;if(w<M)return w/M*100}return 100},h=()=>{if(!e.value||!t.value||!n.value||!i.value)return;const{scrollTop:w,scrollHeight:M,clientHeight:x}=e.value,_=M-x;if(_<=0)return;const S=w/_,N=i.value.clientHeight,T=n.value.clientHeight,I=N-T,L=S*I;requestAnimationFrame(()=>{t.value&&bt({"--scroll-bar-top-postion":`${L}px`},t.value)})},g=w=>{!e.value||!t.value||(r.value=!0,o=w.clientY,s=e.value.scrollTop,document.addEventListener("pointermove",p),document.addEventListener("pointerup",y))},p=w=>{if(r.value&&e.value&&n.value){const M=w.clientY-o,x=(e.value.scrollHeight-e.value.clientHeight)/(e.value.clientHeight-n.value.clientHeight);e.value.scrollTop=s+M*x,h()}},y=()=>{r.value=!1,document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",y)};return{onDrag:p,onTrackClick:w=>{if(e.value&&n.value){const M=w.currentTarget.getBoundingClientRect(),x=w.clientY-M.top,_=n.value.clientHeight,S=M.height;let N=(x-_/2)*((e.value.scrollHeight-e.value.clientHeight)/(S-_));N=Math.max(0,Math.min(N,e.value.scrollHeight-e.value.clientHeight)),e.value.scrollTop=N,h()}},startDrag:g,getProcentVerticalView:f,changeBarPosition:h,isDragging:r,scrollVerticalHeightProcent:a,setVerticalBarHeight:()=>{if(!e.value||!t.value)return;const w=f();a.value=w,bt({"--scroll-vertical-bar-height":`${w}%`},t.value)},verticalTrackClass:u,isExistVerticalTrack:c}},H7e={class:"scroll-wrapper__vertical-wrapper"},R7e={class:"scroll-wrapper__horizont-wrapper"},Sl=me(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(e,{expose:t,emit:n}){const i=n,r=l.ref(null),a=l.ref(null),o=l.ref(null),s=l.ref(null),u=l.ref(null),c=l.ref(null),{onTrackClick:f,startDrag:h,changeBarPosition:g,setVerticalBarHeight:p,verticalTrackClass:y,isExistVerticalTrack:v}=S3(r,a,s,o),{changeBarPosition:k,startDrag:w,onTrackClick:M,setHorizontalBarWidth:x,horizontalTrackClass:_,isExistHorizontalTrack:S}=x3(r,a,c,u),N=q=>{g(),k(),i("unmount-scroll",q)},T=()=>{requestAnimationFrame(()=>{I(),L()})},I=()=>{if(!r.value||!a.value)return;const q=getComputedStyle(a.value),Z=a.value.style.minHeight||q.minHeight,de=a.value.style.maxHeight||q.maxHeight,Ae=a.value.style.height;bt({"--scroll-wrapper-height":`${Ae}`,"--scroll-wrapper-max-height":`${de}`,"--scroll-wrapper-min-height":`${Z}`},a.value)},L=()=>{p(),x(),g(),k()},D=()=>{r.value&&r.value.addEventListener("scroll",N)},z=()=>{r.value&&(r.value.scrollTop=0)},H=()=>{r.value&&(r.value.scrollHeight<=r.value.clientHeight?i("unmount-paginate",!0):i("unmount-paginate",!1))},X=new MutationObserver(()=>{T(),H()}),re=new ResizeObserver(()=>{T(),H()}),ee=q=>{X.observe(q,{childList:!0,subtree:!0,attributes:!0}),re.observe(q)};return t({scrollToTop:z,setHeightSlot:I}),l.onMounted(()=>{T(),D(),a.value&&ee(a.value),o.value&&ee(o.value),window.addEventListener("resize",T),i("on-mounted")}),l.onUnmounted(()=>{window.removeEventListener("resize",T)}),(q,Z)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"scrollWrapperRef",ref:a,class:"scroll-wrapper"},[l.createElementVNode("div",H7e,[l.createElementVNode("div",R7e,[l.createElementVNode("div",{ref_key:"slotRef",ref:r,class:"scroll-wrapper__slot"},[l.renderSlot(q.$slots,"default",{},void 0,!0)],512),l.unref(S)||e.isShowHorizontalScroll?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"horizontTrackRef",ref:u,class:l.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_horizont",l.unref(_)]),onClick:Z[1]||(Z[1]=l.withModifiers((...de)=>l.unref(M)&&l.unref(M)(...de),["self","prevent","left"]))},[l.createElementVNode("div",{ref_key:"horizontBarRef",ref:c,class:"scroll-wrapper__bar",onPointerdown:Z[0]||(Z[0]=l.withModifiers((...de)=>l.unref(w)&&l.unref(w)(...de),["prevent","left"]))},null,544)],2)):l.createCommentVNode("",!0)]),l.unref(v)||e.isShowVerticalScroll?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"verticalTrackRef",ref:o,class:l.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_vertical",l.unref(y)]),onClick:Z[3]||(Z[3]=l.withModifiers((...de)=>l.unref(f)&&l.unref(f)(...de),["self","prevent","left"]))},[l.createElementVNode("div",{ref_key:"verticalBarRef",ref:s,class:"scroll-wrapper__bar",onPointerdown:Z[2]||(Z[2]=l.withModifiers((...de)=>l.unref(h)&&l.unref(h)(...de),["prevent","left"]))},null,544)],2)):l.createCommentVNode("",!0)])],512))}}),[["__scopeId","data-v-a4798f10"]]),B7e=["id","data-testid"],V7e=["id","data-testid"],F7e=["id","data-testid"],H1=me(l.defineComponent({name:"TableNew",__name:"Table",props:{tableId:{},search:{},tbodyId:{},theadId:{},columnCount:{},dataTestid:{default:"Table"},isShowVerticalScroll:{type:Boolean,default:!1},isShowHorizontalScroll:{type:Boolean,default:!1}},emits:["unmount-scroll","unmount-paginate"],setup(e,{expose:t,emit:n}){var x;const i=e,r=n,a=l.reactive({headHeight:0,maxColumnCount:0}),o=l.ref(null),s=l.ref(null),u=l.ref(null),c=l.ref(null),f=l.ref(null),h=_=>{r("unmount-scroll",_)},g=_=>r("unmount-paginate",_),p=()=>{if(!o.value||!f.value)return;const _=o.value.querySelector("thead");if(!_)return;const S=_.getBoundingClientRect().height;a.headHeight=S,bt({"--scroll-track-margin-top":`${S}px`},f.value.$el)},y=()=>{f.value&&f.value.scrollToTop()},v=()=>{if(f.value&&c.value){const _=getComputedStyle(f.value.$el),S=Number(_.minHeight.replace(/\D/g,""));if(S&&S>0)return;bt({"min-height":`${a.headHeight+108}px`},f.value.$el)}},k=()=>{let _=1;if(s.value){for(let S=0;S<s.value.children.length;S++)_=Math.max(s.value.children[S].children.length,_);a.maxColumnCount=_}},w=new MutationObserver(()=>{k()}),M=new ResizeObserver(()=>{p()});return t({scrollToTop:y,setHeightSlot:(x=f.value)==null?void 0:x.setHeightSlot,tbodyRef:u,tableRef:o,theadRef:s}),l.onMounted(()=>{p(),k(),window.addEventListener("resize",p),o.value&&M.observe(o.value),s.value&&w.observe(s.value,{childList:!0,subtree:!0}),v()}),(_,S)=>(l.openBlock(),l.createBlock(Sl,{ref_key:"scrollWrapperRef",ref:f,class:"table",onUnmountScroll:h,onUnmountPaginate:g,"is-show-vertical-scroll":i.isShowVerticalScroll,"is-show-horizontal-scroll":i.isShowHorizontalScroll,"data-testid":`${i.dataTestid}-ScrollWrapper`},{default:l.withCtx(()=>[l.createElementVNode("table",{ref_key:"tableRef",ref:o,id:i.tableId,class:"table__table","data-testid":`${i.dataTestid}`},[l.renderSlot(_.$slots,"default",{},()=>{var N;return[l.createElementVNode("colgroup",null,[l.renderSlot(_.$slots,"colspan",{},void 0,!0)]),_.$slots.head?(l.openBlock(),l.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:s,id:i.theadId,class:"table__head","data-testid":`${i.dataTestid}-Thead`},[l.renderSlot(_.$slots,"head",{},void 0,!0),_.$slots.search?(l.openBlock(),l.createBlock(xl,{key:0,class:"table__search-tr",id:(N=i.search)==null?void 0:N.rowId,ref_key:"searchRowRef",ref:c,"data-testid":`${i.dataTestid}-Search-Row`},{default:l.withCtx(()=>{var T;return[l.createVNode(Ko,{colspan:i.columnCount||a.maxColumnCount,class:"table__search-th",id:(T=i.search)==null?void 0:T.headId,"data-testid":`${i.dataTestid}-SearchRow-Search`},{default:l.withCtx(()=>[l.renderSlot(_.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","id","data-testid"])]}),_:3},8,["id","data-testid"])):l.createCommentVNode("",!0)],8,V7e)):l.createCommentVNode("",!0),l.renderSlot(_.$slots,"body-group",{},()=>[_.$slots.body?(l.openBlock(),l.createElementBlock("tbody",{key:0,id:i.tbodyId,ref_key:"tbodyRef",ref:u,class:"table__body","data-testid":`${i.dataTestid}-Tbody`},[l.renderSlot(_.$slots,"body",{},void 0,!0)],8,F7e)):l.createCommentVNode("",!0)],!0)]},!0)],8,B7e)]),_:3},8,["is-show-vertical-scroll","is-show-horizontal-scroll","data-testid"]))}}),[["__scopeId","data-v-58c866b5"]]),U7e=["data-testid"],Qd=me(l.defineComponent({name:"TableRow",__name:"TableRow",props:{type:{default:"default"},dataTestid:{}},setup(e){const t=e,n=l.computed(()=>[{"table-row_active":t.type==="selected"}]);return(i,r)=>(l.openBlock(),l.createElementBlock("tr",{class:l.normalizeClass(["table-row",n.value]),"data-testid":t.dataTestid},[l.renderSlot(i.$slots,"default",{},void 0,!0)],10,U7e))}}),[["__scopeId","data-v-a57d78ee"]]),Y7e=["rowspan","colspan","data-testid"],Jd=l.defineComponent({name:"TableTd",__name:"TableTd",props:{colspan:{default:1},rowspan:{default:1},dataTestid:{default:"DataCell"}},setup(e){const t=e;return(n,i)=>(l.openBlock(),l.createElementBlock("td",{rowspan:e.rowspan,colspan:e.colspan,class:"table-td","data-testid":t.dataTestid},[l.renderSlot(n.$slots,"default")],8,Y7e))}}),R1=me(l.defineComponent({name:"SectionTableRow",__name:"SectionTableRow",props:{colspan:{},dataTestid:{default:"SectionTableRow"}},setup(e){const t=e;return(n,i)=>(l.openBlock(),l.createBlock(Qd,{class:"section-table-row","data-testid":t.dataTestid},{default:l.withCtx(()=>[l.createVNode(Jd,{colspan:e.colspan,class:"section-table-row__td","data-testid":`${t.dataTestid}-DataCell`},{default:l.withCtx(()=>[l.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"]))}}),[["__scopeId","data-v-e4d9fcd4"]]),X7e=["disabled","name","value","data-testid"],B1=me(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(e){const t=e,n=l.useModel(e,"modelValue");return(i,r)=>l.withDirectives((l.openBlock(),l.createElementBlock("input",{"onUpdate:modelValue":r[0]||(r[0]=a=>n.value=a),type:"radio",disabled:e.disabled,name:e.name,value:e.value,class:"radio","data-testid":t.dataTestid},null,8,X7e)),[[l.vModelRadio,n.value]])}}),[["__scopeId","data-v-5fca4dd8"]]),q7e=["data-testid"],G7e=["data-testid"],_3=me(l.defineComponent({name:"ChoosenMiniOptions",__name:"ChoosenMiniOptions",props:{options:{},dataTestid:{default:"ChoosenMiniOptions"}},emits:["remove"],setup(e,{emit:t}){const n=e,i=t,r=a=>{i("remove",a)};return(a,o)=>(l.openBlock(),l.createElementBlock("div",{class:"choosen-mini-options","data-testid":n.dataTestid},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.options,(s,u)=>(l.openBlock(),l.createElementBlock("div",{key:s.key,class:"choosen-mini-options__option","data-testid":`${n.dataTestid}-Option-Item${u}`},[l.createVNode(Ut,{"data-testid":`${n.dataTestid}-Badge${u}`,type:l.unref(nt).blue,text:l.unref(Lh)(s)?s.hint:s.value,class:"choosen-mini-options__badges",disabled:""},null,8,["data-testid","type","text"]),l.createVNode(we,{"data-testid":`${n.dataTestid}-Icon${u}`,name:l.unref(se).crossLarge,width:10,height:10,class:"choosen-mini-options__cross",onClick:c=>r(s.key)},null,8,["data-testid","name","onClick"])],8,G7e))),128))],8,q7e))}}),[["__scopeId","data-v-b99473c0"]]),K7e=["data-testid"],Q7e=["data-testid"],J7e=["data-testid"],Z7e=["data-testid"],eCe=["data-testid"],tCe=["data-testid"],V1=me(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},isOpened:{type:Boolean,default:!1},tooltipPosition:{default:"top-center"},onUnmountPagination:{},defaultOption:{default:"Выберите значение"},class:{},disabled:{type:Boolean},dataTestid:{default:"BaseFilter"}},{modelValue:{},modelModifiers:{}}),emits:l.mergeModels(["change","unmount-open","unmount-search","unmount-search-enter","unmount-pagination"],["update:modelValue"]),setup(e,{emit:t}){const n=e,i=l.reactive({isHovered:!1}),r=t,a=l.ref(null),o=l.ref(null),s=l.useModel(e,"modelValue"),u=l.ref(n.isOpened);l.watch(u,()=>r("unmount-open",u.value)),l.watch(()=>n.isOpened,()=>{u.value=n.isOpened}),l.watch(()=>n.onUnmountPagination,()=>{L()});const c=l.ref(""),f=l.computed(()=>{let D=[];return c.value?(Hs(n.options)?D=n.options.filter(z=>{var H;return z.value.toLowerCase().includes(c.value.toLowerCase())||((H=z==null?void 0:z.hint)==null?void 0:H.toLowerCase().includes(c.value.toLowerCase()))}):D=n.options.filter(z=>z.value.toLowerCase().includes(c.value.toLowerCase())),D):(Hs(n.options),D=n.options,D)}),h=l.computed(()=>{var z;return((z=n.options.find(H=>Ri.isArray(s.value)?s.value.includes(H.key):H.key===String(s.value)))==null?void 0:z.value)||n.defaultOption}),g=l.computed(()=>n.options.filter(D=>Ri.isArray(s.value)?s.value.includes(D.key)&&D.value!==h.value:D.key===String(s.value))),p=l.computed(()=>n.options.filter(D=>Ri.isArray(s.value)?s.value.includes(D.key)&&D.value===h.value:D.key===String(s.value))),y=l.computed(()=>{var H,X,re;const D=n.options;let z;return Ri.isArray(s.value)?Hs(D)?z=(H=D.find(ee=>ee.value===h.value))==null?void 0:H.hint:z=(X=D.find(ee=>ee.value===h.value))==null?void 0:X.value:z=(re=D.find(ee=>ee.key===String(s.value)))==null?void 0:re.value,z||""}),v=()=>{i.isHovered=!0},k=()=>{i.isHovered=!1},w=l.computed(()=>{var D;return Hs(n.options)?i.isHovered&&!!y.value:((D=a.value)==null?void 0:D.isSpanOverflow)||!1}),M=l.computed(()=>Ri.isArray(s.value)?n.isPosibleToClear&&s.value.length>0:n.isPosibleToClear&&s.value),x=l.computed(()=>Ri.isArray(s.value)&&s.value.length>1),_=l.computed(()=>Ri.isArray(s.value)?s.value.length:null),S=async D=>{if(Ri.isArray(s.value))s.value.includes(D)?s.value=s.value.filter(z=>z!==D):s.value=[...s.value,D];else{let z=n.options.find(H=>H.key===D);!z&&Hs(n.options)&&(z=n.options.find(H=>H.hint===D)),s.value=(z==null?void 0:z.key)||"",u.value=!1}await l.nextTick(),r("change",String(s.value))},N=D=>{u.value=D},T=async()=>{Ri.isArray(s.value)?s.value=[]:s.value="",await l.nextTick(),r("change",s.value)},I=new IntersectionObserver(D=>{D.forEach(z=>{z.isIntersecting&&r("unmount-pagination")})}),L=()=>{o.value&&n.onUnmountPagination&&(I.unobserve(o.value),I.observe(o.value))};return l.onMounted(()=>{L()}),l.onUnmounted(()=>{I.disconnect()}),(D,z)=>(l.openBlock(),l.createBlock(ko,{onChange:N,"is-opened":u.value,class:l.normalizeClass(n.class),"header-classes":"filter__header","options-classes":"filter__options","data-testid":n.dataTestid},{header:l.withCtx(()=>[l.createElementVNode("span",{class:l.normalizeClass(["filter__header-title",{"filter__header-title__active":u.value}]),"data-testid":`${n.dataTestid}-Title`},l.toDisplayString(e.title),11,K7e),l.createVNode(Cl,{position:e.tooltipPosition,type:"blue","is-can-show":w.value&&!(x.value&&e.isShowMiniOptions),hint:y.value,"hint-gap":28,class:"filter__header-tooltip","data-testid":`${n.dataTestid}-Tooltip`},{default:l.withCtx(()=>[l.createVNode(Ut,{ref_key:"badgesRef",ref:a,type:h.value===n.defaultOption?l.unref(nt).default:l.unref(nt).blue,class:"filter__options-badge","data-testid":`${n.dataTestid}-Badge`,text:h.value,onMouseenter:v,onMouseleave:k,disabled:""},null,8,["type","data-testid","text"]),x.value&&e.isShowMiniOptions?(l.openBlock(),l.createElementBlock("div",{key:0,class:"filter__values","data-testid":`${n.dataTestid}-Filter-Value`},[l.createVNode(_3,{"data-testid":`${n.dataTestid}-Filter-Value-MiniOptions`,onClick:z[0]||(z[0]=l.withModifiers(()=>{},["stop"])),options:p.value,onRemove:S},null,8,["data-testid","options"])],8,Q7e)):l.createCommentVNode("",!0)]),_:1},8,["position","is-can-show","hint","data-testid"]),_.value&&_.value>1?(l.openBlock(),l.createElementBlock("span",{key:0,class:"filter__count","data-testid":`${n.dataTestid}-Filter-Count`},[l.createTextVNode(" +"+l.toDisplayString(_.value-1)+" ",1),x.value?(l.openBlock(),l.createElementBlock("div",{key:0,class:"filter__values","data-testid":`${n.dataTestid}-Filter-Values`},[l.createVNode(_3,{onClick:z[1]||(z[1]=l.withModifiers(()=>{},["stop"])),options:g.value,onRemove:S,"data-testid":`${n.dataTestid}-MiniOptions`},null,8,["options","data-testid"])],8,Z7e)):l.createCommentVNode("",!0)],8,J7e)):l.createCommentVNode("",!0),M.value?(l.openBlock(),l.createElementBlock("span",{key:1,class:"filter__cross",onClick:l.withModifiers(T,["stop"]),"data-testid":`${n.dataTestid}-Filter-Cross`},[l.createVNode(we,{name:l.unref(se).crossLarge,width:16,height:16},null,8,["name"])],8,eCe)):l.createCommentVNode("",!0)]),options:l.withCtx(()=>[e.isSearch?(l.openBlock(),l.createBlock(yl,{key:0,modelValue:c.value,"onUpdate:modelValue":z[2]||(z[2]=H=>c.value=H),"show-history":!1,"data-testid":`${n.dataTestid}-Search`,onInput:z[3]||(z[3]=H=>D.$emit("unmount-search",H)),onEnter:z[4]||(z[4]=H=>D.$emit("unmount-search-enter",H))},null,8,["modelValue","data-testid"])):l.createCommentVNode("",!0),l.createVNode($h,{"data-testid":`${n.dataTestid}-Options`,class:"filter__options-option",options:f.value,"default-option":h.value,onChange:S},{default:l.withCtx(()=>[l.createElementVNode("li",{class:"filter__options-underline","data-testid":`${n.dataTestid}-Underline`},[...z[5]||(z[5]=[l.createElementVNode("hr",{class:"filter__options-underline-hr"},null,-1)])],8,tCe)]),_:1},8,["data-testid","options","default-option"]),l.withDirectives(l.createElementVNode("div",{ref_key:"lastOptionRef",ref:o,class:"filter__last-option"},null,512),[[l.vShow,e.onUnmountPagination]])]),_:1},8,["is-opened","class","data-testid"]))}}),[["__scopeId","data-v-0b671aa1"]]),nCe=["data-testid"],Zd=me(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(e,{emit:t}){const n=e,i=t,r=l.useModel(e,"modelValue"),a=l.ref(null);l.watch(r,()=>{s()});const o=()=>(r.value-n.min)/(n.max-n.min)*100,s=()=>{requestAnimationFrame(()=>{a.value&&bt({"--progress":o()+"%"},a.value)})},u=f=>{const h=f.target;h&&i("unmount-change",Number(h.value))},c=f=>{const h=f.target;h&&i("unmount-change",Number(h.value))};return l.onMounted(()=>{s()}),(f,h)=>l.withDirectives((l.openBlock(),l.createElementBlock("input",l.mergeProps({ref_key:"input",ref:a,type:"range"},n,{class:"range","onUpdate:modelValue":h[0]||(h[0]=g=>r.value=g),onChange:u,onInput:c,"data-testid":n.dataTestid}),null,16,nCe)),[[l.vModelText,r.value]])}}),[["__scopeId","data-v-4c8abd39"]]),iCe=["id","data-testid"],rCe=["data-testid"],aCe=["data-testid"],F1=me(l.defineComponent({name:"TableNew",__name:"TableNew",props:{tableId:{},search:{},tbodyId:{},theadId:{},columnCount:{},dataTestid:{default:"Table"},isShowVerticalScroll:{type:Boolean,default:!1},isShowHorizontalScroll:{type:Boolean,default:!1}},emits:["unmount-scroll","unmount-paginate"],setup(e,{expose:t,emit:n}){var M;const i=e,r=n,a=l.reactive({headHeight:0,maxColumnCount:0}),o=l.ref(null),s=l.ref(null),u=l.ref(null),c=l.ref(null),f=l.ref(null),h=x=>{r("unmount-scroll",x)},g=()=>{if(!o.value||!f.value)return;const x=o.value.querySelector("thead");if(!x)return;const _=x.getBoundingClientRect().height;a.headHeight=_,bt({"--scroll-track-margin-top":`${_}px`},f.value.$el)},p=()=>{f.value&&f.value.scrollToTop()},y=()=>{if(f.value&&c.value){const x=getComputedStyle(f.value.$el),_=Number(x.minHeight.replace(/\D/g,""));if(_&&_>0)return;bt({"min-height":`${a.headHeight+108}px`},f.value.$el)}},v=()=>{let x=1;if(s.value){for(let _=0;_<s.value.children.length;_++)x=Math.max(s.value.children[_].children.length,x);a.maxColumnCount=x}},k=new MutationObserver(()=>{v()}),w=new ResizeObserver(()=>{g()});return t({scrollToTop:p,setHeightSlot:(M=f.value)==null?void 0:M.setHeightSlot,tbodyRef:u,tableRef:o,theadRef:s}),l.onMounted(()=>{g(),v(),window.addEventListener("resize",g),o.value&&w.observe(o.value),s.value&&k.observe(s.value,{childList:!0,subtree:!0}),y()}),(x,_)=>(l.openBlock(),l.createBlock(Sl,{ref_key:"scrollWrapperRef",ref:f,class:"table",onUnmountScroll:h,"is-show-vertical-scroll":i.isShowVerticalScroll,"is-show-horizontal-scroll":i.isShowHorizontalScroll,"data-testid":`${i.dataTestid}-ScrollWrapper`},{default:l.withCtx(()=>[l.createElementVNode("table",{ref_key:"tableRef",ref:o,id:i.tableId,class:"table__table","data-testid":`${i.dataTestid}`},[l.renderSlot(x.$slots,"default",{},()=>[l.createElementVNode("colgroup",null,[l.renderSlot(x.$slots,"colspan",{},void 0,!0)]),x.$slots.head?(l.openBlock(),l.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:s,class:"table__head","data-testid":`${i.dataTestid}-Thead`},[l.renderSlot(x.$slots,"head",{},void 0,!0),x.$slots.search?(l.openBlock(),l.createBlock(xl,{key:0,class:"table__search-tr",ref_key:"searchRowRef",ref:c,"data-testid":`${i.dataTestid}-Search-Row`},{default:l.withCtx(()=>[l.createVNode(Ko,{colspan:a.maxColumnCount,class:"table__search-th","data-testid":`${i.dataTestid}-SearchRow-Search`},{default:l.withCtx(()=>[l.renderSlot(x.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"])):l.createCommentVNode("",!0)],8,rCe)):l.createCommentVNode("",!0),l.renderSlot(x.$slots,"body-group",{},()=>[x.$slots.body?(l.openBlock(),l.createElementBlock("tbody",{key:0,ref_key:"tbodyRef",ref:u,class:"table__body","data-testid":`${i.dataTestid}-Tbody`},[l.renderSlot(x.$slots,"body",{},void 0,!0)],8,aCe)):l.createCommentVNode("",!0)],!0)],!0)],8,iCe)]),_:3},8,["is-show-vertical-scroll","is-show-horizontal-scroll","data-testid"]))}}),[["__scopeId","data-v-7bc532c5"]]),oCe=["data-testid"],U1=me(l.defineComponent({name:"TableRow",__name:"TableRowNew",props:{type:{default:"default"},dataTestid:{}},setup(e){const t=e,n=l.computed(()=>[{"table-row_active":t.type==="selected"}]);return(i,r)=>(l.openBlock(),l.createElementBlock("tr",{class:l.normalizeClass(["table-row",n.value]),"data-testid":t.dataTestid},[l.renderSlot(i.$slots,"default",{},void 0,!0)],10,oCe))}}),[["__scopeId","data-v-a1577458"]]),sCe=["data-testid"],ec=me(l.defineComponent({name:"HeadTableRow",__name:"HeadTableRowNew",props:{dataTestid:{default:"TableRow"}},setup(e){const t=e;return(n,i)=>(l.openBlock(),l.createElementBlock("tr",{class:"head-table-row","data-testid":t.dataTestid},[l.renderSlot(n.$slots,"default",{},void 0,!0)],8,sCe))}}),[["__scopeId","data-v-9e5765d8"]]),lCe={class:"scroll-wrapper__vertical-wrapper"},uCe={class:"scroll-wrapper__horizont-wrapper"},dCe=me(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(e,{expose:t,emit:n}){const i=n,r=l.ref(null),a=l.ref(null),o=l.ref(null),s=l.ref(null),u=l.ref(null),c=l.ref(null),{onTrackClick:f,startDrag:h,changeBarPosition:g,setVerticalBarHeight:p,verticalTrackClass:y,isExistVerticalTrack:v}=S3(r,a,s,o),{changeBarPosition:k,startDrag:w,onTrackClick:M,setHorizontalBarWidth:x,horizontalTrackClass:_,isExistHorizontalTrack:S}=x3(r,a,c,u),N=ee=>{g(),k(),i("unmount-scroll",ee)},T=()=>{requestAnimationFrame(()=>{I(),L()})},I=()=>{if(!r.value||!a.value)return;const ee=getComputedStyle(a.value),q=a.value.style.minHeight||ee.minHeight,Z=a.value.style.maxHeight||ee.maxHeight,de=a.value.style.height;bt({"--scroll-wrapper-height":`${de}`,"--scroll-wrapper-max-height":`${Z}`,"--scroll-wrapper-min-height":`${q}`},a.value)},L=()=>{p(),x(),g(),k()},D=()=>{r.value&&r.value.addEventListener("scroll",N)},z=()=>{r.value&&(r.value.scrollTop=0)},H=new MutationObserver(()=>{T()}),X=new ResizeObserver(()=>{T()}),re=ee=>{H.observe(ee,{childList:!0,subtree:!0,attributes:!0}),X.observe(ee)};return t({scrollToTop:z,setHeightSlot:I}),l.onMounted(()=>{T(),D(),a.value&&re(a.value),o.value&&re(o.value),window.addEventListener("resize",T),i("on-mounted")}),l.onUnmounted(()=>{window.removeEventListener("resize",T)}),(ee,q)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"scrollWrapperRef",ref:a,class:"scroll-wrapper"},[l.createElementVNode("div",lCe,[l.createElementVNode("div",uCe,[l.createElementVNode("div",{ref_key:"slotRef",ref:r,class:"scroll-wrapper__slot"},[l.renderSlot(ee.$slots,"default",{},void 0,!0)],512),l.unref(S)||e.isShowHorizontalScroll?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"horizontTrackRef",ref:u,class:l.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_horizont",l.unref(_)]),onClick:q[1]||(q[1]=l.withModifiers((...Z)=>l.unref(M)&&l.unref(M)(...Z),["prevent","left"]))},[l.createElementVNode("div",{ref_key:"horizontBarRef",ref:c,class:"scroll-wrapper__bar",onMousedown:q[0]||(q[0]=l.withModifiers((...Z)=>l.unref(w)&&l.unref(w)(...Z),["prevent","left"]))},null,544)],2)):l.createCommentVNode("",!0)]),l.unref(v)||e.isShowVerticalScroll?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"verticalTrackRef",ref:o,class:l.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_vertical",l.unref(y)]),onClick:q[3]||(q[3]=l.withModifiers((...Z)=>l.unref(f)&&l.unref(f)(...Z),["prevent","left"]))},[l.createElementVNode("div",{ref_key:"verticalBarRef",ref:s,class:"scroll-wrapper__bar",onMousedown:q[2]||(q[2]=l.withModifiers((...Z)=>l.unref(h)&&l.unref(h)(...Z),["prevent","left"]))},null,544)],2)):l.createCommentVNode("",!0)])],512))}}),[["__scopeId","data-v-acb87209"]]),cCe=["data-testid"],fCe=["data-testid"],hCe=["data-testid"],Y1=me(l.defineComponent({name:"TableSimple",__name:"TableSimple",props:{dataTestid:{default:"TableSimple"}},setup(e,{expose:t}){const n=e,i=l.ref(null),r=l.ref(null),a=l.ref(null),o=l.ref(null),s=l.computed(()=>{let u=1;if(r.value)for(let c=0;c<r.value.children.length;c++)u=Math.max(r.value.children[c].children.length,u);return u});return t({tbodyRef:a,tableRef:i,theadRef:r}),(u,c)=>(l.openBlock(),l.createElementBlock("table",{ref_key:"tableRef",ref:i,class:"simple-table-yui-kit","data-testid":`${n.dataTestid}`},[l.renderSlot(u.$slots,"default",{},()=>[l.renderSlot(u.$slots,"colspan",{},void 0,!0),u.$slots.head?(l.openBlock(),l.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:r,class:"simple-table-yui-kit__head","data-testid":`${n.dataTestid}-Thead`},[l.renderSlot(u.$slots,"head",{},void 0,!0),u.$slots.search?(l.openBlock(),l.createBlock(ec,{key:0,class:"table-new-yui-kit__search",ref_key:"searchRowRef",ref:o,"data-testid":`${n.dataTestid}-Search-Row`},{default:l.withCtx(()=>[l.createVNode(Ko,{colspan:s.value,class:"table-new-yui-kit__th","data-testid":`${n.dataTestid}-SearchRow-Search`},{default:l.withCtx(()=>[l.renderSlot(u.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"])):l.createCommentVNode("",!0)],8,fCe)):l.createCommentVNode("",!0),l.renderSlot(u.$slots,"body-group",{},()=>[u.$slots.body?(l.openBlock(),l.createElementBlock("tbody",{key:0,ref_key:"tbodyRef",ref:a,class:"simple-table-yui-kit__body","data-testid":`${n.dataTestid}-Tbody`},[l.renderSlot(u.$slots,"body",{},void 0,!0)],8,hCe)):l.createCommentVNode("",!0)],!0)],!0)],8,cCe))}}),[["__scopeId","data-v-532e43bc"]]),mCe=["data-testid"],pCe=["data-testid"],gCe=["onClick","data-testid"],yCe=["data-testid"],X1=me(l.defineComponent({name:"Tabs",__name:"Tabs",props:{defaultActiveTabId:{},tabCount:{},dataTestid:{default:"Tabs"}},emits:["unmount-tab"],setup(e,{emit:t}){const n=e,i=t,r=l.reactive({activeTab:1}),a=s=>Array.from({length:s},(u,c)=>c+1);l.watch(()=>n.defaultActiveTabId,()=>{n.defaultActiveTabId&&(r.activeTab=n.defaultActiveTabId)},{immediate:!0});const o=s=>{r.activeTab=s,i("unmount-tab",s)};return(s,u)=>(l.openBlock(),l.createElementBlock("div",{"data-testid":n.dataTestid,class:"tabs"},[l.createElementVNode("nav",{class:"tabs__navigation","data-testid":`${n.dataTestid}-Navigation`},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a(n.tabCount),c=>(l.openBlock(),l.createElementBlock("button",{key:c,onClick:f=>o(c),class:l.normalizeClass(["tabs__navigation-button",{active:r.activeTab===c}]),"data-testid":`${n.dataTestid}-Navigation-Button`},[l.renderSlot(s.$slots,`header${c}`,{},void 0,!0)],10,gCe))),128))],8,pCe),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a(n.tabCount),c=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:c},[r.activeTab===c?(l.openBlock(),l.createElementBlock("article",{key:0,"data-testid":`${n.dataTestid}-Content`,class:"tabs__navigation-content"},[l.renderSlot(s.$slots,`tab${c}`,{},void 0,!0)],8,yCe)):l.createCommentVNode("",!0)],64))),128))],8,mCe))}}),[["__scopeId","data-v-53853178"]]);function $t(e){this.content=e}$t.prototype={constructor:$t,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var i=n&&n!=e?this.remove(n):this,r=i.find(e),a=i.content.slice();return r==-1?a.push(n||e,t):(a[r+1]=t,n&&(a[r]=n)),new $t(a)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new $t(n)},addToStart:function(e,t){return new $t([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new $t(n)},addBefore:function(e,t,n){var i=this.remove(t),r=i.content.slice(),a=i.find(e);return r.splice(a==-1?r.length:a,0,t,n),new $t(r)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=$t.from(e),e.size?new $t(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=$t.from(e),e.size?new $t(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=$t.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},$t.from=function(e){if(e instanceof $t)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new $t(t)};function T3(e,t,n){for(let i=0;;i++){if(i==e.childCount||i==t.childCount)return e.childCount==t.childCount?null:n;let r=e.child(i),a=t.child(i);if(r==a){n+=r.nodeSize;continue}if(!r.sameMarkup(a))return n;if(r.isText&&r.text!=a.text){for(let o=0;r.text[o]==a.text[o];o++)n++;return n}if(r.content.size||a.content.size){let o=T3(r.content,a.content,n+1);if(o!=null)return o}n+=r.nodeSize}}function P3(e,t,n,i){for(let r=e.childCount,a=t.childCount;;){if(r==0||a==0)return r==a?null:{a:n,b:i};let o=e.child(--r),s=t.child(--a),u=o.nodeSize;if(o==s){n-=u,i-=u;continue}if(!o.sameMarkup(s))return{a:n,b:i};if(o.isText&&o.text!=s.text){let c=0,f=Math.min(o.text.length,s.text.length);for(;c<f&&o.text[o.text.length-c-1]==s.text[s.text.length-c-1];)c++,n--,i--;return{a:n,b:i}}if(o.content.size||s.content.size){let c=P3(o.content,s.content,n-1,i-1);if(c)return c}n-=u,i-=u}}class ne{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let i=0;i<t.length;i++)this.size+=t[i].nodeSize}nodesBetween(t,n,i,r=0,a){for(let o=0,s=0;s<n;o++){let u=this.content[o],c=s+u.nodeSize;if(c>t&&i(u,r+s,a||null,o)!==!1&&u.content.size){let f=s+1;u.nodesBetween(Math.max(0,t-f),Math.min(u.content.size,n-f),i,r+f)}s=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,i,r){let a="",o=!0;return this.nodesBetween(t,n,(s,u)=>{let c=s.isText?s.text.slice(Math.max(t,u)-u,n-u):s.isLeaf?r?typeof r=="function"?r(s):r:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&c||s.isTextblock)&&i&&(o?o=!1:a+=i),a+=c},0),a}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,i=t.firstChild,r=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(i)&&(r[r.length-1]=n.withText(n.text+i.text),a=1);a<t.content.length;a++)r.push(t.content[a]);return new ne(r,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let i=[],r=0;if(n>t)for(let a=0,o=0;o<n;a++){let s=this.content[a],u=o+s.nodeSize;u>t&&((o<t||u>n)&&(s.isText?s=s.cut(Math.max(0,t-o),Math.min(s.text.length,n-o)):s=s.cut(Math.max(0,t-o-1),Math.min(s.content.size,n-o-1))),i.push(s),r+=s.nodeSize),o=u}return new ne(i,r)}cutByIndex(t,n){return t==n?ne.empty:t==0&&n==this.content.length?this:new ne(this.content.slice(t,n))}replaceChild(t,n){let i=this.content[t];if(i==n)return this;let r=this.content.slice(),a=this.size+n.nodeSize-i.nodeSize;return r[t]=n,new ne(r,a)}addToStart(t){return new ne([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new ne(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,i=0;n<this.content.length;n++){let r=this.content[n];t(r,i,n),i+=r.nodeSize}}findDiffStart(t,n=0){return T3(this,t,n)}findDiffEnd(t,n=this.size,i=t.size){return P3(this,t,n,i)}findIndex(t){if(t==0)return tc(0,t);if(t==this.size)return tc(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,i=0;;n++){let r=this.child(n),a=i+r.nodeSize;if(a>=t)return a==t?tc(n+1,a):tc(n,i);i=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return ne.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new ne(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return ne.empty;let n,i=0;for(let r=0;r<t.length;r++){let a=t[r];i+=a.nodeSize,r&&a.isText&&t[r-1].sameMarkup(a)?(n||(n=t.slice(0,r)),n[n.length-1]=a.withText(n[n.length-1].text+a.text)):n&&n.push(a)}return new ne(n||t,i)}static from(t){if(!t)return ne.empty;if(t instanceof ne)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new ne([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}ne.empty=new ne([],0);const q1={index:0,offset:0};function tc(e,t){return q1.index=e,q1.offset=t,q1}function nc(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++)if(!nc(e[i],t[i]))return!1}else{for(let i in e)if(!(i in t)||!nc(e[i],t[i]))return!1;for(let i in t)if(!(i in e))return!1}return!0}let Ge=class gy{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,i=!1;for(let r=0;r<t.length;r++){let a=t[r];if(this.eq(a))return t;if(this.type.excludes(a.type))n||(n=t.slice(0,r));else{if(a.type.excludes(this.type))return t;!i&&a.type.rank>this.type.rank&&(n||(n=t.slice(0,r)),n.push(this),i=!0),n&&n.push(a)}}return n||(n=t.slice()),i||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&nc(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let i=t.marks[n.type];if(!i)throw new RangeError(`There is no mark type ${n.type} in this schema`);let r=i.create(n.attrs);return i.checkAttrs(r.attrs),r}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let i=0;i<t.length;i++)if(!t[i].eq(n[i]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return gy.none;if(t instanceof gy)return[t];let n=t.slice();return n.sort((i,r)=>i.type.rank-r.type.rank),n}};Ge.none=[];class ic extends Error{}class ue{constructor(t,n,i){this.content=t,this.openStart=n,this.openEnd=i}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let i=A3(this.content,t+this.openStart,n);return i&&new ue(i,this.openStart,this.openEnd)}removeBetween(t,n){return new ue(E3(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return ue.empty;let i=n.openStart||0,r=n.openEnd||0;if(typeof i!="number"||typeof r!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ue(ne.fromJSON(t,n.content),i,r)}static maxOpen(t,n=!0){let i=0,r=0;for(let a=t.firstChild;a&&!a.isLeaf&&(n||!a.type.spec.isolating);a=a.firstChild)i++;for(let a=t.lastChild;a&&!a.isLeaf&&(n||!a.type.spec.isolating);a=a.lastChild)r++;return new ue(t,i,r)}}ue.empty=new ue(ne.empty,0,0);function E3(e,t,n){let{index:i,offset:r}=e.findIndex(t),a=e.maybeChild(i),{index:o,offset:s}=e.findIndex(n);if(r==t||a.isText){if(s!=n&&!e.child(o).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(i!=o)throw new RangeError("Removing non-flat range");return e.replaceChild(i,a.copy(E3(a.content,t-r-1,n-r-1)))}function A3(e,t,n,i){let{index:r,offset:a}=e.findIndex(t),o=e.maybeChild(r);if(a==t||o.isText)return i&&!i.canReplace(r,r,n)?null:e.cut(0,t).append(n).append(e.cut(t));let s=A3(o.content,t-a-1,n,o);return s&&e.replaceChild(r,o.copy(s))}function bCe(e,t,n){if(n.openStart>e.depth)throw new ic("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new ic("Inconsistent open depths");return D3(e,t,n,0)}function D3(e,t,n,i){let r=e.index(i),a=e.node(i);if(r==t.index(i)&&i<e.depth-n.openStart){let o=D3(e,t,n,i+1);return a.copy(a.content.replaceChild(r,o))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==i&&t.depth==i){let o=e.parent,s=o.content;return Fa(o,s.cut(0,e.parentOffset).append(n.content).append(s.cut(t.parentOffset)))}else{let{start:o,end:s}=wCe(n,e);return Fa(a,j3(e,o,s,t,i))}else return Fa(a,rc(e,t,i))}function N3(e,t){if(!t.type.compatibleContent(e.type))throw new ic("Cannot join "+t.type.name+" onto "+e.type.name)}function G1(e,t,n){let i=e.node(n);return N3(i,t.node(n)),i}function Va(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function _l(e,t,n,i){let r=(t||e).node(n),a=0,o=t?t.index(n):r.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(Va(e.nodeAfter,i),a++));for(let s=a;s<o;s++)Va(r.child(s),i);t&&t.depth==n&&t.textOffset&&Va(t.nodeBefore,i)}function Fa(e,t){return e.type.checkContent(t),e.copy(t)}function j3(e,t,n,i,r){let a=e.depth>r&&G1(e,t,r+1),o=i.depth>r&&G1(n,i,r+1),s=[];return _l(null,e,r,s),a&&o&&t.index(r)==n.index(r)?(N3(a,o),Va(Fa(a,j3(e,t,n,i,r+1)),s)):(a&&Va(Fa(a,rc(e,t,r+1)),s),_l(t,n,r,s),o&&Va(Fa(o,rc(n,i,r+1)),s)),_l(i,null,r,s),new ne(s)}function rc(e,t,n){let i=[];if(_l(null,e,n,i),e.depth>n){let r=G1(e,t,n+1);Va(Fa(r,rc(e,t,n+1)),i)}return _l(t,null,n,i),new ne(i)}function wCe(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let a=n-1;a>=0;a--)r=t.node(a).copy(ne.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}class Tl{constructor(t,n,i){this.pos=t,this.path=n,this.parentOffset=i,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let i=this.pos-this.path[this.path.length-1],r=t.child(n);return i?t.child(n).cut(i):r}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let i=this.path[n*3],r=n==0?0:this.path[n*3-1]+1;for(let a=0;a<t;a++)r+=i.child(a).nodeSize;return r}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return Ge.none;if(this.textOffset)return t.child(n).marks;let i=t.maybeChild(n-1),r=t.maybeChild(n);if(!i){let s=i;i=r,r=s}let a=i.marks;for(var o=0;o<a.length;o++)a[o].type.spec.inclusive===!1&&(!r||!a[o].isInSet(r.marks))&&(a=a[o--].removeFromSet(a));return a}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let i=n.marks,r=t.parent.maybeChild(t.index());for(var a=0;a<i.length;a++)i[a].type.spec.inclusive===!1&&(!r||!i[a].isInSet(r.marks))&&(i=i[a--].removeFromSet(i));return i}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let i=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);i>=0;i--)if(t.pos<=this.end(i)&&(!n||n(this.node(i))))return new ac(this,t,i);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let i=[],r=0,a=n;for(let o=t;;){let{index:s,offset:u}=o.content.findIndex(a),c=a-u;if(i.push(o,s,r+u),!c||(o=o.child(s),o.isText))break;a=c-1,r+=u+1}return new Tl(n,i,a)}static resolveCached(t,n){let i=I3.get(t);if(i)for(let a=0;a<i.elts.length;a++){let o=i.elts[a];if(o.pos==n)return o}else I3.set(t,i=new vCe);let r=i.elts[i.i]=Tl.resolve(t,n);return i.i=(i.i+1)%kCe,r}}class vCe{constructor(){this.elts=[],this.i=0}}const kCe=12,I3=new WeakMap;class ac{constructor(t,n,i){this.$from=t,this.$to=n,this.depth=i}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 MCe=Object.create(null);let Rr=class yy{constructor(t,n,i,r=Ge.none){this.type=t,this.attrs=n,this.marks=r,this.content=i||ne.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,i,r=0){this.content.nodesBetween(t,n,i,r,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,i,r){return this.content.textBetween(t,n,i,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,i){return this.type==t&&nc(this.attrs,n||t.defaultAttrs||MCe)&&Ge.sameSet(this.marks,i||Ge.none)}copy(t=null){return t==this.content?this:new yy(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new yy(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,i=!1){if(t==n)return ue.empty;let r=this.resolve(t),a=this.resolve(n),o=i?0:r.sharedDepth(n),s=r.start(o),c=r.node(o).content.cut(r.pos-s,a.pos-s);return new ue(c,r.depth-o,a.depth-o)}replace(t,n,i){return bCe(this.resolve(t),this.resolve(n),i)}nodeAt(t){for(let n=this;;){let{index:i,offset:r}=n.content.findIndex(t);if(n=n.maybeChild(i),!n)return null;if(r==t||n.isText)return n;t-=r+1}}childAfter(t){let{index:n,offset:i}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:i}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:i}=this.content.findIndex(t);if(i<t)return{node:this.content.child(n),index:n,offset:i};let r=this.content.child(n-1);return{node:r,index:n-1,offset:i-r.nodeSize}}resolve(t){return Tl.resolveCached(this,t)}resolveNoCache(t){return Tl.resolve(this,t)}rangeHasMark(t,n,i){let r=!1;return n>t&&this.nodesBetween(t,n,a=>(i.isInSet(a.marks)&&(r=!0),!r)),r}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 t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),W3(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,i=ne.empty,r=0,a=i.childCount){let o=this.contentMatchAt(t).matchFragment(i,r,a),s=o&&o.matchFragment(this.content,n);if(!s||!s.validEnd)return!1;for(let u=r;u<a;u++)if(!this.type.allowsMarks(i.child(u).marks))return!1;return!0}canReplaceWith(t,n,i,r){if(r&&!this.type.allowsMarks(r))return!1;let a=this.contentMatchAt(t).matchType(i),o=a&&a.matchFragment(this.content,n);return o?o.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=Ge.none;for(let n=0;n<this.marks.length;n++){let i=this.marks[n];i.type.checkAttrs(i.attrs),t=i.addToSet(t)}if(!Ge.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let i;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,i)}let r=ne.fromJSON(t,n.content),a=t.nodeType(n.type).create(n.attrs,r,i);return a.type.checkAttrs(a.attrs),a}};Rr.prototype.text=void 0;class oc extends Rr{constructor(t,n,i,r){if(super(t,n,null,r),!i)throw new RangeError("Empty text nodes are not allowed");this.text=i}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):W3(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new oc(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new oc(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function W3(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Ua{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let i=new CCe(t,n);if(i.next==null)return Ua.empty;let r=O3(i);i.next&&i.err("Unexpected trailing text");let a=ACe(ECe(r));return DCe(a,i),a}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,i=t.childCount){let r=this;for(let a=n;r&&a<i;a++)r=r.matchType(t.child(a).type);return r}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let i=0;i<t.next.length;i++)if(this.next[n].type==t.next[i].type)return!0;return!1}fillBefore(t,n=!1,i=0){let r=[this];function a(o,s){let u=o.matchFragment(t,i);if(u&&(!n||u.validEnd))return ne.from(s.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:f,next:h}=o.next[c];if(!(f.isText||f.hasRequiredAttrs())&&r.indexOf(h)==-1){r.push(h);let g=a(h,s.concat(f));if(g)return g}}return null}return a(this,[])}findWrapping(t){for(let i=0;i<this.wrapCache.length;i+=2)if(this.wrapCache[i]==t)return this.wrapCache[i+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),i=[{match:this,type:null,via:null}];for(;i.length;){let r=i.shift(),a=r.match;if(a.matchType(t)){let o=[];for(let s=r;s.type;s=s.via)o.push(s.type);return o.reverse()}for(let o=0;o<a.next.length;o++){let{type:s,next:u}=a.next[o];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in n)&&(!r.type||u.validEnd)&&(i.push({match:s.contentMatch,type:s,via:r}),n[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(i){t.push(i);for(let r=0;r<i.next.length;r++)t.indexOf(i.next[r].next)==-1&&n(i.next[r].next)}return n(this),t.map((i,r)=>{let a=r+(i.validEnd?"*":" ")+" ";for(let o=0;o<i.next.length;o++)a+=(o?", ":"")+i.next[o].type.name+"->"+t.indexOf(i.next[o].next);return a}).join(`
|
|
1310
1310
|
`)}}Ua.empty=new Ua(!0);class CCe{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.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(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function O3(e){let t=[];do t.push(xCe(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function xCe(e){let t=[];do t.push(SCe(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function SCe(e){let t=PCe(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=_Ce(e,t);else break;return t}function z3(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function _Ce(e,t){let n=z3(e),i=n;return e.eat(",")&&(e.next!="}"?i=z3(e):i=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:i,expr:t}}function TCe(e,t){let n=e.nodeTypes,i=n[t];if(i)return[i];let r=[];for(let a in n){let o=n[a];o.isInGroup(t)&&r.push(o)}return r.length==0&&e.err("No node type or group '"+t+"' found"),r}function PCe(e){if(e.eat("(")){let t=O3(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=TCe(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function ECe(e){let t=[[]];return r(a(e,0),n()),t;function n(){return t.push([])-1}function i(o,s,u){let c={term:u,to:s};return t[o].push(c),c}function r(o,s){o.forEach(u=>u.to=s)}function a(o,s){if(o.type=="choice")return o.exprs.reduce((u,c)=>u.concat(a(c,s)),[]);if(o.type=="seq")for(let u=0;;u++){let c=a(o.exprs[u],s);if(u==o.exprs.length-1)return c;r(c,s=n())}else if(o.type=="star"){let u=n();return i(s,u),r(a(o.expr,u),u),[i(u)]}else if(o.type=="plus"){let u=n();return r(a(o.expr,s),u),r(a(o.expr,u),u),[i(u)]}else{if(o.type=="opt")return[i(s)].concat(a(o.expr,s));if(o.type=="range"){let u=s;for(let c=0;c<o.min;c++){let f=n();r(a(o.expr,u),f),u=f}if(o.max==-1)r(a(o.expr,u),u);else for(let c=o.min;c<o.max;c++){let f=n();i(u,f),r(a(o.expr,u),f),u=f}return[i(u)]}else{if(o.type=="name")return[i(s,void 0,o.value)];throw new Error("Unknown expr type")}}}}function L3(e,t){return t-e}function $3(e,t){let n=[];return i(t),n.sort(L3);function i(r){let a=e[r];if(a.length==1&&!a[0].term)return i(a[0].to);n.push(r);for(let o=0;o<a.length;o++){let{term:s,to:u}=a[o];!s&&n.indexOf(u)==-1&&i(u)}}}function ACe(e){let t=Object.create(null);return n($3(e,0));function n(i){let r=[];i.forEach(o=>{e[o].forEach(({term:s,to:u})=>{if(!s)return;let c;for(let f=0;f<r.length;f++)r[f][0]==s&&(c=r[f][1]);$3(e,u).forEach(f=>{c||r.push([s,c=[]]),c.indexOf(f)==-1&&c.push(f)})})});let a=t[i.join(",")]=new Ua(i.indexOf(e.length-1)>-1);for(let o=0;o<r.length;o++){let s=r[o][1].sort(L3);a.next.push({type:r[o][0],next:t[s.join(",")]||n(s)})}return a}}function DCe(e,t){for(let n=0,i=[e];n<i.length;n++){let r=i[n],a=!r.validEnd,o=[];for(let s=0;s<r.next.length;s++){let{type:u,next:c}=r.next[s];o.push(u.name),a&&!(u.isText||u.hasRequiredAttrs())&&(a=!1),i.indexOf(c)==-1&&i.push(c)}a&&t.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function H3(e){let t=Object.create(null);for(let n in e){let i=e[n];if(!i.hasDefault)return null;t[n]=i.default}return t}function R3(e,t){let n=Object.create(null);for(let i in e){let r=t&&t[i];if(r===void 0){let a=e[i];if(a.hasDefault)r=a.default;else throw new RangeError("No value supplied for attribute "+i)}n[i]=r}return n}function B3(e,t,n,i){for(let r in t)if(!(r in e))throw new RangeError(`Unsupported attribute ${r} for ${n} of type ${r}`);for(let r in e){let a=e[r];a.validate&&a.validate(t[r])}}function V3(e,t){let n=Object.create(null);if(t)for(let i in t)n[i]=new jCe(e,i,t[i]);return n}let F3=class C8{constructor(t,n,i){this.name=t,this.schema=n,this.spec=i,this.markSet=null,this.groups=i.group?i.group.split(" "):[],this.attrs=V3(t,i.attrs),this.defaultAttrs=H3(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(i.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Ua.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:R3(this.attrs,t)}create(t=null,n,i){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Rr(this,this.computeAttrs(t),ne.from(n),Ge.setFrom(i))}createChecked(t=null,n,i){return n=ne.from(n),this.checkContent(n),new Rr(this,this.computeAttrs(t),n,Ge.setFrom(i))}createAndFill(t=null,n,i){if(t=this.computeAttrs(t),n=ne.from(n),n.size){let o=this.contentMatch.fillBefore(n);if(!o)return null;n=o.append(n)}let r=this.contentMatch.matchFragment(n),a=r&&r.fillBefore(ne.empty,!0);return a?new Rr(this,t,n.append(a),Ge.setFrom(i)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let i=0;i<t.childCount;i++)if(!this.allowsMarks(t.child(i).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){B3(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let i=0;i<t.length;i++)this.allowsMarkType(t[i].type)?n&&n.push(t[i]):n||(n=t.slice(0,i));return n?n.length?n:Ge.none:t}static compile(t,n){let i=Object.create(null);t.forEach((a,o)=>i[a]=new C8(a,n,o));let r=n.spec.topNode||"doc";if(!i[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!i.text)throw new RangeError("Every schema needs a 'text' type");for(let a in i.text.attrs)throw new RangeError("The text node type should not have attributes");return i}};function NCe(e,t,n){let i=n.split("|");return r=>{let a=r===null?"null":typeof r;if(i.indexOf(a)<0)throw new RangeError(`Expected value of type ${i} for attribute ${t} on type ${e}, got ${a}`)}}class jCe{constructor(t,n,i){this.hasDefault=Object.prototype.hasOwnProperty.call(i,"default"),this.default=i.default,this.validate=typeof i.validate=="string"?NCe(t,n,i.validate):i.validate}get isRequired(){return!this.hasDefault}}class sc{constructor(t,n,i,r){this.name=t,this.rank=n,this.schema=i,this.spec=r,this.attrs=V3(t,r.attrs),this.excluded=null;let a=H3(this.attrs);this.instance=a?new Ge(this,a):null}create(t=null){return!t&&this.instance?this.instance:new Ge(this,R3(this.attrs,t))}static compile(t,n){let i=Object.create(null),r=0;return t.forEach((a,o)=>i[a]=new sc(a,r++,n,o)),i}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}checkAttrs(t){B3(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class U3{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let r in t)n[r]=t[r];n.nodes=$t.from(t.nodes),n.marks=$t.from(t.marks||{}),this.nodes=F3.compile(this.spec.nodes,this),this.marks=sc.compile(this.spec.marks,this);let i=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let a=this.nodes[r],o=a.spec.content||"",s=a.spec.marks;if(a.contentMatch=i[o]||(i[o]=Ua.parse(o,this.nodes)),a.inlineContent=a.contentMatch.inlineContent,a.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!a.isInline||!a.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=a}a.markSet=s=="_"?null:s?Y3(this,s.split(" ")):s==""||!a.inlineContent?[]:null}for(let r in this.marks){let a=this.marks[r],o=a.spec.excludes;a.excluded=o==null?[a]:o==""?[]:Y3(this,o.split(" "))}this.nodeFromJSON=r=>Rr.fromJSON(this,r),this.markFromJSON=r=>Ge.fromJSON(this,r),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,i,r){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof F3){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,i,r)}text(t,n){let i=this.nodes.text;return new oc(i,i.defaultAttrs,t,Ge.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function Y3(e,t){let n=[];for(let i=0;i<t.length;i++){let r=t[i],a=e.marks[r],o=a;if(a)n.push(a);else for(let s in e.marks){let u=e.marks[s];(r=="_"||u.spec.group&&u.spec.group.split(" ").indexOf(r)>-1)&&n.push(o=u)}if(!o)throw new SyntaxError("Unknown mark type: '"+t[i]+"'")}return n}function ICe(e){return e.tag!=null}function WCe(e){return e.style!=null}class Br{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let i=this.matchedStyles=[];n.forEach(r=>{if(ICe(r))this.tags.push(r);else if(WCe(r)){let a=/[^=]*/.exec(r.style)[0];i.indexOf(a)<0&&i.push(a),this.styles.push(r)}}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let a=t.nodes[r.node];return a.contentMatch.matchType(a)})}parse(t,n={}){let i=new K3(this,n,!1);return i.addAll(t,Ge.none,n.from,n.to),i.finish()}parseSlice(t,n={}){let i=new K3(this,n,!0);return i.addAll(t,Ge.none,n.from,n.to),ue.maxOpen(i.finish())}matchTag(t,n,i){for(let r=i?this.tags.indexOf(i)+1:0;r<this.tags.length;r++){let a=this.tags[r];if(LCe(t,a.tag)&&(a.namespace===void 0||t.namespaceURI==a.namespace)&&(!a.context||n.matchesContext(a.context))){if(a.getAttrs){let o=a.getAttrs(t);if(o===!1)continue;a.attrs=o||void 0}return a}}}matchStyle(t,n,i,r){for(let a=r?this.styles.indexOf(r)+1:0;a<this.styles.length;a++){let o=this.styles[a],s=o.style;if(!(s.indexOf(t)!=0||o.context&&!i.matchesContext(o.context)||s.length>t.length&&(s.charCodeAt(t.length)!=61||s.slice(t.length+1)!=n))){if(o.getAttrs){let u=o.getAttrs(n);if(u===!1)continue;o.attrs=u||void 0}return o}}}static schemaRules(t){let n=[];function i(r){let a=r.priority==null?50:r.priority,o=0;for(;o<n.length;o++){let s=n[o];if((s.priority==null?50:s.priority)<a)break}n.splice(o,0,r)}for(let r in t.marks){let a=t.marks[r].spec.parseDOM;a&&a.forEach(o=>{i(o=Q3(o)),o.mark||o.ignore||o.clearMark||(o.mark=r)})}for(let r in t.nodes){let a=t.nodes[r].spec.parseDOM;a&&a.forEach(o=>{i(o=Q3(o)),o.node||o.ignore||o.mark||(o.node=r)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new Br(t,Br.schemaRules(t)))}}const X3={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},OCe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},q3={ol:!0,ul:!0},Pl=1,K1=2,El=4;function G3(e,t,n){return t!=null?(t?Pl:0)|(t==="full"?K1:0):e&&e.whitespace=="pre"?Pl|K1:n&~El}class lc{constructor(t,n,i,r,a,o){this.type=t,this.attrs=n,this.marks=i,this.solid=r,this.options=o,this.content=[],this.activeMarks=Ge.none,this.match=a||(o&El?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(ne.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let i=this.type.contentMatch,r;return(r=i.findWrapping(t.type))?(this.match=i,r):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&Pl)){let i=this.content[this.content.length-1],r;if(i&&i.isText&&(r=/[ \t\r\n\u000c]+$/.exec(i.text))){let a=i;i.text.length==r[0].length?this.content.pop():this.content[this.content.length-1]=a.withText(a.text.slice(0,a.text.length-r[0].length))}}let n=ne.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(ne.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!X3.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class K3{constructor(t,n,i){this.parser=t,this.options=n,this.isOpen=i,this.open=0,this.localPreserveWS=!1;let r=n.topNode,a,o=G3(null,n.preserveWhitespace,0)|(i?El:0);r?a=new lc(r.type,r.attrs,Ge.none,!0,n.topMatch||r.type.contentMatch,o):i?a=new lc(null,null,Ge.none,!0,null,o):a=new lc(t.schema.topNodeType,null,Ge.none,!0,null,o),this.nodes=[a],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let i=t.nodeValue,r=this.top,a=r.options&K1?"full":this.localPreserveWS||(r.options&Pl)>0;if(a==="full"||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(i)){if(a)a!=="full"?i=i.replace(/\r?\n|\r/g," "):i=i.replace(/\r\n?/g,`
|
|
1311
1311
|
`);else if(i=i.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(i)&&this.open==this.nodes.length-1){let o=r.content[r.content.length-1],s=t.previousSibling;(!o||s&&s.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(i=i.slice(1))}i&&this.insertNode(this.parser.schema.text(i),n,!/\S/.test(i)),this.findInText(t)}else this.findInside(t)}addElement(t,n,i){let r=this.localPreserveWS,a=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let o=t.nodeName.toLowerCase(),s;q3.hasOwnProperty(o)&&this.parser.normalizeLists&&zCe(t);let u=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(s=this.parser.matchTag(t,this,i));e:if(u?u.ignore:OCe.hasOwnProperty(o))this.findInside(t),this.ignoreFallback(t,n);else if(!u||u.skip||u.closeParent){u&&u.closeParent?this.open=Math.max(0,this.open-1):u&&u.skip.nodeType&&(t=u.skip);let c,f=this.needsBlock;if(X3.hasOwnProperty(o))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),c=!0,a.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);break e}let h=u&&u.skip?n:this.readStyles(t,n);h&&this.addAll(t,h),c&&this.sync(a),this.needsBlock=f}else{let c=this.readStyles(t,n);c&&this.addElementByRule(t,u,c,u.consuming===!1?s:void 0)}this.localPreserveWS=r}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
|
|
1312
1312
|
`),n)}ignoreFallback(t,n){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(t,n){let i=t.style;if(i&&i.length)for(let r=0;r<this.parser.matchedStyles.length;r++){let a=this.parser.matchedStyles[r],o=i.getPropertyValue(a);if(o)for(let s=void 0;;){let u=this.parser.matchStyle(a,o,this,s);if(!u)break;if(u.ignore)return null;if(u.clearMark?n=n.filter(c=>!u.clearMark(c)):n=n.concat(this.parser.schema.marks[u.mark].create(u.attrs)),u.consuming===!1)s=u;else break}}return n}addElementByRule(t,n,i,r){let a,o;if(n.node)if(o=this.parser.schema.nodes[n.node],o.isLeaf)this.insertNode(o.create(n.attrs),i,t.nodeName=="BR")||this.leafFallback(t,i);else{let u=this.enter(o,n.attrs||null,i,n.preserveWhitespace);u&&(a=!0,i=u)}else{let u=this.parser.schema.marks[n.mark];i=i.concat(u.create(n.attrs))}let s=this.top;if(o&&o.isLeaf)this.findInside(t);else if(r)this.addElement(t,i,r);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(u=>this.insertNode(u,i,!1));else{let u=t;typeof n.contentElement=="string"?u=t.querySelector(n.contentElement):typeof n.contentElement=="function"?u=n.contentElement(t):n.contentElement&&(u=n.contentElement),this.findAround(t,u,!0),this.addAll(u,i),this.findAround(t,u,!1)}a&&this.sync(s)&&this.open--}addAll(t,n,i,r){let a=i||0;for(let o=i?t.childNodes[i]:t.firstChild,s=r==null?null:t.childNodes[r];o!=s;o=o.nextSibling,++a)this.findAtPoint(t,a),this.addDOM(o,n);this.findAtPoint(t,a)}findPlace(t,n,i){let r,a;for(let o=this.open,s=0;o>=0;o--){let u=this.nodes[o],c=u.findWrapping(t);if(c&&(!r||r.length>c.length+s)&&(r=c,a=u,!c.length))break;if(u.solid){if(i)break;s+=2}}if(!r)return null;this.sync(a);for(let o=0;o<r.length;o++)n=this.enterInner(r[o],null,n,!1);return n}insertNode(t,n,i){if(t.isInline&&this.needsBlock&&!this.top.type){let a=this.textblockFromContext();a&&(n=this.enterInner(a,null,n))}let r=this.findPlace(t,n,i);if(r){this.closeExtra();let a=this.top;a.match&&(a.match=a.match.matchType(t.type));let o=Ge.none;for(let s of r.concat(t.marks))(a.type?a.type.allowsMarkType(s.type):J3(s.type,t.type))&&(o=s.addToSet(o));return a.content.push(t.mark(o)),!0}return!1}enter(t,n,i,r){let a=this.findPlace(t.create(n),i,!1);return a&&(a=this.enterInner(t,n,i,!0,r)),a}enterInner(t,n,i,r=!1,a){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(t);let s=G3(t,a,o.options);o.options&El&&o.content.length==0&&(s|=El);let u=Ge.none;return i=i.filter(c=>(o.type?o.type.allowsMarkType(c.type):J3(c.type,t))?(u=c.addToSet(u),!1):!0),this.nodes.push(new lc(t,n,u,r,null,s)),this.open++,i}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));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(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Pl)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let i=this.nodes[n].content;for(let r=i.length-1;r>=0;r--)t+=i[r].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let i=0;i<this.find.length;i++)this.find[i].node==t&&this.find[i].offset==n&&(this.find[i].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,i){if(t!=n&&this.find)for(let r=0;r<this.find.length;r++)this.find[r].pos==null&&t.nodeType==1&&t.contains(this.find[r].node)&&n.compareDocumentPosition(this.find[r].node)&(i?2:4)&&(this.find[r].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),i=this.options.context,r=!this.isOpen&&(!i||i.parent.type==this.nodes[0].type),a=-(i?i.depth+1:0)+(r?0:1),o=(s,u)=>{for(;s>=0;s--){let c=n[s];if(c==""){if(s==n.length-1||s==0)continue;for(;u>=a;u--)if(o(s-1,u))return!0;return!1}else{let f=u>0||u==0&&r?this.nodes[u].type:i&&u>=a?i.node(u-a).type:null;if(!f||f.name!=c&&!f.isInGroup(c))return!1;u--}}return!0};return o(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(i&&i.isTextblock&&i.defaultAttrs)return i}for(let n in this.parser.schema.nodes){let i=this.parser.schema.nodes[n];if(i.isTextblock&&i.defaultAttrs)return i}}}function zCe(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let i=t.nodeType==1?t.nodeName.toLowerCase():null;i&&q3.hasOwnProperty(i)&&n?(n.appendChild(t),t=n):i=="li"?n=t:i&&(n=null)}}function LCe(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Q3(e){let t={};for(let n in e)t[n]=e[n];return t}function J3(e,t){let n=t.schema.nodes;for(let i in n){let r=n[i];if(!r.allowsMarkType(e))continue;let a=[],o=s=>{a.push(s);for(let u=0;u<s.edgeCount;u++){let{type:c,next:f}=s.edge(u);if(c==t||a.indexOf(f)<0&&o(f))return!0}};if(o(r.contentMatch))return!0}}class Ya{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},i){i||(i=Q1(n).createDocumentFragment());let r=i,a=[];return t.forEach(o=>{if(a.length||o.marks.length){let s=0,u=0;for(;s<a.length&&u<o.marks.length;){let c=o.marks[u];if(!this.marks[c.type.name]){u++;continue}if(!c.eq(a[s][0])||c.type.spec.spanning===!1)break;s++,u++}for(;s<a.length;)r=a.pop()[1];for(;u<o.marks.length;){let c=o.marks[u++],f=this.serializeMark(c,o.isInline,n);f&&(a.push([c,r]),r.appendChild(f.dom),r=f.contentDOM||f.dom)}}r.appendChild(this.serializeNodeInner(o,n))}),i}serializeNodeInner(t,n){let{dom:i,contentDOM:r}=uc(Q1(n),this.nodes[t.type.name](t),null,t.attrs);if(r){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,r)}return i}serializeNode(t,n={}){let i=this.serializeNodeInner(t,n);for(let r=t.marks.length-1;r>=0;r--){let a=this.serializeMark(t.marks[r],t.isInline,n);a&&((a.contentDOM||a.dom).appendChild(i),i=a.dom)}return i}serializeMark(t,n,i={}){let r=this.marks[t.type.name];return r&&uc(Q1(i),r(t,n),null,t.attrs)}static renderSpec(t,n,i=null,r){return uc(t,n,i,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new Ya(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=Z3(t.nodes);return n.text||(n.text=i=>i.text),n}static marksFromSchema(t){return Z3(t.marks)}}function Z3(e){let t={};for(let n in e){let i=e[n].spec.toDOM;i&&(t[n]=i)}return t}function Q1(e){return e.document||window.document}const e4=new WeakMap;function $Ce(e){let t=e4.get(e);return t===void 0&&e4.set(e,t=HCe(e)),t}function HCe(e){let t=null;function n(i){if(i&&typeof i=="object")if(Array.isArray(i))if(typeof i[0]=="string")t||(t=[]),t.push(i);else for(let r=0;r<i.length;r++)n(i[r]);else for(let r in i)n(i[r])}return n(e),t}function uc(e,t,n,i){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let r=t[0],a;if(typeof r!="string")throw new RangeError("Invalid array passed to renderSpec");if(i&&(a=$Ce(i))&&a.indexOf(t)>-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 o=r.indexOf(" ");o>0&&(n=r.slice(0,o),r=r.slice(o+1));let s,u=n?e.createElementNS(n,r):e.createElement(r),c=t[1],f=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){f=2;for(let h in c)if(c[h]!=null){let g=h.indexOf(" ");g>0?u.setAttributeNS(h.slice(0,g),h.slice(g+1),c[h]):h=="style"&&u.style?u.style.cssText=c[h]:u.setAttribute(h,c[h])}}for(let h=f;h<t.length;h++){let g=t[h];if(g===0){if(h<t.length-1||h>f)throw new RangeError("Content hole must be the only child of its parent node");return{dom:u,contentDOM:u}}else{let{dom:p,contentDOM:y}=uc(e,g,n,i);if(u.appendChild(p),y){if(s)throw new RangeError("Multiple content holes");s=y}}}return{dom:u,contentDOM:s}}const t4=65535,n4=Math.pow(2,16);function RCe(e,t){return e+t*n4}function i4(e){return e&t4}function BCe(e){return(e-(e&t4))/n4}const r4=1,a4=2,dc=4,o4=8;class J1{constructor(t,n,i){this.pos=t,this.delInfo=n,this.recover=i}get deleted(){return(this.delInfo&o4)>0}get deletedBefore(){return(this.delInfo&(r4|dc))>0}get deletedAfter(){return(this.delInfo&(a4|dc))>0}get deletedAcross(){return(this.delInfo&dc)>0}}class Ln{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&Ln.empty)return Ln.empty}recover(t){let n=0,i=i4(t);if(!this.inverted)for(let r=0;r<i;r++)n+=this.ranges[r*3+2]-this.ranges[r*3+1];return this.ranges[i*3]+n+BCe(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,i){let r=0,a=this.inverted?2:1,o=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let u=this.ranges[s]-(this.inverted?r:0);if(u>t)break;let c=this.ranges[s+a],f=this.ranges[s+o],h=u+c;if(t<=h){let g=c?t==u?-1:t==h?1:n:n,p=u+r+(g<0?0:f);if(i)return p;let y=t==(n<0?u:h)?null:RCe(s/3,t-u),v=t==u?a4:t==h?r4:dc;return(n<0?t!=u:t!=h)&&(v|=o4),new J1(p,v,y)}r+=f-c}return i?t+r:new J1(t+r,0,null)}touches(t,n){let i=0,r=i4(n),a=this.inverted?2:1,o=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let u=this.ranges[s]-(this.inverted?i:0);if(u>t)break;let c=this.ranges[s+a],f=u+c;if(t<=f&&s==r*3)return!0;i+=this.ranges[s+o]-c}return!1}forEach(t){let n=this.inverted?2:1,i=this.inverted?1:2;for(let r=0,a=0;r<this.ranges.length;r+=3){let o=this.ranges[r],s=o-(this.inverted?a:0),u=o+(this.inverted?0:a),c=this.ranges[r+n],f=this.ranges[r+i];t(s,s+c,u,u+f),a+=f-c}}invert(){return new Ln(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?Ln.empty:new Ln(t<0?[0,-t,0]:[0,0,t])}}Ln.empty=new Ln([]);class Al{constructor(t,n,i=0,r=t?t.length:0){this.mirror=n,this.from=i,this.to=r,this._maps=t||[],this.ownData=!(t||n)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new Al(this._maps,this.mirror,t,n)}appendMap(t,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(t),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(t){for(let n=0,i=this._maps.length;n<t._maps.length;n++){let r=t.getMirror(n);this.appendMap(t._maps[n],r!=null&&r<n?i+r:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,i=this._maps.length+t._maps.length;n>=0;n--){let r=t.getMirror(n);this.appendMap(t._maps[n].invert(),r!=null&&r>n?i-r-1:void 0)}}invert(){let t=new Al;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let i=this.from;i<this.to;i++)t=this._maps[i].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,i){let r=0;for(let a=this.from;a<this.to;a++){let o=this._maps[a],s=o.mapResult(t,n);if(s.recover!=null){let u=this.getMirror(a);if(u!=null&&u>a&&u<this.to){a=u,t=this._maps[u].recover(s.recover);continue}}r|=s.delInfo,t=s.pos}return i?t:new J1(t,r,null)}}const Z1=Object.create(null);class Gt{getMap(){return Ln.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let i=Z1[n.stepType];if(!i)throw new RangeError(`No step type ${n.stepType} defined`);return i.fromJSON(t,n)}static jsonID(t,n){if(t in Z1)throw new RangeError("Duplicate use of step JSON ID "+t);return Z1[t]=n,n.prototype.jsonID=t,n}}class xt{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new xt(t,null)}static fail(t){return new xt(null,t)}static fromReplace(t,n,i,r){try{return xt.ok(t.replace(n,i,r))}catch(a){if(a instanceof ic)return xt.fail(a.message);throw a}}}function ep(e,t,n){let i=[];for(let r=0;r<e.childCount;r++){let a=e.child(r);a.content.size&&(a=a.copy(ep(a.content,t,a))),a.isInline&&(a=t(a,n,r)),i.push(a)}return ne.fromArray(i)}class Vr extends Gt{constructor(t,n,i){super(),this.from=t,this.to=n,this.mark=i}apply(t){let n=t.slice(this.from,this.to),i=t.resolve(this.from),r=i.node(i.sharedDepth(this.to)),a=new ue(ep(n.content,(o,s)=>!o.isAtom||!s.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),r),n.openStart,n.openEnd);return xt.fromReplace(t,this.from,this.to,a)}invert(){return new Si(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return n.deleted&&i.deleted||n.pos>=i.pos?null:new Vr(n.pos,i.pos,this.mark)}merge(t){return t instanceof Vr&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Vr(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Vr(n.from,n.to,t.markFromJSON(n.mark))}}Gt.jsonID("addMark",Vr);class Si extends Gt{constructor(t,n,i){super(),this.from=t,this.to=n,this.mark=i}apply(t){let n=t.slice(this.from,this.to),i=new ue(ep(n.content,r=>r.mark(this.mark.removeFromSet(r.marks)),t),n.openStart,n.openEnd);return xt.fromReplace(t,this.from,this.to,i)}invert(){return new Vr(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return n.deleted&&i.deleted||n.pos>=i.pos?null:new Si(n.pos,i.pos,this.mark)}merge(t){return t instanceof Si&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Si(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Si(n.from,n.to,t.markFromJSON(n.mark))}}Gt.jsonID("removeMark",Si);class Fr extends Gt{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return xt.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return xt.fromReplace(t,this.pos,this.pos+1,new ue(ne.from(i),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let i=this.mark.addToSet(n.marks);if(i.length==n.marks.length){for(let r=0;r<n.marks.length;r++)if(!n.marks[r].isInSet(i))return new Fr(this.pos,n.marks[r]);return new Fr(this.pos,this.mark)}}return new Xa(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Fr(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Fr(n.pos,t.markFromJSON(n.mark))}}Gt.jsonID("addNodeMark",Fr);class Xa extends Gt{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return xt.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return xt.fromReplace(t,this.pos,this.pos+1,new ue(ne.from(i),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Fr(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Xa(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Xa(n.pos,t.markFromJSON(n.mark))}}Gt.jsonID("removeNodeMark",Xa);class It extends Gt{constructor(t,n,i,r=!1){super(),this.from=t,this.to=n,this.slice=i,this.structure=r}apply(t){return this.structure&&tp(t,this.from,this.to)?xt.fail("Structure replace would overwrite content"):xt.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new Ln([this.from,this.to-this.from,this.slice.size])}invert(t){return new It(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return n.deletedAcross&&i.deletedAcross?null:new It(n.pos,Math.max(n.pos,i.pos),this.slice,this.structure)}merge(t){if(!(t instanceof It)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?ue.empty:new ue(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new It(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?ue.empty:new ue(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new It(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new It(n.from,n.to,ue.fromJSON(t,n.slice),!!n.structure)}}Gt.jsonID("replace",It);class Wt extends Gt{constructor(t,n,i,r,a,o,s=!1){super(),this.from=t,this.to=n,this.gapFrom=i,this.gapTo=r,this.slice=a,this.insert=o,this.structure=s}apply(t){if(this.structure&&(tp(t,this.from,this.gapFrom)||tp(t,this.gapTo,this.to)))return xt.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return xt.fail("Gap is not a flat range");let i=this.slice.insertAt(this.insert,n.content);return i?xt.fromReplace(t,this.from,this.to,i):xt.fail("Content does not fit in gap")}getMap(){return new Ln([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new Wt(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),i=t.mapResult(this.to,-1),r=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),a=this.to==this.gapTo?i.pos:t.map(this.gapTo,1);return n.deletedAcross&&i.deletedAcross||r<n.pos||a>i.pos?null:new Wt(n.pos,i.pos,r,a,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Wt(n.from,n.to,n.gapFrom,n.gapTo,ue.fromJSON(t,n.slice),n.insert,!!n.structure)}}Gt.jsonID("replaceAround",Wt);function tp(e,t,n){let i=e.resolve(t),r=n-t,a=i.depth;for(;r>0&&a>0&&i.indexAfter(a)==i.node(a).childCount;)a--,r--;if(r>0){let o=i.node(a).maybeChild(i.indexAfter(a));for(;r>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,r--}}return!1}function VCe(e,t,n,i){let r=[],a=[],o,s;e.doc.nodesBetween(t,n,(u,c,f)=>{if(!u.isInline)return;let h=u.marks;if(!i.isInSet(h)&&f.type.allowsMarkType(i.type)){let g=Math.max(c,t),p=Math.min(c+u.nodeSize,n),y=i.addToSet(h);for(let v=0;v<h.length;v++)h[v].isInSet(y)||(o&&o.to==g&&o.mark.eq(h[v])?o.to=p:r.push(o=new Si(g,p,h[v])));s&&s.to==g?s.to=p:a.push(s=new Vr(g,p,i))}}),r.forEach(u=>e.step(u)),a.forEach(u=>e.step(u))}function FCe(e,t,n,i){let r=[],a=0;e.doc.nodesBetween(t,n,(o,s)=>{if(!o.isInline)return;a++;let u=null;if(i instanceof sc){let c=o.marks,f;for(;f=i.isInSet(c);)(u||(u=[])).push(f),c=f.removeFromSet(c)}else i?i.isInSet(o.marks)&&(u=[i]):u=o.marks;if(u&&u.length){let c=Math.min(s+o.nodeSize,n);for(let f=0;f<u.length;f++){let h=u[f],g;for(let p=0;p<r.length;p++){let y=r[p];y.step==a-1&&h.eq(r[p].style)&&(g=y)}g?(g.to=c,g.step=a):r.push({style:h,from:Math.max(s,t),to:c,step:a})}}}),r.forEach(o=>e.step(new Si(o.from,o.to,o.style)))}function np(e,t,n,i=n.contentMatch,r=!0){let a=e.doc.nodeAt(t),o=[],s=t+1;for(let u=0;u<a.childCount;u++){let c=a.child(u),f=s+c.nodeSize,h=i.matchType(c.type);if(!h)o.push(new It(s,f,ue.empty));else{i=h;for(let g=0;g<c.marks.length;g++)n.allowsMarkType(c.marks[g].type)||e.step(new Si(s,f,c.marks[g]));if(r&&c.isText&&n.whitespace!="pre"){let g,p=/\r?\n|\r/g,y;for(;g=p.exec(c.text);)y||(y=new ue(ne.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),o.push(new It(s+g.index,s+g.index+g[0].length,y))}}s=f}if(!i.validEnd){let u=i.fillBefore(ne.empty,!0);e.replace(s,s,new ue(u,0,0))}for(let u=o.length-1;u>=0;u--)e.step(o[u])}function UCe(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Qo(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let i=e.depth;;--i){let r=e.$from.node(i),a=e.$from.index(i),o=e.$to.indexAfter(i);if(i<e.depth&&r.canReplace(a,o,n))return i;if(i==0||r.type.spec.isolating||!UCe(r,a,o))break}return null}function YCe(e,t,n){let{$from:i,$to:r,depth:a}=t,o=i.before(a+1),s=r.after(a+1),u=o,c=s,f=ne.empty,h=0;for(let y=a,v=!1;y>n;y--)v||i.index(y)>0?(v=!0,f=ne.from(i.node(y).copy(f)),h++):u--;let g=ne.empty,p=0;for(let y=a,v=!1;y>n;y--)v||r.after(y+1)<r.end(y)?(v=!0,g=ne.from(r.node(y).copy(g)),p++):c++;e.step(new Wt(u,c,o,s,new ue(f.append(g),h,p),f.size-h,!0))}function ip(e,t,n=null,i=e){let r=XCe(e,t),a=r&&qCe(i,t);return a?r.map(s4).concat({type:t,attrs:n}).concat(a.map(s4)):null}function s4(e){return{type:e,attrs:null}}function XCe(e,t){let{parent:n,startIndex:i,endIndex:r}=e,a=n.contentMatchAt(i).findWrapping(t);if(!a)return null;let o=a.length?a[0]:t;return n.canReplaceWith(i,r,o)?a:null}function qCe(e,t){let{parent:n,startIndex:i,endIndex:r}=e,a=n.child(i),o=t.contentMatch.findWrapping(a.type);if(!o)return null;let u=(o.length?o[o.length-1]:t).contentMatch;for(let c=i;u&&c<r;c++)u=u.matchType(n.child(c).type);return!u||!u.validEnd?null:o}function GCe(e,t,n){let i=ne.empty;for(let o=n.length-1;o>=0;o--){if(i.size){let s=n[o].type.contentMatch.matchFragment(i);if(!s||!s.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=ne.from(n[o].type.create(n[o].attrs,i))}let r=t.start,a=t.end;e.step(new Wt(r,a,r,a,new ue(i,0,0),n.length,!0))}function KCe(e,t,n,i,r){if(!i.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let a=e.steps.length;e.doc.nodesBetween(t,n,(o,s)=>{let u=typeof r=="function"?r(o):r;if(o.isTextblock&&!o.hasMarkup(i,u)&&QCe(e.doc,e.mapping.slice(a).map(s),i)){let c=null;if(i.schema.linebreakReplacement){let p=i.whitespace=="pre",y=!!i.contentMatch.matchType(i.schema.linebreakReplacement);p&&!y?c=!1:!p&&y&&(c=!0)}c===!1&&u4(e,o,s,a),np(e,e.mapping.slice(a).map(s,1),i,void 0,c===null);let f=e.mapping.slice(a),h=f.map(s,1),g=f.map(s+o.nodeSize,1);return e.step(new Wt(h,g,h+1,g-1,new ue(ne.from(i.create(u,null,o.marks)),0,0),1,!0)),c===!0&&l4(e,o,s,a),!1}})}function l4(e,t,n,i){t.forEach((r,a)=>{if(r.isText){let o,s=/\r?\n|\r/g;for(;o=s.exec(r.text);){let u=e.mapping.slice(i).map(n+1+a+o.index);e.replaceWith(u,u+1,t.type.schema.linebreakReplacement.create())}}})}function u4(e,t,n,i){t.forEach((r,a)=>{if(r.type==r.type.schema.linebreakReplacement){let o=e.mapping.slice(i).map(n+1+a);e.replaceWith(o,o+1,t.type.schema.text(`
|