@blockbite/libraries 0.11.6 → 0.12.0

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