resizable-panes-js
Advanced tools
Comparing version 6.0.25 to 6.0.26
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=function(){return i=Object.assign||function(i){for(var e,n=1,t=arguments.length;n<t;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r]);return i},i.apply(this,arguments)};function e(i,e,n){if(n||2===arguments.length)for(var t,r=0,o=e.length;r<o;r++)!t&&r in e||(t||(t=Array.prototype.slice.call(e,0,r)),t[r]=e[r]);return i.concat(t||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var n=-1,t=0,r=1,o=1,a=2,u="ratio",s="setSize",c="visibility",f="size",l="defaultMinSize",v="defaultMaxSize",d="resize",z="onNormalSize",S="mouseup",h="mousemove",p="mousedown",m="touchmove",x="touchend",g="touchstart",y=function(i,e,n,t){if(i<e)throw new Error("Size(".concat(i,") can not be smaller than minSize(").concat(e,") for pane id ").concat(t));if(i>n)throw new Error("Size(".concat(i,") can not be greatter than maxSize(").concat(n,") for pane id ").concat(t))},b=function(e,n){var t=ni(i({},e)),r=n.onMinSize,o=void 0===r?J:r,a=n.onMaxSize,u=void 0===a?J:a,s=n.onNormalSize,c=void 0===s?J:s,f=n.resizerClass,l=n.activeResizerClass,v=n.resizerSize,d=n.detectionRadius;return i({onMinSize:o,onMaxSize:u,onNormalSize:c,resizerSize:v,resizerClass:f,detectionRadius:d,activeResizerClass:l,minSize:0,maxSize:1/0},t)},M=function(i,e){var n=i.minSize,t=i.maxSize,r=i.minSize;return e>=n&&e<=t?r=e:e>t&&(r=t),i.size=r,r},w=function(i,e,n){var t=i.axisSize+(n===o?e:-e),r=M(i,t);return Math.abs(r-t)},E=function(i,e,n){void 0===n&&(n=!1),i&&(i.visibility=e,e?(i.maxSize=i.defaultMaxSize,i.minSize=i.defaultMinSize,function(i,e){i.isHandle&&(i.size=e?0:i.resizerSize)}(i,n)):(i.maxSize=0,i.minSize=0),i.api&&i.api.destroy&&i.api.destroy(e))},R=function(i){i.oldVisibleSize=i.size,i.oldVisibility=i.visibility},C=function(i){i.initialSetSize=i.size},V=function(i){i.size=i.initialSetSize},O=function(i){i.sizeRatio=i.size,i.minSizeRatio=i.defaultMinSize,i.maxSizeRatio=i.defaultMaxSize},k=function(i){i.size=i.defaultSize,I(i),E(i,i.defaultVisibility)},I=function(i){i.minSize=i.defaultMinSize,i.maxSize=i.defaultMaxSize},L=function(i){return i.maxSize=i.defaultMaxSize,i.maxSize},T=function(i){return i.minSize=i.defaultMinSize,i.minSize},j=function(i){return i.maxSize=i.size,i.size},A=function(i){return i.minSize=i.size,i.size},P=function(i){return i.size-i.defaultMinSize},D=function(i){return i.defaultMaxSize-i.size},H=function(i){i.size=i.minSize},N=function(i){i.size=i.maxSize},U=function(i){i.axisSize=i.size},X=function(i){i.api.setSize(F(i))},Y=function(i){if(i.visibility&&!i.isHandle){var e,n=i.size,t=i.id;e=n===i.defaultMaxSize?"onMaxSize":n===i.defaultMinSize?"onMinSize":z,i.sizeState!==e&&(i.props[e](t,n),i.sizeState=e)}},_=function(e){var n,t=$(e,"id",f,"defaultSize",l,c,"storedSize");return i(i({},t),((n={})[v]=e[v].toString(),n))},F=function(i){return i.visibility?i.size:0},B=function(i){return i.visibility?i.sizeRatio:0},K=function(i,e){i.size=e,i.storedSize=e},q=function(i,e,n,t,r,o,a){K(i,e),i.defaultSize=r,i.minSize=n,i.maxSize=t,i.defaultMinSize=n,i.defaultMaxSize=t,i.storedSize=o,i.visibility=a},J=function(i){return i},W=function(i,e){return i.find((function(i){return i.id===e}))},G=function(i){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var t={};return i.forEach((function(i){var n=function(e){return e===f?F(i):i[e]},r=i.id;1===e.length?t[r]=n(e[0]):t[r]=e.reduce((function(i,e){return i[e]=n(e),i}),{})})),t},Q=function(i,e,n){return void 0===n&&(n="id"),i.findIndex((function(i){return i[n]===e}))},Z=function(i,e,n){return Math.round(function(i,e,n){return Number((i*(n/e)).toFixed(0))}(i,e,n))},$=function(i){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var t={};return e.forEach((function(e){t[e]=i[e]})),t},ii=function(i){return i===r},ei=function(i){return"".concat("resizer","-").concat(i)},ni=function(i){return Object.keys(i).forEach((function(e){void 0===i[e]&&delete i[e]})),i},ti=function(i){return e([],i,!0).reverse()},ri=function(i){return e([],i,!0).sort((function(i,e){return i>e?-1:e>i?1:0}))},oi=function(i,e,n,t){var r;this.sizeState=z,this.storedSize=0,this.axisSize=0,this.oldVisibleSize=0,this.oldVisibility=!0,this.props=b(i,e);var o=this.props,a=o.id,s=o.minSize,c=o.size,f=o.maxSize,l=o.resizerSize,v=o.detectionRadius,d=e.visibility,S=e.vertical,h=e.minMaxUnit,p=e.unit;this.minMaxUnit=null!=h?h:p,p!==u&&y(c,s,f,a);var m=null===(r=d[a])||void 0===r||r;this.defaultVisibility=m;var x=n.getStoredPane(a);if(x){var g=x.size,M=x.defaultMaxSize,w=x.defaultMinSize,E=x.defaultSize,R=x.visibility,C=x.storedSize;q(this,g,w,M,E,C,R)}else q(this,c,s,f,c,c,m);this.id=a,this.vertical=S,O(this),this.isHandle=t,t&&(this.id=ei(a),this.resizerSize=l,this.detectionRadius=v)},ai=function(){function i(){this.isSetRatioMode=!1,this.newVisibilityModel=!1,this.isViewSizeChanged=!1}return i.prototype.register=function(i){Object.assign(this,i)},i}(),ui=function(i){i.forEach(X)},si=function(i){return i.filter((function(i){return i.visibility}))};function ci(i,e,n,t){void 0===n&&(n=0),void 0===t&&(t=i.length-1);for(var r=0,o=n;o<=t;o++)r+=e(i[o]);return r}var fi=function(i,e,n){return ci(i,j,e,n)},li=function(i,e,n){return ci(i,A,e,n)},vi=function(i,e,n){return ci(i,F,e,n)},di=function(i,e,n,t){for(var r=i.items,o=i.index,a=si(r),u=0;u<a.length;u++)u<=o?e(a[u],t):n(a[u],t)},zi=function(i,e,n){var t=i.size+(n===o?e:-e);K(i,t)},Si=function(i,e,n){for(var t,r=0,o=i.length;e>1;)i[t=r%o].visibility&&(zi(i[t],1,n),--e),++r;for(;;){if(i[t=r%o].visibility)return void zi(i[t],e,n);++r}},hi=function(i,e){var n,t,r,u=e.items,s=e.direction,c=e.index,f=e.axisCoordinate,l=si(u),v=ti(l.slice(0,c+1)),d=l.slice(c+1);if(ii(s)?(n=f-i,r=d,t=v):(n=i-f,r=v,t=d),n<0);else if(0===n)return;var z=n;t.forEach((function(i){n=w(i,n,a)})),z-=n,r.forEach((function(i){z=w(i,z,o)}))},pi=function(i){var e=gi(i).containerSize,n=i.items,t=i.index,r=si(n),o=t+1,a=P(r[t]),u=D(r[o]);mi(r,a-u,t,o,0,e);var s=P(r[o]),c=D(r[t]);xi(r,c-s,t,o,0,e)},mi=function(i,e,n,t,r,o){var a,u=i.length-1,s=n,c=t,f=i[n],l=i[t],v=function(){r+=T(f)},d=function(){r+=L(l)};switch(!0){case n>0&&t<u:switch(!0){case e<0:v(),a=P(i[s=n-1])+e;break;case 0===e:v(),d(),c=t+1,a=P(i[s=n-1])-D(i[c]);break;case e>0:d(),a=e-D(i[c=t+1])}break;case 0===n&&t<u:switch(!0){case e<0:return v(),r+=fi(i,t+1,u),void(l.maxSize=o-r);case 0===e:return v(),d(),void fi(i,t+1,u);case e>0:d(),a=e-D(i[c=t+1])}break;case n>0&&t===u:switch(!0){case e<0:v(),a=P(i[s=n-1])+e;break;case 0===e:return v(),d(),void li(i,0,n-1);case e>0:return d(),r+=li(i,0,n-1),void(f.minSize=o-r)}break;case 0===n&&t===u:switch(!0){case e<0:return v(),void(l.maxSize=o-r);case 0===e:return v(),void d();case e>0:return d(),void(f.minSize=o-r)}}mi(i,a,s,c,r,o)},xi=function(i,e,n,t,r,o){var a,u=i.length-1,s=n,c=t,f=i[n],l=i[t],v=function(){r+=L(f)},d=function(){r+=T(l)};switch(!0){case n>0&&t<u:switch(!0){case e<0:v(),a=D(i[s=n-1])+e;break;case 0===e:v(),d(),c=t+1,a=D(i[s=n-1])-P(i[c]);break;case e>0:d(),a=e-P(i[c=t+1])}break;case 0===n&&t<u:switch(!0){case e<0:return v(),r+=li(i,t+1,u),void(l.minSize=o-r);case 0===e:return v(),d(),void li(i,t+1,u);case e>0:d(),a=e-P(i[c=t+1])}break;case n>0&&t===u:switch(!0){case e<0:v(),a=D(i[s=n-1])+e;break;case 0===e:return v(),d(),void fi(i,0,n-1);case e>0:return d(),r+=fi(i,0,n-1),void(f.maxSize=o-r)}break;case 0===n&&t===u:switch(!0){case e<0:return v(),void(l.minSize=o-r);case 0===e:return d(),void v();case e>0:return d(),void(f.maxSize=o-r)}}xi(i,a,s,c,r,o)},gi=function(i){var e=i.getContainerRect,n=i.vertical,t=i.resizersList,r=e(),o=r.top,a=r.height,u=r.left,s=r.width,c=n?u:o,f=Math.round(n?s:a);return{containerSize:f,maxTopAxis:c,maxPaneSize:f-vi(t)}},yi=function(i,e){void 0===e&&(e=!1);var n=i.panesList,t=i.items,r=gi(i).maxPaneSize,s=function(i){return ci(i,B)}(n);if(!(s<0)){n.forEach((function(i){!function(i){i.size=i.sizeRatio,i.defaultMinSize=i.minSizeRatio,i.defaultMaxSize=i.maxSizeRatio}(i),function(i,e,n,t){var r,o,a=i.props,s=a.minSize,c=a.size,f=a.maxSize,l=t?[i.minSizeRatio,i.size,i.maxSizeRatio]:[s,c,f],v=l[0],d=l[2],z=Z(e,n,l[1]);i.minMaxUnit!==u?(r=i.defaultMinSize,o=i.defaultMaxSize):(r=Z(e,n,v),o=Z(e,n,d)),t||(i.minMaxUnit!==u?y(z,r,o,i.id):y(c,s,f,i.id)),q(i,z,r,o,z,z,i.visibility)}(i,r,s,e)}));var c=vi(n),f=r-c,l=f<0?a:o;Si(n,Math.abs(f),l),ui(t)}},bi=function(i){var e=i.items;return gi(i).containerSize-vi(e)},Mi=function(i,e){var n=i.panesList;e!==u&&n.forEach(O),e!==c&&(i.newVisibilityModel=!1),e!==s&&(i.setSizeKey=null)},wi=function(i){return"".concat(i,"px")},Ei=function(i){return i?"width":"height"},Ri=function(i,e,n){var t;return function(i){return Object.keys(i).map((function(e){return i[e]?e:""})).join(" ")}(((t={flex:!0,"f-row w-fit-content h-100p":i,"f-column":!i,"w-100p h-100p":n===u})[e]=e,t))},Ci=function(i,e,n){return i.preventDefault(),function(i){return i.type.startsWith("touch")}(i)?function(i,e,n){var t,r=i.targetTouches[0],o=null!==(t=n.current)&&void 0!==t?t:{},a=o.pageX,u=void 0===a?0:a,s=o.pageY,c=void 0===s?0:s;return n.current=r,e?[r.clientX,r.pageX-u]:[r.clientY,r.pageY-c]}(i,e,n):function(i,e){var n=i.clientX,t=i.clientY,r=i.movementX,o=i.movementY;return e?[n,r]:[t,o]}(i,e)},Vi=function(i){return i<0?r:n},Oi=function(i,e){return function(n){i.style[Ei(e)]=wi(n)}},ki=function(i,e){for(var n=[],t=2;t<arguments.length;t++)n[t-2]=arguments[t];n.forEach((function(n){return i.addEventListener(n,e)}))},Ii=function(i,e,n){i.addEventListener(n,e,{passive:!1})},Li=function(i,e){for(var n=[],t=2;t<arguments.length;t++)n[t-2]=arguments[t];n.forEach((function(n){return i.removeEventListener(n,e)}))},Ti=function(i,e,n){var t={panes:n.panesList.map(_)};e&&e.setItem(i,JSON.stringify(t))},ji=function(){function i(i,e,n){this.store=null,this.empty=!1,this.panesComponents=n,this.getStorage(i,e)}return i.prototype.getStorage=function(i,e){var n,t=this,r=this.store;if(r)return r;if(e){n=e.getItem(i);var o=JSON.parse(n,(function(i,e){return"defaultMaxSize"===i?Number(e):e}));if("[object Object]"===toString.call(o)){var a=o.panes;if(a){if(a.every((function(i,e){var n;return(null===(n=t.panesComponents[e])||void 0===n?void 0:n.props.id)===i.id}))&&a.length===this.panesComponents.length)return this.store=o,o;e.removeItem(i)}else e.removeItem(i)}}this.empty=!0,this.store={panes:[]}},i.prototype.getStoredPane=function(i){var e,n=this.store.panes;return null!==(e=W(n,i))&&void 0!==e?e:null},i}(),Ai=function(i,e,n){var t=e-vi(i);if(0!==t&&0!==n.length){var r=t>0?o:a,u=Math.abs(t);if(u<=n.length)Si(n,u,r);else{var s=vi(n),c=[];n.forEach((function(i){var e=F(i),n=function(i,e,n){var t=i.size+(n===o?e:-e);return I(i),M(i,t)===t}(i,Math.round(u*(e/s)),r);n&&c.push(i)})),Ai(i,e,c)}}},Pi=function(i,n,t,r){var u,s,c=function(){var n,t=e(e([],u,!0),s,!0),r=a;i<0&&(i=Math.abs(i),r=o),t.forEach((n=r,function(e){U(e),I(e),i=w(e,i,n)}))};"1"===n?(u=t.slice(r+2),s=t.slice(0,r-1).reverse(),c()):"2"===n&&(u=t.slice(0,r-1).reverse(),s=t.slice(r+2),c())},Di=function(i,n,t,r,o){void 0===r&&(r=u),void 0===o&&(o=!1);var a=i.panesList,s=i.items,c=si(a),f=si(s),l=Q(c,n);if(!(-1===l||t<0)){var v="".concat(n,"-").concat(r);i.setSizeKey===v?a.forEach(V):(a.forEach(C),i.setSizeKey=v);var d=vi(c),z=c[l];I(z);var S=z.size,h=M(z,t),p=h-S;if(p){var m=Q(f,n);if(r===u){var x=e([],c,!0);x.splice(l,1);var g=d-z.size;Ai(x,g,x)}if(Pi(p,r,f,m),!o){var y=bi(i);Di(i,n,h+y,r,!0)}}}};var Hi=function(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}((function(i,e){let n,t=0;return function(...r){clearTimeout(n);const o=Date.now(),a=e-(o-t);a<=0?(t=o,i.apply(this,r)):n=setTimeout((()=>{t=Date.now(),i.apply(this,r)}),a)}})),Ni=function(i){for(var e=i.vertical,n=i.items,t=(0,i.getContainerRect)(),r=t.left,o=t.top,a=e?r:o,u=si(n),s=[],c=0;c<u.length-1;c+=2){var f=u[c];if(!f.isHandle){var l=u[c+1],v=l.defaultSize,d=l.id,z=l.detectionRadius,S=F(f),h=a+S-z,p=a+S+v+z;a+=S+v,s.push([h,p,d])}}i.detectionDetails=s},Ui=function(e){var o=e.vertical,a=e.children,d=e.unit,z=e.uniqueId,S=e.storageApi,h=e.onResizeStop,p=e.onChangeVisibility,m=e.onResize,x=function(i){return Array.isArray(i)?i:[i]}(a),g=new ji(z,S,x),y=function(i,e,n){var t=[];return i.forEach((function(i){return t.push(new oi(i.props,e,n,!1),new oi(i.props,e,n,!0))})),t.pop(),t}(x,e,g),b=function(i){return[i.filter((function(i){return!i.isHandle})),i.filter((function(i){return i.isHandle}))]}(y),M=b[0],w=b[1],C=new ai;C.register({vertical:o,items:y,panesList:M,resizersList:w});var V=function(){return function(i){return i.forEach(U)}(y)},O=function(){var i=L();h(i),Ti(z,S,C),Ni(C)},I=function(){var i=T();p(i)},L=function(){return G(M,f)},T=function(){return G(M,c)},j=function(i){w.forEach((function(e){e.api.setMouseDownFlag(C.handleId,i)}))};C.onMouseDown=function(i,e){var n=i[0],r=function(i,e){var n=si(i);return Q(n,e)}(y,e);C.register({index:r,handleId:e,direction:t,axisCoordinate:n}),j(!0),V()};var A=function(i){void 0===i&&(i=""),Mi(C,i),function(i){i.forEach(Y)}(M)};C.onMoveResize=function(i){var e,n=i[0],t=i[1];!C.isViewSizeChanged&&t&&(P(n,t),X(n)&&hi(n,C),ui(y),A(),e=L(),m(e))};var P=function(i,e){var n=C.direction,t=Vi(e);t!==n&&(C.direction=t,D(i))},D=function(i){C.axisCoordinate=i,V(),pi(C),function(i){var e=i.items,n=i.index,t=gi(i).maxTopAxis,r=si(e);i.bottomAxis=t+ci(r,(function(i){return i.maxSize}),0,n-1),i.topAxis=t+function(i,e,n){return ci(i,(function(i){return i.minSize}),0,n)}(r,0,n-1)}(C)},X=function(i){var e=C.topAxis,t=C.bottomAxis;return i<=e?(di(C,H,N,r),V(),C.axisCoordinate=e,!1):!(i>=t&&(di(C,N,H,n),V(),C.axisCoordinate=t,1))},_=function(e){var n=C.newVisibilityModel,t=G(M,c),r=i(i({},t),e);n||(C.newVisibilityModel=!0,M.forEach(R)),function(i,e){for(var n,t=i.panesList,r=i.items,o=-1,a=0;a<r.length;a+=2){var u=r[a];(n=u).size=n.oldVisibleSize,n.visibility=n.oldVisibility;var s=u.id;E(u,e[s]),E(r[a+1],!1),u.visibility&&(-1!==o&&E(r[a-1],!0),o=a)}var c=si(t);0===vi(c)&&c.forEach((function(i){i.size=1}));var f=gi(i).maxPaneSize;Ai(c,f,c)}(C,r);var o=bi(C);C.isViewSizeChanged=!!o,ui(y),O(),I(),A(c)};C.onMouseUp=function(){O(),j(!1)};var B=function(){ui(y),O(),A(s)},K={restore:function(){!function(i){i.forEach(k),ui(i)}(C.items),A(),O(),I(),C.isViewSizeChanged=!1},setVisibilities:_,getSizes:L,getVisibilities:function(){return T()},getState:function(){return G(M,f,c,l,v)},setSize:function(i,e,n){Di(C,i,e,n),B()},setSizeRatio:function(i,e,n){var t=gi(C).containerSize;Di(C,i,t*e,n),B()}};return C.register({api:K,registerItem:function(i,e){!function(i,e){if(i.api=e,i.isHandle){var n=i.resizerSize;e.setSize(n),q(i,n,n,n,n,n,i.visibility)}}(W(y,e),i)},registerContainer:function(i){C.getContainerRect=function(){return i.getBoundingClientRect()};var n=e.visibility;if(g.empty&&d===u&&!C.isSetRatioMode)yi(C),C.isSetRatioMode=!0;else{var t=g.getStorage(z,S).panes;n=G(t,c)}_(n)},vertical:o,props:e,getPaneSizeStyle:function(i){var e=F(W(M,i));return function(i,e){var n;return(n={})[Ei(i)]=wi(e),n}(o,e)}}),C},Xi=function(){return Xi=Object.assign||function(i){for(var e,n=1,t=arguments.length;n<t;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r]);return i},Xi.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var Yi=function(i,e){e.split(" ").forEach((function(e){return e&&i.classList.add(e)}))},_i=function(i,e){e.split(" ").forEach((function(e){return e&&i.classList.remove(e)}))},Fi=function(i){return document.getElementById(i)},Bi=function(i,e,n){var t=n.panesList,r=n.vertical,o=t[Q(t,i)].props,a=o.resizerClass,u=o.activeResizerClass,s=ei(i),c=Fi(s),f=function(i,e){return function(n){i.style[function(i){return i?"minWidth":"minHeight"}(e)]=wi(n)}}(c,r);Yi(c,"overflow-hidden");var l=function(i,e,n,t){return void 0===n&&(n=""),void 0===t&&(t=""),function(r,o){r===e&&(o?(Yi(i,n),_i(i,t)):(Yi(i,t),_i(i,n)))}}(c,s,u,a);l(s,!1),e({setSize:f,setMouseDownFlag:l},s)};exports.BUTTOM_FIRST="1",exports.RATIO=u,exports.TOP_FIRST="2",exports.default=function(i){var e=function(i){var e=i.panes.map((function(i){return{props:i}}));return Xi({onResize:J,onResizeStop:J,onReady:J,onChangeVisibility:J,vertical:!1,unit:u,resizerSize:2,detectionRadius:6,visibility:{},children:e},i)}(i),n=e.panes,t=e.uniqueId,r=e.unit,o=Ui(e),a=o.registerItem,s=o.registerContainer,c=o.api;n.forEach((function(i,t){var r=i.id;!function(i,e,n){var t=n.vertical,r=Fi(i);Yi(r,"overflow-hidden flex-shrink-0"),e({setSize:Oi(r,t)},i)}(r,a,e),t!==n.length-1&&Bi(r,a,o)}));var f=function(){r===u&&(yi(o,!0),Ni(o),Mi(o))};ki(window,f,d);var l=function(i,e,n){var t=n.vertical,r=n.unit,o=Fi(i),a=Ri(t,"",r);return Yi(o,a),e(o),o}(t,s,e),v=function(i){var e=i.vertical,n=e?"col-resize":"row-resize",t=function(i,e){return function(n){var t=Ci(n,e,i.previousTouchEvent);i.onMoveResize(t)}}(i,e),r=function(){i.onMouseUp(),Li(document,t,h,m)},o=function(i,e,n){return function(t){var r=i.detectionDetails,o=Ci(t,e,{})[0],a=r.map((function(i){var e=i[0],n=i[1];return Math.abs((e+n)/2-o)})),u=ri(a).pop(),s=r[a.indexOf(u)],c=s[0],f=s[1],l=s[2];if(u<=(f-c)/2){i.previousTouchEvent=t;var v=Ci(t,e,{});i.onMouseDown(v,l),n()}}}(i,e,(function(){ki(document,t,h),Ii(document,t,m)}));return[function(t){var a=Hi(function(i,e,n,t){return function(r){var o=e.detectionDetails,a=n?r.clientX:r.clientY;i.style.cursor="auto",o.forEach((function(e){var n=e[0],r=e[1];a>=n&&a<=r&&(i.style.cursor=t)}))}}(t,i,e,n),100);Ii(t,a,h),Ii(t,a,m),ki(t,o,p),Ii(t,o,g),ki(document,r,S,x)},function(){Li(document,r,S,x)}]}(o),z=v[0],y=v[1],b=function(){y(l),z(l)};return b(),console.log("Vimal"),setTimeout((function(){return c.setVisibilities({P1:!0})}),2e3),[c,b,function(){y(l),Li(window,f,d)}]}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=function(){return i=Object.assign||function(i){for(var e,n=1,t=arguments.length;n<t;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r]);return i},i.apply(this,arguments)};function e(i,e,n){if(n||2===arguments.length)for(var t,r=0,o=e.length;r<o;r++)!t&&r in e||(t||(t=Array.prototype.slice.call(e,0,r)),t[r]=e[r]);return i.concat(t||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var n=-1,t=0,r=1,o=1,a=2,u="ratio",s="setSize",c="visibility",f="size",l="defaultMinSize",v="defaultMaxSize",d="resize",z="onNormalSize",S="mouseup",h="mousemove",p="mousedown",m="touchmove",x="touchend",g="touchstart",y=function(i,e,n,t){if(i<e)throw new Error("Size(".concat(i,") can not be smaller than minSize(").concat(e,") for pane id ").concat(t));if(i>n)throw new Error("Size(".concat(i,") can not be greatter than maxSize(").concat(n,") for pane id ").concat(t))},b=function(e,n){var t=ni(i({},e)),r=n.onMinSize,o=void 0===r?J:r,a=n.onMaxSize,u=void 0===a?J:a,s=n.onNormalSize,c=void 0===s?J:s,f=n.resizerClass,l=n.activeResizerClass,v=n.resizerSize,d=n.detectionRadius;return i({onMinSize:o,onMaxSize:u,onNormalSize:c,resizerSize:v,resizerClass:f,detectionRadius:d,activeResizerClass:l,minSize:0,maxSize:1/0},t)},M=function(i,e){var n=i.minSize,t=i.maxSize,r=i.minSize;return e>=n&&e<=t?r=e:e>t&&(r=t),i.size=r,r},w=function(i,e,n){var t=i.axisSize+(n===o?e:-e),r=M(i,t);return Math.abs(r-t)},E=function(i,e,n){void 0===n&&(n=!1),i&&(i.visibility=e,e?(i.maxSize=i.defaultMaxSize,i.minSize=i.defaultMinSize,function(i,e){i.isHandle&&(i.size=e?0:i.resizerSize)}(i,n)):(i.maxSize=0,i.minSize=0),i.api&&i.api.destroy&&i.api.destroy(e))},R=function(i){i.oldVisibleSize=i.size,i.oldVisibility=i.visibility},C=function(i){i.initialSetSize=i.size},V=function(i){i.size=i.initialSetSize},O=function(i){i.sizeRatio=i.size,i.minSizeRatio=i.defaultMinSize,i.maxSizeRatio=i.defaultMaxSize},k=function(i){i.size=i.defaultSize,I(i),E(i,i.defaultVisibility)},I=function(i){i.minSize=i.defaultMinSize,i.maxSize=i.defaultMaxSize},T=function(i){return i.maxSize=i.defaultMaxSize,i.maxSize},L=function(i){return i.minSize=i.defaultMinSize,i.minSize},j=function(i){return i.maxSize=i.size,i.size},A=function(i){return i.minSize=i.size,i.size},P=function(i){return i.size-i.defaultMinSize},D=function(i){return i.defaultMaxSize-i.size},H=function(i){i.size=i.minSize},N=function(i){i.size=i.maxSize},U=function(i){i.axisSize=i.size},X=function(i){i.api.setSize(F(i))},Y=function(i){if(i.visibility&&!i.isHandle){var e,n=i.size,t=i.id;e=n===i.defaultMaxSize?"onMaxSize":n===i.defaultMinSize?"onMinSize":z,i.sizeState!==e&&(i.props[e](t,n),i.sizeState=e)}},_=function(e){var n,t=Z(e,"id",f,"defaultSize",l,c,"storedSize");return i(i({},t),((n={})[v]=e[v].toString(),n))},F=function(i){return i.visibility?i.size:0},B=function(i){return i.visibility?i.sizeRatio:0},K=function(i,e){i.size=e,i.storedSize=e},q=function(i,e,n,t,r,o,a){K(i,e),i.defaultSize=r,i.minSize=n,i.maxSize=t,i.defaultMinSize=n,i.defaultMaxSize=t,i.storedSize=o,i.visibility=a},J=function(i){return i},W=function(i,e){return i.find((function(i){return i.id===e}))},$=function(i){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var t={};return i.forEach((function(i){var n=function(e){return e===f?F(i):i[e]},r=i.id;1===e.length?t[r]=n(e[0]):t[r]=e.reduce((function(i,e){return i[e]=n(e),i}),{})})),t},G=function(i,e,n){return void 0===n&&(n="id"),i.findIndex((function(i){return i[n]===e}))},Q=function(i,e,n){return Math.round(function(i,e,n){return Number((i*(n/e)).toFixed(0))}(i,e,n))},Z=function(i){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var t={};return e.forEach((function(e){t[e]=i[e]})),t},ii=function(i){return i===r},ei=function(i){return"".concat("resizer","-").concat(i)},ni=function(i){return Object.keys(i).forEach((function(e){void 0===i[e]&&delete i[e]})),i},ti=function(i){return e([],i,!0).reverse()},ri=function(i){return e([],i,!0).sort((function(i,e){return i>e?-1:e>i?1:0}))},oi=function(i,e,n,t){var r;this.sizeState=z,this.storedSize=0,this.axisSize=0,this.oldVisibleSize=0,this.oldVisibility=!0,this.props=b(i,e);var o=this.props,a=o.id,s=o.minSize,c=o.size,f=o.maxSize,l=o.resizerSize,v=o.detectionRadius,d=e.visibility,S=e.vertical,h=e.minMaxUnit,p=e.unit;this.minMaxUnit=null!=h?h:p,p!==u&&y(c,s,f,a);var m=null===(r=d[a])||void 0===r||r;this.defaultVisibility=m;var x=n.getStoredPane(a);if(x){var g=x.size,M=x.defaultMaxSize,w=x.defaultMinSize,E=x.defaultSize,R=x.visibility,C=x.storedSize;q(this,g,w,M,E,C,R)}else q(this,c,s,f,c,c,m);this.id=a,this.vertical=S,O(this),this.isHandle=t,t&&(this.id=ei(a),this.resizerSize=l,this.detectionRadius=v)},ai=function(){function i(){this.isSetRatioMode=!1,this.newVisibilityModel=!1,this.isViewSizeChanged=!1}return i.prototype.register=function(i){Object.assign(this,i)},i}(),ui=function(i){i.forEach(X)},si=function(i){return i.filter((function(i){return i.visibility}))};function ci(i,e,n,t){void 0===n&&(n=0),void 0===t&&(t=i.length-1);for(var r=0,o=n;o<=t;o++)r+=e(i[o]);return r}var fi=function(i,e,n){return ci(i,j,e,n)},li=function(i,e,n){return ci(i,A,e,n)},vi=function(i,e,n){return ci(i,F,e,n)},di=function(i,e,n,t){for(var r=i.items,o=i.index,a=si(r),u=0;u<a.length;u++)u<=o?e(a[u],t):n(a[u],t)},zi=function(i,e,n){var t=i.size+(n===o?e:-e);K(i,t)},Si=function(i,e,n){for(var t,r=0,o=i.length;e>1;)i[t=r%o].visibility&&(zi(i[t],1,n),--e),++r;for(;;){if(i[t=r%o].visibility)return void zi(i[t],e,n);++r}},hi=function(i,e){var n,t,r,u=e.items,s=e.direction,c=e.index,f=e.axisCoordinate,l=si(u),v=ti(l.slice(0,c+1)),d=l.slice(c+1);if(ii(s)?(n=f-i,r=d,t=v):(n=i-f,r=v,t=d),n<0);else if(0===n)return;var z=n;t.forEach((function(i){n=w(i,n,a)})),z-=n,r.forEach((function(i){z=w(i,z,o)}))},pi=function(i){var e=gi(i).containerSize,n=i.items,t=i.index,r=si(n),o=t+1,a=P(r[t]),u=D(r[o]);mi(r,a-u,t,o,0,e);var s=P(r[o]),c=D(r[t]);xi(r,c-s,t,o,0,e)},mi=function(i,e,n,t,r,o){var a,u=i.length-1,s=n,c=t,f=i[n],l=i[t],v=function(){r+=L(f)},d=function(){r+=T(l)};switch(!0){case n>0&&t<u:switch(!0){case e<0:v(),a=P(i[s=n-1])+e;break;case 0===e:v(),d(),c=t+1,a=P(i[s=n-1])-D(i[c]);break;case e>0:d(),a=e-D(i[c=t+1])}break;case 0===n&&t<u:switch(!0){case e<0:return v(),r+=fi(i,t+1,u),void(l.maxSize=o-r);case 0===e:return v(),d(),void fi(i,t+1,u);case e>0:d(),a=e-D(i[c=t+1])}break;case n>0&&t===u:switch(!0){case e<0:v(),a=P(i[s=n-1])+e;break;case 0===e:return v(),d(),void li(i,0,n-1);case e>0:return d(),r+=li(i,0,n-1),void(f.minSize=o-r)}break;case 0===n&&t===u:switch(!0){case e<0:return v(),void(l.maxSize=o-r);case 0===e:return v(),void d();case e>0:return d(),void(f.minSize=o-r)}}mi(i,a,s,c,r,o)},xi=function(i,e,n,t,r,o){var a,u=i.length-1,s=n,c=t,f=i[n],l=i[t],v=function(){r+=T(f)},d=function(){r+=L(l)};switch(!0){case n>0&&t<u:switch(!0){case e<0:v(),a=D(i[s=n-1])+e;break;case 0===e:v(),d(),c=t+1,a=D(i[s=n-1])-P(i[c]);break;case e>0:d(),a=e-P(i[c=t+1])}break;case 0===n&&t<u:switch(!0){case e<0:return v(),r+=li(i,t+1,u),void(l.minSize=o-r);case 0===e:return v(),d(),void li(i,t+1,u);case e>0:d(),a=e-P(i[c=t+1])}break;case n>0&&t===u:switch(!0){case e<0:v(),a=D(i[s=n-1])+e;break;case 0===e:return v(),d(),void fi(i,0,n-1);case e>0:return d(),r+=fi(i,0,n-1),void(f.maxSize=o-r)}break;case 0===n&&t===u:switch(!0){case e<0:return v(),void(l.minSize=o-r);case 0===e:return d(),void v();case e>0:return d(),void(f.maxSize=o-r)}}xi(i,a,s,c,r,o)},gi=function(i){var e=i.getContainerRect,n=i.vertical,t=i.resizersList,r=e(),o=r.top,a=r.height,u=r.left,s=r.width,c=n?u:o,f=Math.round(n?s:a);return{containerSize:f,maxTopAxis:c,maxPaneSize:f-vi(t)}},yi=function(i,e){void 0===e&&(e=!1);var n=i.panesList,t=i.items,r=gi(i).maxPaneSize,s=function(i){return ci(i,B)}(n);if(!(s<0)){n.forEach((function(i){!function(i){i.size=i.sizeRatio,i.defaultMinSize=i.minSizeRatio,i.defaultMaxSize=i.maxSizeRatio}(i),function(i,e,n,t){var r,o,a=i.props,s=a.minSize,c=a.size,f=a.maxSize,l=t?[i.minSizeRatio,i.size,i.maxSizeRatio]:[s,c,f],v=l[0],d=l[2],z=Q(e,n,l[1]);i.minMaxUnit!==u?(r=i.defaultMinSize,o=i.defaultMaxSize):(r=Q(e,n,v),o=Q(e,n,d)),t||(i.minMaxUnit!==u?y(z,r,o,i.id):y(c,s,f,i.id)),q(i,z,r,o,z,z,i.visibility)}(i,r,s,e)}));var c=vi(n),f=r-c,l=f<0?a:o;Si(n,Math.abs(f),l),ui(t)}},bi=function(i){var e=i.items;return gi(i).containerSize-vi(e)},Mi=function(i,e){var n=i.panesList;e!==u&&n.forEach(O),e!==c&&(i.newVisibilityModel=!1),e!==s&&(i.setSizeKey=null)},wi=function(i){return"".concat(i,"px")},Ei=function(i){return i?"width":"height"},Ri=function(i,e,n){var t;return function(i){return Object.keys(i).map((function(e){return i[e]?e:""})).join(" ")}(((t={flex:!0,"f-row w-fit-content h-100p":i,"f-column":!i,"w-100p h-100p":n===u})[e]=e,t))},Ci=function(i,e,n){return function(i){return i.type.startsWith("touch")}(i)?function(i,e,n){var t,r=i.targetTouches[0],o=null!==(t=n.current)&&void 0!==t?t:{},a=o.pageX,u=void 0===a?0:a,s=o.pageY,c=void 0===s?0:s;return n.current=r,e?[r.clientX,r.pageX-u]:[r.clientY,r.pageY-c]}(i,e,n):function(i,e){var n=i.clientX,t=i.clientY,r=i.movementX,o=i.movementY;return e?[n,r]:[t,o]}(i,e)},Vi=function(i){return i<0?r:n},Oi=function(i,e){return function(n){i.style[Ei(e)]=wi(n)}},ki=function(i,e){for(var n=[],t=2;t<arguments.length;t++)n[t-2]=arguments[t];n.forEach((function(n){return i.addEventListener(n,e)}))},Ii=function(i,e,n){i.addEventListener(n,e,{passive:!1})},Ti=function(i,e){for(var n=[],t=2;t<arguments.length;t++)n[t-2]=arguments[t];n.forEach((function(n){return i.removeEventListener(n,e)}))},Li=function(i,e,n){var t={panes:n.panesList.map(_)};e&&e.setItem(i,JSON.stringify(t))},ji=function(){function i(i,e,n){this.store=null,this.empty=!1,this.panesComponents=n,this.getStorage(i,e)}return i.prototype.getStorage=function(i,e){var n,t=this,r=this.store;if(r)return r;if(e){n=e.getItem(i);var o=JSON.parse(n,(function(i,e){return"defaultMaxSize"===i?Number(e):e}));if("[object Object]"===toString.call(o)){var a=o.panes;if(a){if(a.every((function(i,e){var n;return(null===(n=t.panesComponents[e])||void 0===n?void 0:n.props.id)===i.id}))&&a.length===this.panesComponents.length)return this.store=o,o;e.removeItem(i)}else e.removeItem(i)}}this.empty=!0,this.store={panes:[]}},i.prototype.getStoredPane=function(i){var e,n=this.store.panes;return null!==(e=W(n,i))&&void 0!==e?e:null},i}(),Ai=function(i,e,n){var t=e-vi(i);if(0!==t&&0!==n.length){var r=t>0?o:a,u=Math.abs(t);if(u<=n.length)Si(n,u,r);else{var s=vi(n),c=[];n.forEach((function(i){var e=F(i),n=function(i,e,n){var t=i.size+(n===o?e:-e);return I(i),M(i,t)===t}(i,Math.round(u*(e/s)),r);n&&c.push(i)})),Ai(i,e,c)}}},Pi=function(i,n,t,r){var u,s,c=function(){var n,t=e(e([],u,!0),s,!0),r=a;i<0&&(i=Math.abs(i),r=o),t.forEach((n=r,function(e){U(e),I(e),i=w(e,i,n)}))};"1"===n?(u=t.slice(r+2),s=t.slice(0,r-1).reverse(),c()):"2"===n&&(u=t.slice(0,r-1).reverse(),s=t.slice(r+2),c())},Di=function(i,n,t,r,o){void 0===r&&(r=u),void 0===o&&(o=!1);var a=i.panesList,s=i.items,c=si(a),f=si(s),l=G(c,n);if(!(-1===l||t<0)){var v="".concat(n,"-").concat(r);i.setSizeKey===v?a.forEach(V):(a.forEach(C),i.setSizeKey=v);var d=vi(c),z=c[l];I(z);var S=z.size,h=M(z,t),p=h-S;if(p){var m=G(f,n);if(r===u){var x=e([],c,!0);x.splice(l,1);var g=d-z.size;Ai(x,g,x)}if(Pi(p,r,f,m),!o){var y=bi(i);Di(i,n,h+y,r,!0)}}}};var Hi=function(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}((function(i,e){if("function"!=typeof i)throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof i}\`.`);let n,t=0;return function(...r){clearTimeout(n);const o=Date.now(),a=e-(o-t);a<=0?(t=o,i.apply(this,r)):n=setTimeout((()=>{t=Date.now(),i.apply(this,r)}),a)}})),Ni=function(i){for(var e=i.vertical,n=i.items,t=(0,i.getContainerRect)(),r=t.left,o=t.top,a=e?r:o,u=si(n),s=[],c=0;c<u.length-1;c+=2){var f=u[c];if(!f.isHandle){var l=u[c+1],v=l.defaultSize,d=l.id,z=l.detectionRadius,S=F(f),h=a+S-z,p=a+S+v+z;a+=S+v,s.push([h,p,d])}}i.detectionDetails=s},Ui=function(e){var o=e.vertical,a=e.children,d=e.unit,z=e.uniqueId,S=e.storageApi,h=e.onResizeStop,p=e.onChangeVisibility,m=e.onResize,x=function(i){return Array.isArray(i)?i:[i]}(a),g=new ji(z,S,x),y=function(i,e,n){var t=[];return i.forEach((function(i){return t.push(new oi(i.props,e,n,!1),new oi(i.props,e,n,!0))})),t.pop(),t}(x,e,g),b=function(i){return[i.filter((function(i){return!i.isHandle})),i.filter((function(i){return i.isHandle}))]}(y),M=b[0],w=b[1],C=new ai;C.register({vertical:o,items:y,panesList:M,resizersList:w});var V=function(){return function(i){return i.forEach(U)}(y)},O=function(){var i=T();h(i),Li(z,S,C),Ni(C)},I=function(){var i=L();p(i)},T=function(){return $(M,f)},L=function(){return $(M,c)},j=function(i){w.forEach((function(e){e.api.setMouseDownFlag(C.handleId,i)}))};C.onMouseDown=function(i,e){var n=i[0],r=function(i,e){var n=si(i);return G(n,e)}(y,e);C.register({index:r,handleId:e,direction:t,axisCoordinate:n}),j(!0),V()};var A=function(i){void 0===i&&(i=""),Mi(C,i),function(i){i.forEach(Y)}(M)};C.onMoveResize=function(i){var e,n=i[0],t=i[1];!C.isViewSizeChanged&&t&&(P(n,t),X(n)&&hi(n,C),ui(y),A(),e=T(),m(e))};var P=function(i,e){var n=C.direction,t=Vi(e);t!==n&&(C.direction=t,D(i))},D=function(i){C.axisCoordinate=i,V(),pi(C),function(i){var e=i.items,n=i.index,t=gi(i).maxTopAxis,r=si(e);i.bottomAxis=t+ci(r,(function(i){return i.maxSize}),0,n-1),i.topAxis=t+function(i,e,n){return ci(i,(function(i){return i.minSize}),0,n)}(r,0,n-1)}(C)},X=function(i){var e=C.topAxis,t=C.bottomAxis;return i<=e?(di(C,H,N,r),V(),C.axisCoordinate=e,!1):!(i>=t&&(di(C,N,H,n),V(),C.axisCoordinate=t,1))},_=function(e){var n=C.newVisibilityModel,t=$(M,c),r=i(i({},t),e);n||(C.newVisibilityModel=!0,M.forEach(R)),function(i,e){for(var n,t=i.panesList,r=i.items,o=-1,a=0;a<r.length;a+=2){var u=r[a];(n=u).size=n.oldVisibleSize,n.visibility=n.oldVisibility;var s=u.id;E(u,e[s]),E(r[a+1],!1),u.visibility&&(-1!==o&&E(r[a-1],!0),o=a)}var c=si(t);0===vi(c)&&c.forEach((function(i){i.size=1}));var f=gi(i).maxPaneSize;Ai(c,f,c)}(C,r);var o=bi(C);C.isViewSizeChanged=!!o,ui(y),O(),I(),A(c)};C.onMouseUp=function(){O(),j(!1)};var B=function(){ui(y),O(),A(s)},K={restore:function(){!function(i){i.forEach(k),ui(i)}(C.items),A(),O(),I(),C.isViewSizeChanged=!1},setVisibilities:_,getSizes:T,getVisibilities:function(){return L()},getState:function(){return $(M,f,c,l,v)},setSize:function(i,e,n){Di(C,i,e,n),B()},setSizeRatio:function(i,e,n){var t=gi(C).containerSize;Di(C,i,t*e,n),B()}};return C.register({api:K,registerItem:function(i,e){!function(i,e){if(i.api=e,i.isHandle){var n=i.resizerSize;e.setSize(n),q(i,n,n,n,n,n,i.visibility)}}(W(y,e),i)},registerContainer:function(i){C.getContainerRect=function(){return i.getBoundingClientRect()};var n=e.visibility;if(g.empty&&d===u&&!C.isSetRatioMode)yi(C),C.isSetRatioMode=!0;else{var t=g.getStorage(z,S).panes;n=$(t,c)}_(n)},vertical:o,props:e,getPaneSizeStyle:function(i){var e=F(W(M,i));return function(i,e){var n;return(n={})[Ei(i)]=wi(e),n}(o,e)}}),C},Xi=function(){return Xi=Object.assign||function(i){for(var e,n=1,t=arguments.length;n<t;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r]);return i},Xi.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var Yi=function(i,e){e.split(" ").forEach((function(e){return e&&i.classList.add(e)}))},_i=function(i,e){e.split(" ").forEach((function(e){return e&&i.classList.remove(e)}))},Fi=function(i){return document.getElementById(i)},Bi=function(i,e,n){var t=n.panesList,r=n.vertical,o=t[G(t,i)].props,a=o.resizerClass,u=o.activeResizerClass,s=ei(i),c=Fi(s),f=function(i,e){return function(n){i.style[function(i){return i?"minWidth":"minHeight"}(e)]=wi(n)}}(c,r);Yi(c,"overflow-hidden");var l=function(i,e,n,t){return void 0===n&&(n=""),void 0===t&&(t=""),function(r,o){r===e&&(o?(Yi(i,n),_i(i,t)):(Yi(i,t),_i(i,n)))}}(c,s,u,a);l(s,!1),e({setSize:f,setMouseDownFlag:l},s)};exports.BUTTOM_FIRST="1",exports.RATIO=u,exports.TOP_FIRST="2",exports.default=function(i){var e=function(i){var e=i.panes.map((function(i){return{props:i}}));return Xi({onResize:J,onResizeStop:J,onReady:J,onChangeVisibility:J,vertical:!1,unit:u,resizerSize:2,detectionRadius:6,visibility:{},children:e},i)}(i),n=e.panes,t=e.uniqueId,r=e.unit,o=Ui(e),a=o.registerItem,s=o.registerContainer,c=o.api;n.forEach((function(i,t){var r=i.id;!function(i,e,n){var t=n.vertical,r=Fi(i);Yi(r,"overflow-hidden flex-shrink-0"),e({setSize:Oi(r,t)},i)}(r,a,e),t!==n.length-1&&Bi(r,a,o)}));var f=function(){r===u&&(yi(o,!0),Ni(o),Mi(o))};ki(window,f,d);var l=function(i,e,n){var t=n.vertical,r=n.unit,o=Fi(i),a=Ri(t,"",r);return Yi(o,a),e(o),o}(t,s,e),v=function(i){var e=i.vertical,n=e?"col-resize":"row-resize",t=function(i,e){return function(n){var t=Ci(n,e,i.previousTouchEvent);i.onMoveResize(t)}}(i,e),r=function(){i.onMouseUp(),Ti(document,t,h,m)},o=function(i,e,n){return function(t){var r=i.detectionDetails,o=Ci(t,e,{})[0],a=r.map((function(i){var e=i[0],n=i[1];return Math.abs((e+n)/2-o)})),u=ri(a).pop(),s=r[a.indexOf(u)],c=s[0],f=s[1],l=s[2];if(u<=(f-c)/2){i.previousTouchEvent=t;var v=Ci(t,e,{});i.onMouseDown(v,l),n()}}}(i,e,(function(){ki(document,t,h),Ii(document,t,m)}));return[function(t){var a=Hi(function(i,e,n,t){return function(r){var o=e.detectionDetails,a=n?r.clientX:r.clientY;i.style.cursor="auto",o.forEach((function(e){var n=e[0],r=e[1];a>=n&&a<=r&&(i.style.cursor=t)}))}}(t,i,e,n),100);Ii(t,a,h),Ii(t,a,m),ki(t,o,p),Ii(t,o,g),ki(document,r,S,x)},function(){Ti(document,r,S,x)}]}(o),z=v[0],y=v[1],b=function(){y(l),z(l)};return b(),console.log("Vimal"),setTimeout((function(){return c.setVisibilities({P1:!0})}),2e3),[c,b,function(){y(l),Ti(window,f,d)}]}; | ||
//# sourceMappingURL=index.cjs.js.map |
@@ -1,2 +0,2 @@ | ||
var i=function(){return i=Object.assign||function(i){for(var e,n=1,t=arguments.length;n<t;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r]);return i},i.apply(this,arguments)};function e(i,e,n){if(n||2===arguments.length)for(var t,r=0,o=e.length;r<o;r++)!t&&r in e||(t||(t=Array.prototype.slice.call(e,0,r)),t[r]=e[r]);return i.concat(t||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var n=-1,t=0,r=1,o=1,a=2,u="ratio",s="setSize",c="1",f="2",l="visibility",v="size",d="defaultMinSize",z="defaultMaxSize",S="resize",h="onNormalSize",p="mouseup",m="mousemove",g="mousedown",x="touchmove",y="touchend",b="touchstart",M=function(i,e,n,t){if(i<e)throw new Error("Size(".concat(i,") can not be smaller than minSize(").concat(e,") for pane id ").concat(t));if(i>n)throw new Error("Size(".concat(i,") can not be greatter than maxSize(").concat(n,") for pane id ").concat(t))},w=function(e,n){var t=ri(i({},e)),r=n.onMinSize,o=void 0===r?G:r,a=n.onMaxSize,u=void 0===a?G:a,s=n.onNormalSize,c=void 0===s?G:s,f=n.resizerClass,l=n.activeResizerClass,v=n.resizerSize,d=n.detectionRadius;return i({onMinSize:o,onMaxSize:u,onNormalSize:c,resizerSize:v,resizerClass:f,detectionRadius:d,activeResizerClass:l,minSize:0,maxSize:1/0},t)},E=function(i,e){var n=i.minSize,t=i.maxSize,r=i.minSize;return e>=n&&e<=t?r=e:e>t&&(r=t),i.size=r,r},R=function(i,e,n){var t=i.axisSize+(n===o?e:-e),r=E(i,t);return Math.abs(r-t)},C=function(i,e,n){void 0===n&&(n=!1),i&&(i.visibility=e,e?(i.maxSize=i.defaultMaxSize,i.minSize=i.defaultMinSize,function(i,e){i.isHandle&&(i.size=e?0:i.resizerSize)}(i,n)):(i.maxSize=0,i.minSize=0),i.api&&i.api.destroy&&i.api.destroy(e))},V=function(i){i.oldVisibleSize=i.size,i.oldVisibility=i.visibility},O=function(i){i.initialSetSize=i.size},k=function(i){i.size=i.initialSetSize},I=function(i){i.sizeRatio=i.size,i.minSizeRatio=i.defaultMinSize,i.maxSizeRatio=i.defaultMaxSize},L=function(i){i.size=i.defaultSize,T(i),C(i,i.defaultVisibility)},T=function(i){i.minSize=i.defaultMinSize,i.maxSize=i.defaultMaxSize},A=function(i){return i.maxSize=i.defaultMaxSize,i.maxSize},j=function(i){return i.minSize=i.defaultMinSize,i.minSize},P=function(i){return i.maxSize=i.size,i.size},D=function(i){return i.minSize=i.size,i.size},H=function(i){return i.size-i.defaultMinSize},N=function(i){return i.defaultMaxSize-i.size},U=function(i){i.size=i.minSize},X=function(i){i.size=i.maxSize},Y=function(i){i.axisSize=i.size},F=function(i){i.api.setSize(K(i))},_=function(i){if(i.visibility&&!i.isHandle){var e,n=i.size,t=i.id;e=n===i.defaultMaxSize?"onMaxSize":n===i.defaultMinSize?"onMinSize":h,i.sizeState!==e&&(i.props[e](t,n),i.sizeState=e)}},B=function(e){var n,t=ei(e,"id",v,"defaultSize",d,l,"storedSize");return i(i({},t),((n={})[z]=e[z].toString(),n))},K=function(i){return i.visibility?i.size:0},q=function(i){return i.visibility?i.sizeRatio:0},J=function(i,e){i.size=e,i.storedSize=e},W=function(i,e,n,t,r,o,a){J(i,e),i.defaultSize=r,i.minSize=n,i.maxSize=t,i.defaultMinSize=n,i.defaultMaxSize=t,i.storedSize=o,i.visibility=a},G=function(i){return i},Q=function(i,e){return i.find((function(i){return i.id===e}))},Z=function(i){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var t={};return i.forEach((function(i){var n=function(e){return e===v?K(i):i[e]},r=i.id;1===e.length?t[r]=n(e[0]):t[r]=e.reduce((function(i,e){return i[e]=n(e),i}),{})})),t},$=function(i,e,n){return void 0===n&&(n="id"),i.findIndex((function(i){return i[n]===e}))},ii=function(i,e,n){return Math.round(function(i,e,n){return Number((i*(n/e)).toFixed(0))}(i,e,n))},ei=function(i){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var t={};return e.forEach((function(e){t[e]=i[e]})),t},ni=function(i){return i===r},ti=function(i){return"".concat("resizer","-").concat(i)},ri=function(i){return Object.keys(i).forEach((function(e){void 0===i[e]&&delete i[e]})),i},oi=function(i){return e([],i,!0).reverse()},ai=function(i){return e([],i,!0).sort((function(i,e){return i>e?-1:e>i?1:0}))},ui=function(i,e,n,t){var r;this.sizeState=h,this.storedSize=0,this.axisSize=0,this.oldVisibleSize=0,this.oldVisibility=!0,this.props=w(i,e);var o=this.props,a=o.id,s=o.minSize,c=o.size,f=o.maxSize,l=o.resizerSize,v=o.detectionRadius,d=e.visibility,z=e.vertical,S=e.minMaxUnit,p=e.unit;this.minMaxUnit=null!=S?S:p,p!==u&&M(c,s,f,a);var m=null===(r=d[a])||void 0===r||r;this.defaultVisibility=m;var g=n.getStoredPane(a);if(g){var x=g.size,y=g.defaultMaxSize,b=g.defaultMinSize,E=g.defaultSize,R=g.visibility,C=g.storedSize;W(this,x,b,y,E,C,R)}else W(this,c,s,f,c,c,m);this.id=a,this.vertical=z,I(this),this.isHandle=t,t&&(this.id=ti(a),this.resizerSize=l,this.detectionRadius=v)},si=function(){function i(){this.isSetRatioMode=!1,this.newVisibilityModel=!1,this.isViewSizeChanged=!1}return i.prototype.register=function(i){Object.assign(this,i)},i}(),ci=function(i){i.forEach(F)},fi=function(i){return i.filter((function(i){return i.visibility}))};function li(i,e,n,t){void 0===n&&(n=0),void 0===t&&(t=i.length-1);for(var r=0,o=n;o<=t;o++)r+=e(i[o]);return r}var vi=function(i,e,n){return li(i,P,e,n)},di=function(i,e,n){return li(i,D,e,n)},zi=function(i,e,n){return li(i,K,e,n)},Si=function(i,e,n,t){for(var r=i.items,o=i.index,a=fi(r),u=0;u<a.length;u++)u<=o?e(a[u],t):n(a[u],t)},hi=function(i,e,n){var t=i.size+(n===o?e:-e);J(i,t)},pi=function(i,e,n){for(var t,r=0,o=i.length;e>1;)i[t=r%o].visibility&&(hi(i[t],1,n),--e),++r;for(;;){if(i[t=r%o].visibility)return void hi(i[t],e,n);++r}},mi=function(i,e){var n,t,r,u=e.items,s=e.direction,c=e.index,f=e.axisCoordinate,l=fi(u),v=oi(l.slice(0,c+1)),d=l.slice(c+1);if(ni(s)?(n=f-i,r=d,t=v):(n=i-f,r=v,t=d),n<0);else if(0===n)return;var z=n;t.forEach((function(i){n=R(i,n,a)})),z-=n,r.forEach((function(i){z=R(i,z,o)}))},gi=function(i){var e=bi(i).containerSize,n=i.items,t=i.index,r=fi(n),o=t+1,a=H(r[t]),u=N(r[o]);xi(r,a-u,t,o,0,e);var s=H(r[o]),c=N(r[t]);yi(r,c-s,t,o,0,e)},xi=function(i,e,n,t,r,o){var a,u=i.length-1,s=n,c=t,f=i[n],l=i[t],v=function(){r+=j(f)},d=function(){r+=A(l)};switch(!0){case n>0&&t<u:switch(!0){case e<0:v(),a=H(i[s=n-1])+e;break;case 0===e:v(),d(),c=t+1,a=H(i[s=n-1])-N(i[c]);break;case e>0:d(),a=e-N(i[c=t+1])}break;case 0===n&&t<u:switch(!0){case e<0:return v(),r+=vi(i,t+1,u),void(l.maxSize=o-r);case 0===e:return v(),d(),void vi(i,t+1,u);case e>0:d(),a=e-N(i[c=t+1])}break;case n>0&&t===u:switch(!0){case e<0:v(),a=H(i[s=n-1])+e;break;case 0===e:return v(),d(),void di(i,0,n-1);case e>0:return d(),r+=di(i,0,n-1),void(f.minSize=o-r)}break;case 0===n&&t===u:switch(!0){case e<0:return v(),void(l.maxSize=o-r);case 0===e:return v(),void d();case e>0:return d(),void(f.minSize=o-r)}}xi(i,a,s,c,r,o)},yi=function(i,e,n,t,r,o){var a,u=i.length-1,s=n,c=t,f=i[n],l=i[t],v=function(){r+=A(f)},d=function(){r+=j(l)};switch(!0){case n>0&&t<u:switch(!0){case e<0:v(),a=N(i[s=n-1])+e;break;case 0===e:v(),d(),c=t+1,a=N(i[s=n-1])-H(i[c]);break;case e>0:d(),a=e-H(i[c=t+1])}break;case 0===n&&t<u:switch(!0){case e<0:return v(),r+=di(i,t+1,u),void(l.minSize=o-r);case 0===e:return v(),d(),void di(i,t+1,u);case e>0:d(),a=e-H(i[c=t+1])}break;case n>0&&t===u:switch(!0){case e<0:v(),a=N(i[s=n-1])+e;break;case 0===e:return v(),d(),void vi(i,0,n-1);case e>0:return d(),r+=vi(i,0,n-1),void(f.maxSize=o-r)}break;case 0===n&&t===u:switch(!0){case e<0:return v(),void(l.minSize=o-r);case 0===e:return d(),void v();case e>0:return d(),void(f.maxSize=o-r)}}yi(i,a,s,c,r,o)},bi=function(i){var e=i.getContainerRect,n=i.vertical,t=i.resizersList,r=e(),o=r.top,a=r.height,u=r.left,s=r.width,c=n?u:o,f=Math.round(n?s:a);return{containerSize:f,maxTopAxis:c,maxPaneSize:f-zi(t)}},Mi=function(i,e){void 0===e&&(e=!1);var n=i.panesList,t=i.items,r=bi(i).maxPaneSize,s=function(i){return li(i,q)}(n);if(!(s<0)){n.forEach((function(i){!function(i){i.size=i.sizeRatio,i.defaultMinSize=i.minSizeRatio,i.defaultMaxSize=i.maxSizeRatio}(i),function(i,e,n,t){var r,o,a=i.props,s=a.minSize,c=a.size,f=a.maxSize,l=t?[i.minSizeRatio,i.size,i.maxSizeRatio]:[s,c,f],v=l[0],d=l[2],z=ii(e,n,l[1]);i.minMaxUnit!==u?(r=i.defaultMinSize,o=i.defaultMaxSize):(r=ii(e,n,v),o=ii(e,n,d)),t||(i.minMaxUnit!==u?M(z,r,o,i.id):M(c,s,f,i.id)),W(i,z,r,o,z,z,i.visibility)}(i,r,s,e)}));var c=zi(n),f=r-c,l=f<0?a:o;pi(n,Math.abs(f),l),ci(t)}},wi=function(i){var e=i.items;return bi(i).containerSize-zi(e)},Ei=function(i,e){var n=i.panesList;e!==u&&n.forEach(I),e!==l&&(i.newVisibilityModel=!1),e!==s&&(i.setSizeKey=null)},Ri=function(i){return"".concat(i,"px")},Ci=function(i){return i?"width":"height"},Vi=function(i,e,n){var t;return function(i){return Object.keys(i).map((function(e){return i[e]?e:""})).join(" ")}(((t={flex:!0,"f-row w-fit-content h-100p":i,"f-column":!i,"w-100p h-100p":n===u})[e]=e,t))},Oi=function(i,e,n){return i.preventDefault(),function(i){return i.type.startsWith("touch")}(i)?function(i,e,n){var t,r=i.targetTouches[0],o=null!==(t=n.current)&&void 0!==t?t:{},a=o.pageX,u=void 0===a?0:a,s=o.pageY,c=void 0===s?0:s;return n.current=r,e?[r.clientX,r.pageX-u]:[r.clientY,r.pageY-c]}(i,e,n):function(i,e){var n=i.clientX,t=i.clientY,r=i.movementX,o=i.movementY;return e?[n,r]:[t,o]}(i,e)},ki=function(i){return i<0?r:n},Ii=function(i,e){return function(n){i.style[Ci(e)]=Ri(n)}},Li=function(i,e){for(var n=[],t=2;t<arguments.length;t++)n[t-2]=arguments[t];n.forEach((function(n){return i.addEventListener(n,e)}))},Ti=function(i,e,n){i.addEventListener(n,e,{passive:!1})},Ai=function(i,e){for(var n=[],t=2;t<arguments.length;t++)n[t-2]=arguments[t];n.forEach((function(n){return i.removeEventListener(n,e)}))},ji=function(i,e,n){var t={panes:n.panesList.map(B)};e&&e.setItem(i,JSON.stringify(t))},Pi=function(){function i(i,e,n){this.store=null,this.empty=!1,this.panesComponents=n,this.getStorage(i,e)}return i.prototype.getStorage=function(i,e){var n,t=this,r=this.store;if(r)return r;if(e){n=e.getItem(i);var o=JSON.parse(n,(function(i,e){return"defaultMaxSize"===i?Number(e):e}));if("[object Object]"===toString.call(o)){var a=o.panes;if(a){if(a.every((function(i,e){var n;return(null===(n=t.panesComponents[e])||void 0===n?void 0:n.props.id)===i.id}))&&a.length===this.panesComponents.length)return this.store=o,o;e.removeItem(i)}else e.removeItem(i)}}this.empty=!0,this.store={panes:[]}},i.prototype.getStoredPane=function(i){var e,n=this.store.panes;return null!==(e=Q(n,i))&&void 0!==e?e:null},i}(),Di=function(i,e,n){var t=e-zi(i);if(0!==t&&0!==n.length){var r=t>0?o:a,u=Math.abs(t);if(u<=n.length)pi(n,u,r);else{var s=zi(n),c=[];n.forEach((function(i){var e=K(i),n=function(i,e,n){var t=i.size+(n===o?e:-e);return T(i),E(i,t)===t}(i,Math.round(u*(e/s)),r);n&&c.push(i)})),Di(i,e,c)}}},Hi=function(i,n,t,r){var u,s,c=function(){var n,t=e(e([],u,!0),s,!0),r=a;i<0&&(i=Math.abs(i),r=o),t.forEach((n=r,function(e){Y(e),T(e),i=R(e,i,n)}))};"1"===n?(u=t.slice(r+2),s=t.slice(0,r-1).reverse(),c()):"2"===n&&(u=t.slice(0,r-1).reverse(),s=t.slice(r+2),c())},Ni=function(i,n,t,r,o){void 0===r&&(r=u),void 0===o&&(o=!1);var a=i.panesList,s=i.items,c=fi(a),f=fi(s),l=$(c,n);if(!(-1===l||t<0)){var v="".concat(n,"-").concat(r);i.setSizeKey===v?a.forEach(k):(a.forEach(O),i.setSizeKey=v);var d=zi(c),z=c[l];T(z);var S=z.size,h=E(z,t),p=h-S;if(p){var m=$(f,n);if(r===u){var g=e([],c,!0);g.splice(l,1);var x=d-z.size;Di(g,x,g)}if(Hi(p,r,f,m),!o){var y=wi(i);Ni(i,n,h+y,r,!0)}}}};var Ui=function(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}((function(i,e){let n,t=0;return function(...r){clearTimeout(n);const o=Date.now(),a=e-(o-t);a<=0?(t=o,i.apply(this,r)):n=setTimeout((()=>{t=Date.now(),i.apply(this,r)}),a)}})),Xi=function(i){for(var e=i.vertical,n=i.items,t=(0,i.getContainerRect)(),r=t.left,o=t.top,a=e?r:o,u=fi(n),s=[],c=0;c<u.length-1;c+=2){var f=u[c];if(!f.isHandle){var l=u[c+1],v=l.defaultSize,d=l.id,z=l.detectionRadius,S=K(f),h=a+S-z,p=a+S+v+z;a+=S+v,s.push([h,p,d])}}i.detectionDetails=s},Yi=function(e){var o=e.vertical,a=e.children,c=e.unit,f=e.uniqueId,S=e.storageApi,h=e.onResizeStop,p=e.onChangeVisibility,m=e.onResize,g=function(i){return Array.isArray(i)?i:[i]}(a),x=new Pi(f,S,g),y=function(i,e,n){var t=[];return i.forEach((function(i){return t.push(new ui(i.props,e,n,!1),new ui(i.props,e,n,!0))})),t.pop(),t}(g,e,x),b=function(i){return[i.filter((function(i){return!i.isHandle})),i.filter((function(i){return i.isHandle}))]}(y),M=b[0],w=b[1],E=new si;E.register({vertical:o,items:y,panesList:M,resizersList:w});var R=function(){return function(i){return i.forEach(Y)}(y)},O=function(){var i=I();h(i),ji(f,S,E),Xi(E)},k=function(){var i=T();p(i)},I=function(){return Z(M,v)},T=function(){return Z(M,l)},A=function(i){w.forEach((function(e){e.api.setMouseDownFlag(E.handleId,i)}))};E.onMouseDown=function(i,e){var n=i[0],r=function(i,e){var n=fi(i);return $(n,e)}(y,e);E.register({index:r,handleId:e,direction:t,axisCoordinate:n}),A(!0),R()};var j=function(i){void 0===i&&(i=""),Ei(E,i),function(i){i.forEach(_)}(M)};E.onMoveResize=function(i){var e,n=i[0],t=i[1];!E.isViewSizeChanged&&t&&(P(n,t),H(n)&&mi(n,E),ci(y),j(),e=I(),m(e))};var P=function(i,e){var n=E.direction,t=ki(e);t!==n&&(E.direction=t,D(i))},D=function(i){E.axisCoordinate=i,R(),gi(E),function(i){var e=i.items,n=i.index,t=bi(i).maxTopAxis,r=fi(e);i.bottomAxis=t+li(r,(function(i){return i.maxSize}),0,n-1),i.topAxis=t+function(i,e,n){return li(i,(function(i){return i.minSize}),0,n)}(r,0,n-1)}(E)},H=function(i){var e=E.topAxis,t=E.bottomAxis;return i<=e?(Si(E,U,X,r),R(),E.axisCoordinate=e,!1):!(i>=t&&(Si(E,X,U,n),R(),E.axisCoordinate=t,1))},N=function(e){var n=E.newVisibilityModel,t=Z(M,l),r=i(i({},t),e);n||(E.newVisibilityModel=!0,M.forEach(V)),function(i,e){for(var n,t=i.panesList,r=i.items,o=-1,a=0;a<r.length;a+=2){var u=r[a];(n=u).size=n.oldVisibleSize,n.visibility=n.oldVisibility;var s=u.id;C(u,e[s]),C(r[a+1],!1),u.visibility&&(-1!==o&&C(r[a-1],!0),o=a)}var c=fi(t);0===zi(c)&&c.forEach((function(i){i.size=1}));var f=bi(i).maxPaneSize;Di(c,f,c)}(E,r);var o=wi(E);E.isViewSizeChanged=!!o,ci(y),O(),k(),j(l)};E.onMouseUp=function(){O(),A(!1)};var F=function(){ci(y),O(),j(s)},B={restore:function(){!function(i){i.forEach(L),ci(i)}(E.items),j(),O(),k(),E.isViewSizeChanged=!1},setVisibilities:N,getSizes:I,getVisibilities:function(){return T()},getState:function(){return Z(M,v,l,d,z)},setSize:function(i,e,n){Ni(E,i,e,n),F()},setSizeRatio:function(i,e,n){var t=bi(E).containerSize;Ni(E,i,t*e,n),F()}};return E.register({api:B,registerItem:function(i,e){!function(i,e){if(i.api=e,i.isHandle){var n=i.resizerSize;e.setSize(n),W(i,n,n,n,n,n,i.visibility)}}(Q(y,e),i)},registerContainer:function(i){E.getContainerRect=function(){return i.getBoundingClientRect()};var n=e.visibility;if(x.empty&&c===u&&!E.isSetRatioMode)Mi(E),E.isSetRatioMode=!0;else{var t=x.getStorage(f,S).panes;n=Z(t,l)}N(n)},vertical:o,props:e,getPaneSizeStyle:function(i){var e=K(Q(M,i));return function(i,e){var n;return(n={})[Ci(i)]=Ri(e),n}(o,e)}}),E},Fi=function(){return Fi=Object.assign||function(i){for(var e,n=1,t=arguments.length;n<t;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r]);return i},Fi.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var _i=function(i,e){e.split(" ").forEach((function(e){return e&&i.classList.add(e)}))},Bi=function(i,e){e.split(" ").forEach((function(e){return e&&i.classList.remove(e)}))},Ki=function(i){return document.getElementById(i)},qi=function(i,e,n){var t=n.panesList,r=n.vertical,o=t[$(t,i)].props,a=o.resizerClass,u=o.activeResizerClass,s=ti(i),c=Ki(s),f=function(i,e){return function(n){i.style[function(i){return i?"minWidth":"minHeight"}(e)]=Ri(n)}}(c,r);_i(c,"overflow-hidden");var l=function(i,e,n,t){return void 0===n&&(n=""),void 0===t&&(t=""),function(r,o){r===e&&(o?(_i(i,n),Bi(i,t)):(_i(i,t),Bi(i,n)))}}(c,s,u,a);l(s,!1),e({setSize:f,setMouseDownFlag:l},s)},Ji=function(i){var e=function(i){var e=i.panes.map((function(i){return{props:i}}));return Fi({onResize:G,onResizeStop:G,onReady:G,onChangeVisibility:G,vertical:!1,unit:u,resizerSize:2,detectionRadius:6,visibility:{},children:e},i)}(i),n=e.panes,t=e.uniqueId,r=e.unit,o=Yi(e),a=o.registerItem,s=o.registerContainer,c=o.api;n.forEach((function(i,t){var r=i.id;!function(i,e,n){var t=n.vertical,r=Ki(i);_i(r,"overflow-hidden flex-shrink-0"),e({setSize:Ii(r,t)},i)}(r,a,e),t!==n.length-1&&qi(r,a,o)}));var f=function(){r===u&&(Mi(o,!0),Xi(o),Ei(o))};Li(window,f,S);var l=function(i,e,n){var t=n.vertical,r=n.unit,o=Ki(i),a=Vi(t,"",r);return _i(o,a),e(o),o}(t,s,e),v=function(i){var e=i.vertical,n=e?"col-resize":"row-resize",t=function(i,e){return function(n){var t=Oi(n,e,i.previousTouchEvent);i.onMoveResize(t)}}(i,e),r=function(){i.onMouseUp(),Ai(document,t,m,x)},o=function(i,e,n){return function(t){var r=i.detectionDetails,o=Oi(t,e,{})[0],a=r.map((function(i){var e=i[0],n=i[1];return Math.abs((e+n)/2-o)})),u=ai(a).pop(),s=r[a.indexOf(u)],c=s[0],f=s[1],l=s[2];if(u<=(f-c)/2){i.previousTouchEvent=t;var v=Oi(t,e,{});i.onMouseDown(v,l),n()}}}(i,e,(function(){Li(document,t,m),Ti(document,t,x)}));return[function(t){var a=Ui(function(i,e,n,t){return function(r){var o=e.detectionDetails,a=n?r.clientX:r.clientY;i.style.cursor="auto",o.forEach((function(e){var n=e[0],r=e[1];a>=n&&a<=r&&(i.style.cursor=t)}))}}(t,i,e,n),100);Ti(t,a,m),Ti(t,a,x),Li(t,o,g),Ti(t,o,b),Li(document,r,p,y)},function(){Ai(document,r,p,y)}]}(o),d=v[0],z=v[1],h=function(){z(l),d(l)};return h(),console.log("Vimal"),setTimeout((function(){return c.setVisibilities({P1:!0})}),2e3),[c,h,function(){z(l),Ai(window,f,S)}]};export{c as BUTTOM_FIRST,u as RATIO,f as TOP_FIRST,Ji as default}; | ||
var i=function(){return i=Object.assign||function(i){for(var e,n=1,t=arguments.length;n<t;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r]);return i},i.apply(this,arguments)};function e(i,e,n){if(n||2===arguments.length)for(var t,r=0,o=e.length;r<o;r++)!t&&r in e||(t||(t=Array.prototype.slice.call(e,0,r)),t[r]=e[r]);return i.concat(t||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var n=-1,t=0,r=1,o=1,a=2,u="ratio",s="setSize",c="1",f="2",l="visibility",v="size",d="defaultMinSize",z="defaultMaxSize",S="resize",h="onNormalSize",p="mouseup",m="mousemove",g="mousedown",y="touchmove",x="touchend",b="touchstart",M=function(i,e,n,t){if(i<e)throw new Error("Size(".concat(i,") can not be smaller than minSize(").concat(e,") for pane id ").concat(t));if(i>n)throw new Error("Size(".concat(i,") can not be greatter than maxSize(").concat(n,") for pane id ").concat(t))},w=function(e,n){var t=ri(i({},e)),r=n.onMinSize,o=void 0===r?$:r,a=n.onMaxSize,u=void 0===a?$:a,s=n.onNormalSize,c=void 0===s?$:s,f=n.resizerClass,l=n.activeResizerClass,v=n.resizerSize,d=n.detectionRadius;return i({onMinSize:o,onMaxSize:u,onNormalSize:c,resizerSize:v,resizerClass:f,detectionRadius:d,activeResizerClass:l,minSize:0,maxSize:1/0},t)},E=function(i,e){var n=i.minSize,t=i.maxSize,r=i.minSize;return e>=n&&e<=t?r=e:e>t&&(r=t),i.size=r,r},R=function(i,e,n){var t=i.axisSize+(n===o?e:-e),r=E(i,t);return Math.abs(r-t)},C=function(i,e,n){void 0===n&&(n=!1),i&&(i.visibility=e,e?(i.maxSize=i.defaultMaxSize,i.minSize=i.defaultMinSize,function(i,e){i.isHandle&&(i.size=e?0:i.resizerSize)}(i,n)):(i.maxSize=0,i.minSize=0),i.api&&i.api.destroy&&i.api.destroy(e))},V=function(i){i.oldVisibleSize=i.size,i.oldVisibility=i.visibility},O=function(i){i.initialSetSize=i.size},k=function(i){i.size=i.initialSetSize},I=function(i){i.sizeRatio=i.size,i.minSizeRatio=i.defaultMinSize,i.maxSizeRatio=i.defaultMaxSize},T=function(i){i.size=i.defaultSize,L(i),C(i,i.defaultVisibility)},L=function(i){i.minSize=i.defaultMinSize,i.maxSize=i.defaultMaxSize},A=function(i){return i.maxSize=i.defaultMaxSize,i.maxSize},j=function(i){return i.minSize=i.defaultMinSize,i.minSize},P=function(i){return i.maxSize=i.size,i.size},D=function(i){return i.minSize=i.size,i.size},H=function(i){return i.size-i.defaultMinSize},N=function(i){return i.defaultMaxSize-i.size},U=function(i){i.size=i.minSize},X=function(i){i.size=i.maxSize},Y=function(i){i.axisSize=i.size},F=function(i){i.api.setSize(K(i))},_=function(i){if(i.visibility&&!i.isHandle){var e,n=i.size,t=i.id;e=n===i.defaultMaxSize?"onMaxSize":n===i.defaultMinSize?"onMinSize":h,i.sizeState!==e&&(i.props[e](t,n),i.sizeState=e)}},B=function(e){var n,t=ei(e,"id",v,"defaultSize",d,l,"storedSize");return i(i({},t),((n={})[z]=e[z].toString(),n))},K=function(i){return i.visibility?i.size:0},q=function(i){return i.visibility?i.sizeRatio:0},J=function(i,e){i.size=e,i.storedSize=e},W=function(i,e,n,t,r,o,a){J(i,e),i.defaultSize=r,i.minSize=n,i.maxSize=t,i.defaultMinSize=n,i.defaultMaxSize=t,i.storedSize=o,i.visibility=a},$=function(i){return i},G=function(i,e){return i.find((function(i){return i.id===e}))},Q=function(i){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var t={};return i.forEach((function(i){var n=function(e){return e===v?K(i):i[e]},r=i.id;1===e.length?t[r]=n(e[0]):t[r]=e.reduce((function(i,e){return i[e]=n(e),i}),{})})),t},Z=function(i,e,n){return void 0===n&&(n="id"),i.findIndex((function(i){return i[n]===e}))},ii=function(i,e,n){return Math.round(function(i,e,n){return Number((i*(n/e)).toFixed(0))}(i,e,n))},ei=function(i){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var t={};return e.forEach((function(e){t[e]=i[e]})),t},ni=function(i){return i===r},ti=function(i){return"".concat("resizer","-").concat(i)},ri=function(i){return Object.keys(i).forEach((function(e){void 0===i[e]&&delete i[e]})),i},oi=function(i){return e([],i,!0).reverse()},ai=function(i){return e([],i,!0).sort((function(i,e){return i>e?-1:e>i?1:0}))},ui=function(i,e,n,t){var r;this.sizeState=h,this.storedSize=0,this.axisSize=0,this.oldVisibleSize=0,this.oldVisibility=!0,this.props=w(i,e);var o=this.props,a=o.id,s=o.minSize,c=o.size,f=o.maxSize,l=o.resizerSize,v=o.detectionRadius,d=e.visibility,z=e.vertical,S=e.minMaxUnit,p=e.unit;this.minMaxUnit=null!=S?S:p,p!==u&&M(c,s,f,a);var m=null===(r=d[a])||void 0===r||r;this.defaultVisibility=m;var g=n.getStoredPane(a);if(g){var y=g.size,x=g.defaultMaxSize,b=g.defaultMinSize,E=g.defaultSize,R=g.visibility,C=g.storedSize;W(this,y,b,x,E,C,R)}else W(this,c,s,f,c,c,m);this.id=a,this.vertical=z,I(this),this.isHandle=t,t&&(this.id=ti(a),this.resizerSize=l,this.detectionRadius=v)},si=function(){function i(){this.isSetRatioMode=!1,this.newVisibilityModel=!1,this.isViewSizeChanged=!1}return i.prototype.register=function(i){Object.assign(this,i)},i}(),ci=function(i){i.forEach(F)},fi=function(i){return i.filter((function(i){return i.visibility}))};function li(i,e,n,t){void 0===n&&(n=0),void 0===t&&(t=i.length-1);for(var r=0,o=n;o<=t;o++)r+=e(i[o]);return r}var vi=function(i,e,n){return li(i,P,e,n)},di=function(i,e,n){return li(i,D,e,n)},zi=function(i,e,n){return li(i,K,e,n)},Si=function(i,e,n,t){for(var r=i.items,o=i.index,a=fi(r),u=0;u<a.length;u++)u<=o?e(a[u],t):n(a[u],t)},hi=function(i,e,n){var t=i.size+(n===o?e:-e);J(i,t)},pi=function(i,e,n){for(var t,r=0,o=i.length;e>1;)i[t=r%o].visibility&&(hi(i[t],1,n),--e),++r;for(;;){if(i[t=r%o].visibility)return void hi(i[t],e,n);++r}},mi=function(i,e){var n,t,r,u=e.items,s=e.direction,c=e.index,f=e.axisCoordinate,l=fi(u),v=oi(l.slice(0,c+1)),d=l.slice(c+1);if(ni(s)?(n=f-i,r=d,t=v):(n=i-f,r=v,t=d),n<0);else if(0===n)return;var z=n;t.forEach((function(i){n=R(i,n,a)})),z-=n,r.forEach((function(i){z=R(i,z,o)}))},gi=function(i){var e=bi(i).containerSize,n=i.items,t=i.index,r=fi(n),o=t+1,a=H(r[t]),u=N(r[o]);yi(r,a-u,t,o,0,e);var s=H(r[o]),c=N(r[t]);xi(r,c-s,t,o,0,e)},yi=function(i,e,n,t,r,o){var a,u=i.length-1,s=n,c=t,f=i[n],l=i[t],v=function(){r+=j(f)},d=function(){r+=A(l)};switch(!0){case n>0&&t<u:switch(!0){case e<0:v(),a=H(i[s=n-1])+e;break;case 0===e:v(),d(),c=t+1,a=H(i[s=n-1])-N(i[c]);break;case e>0:d(),a=e-N(i[c=t+1])}break;case 0===n&&t<u:switch(!0){case e<0:return v(),r+=vi(i,t+1,u),void(l.maxSize=o-r);case 0===e:return v(),d(),void vi(i,t+1,u);case e>0:d(),a=e-N(i[c=t+1])}break;case n>0&&t===u:switch(!0){case e<0:v(),a=H(i[s=n-1])+e;break;case 0===e:return v(),d(),void di(i,0,n-1);case e>0:return d(),r+=di(i,0,n-1),void(f.minSize=o-r)}break;case 0===n&&t===u:switch(!0){case e<0:return v(),void(l.maxSize=o-r);case 0===e:return v(),void d();case e>0:return d(),void(f.minSize=o-r)}}yi(i,a,s,c,r,o)},xi=function(i,e,n,t,r,o){var a,u=i.length-1,s=n,c=t,f=i[n],l=i[t],v=function(){r+=A(f)},d=function(){r+=j(l)};switch(!0){case n>0&&t<u:switch(!0){case e<0:v(),a=N(i[s=n-1])+e;break;case 0===e:v(),d(),c=t+1,a=N(i[s=n-1])-H(i[c]);break;case e>0:d(),a=e-H(i[c=t+1])}break;case 0===n&&t<u:switch(!0){case e<0:return v(),r+=di(i,t+1,u),void(l.minSize=o-r);case 0===e:return v(),d(),void di(i,t+1,u);case e>0:d(),a=e-H(i[c=t+1])}break;case n>0&&t===u:switch(!0){case e<0:v(),a=N(i[s=n-1])+e;break;case 0===e:return v(),d(),void vi(i,0,n-1);case e>0:return d(),r+=vi(i,0,n-1),void(f.maxSize=o-r)}break;case 0===n&&t===u:switch(!0){case e<0:return v(),void(l.minSize=o-r);case 0===e:return d(),void v();case e>0:return d(),void(f.maxSize=o-r)}}xi(i,a,s,c,r,o)},bi=function(i){var e=i.getContainerRect,n=i.vertical,t=i.resizersList,r=e(),o=r.top,a=r.height,u=r.left,s=r.width,c=n?u:o,f=Math.round(n?s:a);return{containerSize:f,maxTopAxis:c,maxPaneSize:f-zi(t)}},Mi=function(i,e){void 0===e&&(e=!1);var n=i.panesList,t=i.items,r=bi(i).maxPaneSize,s=function(i){return li(i,q)}(n);if(!(s<0)){n.forEach((function(i){!function(i){i.size=i.sizeRatio,i.defaultMinSize=i.minSizeRatio,i.defaultMaxSize=i.maxSizeRatio}(i),function(i,e,n,t){var r,o,a=i.props,s=a.minSize,c=a.size,f=a.maxSize,l=t?[i.minSizeRatio,i.size,i.maxSizeRatio]:[s,c,f],v=l[0],d=l[2],z=ii(e,n,l[1]);i.minMaxUnit!==u?(r=i.defaultMinSize,o=i.defaultMaxSize):(r=ii(e,n,v),o=ii(e,n,d)),t||(i.minMaxUnit!==u?M(z,r,o,i.id):M(c,s,f,i.id)),W(i,z,r,o,z,z,i.visibility)}(i,r,s,e)}));var c=zi(n),f=r-c,l=f<0?a:o;pi(n,Math.abs(f),l),ci(t)}},wi=function(i){var e=i.items;return bi(i).containerSize-zi(e)},Ei=function(i,e){var n=i.panesList;e!==u&&n.forEach(I),e!==l&&(i.newVisibilityModel=!1),e!==s&&(i.setSizeKey=null)},Ri=function(i){return"".concat(i,"px")},Ci=function(i){return i?"width":"height"},Vi=function(i,e,n){var t;return function(i){return Object.keys(i).map((function(e){return i[e]?e:""})).join(" ")}(((t={flex:!0,"f-row w-fit-content h-100p":i,"f-column":!i,"w-100p h-100p":n===u})[e]=e,t))},Oi=function(i,e,n){return function(i){return i.type.startsWith("touch")}(i)?function(i,e,n){var t,r=i.targetTouches[0],o=null!==(t=n.current)&&void 0!==t?t:{},a=o.pageX,u=void 0===a?0:a,s=o.pageY,c=void 0===s?0:s;return n.current=r,e?[r.clientX,r.pageX-u]:[r.clientY,r.pageY-c]}(i,e,n):function(i,e){var n=i.clientX,t=i.clientY,r=i.movementX,o=i.movementY;return e?[n,r]:[t,o]}(i,e)},ki=function(i){return i<0?r:n},Ii=function(i,e){return function(n){i.style[Ci(e)]=Ri(n)}},Ti=function(i,e){for(var n=[],t=2;t<arguments.length;t++)n[t-2]=arguments[t];n.forEach((function(n){return i.addEventListener(n,e)}))},Li=function(i,e,n){i.addEventListener(n,e,{passive:!1})},Ai=function(i,e){for(var n=[],t=2;t<arguments.length;t++)n[t-2]=arguments[t];n.forEach((function(n){return i.removeEventListener(n,e)}))},ji=function(i,e,n){var t={panes:n.panesList.map(B)};e&&e.setItem(i,JSON.stringify(t))},Pi=function(){function i(i,e,n){this.store=null,this.empty=!1,this.panesComponents=n,this.getStorage(i,e)}return i.prototype.getStorage=function(i,e){var n,t=this,r=this.store;if(r)return r;if(e){n=e.getItem(i);var o=JSON.parse(n,(function(i,e){return"defaultMaxSize"===i?Number(e):e}));if("[object Object]"===toString.call(o)){var a=o.panes;if(a){if(a.every((function(i,e){var n;return(null===(n=t.panesComponents[e])||void 0===n?void 0:n.props.id)===i.id}))&&a.length===this.panesComponents.length)return this.store=o,o;e.removeItem(i)}else e.removeItem(i)}}this.empty=!0,this.store={panes:[]}},i.prototype.getStoredPane=function(i){var e,n=this.store.panes;return null!==(e=G(n,i))&&void 0!==e?e:null},i}(),Di=function(i,e,n){var t=e-zi(i);if(0!==t&&0!==n.length){var r=t>0?o:a,u=Math.abs(t);if(u<=n.length)pi(n,u,r);else{var s=zi(n),c=[];n.forEach((function(i){var e=K(i),n=function(i,e,n){var t=i.size+(n===o?e:-e);return L(i),E(i,t)===t}(i,Math.round(u*(e/s)),r);n&&c.push(i)})),Di(i,e,c)}}},Hi=function(i,n,t,r){var u,s,c=function(){var n,t=e(e([],u,!0),s,!0),r=a;i<0&&(i=Math.abs(i),r=o),t.forEach((n=r,function(e){Y(e),L(e),i=R(e,i,n)}))};"1"===n?(u=t.slice(r+2),s=t.slice(0,r-1).reverse(),c()):"2"===n&&(u=t.slice(0,r-1).reverse(),s=t.slice(r+2),c())},Ni=function(i,n,t,r,o){void 0===r&&(r=u),void 0===o&&(o=!1);var a=i.panesList,s=i.items,c=fi(a),f=fi(s),l=Z(c,n);if(!(-1===l||t<0)){var v="".concat(n,"-").concat(r);i.setSizeKey===v?a.forEach(k):(a.forEach(O),i.setSizeKey=v);var d=zi(c),z=c[l];L(z);var S=z.size,h=E(z,t),p=h-S;if(p){var m=Z(f,n);if(r===u){var g=e([],c,!0);g.splice(l,1);var y=d-z.size;Di(g,y,g)}if(Hi(p,r,f,m),!o){var x=wi(i);Ni(i,n,h+x,r,!0)}}}};var Ui=function(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}((function(i,e){if("function"!=typeof i)throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof i}\`.`);let n,t=0;return function(...r){clearTimeout(n);const o=Date.now(),a=e-(o-t);a<=0?(t=o,i.apply(this,r)):n=setTimeout((()=>{t=Date.now(),i.apply(this,r)}),a)}})),Xi=function(i){for(var e=i.vertical,n=i.items,t=(0,i.getContainerRect)(),r=t.left,o=t.top,a=e?r:o,u=fi(n),s=[],c=0;c<u.length-1;c+=2){var f=u[c];if(!f.isHandle){var l=u[c+1],v=l.defaultSize,d=l.id,z=l.detectionRadius,S=K(f),h=a+S-z,p=a+S+v+z;a+=S+v,s.push([h,p,d])}}i.detectionDetails=s},Yi=function(e){var o=e.vertical,a=e.children,c=e.unit,f=e.uniqueId,S=e.storageApi,h=e.onResizeStop,p=e.onChangeVisibility,m=e.onResize,g=function(i){return Array.isArray(i)?i:[i]}(a),y=new Pi(f,S,g),x=function(i,e,n){var t=[];return i.forEach((function(i){return t.push(new ui(i.props,e,n,!1),new ui(i.props,e,n,!0))})),t.pop(),t}(g,e,y),b=function(i){return[i.filter((function(i){return!i.isHandle})),i.filter((function(i){return i.isHandle}))]}(x),M=b[0],w=b[1],E=new si;E.register({vertical:o,items:x,panesList:M,resizersList:w});var R=function(){return function(i){return i.forEach(Y)}(x)},O=function(){var i=I();h(i),ji(f,S,E),Xi(E)},k=function(){var i=L();p(i)},I=function(){return Q(M,v)},L=function(){return Q(M,l)},A=function(i){w.forEach((function(e){e.api.setMouseDownFlag(E.handleId,i)}))};E.onMouseDown=function(i,e){var n=i[0],r=function(i,e){var n=fi(i);return Z(n,e)}(x,e);E.register({index:r,handleId:e,direction:t,axisCoordinate:n}),A(!0),R()};var j=function(i){void 0===i&&(i=""),Ei(E,i),function(i){i.forEach(_)}(M)};E.onMoveResize=function(i){var e,n=i[0],t=i[1];!E.isViewSizeChanged&&t&&(P(n,t),H(n)&&mi(n,E),ci(x),j(),e=I(),m(e))};var P=function(i,e){var n=E.direction,t=ki(e);t!==n&&(E.direction=t,D(i))},D=function(i){E.axisCoordinate=i,R(),gi(E),function(i){var e=i.items,n=i.index,t=bi(i).maxTopAxis,r=fi(e);i.bottomAxis=t+li(r,(function(i){return i.maxSize}),0,n-1),i.topAxis=t+function(i,e,n){return li(i,(function(i){return i.minSize}),0,n)}(r,0,n-1)}(E)},H=function(i){var e=E.topAxis,t=E.bottomAxis;return i<=e?(Si(E,U,X,r),R(),E.axisCoordinate=e,!1):!(i>=t&&(Si(E,X,U,n),R(),E.axisCoordinate=t,1))},N=function(e){var n=E.newVisibilityModel,t=Q(M,l),r=i(i({},t),e);n||(E.newVisibilityModel=!0,M.forEach(V)),function(i,e){for(var n,t=i.panesList,r=i.items,o=-1,a=0;a<r.length;a+=2){var u=r[a];(n=u).size=n.oldVisibleSize,n.visibility=n.oldVisibility;var s=u.id;C(u,e[s]),C(r[a+1],!1),u.visibility&&(-1!==o&&C(r[a-1],!0),o=a)}var c=fi(t);0===zi(c)&&c.forEach((function(i){i.size=1}));var f=bi(i).maxPaneSize;Di(c,f,c)}(E,r);var o=wi(E);E.isViewSizeChanged=!!o,ci(x),O(),k(),j(l)};E.onMouseUp=function(){O(),A(!1)};var F=function(){ci(x),O(),j(s)},B={restore:function(){!function(i){i.forEach(T),ci(i)}(E.items),j(),O(),k(),E.isViewSizeChanged=!1},setVisibilities:N,getSizes:I,getVisibilities:function(){return L()},getState:function(){return Q(M,v,l,d,z)},setSize:function(i,e,n){Ni(E,i,e,n),F()},setSizeRatio:function(i,e,n){var t=bi(E).containerSize;Ni(E,i,t*e,n),F()}};return E.register({api:B,registerItem:function(i,e){!function(i,e){if(i.api=e,i.isHandle){var n=i.resizerSize;e.setSize(n),W(i,n,n,n,n,n,i.visibility)}}(G(x,e),i)},registerContainer:function(i){E.getContainerRect=function(){return i.getBoundingClientRect()};var n=e.visibility;if(y.empty&&c===u&&!E.isSetRatioMode)Mi(E),E.isSetRatioMode=!0;else{var t=y.getStorage(f,S).panes;n=Q(t,l)}N(n)},vertical:o,props:e,getPaneSizeStyle:function(i){var e=K(G(M,i));return function(i,e){var n;return(n={})[Ci(i)]=Ri(e),n}(o,e)}}),E},Fi=function(){return Fi=Object.assign||function(i){for(var e,n=1,t=arguments.length;n<t;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r]);return i},Fi.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var _i=function(i,e){e.split(" ").forEach((function(e){return e&&i.classList.add(e)}))},Bi=function(i,e){e.split(" ").forEach((function(e){return e&&i.classList.remove(e)}))},Ki=function(i){return document.getElementById(i)},qi=function(i,e,n){var t=n.panesList,r=n.vertical,o=t[Z(t,i)].props,a=o.resizerClass,u=o.activeResizerClass,s=ti(i),c=Ki(s),f=function(i,e){return function(n){i.style[function(i){return i?"minWidth":"minHeight"}(e)]=Ri(n)}}(c,r);_i(c,"overflow-hidden");var l=function(i,e,n,t){return void 0===n&&(n=""),void 0===t&&(t=""),function(r,o){r===e&&(o?(_i(i,n),Bi(i,t)):(_i(i,t),Bi(i,n)))}}(c,s,u,a);l(s,!1),e({setSize:f,setMouseDownFlag:l},s)},Ji=function(i){var e=function(i){var e=i.panes.map((function(i){return{props:i}}));return Fi({onResize:$,onResizeStop:$,onReady:$,onChangeVisibility:$,vertical:!1,unit:u,resizerSize:2,detectionRadius:6,visibility:{},children:e},i)}(i),n=e.panes,t=e.uniqueId,r=e.unit,o=Yi(e),a=o.registerItem,s=o.registerContainer,c=o.api;n.forEach((function(i,t){var r=i.id;!function(i,e,n){var t=n.vertical,r=Ki(i);_i(r,"overflow-hidden flex-shrink-0"),e({setSize:Ii(r,t)},i)}(r,a,e),t!==n.length-1&&qi(r,a,o)}));var f=function(){r===u&&(Mi(o,!0),Xi(o),Ei(o))};Ti(window,f,S);var l=function(i,e,n){var t=n.vertical,r=n.unit,o=Ki(i),a=Vi(t,"",r);return _i(o,a),e(o),o}(t,s,e),v=function(i){var e=i.vertical,n=e?"col-resize":"row-resize",t=function(i,e){return function(n){var t=Oi(n,e,i.previousTouchEvent);i.onMoveResize(t)}}(i,e),r=function(){i.onMouseUp(),Ai(document,t,m,y)},o=function(i,e,n){return function(t){var r=i.detectionDetails,o=Oi(t,e,{})[0],a=r.map((function(i){var e=i[0],n=i[1];return Math.abs((e+n)/2-o)})),u=ai(a).pop(),s=r[a.indexOf(u)],c=s[0],f=s[1],l=s[2];if(u<=(f-c)/2){i.previousTouchEvent=t;var v=Oi(t,e,{});i.onMouseDown(v,l),n()}}}(i,e,(function(){Ti(document,t,m),Li(document,t,y)}));return[function(t){var a=Ui(function(i,e,n,t){return function(r){var o=e.detectionDetails,a=n?r.clientX:r.clientY;i.style.cursor="auto",o.forEach((function(e){var n=e[0],r=e[1];a>=n&&a<=r&&(i.style.cursor=t)}))}}(t,i,e,n),100);Li(t,a,m),Li(t,a,y),Ti(t,o,g),Li(t,o,b),Ti(document,r,p,x)},function(){Ai(document,r,p,x)}]}(o),d=v[0],z=v[1],h=function(){z(l),d(l)};return h(),console.log("Vimal"),setTimeout((function(){return c.setVisibilities({P1:!0})}),2e3),[c,h,function(){z(l),Ai(window,f,S)}]};export{c as BUTTOM_FIRST,u as RATIO,f as TOP_FIRST,Ji as default}; | ||
//# sourceMappingURL=index.esm.js.map |
@@ -1,2 +0,2 @@ | ||
!function(i,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((i="undefined"!=typeof globalThis?globalThis:i||self).resizablePanes={})}(this,(function(i){"use strict";var e=function(){return e=Object.assign||function(i){for(var e,n=1,t=arguments.length;n<t;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r]);return i},e.apply(this,arguments)};function n(i,e,n){if(n||2===arguments.length)for(var t,r=0,o=e.length;r<o;r++)!t&&r in e||(t||(t=Array.prototype.slice.call(e,0,r)),t[r]=e[r]);return i.concat(t||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var t=-1,r=0,o=1,a=1,u=2,s="ratio",c="setSize",f="visibility",l="size",v="defaultMinSize",d="defaultMaxSize",z="resize",S="onNormalSize",h="mouseup",p="mousemove",m="mousedown",g="touchmove",y="touchend",b="touchstart",x=function(i,e,n,t){if(i<e)throw new Error("Size(".concat(i,") can not be smaller than minSize(").concat(e,") for pane id ").concat(t));if(i>n)throw new Error("Size(".concat(i,") can not be greatter than maxSize(").concat(n,") for pane id ").concat(t))},M=function(i,n){var t=ti(e({},i)),r=n.onMinSize,o=void 0===r?W:r,a=n.onMaxSize,u=void 0===a?W:a,s=n.onNormalSize,c=void 0===s?W:s,f=n.resizerClass,l=n.activeResizerClass,v=n.resizerSize,d=n.detectionRadius;return e({onMinSize:o,onMaxSize:u,onNormalSize:c,resizerSize:v,resizerClass:f,detectionRadius:d,activeResizerClass:l,minSize:0,maxSize:1/0},t)},w=function(i,e){var n=i.minSize,t=i.maxSize,r=i.minSize;return e>=n&&e<=t?r=e:e>t&&(r=t),i.size=r,r},E=function(i,e,n){var t=i.axisSize+(n===a?e:-e),r=w(i,t);return Math.abs(r-t)},R=function(i,e,n){void 0===n&&(n=!1),i&&(i.visibility=e,e?(i.maxSize=i.defaultMaxSize,i.minSize=i.defaultMinSize,function(i,e){i.isHandle&&(i.size=e?0:i.resizerSize)}(i,n)):(i.maxSize=0,i.minSize=0),i.api&&i.api.destroy&&i.api.destroy(e))},C=function(i){i.oldVisibleSize=i.size,i.oldVisibility=i.visibility},V=function(i){i.initialSetSize=i.size},O=function(i){i.size=i.initialSetSize},T=function(i){i.sizeRatio=i.size,i.minSizeRatio=i.defaultMinSize,i.maxSizeRatio=i.defaultMaxSize},k=function(i){i.size=i.defaultSize,I(i),R(i,i.defaultVisibility)},I=function(i){i.minSize=i.defaultMinSize,i.maxSize=i.defaultMaxSize},L=function(i){return i.maxSize=i.defaultMaxSize,i.maxSize},j=function(i){return i.minSize=i.defaultMinSize,i.minSize},P=function(i){return i.maxSize=i.size,i.size},A=function(i){return i.minSize=i.size,i.size},D=function(i){return i.size-i.defaultMinSize},H=function(i){return i.defaultMaxSize-i.size},N=function(i){i.size=i.minSize},U=function(i){i.size=i.maxSize},X=function(i){i.axisSize=i.size},Y=function(i){i.api.setSize(B(i))},_=function(i){if(i.visibility&&!i.isHandle){var e,n=i.size,t=i.id;e=n===i.defaultMaxSize?"onMaxSize":n===i.defaultMinSize?"onMinSize":S,i.sizeState!==e&&(i.props[e](t,n),i.sizeState=e)}},F=function(i){var n,t=ii(i,"id",l,"defaultSize",v,f,"storedSize");return e(e({},t),((n={})[d]=i[d].toString(),n))},B=function(i){return i.visibility?i.size:0},K=function(i){return i.visibility?i.sizeRatio:0},q=function(i,e){i.size=e,i.storedSize=e},J=function(i,e,n,t,r,o,a){q(i,e),i.defaultSize=r,i.minSize=n,i.maxSize=t,i.defaultMinSize=n,i.defaultMaxSize=t,i.storedSize=o,i.visibility=a},W=function(i){return i},G=function(i,e){return i.find((function(i){return i.id===e}))},Q=function(i){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var t={};return i.forEach((function(i){var n=function(e){return e===l?B(i):i[e]},r=i.id;1===e.length?t[r]=n(e[0]):t[r]=e.reduce((function(i,e){return i[e]=n(e),i}),{})})),t},Z=function(i,e,n){return void 0===n&&(n="id"),i.findIndex((function(i){return i[n]===e}))},$=function(i,e,n){return Math.round(function(i,e,n){return Number((i*(n/e)).toFixed(0))}(i,e,n))},ii=function(i){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var t={};return e.forEach((function(e){t[e]=i[e]})),t},ei=function(i){return i===o},ni=function(i){return"".concat("resizer","-").concat(i)},ti=function(i){return Object.keys(i).forEach((function(e){void 0===i[e]&&delete i[e]})),i},ri=function(i){return n([],i,!0).reverse()},oi=function(i){return n([],i,!0).sort((function(i,e){return i>e?-1:e>i?1:0}))},ai=function(i,e,n,t){var r;this.sizeState=S,this.storedSize=0,this.axisSize=0,this.oldVisibleSize=0,this.oldVisibility=!0,this.props=M(i,e);var o=this.props,a=o.id,u=o.minSize,c=o.size,f=o.maxSize,l=o.resizerSize,v=o.detectionRadius,d=e.visibility,z=e.vertical,h=e.minMaxUnit,p=e.unit;this.minMaxUnit=null!=h?h:p,p!==s&&x(c,u,f,a);var m=null===(r=d[a])||void 0===r||r;this.defaultVisibility=m;var g=n.getStoredPane(a);if(g){var y=g.size,b=g.defaultMaxSize,w=g.defaultMinSize,E=g.defaultSize,R=g.visibility,C=g.storedSize;J(this,y,w,b,E,C,R)}else J(this,c,u,f,c,c,m);this.id=a,this.vertical=z,T(this),this.isHandle=t,t&&(this.id=ni(a),this.resizerSize=l,this.detectionRadius=v)},ui=function(){function i(){this.isSetRatioMode=!1,this.newVisibilityModel=!1,this.isViewSizeChanged=!1}return i.prototype.register=function(i){Object.assign(this,i)},i}(),si=function(i){i.forEach(Y)},ci=function(i){return i.filter((function(i){return i.visibility}))};function fi(i,e,n,t){void 0===n&&(n=0),void 0===t&&(t=i.length-1);for(var r=0,o=n;o<=t;o++)r+=e(i[o]);return r}var li=function(i,e,n){return fi(i,P,e,n)},vi=function(i,e,n){return fi(i,A,e,n)},di=function(i,e,n){return fi(i,B,e,n)},zi=function(i,e,n,t){for(var r=i.items,o=i.index,a=ci(r),u=0;u<a.length;u++)u<=o?e(a[u],t):n(a[u],t)},Si=function(i,e,n){var t=i.size+(n===a?e:-e);q(i,t)},hi=function(i,e,n){for(var t,r=0,o=i.length;e>1;)i[t=r%o].visibility&&(Si(i[t],1,n),--e),++r;for(;;){if(i[t=r%o].visibility)return void Si(i[t],e,n);++r}},pi=function(i,e){var n,t,r,o=e.items,s=e.direction,c=e.index,f=e.axisCoordinate,l=ci(o),v=ri(l.slice(0,c+1)),d=l.slice(c+1);if(ei(s)?(n=f-i,r=d,t=v):(n=i-f,r=v,t=d),n<0);else if(0===n)return;var z=n;t.forEach((function(i){n=E(i,n,u)})),z-=n,r.forEach((function(i){z=E(i,z,a)}))},mi=function(i){var e=bi(i).containerSize,n=i.items,t=i.index,r=ci(n),o=t+1,a=D(r[t]),u=H(r[o]);gi(r,a-u,t,o,0,e);var s=D(r[o]),c=H(r[t]);yi(r,c-s,t,o,0,e)},gi=function(i,e,n,t,r,o){var a,u=i.length-1,s=n,c=t,f=i[n],l=i[t],v=function(){r+=j(f)},d=function(){r+=L(l)};switch(!0){case n>0&&t<u:switch(!0){case e<0:v(),a=D(i[s=n-1])+e;break;case 0===e:v(),d(),c=t+1,a=D(i[s=n-1])-H(i[c]);break;case e>0:d(),a=e-H(i[c=t+1])}break;case 0===n&&t<u:switch(!0){case e<0:return v(),r+=li(i,t+1,u),void(l.maxSize=o-r);case 0===e:return v(),d(),void li(i,t+1,u);case e>0:d(),a=e-H(i[c=t+1])}break;case n>0&&t===u:switch(!0){case e<0:v(),a=D(i[s=n-1])+e;break;case 0===e:return v(),d(),void vi(i,0,n-1);case e>0:return d(),r+=vi(i,0,n-1),void(f.minSize=o-r)}break;case 0===n&&t===u:switch(!0){case e<0:return v(),void(l.maxSize=o-r);case 0===e:return v(),void d();case e>0:return d(),void(f.minSize=o-r)}}gi(i,a,s,c,r,o)},yi=function(i,e,n,t,r,o){var a,u=i.length-1,s=n,c=t,f=i[n],l=i[t],v=function(){r+=L(f)},d=function(){r+=j(l)};switch(!0){case n>0&&t<u:switch(!0){case e<0:v(),a=H(i[s=n-1])+e;break;case 0===e:v(),d(),c=t+1,a=H(i[s=n-1])-D(i[c]);break;case e>0:d(),a=e-D(i[c=t+1])}break;case 0===n&&t<u:switch(!0){case e<0:return v(),r+=vi(i,t+1,u),void(l.minSize=o-r);case 0===e:return v(),d(),void vi(i,t+1,u);case e>0:d(),a=e-D(i[c=t+1])}break;case n>0&&t===u:switch(!0){case e<0:v(),a=H(i[s=n-1])+e;break;case 0===e:return v(),d(),void li(i,0,n-1);case e>0:return d(),r+=li(i,0,n-1),void(f.maxSize=o-r)}break;case 0===n&&t===u:switch(!0){case e<0:return v(),void(l.minSize=o-r);case 0===e:return d(),void v();case e>0:return d(),void(f.maxSize=o-r)}}yi(i,a,s,c,r,o)},bi=function(i){var e=i.getContainerRect,n=i.vertical,t=i.resizersList,r=e(),o=r.top,a=r.height,u=r.left,s=r.width,c=n?u:o,f=Math.round(n?s:a);return{containerSize:f,maxTopAxis:c,maxPaneSize:f-di(t)}},xi=function(i,e){void 0===e&&(e=!1);var n=i.panesList,t=i.items,r=bi(i).maxPaneSize,o=function(i){return fi(i,K)}(n);if(!(o<0)){n.forEach((function(i){!function(i){i.size=i.sizeRatio,i.defaultMinSize=i.minSizeRatio,i.defaultMaxSize=i.maxSizeRatio}(i),function(i,e,n,t){var r,o,a=i.props,u=a.minSize,c=a.size,f=a.maxSize,l=t?[i.minSizeRatio,i.size,i.maxSizeRatio]:[u,c,f],v=l[0],d=l[2],z=$(e,n,l[1]);i.minMaxUnit!==s?(r=i.defaultMinSize,o=i.defaultMaxSize):(r=$(e,n,v),o=$(e,n,d)),t||(i.minMaxUnit!==s?x(z,r,o,i.id):x(c,u,f,i.id)),J(i,z,r,o,z,z,i.visibility)}(i,r,o,e)}));var c=di(n),f=r-c,l=f<0?u:a;hi(n,Math.abs(f),l),si(t)}},Mi=function(i){var e=i.items;return bi(i).containerSize-di(e)},wi=function(i,e){var n=i.panesList;e!==s&&n.forEach(T),e!==f&&(i.newVisibilityModel=!1),e!==c&&(i.setSizeKey=null)},Ei=function(i){return"".concat(i,"px")},Ri=function(i){return i?"width":"height"},Ci=function(i,e,n){var t;return function(i){return Object.keys(i).map((function(e){return i[e]?e:""})).join(" ")}(((t={flex:!0,"f-row w-fit-content h-100p":i,"f-column":!i,"w-100p h-100p":n===s})[e]=e,t))},Vi=function(i,e,n){return i.preventDefault(),function(i){return i.type.startsWith("touch")}(i)?function(i,e,n){var t,r=i.targetTouches[0],o=null!==(t=n.current)&&void 0!==t?t:{},a=o.pageX,u=void 0===a?0:a,s=o.pageY,c=void 0===s?0:s;return n.current=r,e?[r.clientX,r.pageX-u]:[r.clientY,r.pageY-c]}(i,e,n):function(i,e){var n=i.clientX,t=i.clientY,r=i.movementX,o=i.movementY;return e?[n,r]:[t,o]}(i,e)},Oi=function(i){return i<0?o:t},Ti=function(i,e){return function(n){i.style[Ri(e)]=Ei(n)}},ki=function(i,e){for(var n=[],t=2;t<arguments.length;t++)n[t-2]=arguments[t];n.forEach((function(n){return i.addEventListener(n,e)}))},Ii=function(i,e,n){i.addEventListener(n,e,{passive:!1})},Li=function(i,e){for(var n=[],t=2;t<arguments.length;t++)n[t-2]=arguments[t];n.forEach((function(n){return i.removeEventListener(n,e)}))},ji=function(i,e,n){var t={panes:n.panesList.map(F)};e&&e.setItem(i,JSON.stringify(t))},Pi=function(){function i(i,e,n){this.store=null,this.empty=!1,this.panesComponents=n,this.getStorage(i,e)}return i.prototype.getStorage=function(i,e){var n,t=this,r=this.store;if(r)return r;if(e){n=e.getItem(i);var o=JSON.parse(n,(function(i,e){return"defaultMaxSize"===i?Number(e):e}));if("[object Object]"===toString.call(o)){var a=o.panes;if(a){if(a.every((function(i,e){var n;return(null===(n=t.panesComponents[e])||void 0===n?void 0:n.props.id)===i.id}))&&a.length===this.panesComponents.length)return this.store=o,o;e.removeItem(i)}else e.removeItem(i)}}this.empty=!0,this.store={panes:[]}},i.prototype.getStoredPane=function(i){var e,n=this.store.panes;return null!==(e=G(n,i))&&void 0!==e?e:null},i}(),Ai=function(i,e,n){var t=e-di(i);if(0!==t&&0!==n.length){var r=t>0?a:u,o=Math.abs(t);if(o<=n.length)hi(n,o,r);else{var s=di(n),c=[];n.forEach((function(i){var e=B(i),n=function(i,e,n){var t=i.size+(n===a?e:-e);return I(i),w(i,t)===t}(i,Math.round(o*(e/s)),r);n&&c.push(i)})),Ai(i,e,c)}}},Di=function(i,e,t,r){var o,s,c=function(){var e,t=n(n([],o,!0),s,!0),r=u;i<0&&(i=Math.abs(i),r=a),t.forEach((e=r,function(n){X(n),I(n),i=E(n,i,e)}))};"1"===e?(o=t.slice(r+2),s=t.slice(0,r-1).reverse(),c()):"2"===e&&(o=t.slice(0,r-1).reverse(),s=t.slice(r+2),c())},Hi=function(i,e,t,r,o){void 0===r&&(r=s),void 0===o&&(o=!1);var a=i.panesList,u=i.items,c=ci(a),f=ci(u),l=Z(c,e);if(!(-1===l||t<0)){var v="".concat(e,"-").concat(r);i.setSizeKey===v?a.forEach(O):(a.forEach(V),i.setSizeKey=v);var d=di(c),z=c[l];I(z);var S=z.size,h=w(z,t),p=h-S;if(p){var m=Z(f,e);if(r===s){var g=n([],c,!0);g.splice(l,1);var y=d-z.size;Ai(g,y,g)}if(Di(p,r,f,m),!o){var b=Mi(i);Hi(i,e,h+b,r,!0)}}}};var Ni=function(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}((function(i,e){let n,t=0;return function(...r){clearTimeout(n);const o=Date.now(),a=e-(o-t);a<=0?(t=o,i.apply(this,r)):n=setTimeout((()=>{t=Date.now(),i.apply(this,r)}),a)}})),Ui=function(i){for(var e=i.vertical,n=i.items,t=(0,i.getContainerRect)(),r=t.left,o=t.top,a=e?r:o,u=ci(n),s=[],c=0;c<u.length-1;c+=2){var f=u[c];if(!f.isHandle){var l=u[c+1],v=l.defaultSize,d=l.id,z=l.detectionRadius,S=B(f),h=a+S-z,p=a+S+v+z;a+=S+v,s.push([h,p,d])}}i.detectionDetails=s},Xi=function(i){var n=i.vertical,a=i.children,u=i.unit,z=i.uniqueId,S=i.storageApi,h=i.onResizeStop,p=i.onChangeVisibility,m=i.onResize,g=function(i){return Array.isArray(i)?i:[i]}(a),y=new Pi(z,S,g),b=function(i,e,n){var t=[];return i.forEach((function(i){return t.push(new ai(i.props,e,n,!1),new ai(i.props,e,n,!0))})),t.pop(),t}(g,i,y),x=function(i){return[i.filter((function(i){return!i.isHandle})),i.filter((function(i){return i.isHandle}))]}(b),M=x[0],w=x[1],E=new ui;E.register({vertical:n,items:b,panesList:M,resizersList:w});var V=function(){return function(i){return i.forEach(X)}(b)},O=function(){var i=I();h(i),ji(z,S,E),Ui(E)},T=function(){var i=L();p(i)},I=function(){return Q(M,l)},L=function(){return Q(M,f)},j=function(i){w.forEach((function(e){e.api.setMouseDownFlag(E.handleId,i)}))};E.onMouseDown=function(i,e){var n=i[0],t=function(i,e){var n=ci(i);return Z(n,e)}(b,e);E.register({index:t,handleId:e,direction:r,axisCoordinate:n}),j(!0),V()};var P=function(i){void 0===i&&(i=""),wi(E,i),function(i){i.forEach(_)}(M)};E.onMoveResize=function(i){var e,n=i[0],t=i[1];!E.isViewSizeChanged&&t&&(A(n,t),H(n)&&pi(n,E),si(b),P(),e=I(),m(e))};var A=function(i,e){var n=E.direction,t=Oi(e);t!==n&&(E.direction=t,D(i))},D=function(i){E.axisCoordinate=i,V(),mi(E),function(i){var e=i.items,n=i.index,t=bi(i).maxTopAxis,r=ci(e);i.bottomAxis=t+fi(r,(function(i){return i.maxSize}),0,n-1),i.topAxis=t+function(i,e,n){return fi(i,(function(i){return i.minSize}),0,n)}(r,0,n-1)}(E)},H=function(i){var e=E.topAxis,n=E.bottomAxis;return i<=e?(zi(E,N,U,o),V(),E.axisCoordinate=e,!1):!(i>=n&&(zi(E,U,N,t),V(),E.axisCoordinate=n,1))},Y=function(i){var n=E.newVisibilityModel,t=Q(M,f),r=e(e({},t),i);n||(E.newVisibilityModel=!0,M.forEach(C)),function(i,e){for(var n,t=i.panesList,r=i.items,o=-1,a=0;a<r.length;a+=2){var u=r[a];(n=u).size=n.oldVisibleSize,n.visibility=n.oldVisibility;var s=u.id;R(u,e[s]),R(r[a+1],!1),u.visibility&&(-1!==o&&R(r[a-1],!0),o=a)}var c=ci(t);0===di(c)&&c.forEach((function(i){i.size=1}));var f=bi(i).maxPaneSize;Ai(c,f,c)}(E,r);var o=Mi(E);E.isViewSizeChanged=!!o,si(b),O(),T(),P(f)};E.onMouseUp=function(){O(),j(!1)};var F=function(){si(b),O(),P(c)},K={restore:function(){!function(i){i.forEach(k),si(i)}(E.items),P(),O(),T(),E.isViewSizeChanged=!1},setVisibilities:Y,getSizes:I,getVisibilities:function(){return L()},getState:function(){return Q(M,l,f,v,d)},setSize:function(i,e,n){Hi(E,i,e,n),F()},setSizeRatio:function(i,e,n){var t=bi(E).containerSize;Hi(E,i,t*e,n),F()}};return E.register({api:K,registerItem:function(i,e){!function(i,e){if(i.api=e,i.isHandle){var n=i.resizerSize;e.setSize(n),J(i,n,n,n,n,n,i.visibility)}}(G(b,e),i)},registerContainer:function(e){E.getContainerRect=function(){return e.getBoundingClientRect()};var n=i.visibility;if(y.empty&&u===s&&!E.isSetRatioMode)xi(E),E.isSetRatioMode=!0;else{var t=y.getStorage(z,S).panes;n=Q(t,f)}Y(n)},vertical:n,props:i,getPaneSizeStyle:function(i){var e=B(G(M,i));return function(i,e){var n;return(n={})[Ri(i)]=Ei(e),n}(n,e)}}),E},Yi=function(){return Yi=Object.assign||function(i){for(var e,n=1,t=arguments.length;n<t;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r]);return i},Yi.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var _i=function(i,e){e.split(" ").forEach((function(e){return e&&i.classList.add(e)}))},Fi=function(i,e){e.split(" ").forEach((function(e){return e&&i.classList.remove(e)}))},Bi=function(i){return document.getElementById(i)},Ki=function(i,e,n){var t=n.panesList,r=n.vertical,o=t[Z(t,i)].props,a=o.resizerClass,u=o.activeResizerClass,s=ni(i),c=Bi(s),f=function(i,e){return function(n){i.style[function(i){return i?"minWidth":"minHeight"}(e)]=Ei(n)}}(c,r);_i(c,"overflow-hidden");var l=function(i,e,n,t){return void 0===n&&(n=""),void 0===t&&(t=""),function(r,o){r===e&&(o?(_i(i,n),Fi(i,t)):(_i(i,t),Fi(i,n)))}}(c,s,u,a);l(s,!1),e({setSize:f,setMouseDownFlag:l},s)};i.BUTTOM_FIRST="1",i.RATIO=s,i.TOP_FIRST="2",i.default=function(i){var e=function(i){var e=i.panes.map((function(i){return{props:i}}));return Yi({onResize:W,onResizeStop:W,onReady:W,onChangeVisibility:W,vertical:!1,unit:s,resizerSize:2,detectionRadius:6,visibility:{},children:e},i)}(i),n=e.panes,t=e.uniqueId,r=e.unit,o=Xi(e),a=o.registerItem,u=o.registerContainer,c=o.api;n.forEach((function(i,t){var r=i.id;!function(i,e,n){var t=n.vertical,r=Bi(i);_i(r,"overflow-hidden flex-shrink-0"),e({setSize:Ti(r,t)},i)}(r,a,e),t!==n.length-1&&Ki(r,a,o)}));var f=function(){r===s&&(xi(o,!0),Ui(o),wi(o))};ki(window,f,z);var l=function(i,e,n){var t=n.vertical,r=n.unit,o=Bi(i),a=Ci(t,"",r);return _i(o,a),e(o),o}(t,u,e),v=function(i){var e=i.vertical,n=e?"col-resize":"row-resize",t=function(i,e){return function(n){var t=Vi(n,e,i.previousTouchEvent);i.onMoveResize(t)}}(i,e),r=function(){i.onMouseUp(),Li(document,t,p,g)},o=function(i,e,n){return function(t){var r=i.detectionDetails,o=Vi(t,e,{})[0],a=r.map((function(i){var e=i[0],n=i[1];return Math.abs((e+n)/2-o)})),u=oi(a).pop(),s=r[a.indexOf(u)],c=s[0],f=s[1],l=s[2];if(u<=(f-c)/2){i.previousTouchEvent=t;var v=Vi(t,e,{});i.onMouseDown(v,l),n()}}}(i,e,(function(){ki(document,t,p),Ii(document,t,g)}));return[function(t){var a=Ni(function(i,e,n,t){return function(r){var o=e.detectionDetails,a=n?r.clientX:r.clientY;i.style.cursor="auto",o.forEach((function(e){var n=e[0],r=e[1];a>=n&&a<=r&&(i.style.cursor=t)}))}}(t,i,e,n),100);Ii(t,a,p),Ii(t,a,g),ki(t,o,m),Ii(t,o,b),ki(document,r,h,y)},function(){Li(document,r,h,y)}]}(o),d=v[0],S=v[1],x=function(){S(l),d(l)};return x(),console.log("Vimal"),setTimeout((function(){return c.setVisibilities({P1:!0})}),2e3),[c,x,function(){S(l),Li(window,f,z)}]},Object.defineProperty(i,"__esModule",{value:!0})})); | ||
!function(i,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((i="undefined"!=typeof globalThis?globalThis:i||self).resizablePanes={})}(this,(function(i){"use strict";var e=function(){return e=Object.assign||function(i){for(var e,n=1,t=arguments.length;n<t;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r]);return i},e.apply(this,arguments)};function n(i,e,n){if(n||2===arguments.length)for(var t,r=0,o=e.length;r<o;r++)!t&&r in e||(t||(t=Array.prototype.slice.call(e,0,r)),t[r]=e[r]);return i.concat(t||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var t=-1,r=0,o=1,a=1,u=2,s="ratio",c="setSize",f="visibility",l="size",d="defaultMinSize",v="defaultMaxSize",z="resize",S="onNormalSize",h="mouseup",p="mousemove",m="mousedown",y="touchmove",g="touchend",b="touchstart",x=function(i,e,n,t){if(i<e)throw new Error("Size(".concat(i,") can not be smaller than minSize(").concat(e,") for pane id ").concat(t));if(i>n)throw new Error("Size(".concat(i,") can not be greatter than maxSize(").concat(n,") for pane id ").concat(t))},M=function(i,n){var t=ti(e({},i)),r=n.onMinSize,o=void 0===r?W:r,a=n.onMaxSize,u=void 0===a?W:a,s=n.onNormalSize,c=void 0===s?W:s,f=n.resizerClass,l=n.activeResizerClass,d=n.resizerSize,v=n.detectionRadius;return e({onMinSize:o,onMaxSize:u,onNormalSize:c,resizerSize:d,resizerClass:f,detectionRadius:v,activeResizerClass:l,minSize:0,maxSize:1/0},t)},w=function(i,e){var n=i.minSize,t=i.maxSize,r=i.minSize;return e>=n&&e<=t?r=e:e>t&&(r=t),i.size=r,r},E=function(i,e,n){var t=i.axisSize+(n===a?e:-e),r=w(i,t);return Math.abs(r-t)},R=function(i,e,n){void 0===n&&(n=!1),i&&(i.visibility=e,e?(i.maxSize=i.defaultMaxSize,i.minSize=i.defaultMinSize,function(i,e){i.isHandle&&(i.size=e?0:i.resizerSize)}(i,n)):(i.maxSize=0,i.minSize=0),i.api&&i.api.destroy&&i.api.destroy(e))},C=function(i){i.oldVisibleSize=i.size,i.oldVisibility=i.visibility},V=function(i){i.initialSetSize=i.size},O=function(i){i.size=i.initialSetSize},T=function(i){i.sizeRatio=i.size,i.minSizeRatio=i.defaultMinSize,i.maxSizeRatio=i.defaultMaxSize},k=function(i){i.size=i.defaultSize,I(i),R(i,i.defaultVisibility)},I=function(i){i.minSize=i.defaultMinSize,i.maxSize=i.defaultMaxSize},L=function(i){return i.maxSize=i.defaultMaxSize,i.maxSize},j=function(i){return i.minSize=i.defaultMinSize,i.minSize},P=function(i){return i.maxSize=i.size,i.size},A=function(i){return i.minSize=i.size,i.size},D=function(i){return i.size-i.defaultMinSize},H=function(i){return i.defaultMaxSize-i.size},N=function(i){i.size=i.minSize},U=function(i){i.size=i.maxSize},X=function(i){i.axisSize=i.size},Y=function(i){i.api.setSize(B(i))},_=function(i){if(i.visibility&&!i.isHandle){var e,n=i.size,t=i.id;e=n===i.defaultMaxSize?"onMaxSize":n===i.defaultMinSize?"onMinSize":S,i.sizeState!==e&&(i.props[e](t,n),i.sizeState=e)}},F=function(i){var n,t=ii(i,"id",l,"defaultSize",d,f,"storedSize");return e(e({},t),((n={})[v]=i[v].toString(),n))},B=function(i){return i.visibility?i.size:0},K=function(i){return i.visibility?i.sizeRatio:0},q=function(i,e){i.size=e,i.storedSize=e},J=function(i,e,n,t,r,o,a){q(i,e),i.defaultSize=r,i.minSize=n,i.maxSize=t,i.defaultMinSize=n,i.defaultMaxSize=t,i.storedSize=o,i.visibility=a},W=function(i){return i},$=function(i,e){return i.find((function(i){return i.id===e}))},G=function(i){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var t={};return i.forEach((function(i){var n=function(e){return e===l?B(i):i[e]},r=i.id;1===e.length?t[r]=n(e[0]):t[r]=e.reduce((function(i,e){return i[e]=n(e),i}),{})})),t},Q=function(i,e,n){return void 0===n&&(n="id"),i.findIndex((function(i){return i[n]===e}))},Z=function(i,e,n){return Math.round(function(i,e,n){return Number((i*(n/e)).toFixed(0))}(i,e,n))},ii=function(i){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var t={};return e.forEach((function(e){t[e]=i[e]})),t},ei=function(i){return i===o},ni=function(i){return"".concat("resizer","-").concat(i)},ti=function(i){return Object.keys(i).forEach((function(e){void 0===i[e]&&delete i[e]})),i},ri=function(i){return n([],i,!0).reverse()},oi=function(i){return n([],i,!0).sort((function(i,e){return i>e?-1:e>i?1:0}))},ai=function(i,e,n,t){var r;this.sizeState=S,this.storedSize=0,this.axisSize=0,this.oldVisibleSize=0,this.oldVisibility=!0,this.props=M(i,e);var o=this.props,a=o.id,u=o.minSize,c=o.size,f=o.maxSize,l=o.resizerSize,d=o.detectionRadius,v=e.visibility,z=e.vertical,h=e.minMaxUnit,p=e.unit;this.minMaxUnit=null!=h?h:p,p!==s&&x(c,u,f,a);var m=null===(r=v[a])||void 0===r||r;this.defaultVisibility=m;var y=n.getStoredPane(a);if(y){var g=y.size,b=y.defaultMaxSize,w=y.defaultMinSize,E=y.defaultSize,R=y.visibility,C=y.storedSize;J(this,g,w,b,E,C,R)}else J(this,c,u,f,c,c,m);this.id=a,this.vertical=z,T(this),this.isHandle=t,t&&(this.id=ni(a),this.resizerSize=l,this.detectionRadius=d)},ui=function(){function i(){this.isSetRatioMode=!1,this.newVisibilityModel=!1,this.isViewSizeChanged=!1}return i.prototype.register=function(i){Object.assign(this,i)},i}(),si=function(i){i.forEach(Y)},ci=function(i){return i.filter((function(i){return i.visibility}))};function fi(i,e,n,t){void 0===n&&(n=0),void 0===t&&(t=i.length-1);for(var r=0,o=n;o<=t;o++)r+=e(i[o]);return r}var li=function(i,e,n){return fi(i,P,e,n)},di=function(i,e,n){return fi(i,A,e,n)},vi=function(i,e,n){return fi(i,B,e,n)},zi=function(i,e,n,t){for(var r=i.items,o=i.index,a=ci(r),u=0;u<a.length;u++)u<=o?e(a[u],t):n(a[u],t)},Si=function(i,e,n){var t=i.size+(n===a?e:-e);q(i,t)},hi=function(i,e,n){for(var t,r=0,o=i.length;e>1;)i[t=r%o].visibility&&(Si(i[t],1,n),--e),++r;for(;;){if(i[t=r%o].visibility)return void Si(i[t],e,n);++r}},pi=function(i,e){var n,t,r,o=e.items,s=e.direction,c=e.index,f=e.axisCoordinate,l=ci(o),d=ri(l.slice(0,c+1)),v=l.slice(c+1);if(ei(s)?(n=f-i,r=v,t=d):(n=i-f,r=d,t=v),n<0);else if(0===n)return;var z=n;t.forEach((function(i){n=E(i,n,u)})),z-=n,r.forEach((function(i){z=E(i,z,a)}))},mi=function(i){var e=bi(i).containerSize,n=i.items,t=i.index,r=ci(n),o=t+1,a=D(r[t]),u=H(r[o]);yi(r,a-u,t,o,0,e);var s=D(r[o]),c=H(r[t]);gi(r,c-s,t,o,0,e)},yi=function(i,e,n,t,r,o){var a,u=i.length-1,s=n,c=t,f=i[n],l=i[t],d=function(){r+=j(f)},v=function(){r+=L(l)};switch(!0){case n>0&&t<u:switch(!0){case e<0:d(),a=D(i[s=n-1])+e;break;case 0===e:d(),v(),c=t+1,a=D(i[s=n-1])-H(i[c]);break;case e>0:v(),a=e-H(i[c=t+1])}break;case 0===n&&t<u:switch(!0){case e<0:return d(),r+=li(i,t+1,u),void(l.maxSize=o-r);case 0===e:return d(),v(),void li(i,t+1,u);case e>0:v(),a=e-H(i[c=t+1])}break;case n>0&&t===u:switch(!0){case e<0:d(),a=D(i[s=n-1])+e;break;case 0===e:return d(),v(),void di(i,0,n-1);case e>0:return v(),r+=di(i,0,n-1),void(f.minSize=o-r)}break;case 0===n&&t===u:switch(!0){case e<0:return d(),void(l.maxSize=o-r);case 0===e:return d(),void v();case e>0:return v(),void(f.minSize=o-r)}}yi(i,a,s,c,r,o)},gi=function(i,e,n,t,r,o){var a,u=i.length-1,s=n,c=t,f=i[n],l=i[t],d=function(){r+=L(f)},v=function(){r+=j(l)};switch(!0){case n>0&&t<u:switch(!0){case e<0:d(),a=H(i[s=n-1])+e;break;case 0===e:d(),v(),c=t+1,a=H(i[s=n-1])-D(i[c]);break;case e>0:v(),a=e-D(i[c=t+1])}break;case 0===n&&t<u:switch(!0){case e<0:return d(),r+=di(i,t+1,u),void(l.minSize=o-r);case 0===e:return d(),v(),void di(i,t+1,u);case e>0:v(),a=e-D(i[c=t+1])}break;case n>0&&t===u:switch(!0){case e<0:d(),a=H(i[s=n-1])+e;break;case 0===e:return d(),v(),void li(i,0,n-1);case e>0:return v(),r+=li(i,0,n-1),void(f.maxSize=o-r)}break;case 0===n&&t===u:switch(!0){case e<0:return d(),void(l.minSize=o-r);case 0===e:return v(),void d();case e>0:return v(),void(f.maxSize=o-r)}}gi(i,a,s,c,r,o)},bi=function(i){var e=i.getContainerRect,n=i.vertical,t=i.resizersList,r=e(),o=r.top,a=r.height,u=r.left,s=r.width,c=n?u:o,f=Math.round(n?s:a);return{containerSize:f,maxTopAxis:c,maxPaneSize:f-vi(t)}},xi=function(i,e){void 0===e&&(e=!1);var n=i.panesList,t=i.items,r=bi(i).maxPaneSize,o=function(i){return fi(i,K)}(n);if(!(o<0)){n.forEach((function(i){!function(i){i.size=i.sizeRatio,i.defaultMinSize=i.minSizeRatio,i.defaultMaxSize=i.maxSizeRatio}(i),function(i,e,n,t){var r,o,a=i.props,u=a.minSize,c=a.size,f=a.maxSize,l=t?[i.minSizeRatio,i.size,i.maxSizeRatio]:[u,c,f],d=l[0],v=l[2],z=Z(e,n,l[1]);i.minMaxUnit!==s?(r=i.defaultMinSize,o=i.defaultMaxSize):(r=Z(e,n,d),o=Z(e,n,v)),t||(i.minMaxUnit!==s?x(z,r,o,i.id):x(c,u,f,i.id)),J(i,z,r,o,z,z,i.visibility)}(i,r,o,e)}));var c=vi(n),f=r-c,l=f<0?u:a;hi(n,Math.abs(f),l),si(t)}},Mi=function(i){var e=i.items;return bi(i).containerSize-vi(e)},wi=function(i,e){var n=i.panesList;e!==s&&n.forEach(T),e!==f&&(i.newVisibilityModel=!1),e!==c&&(i.setSizeKey=null)},Ei=function(i){return"".concat(i,"px")},Ri=function(i){return i?"width":"height"},Ci=function(i,e,n){var t;return function(i){return Object.keys(i).map((function(e){return i[e]?e:""})).join(" ")}(((t={flex:!0,"f-row w-fit-content h-100p":i,"f-column":!i,"w-100p h-100p":n===s})[e]=e,t))},Vi=function(i,e,n){return function(i){return i.type.startsWith("touch")}(i)?function(i,e,n){var t,r=i.targetTouches[0],o=null!==(t=n.current)&&void 0!==t?t:{},a=o.pageX,u=void 0===a?0:a,s=o.pageY,c=void 0===s?0:s;return n.current=r,e?[r.clientX,r.pageX-u]:[r.clientY,r.pageY-c]}(i,e,n):function(i,e){var n=i.clientX,t=i.clientY,r=i.movementX,o=i.movementY;return e?[n,r]:[t,o]}(i,e)},Oi=function(i){return i<0?o:t},Ti=function(i,e){return function(n){i.style[Ri(e)]=Ei(n)}},ki=function(i,e){for(var n=[],t=2;t<arguments.length;t++)n[t-2]=arguments[t];n.forEach((function(n){return i.addEventListener(n,e)}))},Ii=function(i,e,n){i.addEventListener(n,e,{passive:!1})},Li=function(i,e){for(var n=[],t=2;t<arguments.length;t++)n[t-2]=arguments[t];n.forEach((function(n){return i.removeEventListener(n,e)}))},ji=function(i,e,n){var t={panes:n.panesList.map(F)};e&&e.setItem(i,JSON.stringify(t))},Pi=function(){function i(i,e,n){this.store=null,this.empty=!1,this.panesComponents=n,this.getStorage(i,e)}return i.prototype.getStorage=function(i,e){var n,t=this,r=this.store;if(r)return r;if(e){n=e.getItem(i);var o=JSON.parse(n,(function(i,e){return"defaultMaxSize"===i?Number(e):e}));if("[object Object]"===toString.call(o)){var a=o.panes;if(a){if(a.every((function(i,e){var n;return(null===(n=t.panesComponents[e])||void 0===n?void 0:n.props.id)===i.id}))&&a.length===this.panesComponents.length)return this.store=o,o;e.removeItem(i)}else e.removeItem(i)}}this.empty=!0,this.store={panes:[]}},i.prototype.getStoredPane=function(i){var e,n=this.store.panes;return null!==(e=$(n,i))&&void 0!==e?e:null},i}(),Ai=function(i,e,n){var t=e-vi(i);if(0!==t&&0!==n.length){var r=t>0?a:u,o=Math.abs(t);if(o<=n.length)hi(n,o,r);else{var s=vi(n),c=[];n.forEach((function(i){var e=B(i),n=function(i,e,n){var t=i.size+(n===a?e:-e);return I(i),w(i,t)===t}(i,Math.round(o*(e/s)),r);n&&c.push(i)})),Ai(i,e,c)}}},Di=function(i,e,t,r){var o,s,c=function(){var e,t=n(n([],o,!0),s,!0),r=u;i<0&&(i=Math.abs(i),r=a),t.forEach((e=r,function(n){X(n),I(n),i=E(n,i,e)}))};"1"===e?(o=t.slice(r+2),s=t.slice(0,r-1).reverse(),c()):"2"===e&&(o=t.slice(0,r-1).reverse(),s=t.slice(r+2),c())},Hi=function(i,e,t,r,o){void 0===r&&(r=s),void 0===o&&(o=!1);var a=i.panesList,u=i.items,c=ci(a),f=ci(u),l=Q(c,e);if(!(-1===l||t<0)){var d="".concat(e,"-").concat(r);i.setSizeKey===d?a.forEach(O):(a.forEach(V),i.setSizeKey=d);var v=vi(c),z=c[l];I(z);var S=z.size,h=w(z,t),p=h-S;if(p){var m=Q(f,e);if(r===s){var y=n([],c,!0);y.splice(l,1);var g=v-z.size;Ai(y,g,y)}if(Di(p,r,f,m),!o){var b=Mi(i);Hi(i,e,h+b,r,!0)}}}};var Ni=function(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}((function(i,e){if("function"!=typeof i)throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof i}\`.`);let n,t=0;return function(...r){clearTimeout(n);const o=Date.now(),a=e-(o-t);a<=0?(t=o,i.apply(this,r)):n=setTimeout((()=>{t=Date.now(),i.apply(this,r)}),a)}})),Ui=function(i){for(var e=i.vertical,n=i.items,t=(0,i.getContainerRect)(),r=t.left,o=t.top,a=e?r:o,u=ci(n),s=[],c=0;c<u.length-1;c+=2){var f=u[c];if(!f.isHandle){var l=u[c+1],d=l.defaultSize,v=l.id,z=l.detectionRadius,S=B(f),h=a+S-z,p=a+S+d+z;a+=S+d,s.push([h,p,v])}}i.detectionDetails=s},Xi=function(i){var n=i.vertical,a=i.children,u=i.unit,z=i.uniqueId,S=i.storageApi,h=i.onResizeStop,p=i.onChangeVisibility,m=i.onResize,y=function(i){return Array.isArray(i)?i:[i]}(a),g=new Pi(z,S,y),b=function(i,e,n){var t=[];return i.forEach((function(i){return t.push(new ai(i.props,e,n,!1),new ai(i.props,e,n,!0))})),t.pop(),t}(y,i,g),x=function(i){return[i.filter((function(i){return!i.isHandle})),i.filter((function(i){return i.isHandle}))]}(b),M=x[0],w=x[1],E=new ui;E.register({vertical:n,items:b,panesList:M,resizersList:w});var V=function(){return function(i){return i.forEach(X)}(b)},O=function(){var i=I();h(i),ji(z,S,E),Ui(E)},T=function(){var i=L();p(i)},I=function(){return G(M,l)},L=function(){return G(M,f)},j=function(i){w.forEach((function(e){e.api.setMouseDownFlag(E.handleId,i)}))};E.onMouseDown=function(i,e){var n=i[0],t=function(i,e){var n=ci(i);return Q(n,e)}(b,e);E.register({index:t,handleId:e,direction:r,axisCoordinate:n}),j(!0),V()};var P=function(i){void 0===i&&(i=""),wi(E,i),function(i){i.forEach(_)}(M)};E.onMoveResize=function(i){var e,n=i[0],t=i[1];!E.isViewSizeChanged&&t&&(A(n,t),H(n)&&pi(n,E),si(b),P(),e=I(),m(e))};var A=function(i,e){var n=E.direction,t=Oi(e);t!==n&&(E.direction=t,D(i))},D=function(i){E.axisCoordinate=i,V(),mi(E),function(i){var e=i.items,n=i.index,t=bi(i).maxTopAxis,r=ci(e);i.bottomAxis=t+fi(r,(function(i){return i.maxSize}),0,n-1),i.topAxis=t+function(i,e,n){return fi(i,(function(i){return i.minSize}),0,n)}(r,0,n-1)}(E)},H=function(i){var e=E.topAxis,n=E.bottomAxis;return i<=e?(zi(E,N,U,o),V(),E.axisCoordinate=e,!1):!(i>=n&&(zi(E,U,N,t),V(),E.axisCoordinate=n,1))},Y=function(i){var n=E.newVisibilityModel,t=G(M,f),r=e(e({},t),i);n||(E.newVisibilityModel=!0,M.forEach(C)),function(i,e){for(var n,t=i.panesList,r=i.items,o=-1,a=0;a<r.length;a+=2){var u=r[a];(n=u).size=n.oldVisibleSize,n.visibility=n.oldVisibility;var s=u.id;R(u,e[s]),R(r[a+1],!1),u.visibility&&(-1!==o&&R(r[a-1],!0),o=a)}var c=ci(t);0===vi(c)&&c.forEach((function(i){i.size=1}));var f=bi(i).maxPaneSize;Ai(c,f,c)}(E,r);var o=Mi(E);E.isViewSizeChanged=!!o,si(b),O(),T(),P(f)};E.onMouseUp=function(){O(),j(!1)};var F=function(){si(b),O(),P(c)},K={restore:function(){!function(i){i.forEach(k),si(i)}(E.items),P(),O(),T(),E.isViewSizeChanged=!1},setVisibilities:Y,getSizes:I,getVisibilities:function(){return L()},getState:function(){return G(M,l,f,d,v)},setSize:function(i,e,n){Hi(E,i,e,n),F()},setSizeRatio:function(i,e,n){var t=bi(E).containerSize;Hi(E,i,t*e,n),F()}};return E.register({api:K,registerItem:function(i,e){!function(i,e){if(i.api=e,i.isHandle){var n=i.resizerSize;e.setSize(n),J(i,n,n,n,n,n,i.visibility)}}($(b,e),i)},registerContainer:function(e){E.getContainerRect=function(){return e.getBoundingClientRect()};var n=i.visibility;if(g.empty&&u===s&&!E.isSetRatioMode)xi(E),E.isSetRatioMode=!0;else{var t=g.getStorage(z,S).panes;n=G(t,f)}Y(n)},vertical:n,props:i,getPaneSizeStyle:function(i){var e=B($(M,i));return function(i,e){var n;return(n={})[Ri(i)]=Ei(e),n}(n,e)}}),E},Yi=function(){return Yi=Object.assign||function(i){for(var e,n=1,t=arguments.length;n<t;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r]);return i},Yi.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var _i=function(i,e){e.split(" ").forEach((function(e){return e&&i.classList.add(e)}))},Fi=function(i,e){e.split(" ").forEach((function(e){return e&&i.classList.remove(e)}))},Bi=function(i){return document.getElementById(i)},Ki=function(i,e,n){var t=n.panesList,r=n.vertical,o=t[Q(t,i)].props,a=o.resizerClass,u=o.activeResizerClass,s=ni(i),c=Bi(s),f=function(i,e){return function(n){i.style[function(i){return i?"minWidth":"minHeight"}(e)]=Ei(n)}}(c,r);_i(c,"overflow-hidden");var l=function(i,e,n,t){return void 0===n&&(n=""),void 0===t&&(t=""),function(r,o){r===e&&(o?(_i(i,n),Fi(i,t)):(_i(i,t),Fi(i,n)))}}(c,s,u,a);l(s,!1),e({setSize:f,setMouseDownFlag:l},s)};i.BUTTOM_FIRST="1",i.RATIO=s,i.TOP_FIRST="2",i.default=function(i){var e=function(i){var e=i.panes.map((function(i){return{props:i}}));return Yi({onResize:W,onResizeStop:W,onReady:W,onChangeVisibility:W,vertical:!1,unit:s,resizerSize:2,detectionRadius:6,visibility:{},children:e},i)}(i),n=e.panes,t=e.uniqueId,r=e.unit,o=Xi(e),a=o.registerItem,u=o.registerContainer,c=o.api;n.forEach((function(i,t){var r=i.id;!function(i,e,n){var t=n.vertical,r=Bi(i);_i(r,"overflow-hidden flex-shrink-0"),e({setSize:Ti(r,t)},i)}(r,a,e),t!==n.length-1&&Ki(r,a,o)}));var f=function(){r===s&&(xi(o,!0),Ui(o),wi(o))};ki(window,f,z);var l=function(i,e,n){var t=n.vertical,r=n.unit,o=Bi(i),a=Ci(t,"",r);return _i(o,a),e(o),o}(t,u,e),d=function(i){var e=i.vertical,n=e?"col-resize":"row-resize",t=function(i,e){return function(n){var t=Vi(n,e,i.previousTouchEvent);i.onMoveResize(t)}}(i,e),r=function(){i.onMouseUp(),Li(document,t,p,y)},o=function(i,e,n){return function(t){var r=i.detectionDetails,o=Vi(t,e,{})[0],a=r.map((function(i){var e=i[0],n=i[1];return Math.abs((e+n)/2-o)})),u=oi(a).pop(),s=r[a.indexOf(u)],c=s[0],f=s[1],l=s[2];if(u<=(f-c)/2){i.previousTouchEvent=t;var d=Vi(t,e,{});i.onMouseDown(d,l),n()}}}(i,e,(function(){ki(document,t,p),Ii(document,t,y)}));return[function(t){var a=Ni(function(i,e,n,t){return function(r){var o=e.detectionDetails,a=n?r.clientX:r.clientY;i.style.cursor="auto",o.forEach((function(e){var n=e[0],r=e[1];a>=n&&a<=r&&(i.style.cursor=t)}))}}(t,i,e,n),100);Ii(t,a,p),Ii(t,a,y),ki(t,o,m),Ii(t,o,b),ki(document,r,h,g)},function(){Li(document,r,h,g)}]}(o),v=d[0],S=d[1],x=function(){S(l),v(l)};return x(),console.log("Vimal"),setTimeout((function(){return c.setVisibilities({P1:!0})}),2e3),[c,x,function(){S(l),Li(window,f,z)}]},Object.defineProperty(i,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.umd.js.map |
{ | ||
"name": "resizable-panes-js", | ||
"version": "6.0.25", | ||
"version": "6.0.26", | ||
"description": "A straightforward library that enables dynamic resizing of layouts and saves the layout configurations.", | ||
@@ -5,0 +5,0 @@ "module": "./lib/esm/index.esm.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
363199
283
1