@blockbite/libraries 0.11.7 → 0.12.1

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.
@@ -1,6 +1,15 @@
1
- (function(je,ue){typeof exports=="object"&&typeof module<"u"?ue(exports):typeof define=="function"&&define.amd?define(["exports"],ue):(je=typeof globalThis<"u"?globalThis:je||self,ue(je.BlockBiteLibraries={}))})(this,(function(je){"use strict";function ue(){return ue=Object.assign?Object.assign.bind():function(u){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var r in i)({}).hasOwnProperty.call(i,r)&&(u[r]=i[r])}return u},ue.apply(null,arguments)}var ve=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pe(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var It,xt={exports:{}};/*!
2
- Copyright (c) 2018 Jed Watson.
3
- Licensed under the MIT License (MIT), see
4
- http://jedwatson.github.io/classnames
5
- */var ot,Et,Vt,di=(It||(It=1,ot=xt,(function(){var u={}.hasOwnProperty;function e(){for(var i=[],r=0;r<arguments.length;r++){var l=arguments[r];if(l){var m=typeof l;if(m==="string"||m==="number")i.push(l);else if(Array.isArray(l)){if(l.length){var g=e.apply(null,l);g&&i.push(g)}}else if(m==="object")if(l.toString===Object.prototype.toString)for(var d in l)u.call(l,d)&&l[d]&&i.push(d);else i.push(l.toString())}}return i.join(" ")}ot.exports?(e.default=e,ot.exports=e):window.classNames=e})()),xt.exports),at=Pe(di),jt,re=Pe((function(){if(Vt)return Et;Vt=1;var u=/^\s+|\s+$/g,e=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,r=/^0o[0-7]+$/i,l=parseInt,m=Object.prototype.toString;function g(n){var o=typeof n;return!!n&&(o=="object"||o=="function")}function d(n){if(typeof n=="number")return n;if((function(a){return typeof a=="symbol"||(function(y){return!!y&&typeof y=="object"})(a)&&m.call(a)=="[object Symbol]"})(n))return NaN;if(g(n)){var o=typeof n.valueOf=="function"?n.valueOf():n;n=g(o)?o+"":o}if(typeof n!="string")return n===0?n:+n;n=n.replace(u,"");var c=i.test(n);return c||r.test(n)?l(n.slice(2),c?2:8):e.test(n)?NaN:+n}return Et=function(n,o,c){return c===void 0&&(c=o,o=void 0),c!==void 0&&(c=(c=d(c))==c?c:0),o!==void 0&&(o=(o=d(o))==o?o:0),(function(a,y,w){return a==a&&(w!==void 0&&(a=a<=w?a:w),y!==void 0&&(a=a>=y?a:y)),a})(d(n),o,c)}})()),ut={exports:{}},mi=(jt||(jt=1,(function(u,e){var i="__lodash_hash_undefined__",r=9007199254740991,l="[object Arguments]",m="[object Array]",g="[object Boolean]",d="[object Date]",n="[object Error]",o="[object Function]",c="[object Map]",a="[object Number]",y="[object Object]",w="[object Promise]",v="[object RegExp]",z="[object Set]",S="[object String]",p="[object Symbol]",_="[object WeakMap]",I="[object ArrayBuffer]",E="[object DataView]",C=/^\[object .+?Constructor\]$/,X=/^(?:0|[1-9]\d*)$/,h={};h["[object Float32Array]"]=h["[object Float64Array]"]=h["[object Int8Array]"]=h["[object Int16Array]"]=h["[object Int32Array]"]=h["[object Uint8Array]"]=h["[object Uint8ClampedArray]"]=h["[object Uint16Array]"]=h["[object Uint32Array]"]=!0,h[l]=h[m]=h[I]=h[g]=h[E]=h[d]=h[n]=h[o]=h[c]=h[a]=h[y]=h[v]=h[z]=h[S]=h[_]=!1;var L=typeof ve=="object"&&ve&&ve.Object===Object&&ve,K=typeof self=="object"&&self&&self.Object===Object&&self,F=L||K||Function("return this")(),oe=e&&!e.nodeType&&e,O=oe&&u&&!u.nodeType&&u,D=O&&O.exports===oe,k=D&&L.process,R=(function(){try{return k&&k.binding&&k.binding("util")}catch{}})(),N=R&&R.isTypedArray;function A(t,s){for(var f=-1,b=t==null?0:t.length;++f<b;)if(s(t[f],f,t))return!0;return!1}function W(t){var s=-1,f=Array(t.size);return t.forEach(function(b,T){f[++s]=[T,b]}),f}function ze(t){var s=-1,f=Array(t.size);return t.forEach(function(b){f[++s]=b}),f}var pe,J,we,Q=Array.prototype,le=Function.prototype,ce=Object.prototype,Le=F["__core-js_shared__"],Oe=le.toString,x=ce.hasOwnProperty,V=(pe=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||""))?"Symbol(src)_1."+pe:"",$=ce.toString,B=RegExp("^"+Oe.call(x).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Kt=D?F.Buffer:void 0,Ge=F.Symbol,Zt=F.Uint8Array,Qt=ce.propertyIsEnumerable,Ci=Q.splice,Se=Ge?Ge.toStringTag:void 0,qt=Object.getOwnPropertySymbols,Ti=Kt?Kt.isBuffer:void 0,Fi=(J=Object.keys,we=Object,function(t){return J(we(t))}),vt=Re(F,"DataView"),Ce=Re(F,"Map"),pt=Re(F,"Promise"),wt=Re(F,"Set"),yt=Re(F,"WeakMap"),Te=Re(Object,"create"),ki=Ee(vt),$i=Ee(Ce),Hi=Ee(pt),Bi=Ee(wt),Yi=Ee(yt),ei=Ge?Ge.prototype:void 0,gt=ei?ei.valueOf:void 0;function Ie(t){var s=-1,f=t==null?0:t.length;for(this.clear();++s<f;){var b=t[s];this.set(b[0],b[1])}}function he(t){var s=-1,f=t==null?0:t.length;for(this.clear();++s<f;){var b=t[s];this.set(b[0],b[1])}}function xe(t){var s=-1,f=t==null?0:t.length;for(this.clear();++s<f;){var b=t[s];this.set(b[0],b[1])}}function Ue(t){var s=-1,f=t==null?0:t.length;for(this.__data__=new xe;++s<f;)this.add(t[s])}function ye(t){var s=this.__data__=new he(t);this.size=s.size}function Wi(t,s){var f=Ke(t),b=!f&&Ki(t),T=!f&&!b&&bt(t),j=!f&&!b&&!T&&li(t),H=f||b||T||j,Y=H?(function(U,ae){for(var fe=-1,Z=Array(U);++fe<U;)Z[fe]=ae(fe);return Z})(t.length,String):[],se=Y.length;for(var G in t)!x.call(t,G)||H&&(G=="length"||T&&(G=="offset"||G=="parent")||j&&(G=="buffer"||G=="byteLength"||G=="byteOffset")||Ji(G,se))||Y.push(G);return Y}function Xe(t,s){for(var f=t.length;f--;)if(si(t[f][0],s))return f;return-1}function Fe(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Se&&Se in Object(t)?(function(s){var f=x.call(s,Se),b=s[Se];try{s[Se]=void 0;var T=!0}catch{}var j=$.call(s);return T&&(f?s[Se]=b:delete s[Se]),j})(t):(function(s){return $.call(s)})(t)}function ti(t){return ke(t)&&Fe(t)==l}function ii(t,s,f,b,T){return t===s||(t==null||s==null||!ke(t)&&!ke(s)?t!=t&&s!=s:(function(j,H,Y,se,G,U){var ae=Ke(j),fe=Ke(H),Z=ae?m:ge(j),de=fe?m:ge(H),Ne=(Z=Z==l?y:Z)==y,Ze=(de=de==l?y:de)==y,Me=Z==de;if(Me&&bt(j)){if(!bt(H))return!1;ae=!0,Ne=!1}if(Me&&!Ne)return U||(U=new ye),ae||li(j)?ni(j,H,Y,se,G,U):(function(P,M,Qe,be,_t,ne,me){switch(Qe){case E:if(P.byteLength!=M.byteLength||P.byteOffset!=M.byteOffset)return!1;P=P.buffer,M=M.buffer;case I:return!(P.byteLength!=M.byteLength||!ne(new Zt(P),new Zt(M)));case g:case d:case a:return si(+P,+M);case n:return P.name==M.name&&P.message==M.message;case v:case S:return P==M+"";case c:var _e=W;case z:var He=1&be;if(_e||(_e=ze),P.size!=M.size&&!He)return!1;var qe=me.get(P);if(qe)return qe==M;be|=2,me.set(P,M);var zt=ni(_e(P),_e(M),be,_t,ne,me);return me.delete(P),zt;case p:if(gt)return gt.call(P)==gt.call(M)}return!1})(j,H,Z,Y,se,G,U);if(!(1&Y)){var $e=Ne&&x.call(j,"__wrapped__"),ci=Ze&&x.call(H,"__wrapped__");if($e||ci){var Qi=$e?j.value():j,qi=ci?H.value():H;return U||(U=new ye),G(Qi,qi,Y,se,U)}}return!!Me&&(U||(U=new ye),(function(P,M,Qe,be,_t,ne){var me=1&Qe,_e=ri(P),He=_e.length,qe=ri(M),zt=qe.length;if(He!=zt&&!me)return!1;for(var et=He;et--;){var Ve=_e[et];if(!(me?Ve in M:x.call(M,Ve)))return!1}var hi=ne.get(P);if(hi&&ne.get(M))return hi==M;var tt=!0;ne.set(P,M),ne.set(M,P);for(var St=me;++et<He;){var it=P[Ve=_e[et]],nt=M[Ve];if(be)var fi=me?be(nt,it,Ve,M,P,ne):be(it,nt,Ve,P,M,ne);if(!(fi===void 0?it===nt||_t(it,nt,Qe,be,ne):fi)){tt=!1;break}St||(St=Ve=="constructor")}if(tt&&!St){var rt=P.constructor,st=M.constructor;rt==st||!("constructor"in P)||!("constructor"in M)||typeof rt=="function"&&rt instanceof rt&&typeof st=="function"&&st instanceof st||(tt=!1)}return ne.delete(P),ne.delete(M),tt})(j,H,Y,se,G,U))})(t,s,f,b,ii,T))}function Gi(t){return!(!ui(t)||(function(s){return!!V&&V in s})(t))&&(oi(t)?B:C).test(Ee(t))}function Ui(t){if(f=(s=t)&&s.constructor,b=typeof f=="function"&&f.prototype||ce,s!==b)return Fi(t);var s,f,b,T=[];for(var j in Object(t))x.call(t,j)&&j!="constructor"&&T.push(j);return T}function ni(t,s,f,b,T,j){var H=1&f,Y=t.length,se=s.length;if(Y!=se&&!(H&&se>Y))return!1;var G=j.get(t);if(G&&j.get(s))return G==s;var U=-1,ae=!0,fe=2&f?new Ue:void 0;for(j.set(t,s),j.set(s,t);++U<Y;){var Z=t[U],de=s[U];if(b)var Ne=H?b(de,Z,U,s,t,j):b(Z,de,U,t,s,j);if(Ne!==void 0){if(Ne)continue;ae=!1;break}if(fe){if(!A(s,function(Ze,Me){if($e=Me,!fe.has($e)&&(Z===Ze||T(Z,Ze,f,b,j)))return fe.push(Me);var $e})){ae=!1;break}}else if(Z!==de&&!T(Z,de,f,b,j)){ae=!1;break}}return j.delete(t),j.delete(s),ae}function ri(t){return(function(s,f,b){var T=f(s);return Ke(s)?T:(function(j,H){for(var Y=-1,se=H.length,G=j.length;++Y<se;)j[G+Y]=H[Y];return j})(T,b(s))})(t,Zi,Xi)}function Je(t,s){var f,b,T=t.__data__;return((b=typeof(f=s))=="string"||b=="number"||b=="symbol"||b=="boolean"?f!=="__proto__":f===null)?T[typeof s=="string"?"string":"hash"]:T.map}function Re(t,s){var f=(function(b,T){return b==null?void 0:b[T]})(t,s);return Gi(f)?f:void 0}Ie.prototype.clear=function(){this.__data__=Te?Te(null):{},this.size=0},Ie.prototype.delete=function(t){var s=this.has(t)&&delete this.__data__[t];return this.size-=s?1:0,s},Ie.prototype.get=function(t){var s=this.__data__;if(Te){var f=s[t];return f===i?void 0:f}return x.call(s,t)?s[t]:void 0},Ie.prototype.has=function(t){var s=this.__data__;return Te?s[t]!==void 0:x.call(s,t)},Ie.prototype.set=function(t,s){var f=this.__data__;return this.size+=this.has(t)?0:1,f[t]=Te&&s===void 0?i:s,this},he.prototype.clear=function(){this.__data__=[],this.size=0},he.prototype.delete=function(t){var s=this.__data__,f=Xe(s,t);return!(f<0||(f==s.length-1?s.pop():Ci.call(s,f,1),--this.size,0))},he.prototype.get=function(t){var s=this.__data__,f=Xe(s,t);return f<0?void 0:s[f][1]},he.prototype.has=function(t){return Xe(this.__data__,t)>-1},he.prototype.set=function(t,s){var f=this.__data__,b=Xe(f,t);return b<0?(++this.size,f.push([t,s])):f[b][1]=s,this},xe.prototype.clear=function(){this.size=0,this.__data__={hash:new Ie,map:new(Ce||he),string:new Ie}},xe.prototype.delete=function(t){var s=Je(this,t).delete(t);return this.size-=s?1:0,s},xe.prototype.get=function(t){return Je(this,t).get(t)},xe.prototype.has=function(t){return Je(this,t).has(t)},xe.prototype.set=function(t,s){var f=Je(this,t),b=f.size;return f.set(t,s),this.size+=f.size==b?0:1,this},Ue.prototype.add=Ue.prototype.push=function(t){return this.__data__.set(t,i),this},Ue.prototype.has=function(t){return this.__data__.has(t)},ye.prototype.clear=function(){this.__data__=new he,this.size=0},ye.prototype.delete=function(t){var s=this.__data__,f=s.delete(t);return this.size=s.size,f},ye.prototype.get=function(t){return this.__data__.get(t)},ye.prototype.has=function(t){return this.__data__.has(t)},ye.prototype.set=function(t,s){var f=this.__data__;if(f instanceof he){var b=f.__data__;if(!Ce||b.length<199)return b.push([t,s]),this.size=++f.size,this;f=this.__data__=new xe(b)}return f.set(t,s),this.size=f.size,this};var Xi=qt?function(t){return t==null?[]:(t=Object(t),(function(s,f){for(var b=-1,T=s==null?0:s.length,j=0,H=[];++b<T;){var Y=s[b];f(Y,b,s)&&(H[j++]=Y)}return H})(qt(t),function(s){return Qt.call(t,s)}))}:function(){return[]},ge=Fe;function Ji(t,s){return!!(s=s??r)&&(typeof t=="number"||X.test(t))&&t>-1&&t%1==0&&t<s}function Ee(t){if(t!=null){try{return Oe.call(t)}catch{}try{return t+""}catch{}}return""}function si(t,s){return t===s||t!=t&&s!=s}(vt&&ge(new vt(new ArrayBuffer(1)))!=E||Ce&&ge(new Ce)!=c||pt&&ge(pt.resolve())!=w||wt&&ge(new wt)!=z||yt&&ge(new yt)!=_)&&(ge=function(t){var s=Fe(t),f=s==y?t.constructor:void 0,b=f?Ee(f):"";if(b)switch(b){case ki:return E;case $i:return c;case Hi:return w;case Bi:return z;case Yi:return _}return s});var Ki=ti((function(){return arguments})())?ti:function(t){return ke(t)&&x.call(t,"callee")&&!Qt.call(t,"callee")},Ke=Array.isArray,bt=Ti||function(){return!1};function oi(t){if(!ui(t))return!1;var s=Fe(t);return s==o||s=="[object GeneratorFunction]"||s=="[object AsyncFunction]"||s=="[object Proxy]"}function ai(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=r}function ui(t){var s=typeof t;return t!=null&&(s=="object"||s=="function")}function ke(t){return t!=null&&typeof t=="object"}var li=N?(function(t){return function(s){return t(s)}})(N):function(t){return ke(t)&&ai(t.length)&&!!h[Fe(t)]};function Zi(t){return(s=t)!=null&&ai(s.length)&&!oi(s)?Wi(t):Ui(t);var s}u.exports=function(t,s){return ii(t,s)}})(ut,ut.exports)),ut.exports),vi=Pe(mi);function Dt(u,e,i){return u[e]?u[e][0]?u[e][0][i]:u[e][i]:e==="contentBoxSize"?u.contentRect[i==="inlineSize"?"width":"height"]:void 0}function pi(u){u===void 0&&(u={});var e=u.onResize,i=window.React.useRef(void 0);i.current=e;var r=u.round||Math.round,l=window.React.useRef(),m=window.React.useState({width:void 0,height:void 0}),g=m[0],d=m[1],n=window.React.useRef(!1);window.React.useEffect(function(){return n.current=!1,function(){n.current=!0}},[]);var o=window.React.useRef({width:void 0,height:void 0}),c=(function(a,y){var w=window.React.useRef(null),v=window.React.useRef(null);v.current=y;var z=window.React.useRef(null);window.React.useEffect(function(){S()});var S=window.React.useCallback(function(){var p=z.current,_=v.current,I=p||(_?_ instanceof Element?_:_.current:null);w.current&&w.current.element===I&&w.current.subscriber===a||(w.current&&w.current.cleanup&&w.current.cleanup(),w.current={element:I,subscriber:a,cleanup:I?a(I):void 0})},[a]);return window.React.useEffect(function(){return function(){w.current&&w.current.cleanup&&(w.current.cleanup(),w.current=null)}},[]),window.React.useCallback(function(p){z.current=p,S()},[S])})(window.React.useCallback(function(a){return l.current&&l.current.box===u.box&&l.current.round===r||(l.current={box:u.box,round:r,instance:new ResizeObserver(function(y){var w=y[0],v=u.box==="border-box"?"borderBoxSize":u.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",z=Dt(w,v,"inlineSize"),S=Dt(w,v,"blockSize"),p=z?r(z):void 0,_=S?r(S):void 0;if(o.current.width!==p||o.current.height!==_){var I={width:p,height:_};o.current.width=p,o.current.height=_,i.current?i.current(I):n.current||d(I)}})}),l.current.instance.observe(a,{box:u.box}),function(){l.current&&l.current.instance.unobserve(a)}},[u.box,r]),u.ref);return window.React.useMemo(function(){return{ref:c,width:g.width,height:g.height}},[c,g.width,g.height])}var wi="allotment-module_splitView__L-yRc",yi="allotment-module_sashContainer__fzwJF",gi="allotment-module_splitViewContainer__rQnVa",Lt="allotment-module_splitViewView__MGZ6O",bi="allotment-module_vertical__WSwwa",_i="allotment-module_horizontal__7doS8",zi="allotment-module_separatorBorder__x-rDS";let Ae,Ot=!1,Rt=!1;typeof navigator=="object"&&(Ae=navigator.userAgent,Rt=Ae.indexOf("Macintosh")>=0,Ot=(Ae.indexOf("Macintosh")>=0||Ae.indexOf("iPad")>=0||Ae.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0);const Nt=Ot,Si=Rt,Mt=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?window.React.useLayoutEffect:window.React.useEffect;class Ii{constructor(){this._size=void 0}getSize(){return this._size}setSize(e){this._size=e}}function Be(u,e){const i=u.length,r=i-e.length;return r>=0&&u.slice(r,i)===e}var Pt,At={exports:{}},Ct,Tt,xi=(Pt||(Pt=1,(function(u){var e=Object.prototype.hasOwnProperty,i="~";function r(){}function l(n,o,c){this.fn=n,this.context=o,this.once=c||!1}function m(n,o,c,a,y){if(typeof c!="function")throw new TypeError("The listener must be a function");var w=new l(c,a||n,y),v=i?i+o:o;return n._events[v]?n._events[v].fn?n._events[v]=[n._events[v],w]:n._events[v].push(w):(n._events[v]=w,n._eventsCount++),n}function g(n,o){--n._eventsCount==0?n._events=new r:delete n._events[o]}function d(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(i=!1)),d.prototype.eventNames=function(){var n,o,c=[];if(this._eventsCount===0)return c;for(o in n=this._events)e.call(n,o)&&c.push(i?o.slice(1):o);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(n)):c},d.prototype.listeners=function(n){var o=i?i+n:n,c=this._events[o];if(!c)return[];if(c.fn)return[c.fn];for(var a=0,y=c.length,w=new Array(y);a<y;a++)w[a]=c[a].fn;return w},d.prototype.listenerCount=function(n){var o=i?i+n:n,c=this._events[o];return c?c.fn?1:c.length:0},d.prototype.emit=function(n,o,c,a,y,w){var v=i?i+n:n;if(!this._events[v])return!1;var z,S,p=this._events[v],_=arguments.length;if(p.fn){switch(p.once&&this.removeListener(n,p.fn,void 0,!0),_){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,o),!0;case 3:return p.fn.call(p.context,o,c),!0;case 4:return p.fn.call(p.context,o,c,a),!0;case 5:return p.fn.call(p.context,o,c,a,y),!0;case 6:return p.fn.call(p.context,o,c,a,y,w),!0}for(S=1,z=new Array(_-1);S<_;S++)z[S-1]=arguments[S];p.fn.apply(p.context,z)}else{var I,E=p.length;for(S=0;S<E;S++)switch(p[S].once&&this.removeListener(n,p[S].fn,void 0,!0),_){case 1:p[S].fn.call(p[S].context);break;case 2:p[S].fn.call(p[S].context,o);break;case 3:p[S].fn.call(p[S].context,o,c);break;case 4:p[S].fn.call(p[S].context,o,c,a);break;default:if(!z)for(I=1,z=new Array(_-1);I<_;I++)z[I-1]=arguments[I];p[S].fn.apply(p[S].context,z)}}return!0},d.prototype.on=function(n,o,c){return m(this,n,o,c,!1)},d.prototype.once=function(n,o,c){return m(this,n,o,c,!0)},d.prototype.removeListener=function(n,o,c,a){var y=i?i+n:n;if(!this._events[y])return this;if(!o)return g(this,y),this;var w=this._events[y];if(w.fn)w.fn!==o||a&&!w.once||c&&w.context!==c||g(this,y);else{for(var v=0,z=[],S=w.length;v<S;v++)(w[v].fn!==o||a&&!w[v].once||c&&w[v].context!==c)&&z.push(w[v]);z.length?this._events[y]=z.length===1?z[0]:z:g(this,y)}return this},d.prototype.removeAllListeners=function(n){var o;return n?(o=i?i+n:n,this._events[o]&&g(this,o)):(this._events=new r,this._eventsCount=0),this},d.prototype.off=d.prototype.removeListener,d.prototype.addListener=d.prototype.on,d.prefixed=i,d.EventEmitter=d,u.exports=d})(At)),At.exports),lt=Pe(xi);function Ft(u,e){const i=u.indexOf(e);i>-1&&(u.splice(i,1),u.unshift(e))}function ct(u,e){const i=u.indexOf(e);i>-1&&(u.splice(i,1),u.push(e))}function ee(u,e,i=1){const r=Math.max(0,Math.ceil((e-u)/i)),l=new Array(r);let m=-1;for(;++m<r;)l[m]=u+m*i;return l}var Ei=Pe((function(){if(Tt)return Ct;Tt=1;var u=/^\s+|\s+$/g,e=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,r=/^0o[0-7]+$/i,l=parseInt,m=typeof ve=="object"&&ve&&ve.Object===Object&&ve,g=typeof self=="object"&&self&&self.Object===Object&&self,d=m||g||Function("return this")(),n=Object.prototype.toString,o=Math.max,c=Math.min,a=function(){return d.Date.now()};function y(v){var z=typeof v;return!!v&&(z=="object"||z=="function")}function w(v){if(typeof v=="number")return v;if((function(p){return typeof p=="symbol"||(function(_){return!!_&&typeof _=="object"})(p)&&n.call(p)=="[object Symbol]"})(v))return NaN;if(y(v)){var z=typeof v.valueOf=="function"?v.valueOf():v;v=y(z)?z+"":z}if(typeof v!="string")return v===0?v:+v;v=v.replace(u,"");var S=i.test(v);return S||r.test(v)?l(v.slice(2),S?2:8):e.test(v)?NaN:+v}return Ct=function(v,z,S){var p,_,I,E,C,X,h=0,L=!1,K=!1,F=!0;if(typeof v!="function")throw new TypeError("Expected a function");function oe(N){var A=p,W=_;return p=_=void 0,h=N,E=v.apply(W,A)}function O(N){var A=N-X;return X===void 0||A>=z||A<0||K&&N-h>=I}function D(){var N=a();if(O(N))return k(N);C=setTimeout(D,(function(A){var W=z-(A-X);return K?c(W,I-(A-h)):W})(N))}function k(N){return C=void 0,F&&p?oe(N):(p=_=void 0,E)}function R(){var N=a(),A=O(N);if(p=arguments,_=this,X=N,A){if(C===void 0)return(function(W){return h=W,C=setTimeout(D,z),L?oe(W):E})(X);if(K)return C=setTimeout(D,z),oe(X)}return C===void 0&&(C=setTimeout(D,z)),E}return z=w(z)||0,y(S)&&(L=!!S.leading,I=(K="maxWait"in S)?o(w(S.maxWait)||0,z):I,F="trailing"in S?!!S.trailing:F),R.cancel=function(){C!==void 0&&clearTimeout(C),h=0,p=X=_=C=void 0},R.flush=function(){return C===void 0?E:k(a())},R}})()),Vi="sash-module_sash__K-9lB",ji="sash-module_disabled__Hm-wx",Di="sash-module_mac__Jf6OJ",kt="sash-module_vertical__pB-rs",Li="sash-module_minimum__-UKxp",Oi="sash-module_maximum__TCWxD",$t="sash-module_horizontal__kFbiw",ht="sash-module_hover__80W6I",ft="sash-module_active__bJspD";let te=(function(u){return u.Vertical="VERTICAL",u.Horizontal="HORIZONTAL",u})({}),q=(function(u){return u.Disabled="DISABLED",u.Minimum="MINIMUM",u.Maximum="MAXIMUM",u.Enabled="ENABLED",u})({}),Ht=Nt?20:8;const Bt=new lt;class Yt extends lt{get state(){return this._state}set state(e){this._state!==e&&(this.el.classList.toggle(ji,e===q.Disabled),this.el.classList.toggle("sash-disabled",e===q.Disabled),this.el.classList.toggle(Li,e===q.Minimum),this.el.classList.toggle("sash-minimum",e===q.Minimum),this.el.classList.toggle(Oi,e===q.Maximum),this.el.classList.toggle("sash-maximum",e===q.Maximum),this._state=e,this.emit("enablementChange",e))}constructor(e,i,r){var l;super(),this.el=void 0,this.layoutProvider=void 0,this.orientation=void 0,this.size=void 0,this.hoverDelay=300,this.hoverDelayer=Ei(m=>m.classList.add("sash-hover",ht),this.hoverDelay),this._state=q.Enabled,this.onPointerStart=m=>{const g=m.pageX,d=m.pageY,n={startX:g,currentX:g,startY:d,currentY:d};this.el.classList.add("sash-active",ft),this.emit("start",n),this.el.setPointerCapture(m.pointerId);const o=a=>{a.preventDefault();const y={startX:g,currentX:a.pageX,startY:d,currentY:a.pageY};this.emit("change",y)},c=a=>{a.preventDefault(),this.el.classList.remove("sash-active",ft),this.hoverDelayer.cancel(),this.emit("end"),this.el.releasePointerCapture(a.pointerId),window.removeEventListener("pointermove",o),window.removeEventListener("pointerup",c)};window.addEventListener("pointermove",o),window.addEventListener("pointerup",c)},this.onPointerDoublePress=()=>{this.emit("reset")},this.onMouseEnter=()=>{this.el.classList.contains(ft)?(this.hoverDelayer.cancel(),this.el.classList.add("sash-hover",ht)):this.hoverDelayer(this.el)},this.onMouseLeave=()=>{this.hoverDelayer.cancel(),this.el.classList.remove("sash-hover",ht)},this.el=document.createElement("div"),this.el.classList.add("sash",Vi),this.el.dataset.testid="sash",e.append(this.el),Si&&this.el.classList.add("sash-mac",Di),this.el.addEventListener("pointerdown",this.onPointerStart),this.el.addEventListener("dblclick",this.onPointerDoublePress),this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("mouseleave",this.onMouseLeave),typeof r.size=="number"?(this.size=r.size,r.orientation===te.Vertical?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=Ht,Bt.on("onDidChangeGlobalSize",m=>{this.size=m,this.layout()})),this.layoutProvider=i,this.orientation=(l=r.orientation)!=null?l:te.Vertical,this.orientation===te.Horizontal?(this.el.classList.add("sash-horizontal",$t),this.el.classList.remove("sash-vertical",kt)):(this.el.classList.remove("sash-horizontal",$t),this.el.classList.add("sash-vertical",kt)),this.layout()}layout(){if(this.orientation===te.Vertical){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}dispose(){this.el.removeEventListener("pointerdown",this.onPointerStart),this.el.removeEventListener("dblclick",this.onPointerDoublePress),this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("mouseleave",()=>this.onMouseLeave),this.el.remove()}}let Ye;var dt;(dt=Ye||(Ye={})).Distribute={type:"distribute"},dt.Split=function(u){return{type:"split",index:u}},dt.Invisible=function(u){return{type:"invisible",cachedVisibleSize:u}};let ie=(function(u){return u.Normal="NORMAL",u.Low="LOW",u.High="HIGH",u})({});class Wt{constructor(e,i,r){this.container=void 0,this.view=void 0,this._size=void 0,this._cachedVisibleSize=void 0,this.container=e,this.view=i,this.container.classList.add("split-view-view",Lt),this.container.dataset.testid="split-view-view",typeof r=="number"?(this._size=r,this._cachedVisibleSize=void 0,e.classList.add("split-view-view-visible")):(this._size=0,this._cachedVisibleSize=r.cachedVisibleSize)}set size(e){this._size=e}get size(){return this._size}get priority(){return this.view.priority}get snap(){return!!this.view.snap}get cachedVisibleSize(){return this._cachedVisibleSize}get visible(){return this._cachedVisibleSize===void 0}setVisible(e,i){e!==this.visible&&(e?(this.size=re(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof i=="number"?i:this.size,this.size=0),this.container.classList.toggle("split-view-view-visible",e),this.view.setVisible&&this.view.setVisible(e))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}set enabled(e){this.container.style.pointerEvents=e?"":"none"}layout(e){this.layoutContainer(e),this.view.layout(this.size,e)}}class Ri extends Wt{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}class Ni extends Wt{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class Mi extends lt{get startSnappingEnabled(){return this._startSnappingEnabled}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}get endSnappingEnabled(){return this._endSnappingEnabled}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,i={},r,l,m){var g,d;if(super(),this.onDidChange=void 0,this.onDidDragStart=void 0,this.onDidDragEnd=void 0,this.orientation=void 0,this.sashContainer=void 0,this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.sashDragState=void 0,this.proportionalLayout=void 0,this.getSashOrthogonalSize=void 0,this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onSashEnd=n=>{this.emit("sashchange",n),this.saveProportions();for(const o of this.viewItems)o.enabled=!0},this.orientation=(g=i.orientation)!=null?g:te.Vertical,this.proportionalLayout=(d=i.proportionalLayout)!=null?d:!0,this.getSashOrthogonalSize=i.getSashOrthogonalSize,r&&(this.onDidChange=r),l&&(this.onDidDragStart=l),m&&(this.onDidDragEnd=m),this.sashContainer=document.createElement("div"),this.sashContainer.classList.add("sash-container",yi),e.prepend(this.sashContainer),i.descriptor){this.size=i.descriptor.size;for(const[n,o]of i.descriptor.views.entries()){const c=o.size,a=o.container,y=o.view;this.addView(a,y,c,n,!0)}this.contentSize=this.viewItems.reduce((n,o)=>n+o.size,0),this.saveProportions()}}addView(e,i,r,l=this.viewItems.length,m){let g;g=typeof r=="number"?r:r.type==="split"?this.getViewSize(r.index)/2:r.type==="invisible"?{cachedVisibleSize:r.cachedVisibleSize}:i.minimumSize;const d=this.orientation===te.Vertical?new Ni(e,i,g):new Ri(e,i,g);if(this.viewItems.splice(l,0,d),this.viewItems.length>1){const n=this.orientation===te.Vertical?new Yt(this.sashContainer,{getHorizontalSashTop:a=>this.getSashPosition(a),getHorizontalSashWidth:this.getSashOrthogonalSize},{orientation:te.Horizontal}):new Yt(this.sashContainer,{getVerticalSashLeft:a=>this.getSashPosition(a),getVerticalSashHeight:this.getSashOrthogonalSize},{orientation:te.Vertical}),o=this.orientation===te.Vertical?a=>({sash:n,start:a.startY,current:a.currentY}):a=>({sash:n,start:a.startX,current:a.currentX});n.on("start",a=>{var y;this.emit("sashDragStart"),this.onSashStart(o(a));const w=this.viewItems.map(v=>v.size);(y=this.onDidDragStart)==null||y.call(this,w)}),n.on("change",a=>this.onSashChange(o(a))),n.on("end",()=>{var a;this.emit("sashDragEnd"),this.onSashEnd(this.sashItems.findIndex(w=>w.sash===n));const y=this.viewItems.map(w=>w.size);(a=this.onDidDragEnd)==null||a.call(this,y)}),n.on("reset",()=>{const a=this.sashItems.findIndex(S=>S.sash===n),y=ee(a,-1,-1),w=ee(a+1,this.viewItems.length),v=this.findFirstSnapIndex(y),z=this.findFirstSnapIndex(w);(typeof v!="number"||this.viewItems[v].visible)&&(typeof z!="number"||this.viewItems[z].visible)&&this.emit("sashreset",a)});const c={sash:n};this.sashItems.splice(l-1,0,c)}m||this.relayout(),m||typeof r=="number"||r.type!=="distribute"||this.distributeViewSizes()}removeView(e,i){if(e<0||e>=this.viewItems.length)throw new Error("Index out of bounds");const r=this.viewItems.splice(e,1)[0].view;if(this.viewItems.length>=1){const l=Math.max(e-1,0);this.sashItems.splice(l,1)[0].sash.dispose()}return this.relayout(),i&&i.type==="distribute"&&this.distributeViewSizes(),r}moveView(e,i,r){const l=this.getViewCachedVisibleSize(i),m=l===void 0?this.getViewSize(i):Ye.Invisible(l),g=this.removeView(i);this.addView(e,g,m,r)}getViewCachedVisibleSize(e){if(e<0||e>=this.viewItems.length)throw new Error("Index out of bounds");return this.viewItems[e].cachedVisibleSize}layout(e=this.size){const i=Math.max(this.size,this.contentSize);if(this.size=e,this.proportions)for(let r=0;r<this.viewItems.length;r++){const l=this.viewItems[r];l.size=re(Math.round(this.proportions[r]*e),l.minimumSize,l.maximumSize)}else{const r=ee(0,this.viewItems.length),l=r.filter(g=>this.viewItems[g].priority===ie.Low),m=r.filter(g=>this.viewItems[g].priority===ie.High);this.resize(this.viewItems.length-1,e-i,void 0,l,m)}this.distributeEmptySpace(),this.layoutViews()}resizeView(e,i){if(e<0||e>=this.viewItems.length)return;const r=ee(0,this.viewItems.length).filter(d=>d!==e),l=[...r.filter(d=>this.viewItems[d].priority===ie.Low),e],m=r.filter(d=>this.viewItems[d].priority===ie.High),g=this.viewItems[e];i=Math.round(i),i=re(i,g.minimumSize,Math.min(g.maximumSize,this.size)),g.size=i,this.relayout(l,m)}resizeViews(e){for(let i=0;i<e.length;i++){const r=this.viewItems[i];let l=e[i];l=Math.round(l),l=re(l,r.minimumSize,Math.min(r.maximumSize,this.size)),r.size=l}this.contentSize=this.viewItems.reduce((i,r)=>i+r.size,0),this.saveProportions(),this.layout(this.size)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}isViewVisible(e){if(e<0||e>=this.viewItems.length)throw new Error("Index out of bounds");return this.viewItems[e].visible}setViewVisible(e,i){if(e<0||e>=this.viewItems.length)throw new Error("Index out of bounds");this.viewItems[e].setVisible(i),this.distributeEmptySpace(e),this.layoutViews(),this.saveProportions()}distributeViewSizes(){const e=[];let i=0;for(const d of this.viewItems)d.maximumSize-d.minimumSize>0&&(e.push(d),i+=d.size);const r=Math.floor(i/e.length);for(const d of e)d.size=re(r,d.minimumSize,d.maximumSize);const l=ee(0,this.viewItems.length),m=l.filter(d=>this.viewItems[d].priority===ie.Low),g=l.filter(d=>this.viewItems[d].priority===ie.High);this.relayout(m,g)}dispose(){this.sashItems.forEach(e=>e.sash.dispose()),this.sashItems=[],this.sashContainer.remove()}relayout(e,i){const r=this.viewItems.reduce((l,m)=>l+m.size,0);this.resize(this.viewItems.length-1,this.size-r,void 0,e,i),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}onSashStart({sash:e,start:i}){const r=this.sashItems.findIndex(l=>l.sash===e);(l=>{const m=this.viewItems.map(_=>_.size);let g,d,n=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;const c=ee(r,-1,-1),a=ee(r+1,this.viewItems.length),y=c.reduce((_,I)=>_+(this.viewItems[I].minimumSize-m[I]),0),w=c.reduce((_,I)=>_+(this.viewItems[I].viewMaximumSize-m[I]),0),v=a.length===0?Number.POSITIVE_INFINITY:a.reduce((_,I)=>_+(m[I]-this.viewItems[I].minimumSize),0),z=a.length===0?Number.NEGATIVE_INFINITY:a.reduce((_,I)=>_+(m[I]-this.viewItems[I].viewMaximumSize),0);n=Math.max(y,z),o=Math.min(v,w);const S=this.findFirstSnapIndex(c),p=this.findFirstSnapIndex(a);if(typeof S=="number"){const _=this.viewItems[S],I=Math.floor(_.viewMinimumSize/2);g={index:S,limitDelta:_.visible?n-I:n+I,size:_.size}}if(typeof p=="number"){const _=this.viewItems[p],I=Math.floor(_.viewMinimumSize/2);d={index:p,limitDelta:_.visible?o+I:o-I,size:_.size}}this.sashDragState={start:l,current:l,index:r,sizes:m,minDelta:n,maxDelta:o,snapBefore:g,snapAfter:d}})(i)}onSashChange({current:e}){const{index:i,start:r,sizes:l,minDelta:m,maxDelta:g,snapBefore:d,snapAfter:n}=this.sashDragState;this.sashDragState.current=e;const o=e-r;this.resize(i,o,l,void 0,void 0,m,g,d,n),this.distributeEmptySpace(),this.layoutViews()}getSashPosition(e){let i=0;for(let r=0;r<this.sashItems.length;r++)if(i+=this.viewItems[r].size,this.sashItems[r].sash===e)return i;return 0}resize(e,i,r=this.viewItems.map(c=>c.size),l,m,g=Number.NEGATIVE_INFINITY,d=Number.POSITIVE_INFINITY,n,o){if(e<0||e>=this.viewItems.length)return 0;const c=ee(e,-1,-1),a=ee(e+1,this.viewItems.length);if(m)for(const h of m)Ft(c,h),Ft(a,h);if(l)for(const h of l)ct(c,h),ct(a,h);const y=c.map(h=>this.viewItems[h]),w=c.map(h=>r[h]),v=a.map(h=>this.viewItems[h]),z=a.map(h=>r[h]),S=c.reduce((h,L)=>h+(this.viewItems[L].minimumSize-r[L]),0),p=c.reduce((h,L)=>h+(this.viewItems[L].maximumSize-r[L]),0),_=a.length===0?Number.POSITIVE_INFINITY:a.reduce((h,L)=>h+(r[L]-this.viewItems[L].minimumSize),0),I=a.length===0?Number.NEGATIVE_INFINITY:a.reduce((h,L)=>h+(r[L]-this.viewItems[L].maximumSize),0),E=Math.max(S,I,g),C=Math.min(_,p,d);let X=!1;if(n){const h=this.viewItems[n.index],L=i>=n.limitDelta;X=L!==h.visible,h.setVisible(L,n.size)}if(!X&&o){const h=this.viewItems[o.index],L=i<o.limitDelta;X=L!==h.visible,h.setVisible(L,o.size)}if(X)return this.resize(e,i,r,l,m,g,d);for(let h=0,L=i=re(i,E,C);h<y.length;h++){const K=y[h],F=re(w[h]+L,K.minimumSize,K.maximumSize);L-=F-w[h],K.size=F}for(let h=0,L=i;h<v.length;h++){const K=v[h],F=re(z[h]-L,K.minimumSize,K.maximumSize);L+=F-z[h],K.size=F}return i}distributeEmptySpace(e){const i=this.viewItems.reduce((o,c)=>o+c.size,0);let r=this.size-i;const l=ee(0,this.viewItems.length),m=[],g=l.filter(o=>this.viewItems[o].priority===ie.Low),d=l.filter(o=>this.viewItems[o].priority===ie.Normal),n=l.filter(o=>this.viewItems[o].priority===ie.High);m.push(...n,...d,...g),typeof e=="number"&&ct(m,e);for(let o=0;r!==0&&o<m.length;o++){const c=this.viewItems[m[o]],a=re(c.size+r,c.minimumSize,c.maximumSize);r-=a-c.size,c.size=a}}layoutViews(){var e;this.contentSize=this.viewItems.reduce((r,l)=>r+l.size,0);let i=0;for(const r of this.viewItems)r.layout(i),i+=r.size;(e=this.onDidChange)!=null&&e.call(this,this.viewItems.map(r=>r.size)),this.sashItems.forEach(r=>r.sash.layout()),this.updateSashEnablement()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(e=>e.size/this.contentSize))}updateSashEnablement(){let e=!1;const i=this.viewItems.map(n=>e=n.size-n.minimumSize>0||e);e=!1;const r=this.viewItems.map(n=>e=n.maximumSize-n.size>0||e),l=[...this.viewItems].reverse();e=!1;const m=l.map(n=>e=n.size-n.minimumSize>0||e).reverse();e=!1;const g=l.map(n=>e=n.maximumSize-n.size>0||e).reverse();let d=0;for(let n=0;n<this.sashItems.length;n++){const{sash:o}=this.sashItems[n];d+=this.viewItems[n].size;const c=!(i[n]&&g[n+1]),a=!(r[n]&&m[n+1]);if(c&&a){const y=ee(n,-1,-1),w=ee(n+1,this.viewItems.length),v=this.findFirstSnapIndex(y),z=this.findFirstSnapIndex(w),S=typeof v=="number"&&!this.viewItems[v].visible,p=typeof z=="number"&&!this.viewItems[z].visible;S&&m[n]&&(d>0||this.startSnappingEnabled)?o.state=q.Minimum:p&&i[n]&&(d<this.contentSize||this.endSnappingEnabled)?o.state=q.Maximum:o.state=q.Disabled}else o.state=c&&!a?q.Minimum:!c&&a?q.Maximum:q.Enabled}}findFirstSnapIndex(e){for(const i of e){const r=this.viewItems[i];if(r.visible&&r.snap)return i}for(const i of e){const r=this.viewItems[i];if(r.visible&&r.maximumSize-r.minimumSize>0)return;if(!r.visible&&r.snap)return i}}}class De{constructor(e){this.size=void 0,this.size=e}getPreferredSize(){return this.size}}class Gt{constructor(e,i){this.proportion=void 0,this.layoutService=void 0,this.proportion=e,this.layoutService=i}getPreferredSize(){return this.proportion*this.layoutService.getSize()}}class We{getPreferredSize(){}}class Ut{get preferredSize(){return this.layoutStrategy.getPreferredSize()}set preferredSize(e){if(typeof e=="number")this.layoutStrategy=new De(e);else if(typeof e=="string"){const i=e.trim();if(Be(i,"%")){const r=Number(i.slice(0,-1))/100;this.layoutStrategy=new Gt(r,this.layoutService)}else if(Be(i,"px")){const r=Number(i.slice(0,-2))/100;this.layoutStrategy=new De(r)}else if(typeof Number.parseFloat(i)=="number"){const r=Number.parseFloat(i);this.layoutStrategy=new De(r)}else this.layoutStrategy=new We}else this.layoutStrategy=new We}constructor(e,i){var r;if(this.minimumSize=0,this.maximumSize=Number.POSITIVE_INFINITY,this.element=void 0,this.priority=void 0,this.snap=void 0,this.layoutService=void 0,this.layoutStrategy=void 0,this.layoutService=e,this.element=i.element,this.minimumSize=typeof i.minimumSize=="number"?i.minimumSize:30,this.maximumSize=typeof i.maximumSize=="number"?i.maximumSize:Number.POSITIVE_INFINITY,typeof i.preferredSize=="number")this.layoutStrategy=new De(i.preferredSize);else if(typeof i.preferredSize=="string"){const l=i.preferredSize.trim();if(Be(l,"%")){const m=Number(l.slice(0,-1))/100;this.layoutStrategy=new Gt(m,this.layoutService)}else if(Be(l,"px")){const m=Number(l.slice(0,-2));this.layoutStrategy=new De(m)}else if(typeof Number.parseFloat(l)=="number"){const m=Number.parseFloat(l);this.layoutStrategy=new De(m)}else this.layoutStrategy=new We}else this.layoutStrategy=new We;this.priority=(r=i.priority)!=null?r:ie.Normal,this.snap=typeof i.snap=="boolean"&&i.snap}layout(e){}}function Xt(u){return u.minSize!==void 0||u.maxSize!==void 0||u.preferredSize!==void 0||u.priority!==void 0||u.visible!==void 0}const mt=window.React.forwardRef(({className:u,children:e},i)=>window.React.createElement("div",{ref:i,className:at("split-view-view",Lt,u)},e));mt.displayName="Allotment.Pane";const Jt=window.React.forwardRef(({children:u,className:e,id:i,maxSize:r=1/0,minSize:l=30,proportionalLayout:m=!0,separator:g=!0,sizes:d,defaultSizes:n=d,snap:o=!1,vertical:c=!1,onChange:a,onReset:y,onVisibleChange:w,onDragStart:v,onDragEnd:z},S)=>{const p=window.React.useRef(null),_=window.React.useRef([]),I=window.React.useRef(new Map),E=window.React.useRef(null),C=window.React.useRef(new Map),X=window.React.useRef(new Ii),h=window.React.useRef([]),[L,K]=window.React.useState(!1),F=window.React.useMemo(()=>window.React.Children.toArray(u).filter(window.React.isValidElement),[u]),oe=window.React.useCallback(O=>{var D,k;const R=(D=h.current)==null?void 0:D[O];return typeof(R==null?void 0:R.preferredSize)=="number"&&((k=E.current)!=null&&k.resizeView(O,Math.round(R.preferredSize)),!0)},[]);return window.React.useImperativeHandle(S,()=>({reset:()=>{if(y)y();else{var O;(O=E.current)==null||O.distributeViewSizes();for(let D=0;D<h.current.length;D++)oe(D)}},resize:O=>{var D;(D=E.current)==null||D.resizeViews(O)}})),Mt(()=>{let O=!0;n&&C.current.size!==n.length&&(O=!1,console.warn(`Expected ${n.length} children based on defaultSizes but found ${C.current.size}`)),O&&n&&(_.current=F.map(R=>R.key));const D=ue({orientation:c?te.Vertical:te.Horizontal,proportionalLayout:m},O&&n&&{descriptor:{size:n.reduce((R,N)=>R+N,0),views:n.map((R,N)=>{var A,W,ze,pe;const J=I.current.get(_.current[N]),we=new Ut(X.current,ue({element:document.createElement("div"),minimumSize:(A=J==null?void 0:J.minSize)!=null?A:l,maximumSize:(W=J==null?void 0:J.maxSize)!=null?W:r,priority:(ze=J==null?void 0:J.priority)!=null?ze:ie.Normal},(J==null?void 0:J.preferredSize)&&{preferredSize:J==null?void 0:J.preferredSize},{snap:(pe=J==null?void 0:J.snap)!=null?pe:o}));return h.current.push(we),{container:[...C.current.values()][N],size:R,view:we}})}});E.current=new Mi(p.current,D,a,v,z),E.current.on("sashDragStart",()=>{var R;(R=p.current)==null||R.classList.add("split-view-sash-dragging")}),E.current.on("sashDragEnd",()=>{var R;(R=p.current)==null||R.classList.remove("split-view-sash-dragging")}),E.current.on("sashchange",R=>{if(w&&E.current){const N=F.map(A=>A.key);for(let A=0;A<N.length;A++){const W=I.current.get(N[A]);(W==null?void 0:W.visible)!==void 0&&W.visible!==E.current.isViewVisible(A)&&w(A,E.current.isViewVisible(A))}}}),E.current.on("sashreset",R=>{if(y)y();else{var N;if(oe(R)||oe(R+1))return;(N=E.current)==null||N.distributeViewSizes()}});const k=E.current;return()=>{k.dispose()}},[]),Mt(()=>{if(L){const Q=F.map(x=>x.key),le=[..._.current],ce=Q.filter(x=>!_.current.includes(x)),Le=Q.filter(x=>_.current.includes(x)),Oe=_.current.map(x=>!Q.includes(x));for(let x=Oe.length-1;x>=0;x--){var O;Oe[x]&&((O=E.current)!=null&&O.removeView(x),le.splice(x,1),h.current.splice(x,1))}for(const x of ce){var D,k,R,N,A;const V=I.current.get(x),$=new Ut(X.current,ue({element:document.createElement("div"),minimumSize:(D=V==null?void 0:V.minSize)!=null?D:l,maximumSize:(k=V==null?void 0:V.maxSize)!=null?k:r,priority:(R=V==null?void 0:V.priority)!=null?R:ie.Normal},(V==null?void 0:V.preferredSize)&&{preferredSize:V==null?void 0:V.preferredSize},{snap:(N=V==null?void 0:V.snap)!=null?N:o}));(A=E.current)!=null&&A.addView(C.current.get(x),$,Ye.Distribute,Q.findIndex(B=>B===x)),le.splice(Q.findIndex(B=>B===x),0,x),h.current.splice(Q.findIndex(B=>B===x),0,$)}for(;!vi(Q,le);)for(const[x,V]of Q.entries()){const $=le.findIndex(B=>B===V);if($!==x){var W;(W=E.current)==null||W.moveView(C.current.get(V),$,x);const B=le[$];le.splice($,1),le.splice(x,0,B);break}}for(const x of ce){var ze;const V=Q.findIndex(B=>B===x),$=h.current[V].preferredSize;$!==void 0&&((ze=E.current)==null||ze.resizeView(V,$))}for(const x of[...ce,...Le]){var pe,J;const V=I.current.get(x),$=Q.findIndex(B=>B===x);V&&Xt(V)&&V.visible!==void 0&&((pe=E.current)==null?void 0:pe.isViewVisible($))!==V.visible&&((J=E.current)==null||J.setViewVisible($,V.visible))}for(const x of Le){const V=I.current.get(x),$=Q.findIndex(B=>B===x);if(V&&Xt(V)){var we;V.preferredSize!==void 0&&h.current[$].preferredSize!==V.preferredSize&&(h.current[$].preferredSize=V.preferredSize);let B=!1;V.minSize!==void 0&&h.current[$].minimumSize!==V.minSize&&(h.current[$].minimumSize=V.minSize,B=!0),V.maxSize!==void 0&&h.current[$].maximumSize!==V.maxSize&&(h.current[$].maximumSize=V.maxSize,B=!0),B&&((we=E.current)==null||we.layout())}}(ce.length>0||Oe.length>0)&&(_.current=Q)}},[F,L,r,l,o]),window.React.useEffect(()=>{E.current&&(E.current.onDidChange=a)},[a]),window.React.useEffect(()=>{E.current&&(E.current.onDidDragStart=v)},[v]),window.React.useEffect(()=>{E.current&&(E.current.onDidDragEnd=z)},[z]),pi({ref:p,onResize:({width:O,height:D})=>{var k;O&&D&&((k=E.current)!=null&&k.layout(c?D:O),X.current.setSize(c?D:O),K(!0))}}),window.React.useEffect(()=>{Nt&&Pi(20)},[]),window.React.createElement("div",{ref:p,className:at("split-view",c?"split-view-vertical":"split-view-horizontal",{"split-view-separator-border":g},wi,c?bi:_i,{[zi]:g},e),id:i},window.React.createElement("div",{className:at("split-view-container",gi)},window.React.Children.toArray(u).map(O=>{if(!window.React.isValidElement(O))return null;const D=O.key;return O.type.displayName==="Allotment.Pane"?(I.current.set(D,O.props),window.React.cloneElement(O,{key:D,ref:k=>{const R=O.ref;R&&(R.current=k),k?C.current.set(D,k):C.current.delete(D)}})):window.React.createElement(mt,{key:D,ref:k=>{k?C.current.set(D,k):C.current.delete(D)}},O)})))});function Pi(u){const e=re(u,4,20),i=re(u,1,8);document.documentElement.style.setProperty("--sash-size",e+"px"),document.documentElement.style.setProperty("--sash-hover-size",i+"px"),(function(r){Ht=r,Bt.emit("onDidChangeGlobalSize",r)})(e)}Jt.displayName="Allotment";var Ai=Object.assign(Jt,{Pane:mt});je.Allotment=Ai,Object.defineProperty(je,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(xe,ze){typeof exports=="object"&&typeof module<"u"?ze(exports):typeof define=="function"&&define.amd?define(["exports"],ze):(xe=typeof globalThis<"u"?globalThis:xe||self,ze(xe.BlockBiteLibraries={}))})(this,(function(xe){"use strict";var ze=document.createElement("style");ze.textContent=`:root{--separator-border: rgba(128, 128, 128, .35);--sash-hover-transition-duration: .1s}.allotment-module_splitView__L-yRc{height:100%;overflow:hidden;position:relative;width:100%}.allotment-module_splitView__L-yRc>.allotment-module_sashContainer__fzwJF{height:100%;pointer-events:none;position:absolute;width:100%}.allotment-module_splitView__L-yRc>.allotment-module_sashContainer__fzwJF>.allotment-module_sash__QA-2t{pointer-events:auto}.allotment-module_splitView__L-yRc>.allotment-module_splitViewContainer__rQnVa{height:100%;position:relative;white-space:nowrap;width:100%}.allotment-module_splitView__L-yRc>.allotment-module_splitViewContainer__rQnVa>.allotment-module_splitViewView__MGZ6O{overflow:hidden;position:absolute;white-space:initial}.allotment-module_splitView__L-yRc.allotment-module_vertical__WSwwa>.allotment-module_splitViewContainer__rQnVa>.allotment-module_splitViewView__MGZ6O{width:100%}.allotment-module_splitView__L-yRc.allotment-module_horizontal__7doS8>.allotment-module_splitViewContainer__rQnVa>.allotment-module_splitViewView__MGZ6O{height:100%}.allotment-module_splitView__L-yRc.allotment-module_separatorBorder__x-rDS>.allotment-module_splitViewContainer__rQnVa>.allotment-module_splitViewView__MGZ6O:not(:first-child):before{background-color:var(--separator-border);content:" ";left:0;pointer-events:none;position:absolute;top:0;z-index:5}.allotment-module_splitView__L-yRc.allotment-module_separatorBorder__x-rDS.allotment-module_vertical__WSwwa>.allotment-module_splitViewContainer__rQnVa>.allotment-module_splitViewView__MGZ6O:not(:first-child):before{height:1px;width:100%}.allotment-module_splitView__L-yRc.allotment-module_separatorBorder__x-rDS.allotment-module_horizontal__7doS8>.allotment-module_splitViewContainer__rQnVa>.allotment-module_splitViewView__MGZ6O:not(:first-child):before{height:100%;width:1px}:root{--focus-border: #007fd4;--sash-size: 8px;--sash-hover-size: 4px}.sash-module_sash__K-9lB{position:absolute;z-index:35;touch-action:none;pointer-events:auto;text-align:initial}.sash-module_sash__K-9lB.sash-module_disabled__Hm-wx{pointer-events:none}.sash-module_sash__K-9lB.sash-module_mac__Jf6OJ.sash-module_vertical__pB-rs{cursor:col-resize}.sash-module_sash__K-9lB.sash-module_vertical__pB-rs.sash-module_minimum__-UKxp{cursor:e-resize}.sash-module_sash__K-9lB.sash-module_vertical__pB-rs.sash-module_maximum__TCWxD{cursor:w-resize}.sash-module_sash__K-9lB.sash-module_mac__Jf6OJ.sash-module_horizontal__kFbiw{cursor:row-resize}.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_minimum__-UKxp{cursor:s-resize}.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_maximum__TCWxD{cursor:n-resize}.sash-module_sash__K-9lB.sash-module_disabled__Hm-wx{cursor:default!important;pointer-events:none!important}.sash-module_sash__K-9lB.sash-module_vertical__pB-rs{cursor:ew-resize;top:0;width:var(--sash-size);height:100%}.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw{cursor:ns-resize;left:0;width:100%;height:var(--sash-size)}.sash-module_sash__K-9lB:not(.sash-module_disabled__Hm-wx)>.sash-module_orthogonal-drag-handle__Yii2-{content:" ";height:calc(var(--sash-size) * 2);width:calc(var(--sash-size) * 2);z-index:100;display:block;cursor:all-scroll;position:absolute}.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-north__f7Noe:not(.sash-module_disabled__Hm-wx)>.sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk,.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-south__6ZrFC:not(.sash-module_disabled__Hm-wx)>.sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R{cursor:nwse-resize}.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-north__f7Noe:not(.sash-module_disabled__Hm-wx)>.sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R,.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-south__6ZrFC:not(.sash-module_disabled__Hm-wx)>.sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk{cursor:nesw-resize}.sash-module_sash__K-9lB.sash-module_vertical__pB-rs>.sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk{left:calc(var(--sash-size) * -.5);top:calc(var(--sash-size) * -1)}.sash-module_sash__K-9lB.sash-module_vertical__pB-rs>.sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R{left:calc(var(--sash-size) * -.5);bottom:calc(var(--sash-size) * -1)}.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw>.sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk{top:calc(var(--sash-size) * -.5);left:calc(var(--sash-size) * -1)}.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw>.sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R{top:calc(var(--sash-size) * -.5);right:calc(var(--sash-size) * -1)}.sash-module_sash__K-9lB:before{content:"";pointer-events:none;position:absolute;width:100%;height:100%;transition:background-color var(--sash-hover-transition-duration) ease-out;background:transparent}.sash-module_sash__K-9lB.sash-module_vertical__pB-rs:before{width:var(--sash-hover-size);left:calc(50% - (var(--sash-hover-size) / 2))}.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw:before{height:var(--sash-hover-size);top:calc(50% - (var(--sash-hover-size) / 2))}.sash-module_sash__K-9lB.sash-module_hover__80W6I:before,.sash-module_sash__K-9lB.sash-module_active__bJspD:before{background:var(--focus-border)}
2
+ /*$vite$:1*/`,document.head.appendChild(ze);function De(){return De=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},De.apply(null,arguments)}var et=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ke(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ut,Gt={exports:{}};/*!
3
+ Copyright (c) 2018 Jed Watson.
4
+ Licensed under the MIT License (MIT), see
5
+ http://jedwatson.github.io/classnames
6
+ */var _t,Jt,Zt,_i=(Ut||(Ut=1,_t=Gt,(function(){var t={}.hasOwnProperty;function e(){for(var r="",s=0;s<arguments.length;s++){var l=arguments[s];l&&(r=i(r,n(l)))}return r}function n(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return e.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var l in r)t.call(r,l)&&r[l]&&(s=i(s,l));return s}function i(r,s){return s?r?r+" "+s:r+s:r}_t.exports?(e.default=e,_t.exports=e):window.classNames=e})()),Gt.exports),St=ke(_i),qt,Qt,Si=(Zt||(Zt=1,Jt=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var i,r,s;if(Array.isArray(e)){if((i=e.length)!=n.length)return!1;for(r=i;r--!==0;)if(!t(e[r],n[r]))return!1;return!0}if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(r of e.entries())if(!n.has(r[0]))return!1;for(r of e.entries())if(!t(r[1],n.get(r[0])))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(r of e.entries())if(!n.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(n)){if((i=e.length)!=n.length)return!1;for(r=i;r--!==0;)if(e[r]!==n[r])return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if((i=(s=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(r=i;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[r]))return!1;for(r=i;r--!==0;){var l=s[r];if(!t(e[l],n[l]))return!1}return!0}return e!=e&&n!=n}),Jt),Ri=ke(Si),en,tn,oe=ke((function(){if(Qt)return qt;Qt=1;var t=/^\s+|\s+$/g,e=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,i=/^0o[0-7]+$/i,r=parseInt,s=Object.prototype.toString;function l(o){var c=typeof o;return!!o&&(c=="object"||c=="function")}function a(o){if(typeof o=="number")return o;if((function(u){return typeof u=="symbol"||(function(h){return!!h&&typeof h=="object"})(u)&&s.call(u)=="[object Symbol]"})(o))return NaN;if(l(o)){var c=typeof o.valueOf=="function"?o.valueOf():o;o=l(c)?c+"":c}if(typeof o!="string")return o===0?o:+o;o=o.replace(t,"");var d=n.test(o);return d||i.test(o)?r(o.slice(2),d?2:8):e.test(o)?NaN:+o}return qt=function(o,c,d){return d===void 0&&(d=c,c=void 0),d!==void 0&&(d=(d=a(d))==d?d:0),c!==void 0&&(c=(c=a(c))==c?c:0),(function(u,h,f){return u==u&&(f!==void 0&&(u=u<=f?u:f),h!==void 0&&(u=u>=h?u:h)),u})(a(o),c,d)}})()),xi=ke((function(){if(tn)return en;tn=1;var t=/^\s+|\s+$/g,e=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,i=/^0o[0-7]+$/i,r=parseInt,s=typeof et=="object"&&et&&et.Object===Object&&et,l=typeof self=="object"&&self&&self.Object===Object&&self,a=s||l||Function("return this")(),o=Object.prototype.toString,c=Math.max,d=Math.min,u=function(){return a.Date.now()};function h(m){var v=typeof m;return!!m&&(v=="object"||v=="function")}function f(m){if(typeof m=="number")return m;if((function(g){return typeof g=="symbol"||(function(b){return!!b&&typeof b=="object"})(g)&&o.call(g)=="[object Symbol]"})(m))return NaN;if(h(m)){var v=typeof m.valueOf=="function"?m.valueOf():m;m=h(v)?v+"":v}if(typeof m!="string")return m===0?m:+m;m=m.replace(t,"");var p=n.test(m);return p||i.test(m)?r(m.slice(2),p?2:8):e.test(m)?NaN:+m}return en=function(m,v,p){var g,b,y,_,R,x,w=0,S=!1,C=!1,N=!0;if(typeof m!="function")throw new TypeError("Expected a function");function L(T){var M=g,B=b;return g=b=void 0,w=T,_=m.apply(B,M)}function O(T){var M=T-x;return x===void 0||M>=v||M<0||C&&T-w>=y}function I(){var T=u();if(O(T))return P(T);R=setTimeout(I,(function(M){var B=v-(M-x);return C?d(B,y-(M-w)):B})(T))}function P(T){return R=void 0,N&&g?L(T):(g=b=void 0,_)}function A(){var T=u(),M=O(T);if(g=arguments,b=this,x=T,M){if(R===void 0)return(function(B){return w=B,R=setTimeout(I,v),S?L(B):_})(x);if(C)return R=setTimeout(I,v),L(x)}return R===void 0&&(R=setTimeout(I,v)),_}return v=f(v)||0,h(p)&&(S=!!p.leading,y=(C="maxWait"in p)?c(f(p.maxWait)||0,v):y,N="trailing"in p?!!p.trailing:N),A.cancel=function(){R!==void 0&&clearTimeout(R),w=0,g=x=b=R=void 0},A.flush=function(){return R===void 0?_:P(u())},A}})()),nn={width:void 0,height:void 0};function zi(t){const{ref:e,box:n="content-box"}=t,[{width:i,height:r},s]=window.React.useState(nn),l=(function(){const c=window.React.useRef(!1);return window.React.useEffect(()=>(c.current=!0,()=>{c.current=!1}),[]),window.React.useCallback(()=>c.current,[])})(),a=window.React.useRef(De({},nn)),o=window.React.useRef(void 0);return o.current=t.onResize,window.React.useEffect(()=>{if(!e.current||typeof window>"u"||!("ResizeObserver"in window))return;const c=new ResizeObserver(([d])=>{const u=n==="border-box"?"borderBoxSize":n==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",h=rn(d,u,"inlineSize"),f=rn(d,u,"blockSize");if(a.current.width!==h||a.current.height!==f){const m={width:h,height:f};a.current.width=h,a.current.height=f,o.current?o.current(m):l()&&s(m)}});return c.observe(e.current,{box:n}),()=>{c.disconnect()}},[n,e,l]),{width:i,height:r}}function rn(t,e,n){return t[e]?Array.isArray(t[e])?t[e][0][n]:t[e][n]:e==="contentBoxSize"?t.contentRect[n==="inlineSize"?"width":"height"]:void 0}var Di="allotment-module_splitView__L-yRc",Ii="allotment-module_sashContainer__fzwJF",Ei="allotment-module_splitViewContainer__rQnVa",sn="allotment-module_splitViewView__MGZ6O",Ci="allotment-module_vertical__WSwwa",Oi="allotment-module_horizontal__7doS8",Ni="allotment-module_separatorBorder__x-rDS";let Be,on=!1,an=!1;typeof navigator=="object"&&(Be=navigator.userAgent,an=Be.indexOf("Macintosh")>=0,on=(Be.indexOf("Macintosh")>=0||Be.indexOf("iPad")>=0||Be.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0);const ln=on,Mi=an,cn=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?window.React.useLayoutEffect:window.React.useEffect;class Vi{constructor(){this._size=void 0}getSize(){return this._size}setSize(e){this._size=e}}function tt(t,e){const n=t.length,i=n-e.length;return i>=0&&t.slice(i,n)===e}var un,dn={exports:{}},Ai=(un||(un=1,(function(t){var e=Object.prototype.hasOwnProperty,n="~";function i(){}function r(o,c,d){this.fn=o,this.context=c,this.once=d||!1}function s(o,c,d,u,h){if(typeof d!="function")throw new TypeError("The listener must be a function");var f=new r(d,u||o,h),m=n?n+c:c;return o._events[m]?o._events[m].fn?o._events[m]=[o._events[m],f]:o._events[m].push(f):(o._events[m]=f,o._eventsCount++),o}function l(o,c){--o._eventsCount===0?o._events=new i:delete o._events[c]}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(n=!1)),a.prototype.eventNames=function(){var o,c,d=[];if(this._eventsCount===0)return d;for(c in o=this._events)e.call(o,c)&&d.push(n?c.slice(1):c);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(o)):d},a.prototype.listeners=function(o){var c=n?n+o:o,d=this._events[c];if(!d)return[];if(d.fn)return[d.fn];for(var u=0,h=d.length,f=new Array(h);u<h;u++)f[u]=d[u].fn;return f},a.prototype.listenerCount=function(o){var c=n?n+o:o,d=this._events[c];return d?d.fn?1:d.length:0},a.prototype.emit=function(o,c,d,u,h,f){var m=n?n+o:o;if(!this._events[m])return!1;var v,p,g=this._events[m],b=arguments.length;if(g.fn){switch(g.once&&this.removeListener(o,g.fn,void 0,!0),b){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,c),!0;case 3:return g.fn.call(g.context,c,d),!0;case 4:return g.fn.call(g.context,c,d,u),!0;case 5:return g.fn.call(g.context,c,d,u,h),!0;case 6:return g.fn.call(g.context,c,d,u,h,f),!0}for(p=1,v=new Array(b-1);p<b;p++)v[p-1]=arguments[p];g.fn.apply(g.context,v)}else{var y,_=g.length;for(p=0;p<_;p++)switch(g[p].once&&this.removeListener(o,g[p].fn,void 0,!0),b){case 1:g[p].fn.call(g[p].context);break;case 2:g[p].fn.call(g[p].context,c);break;case 3:g[p].fn.call(g[p].context,c,d);break;case 4:g[p].fn.call(g[p].context,c,d,u);break;default:if(!v)for(y=1,v=new Array(b-1);y<b;y++)v[y-1]=arguments[y];g[p].fn.apply(g[p].context,v)}}return!0},a.prototype.on=function(o,c,d){return s(this,o,c,d,!1)},a.prototype.once=function(o,c,d){return s(this,o,c,d,!0)},a.prototype.removeListener=function(o,c,d,u){var h=n?n+o:o;if(!this._events[h])return this;if(!c)return l(this,h),this;var f=this._events[h];if(f.fn)f.fn!==c||u&&!f.once||d&&f.context!==d||l(this,h);else{for(var m=0,v=[],p=f.length;m<p;m++)(f[m].fn!==c||u&&!f[m].once||d&&f[m].context!==d)&&v.push(f[m]);v.length?this._events[h]=v.length===1?v[0]:v:l(this,h)}return this},a.prototype.removeAllListeners=function(o){var c;return o?(c=n?n+o:o,this._events[c]&&l(this,c)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,t.exports=a})(dn)),dn.exports),Rt=ke(Ai);function hn(t,e){const n=t.indexOf(e);n>-1&&(t.splice(n,1),t.unshift(e))}function xt(t,e){const n=t.indexOf(e);n>-1&&(t.splice(n,1),t.push(e))}function te(t,e,n=1){const i=Math.max(0,Math.ceil((e-t)/n)),r=new Array(i);let s=-1;for(;++s<i;)r[s]=t+s*n;return r}var Li="sash-module_sash__K-9lB",Ti="sash-module_disabled__Hm-wx",Pi="sash-module_mac__Jf6OJ",fn="sash-module_vertical__pB-rs",ki="sash-module_minimum__-UKxp",Bi="sash-module_maximum__TCWxD",mn="sash-module_horizontal__kFbiw",zt="sash-module_hover__80W6I",Dt="sash-module_active__bJspD";let ne=(function(t){return t.Vertical="VERTICAL",t.Horizontal="HORIZONTAL",t})({}),Z=(function(t){return t.Disabled="DISABLED",t.Minimum="MINIMUM",t.Maximum="MAXIMUM",t.Enabled="ENABLED",t})({}),vn=ln?20:8;const pn=new Rt;class wn extends Rt{get state(){return this._state}set state(e){this._state!==e&&(this.el.classList.toggle(Ti,e===Z.Disabled),this.el.classList.toggle("sash-disabled",e===Z.Disabled),this.el.classList.toggle(ki,e===Z.Minimum),this.el.classList.toggle("sash-minimum",e===Z.Minimum),this.el.classList.toggle(Bi,e===Z.Maximum),this.el.classList.toggle("sash-maximum",e===Z.Maximum),this._state=e,this.emit("enablementChange",e))}constructor(e,n,i){var r;super(),this.el=void 0,this.layoutProvider=void 0,this.orientation=void 0,this.size=void 0,this.hoverDelay=300,this.hoverDelayer=xi(s=>s.classList.add("sash-hover",zt),this.hoverDelay),this._state=Z.Enabled,this.onPointerStart=s=>{const l=s.pageX,a=s.pageY,o={startX:l,currentX:l,startY:a,currentY:a};this.el.classList.add("sash-active",Dt),this.emit("start",o),this.el.setPointerCapture(s.pointerId);const c=u=>{u.preventDefault();const h={startX:l,currentX:u.pageX,startY:a,currentY:u.pageY};this.emit("change",h)},d=u=>{u.preventDefault(),this.el.classList.remove("sash-active",Dt),this.hoverDelayer.cancel(),this.emit("end"),this.el.releasePointerCapture(u.pointerId),window.removeEventListener("pointermove",c),window.removeEventListener("pointerup",d)};window.addEventListener("pointermove",c),window.addEventListener("pointerup",d)},this.onPointerDoublePress=()=>{this.emit("reset")},this.onMouseEnter=()=>{this.el.classList.contains(Dt)?(this.hoverDelayer.cancel(),this.el.classList.add("sash-hover",zt)):this.hoverDelayer(this.el)},this.onMouseLeave=()=>{this.hoverDelayer.cancel(),this.el.classList.remove("sash-hover",zt)},this.el=document.createElement("div"),this.el.classList.add("sash",Li),this.el.dataset.testid="sash",e.append(this.el),Mi&&this.el.classList.add("sash-mac",Pi),this.el.addEventListener("pointerdown",this.onPointerStart),this.el.addEventListener("dblclick",this.onPointerDoublePress),this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("mouseleave",this.onMouseLeave),typeof i.size=="number"?(this.size=i.size,i.orientation===ne.Vertical?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=vn,pn.on("onDidChangeGlobalSize",s=>{this.size=s,this.layout()})),this.layoutProvider=n,this.orientation=(r=i.orientation)!=null?r:ne.Vertical,this.orientation===ne.Horizontal?(this.el.classList.add("sash-horizontal",mn),this.el.classList.remove("sash-vertical",fn)):(this.el.classList.remove("sash-horizontal",mn),this.el.classList.add("sash-vertical",fn)),this.layout()}layout(){if(this.orientation===ne.Vertical){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}dispose(){this.el.removeEventListener("pointerdown",this.onPointerStart),this.el.removeEventListener("dblclick",this.onPointerDoublePress),this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("mouseleave",()=>this.onMouseLeave),this.el.remove()}}let nt;var It;(It=nt||(nt={})).Distribute={type:"distribute"},It.Split=function(t){return{type:"split",index:t}},It.Invisible=function(t){return{type:"invisible",cachedVisibleSize:t}};let ie=(function(t){return t.Normal="NORMAL",t.Low="LOW",t.High="HIGH",t})({});class gn{constructor(e,n,i){this.container=void 0,this.view=void 0,this._size=void 0,this._cachedVisibleSize=void 0,this.container=e,this.view=n,this.container.classList.add("split-view-view",sn),this.container.dataset.testid="split-view-view",typeof i=="number"?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("split-view-view-visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}set size(e){this._size=e}get size(){return this._size}get priority(){return this.view.priority}get snap(){return!!this.view.snap}get cachedVisibleSize(){return this._cachedVisibleSize}get visible(){return this._cachedVisibleSize===void 0}setVisible(e,n){e!==this.visible&&(e?(this.size=oe(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof n=="number"?n:this.size,this.size=0),this.container.classList.toggle("split-view-view-visible",e),this.view.setVisible&&this.view.setVisible(e))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}set enabled(e){this.container.style.pointerEvents=e?"":"none"}layout(e){this.layoutContainer(e),this.view.layout(this.size,e)}}class Fi extends gn{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}class ji extends gn{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class Yi extends Rt{get startSnappingEnabled(){return this._startSnappingEnabled}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}get endSnappingEnabled(){return this._endSnappingEnabled}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,n={},i,r,s){var l,a;if(super(),this.onDidChange=void 0,this.onDidDragStart=void 0,this.onDidDragEnd=void 0,this.orientation=void 0,this.sashContainer=void 0,this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.sashDragState=void 0,this.proportionalLayout=void 0,this.getSashOrthogonalSize=void 0,this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onSashEnd=o=>{this.emit("sashchange",o),this.saveProportions();for(const c of this.viewItems)c.enabled=!0},this.orientation=(l=n.orientation)!=null?l:ne.Vertical,this.proportionalLayout=(a=n.proportionalLayout)!=null?a:!0,this.getSashOrthogonalSize=n.getSashOrthogonalSize,i&&(this.onDidChange=i),r&&(this.onDidDragStart=r),s&&(this.onDidDragEnd=s),this.sashContainer=document.createElement("div"),this.sashContainer.classList.add("sash-container",Ii),e.prepend(this.sashContainer),n.descriptor){this.size=n.descriptor.size;for(const[o,c]of n.descriptor.views.entries()){const d=c.size,u=c.container,h=c.view;this.addView(u,h,d,o,!0)}this.contentSize=this.viewItems.reduce((o,c)=>o+c.size,0),this.saveProportions()}}addView(e,n,i,r=this.viewItems.length,s){let l;l=typeof i=="number"?i:i.type==="split"?this.getViewSize(i.index)/2:i.type==="invisible"?{cachedVisibleSize:i.cachedVisibleSize}:n.minimumSize;const a=this.orientation===ne.Vertical?new ji(e,n,l):new Fi(e,n,l);if(this.viewItems.splice(r,0,a),this.viewItems.length>1){const o=this.orientation===ne.Vertical?new wn(this.sashContainer,{getHorizontalSashTop:u=>this.getSashPosition(u),getHorizontalSashWidth:this.getSashOrthogonalSize},{orientation:ne.Horizontal}):new wn(this.sashContainer,{getVerticalSashLeft:u=>this.getSashPosition(u),getVerticalSashHeight:this.getSashOrthogonalSize},{orientation:ne.Vertical}),c=this.orientation===ne.Vertical?u=>({sash:o,start:u.startY,current:u.currentY}):u=>({sash:o,start:u.startX,current:u.currentX});o.on("start",u=>{var h;this.emit("sashDragStart"),this.onSashStart(c(u));const f=this.viewItems.map(m=>m.size);(h=this.onDidDragStart)==null||h.call(this,f)}),o.on("change",u=>this.onSashChange(c(u))),o.on("end",()=>{var u;this.emit("sashDragEnd"),this.onSashEnd(this.sashItems.findIndex(f=>f.sash===o));const h=this.viewItems.map(f=>f.size);(u=this.onDidDragEnd)==null||u.call(this,h)}),o.on("reset",()=>{const u=this.sashItems.findIndex(p=>p.sash===o),h=te(u,-1,-1),f=te(u+1,this.viewItems.length),m=this.findFirstSnapIndex(h),v=this.findFirstSnapIndex(f);(typeof m!="number"||this.viewItems[m].visible)&&(typeof v!="number"||this.viewItems[v].visible)&&this.emit("sashreset",u)});const d={sash:o};this.sashItems.splice(r-1,0,d)}s||this.relayout(),s||typeof i=="number"||i.type!=="distribute"||this.distributeViewSizes()}removeView(e,n){if(e<0||e>=this.viewItems.length)throw new Error("Index out of bounds");const i=this.viewItems.splice(e,1)[0].view;if(this.viewItems.length>=1){const r=Math.max(e-1,0);this.sashItems.splice(r,1)[0].sash.dispose()}return this.relayout(),n&&n.type==="distribute"&&this.distributeViewSizes(),i}moveView(e,n,i){const r=this.getViewCachedVisibleSize(n),s=r===void 0?this.getViewSize(n):nt.Invisible(r),l=this.removeView(n);this.addView(e,l,s,i)}getViewCachedVisibleSize(e){if(e<0||e>=this.viewItems.length)throw new Error("Index out of bounds");return this.viewItems[e].cachedVisibleSize}layout(e=this.size){const n=Math.max(this.size,this.contentSize);if(this.size=e,this.proportions)for(let i=0;i<this.viewItems.length;i++){const r=this.viewItems[i];r.size=oe(Math.round(this.proportions[i]*e),r.minimumSize,r.maximumSize)}else{const i=te(0,this.viewItems.length),r=i.filter(l=>this.viewItems[l].priority===ie.Low),s=i.filter(l=>this.viewItems[l].priority===ie.High);this.resize(this.viewItems.length-1,e-n,void 0,r,s)}this.distributeEmptySpace(),this.layoutViews()}resizeView(e,n){if(e<0||e>=this.viewItems.length)return;const i=te(0,this.viewItems.length).filter(a=>a!==e),r=[...i.filter(a=>this.viewItems[a].priority===ie.Low),e],s=i.filter(a=>this.viewItems[a].priority===ie.High),l=this.viewItems[e];n=Math.round(n),n=oe(n,l.minimumSize,Math.min(l.maximumSize,this.size)),l.size=n,this.relayout(r,s)}resizeViews(e){for(let n=0;n<e.length;n++){const i=this.viewItems[n];let r=e[n];r=Math.round(r),r=oe(r,i.minimumSize,Math.min(i.maximumSize,this.size)),i.size=r}this.contentSize=this.viewItems.reduce((n,i)=>n+i.size,0),this.saveProportions(),this.layout(this.size)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}isViewVisible(e){if(e<0||e>=this.viewItems.length)throw new Error("Index out of bounds");return this.viewItems[e].visible}setViewVisible(e,n){if(e<0||e>=this.viewItems.length)throw new Error("Index out of bounds");this.viewItems[e].setVisible(n),this.distributeEmptySpace(e),this.layoutViews(),this.saveProportions()}distributeViewSizes(){const e=[];let n=0;for(const a of this.viewItems)a.maximumSize-a.minimumSize>0&&(e.push(a),n+=a.size);const i=Math.floor(n/e.length);for(const a of e)a.size=oe(i,a.minimumSize,a.maximumSize);const r=te(0,this.viewItems.length),s=r.filter(a=>this.viewItems[a].priority===ie.Low),l=r.filter(a=>this.viewItems[a].priority===ie.High);this.relayout(s,l)}dispose(){this.sashItems.forEach(e=>e.sash.dispose()),this.sashItems=[],this.sashContainer.remove()}relayout(e,n){const i=this.viewItems.reduce((r,s)=>r+s.size,0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,n),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}onSashStart({sash:e,start:n}){const i=this.sashItems.findIndex(r=>r.sash===e);(r=>{const s=this.viewItems.map(b=>b.size);let l,a,o=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY;const d=te(i,-1,-1),u=te(i+1,this.viewItems.length),h=d.reduce((b,y)=>b+(this.viewItems[y].minimumSize-s[y]),0),f=d.reduce((b,y)=>b+(this.viewItems[y].viewMaximumSize-s[y]),0),m=u.length===0?Number.POSITIVE_INFINITY:u.reduce((b,y)=>b+(s[y]-this.viewItems[y].minimumSize),0),v=u.length===0?Number.NEGATIVE_INFINITY:u.reduce((b,y)=>b+(s[y]-this.viewItems[y].viewMaximumSize),0);o=Math.max(h,v),c=Math.min(m,f);const p=this.findFirstSnapIndex(d),g=this.findFirstSnapIndex(u);if(typeof p=="number"){const b=this.viewItems[p],y=Math.floor(b.viewMinimumSize/2);l={index:p,limitDelta:b.visible?o-y:o+y,size:b.size}}if(typeof g=="number"){const b=this.viewItems[g],y=Math.floor(b.viewMinimumSize/2);a={index:g,limitDelta:b.visible?c+y:c-y,size:b.size}}this.sashDragState={start:r,current:r,index:i,sizes:s,minDelta:o,maxDelta:c,snapBefore:l,snapAfter:a}})(n)}onSashChange({current:e}){const{index:n,start:i,sizes:r,minDelta:s,maxDelta:l,snapBefore:a,snapAfter:o}=this.sashDragState;this.sashDragState.current=e;const c=e-i;this.resize(n,c,r,void 0,void 0,s,l,a,o),this.distributeEmptySpace(),this.layoutViews()}getSashPosition(e){let n=0;for(let i=0;i<this.sashItems.length;i++)if(n+=this.viewItems[i].size,this.sashItems[i].sash===e)return n;return 0}resize(e,n,i=this.viewItems.map(d=>d.size),r,s,l=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,o,c){if(e<0||e>=this.viewItems.length)return 0;const d=te(e,-1,-1),u=te(e+1,this.viewItems.length);if(s)for(const w of s)hn(d,w),hn(u,w);if(r)for(const w of r)xt(d,w),xt(u,w);const h=d.map(w=>this.viewItems[w]),f=d.map(w=>i[w]),m=u.map(w=>this.viewItems[w]),v=u.map(w=>i[w]),p=d.reduce((w,S)=>w+(this.viewItems[S].minimumSize-i[S]),0),g=d.reduce((w,S)=>w+(this.viewItems[S].maximumSize-i[S]),0),b=u.length===0?Number.POSITIVE_INFINITY:u.reduce((w,S)=>w+(i[S]-this.viewItems[S].minimumSize),0),y=u.length===0?Number.NEGATIVE_INFINITY:u.reduce((w,S)=>w+(i[S]-this.viewItems[S].maximumSize),0),_=Math.max(p,y,l),R=Math.min(b,g,a);let x=!1;if(o){const w=this.viewItems[o.index],S=n>=o.limitDelta;x=S!==w.visible,w.setVisible(S,o.size)}if(!x&&c){const w=this.viewItems[c.index],S=n<c.limitDelta;x=S!==w.visible,w.setVisible(S,c.size)}if(x)return this.resize(e,n,i,r,s,l,a);for(let w=0,S=n=oe(n,_,R);w<h.length;w++){const C=h[w],N=oe(f[w]+S,C.minimumSize,C.maximumSize);S-=N-f[w],C.size=N}for(let w=0,S=n;w<m.length;w++){const C=m[w],N=oe(v[w]-S,C.minimumSize,C.maximumSize);S+=N-v[w],C.size=N}return n}distributeEmptySpace(e){const n=this.viewItems.reduce((c,d)=>c+d.size,0);let i=this.size-n;const r=te(0,this.viewItems.length),s=[],l=r.filter(c=>this.viewItems[c].priority===ie.Low),a=r.filter(c=>this.viewItems[c].priority===ie.Normal),o=r.filter(c=>this.viewItems[c].priority===ie.High);s.push(...o,...a,...l),typeof e=="number"&&xt(s,e);for(let c=0;i!==0&&c<s.length;c++){const d=this.viewItems[s[c]],u=oe(d.size+i,d.minimumSize,d.maximumSize);i-=u-d.size,d.size=u}}layoutViews(){var e;this.contentSize=this.viewItems.reduce((i,r)=>i+r.size,0);let n=0;for(const i of this.viewItems)i.layout(n),n+=i.size;(e=this.onDidChange)!=null&&e.call(this,this.viewItems.map(i=>i.size)),this.sashItems.forEach(i=>i.sash.layout()),this.updateSashEnablement()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(e=>e.size/this.contentSize))}updateSashEnablement(){let e=!1;const n=this.viewItems.map(o=>e=o.size-o.minimumSize>0||e);e=!1;const i=this.viewItems.map(o=>e=o.maximumSize-o.size>0||e),r=[...this.viewItems].reverse();e=!1;const s=r.map(o=>e=o.size-o.minimumSize>0||e).reverse();e=!1;const l=r.map(o=>e=o.maximumSize-o.size>0||e).reverse();let a=0;for(let o=0;o<this.sashItems.length;o++){const{sash:c}=this.sashItems[o];a+=this.viewItems[o].size;const d=!(n[o]&&l[o+1]),u=!(i[o]&&s[o+1]);if(d&&u){const h=te(o,-1,-1),f=te(o+1,this.viewItems.length),m=this.findFirstSnapIndex(h),v=this.findFirstSnapIndex(f),p=typeof m=="number"&&!this.viewItems[m].visible,g=typeof v=="number"&&!this.viewItems[v].visible;p&&s[o]&&(a>0||this.startSnappingEnabled)?c.state=Z.Minimum:g&&n[o]&&(a<this.contentSize||this.endSnappingEnabled)?c.state=Z.Maximum:c.state=Z.Disabled}else c.state=d&&!u?Z.Minimum:!d&&u?Z.Maximum:Z.Enabled}}findFirstSnapIndex(e){for(const n of e){const i=this.viewItems[n];if(i.visible&&i.snap)return n}for(const n of e){const i=this.viewItems[n];if(i.visible&&i.maximumSize-i.minimumSize>0)return;if(!i.visible&&i.snap)return n}}}class Ie{constructor(e){this.size=void 0,this.size=e}getPreferredSize(){return this.size}}class bn{constructor(e,n){this.proportion=void 0,this.layoutService=void 0,this.proportion=e,this.layoutService=n}getPreferredSize(){return this.proportion*this.layoutService.getSize()}}class it{getPreferredSize(){}}class yn{get preferredSize(){return this.layoutStrategy.getPreferredSize()}set preferredSize(e){if(typeof e=="number")this.layoutStrategy=new Ie(e);else if(typeof e=="string"){const n=e.trim();if(tt(n,"%")){const i=Number(n.slice(0,-1))/100;this.layoutStrategy=new bn(i,this.layoutService)}else if(tt(n,"px")){const i=Number(n.slice(0,-2))/100;this.layoutStrategy=new Ie(i)}else if(typeof Number.parseFloat(n)=="number"){const i=Number.parseFloat(n);this.layoutStrategy=new Ie(i)}else this.layoutStrategy=new it}else this.layoutStrategy=new it}constructor(e,n){var i;if(this.minimumSize=0,this.maximumSize=Number.POSITIVE_INFINITY,this.element=void 0,this.priority=void 0,this.snap=void 0,this.layoutService=void 0,this.layoutStrategy=void 0,this.layoutService=e,this.element=n.element,this.minimumSize=typeof n.minimumSize=="number"?n.minimumSize:30,this.maximumSize=typeof n.maximumSize=="number"?n.maximumSize:Number.POSITIVE_INFINITY,typeof n.preferredSize=="number")this.layoutStrategy=new Ie(n.preferredSize);else if(typeof n.preferredSize=="string"){const r=n.preferredSize.trim();if(tt(r,"%")){const s=Number(r.slice(0,-1))/100;this.layoutStrategy=new bn(s,this.layoutService)}else if(tt(r,"px")){const s=Number(r.slice(0,-2));this.layoutStrategy=new Ie(s)}else if(typeof Number.parseFloat(r)=="number"){const s=Number.parseFloat(r);this.layoutStrategy=new Ie(s)}else this.layoutStrategy=new it}else this.layoutStrategy=new it;this.priority=(i=n.priority)!=null?i:ie.Normal,this.snap=typeof n.snap=="boolean"&&n.snap}layout(e){}}function _n(t){return t.minSize!==void 0||t.maxSize!==void 0||t.preferredSize!==void 0||t.priority!==void 0||t.visible!==void 0}const Et=window.React.forwardRef(({className:t,children:e},n)=>window.React.createElement("div",{ref:n,className:St("split-view-view",sn,t)},e));Et.displayName="Allotment.Pane";const Sn=window.React.forwardRef(({children:t,className:e,id:n,maxSize:i=1/0,minSize:r=30,proportionalLayout:s=!0,separator:l=!0,sizes:a,defaultSizes:o=a,snap:c=!1,vertical:d=!1,onChange:u,onReset:h,onVisibleChange:f,onDragStart:m,onDragEnd:v},p)=>{const g=window.React.useRef(null),b=window.React.useRef([]),y=window.React.useRef(new Map),_=window.React.useRef(null),R=window.React.useRef(new Map),x=window.React.useRef(new Vi),w=window.React.useRef([]),[S,C]=window.React.useState(!1),N=window.React.useMemo(()=>window.React.Children.toArray(t).filter(window.React.isValidElement),[t]),L=window.React.useCallback(O=>{var I,P;const A=(I=w.current)==null?void 0:I[O];return typeof(A==null?void 0:A.preferredSize)=="number"&&((P=_.current)!=null&&P.resizeView(O,Math.round(A.preferredSize)),!0)},[]);return window.React.useImperativeHandle(p,()=>({reset:()=>{if(h)h();else{var O;(O=_.current)==null||O.distributeViewSizes();for(let I=0;I<w.current.length;I++)L(I)}},resize:O=>{var I;(I=_.current)==null||I.resizeViews(O)}})),cn(()=>{let O=!0;o&&R.current.size!==o.length&&(O=!1,console.warn(`Expected ${o.length} children based on defaultSizes but found ${R.current.size}`)),O&&o&&(b.current=N.map(A=>A.key));const I=De({orientation:d?ne.Vertical:ne.Horizontal,proportionalLayout:s},O&&o&&{descriptor:{size:o.reduce((A,T)=>A+T,0),views:o.map((A,T)=>{var M,B,U,ce;const j=y.current.get(b.current[T]),Y=new yn(x.current,De({element:document.createElement("div"),minimumSize:(M=j==null?void 0:j.minSize)!=null?M:r,maximumSize:(B=j==null?void 0:j.maxSize)!=null?B:i,priority:(U=j==null?void 0:j.priority)!=null?U:ie.Normal},(j==null?void 0:j.preferredSize)&&{preferredSize:j==null?void 0:j.preferredSize},{snap:(ce=j==null?void 0:j.snap)!=null?ce:c}));return w.current.push(Y),{container:[...R.current.values()][T],size:A,view:Y}})}});_.current=new Yi(g.current,I,u,m,v),_.current.on("sashDragStart",()=>{var A;(A=g.current)==null||A.classList.add("split-view-sash-dragging")}),_.current.on("sashDragEnd",()=>{var A;(A=g.current)==null||A.classList.remove("split-view-sash-dragging")}),_.current.on("sashchange",A=>{if(f&&_.current){const T=N.map(M=>M.key);for(let M=0;M<T.length;M++){const B=y.current.get(T[M]);(B==null?void 0:B.visible)!==void 0&&B.visible!==_.current.isViewVisible(M)&&f(M,_.current.isViewVisible(M))}}}),_.current.on("sashreset",A=>{if(h)h();else{var T;if(L(A)||L(A+1))return;(T=_.current)==null||T.distributeViewSizes()}});const P=_.current;return()=>{P.dispose()}},[]),cn(()=>{if(S){const F=N.map(E=>E.key),G=[...b.current],ue=F.filter(E=>!b.current.includes(E)),J=F.filter(E=>b.current.includes(E)),ge=b.current.map(E=>!F.includes(E));for(let E=ge.length-1;E>=0;E--){var O;ge[E]&&((O=_.current)!=null&&O.removeView(E),G.splice(E,1),w.current.splice(E,1))}for(const E of ue){var I,P,A,T,M;const D=y.current.get(E),z=new yn(x.current,De({element:document.createElement("div"),minimumSize:(I=D==null?void 0:D.minSize)!=null?I:r,maximumSize:(P=D==null?void 0:D.maxSize)!=null?P:i,priority:(A=D==null?void 0:D.priority)!=null?A:ie.Normal},(D==null?void 0:D.preferredSize)&&{preferredSize:D==null?void 0:D.preferredSize},{snap:(T=D==null?void 0:D.snap)!=null?T:c}));(M=_.current)!=null&&M.addView(R.current.get(E),z,nt.Distribute,F.findIndex(k=>k===E)),G.splice(F.findIndex(k=>k===E),0,E),w.current.splice(F.findIndex(k=>k===E),0,z)}for(;!Ri(F,G);)for(const[E,D]of F.entries()){const z=G.findIndex(k=>k===D);if(z!==E){var B;(B=_.current)==null||B.moveView(R.current.get(D),z,E);const k=G[z];G.splice(z,1),G.splice(E,0,k);break}}for(const E of ue){var U;const D=F.findIndex(k=>k===E),z=w.current[D].preferredSize;z!==void 0&&((U=_.current)==null||U.resizeView(D,z))}for(const E of[...ue,...J]){var ce,j;const D=y.current.get(E),z=F.findIndex(k=>k===E);D&&_n(D)&&D.visible!==void 0&&((ce=_.current)==null?void 0:ce.isViewVisible(z))!==D.visible&&((j=_.current)==null||j.setViewVisible(z,D.visible))}for(const E of J){const D=y.current.get(E),z=F.findIndex(k=>k===E);if(D&&_n(D)){var Y;D.preferredSize!==void 0&&w.current[z].preferredSize!==D.preferredSize&&(w.current[z].preferredSize=D.preferredSize);let k=!1;D.minSize!==void 0&&w.current[z].minimumSize!==D.minSize&&(w.current[z].minimumSize=D.minSize,k=!0),D.maxSize!==void 0&&w.current[z].maximumSize!==D.maxSize&&(w.current[z].maximumSize=D.maxSize,k=!0),k&&((Y=_.current)==null||Y.layout())}}(ue.length>0||ge.length>0)&&(b.current=F)}},[N,S,i,r,c]),window.React.useEffect(()=>{_.current&&(_.current.onDidChange=u)},[u]),window.React.useEffect(()=>{_.current&&(_.current.onDidDragStart=m)},[m]),window.React.useEffect(()=>{_.current&&(_.current.onDidDragEnd=v)},[v]),zi({ref:g,onResize:({width:O,height:I})=>{var P;O&&I&&((P=_.current)!=null&&P.layout(d?I:O),x.current.setSize(d?I:O),C(!0))}}),window.React.useEffect(()=>{ln&&$i(20)},[]),window.React.createElement("div",{ref:g,className:St("split-view",d?"split-view-vertical":"split-view-horizontal",{"split-view-separator-border":l},Di,d?Ci:Oi,{[Ni]:l},e),id:n},window.React.createElement("div",{className:St("split-view-container",Ei)},window.React.Children.toArray(t).map(O=>{if(!window.React.isValidElement(O))return null;const I=O.key;return O.type.displayName==="Allotment.Pane"?(y.current.set(I,O.props),window.React.cloneElement(O,{key:I,ref:P=>{const A=O.ref;A&&(A.current=P),P?R.current.set(I,P):R.current.delete(I)}})):window.React.createElement(Et,{key:I,ref:P=>{P?R.current.set(I,P):R.current.delete(I)}},O)})))});function $i(t){const e=oe(t,4,20),n=oe(t,1,8);document.documentElement.style.setProperty("--sash-size",e+"px"),document.documentElement.style.setProperty("--sash-hover-size",n+"px"),(function(i){vn=i,pn.emit("onDidChangeGlobalSize",i)})(e)}Sn.displayName="Allotment";var Ki=Object.assign(Sn,{Pane:Et});function Hi(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return window.React.useMemo(()=>i=>{e.forEach(r=>r(i))},e)}const rt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ee(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function Ct(t){return"nodeType"in t}function W(t){var e,n;return t?Ee(t)?t:Ct(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function Ot(t){const{Document:e}=W(t);return t instanceof e}function Fe(t){return Ee(t)?!1:t instanceof W(t).HTMLElement}function Rn(t){return t instanceof W(t).SVGElement}function Ce(t){return t?Ee(t)?t.document:Ct(t)?Ot(t)?t:Fe(t)||Rn(t)?t.ownerDocument:document:document:document}const ae=rt?window.React.useLayoutEffect:window.React.useEffect;function st(t){const e=window.React.useRef(t);return ae(()=>{e.current=t}),window.React.useCallback(function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e.current==null?void 0:e.current(...i)},[])}function Xi(){const t=window.React.useRef(null),e=window.React.useCallback((i,r)=>{t.current=setInterval(i,r)},[]),n=window.React.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function je(t,e){e===void 0&&(e=[t]);const n=window.React.useRef(t);return ae(()=>{n.current!==t&&(n.current=t)},e),n}function Ye(t,e){const n=window.React.useRef();return window.React.useMemo(()=>{const i=t(n.current);return n.current=i,i},[...e])}function ot(t){const e=st(t),n=window.React.useRef(null),i=window.React.useCallback(r=>{r!==n.current&&(e==null||e(r,n.current)),n.current=r},[]);return[n,i]}function at(t){const e=window.React.useRef();return window.React.useEffect(()=>{e.current=t},[t]),e.current}let Nt={};function $e(t,e){return window.React.useMemo(()=>{if(e)return e;const n=Nt[t]==null?0:Nt[t]+1;return Nt[t]=n,t+"-"+n},[t,e])}function xn(t){return function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.reduce((s,l)=>{const a=Object.entries(l);for(const[o,c]of a){const d=s[o];d!=null&&(s[o]=d+t*c)}return s},{...e})}}const Oe=xn(1),Ke=xn(-1);function Wi(t){return"clientX"in t&&"clientY"in t}function lt(t){if(!t)return!1;const{KeyboardEvent:e}=W(t.target);return e&&t instanceof e}function Ui(t){if(!t)return!1;const{TouchEvent:e}=W(t.target);return e&&t instanceof e}function ct(t){if(Ui(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return Wi(t)?{x:t.clientX,y:t.clientY}:null}const pe=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[pe.Translate.toString(t),pe.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:i}=t;return e+" "+n+"ms "+i}}}),zn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Gi(t){return t.matches(zn)?t:t.querySelector(zn)}const Ji={display:"none"};function Zi(t){let{id:e,value:n}=t;return window.React.createElement("div",{id:e,style:Ji},n)}function qi(t){let{id:e,announcement:n,ariaLiveType:i="assertive"}=t;const r={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return window.React.createElement("div",{id:e,style:r,role:"status","aria-live":i,"aria-atomic":!0},n)}function Qi(){const[t,e]=window.React.useState("");return{announce:window.React.useCallback(i=>{i!=null&&e(i)},[]),announcement:t}}const Dn=window.React.createContext(null);function er(t){const e=window.React.useContext(Dn);window.React.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function tr(){const[t]=window.React.useState(()=>new Set),e=window.React.useCallback(i=>(t.add(i),()=>t.delete(i)),[t]);return[window.React.useCallback(i=>{let{type:r,event:s}=i;t.forEach(l=>{var a;return(a=l[r])==null?void 0:a.call(l,s)})},[t]),e]}const nr={draggable:`
7
+ To pick up a draggable item, press the space bar.
8
+ While dragging, use the arrow keys to move the item.
9
+ Press space again to drop the item in its new position, or press escape to cancel.
10
+ `},ir={onDragStart(t){let{active:e}=t;return"Picked up draggable item "+e.id+"."},onDragOver(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(t){let{active:e}=t;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function rr(t){let{announcements:e=ir,container:n,hiddenTextDescribedById:i,screenReaderInstructions:r=nr}=t;const{announce:s,announcement:l}=Qi(),a=$e("DndLiveRegion"),[o,c]=window.React.useState(!1);if(window.React.useEffect(()=>{c(!0)},[]),er(window.React.useMemo(()=>({onDragStart(u){let{active:h}=u;s(e.onDragStart({active:h}))},onDragMove(u){let{active:h,over:f}=u;e.onDragMove&&s(e.onDragMove({active:h,over:f}))},onDragOver(u){let{active:h,over:f}=u;s(e.onDragOver({active:h,over:f}))},onDragEnd(u){let{active:h,over:f}=u;s(e.onDragEnd({active:h,over:f}))},onDragCancel(u){let{active:h,over:f}=u;s(e.onDragCancel({active:h,over:f}))}}),[s,e])),!o)return null;const d=window.React.createElement(window.React.Fragment,null,window.React.createElement(Zi,{id:i,value:r.draggable}),window.React.createElement(qi,{id:a,announcement:l}));return n?window.ReactDOM.createPortal(d,n):d}var $;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})($||($={}));function ut(){}function In(t,e){return window.React.useMemo(()=>({sensor:t,options:e??{}}),[t,e])}function sr(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return window.React.useMemo(()=>[...e].filter(i=>i!=null),[...e])}const le=Object.freeze({x:0,y:0});function En(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function or(t,e){const n=ct(t);if(!n)return"0 0";const i={x:(n.x-e.left)/e.width*100,y:(n.y-e.top)/e.height*100};return i.x+"% "+i.y+"%"}function Cn(t,e){let{data:{value:n}}=t,{data:{value:i}}=e;return n-i}function ar(t,e){let{data:{value:n}}=t,{data:{value:i}}=e;return i-n}function On(t){let{left:e,top:n,height:i,width:r}=t;return[{x:e,y:n},{x:e+r,y:n},{x:e,y:n+i},{x:e+r,y:n+i}]}function Nn(t,e){if(!t||t.length===0)return null;const[n]=t;return n[e]}function Mn(t,e,n){return e===void 0&&(e=t.left),n===void 0&&(n=t.top),{x:e+t.width*.5,y:n+t.height*.5}}const lr=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:i}=t;const r=Mn(e,e.left,e.top),s=[];for(const l of i){const{id:a}=l,o=n.get(a);if(o){const c=En(Mn(o),r);s.push({id:a,data:{droppableContainer:l,value:c}})}}return s.sort(Cn)},cr=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:i}=t;const r=On(e),s=[];for(const l of i){const{id:a}=l,o=n.get(a);if(o){const c=On(o),d=r.reduce((h,f,m)=>h+En(c[m],f),0),u=Number((d/4).toFixed(4));s.push({id:a,data:{droppableContainer:l,value:u}})}}return s.sort(Cn)};function ur(t,e){const n=Math.max(e.top,t.top),i=Math.max(e.left,t.left),r=Math.min(e.left+e.width,t.left+t.width),s=Math.min(e.top+e.height,t.top+t.height),l=r-i,a=s-n;if(i<r&&n<s){const o=e.width*e.height,c=t.width*t.height,d=l*a,u=d/(o+c-d);return Number(u.toFixed(4))}return 0}const dr=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:i}=t;const r=[];for(const s of i){const{id:l}=s,a=n.get(l);if(a){const o=ur(a,e);o>0&&r.push({id:l,data:{droppableContainer:s,value:o}})}}return r.sort(ar)};function hr(t,e,n){return{...t,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function Vn(t,e){return t&&e?{x:t.left-e.left,y:t.top-e.top}:le}function fr(t){return function(n){for(var i=arguments.length,r=new Array(i>1?i-1:0),s=1;s<i;s++)r[s-1]=arguments[s];return r.reduce((l,a)=>({...l,top:l.top+t*a.y,bottom:l.bottom+t*a.y,left:l.left+t*a.x,right:l.right+t*a.x}),{...n})}}const mr=fr(1);function An(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function vr(t,e,n){const i=An(e);if(!i)return t;const{scaleX:r,scaleY:s,x:l,y:a}=i,o=t.left-l-(1-r)*parseFloat(n),c=t.top-a-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),d=r?t.width/r:t.width,u=s?t.height/s:t.height;return{width:d,height:u,top:c,right:o+d,bottom:c+u,left:o}}const pr={ignoreTransform:!1};function Ne(t,e){e===void 0&&(e=pr);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:c,transformOrigin:d}=W(t).getComputedStyle(t);c&&(n=vr(n,c,d))}const{top:i,left:r,width:s,height:l,bottom:a,right:o}=n;return{top:i,left:r,width:s,height:l,bottom:a,right:o}}function Ln(t){return Ne(t,{ignoreTransform:!0})}function wr(t){const e=t.innerWidth,n=t.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function gr(t,e){return e===void 0&&(e=W(t).getComputedStyle(t)),e.position==="fixed"}function br(t,e){e===void 0&&(e=W(t).getComputedStyle(t));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(r=>{const s=e[r];return typeof s=="string"?n.test(s):!1})}function dt(t,e){const n=[];function i(r){if(e!=null&&n.length>=e||!r)return n;if(Ot(r)&&r.scrollingElement!=null&&!n.includes(r.scrollingElement))return n.push(r.scrollingElement),n;if(!Fe(r)||Rn(r)||n.includes(r))return n;const s=W(t).getComputedStyle(r);return r!==t&&br(r,s)&&n.push(r),gr(r,s)?n:i(r.parentNode)}return t?i(t):n}function Tn(t){const[e]=dt(t,1);return e??null}function Mt(t){return!rt||!t?null:Ee(t)?t:Ct(t)?Ot(t)||t===Ce(t).scrollingElement?window:Fe(t)?t:null:null}function Pn(t){return Ee(t)?t.scrollX:t.scrollLeft}function kn(t){return Ee(t)?t.scrollY:t.scrollTop}function Vt(t){return{x:Pn(t),y:kn(t)}}var K;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(K||(K={}));function Bn(t){return!rt||!t?!1:t===document.scrollingElement}function Fn(t){const e={x:0,y:0},n=Bn(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},i={x:t.scrollWidth-n.width,y:t.scrollHeight-n.height},r=t.scrollTop<=e.y,s=t.scrollLeft<=e.x,l=t.scrollTop>=i.y,a=t.scrollLeft>=i.x;return{isTop:r,isLeft:s,isBottom:l,isRight:a,maxScroll:i,minScroll:e}}const yr={x:.2,y:.2};function _r(t,e,n,i,r){let{top:s,left:l,right:a,bottom:o}=n;i===void 0&&(i=10),r===void 0&&(r=yr);const{isTop:c,isBottom:d,isLeft:u,isRight:h}=Fn(t),f={x:0,y:0},m={x:0,y:0},v={height:e.height*r.y,width:e.width*r.x};return!c&&s<=e.top+v.height?(f.y=K.Backward,m.y=i*Math.abs((e.top+v.height-s)/v.height)):!d&&o>=e.bottom-v.height&&(f.y=K.Forward,m.y=i*Math.abs((e.bottom-v.height-o)/v.height)),!h&&a>=e.right-v.width?(f.x=K.Forward,m.x=i*Math.abs((e.right-v.width-a)/v.width)):!u&&l<=e.left+v.width&&(f.x=K.Backward,m.x=i*Math.abs((e.left+v.width-l)/v.width)),{direction:f,speed:m}}function Sr(t){if(t===document.scrollingElement){const{innerWidth:s,innerHeight:l}=window;return{top:0,left:0,right:s,bottom:l,width:s,height:l}}const{top:e,left:n,right:i,bottom:r}=t.getBoundingClientRect();return{top:e,left:n,right:i,bottom:r,width:t.clientWidth,height:t.clientHeight}}function jn(t){return t.reduce((e,n)=>Oe(e,Vt(n)),le)}function Rr(t){return t.reduce((e,n)=>e+Pn(n),0)}function xr(t){return t.reduce((e,n)=>e+kn(n),0)}function Yn(t,e){if(e===void 0&&(e=Ne),!t)return;const{top:n,left:i,bottom:r,right:s}=e(t);Tn(t)&&(r<=0||s<=0||n>=window.innerHeight||i>=window.innerWidth)&&t.scrollIntoView({block:"center",inline:"center"})}const zr=[["x",["left","right"],Rr],["y",["top","bottom"],xr]];class At{constructor(e,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const i=dt(n),r=jn(i);this.rect={...e},this.width=e.width,this.height=e.height;for(const[s,l,a]of zr)for(const o of l)Object.defineProperty(this,o,{get:()=>{const c=a(i),d=r[s]-c;return this.rect[o]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class He{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...n)})},this.target=e}add(e,n,i){var r;(r=this.target)==null||r.addEventListener(e,n,i),this.listeners.push([e,n,i])}}function Dr(t){const{EventTarget:e}=W(t);return t instanceof e?t:Ce(t)}function Lt(t,e){const n=Math.abs(t.x),i=Math.abs(t.y);return typeof e=="number"?Math.sqrt(n**2+i**2)>e:"x"in e&&"y"in e?n>e.x&&i>e.y:"x"in e?n>e.x:"y"in e?i>e.y:!1}var re;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(re||(re={}));function $n(t){t.preventDefault()}function Ir(t){t.stopPropagation()}var V;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(V||(V={}));const Kn={start:[V.Space,V.Enter],cancel:[V.Esc],end:[V.Space,V.Enter,V.Tab]},Er=(t,e)=>{let{currentCoordinates:n}=e;switch(t.code){case V.Right:return{...n,x:n.x+25};case V.Left:return{...n,x:n.x-25};case V.Down:return{...n,y:n.y+25};case V.Up:return{...n,y:n.y-25}}};class Tt{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:n}}=e;this.props=e,this.listeners=new He(Ce(n)),this.windowListeners=new He(W(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(re.Resize,this.handleCancel),this.windowListeners.add(re.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(re.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:n}=this.props,i=e.node.current;i&&Yn(i),n(le)}handleKeyDown(e){if(lt(e)){const{active:n,context:i,options:r}=this.props,{keyboardCodes:s=Kn,coordinateGetter:l=Er,scrollBehavior:a="smooth"}=r,{code:o}=e;if(s.end.includes(o)){this.handleEnd(e);return}if(s.cancel.includes(o)){this.handleCancel(e);return}const{collisionRect:c}=i.current,d=c?{x:c.left,y:c.top}:le;this.referenceCoordinates||(this.referenceCoordinates=d);const u=l(e,{active:n,context:i.current,currentCoordinates:d});if(u){const h=Ke(u,d),f={x:0,y:0},{scrollableAncestors:m}=i.current;for(const v of m){const p=e.code,{isTop:g,isRight:b,isLeft:y,isBottom:_,maxScroll:R,minScroll:x}=Fn(v),w=Sr(v),S={x:Math.min(p===V.Right?w.right-w.width/2:w.right,Math.max(p===V.Right?w.left:w.left+w.width/2,u.x)),y:Math.min(p===V.Down?w.bottom-w.height/2:w.bottom,Math.max(p===V.Down?w.top:w.top+w.height/2,u.y))},C=p===V.Right&&!b||p===V.Left&&!y,N=p===V.Down&&!_||p===V.Up&&!g;if(C&&S.x!==u.x){const L=v.scrollLeft+h.x,O=p===V.Right&&L<=R.x||p===V.Left&&L>=x.x;if(O&&!h.y){v.scrollTo({left:L,behavior:a});return}O?f.x=v.scrollLeft-L:f.x=p===V.Right?v.scrollLeft-R.x:v.scrollLeft-x.x,f.x&&v.scrollBy({left:-f.x,behavior:a});break}else if(N&&S.y!==u.y){const L=v.scrollTop+h.y,O=p===V.Down&&L<=R.y||p===V.Up&&L>=x.y;if(O&&!h.x){v.scrollTo({top:L,behavior:a});return}O?f.y=v.scrollTop-L:f.y=p===V.Down?v.scrollTop-R.y:v.scrollTop-x.y,f.y&&v.scrollBy({top:-f.y,behavior:a});break}}this.handleMove(e,Oe(Ke(u,this.referenceCoordinates),f))}}}handleMove(e,n){const{onMove:i}=this.props;e.preventDefault(),i(n)}handleEnd(e){const{onEnd:n}=this.props;e.preventDefault(),this.detach(),n()}handleCancel(e){const{onCancel:n}=this.props;e.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Tt.activators=[{eventName:"onKeyDown",handler:(t,e,n)=>{let{keyboardCodes:i=Kn,onActivation:r}=e,{active:s}=n;const{code:l}=t.nativeEvent;if(i.start.includes(l)){const a=s.activatorNode.current;return a&&t.target!==a?!1:(t.preventDefault(),r==null||r({event:t.nativeEvent}),!0)}return!1}}];function Hn(t){return!!(t&&"distance"in t)}function Xn(t){return!!(t&&"delay"in t)}class Pt{constructor(e,n,i){var r;i===void 0&&(i=Dr(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=n;const{event:s}=e,{target:l}=s;this.props=e,this.events=n,this.document=Ce(l),this.documentListeners=new He(this.document),this.listeners=new He(i),this.windowListeners=new He(W(l)),this.initialCoordinates=(r=ct(s))!=null?r:le,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:n,bypassActivationConstraint:i}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(re.Resize,this.handleCancel),this.windowListeners.add(re.DragStart,$n),this.windowListeners.add(re.VisibilityChange,this.handleCancel),this.windowListeners.add(re.ContextMenu,$n),this.documentListeners.add(re.Keydown,this.handleKeydown),n){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Xn(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Hn(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,n){const{active:i,onPending:r}=this.props;r(i,e,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:e}=this,{onStart:n}=this.props;e&&(this.activated=!0,this.documentListeners.add(re.Click,Ir,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(re.SelectionChange,this.removeTextSelection),n(e))}handleMove(e){var n;const{activated:i,initialCoordinates:r,props:s}=this,{onMove:l,options:{activationConstraint:a}}=s;if(!r)return;const o=(n=ct(e))!=null?n:le,c=Ke(r,o);if(!i&&a){if(Hn(a)){if(a.tolerance!=null&&Lt(c,a.tolerance))return this.handleCancel();if(Lt(c,a.distance))return this.handleStart()}if(Xn(a)&&Lt(c,a.tolerance))return this.handleCancel();this.handlePending(a,c);return}e.cancelable&&e.preventDefault(),l(o)}handleEnd(){const{onAbort:e,onEnd:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleCancel(){const{onAbort:e,onCancel:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleKeydown(e){e.code===V.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const Cr={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class kt extends Pt{constructor(e){const{event:n}=e,i=Ce(n.target);super(e,Cr,i)}}kt.activators=[{eventName:"onPointerDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:i}=e;return!n.isPrimary||n.button!==0?!1:(i==null||i({event:n}),!0)}}];const Or={move:{name:"mousemove"},end:{name:"mouseup"}};var Bt;(function(t){t[t.RightClick=2]="RightClick"})(Bt||(Bt={}));class Nr extends Pt{constructor(e){super(e,Or,Ce(e.event.target))}}Nr.activators=[{eventName:"onMouseDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:i}=e;return n.button===Bt.RightClick?!1:(i==null||i({event:n}),!0)}}];const Ft={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Mr extends Pt{constructor(e){super(e,Ft)}static setup(){return window.addEventListener(Ft.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Ft.move.name,e)};function e(){}}}Mr.activators=[{eventName:"onTouchStart",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:i}=e;const{touches:r}=n;return r.length>1?!1:(i==null||i({event:n}),!0)}}];var Xe;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(Xe||(Xe={}));var ht;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(ht||(ht={}));function Vr(t){let{acceleration:e,activator:n=Xe.Pointer,canScroll:i,draggingRect:r,enabled:s,interval:l=5,order:a=ht.TreeOrder,pointerCoordinates:o,scrollableAncestors:c,scrollableAncestorRects:d,delta:u,threshold:h}=t;const f=Lr({delta:u,disabled:!s}),[m,v]=Xi(),p=window.React.useRef({x:0,y:0}),g=window.React.useRef({x:0,y:0}),b=window.React.useMemo(()=>{switch(n){case Xe.Pointer:return o?{top:o.y,bottom:o.y,left:o.x,right:o.x}:null;case Xe.DraggableRect:return r}},[n,r,o]),y=window.React.useRef(null),_=window.React.useCallback(()=>{const x=y.current;if(!x)return;const w=p.current.x*g.current.x,S=p.current.y*g.current.y;x.scrollBy(w,S)},[]),R=window.React.useMemo(()=>a===ht.TreeOrder?[...c].reverse():c,[a,c]);window.React.useEffect(()=>{if(!s||!c.length||!b){v();return}for(const x of R){if((i==null?void 0:i(x))===!1)continue;const w=c.indexOf(x),S=d[w];if(!S)continue;const{direction:C,speed:N}=_r(x,S,b,e,h);for(const L of["x","y"])f[L][C[L]]||(N[L]=0,C[L]=0);if(N.x>0||N.y>0){v(),y.current=x,m(_,l),p.current=N,g.current=C;return}}p.current={x:0,y:0},g.current={x:0,y:0},v()},[e,_,i,v,s,l,JSON.stringify(b),JSON.stringify(f),m,c,R,d,JSON.stringify(h)])}const Ar={x:{[K.Backward]:!1,[K.Forward]:!1},y:{[K.Backward]:!1,[K.Forward]:!1}};function Lr(t){let{delta:e,disabled:n}=t;const i=at(e);return Ye(r=>{if(n||!i||!r)return Ar;const s={x:Math.sign(e.x-i.x),y:Math.sign(e.y-i.y)};return{x:{[K.Backward]:r.x[K.Backward]||s.x===-1,[K.Forward]:r.x[K.Forward]||s.x===1},y:{[K.Backward]:r.y[K.Backward]||s.y===-1,[K.Forward]:r.y[K.Forward]||s.y===1}}},[n,e,i])}function Tr(t,e){const n=e!=null?t.get(e):void 0,i=n?n.node.current:null;return Ye(r=>{var s;return e==null?null:(s=i??r)!=null?s:null},[i,e])}function Pr(t,e){return window.React.useMemo(()=>t.reduce((n,i)=>{const{sensor:r}=i,s=r.activators.map(l=>({eventName:l.eventName,handler:e(l.handler,i)}));return[...n,...s]},[]),[t,e])}var We;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(We||(We={}));var jt;(function(t){t.Optimized="optimized"})(jt||(jt={}));const Wn=new Map;function kr(t,e){let{dragging:n,dependencies:i,config:r}=e;const[s,l]=window.React.useState(null),{frequency:a,measure:o,strategy:c}=r,d=window.React.useRef(t),u=p(),h=je(u),f=window.React.useCallback(function(g){g===void 0&&(g=[]),!h.current&&l(b=>b===null?g:b.concat(g.filter(y=>!b.includes(y))))},[h]),m=window.React.useRef(null),v=Ye(g=>{if(u&&!n)return Wn;if(!g||g===Wn||d.current!==t||s!=null){const b=new Map;for(let y of t){if(!y)continue;if(s&&s.length>0&&!s.includes(y.id)&&y.rect.current){b.set(y.id,y.rect.current);continue}const _=y.node.current,R=_?new At(o(_),_):null;y.rect.current=R,R&&b.set(y.id,R)}return b}return g},[t,s,n,u,o]);return window.React.useEffect(()=>{d.current=t},[t]),window.React.useEffect(()=>{u||f()},[n,u]),window.React.useEffect(()=>{s&&s.length>0&&l(null)},[JSON.stringify(s)]),window.React.useEffect(()=>{u||typeof a!="number"||m.current!==null||(m.current=setTimeout(()=>{f(),m.current=null},a))},[a,u,f,...i]),{droppableRects:v,measureDroppableContainers:f,measuringScheduled:s!=null};function p(){switch(c){case We.Always:return!1;case We.BeforeDragging:return n;default:return!n}}}function Yt(t,e){return Ye(n=>t?n||(typeof e=="function"?e(t):t):null,[e,t])}function Br(t,e){return Yt(t,e)}function Fr(t){let{callback:e,disabled:n}=t;const i=st(e),r=window.React.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(i)},[i,n]);return window.React.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function ft(t){let{callback:e,disabled:n}=t;const i=st(e),r=window.React.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(i)},[n]);return window.React.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function jr(t){return new At(Ne(t),t)}function Un(t,e,n){e===void 0&&(e=jr);const[i,r]=window.React.useState(null);function s(){r(o=>{if(!t)return null;if(t.isConnected===!1){var c;return(c=o??n)!=null?c:null}const d=e(t);return JSON.stringify(o)===JSON.stringify(d)?o:d})}const l=Fr({callback(o){if(t)for(const c of o){const{type:d,target:u}=c;if(d==="childList"&&u instanceof HTMLElement&&u.contains(t)){s();break}}}}),a=ft({callback:s});return ae(()=>{s(),t?(a==null||a.observe(t),l==null||l.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),l==null||l.disconnect())},[t]),i}function Yr(t){const e=Yt(t);return Vn(t,e)}const Gn=[];function $r(t){const e=window.React.useRef(t),n=Ye(i=>t?i&&i!==Gn&&t&&e.current&&t.parentNode===e.current.parentNode?i:dt(t):Gn,[t]);return window.React.useEffect(()=>{e.current=t},[t]),n}function Kr(t){const[e,n]=window.React.useState(null),i=window.React.useRef(t),r=window.React.useCallback(s=>{const l=Mt(s.target);l&&n(a=>a?(a.set(l,Vt(l)),new Map(a)):null)},[]);return window.React.useEffect(()=>{const s=i.current;if(t!==s){l(s);const a=t.map(o=>{const c=Mt(o);return c?(c.addEventListener("scroll",r,{passive:!0}),[c,Vt(c)]):null}).filter(o=>o!=null);n(a.length?new Map(a):null),i.current=t}return()=>{l(t),l(s)};function l(a){a.forEach(o=>{const c=Mt(o);c==null||c.removeEventListener("scroll",r)})}},[r,t]),window.React.useMemo(()=>t.length?e?Array.from(e.values()).reduce((s,l)=>Oe(s,l),le):jn(t):le,[t,e])}function Jn(t,e){e===void 0&&(e=[]);const n=window.React.useRef(null);return window.React.useEffect(()=>{n.current=null},e),window.React.useEffect(()=>{const i=t!==le;i&&!n.current&&(n.current=t),!i&&n.current&&(n.current=null)},[t]),n.current?Ke(t,n.current):le}function Hr(t){window.React.useEffect(()=>{if(!rt)return;const e=t.map(n=>{let{sensor:i}=n;return i.setup==null?void 0:i.setup()});return()=>{for(const n of e)n==null||n()}},t.map(e=>{let{sensor:n}=e;return n}))}function Xr(t,e){return window.React.useMemo(()=>t.reduce((n,i)=>{let{eventName:r,handler:s}=i;return n[r]=l=>{s(l,e)},n},{}),[t,e])}function Zn(t){return window.React.useMemo(()=>t?wr(t):null,[t])}const qn=[];function Wr(t,e){e===void 0&&(e=Ne);const[n]=t,i=Zn(n?W(n):null),[r,s]=window.React.useState(qn);function l(){s(()=>t.length?t.map(o=>Bn(o)?i:new At(e(o),o)):qn)}const a=ft({callback:l});return ae(()=>{a==null||a.disconnect(),l(),t.forEach(o=>a==null?void 0:a.observe(o))},[t]),r}function Qn(t){if(!t)return null;if(t.children.length>1)return t;const e=t.children[0];return Fe(e)?e:t}function Ur(t){let{measure:e}=t;const[n,i]=window.React.useState(null),r=window.React.useCallback(c=>{for(const{target:d}of c)if(Fe(d)){i(u=>{const h=e(d);return u?{...u,width:h.width,height:h.height}:h});break}},[e]),s=ft({callback:r}),l=window.React.useCallback(c=>{const d=Qn(c);s==null||s.disconnect(),d&&(s==null||s.observe(d)),i(d?e(d):null)},[e,s]),[a,o]=ot(l);return window.React.useMemo(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}const Gr=[{sensor:kt,options:{}},{sensor:Tt,options:{}}],Jr={current:{}},mt={draggable:{measure:Ln},droppable:{measure:Ln,strategy:We.WhileDragging,frequency:jt.Optimized},dragOverlay:{measure:Ne}};class Ue extends Map{get(e){var n;return e!=null&&(n=super.get(e))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:n}=e;return!n})}getNodeFor(e){var n,i;return(n=(i=this.get(e))==null?void 0:i.node.current)!=null?n:void 0}}const Zr={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ue,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:ut},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:mt,measureDroppableContainers:ut,windowRect:null,measuringScheduled:!1},ei={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:ut,draggableNodes:new Map,over:null,measureDroppableContainers:ut},Ge=window.React.createContext(ei),ti=window.React.createContext(Zr);function qr(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ue}}}function Qr(t,e){switch(e.type){case $.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case $.DragMove:return t.draggable.active==null?t:{...t,draggable:{...t.draggable,translate:{x:e.coordinates.x-t.draggable.initialCoordinates.x,y:e.coordinates.y-t.draggable.initialCoordinates.y}}};case $.DragEnd:case $.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case $.RegisterDroppable:{const{element:n}=e,{id:i}=n,r=new Ue(t.droppable.containers);return r.set(i,n),{...t,droppable:{...t.droppable,containers:r}}}case $.SetDroppableDisabled:{const{id:n,key:i,disabled:r}=e,s=t.droppable.containers.get(n);if(!s||i!==s.key)return t;const l=new Ue(t.droppable.containers);return l.set(n,{...s,disabled:r}),{...t,droppable:{...t.droppable,containers:l}}}case $.UnregisterDroppable:{const{id:n,key:i}=e,r=t.droppable.containers.get(n);if(!r||i!==r.key)return t;const s=new Ue(t.droppable.containers);return s.delete(n),{...t,droppable:{...t.droppable,containers:s}}}default:return t}}function es(t){let{disabled:e}=t;const{active:n,activatorEvent:i,draggableNodes:r}=window.React.useContext(Ge),s=at(i),l=at(n==null?void 0:n.id);return window.React.useEffect(()=>{if(!e&&!i&&s&&l!=null){if(!lt(s)||document.activeElement===s.target)return;const a=r.get(l);if(!a)return;const{activatorNode:o,node:c}=a;if(!o.current&&!c.current)return;requestAnimationFrame(()=>{for(const d of[o.current,c.current]){if(!d)continue;const u=Gi(d);if(u){u.focus();break}}})}},[i,e,r,l,s]),null}function ni(t,e){let{transform:n,...i}=e;return t!=null&&t.length?t.reduce((r,s)=>s({transform:r,...i}),n):n}function ts(t){return window.React.useMemo(()=>({draggable:{...mt.draggable,...t==null?void 0:t.draggable},droppable:{...mt.droppable,...t==null?void 0:t.droppable},dragOverlay:{...mt.dragOverlay,...t==null?void 0:t.dragOverlay}}),[t==null?void 0:t.draggable,t==null?void 0:t.droppable,t==null?void 0:t.dragOverlay])}function ns(t){let{activeNode:e,measure:n,initialRect:i,config:r=!0}=t;const s=window.React.useRef(!1),{x:l,y:a}=typeof r=="boolean"?{x:r,y:r}:r;ae(()=>{if(!l&&!a||!e){s.current=!1;return}if(s.current||!i)return;const c=e==null?void 0:e.node.current;if(!c||c.isConnected===!1)return;const d=n(c),u=Vn(d,i);if(l||(u.x=0),a||(u.y=0),s.current=!0,Math.abs(u.x)>0||Math.abs(u.y)>0){const h=Tn(c);h&&h.scrollBy({top:u.y,left:u.x})}},[e,l,a,i,n])}const vt=window.React.createContext({...le,scaleX:1,scaleY:1});var we;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(we||(we={}));const is=window.React.memo(function(e){var n,i,r,s;let{id:l,accessibility:a,autoScroll:o=!0,children:c,sensors:d=Gr,collisionDetection:u=dr,measuring:h,modifiers:f,...m}=e;const v=window.React.useReducer(Qr,void 0,qr),[p,g]=v,[b,y]=tr(),[_,R]=window.React.useState(we.Uninitialized),x=_===we.Initialized,{draggable:{active:w,nodes:S,translate:C},droppable:{containers:N}}=p,L=w!=null?S.get(w):null,O=window.React.useRef({initial:null,translated:null}),I=window.React.useMemo(()=>{var X;return w!=null?{id:w,data:(X=L==null?void 0:L.data)!=null?X:Jr,rect:O}:null},[w,L]),P=window.React.useRef(null),[A,T]=window.React.useState(null),[M,B]=window.React.useState(null),U=je(m,Object.values(m)),ce=$e("DndDescribedBy",l),j=window.React.useMemo(()=>N.getEnabled(),[N]),Y=ts(h),{droppableRects:F,measureDroppableContainers:G,measuringScheduled:ue}=kr(j,{dragging:x,dependencies:[C.x,C.y],config:Y.droppable}),J=Tr(S,w),ge=window.React.useMemo(()=>M?ct(M):null,[M]),E=Zs(),D=Br(J,Y.draggable.measure);ns({activeNode:w!=null?S.get(w):null,config:E.layoutShiftCompensation,initialRect:D,measure:Y.draggable.measure});const z=Un(J,Y.draggable.measure,D),k=Un(J?J.parentElement:null),de=window.React.useRef({activatorEvent:null,active:null,activeNode:J,collisionRect:null,collisions:null,droppableRects:F,draggableNodes:S,draggingNode:null,draggingNodeRect:null,droppableContainers:N,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Me=N.getNodeFor((n=de.current.over)==null?void 0:n.id),me=Ur({measure:Y.dragOverlay.measure}),Ve=(i=me.nodeRef.current)!=null?i:J,Ae=x?(r=me.rect)!=null?r:z:null,fi=!!(me.nodeRef.current&&me.rect),mi=Yr(fi?null:z),Ht=Zn(Ve?W(Ve):null),be=$r(x?Me??J:null),bt=Wr(be),yt=ni(f,{transform:{x:C.x-mi.x,y:C.y-mi.y,scaleX:1,scaleY:1},activatorEvent:M,active:I,activeNodeRect:z,containerNodeRect:k,draggingNodeRect:Ae,over:de.current.over,overlayNodeRect:me.rect,scrollableAncestors:be,scrollableAncestorRects:bt,windowRect:Ht}),vi=ge?Oe(ge,C):null,pi=Kr(be),Ks=Jn(pi),Hs=Jn(pi,[z]),Le=Oe(yt,Ks),Te=Ae?mr(Ae,yt):null,Je=I&&Te?u({active:I,collisionRect:Te,droppableRects:F,droppableContainers:j,pointerCoordinates:vi}):null,wi=Nn(Je,"id"),[ye,gi]=window.React.useState(null),Xs=fi?yt:Oe(yt,Hs),Ws=hr(Xs,(s=ye==null?void 0:ye.rect)!=null?s:null,z),Xt=window.React.useRef(null),bi=window.React.useCallback((X,q)=>{let{sensor:Q,options:_e}=q;if(P.current==null)return;const se=S.get(P.current);if(!se)return;const ee=X.nativeEvent,he=new Q({active:P.current,activeNode:se,event:ee,options:_e,context:de,onAbort(H){if(!S.get(H))return;const{onDragAbort:fe}=U.current,ve={id:H};fe==null||fe(ve),b({type:"onDragAbort",event:ve})},onPending(H,Se,fe,ve){if(!S.get(H))return;const{onDragPending:qe}=U.current,Re={id:H,constraint:Se,initialCoordinates:fe,offset:ve};qe==null||qe(Re),b({type:"onDragPending",event:Re})},onStart(H){const Se=P.current;if(Se==null)return;const fe=S.get(Se);if(!fe)return;const{onDragStart:ve}=U.current,Ze={activatorEvent:ee,active:{id:Se,data:fe.data,rect:O}};window.ReactDOM.unstable_batchedUpdates(()=>{ve==null||ve(Ze),R(we.Initializing),g({type:$.DragStart,initialCoordinates:H,active:Se}),b({type:"onDragStart",event:Ze}),T(Xt.current),B(ee)})},onMove(H){g({type:$.DragMove,coordinates:H})},onEnd:Pe($.DragEnd),onCancel:Pe($.DragCancel)});Xt.current=he;function Pe(H){return async function(){const{active:fe,collisions:ve,over:Ze,scrollAdjustedTranslate:qe}=de.current;let Re=null;if(fe&&qe){const{cancelDrop:Qe}=U.current;Re={activatorEvent:ee,active:fe,collisions:ve,delta:qe,over:Ze},H===$.DragEnd&&typeof Qe=="function"&&await Promise.resolve(Qe(Re))&&(H=$.DragCancel)}P.current=null,window.ReactDOM.unstable_batchedUpdates(()=>{g({type:H}),R(we.Uninitialized),gi(null),T(null),B(null),Xt.current=null;const Qe=H===$.DragEnd?"onDragEnd":"onDragCancel";if(Re){const Wt=U.current[Qe];Wt==null||Wt(Re),b({type:Qe,event:Re})}})}}},[S]),Us=window.React.useCallback((X,q)=>(Q,_e)=>{const se=Q.nativeEvent,ee=S.get(_e);if(P.current!==null||!ee||se.dndKit||se.defaultPrevented)return;const he={active:ee};X(Q,q.options,he)===!0&&(se.dndKit={capturedBy:q.sensor},P.current=_e,bi(Q,q))},[S,bi]),yi=Pr(d,Us);Hr(d),ae(()=>{z&&_===we.Initializing&&R(we.Initialized)},[z,_]),window.React.useEffect(()=>{const{onDragMove:X}=U.current,{active:q,activatorEvent:Q,collisions:_e,over:se}=de.current;if(!q||!Q)return;const ee={active:q,activatorEvent:Q,collisions:_e,delta:{x:Le.x,y:Le.y},over:se};window.ReactDOM.unstable_batchedUpdates(()=>{X==null||X(ee),b({type:"onDragMove",event:ee})})},[Le.x,Le.y]),window.React.useEffect(()=>{const{active:X,activatorEvent:q,collisions:Q,droppableContainers:_e,scrollAdjustedTranslate:se}=de.current;if(!X||P.current==null||!q||!se)return;const{onDragOver:ee}=U.current,he=_e.get(wi),Pe=he&&he.rect.current?{id:he.id,rect:he.rect.current,data:he.data,disabled:he.disabled}:null,H={active:X,activatorEvent:q,collisions:Q,delta:{x:se.x,y:se.y},over:Pe};window.ReactDOM.unstable_batchedUpdates(()=>{gi(Pe),ee==null||ee(H),b({type:"onDragOver",event:H})})},[wi]),ae(()=>{de.current={activatorEvent:M,active:I,activeNode:J,collisionRect:Te,collisions:Je,droppableRects:F,draggableNodes:S,draggingNode:Ve,draggingNodeRect:Ae,droppableContainers:N,over:ye,scrollableAncestors:be,scrollAdjustedTranslate:Le},O.current={initial:Ae,translated:Te}},[I,J,Je,Te,S,Ve,Ae,F,N,ye,be,Le]),Vr({...E,delta:C,draggingRect:Te,pointerCoordinates:vi,scrollableAncestors:be,scrollableAncestorRects:bt});const Gs=window.React.useMemo(()=>({active:I,activeNode:J,activeNodeRect:z,activatorEvent:M,collisions:Je,containerNodeRect:k,dragOverlay:me,draggableNodes:S,droppableContainers:N,droppableRects:F,over:ye,measureDroppableContainers:G,scrollableAncestors:be,scrollableAncestorRects:bt,measuringConfiguration:Y,measuringScheduled:ue,windowRect:Ht}),[I,J,z,M,Je,k,me,S,N,F,ye,G,be,bt,Y,ue,Ht]),Js=window.React.useMemo(()=>({activatorEvent:M,activators:yi,active:I,activeNodeRect:z,ariaDescribedById:{draggable:ce},dispatch:g,draggableNodes:S,over:ye,measureDroppableContainers:G}),[M,yi,I,z,g,ce,S,ye,G]);return window.React.createElement(Dn.Provider,{value:y},window.React.createElement(Ge.Provider,{value:Js},window.React.createElement(ti.Provider,{value:Gs},window.React.createElement(vt.Provider,{value:Ws},c)),window.React.createElement(es,{disabled:(a==null?void 0:a.restoreFocus)===!1})),window.React.createElement(rr,{...a,hiddenTextDescribedById:ce}));function Zs(){const X=(A==null?void 0:A.autoScrollEnabled)===!1,q=typeof o=="object"?o.enabled===!1:o===!1,Q=x&&!X&&!q;return typeof o=="object"?{...o,enabled:Q}:{enabled:Q}}}),rs=window.React.createContext(null),ii="button",ss="Draggable";function os(t){let{id:e,data:n,disabled:i=!1,attributes:r}=t;const s=$e(ss),{activators:l,activatorEvent:a,active:o,activeNodeRect:c,ariaDescribedById:d,draggableNodes:u,over:h}=window.React.useContext(Ge),{role:f=ii,roleDescription:m="draggable",tabIndex:v=0}=r??{},p=(o==null?void 0:o.id)===e,g=window.React.useContext(p?vt:rs),[b,y]=ot(),[_,R]=ot(),x=Xr(l,e),w=je(n);ae(()=>(u.set(e,{id:e,key:s,node:b,activatorNode:_,data:w}),()=>{const C=u.get(e);C&&C.key===s&&u.delete(e)}),[u,e]);const S=window.React.useMemo(()=>({role:f,tabIndex:v,"aria-disabled":i,"aria-pressed":p&&f===ii?!0:void 0,"aria-roledescription":m,"aria-describedby":d.draggable}),[i,f,v,p,m,d.draggable]);return{active:o,activatorEvent:a,activeNodeRect:c,attributes:S,isDragging:p,listeners:i?void 0:x,node:b,over:h,setNodeRef:y,setActivatorNodeRef:R,transform:g}}function ri(){return window.React.useContext(ti)}const as="Droppable",ls={timeout:25};function cs(t){let{data:e,disabled:n=!1,id:i,resizeObserverConfig:r}=t;const s=$e(as),{active:l,dispatch:a,over:o,measureDroppableContainers:c}=window.React.useContext(Ge),d=window.React.useRef({disabled:n}),u=window.React.useRef(!1),h=window.React.useRef(null),f=window.React.useRef(null),{disabled:m,updateMeasurementsFor:v,timeout:p}={...ls,...r},g=je(v??i),b=window.React.useCallback(()=>{if(!u.current){u.current=!0;return}f.current!=null&&clearTimeout(f.current),f.current=setTimeout(()=>{c(Array.isArray(g.current)?g.current:[g.current]),f.current=null},p)},[p]),y=ft({callback:b,disabled:m||!l}),_=window.React.useCallback((S,C)=>{y&&(C&&(y.unobserve(C),u.current=!1),S&&y.observe(S))},[y]),[R,x]=ot(_),w=je(e);return window.React.useEffect(()=>{!y||!R.current||(y.disconnect(),u.current=!1,y.observe(R.current))},[R,y]),window.React.useEffect(()=>(a({type:$.RegisterDroppable,element:{id:i,key:s,disabled:n,node:R,rect:h,data:w}}),()=>a({type:$.UnregisterDroppable,key:s,id:i})),[i]),window.React.useEffect(()=>{n!==d.current.disabled&&(a({type:$.SetDroppableDisabled,id:i,key:s,disabled:n}),d.current.disabled=n)},[i,s,n,a]),{active:l,rect:h,isOver:(o==null?void 0:o.id)===i,node:R,over:o,setNodeRef:x}}function us(t){let{animation:e,children:n}=t;const[i,r]=window.React.useState(null),[s,l]=window.React.useState(null),a=at(n);return!n&&!i&&a&&r(a),ae(()=>{if(!s)return;const o=i==null?void 0:i.key,c=i==null?void 0:i.props.id;if(o==null||c==null){r(null);return}Promise.resolve(e(c,s)).then(()=>{r(null)})},[e,i,s]),window.React.createElement(window.React.Fragment,null,n,i?window.React.cloneElement(i,{ref:l}):null)}const ds={x:0,y:0,scaleX:1,scaleY:1};function hs(t){let{children:e}=t;return window.React.createElement(Ge.Provider,{value:ei},window.React.createElement(vt.Provider,{value:ds},e))}const fs={position:"fixed",touchAction:"none"},ms=t=>lt(t)?"transform 250ms ease":void 0,vs=window.React.forwardRef((t,e)=>{let{as:n,activatorEvent:i,adjustScale:r,children:s,className:l,rect:a,style:o,transform:c,transition:d=ms}=t;if(!a)return null;const u=r?c:{...c,scaleX:1,scaleY:1},h={...fs,width:a.width,height:a.height,top:a.top,left:a.left,transform:pe.Transform.toString(u),transformOrigin:r&&i?or(i,a):void 0,transition:typeof d=="function"?d(i):d,...o};return window.React.createElement(n,{className:l,style:h,ref:e},s)}),ps={duration:250,easing:"ease",keyframes:t=>{let{transform:{initial:e,final:n}}=t;return[{transform:pe.Transform.toString(e)},{transform:pe.Transform.toString(n)}]},sideEffects:(t=>e=>{let{active:n,dragOverlay:i}=e;const r={},{styles:s,className:l}=t;if(s!=null&&s.active)for(const[a,o]of Object.entries(s.active))o!==void 0&&(r[a]=n.node.style.getPropertyValue(a),n.node.style.setProperty(a,o));if(s!=null&&s.dragOverlay)for(const[a,o]of Object.entries(s.dragOverlay))o!==void 0&&i.node.style.setProperty(a,o);return l!=null&&l.active&&n.node.classList.add(l.active),l!=null&&l.dragOverlay&&i.node.classList.add(l.dragOverlay),function(){for(const[o,c]of Object.entries(r))n.node.style.setProperty(o,c);l!=null&&l.active&&n.node.classList.remove(l.active)}})({styles:{active:{opacity:"0"}}})};function ws(t){let{config:e,draggableNodes:n,droppableContainers:i,measuringConfiguration:r}=t;return st((s,l)=>{if(e===null)return;const a=n.get(s);if(!a)return;const o=a.node.current;if(!o)return;const c=Qn(l);if(!c)return;const{transform:d}=W(l).getComputedStyle(l),u=An(d);if(!u)return;const h=typeof e=="function"?e:gs(e);return Yn(o,r.draggable.measure),h({active:{id:s,data:a.data,node:o,rect:r.draggable.measure(o)},draggableNodes:n,dragOverlay:{node:l,rect:r.dragOverlay.measure(c)},droppableContainers:i,measuringConfiguration:r,transform:u})})}function gs(t){const{duration:e,easing:n,sideEffects:i,keyframes:r}={...ps,...t};return s=>{let{active:l,dragOverlay:a,transform:o,...c}=s;if(!e)return;const d={x:a.rect.left-l.rect.left,y:a.rect.top-l.rect.top},u={scaleX:o.scaleX!==1?l.rect.width*o.scaleX/a.rect.width:1,scaleY:o.scaleY!==1?l.rect.height*o.scaleY/a.rect.height:1},h={x:o.x-d.x,y:o.y-d.y,...u},f=r({...c,active:l,dragOverlay:a,transform:{initial:o,final:h}}),[m]=f,v=f[f.length-1];if(JSON.stringify(m)===JSON.stringify(v))return;const p=i==null?void 0:i({active:l,dragOverlay:a,...c}),g=a.node.animate(f,{duration:e,easing:n,fill:"forwards"});return new Promise(b=>{g.onfinish=()=>{p==null||p(),b()}})}}let si=0;function bs(t){return window.React.useMemo(()=>{if(t!=null)return si++,si},[t])}const ys=window.React.memo(t=>{let{adjustScale:e=!1,children:n,dropAnimation:i,style:r,transition:s,modifiers:l,wrapperElement:a="div",className:o,zIndex:c=999}=t;const{activatorEvent:d,active:u,activeNodeRect:h,containerNodeRect:f,draggableNodes:m,droppableContainers:v,dragOverlay:p,over:g,measuringConfiguration:b,scrollableAncestors:y,scrollableAncestorRects:_,windowRect:R}=ri(),x=window.React.useContext(vt),w=bs(u==null?void 0:u.id),S=ni(l,{activatorEvent:d,active:u,activeNodeRect:h,containerNodeRect:f,draggingNodeRect:p.rect,over:g,overlayNodeRect:p.rect,scrollableAncestors:y,scrollableAncestorRects:_,transform:x,windowRect:R}),C=Yt(h),N=ws({config:i,draggableNodes:m,droppableContainers:v,measuringConfiguration:b}),L=C?p.setRef:void 0;return window.React.createElement(hs,null,window.React.createElement(us,{animation:N},u&&w?window.React.createElement(vs,{key:w,id:u.id,ref:L,as:a,activatorEvent:d,adjustScale:e,className:o,transition:s,rect:C,style:{zIndex:c,...r},transform:S},n):null))});function $t(t,e,n){const i=t.slice();return i.splice(n<0?i.length+n:n,0,i.splice(e,1)[0]),i}function _s(t,e){return t.reduce((n,i,r)=>{const s=e.get(i);return s&&(n[r]=s),n},Array(t.length))}function pt(t){return t!==null&&t>=0}function Ss(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Rs(t){return typeof t=="boolean"?{draggable:t,droppable:t}:t}const oi=t=>{let{rects:e,activeIndex:n,overIndex:i,index:r}=t;const s=$t(e,i,n),l=e[r],a=s[r];return!a||!l?null:{x:a.left-l.left,y:a.top-l.top,scaleX:a.width/l.width,scaleY:a.height/l.height}},wt={scaleX:1,scaleY:1},xs=t=>{var e;let{activeIndex:n,activeNodeRect:i,index:r,rects:s,overIndex:l}=t;const a=(e=s[n])!=null?e:i;if(!a)return null;if(r===n){const c=s[l];return c?{x:0,y:n<l?c.top+c.height-(a.top+a.height):c.top-a.top,...wt}:null}const o=zs(s,r,n);return r>n&&r<=l?{x:0,y:-a.height-o,...wt}:r<n&&r>=l?{x:0,y:a.height+o,...wt}:{x:0,y:0,...wt}};function zs(t,e,n){const i=t[e],r=t[e-1],s=t[e+1];return i?n<e?r?i.top-(r.top+r.height):s?s.top-(i.top+i.height):0:s?s.top-(i.top+i.height):r?i.top-(r.top+r.height):0:0}const ai="Sortable",li=window.React.createContext({activeIndex:-1,containerId:ai,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:oi,disabled:{draggable:!1,droppable:!1}});function Ds(t){let{children:e,id:n,items:i,strategy:r=oi,disabled:s=!1}=t;const{active:l,dragOverlay:a,droppableRects:o,over:c,measureDroppableContainers:d}=ri(),u=$e(ai,n),h=a.rect!==null,f=window.React.useMemo(()=>i.map(x=>typeof x=="object"&&"id"in x?x.id:x),[i]),m=l!=null,v=l?f.indexOf(l.id):-1,p=c?f.indexOf(c.id):-1,g=window.React.useRef(f),b=!Ss(f,g.current),y=p!==-1&&v===-1||b,_=Rs(s);ae(()=>{b&&m&&d(f)},[b,f,m,d]),window.React.useEffect(()=>{g.current=f},[f]);const R=window.React.useMemo(()=>({activeIndex:v,containerId:u,disabled:_,disableTransforms:y,items:f,overIndex:p,useDragOverlay:h,sortedRects:_s(f,o),strategy:r}),[v,u,_.draggable,_.droppable,y,f,p,o,h,r]);return window.React.createElement(li.Provider,{value:R},e)}const Is=t=>{let{id:e,items:n,activeIndex:i,overIndex:r}=t;return $t(n,i,r).indexOf(e)},Es=t=>{let{containerId:e,isSorting:n,wasDragging:i,index:r,items:s,newIndex:l,previousItems:a,previousContainerId:o,transition:c}=t;return!c||!i||a!==s&&r===l?!1:n?!0:l!==r&&e===o},Cs={duration:200,easing:"ease"},ci="transform",Os=pe.Transition.toString({property:ci,duration:0,easing:"linear"}),Ns={roleDescription:"sortable"};function Ms(t){let{disabled:e,index:n,node:i,rect:r}=t;const[s,l]=window.React.useState(null),a=window.React.useRef(n);return ae(()=>{if(!e&&n!==a.current&&i.current){const o=r.current;if(o){const c=Ne(i.current,{ignoreTransform:!0}),d={x:o.left-c.left,y:o.top-c.top,scaleX:o.width/c.width,scaleY:o.height/c.height};(d.x||d.y)&&l(d)}}n!==a.current&&(a.current=n)},[e,n,i,r]),window.React.useEffect(()=>{s&&l(null)},[s]),s}function Vs(t){let{animateLayoutChanges:e=Es,attributes:n,disabled:i,data:r,getNewIndex:s=Is,id:l,strategy:a,resizeObserverConfig:o,transition:c=Cs}=t;const{items:d,containerId:u,activeIndex:h,disabled:f,disableTransforms:m,sortedRects:v,overIndex:p,useDragOverlay:g,strategy:b}=window.React.useContext(li),y=As(i,f),_=d.indexOf(l),R=window.React.useMemo(()=>({sortable:{containerId:u,index:_,items:d},...r}),[u,r,_,d]),x=window.React.useMemo(()=>d.slice(d.indexOf(l)),[d,l]),{rect:w,node:S,isOver:C,setNodeRef:N}=cs({id:l,data:R,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:x,...o}}),{active:L,activatorEvent:O,activeNodeRect:I,attributes:P,setNodeRef:A,listeners:T,isDragging:M,over:B,setActivatorNodeRef:U,transform:ce}=os({id:l,data:R,attributes:{...Ns,...n},disabled:y.draggable}),j=Hi(N,A),Y=!!L,F=Y&&!m&&pt(h)&&pt(p),G=!g&&M,ue=G&&F?ce:null,ge=F?ue??(a??b)({rects:v,activeNodeRect:I,activeIndex:h,overIndex:p,index:_}):null,E=pt(h)&&pt(p)?s({id:l,items:d,activeIndex:h,overIndex:p}):_,D=L==null?void 0:L.id,z=window.React.useRef({activeId:D,items:d,newIndex:E,containerId:u}),k=d!==z.current.items,de=e({active:L,containerId:u,isDragging:M,isSorting:Y,id:l,index:_,items:d,newIndex:z.current.newIndex,previousItems:z.current.items,previousContainerId:z.current.containerId,transition:c,wasDragging:z.current.activeId!=null}),Me=Ms({disabled:!de,index:_,node:S,rect:w});return window.React.useEffect(()=>{Y&&z.current.newIndex!==E&&(z.current.newIndex=E),u!==z.current.containerId&&(z.current.containerId=u),d!==z.current.items&&(z.current.items=d)},[Y,E,u,d]),window.React.useEffect(()=>{if(D===z.current.activeId)return;if(D!=null&&z.current.activeId==null){z.current.activeId=D;return}const Ve=setTimeout(()=>{z.current.activeId=D},50);return()=>clearTimeout(Ve)},[D]),{active:L,activeIndex:h,attributes:P,data:R,rect:w,index:_,newIndex:E,items:d,isOver:C,isSorting:Y,isDragging:M,listeners:T,node:S,overIndex:p,over:B,setNodeRef:j,setActivatorNodeRef:U,setDroppableNodeRef:N,setDraggableNodeRef:A,transform:Me??ge,transition:me()};function me(){if(Me||k&&z.current.newIndex===_)return Os;if(!(G&&!lt(O)||!c)&&(Y||de))return pe.Transition.toString({...c,property:ci})}}function As(t,e){var n,i;return typeof t=="boolean"?{draggable:t,droppable:!1}:{draggable:(n=t==null?void 0:t.draggable)!=null?n:e.draggable,droppable:(i=t==null?void 0:t.droppable)!=null?i:e.droppable}}function gt(t){if(!t)return!1;const e=t.data.current;return!!(e&&"sortable"in e&&typeof e.sortable=="object"&&"containerId"in e.sortable&&"items"in e.sortable&&"index"in e.sortable)}const Ls=[V.Down,V.Right,V.Up,V.Left],Ts=(t,e)=>{let{context:{active:n,collisionRect:i,droppableRects:r,droppableContainers:s,over:l,scrollableAncestors:a}}=e;if(Ls.includes(t.code)){if(t.preventDefault(),!n||!i)return;const o=[];s.getEnabled().forEach(u=>{if(!u||u!=null&&u.disabled)return;const h=r.get(u.id);if(h)switch(t.code){case V.Down:i.top<h.top&&o.push(u);break;case V.Up:i.top>h.top&&o.push(u);break;case V.Left:i.left>h.left&&o.push(u);break;case V.Right:i.left<h.left&&o.push(u);break}});const c=cr({collisionRect:i,droppableRects:r,droppableContainers:o});let d=Nn(c,"id");if(d===(l==null?void 0:l.id)&&c.length>1&&(d=c[1].id),d!=null){const u=s.get(n.id),h=s.get(d),f=h?r.get(h.id):null,m=h==null?void 0:h.node.current;if(m&&f&&u&&h){const p=dt(m).some((x,w)=>a[w]!==x),g=ui(u,h),b=Ps(u,h),y=p||!g?{x:0,y:0}:{x:b?i.width-f.width:0,y:b?i.height-f.height:0},_={x:f.left,y:f.top};return y.x&&y.y?_:Ke(_,y)}}}};function ui(t,e){return!gt(t)||!gt(e)?!1:t.data.current.sortable.containerId===e.data.current.sortable.containerId}function Ps(t,e){return!gt(t)||!gt(e)||!ui(t,e)?!1:t.data.current.sortable.index<e.data.current.sortable.index}function ks(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Kt={exports:{}};/*!
11
+ Copyright (c) 2018 Jed Watson.
12
+ Licensed under the MIT License (MIT), see
13
+ http://jedwatson.github.io/classnames
14
+ */var di;function Bs(){return di||(di=1,(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var s="",l=0;l<arguments.length;l++){var a=arguments[l];a&&(s=r(s,i(a)))}return s}function i(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var l="";for(var a in s)e.call(s,a)&&s[a]&&(l=r(l,a));return l}function r(s,l){return l?s?s+" "+l:s+l:s}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(Kt)),Kt.exports}var Fs=Bs();const hi=ks(Fs);function js({id:t,item:e,renderItem:n,disabled:i,itemWrapperClassName:r,activeId:s}){const{attributes:l,listeners:a,setNodeRef:o,setActivatorNodeRef:c,transform:d,transition:u,isDragging:h,over:f}=Vs({id:t,disabled:i}),m={transform:pe.Transform.toString(d),transition:u,opacity:h?.5:1,zIndex:h?1:0},v=(f==null?void 0:f.id)===t&&s!==t,p={ref:c,...a,...l};return React.createElement("div",{ref:o,style:m,className:hi(r),"data-sortable-wrapper":"true"},n(e,{dragHandleProps:p,isDragging:h,isDragOver:v}))}function Ys({item:t,renderItem:e,itemWrapperClassName:n}){const i={};return React.createElement("div",{className:hi(n,"bg-white"),style:{boxShadow:"0 4px 12px rgba(0,0,0,0.15)",transform:"scale(1.02)",cursor:"grabbing"}},e(t,{dragHandleProps:i,isDragging:!0,isDragOver:!1}))}function $s(t){const{items:e,onChange:n,getId:i,renderItem:r,validateReorder:s,renderError:l,disabled:a=!1,className:o,itemWrapperClassName:c}=t,[d,u]=window.wp.element.useState(null),[h,f]=window.wp.element.useState(null),m=window.wp.element.useMemo(()=>e.map(i),[e,i]),v=sr(In(kt,{activationConstraint:{distance:5}}),In(Tt,{coordinateGetter:Ts})),p=_=>{u(_.active.id),f(null)},g=_=>{const{active:R,over:x}=_;if(u(null),!x||R.id===x.id)return;const w=m.indexOf(R.id),S=m.indexOf(x.id);if(w===-1||S===-1)return;const C=$t(e,w,S);if(s){const N=s(C);if(N){f(N);return}}f(null),n(C)},b=()=>{u(null)},y=d!==null?e.find(_=>i(_)===d):null;return React.createElement("div",{className:o},h&&l?l(h):null,React.createElement(is,{sensors:v,collisionDetection:lr,onDragStart:p,onDragEnd:g,onDragCancel:b},React.createElement(Ds,{items:m,strategy:xs},React.createElement("div",{className:"flex flex-col gap-2"},e.map(_=>{const R=i(_);return React.createElement(js,{key:R,id:R,item:_,renderItem:r,disabled:a,itemWrapperClassName:c,activeId:d})}))),React.createElement(ys,null,y?React.createElement(Ys,{item:y,renderItem:r,itemWrapperClassName:c}):null)))}xe.Allotment=Ki,xe.SortableList=$s,Object.defineProperty(xe,Symbol.toStringTag,{value:"Module"})}));
6
15
  //# sourceMappingURL=libraries.umd.cjs.map