@luciodale/swipe-bar 1.3.4 → 1.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,22 +1,6 @@
1
- (function(N,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],l):(N=typeof globalThis<"u"?globalThis:N||self,l(N.LucioDaleSwipeBar={},N.React))})(this,function(N,l){"use strict";var Se={exports:{}},de={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Ie;function ot(){if(Ie)return de;Ie=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(i,c,o){var d=null;if(o!==void 0&&(d=""+o),c.key!==void 0&&(d=""+c.key),"key"in c){o={};for(var g in c)g!=="key"&&(o[g]=c[g])}else o=c;return c=o.ref,{$$typeof:e,type:i,key:d,ref:c!==void 0?c:null,props:o}}return de.Fragment=t,de.jsx=n,de.jsxs=n,de}var fe={};/**
10
- * @license React
11
- * react-jsx-runtime.development.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var _e;function at(){return _e||(_e=1,process.env.NODE_ENV!=="production"&&function(){function e(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===Q?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case P:return"Fragment";case _:return"Profiler";case L:return"StrictMode";case j:return"Suspense";case w:return"SuspenseList";case M:return"Activity"}if(typeof r=="object")switch(typeof r.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),r.$$typeof){case p:return"Portal";case W:return r.displayName||"Context";case Y:return(r._context.displayName||"Context")+".Consumer";case B:var b=r.render;return r=r.displayName,r||(r=b.displayName||b.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case x:return b=r.displayName||null,b!==null?b:e(r.type)||"Memo";case A:b=r._payload,r=r._init;try{return e(r(b))}catch{}}return null}function t(r){return""+r}function n(r){try{t(r);var b=!1}catch{b=!0}if(b){b=console;var E=b.error,T=typeof Symbol=="function"&&Symbol.toStringTag&&r[Symbol.toStringTag]||r.constructor.name||"Object";return E.call(b,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",T),t(r)}}function i(r){if(r===P)return"<>";if(typeof r=="object"&&r!==null&&r.$$typeof===A)return"<...>";try{var b=e(r);return b?"<"+b+">":"<...>"}catch{return"<...>"}}function c(){var r=D.A;return r===null?null:r.getOwner()}function o(){return Error("react-stack-top-frame")}function d(r){if(J.call(r,"key")){var b=Object.getOwnPropertyDescriptor(r,"key").get;if(b&&b.isReactWarning)return!1}return r.key!==void 0}function g(r,b){function E(){H||(H=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",b))}E.isReactWarning=!0,Object.defineProperty(r,"key",{get:E,configurable:!0})}function u(){var r=e(this.type);return Z[r]||(Z[r]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),r=this.props.ref,r!==void 0?r:null}function s(r,b,E,T,z,F){var X=E.ref;return r={$$typeof:I,type:r,key:b,props:E,_owner:T},(X!==void 0?X:null)!==null?Object.defineProperty(r,"ref",{enumerable:!1,get:u}):Object.defineProperty(r,"ref",{enumerable:!1,value:null}),r._store={},Object.defineProperty(r._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(r,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(r,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:z}),Object.defineProperty(r,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:F}),Object.freeze&&(Object.freeze(r.props),Object.freeze(r)),r}function S(r,b,E,T,z,F){var X=b.children;if(X!==void 0)if(T)if(U(X)){for(T=0;T<X.length;T++)R(X[T]);Object.freeze&&Object.freeze(X)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else R(X);if(J.call(b,"key")){X=e(r);var K=Object.keys(b).filter(function(Me){return Me!=="key"});T=0<K.length?"{key: someKey, "+K.join(": ..., ")+": ...}":"{key: someKey}",oe[X+T]||(K=0<K.length?"{"+K.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
1
+ (function(Q,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],l):(Q=typeof globalThis<"u"?globalThis:Q||self,l(Q.LucioDaleSwipeBar={},Q.React))})(this,(function(Q,l){"use strict";var ye={exports:{}},ge={};var Ye;function xt(){if(Ye)return ge;Ye=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,u,c){var f=null;if(c!==void 0&&(f=""+c),u.key!==void 0&&(f=""+u.key),"key"in u){c={};for(var m in u)m!=="key"&&(c[m]=u[m])}else c=u;return u=c.ref,{$$typeof:e,type:r,key:f,ref:u!==void 0?u:null,props:c}}return ge.Fragment=t,ge.jsx=n,ge.jsxs=n,ge}var he={};var Xe;function Ot(){return Xe||(Xe=1,process.env.NODE_ENV!=="production"&&(function(){function e(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===J?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case w:return"Fragment";case _:return"Profiler";case x:return"StrictMode";case B:return"Suspense";case W:return"SuspenseList";case j:return"Activity"}if(typeof a=="object")switch(typeof a.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),a.$$typeof){case d:return"Portal";case D:return a.displayName||"Context";case X:return(a._context.displayName||"Context")+".Consumer";case H:var v=a.render;return a=a.displayName,a||(a=v.displayName||v.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case k:return v=a.displayName||null,v!==null?v:e(a.type)||"Memo";case V:v=a._payload,a=a._init;try{return e(a(v))}catch{}}return null}function t(a){return""+a}function n(a){try{t(a);var v=!1}catch{v=!0}if(v){v=console;var Y=v.error,L=typeof Symbol=="function"&&Symbol.toStringTag&&a[Symbol.toStringTag]||a.constructor.name||"Object";return Y.call(v,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",L),t(a)}}function r(a){if(a===w)return"<>";if(typeof a=="object"&&a!==null&&a.$$typeof===V)return"<...>";try{var v=e(a);return v?"<"+v+">":"<...>"}catch{return"<...>"}}function u(){var a=G.A;return a===null?null:a.getOwner()}function c(){return Error("react-stack-top-frame")}function f(a){if(y.call(a,"key")){var v=Object.getOwnPropertyDescriptor(a,"key").get;if(v&&v.isReactWarning)return!1}return a.key!==void 0}function m(a,v){function Y(){F||(F=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",v))}Y.isReactWarning=!0,Object.defineProperty(a,"key",{get:Y,configurable:!0})}function h(){var a=e(this.type);return U[a]||(U[a]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),a=this.props.ref,a!==void 0?a:null}function p(a,v,Y,L,ue,oe){var N=Y.ref;return a={$$typeof:I,type:a,key:v,props:Y,_owner:L},(N!==void 0?N:null)!==null?Object.defineProperty(a,"ref",{enumerable:!1,get:h}):Object.defineProperty(a,"ref",{enumerable:!1,value:null}),a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(a,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(a,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ue}),Object.defineProperty(a,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:oe}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a}function R(a,v,Y,L,ue,oe){var N=v.children;if(N!==void 0)if(L)if(P(N)){for(L=0;L<N.length;L++)O(N[L]);Object.freeze&&Object.freeze(N)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else O(N);if(y.call(v,"key")){N=e(a);var ee=Object.keys(v).filter(function(we){return we!=="key"});L=0<ee.length?"{key: someKey, "+ee.join(": ..., ")+": ...}":"{key: someKey}",Z[N+L]||(ee=0<ee.length?"{"+ee.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
2
  let props = %s;
19
3
  <%s {...props} />
20
4
  React keys must be passed directly to JSX without using spread:
21
5
  let props = %s;
22
- <%s key={someKey} {...props} />`,T,X,K,X),oe[X+T]=!0)}if(X=null,E!==void 0&&(n(E),X=""+E),d(b)&&(n(b.key),X=""+b.key),"key"in b){E={};for(var he in b)he!=="key"&&(E[he]=b[he])}else E=b;return X&&g(E,typeof r=="function"?r.displayName||r.name||"Unknown":r),s(r,X,E,c(),z,F)}function R(r){m(r)?r._store&&(r._store.validated=1):typeof r=="object"&&r!==null&&r.$$typeof===A&&(r._payload.status==="fulfilled"?m(r._payload.value)&&r._payload.value._store&&(r._payload.value._store.validated=1):r._store&&(r._store.validated=1))}function m(r){return typeof r=="object"&&r!==null&&r.$$typeof===I}var y=l,I=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),W=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),Q=Symbol.for("react.client.reference"),D=y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=Object.prototype.hasOwnProperty,U=Array.isArray,G=console.createTask?console.createTask:function(){return null};y={react_stack_bottom_frame:function(r){return r()}};var H,Z={},ie=y.react_stack_bottom_frame.bind(y,o)(),te=G(i(o)),oe={};fe.Fragment=P,fe.jsx=function(r,b,E){var T=1e4>D.recentlyCreatedOwnerStacks++;return S(r,b,E,!1,T?Error("react-stack-top-frame"):ie,T?G(i(r)):te)},fe.jsxs=function(r,b,E){var T=1e4>D.recentlyCreatedOwnerStacks++;return S(r,b,E,!0,T?Error("react-stack-top-frame"):ie,T?G(i(r)):te)}}()),fe}process.env.NODE_ENV==="production"?Se.exports=ot():Se.exports=at();var O=Se.exports;const Le=l.createContext(null),pe=e=>{throw new Error(`Unhandled sidebar side: ${e}`)},be={isOpen:!1,anchorState:"closed",meta:null},st=({children:e,sidebarWidthPx:t,transitionMs:n,edgeActivationWidthPx:i,dragActivationDeltaPx:c,showOverlay:o,isAbsolute:d,overlayBackgroundColor:g,toggleIconColor:u,toggleIconSizePx:s,toggleIconEdgeDistancePx:S,showToggle:R,mediaQueryWidth:m,swipeBarZIndex:y,toggleZIndex:I,overlayZIndex:p,fadeContent:P,fadeContentTransitionMs:L,closeSidebarOnOverlayClick:_,resetMetaOnClose:Y})=>{var nt,rt;const[W,B]=l.useState(null),[j,w]=l.useState(!1),[x,A]=l.useState(!1),[M,Q]=l.useState({}),[D,J]=l.useState({}),U=l.useRef(null),G=l.useRef(null),H=l.useRef(null),Z=l.useRef(null),[ie,te]=l.useState(null),[oe,r]=l.useState(null),[b,E]=l.useState({}),[T,z]=l.useState({}),F=l.useRef(new Map),X=l.useRef(null),K=l.useRef([]),he=((nt=b.primary)==null?void 0:nt.isOpen)??!1,Me=((rt=b.primary)==null?void 0:rt.anchorState)??"closed",et=l.useMemo(()=>Object.values(b).some(f=>f.isOpen),[b]),le=F.current.get("primary"),Qt=(le==null?void 0:le.sidebarRef)??{current:null},Jt=(le==null?void 0:le.toggleRef)??{current:null},Kt=T.primary??{},[qt,$t]=l.useState({sidebarWidthPx:t??dt,sidebarHeightPx:De,transitionMs:n??ct,edgeActivationWidthPx:i??lt,dragActivationDeltaPx:c??ut,showOverlay:o??ft,isAbsolute:d??ht,overlayBackgroundColor:g??Xe,toggleIconColor:u??mt,toggleIconSizePx:s??bt,toggleIconEdgeDistancePx:S??vt,showToggle:R??wt,mediaQueryWidth:m??Re,swipeBarZIndex:y??St,toggleZIndex:I??pt,overlayZIndex:p??yt,fadeContent:P??Tt,fadeContentTransitionMs:L??xt,swipeToOpen:Et,swipeToClose:Ot,midAnchorPoint:At,midAnchorPointPx:De/3,disabled:!1,closeSidebarOnOverlayClick:_??gt,resetMetaOnClose:Y??!1}),en=l.useCallback((f,a)=>{F.current.set(f,a),E(h=>h[f]?h:{...h,[f]:{...be}})},[]),tn=l.useCallback(f=>{F.current.delete(f),E(a=>{const h={...a};return delete h[f],h}),z(a=>{const h={...a};return delete h[f],h})},[]),nn=l.useCallback(f=>F.current.get(f),[]),rn=l.useCallback((f,a)=>{z(h=>h[f]===a?h:{...h,[f]:a})},[]),$=l.useCallback((f,a)=>{E(h=>{const v=h[f]??be;return v.isOpen===a?h:{...h,[f]:{...v,isOpen:a}}})},[]),ee=l.useCallback((f,a)=>{E(h=>{const v=h[f]??be;return v.anchorState===a?h:{...h,[f]:{...v,anchorState:a}}})},[]),me=l.useCallback((f,a)=>{E(h=>{const v=h[f]??be;return v.meta===a?h:{...h,[f]:{...v,meta:a}}})},[]);l.useEffect(()=>(j||x||et?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[j,x,et]),l.useEffect(()=>{var f;if(M.fadeContent===!1){const a=(f=U.current)==null?void 0:f.firstElementChild;a&&(a.style.opacity="1")}},[M.fadeContent]),l.useEffect(()=>{var f;if(D.fadeContent===!1){const a=(f=G.current)==null?void 0:f.firstElementChild;a&&(a.style.opacity="1")}},[D.fadeContent]),l.useEffect(()=>{var f;for(const[a,h]of Object.entries(T))if(h.fadeContent===!1){const v=F.current.get(a),C=(f=v==null?void 0:v.sidebarRef.current)==null?void 0:f.firstElementChild;C&&(C.style.opacity="1")}},[T]);const on=l.useCallback(f=>{$t(a=>({...a,...f}))},[]),ue=l.useCallback((f,a)=>{const h=f==="left"?te:r;a!=null&&a.resetMeta?h(null):(a==null?void 0:a.meta)!==void 0&&h(a.meta)},[]),ne=l.useCallback((f,a)=>{a!=null&&a.resetMeta?me(f,null):(a==null?void 0:a.meta)!==void 0&&me(f,a.meta)},[me]),an=l.useCallback((f,a)=>{if(f==="left")te(a);else if(f==="right")r(a);else{const h=a;me(h.id,h.meta)}},[me]),ae=l.useCallback(f=>{const a=K.current,h=a.indexOf(f);h!==-1&&a.splice(h,1),a.push(f),B("bottom")},[]),tt=l.useCallback(f=>{const a=K.current,h=a.indexOf(f);h!==-1&&a.splice(h,1),E(v=>(Object.entries(v).some(([k,q])=>k!==f&&q.isOpen)||B(null),v))},[]),sn=l.useCallback((f,a)=>{const h=(v,C,k,q)=>{Te({side:f,ref:v,options:C,toggleRef:k,afterApply:()=>{q(!0),B(f)}})};if(f==="left"){if(M.disabled)return;ue("left",a),h(U,M,H,w)}else if(f==="right"){if(D.disabled)return;ue("right",a),h(G,D,Z,A)}else if(f==="bottom"){const v=(a==null?void 0:a.id)??"primary",C=T[v],k=F.current.get(v);if(!C||!k||C.disabled)return;ne(v,a);const q=C.sidebarHeightPx??0,fn=C.mediaQueryWidth??640,it=window.innerWidth<fn,gn=it?C.midAnchorPointPx??0:q;it&&C.midAnchorPoint&&!C.swipeToOpen&&gn<q?je({ref:k.sidebarRef,options:C,toggleRef:k.toggleRef,afterApply:()=>{$(v,!0),ee(v,"midAnchor"),ae(v)}}):Te({side:f,ref:k.sidebarRef,options:C,toggleRef:k.toggleRef,afterApply:()=>{$(v,!0),ee(v,"open"),ae(v)}})}else pe(f)},[M,D,T,$,ee,ae,ue,ne]),cn=l.useCallback((f,a)=>{if(f!=="bottom")return;const h=(a==null?void 0:a.id)??"primary",v=T[h],C=F.current.get(h);!v||!C||v.disabled||(ne(h,a),je({ref:C.sidebarRef,options:v,toggleRef:C.toggleRef,afterApply:()=>{$(h,!0),ee(h,"midAnchor"),ae(h)}}))},[T,$,ee,ae,ne]),ln=l.useCallback((f,a)=>{if(f!=="bottom")return;const h=(a==null?void 0:a.id)??"primary",v=T[h],C=F.current.get(h);!v||!C||v.disabled||(ne(h,a),Te({side:f,ref:C.sidebarRef,options:v,toggleRef:C.toggleRef,afterApply:()=>{$(h,!0),ee(h,"open"),ae(h)}}))},[T,$,ee,ae,ne]),un=l.useCallback((f,a)=>{const h=(v,C,k,q)=>{We({ref:v,options:C,toggleRef:k,side:f,afterApply:()=>{q(!1),B(null)}})};if(f==="left"){if(M.disabled)return;const v=M.resetMetaOnClose&&(a==null?void 0:a.meta)===void 0&&(a==null?void 0:a.resetMeta)===void 0?{...a,resetMeta:!0}:a;ue("left",v),h(U,M,H,w)}else if(f==="right"){if(D.disabled)return;const v=D.resetMetaOnClose&&(a==null?void 0:a.meta)===void 0&&(a==null?void 0:a.resetMeta)===void 0?{...a,resetMeta:!0}:a;ue("right",v),h(G,D,Z,A)}else if(f==="bottom"){const v=(a==null?void 0:a.id)??"primary",C=T[v],k=F.current.get(v);if(!C||!k||C.disabled)return;const q=C.resetMetaOnClose&&(a==null?void 0:a.meta)===void 0&&(a==null?void 0:a.resetMeta)===void 0?{...a,resetMeta:!0}:a;ne(v,q),We({ref:k.sidebarRef,options:C,toggleRef:k.toggleRef,side:f,afterApply:()=>{$(v,!1),ee(v,"closed"),tt(v)}})}else pe(f)},[M,D,T,$,ee,tt,ue,ne]),dn=l.useCallback((f,a,h)=>{if(f==="left")Fe({ref:U,toggleRef:H,options:M,translateX:a});else if(f==="right")Fe({ref:G,toggleRef:Z,options:D,translateX:a});else if(f==="bottom"){const v=(h==null?void 0:h.id)??"primary",C=T[v],k=F.current.get(v);if(!C||!k)return;Wt({ref:k.sidebarRef,toggleRef:k.toggleRef,options:C,translateY:a})}else pe(f)},[M,D,T]);return O.jsx(Le.Provider,{value:{lockedSidebar:W,setLockedSidebar:B,leftSidebarRef:U,rightSidebarRef:G,isLeftOpen:j,isRightOpen:x,isBottomOpen:he,bottomAnchorState:Me,bottomSidebarRef:Qt,bottomToggleRef:Jt,bottomSidebarOptions:Kt,bottomSidebars:b,bottomSidebarOptionsMap:T,registerBottomSidebar:en,unregisterBottomSidebar:tn,getBottomSidebarRefs:nn,activeBottomDragIdRef:X,bottomFocusStackRef:K,openSidebar:sn,openSidebarFully:ln,openSidebarToMidAnchor:cn,closeSidebar:un,dragSidebar:dn,globalOptions:qt,setGlobalOptions:on,leftSidebarOptions:M,rightSidebarOptions:D,setLeftSidebarOptions:Q,setRightSidebarOptions:J,setBottomSidebarOptionsById:rn,leftToggleRef:H,rightToggleRef:Z,leftMeta:ie,rightMeta:oe,setMeta:an},children:e})};function V(){const e=l.useContext(Le);if(!e)throw new Error("useSwipeBarContext must be used within SwipeBarProvider");return e}const ct=300,lt=40,ut=20,dt=320,De=window.innerHeight,ft=!0,gt=!0,ht=!1,Xe="rgba(0, 0, 0, 0.5)",ye="rgb(36,36,36)",mt="white",bt=40,vt=40,wt=!0,Re=640,St=30,pt=15,yt=20,Ye=.6,Rt=200,xt=100,Tt=!1,Et=!0,Ot=!0,At=!1,se="cubic-bezier(0.22, 1, 0.36, 1)",Be={width:0,top:0,bottom:0,flexShrink:0,overflowX:"hidden",willChange:"transform"},Ct={transform:"translateX(-100%)"},Pt={transform:"translateX(100%)"},Mt={position:"fixed",left:0,top:0,bottom:0},It={position:"fixed",right:0,top:0,bottom:0},_t={height:0,left:0,right:0,flexShrink:0,overflowY:"hidden",willChange:"transform"},Lt={transform:"translateY(100%)"},Dt={position:"fixed",bottom:0,left:0,right:0},Xt={position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:Xe,transitionProperty:"opacity",pointerEvents:"none",opacity:0},Yt={opacity:1,pointerEvents:"auto"},ke={position:"fixed",top:"50%",transform:"translateY(-50%)",width:"1px",display:"flex",justifyContent:"center"},Bt={position:"fixed",bottom:0,left:"50%",transform:"translateX(-50%)",height:"1px",display:"flex",alignItems:"center"},kt={position:"relative",cursor:"pointer",display:"flex",height:"72px",alignItems:"center",justifyContent:"center"},xe=e=>{throw new Error(`Unhandled sidebar side: ${e}`)},ge=e=>{var t;return(t=e.current)==null?void 0:t.firstElementChild},Te=({ref:e,side:t,options:n,toggleRef:i,afterApply:c})=>{const o=ge(e),d=n.transitionMs?n.transitionMs/2:0;o&&n.fadeContent&&(o.style.opacity="0");let g,u;t==="left"||t==="right"?(g="width",u=n.sidebarWidthPx,o&&u&&(o.style.minWidth=`${u}px`)):t==="bottom"?(g="height",u=n.sidebarHeightPx,o&&u&&(o.style.minHeight=`${u}px`)):xe(t),requestAnimationFrame(()=>{if(!e.current)return;const s=`transform ${n.transitionMs}ms ${se}`,S=n.isAbsolute?"":`, ${g} ${n.transitionMs}ms ${se}`;e.current.style.transition=`${s}${S}`,o&&n.fadeContent&&(o.style.transition=`opacity ${n.fadeContentTransitionMs}ms ease`),requestAnimationFrame(()=>{if(e.current){if(e.current.style.transform=t==="bottom"?"translateY(0px)":"translateX(0px)",!n.isAbsolute)e.current.style[g]=`${u}px`;else if(e.current.style[g]!==`${u}px`){const R=e.current.style.transition;e.current.style.transition=s,e.current.style[g]=`${u}px`,e.current.style.transition=R}i.current&&u&&(i.current.style.opacity="1",t==="left"?i.current.style.transform=`translateY(-50%) translateX(${u}px)`:t==="right"?i.current.style.transform=`translateY(-50%) translateX(-${u}px)`:t==="bottom"&&(i.current.style.transform=`translateX(-50%) translateY(-${u}px)`)),o&&n.fadeContent&&setTimeout(()=>{o.style.opacity="1"},d),c()}})}),setTimeout(()=>{},0)},We=({ref:e,options:t,side:n,toggleRef:i,afterApply:c})=>{const o=ge(e);let d;n==="left"||n==="right"?(d="width",o&&t.sidebarWidthPx&&(o.style.minWidth=`${t.sidebarWidthPx}px`)):n==="bottom"?(d="height",o&&t.sidebarHeightPx&&(o.style.minHeight=`${t.sidebarHeightPx}px`)):xe(n),requestAnimationFrame(()=>{if(!e.current)return;const g=`transform ${t.transitionMs}ms ${se}`,u=t.isAbsolute?"":`, ${d} ${t.transitionMs}ms ${se}`;e.current.style.transition=`${g}${u}`,o&&t.fadeContent&&(o.style.transition=`opacity ${t.fadeContentTransitionMs}ms ease`),requestAnimationFrame(()=>{e.current&&(n==="left"?(e.current.style.transform="translateX(-100%)",t.isAbsolute||(e.current.style.width="0px")):n==="right"?(e.current.style.transform="translateX(100%)",t.isAbsolute||(e.current.style.width="0px")):n==="bottom"&&(e.current.style.transform="translateY(100%)",t.isAbsolute||(e.current.style.height="0px")),i.current&&(i.current.style.opacity="1",n==="left"||n==="right"?i.current.style.transform="translateY(-50%)":n==="bottom"&&(i.current.style.transform="translateX(-50%)")),o&&t.fadeContent&&(o.style.opacity="0"),c())})})},je=({ref:e,options:t,toggleRef:n,afterApply:i})=>{const c=ge(e),o=t.transitionMs?t.transitionMs/2:0;c&&t.fadeContent&&(c.style.opacity="0"),c&&t.midAnchorPointPx&&(c.style.minHeight=`${t.sidebarHeightPx}px`),requestAnimationFrame(()=>{if(!e.current)return;const d=`transform ${t.transitionMs}ms ${se}`,g=t.isAbsolute?"":`, height ${t.transitionMs}ms ${se}`;e.current.style.transition=`${d}${g}`,c&&t.fadeContent&&(c.style.transition=`opacity ${t.fadeContentTransitionMs}ms ease`),requestAnimationFrame(()=>{if(!e.current)return;const u=t.midAnchorPointPx??0,s=t.sidebarHeightPx??0,S=s-u;if(e.current.style.transform=`translateY(${S}px)`,!t.isAbsolute)e.current.style.height=`${s}px`;else if(e.current.style.height!==`${s}px`){const R=e.current.style.transition;e.current.style.transition=d,e.current.style.height=`${s}px`,e.current.style.transition=R}n.current&&(n.current.style.opacity="1",n.current.style.transform=`translateX(-50%) translateY(-${u}px)`),c&&t.fadeContent&&setTimeout(()=>{c.style.opacity="1"},o),i()})}),setTimeout(()=>{},0)},Fe=({ref:e,toggleRef:t,options:n,translateX:i})=>{!e.current||i===null||(e.current.style.transition="none",requestAnimationFrame(()=>{const c=ge(e);if(e.current){if(c&&n.fadeContent&&(c.style.opacity="0"),c&&n.sidebarWidthPx&&(c.style.minWidth=`${n.sidebarWidthPx}px`),!n.isAbsolute){const o=`${n.sidebarWidthPx}px`;e.current.style.width!==o&&(e.current.style.width=o)}e.current.style.transform=`translateX(${i}px)`,t.current&&(t.current.style.opacity="0",t.current.style.transform=`translateY(-50%) translateX(${i}px)`)}}))},Wt=({ref:e,toggleRef:t,options:n,translateY:i})=>{!e.current||i===null||(e.current.style.transition="none",requestAnimationFrame(()=>{const c=ge(e);if(e.current){if(c&&n.fadeContent&&(c.style.opacity="0"),c&&n.sidebarHeightPx&&(c.style.minHeight=`${n.sidebarHeightPx}px`),!n.isAbsolute){const o=`${n.sidebarHeightPx}px`;e.current.style.height!==o&&(e.current.style.height=o)}e.current.style.transform=`translateY(${i}px)`,t.current&&(t.current.style.opacity="0",t.current.style.transform=`translateX(-50%) translateY(${i}px)`)}}))},ve=({refs:e,clientX:t,clientY:n,touchId:i,isMouse:c})=>{e.draggingRef.current={startX:t,startY:n,activeTouchId:i,isMouse:c,isActivated:!1},e.currentXRef.current=t,e.prevXRef.current=t},Ne=({refs:e,clientX:t,clientY:n,touchId:i,isMouse:c})=>{e.draggingRef.current={startX:t,startY:n,activeTouchId:i,isMouse:c,isActivated:!1},e.currentYRef.current=n,e.prevYRef.current=n},He=({refs:e,dragSidebar:t,onDeactivate:n})=>{e.draggingRef.current=null,e.currentXRef.current=null,e.prevXRef.current=null,t(null),n()},jt=({refs:e,dragSidebar:t,onDeactivate:n})=>{e.draggingRef.current=null,e.currentYRef.current=null,e.prevYRef.current=null,t(null)},ce=e=>e instanceof Element?!!e.closest("input, textarea, [contenteditable='true']"):!1;function Ge(e){let t=e instanceof HTMLElement?e:null;for(;t;){const n=getComputedStyle(t);if((n.overflowY==="auto"||n.overflowY==="scroll")&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return null}const Ee=(e,t)=>{for(let n=0;n<e.length;n++){const i=e[n];if(t==null||i.identifier===t)return i}return null},Oe=(e,t)=>{for(let n=0;n<e.length;n++)if(e[n].identifier===t)return!0;return!1},Ae=(e,t,n)=>{const{globalOptions:i,setLeftSidebarOptions:c,setRightSidebarOptions:o,setBottomSidebarOptionsById:d}=V(),{sidebarWidthPx:g,sidebarHeightPx:u,transitionMs:s,edgeActivationWidthPx:S,dragActivationDeltaPx:R,showOverlay:m,isAbsolute:y,overlayBackgroundColor:I,toggleIconColor:p,toggleIconSizePx:P,toggleIconEdgeDistancePx:L,showToggle:_,mediaQueryWidth:Y,swipeBarZIndex:W,toggleZIndex:B,overlayZIndex:j,fadeContent:w,fadeContentTransitionMs:x,swipeToOpen:A,swipeToClose:M,midAnchorPoint:Q,midAnchorPointPx:D,disabled:J,closeSidebarOnOverlayClick:U,resetMetaOnClose:G}=t,H=l.useMemo(()=>{const Z=u??i.sidebarHeightPx;return{sidebarWidthPx:g??i.sidebarWidthPx,sidebarHeightPx:Z,transitionMs:s??i.transitionMs,edgeActivationWidthPx:S??i.edgeActivationWidthPx,dragActivationDeltaPx:R??i.dragActivationDeltaPx,showOverlay:m??i.showOverlay,isAbsolute:y??i.isAbsolute,overlayBackgroundColor:I??i.overlayBackgroundColor,toggleIconColor:p??i.toggleIconColor,toggleIconSizePx:P??i.toggleIconSizePx,toggleIconEdgeDistancePx:L??i.toggleIconEdgeDistancePx,showToggle:_??i.showToggle,mediaQueryWidth:Y??i.mediaQueryWidth,swipeBarZIndex:W??i.swipeBarZIndex,toggleZIndex:B??i.toggleZIndex,overlayZIndex:j??i.overlayZIndex,fadeContent:w??i.fadeContent,fadeContentTransitionMs:x??i.fadeContentTransitionMs,swipeToOpen:A??i.swipeToOpen,swipeToClose:M??i.swipeToClose,midAnchorPoint:Q??i.midAnchorPoint,midAnchorPointPx:D??i.midAnchorPointPx??Math.floor(Z/3),disabled:J??i.disabled,closeSidebarOnOverlayClick:U??i.closeSidebarOnOverlayClick,resetMetaOnClose:G??i.resetMetaOnClose}},[g,u,s,S,R,m,y,I,p,P,L,_,i,Y,W,B,j,w,x,A,M,Q,D,J,U,G]);return l.useEffect(()=>{e==="left"?c(H):e==="right"?o(H):e==="bottom"?d(n??"primary",H):xe(e)},[e,n,H,c,o,d]),H};function we({isCollapsed:e,setCollapsed:t,closeSidebarOnClick:n=!0,transitionMs:i,overlayBackgroundColor:c,overlayZIndex:o}){return O.jsx("div",{"aria-hidden":"true",style:{transitionDuration:`${i}ms`,...Xt,...e?{}:Yt,...c?{backgroundColor:c}:{},zIndex:o},onMouseDown:d=>{n&&(d.stopPropagation(),t())}})}function Ce({size:e,color:t}){const n=l.useRef(null);return l.useEffect(()=>{const i=()=>{n.current&&(n.current.style.opacity="1")},c=()=>{n.current&&(n.current.style.opacity=`${Ye}`)};n.current&&(n.current.addEventListener("mouseenter",i),n.current.addEventListener("mouseleave",c))},[]),O.jsx("div",{style:{...kt},children:O.jsxs("svg",{style:{transition:`opacity ${Rt}ms ease`,opacity:`${Ye}`},ref:n,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:e,children:[O.jsx("g",{strokeWidth:"0"}),O.jsx("g",{strokeLinecap:"round",strokeLinejoin:"round",children:O.jsx("g",{children:O.jsx("path",{clipRule:"evenodd",d:"m9.46967 5.46967c.29289-.29289.76773-.29289 1.06063 0l2.6286 2.62858c.5748.57477 1.0384 1.03835 1.3831 1.44443.355.41812.6278.82432.7818 1.29852.2447.7531.2447 1.5645 0 2.3176-.154.4742-.4268.8804-.7818 1.2985-.3447.4061-.8083.8697-1.3831 1.4444l-2.6286 2.6286c-.2929.2929-.76774.2929-1.06063 0s-.29289-.7677 0-1.0606l2.60593-2.6059c.6027-.6028 1.0225-1.0234 1.3229-1.3773.2947-.3471.4302-.5804.4987-.7912.1469-.4519.1469-.9387 0-1.3906-.0685-.2108-.204-.4441-.4987-.7912-.3004-.3539-.7202-.77451-1.3229-1.37728l-2.60593-2.60589c-.29289-.29289-.29289-.76777 0-1.06066z",fill:t,fillRule:"evenodd"})})})]})})}function Ue({id:e,toggleRef:t,options:n,showToggle:i=!0,ToggleComponent:c}){var s;const{openSidebar:o,closeSidebar:d,bottomSidebars:g}=V(),u=((s=g[e])==null?void 0:s.isOpen)??!1;return i?O.jsx("div",{ref:t,style:{...Bt,transition:`transform ${n.transitionMs}ms ease, opacity ${n.transitionMs}ms ease`,zIndex:n.toggleZIndex},children:(!u||u&&!n.showOverlay)&&O.jsx("button",{type:"button","aria-expanded":u,"aria-controls":`swipebar-bottom-${e}`,"aria-label":u?"Close bottom sidebar":"Open bottom sidebar",onClick:()=>{n.disabled||(u?d("bottom",{id:e}):o("bottom",{id:e}))},disabled:n.disabled,style:{marginBottom:`${n.toggleIconEdgeDistancePx}px`,transform:u?"rotate(90deg)":"rotate(-90deg)"},children:c??O.jsx(Ce,{size:n.toggleIconSizePx,color:n.toggleIconColor})})}):null}const Ft='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function Nt(e){return Array.from(e.querySelectorAll(Ft)).filter(t=>!t.closest("[inert]"))}function Pe({sidebarRef:e,triggerRef:t,isOpen:n,onClose:i,transitionMs:c}){const o=l.useRef(null);l.useEffect(()=>{var g;if(n){o.current=document.activeElement;const u=setTimeout(()=>{e.current&&(e.current.setAttribute("tabindex","-1"),e.current.focus())},c);return()=>clearTimeout(u)}const d=o.current;if(d){const u=((g=t.current)==null?void 0:g.querySelector("button"))??d;requestAnimationFrame(()=>{u.focus()}),o.current=null}},[n,e,t,c]),l.useEffect(()=>{if(!n)return;function d(g){if(g.key==="Escape"){if(!e.current)return;e.current.contains(document.activeElement)&&(g.preventDefault(),i());return}if(g.key!=="Tab"||!e.current)return;const u=Nt(e.current);if(u.length===0)return;const s=u[0],S=u[u.length-1];g.shiftKey?document.activeElement===s&&(g.preventDefault(),S.focus()):document.activeElement===S&&(g.preventDefault(),s.focus())}return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[n,e,i])}function re(e=Re){const t=`(max-width: ${Math.min(e,Re)}px)`,n=()=>typeof window>"u"||typeof window.matchMedia>"u"?!1:window.matchMedia(t).matches,[i,c]=l.useState(n);return l.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia>"u")return;const o=window.matchMedia(t),d=()=>c(o.matches);return d(),o.addEventListener("change",d),()=>o.removeEventListener("change",d)},[t]),i}const Ze=({refs:e,callbacks:t,currentY:n,preventDefault:i,lockPane:c,options:o,scrollableAncestor:d,initialScrollTop:g})=>{if(!e.draggingRef.current)return;const u=n-e.draggingRef.current.startY;if(!e.draggingRef.current.isActivated&&Math.abs(u)>=o.dragActivationDeltaPx){if(d&&t.getIsOpen()){if(d.scrollTop!==g){e.draggingRef.current=null,t.dragSidebar(null);return}const{scrollTop:p,scrollHeight:P,clientHeight:L}=d,_=p>1,Y=p+L<P-1;if(u>0&&_||u<0&&Y){e.draggingRef.current=null,t.dragSidebar(null);return}}e.draggingRef.current.isActivated=!0,c()}if(!e.draggingRef.current.isActivated)return;e.prevYRef.current=e.currentYRef.current,e.currentYRef.current=n;const s=t.getIsOpen(),S=window.innerHeight;let R=!1;if((s||e.draggingRef.current.startY>=S-o.edgeActivationWidthPx)&&(R=!0),!R){e.draggingRef.current=null,t.dragSidebar(null);return}i();const m=o.sidebarHeightPx,y=o.midAnchorPointPx,I=o.midAnchorPoint&&!o.swipeToOpen&&y<m;if(s)if(I){const p=t.getBottomAnchorState();if(p==="open"){const P=Math.max(0,Math.min(m,u-o.dragActivationDeltaPx));t.dragSidebar(P)}else if(p==="midAnchor"){const P=m-y,L=Math.max(0,Math.min(m,P+u-o.dragActivationDeltaPx));t.dragSidebar(L)}}else{const p=Math.max(0,Math.min(m,u-o.dragActivationDeltaPx));t.dragSidebar(p)}else if(e.draggingRef.current.startY>=S-o.edgeActivationWidthPx)if(I){const p=m-y,P=Math.max(p,Math.min(m,m+u+o.dragActivationDeltaPx));t.dragSidebar(P)}else{const p=Math.max(0,Math.min(m,m+u+o.dragActivationDeltaPx));t.dragSidebar(p)}},ze=({refs:e,callbacks:t,options:n,onDragEnd:i})=>{if(!e.draggingRef.current)return;if(!e.draggingRef.current.isActivated){e.draggingRef.current=null,e.currentYRef.current=null,e.prevYRef.current=null;return}const c=e.currentYRef.current??e.draggingRef.current.startY,o=e.prevYRef.current??e.draggingRef.current.startY,d=e.draggingRef.current.startY,g=t.getIsOpen(),u=window.innerHeight;e.draggingRef.current=null,e.currentYRef.current=null,e.prevYRef.current=null,i();const s=c<o,S=c>=o,R=d>=u-n.edgeActivationWidthPx,m=n.midAnchorPointPx,y=n.sidebarHeightPx,I=n.midAnchorPoint&&!n.swipeToOpen&&m<y;if(g)if(I){const p=t.getBottomAnchorState(),P=y-m;if(p==="open"){const L=Math.max(0,c-d);S?L>P?t.closeSidebar():t.openToMidAnchor():L<P?t.openSidebarFully():t.closeSidebar(),t.dragSidebar(null)}else if(p==="midAnchor"){const L=y-m,_=Math.max(0,Math.min(y,L+(c-d)));s?_<P?t.openSidebarFully():t.openToMidAnchor():t.closeSidebar(),t.dragSidebar(null)}}else S?t.closeSidebar():t.openSidebar(),t.dragSidebar(null);else R&&s?(I?t.openToMidAnchor():t.openSidebar(),t.dragSidebar(null)):(t.closeSidebar(),t.dragSidebar(null))};function Ht(e,t){var j,w;const n=re(e.mediaQueryWidth),{lockedSidebar:i,setLockedSidebar:c,bottomSidebars:o,openSidebar:d,openSidebarFully:g,closeSidebar:u,dragSidebar:s,openSidebarToMidAnchor:S,activeBottomDragIdRef:R,bottomFocusStackRef:m}=V(),y=((j=o[t])==null?void 0:j.isOpen)??!1,I=((w=o[t])==null?void 0:w.anchorState)??"closed",p=l.useRef(null),P=l.useRef(null),L=l.useRef(null),_=l.useRef(null),Y=l.useRef(0),W=l.useRef(null),B=l.useRef(I);l.useEffect(()=>{B.current=I},[I]),l.useEffect(()=>{if(!n||i&&i!=="bottom"||e.disabled)return;const x={getIsOpen:()=>y,openSidebar:()=>d("bottom",{id:t}),openSidebarFully:()=>g("bottom",{id:t}),closeSidebar:()=>u("bottom",{id:t}),dragSidebar:r=>s("bottom",r,{id:t}),getBottomAnchorState:()=>B.current,openToMidAnchor:()=>S("bottom",{id:t})},A={draggingRef:p,currentYRef:P,prevYRef:L},M=()=>R.current!==null&&R.current!==t,Q=()=>{const r=m.current;return r.length===0?!0:r[r.length-1]===t},D=()=>{if(M()){p.current=null;return}R.current=t,c("bottom");const r=_.current;r&&(W.current=r.style.overflowY,r.style.overflowY="hidden")},J=()=>{R.current===t&&(R.current=null);const r=_.current;r&&W.current!==null&&(r.style.overflowY=W.current,W.current=null)};function U(r){var F;if(i&&i!=="bottom"||M()||!Q()||ce(r.target)||r.changedTouches.length===0)return;const b=r.changedTouches[0],E=window.innerHeight,T=x.getIsOpen(),z=b.clientY>=E-e.edgeActivationWidthPx;T&&!e.swipeToClose||!T&&!e.swipeToOpen||(T||z)&&(_.current=Ge(r.target),Y.current=((F=_.current)==null?void 0:F.scrollTop)??0,Ne({refs:A,clientX:b.clientX,clientY:b.clientY,touchId:b.identifier,isMouse:!1}))}function G(r){if(i&&i!=="bottom")return;if(M()){p.current=null;return}if(!p.current||p.current.isMouse)return;const b=p.current.activeTouchId,E=Ee(r.changedTouches,b);E&&Ze({refs:A,callbacks:x,currentY:E.clientY,preventDefault:()=>r.preventDefault(),lockPane:D,options:e,scrollableAncestor:_.current,initialScrollTop:Y.current})}function H(r){if(i&&i!=="bottom"||!p.current||p.current.isMouse)return;const b=p.current.activeTouchId;Oe(r.changedTouches,b)&&ze({refs:A,callbacks:x,options:e,onDragEnd:J})}function Z(){i&&i!=="bottom"||!p.current||p.current.isMouse||(J(),jt({refs:A,dragSidebar:x.dragSidebar,onDeactivate:()=>{}}))}function ie(r){var z;if(i&&i!=="bottom"||M()||!Q()||ce(r.target)||r.button!==0)return;const b=window.innerHeight,E=x.getIsOpen(),T=r.clientY>=b-e.edgeActivationWidthPx;E&&!e.swipeToClose||!E&&!e.swipeToOpen||(E||T)&&(_.current=Ge(r.target),Y.current=((z=_.current)==null?void 0:z.scrollTop)??0,Ne({refs:A,clientX:r.clientX,clientY:r.clientY,touchId:null,isMouse:!0}))}function te(r){if(!(i&&i!=="bottom")){if(M()){p.current=null;return}!p.current||!p.current.isMouse||Ze({refs:A,callbacks:x,currentY:r.clientY,preventDefault:()=>r.preventDefault(),lockPane:D,options:e,scrollableAncestor:_.current,initialScrollTop:Y.current})}}function oe(){i&&i!=="bottom"||!p.current||!p.current.isMouse||ze({refs:A,callbacks:x,options:e,onDragEnd:J})}return window.addEventListener("touchstart",U,{passive:!0}),window.addEventListener("touchmove",G,{passive:!1}),window.addEventListener("touchend",H,{passive:!0}),window.addEventListener("touchcancel",Z,{passive:!0}),window.addEventListener("mousedown",ie,{passive:!0}),window.addEventListener("mousemove",te,{passive:!1}),window.addEventListener("mouseup",oe,{passive:!0}),()=>{window.removeEventListener("touchstart",U),window.removeEventListener("touchmove",G),window.removeEventListener("touchend",H),window.removeEventListener("touchcancel",Z),window.removeEventListener("mousedown",ie),window.removeEventListener("mousemove",te),window.removeEventListener("mouseup",oe)}},[t,n,y,d,g,u,s,i,c,e,S,R,m])}function Gt({id:e="primary",className:t,children:n,ToggleComponent:i,ariaLabel:c,...o}){var P;if((n==null?void 0:n.type)===O.Fragment)throw new Error("Fragments is not allowed in SwipeBarBottom");const{bottomSidebars:d,closeSidebar:g,registerBottomSidebar:u,unregisterBottomSidebar:s}=V(),S=l.useRef(null),R=l.useRef(null);l.useEffect(()=>(u(e,{sidebarRef:S,toggleRef:R}),()=>s(e)),[e,u,s]);const m=Ae("bottom",o,e),y=re(m.mediaQueryWidth);Ht(m,e);const I=((P=d[e])==null?void 0:P.isOpen)??!1,p=l.useCallback(()=>g("bottom",{id:e}),[g,e]);return Pe({sidebarRef:S,triggerRef:R,isOpen:I,onClose:p,transitionMs:m.transitionMs}),O.jsxs(O.Fragment,{children:[m.showOverlay&&O.jsx(we,{isCollapsed:!I,setCollapsed:()=>g("bottom",{id:e}),closeSidebarOnClick:m.closeSidebarOnOverlayClick,transitionMs:m.transitionMs,overlayBackgroundColor:m.overlayBackgroundColor,overlayZIndex:m.overlayZIndex}),O.jsx(Ue,{id:e,toggleRef:R,options:m,showToggle:m.showToggle,ToggleComponent:i}),O.jsx("div",{ref:S,id:`swipebar-bottom-${e}`,role:"dialog","aria-modal":I,"aria-label":c??"Bottom sidebar",inert:!I,style:{..._t,...Lt,...m.isAbsolute||y?Dt:{},...t?{}:{backgroundColor:ye},zIndex:m.swipeBarZIndex},className:t,children:n})]})}function Ve({options:e,showToggle:t=!0,ToggleComponent:n}){const{openSidebar:i,leftToggleRef:c,isLeftOpen:o,closeSidebar:d}=V();return t?O.jsx("div",{ref:c,style:{...ke,transition:`transform ${e.transitionMs}ms ease, opacity ${e.transitionMs}ms ease`,left:0,zIndex:e.toggleZIndex},children:(!o||o&&!e.showOverlay)&&O.jsx("button",{type:"button","aria-expanded":o,"aria-controls":"swipebar-left","aria-label":o?"Close left sidebar":"Open left sidebar",onClick:()=>{e.disabled||(o?d("left"):i("left"))},disabled:e.disabled,style:{marginLeft:`${e.toggleIconEdgeDistancePx}px`,...o?{transform:"rotate(180deg)"}:{}},children:n??O.jsx(Ce,{size:e.toggleIconSizePx,color:e.toggleIconColor})})}):null}const Qe=({refs:e,callbacks:t,currentX:n,preventDefault:i,lockPane:c,options:o})=>{if(!e.draggingRef.current)return;const d=n-e.draggingRef.current.startX;if(!e.draggingRef.current.isActivated&&Math.abs(d)>=o.dragActivationDeltaPx&&(e.draggingRef.current.isActivated=!0,c()),!e.draggingRef.current.isActivated)return;e.prevXRef.current=e.currentXRef.current,e.currentXRef.current=n;const g=t.getIsOpen();let u=!1;if((g||e.draggingRef.current.startX<=o.edgeActivationWidthPx)&&(u=!0),!u){e.draggingRef.current=null,t.dragSidebar(null);return}i();const s=o.sidebarWidthPx;if(g){const S=Math.min(0,Math.max(-s,d+o.dragActivationDeltaPx));t.dragSidebar(S)}else if(e.draggingRef.current.startX<=o.edgeActivationWidthPx){const S=Math.min(0,Math.max(-s,-s+d-o.dragActivationDeltaPx));t.dragSidebar(S)}},Je=({refs:e,callbacks:t,options:n})=>{if(!e.draggingRef.current)return;if(!e.draggingRef.current.isActivated){e.draggingRef.current=null,e.currentXRef.current=null,e.prevXRef.current=null;return}const i=e.currentXRef.current??e.draggingRef.current.startX,c=e.prevXRef.current??e.draggingRef.current.startX,o=e.draggingRef.current.startX,d=t.getIsOpen();e.draggingRef.current=null,e.currentXRef.current=null,e.prevXRef.current=null;const g=i>=c,u=i<c,s=o<=n.edgeActivationWidthPx;d?(u?t.closeSidebar():t.openSidebar(),t.dragSidebar(null)):s&&g?(t.openSidebar(),t.dragSidebar(null)):(t.closeSidebar(),t.dragSidebar(null))};function Ut(e){const t=re(e.mediaQueryWidth),{lockedSidebar:n,setLockedSidebar:i,isLeftOpen:c,openSidebar:o,closeSidebar:d,dragSidebar:g,leftSidebarRef:u}=V(),s=l.useRef(null),S=l.useRef(null),R=l.useRef(null);l.useEffect(()=>{if(!t||n&&n!=="left"||e.disabled)return;const m={getIsOpen:()=>c,openSidebar:()=>o("left"),closeSidebar:()=>d("left"),dragSidebar:w=>g("left",w)},y={draggingRef:s,currentXRef:S,prevXRef:R},I=()=>i("left"),p=()=>i(null);function P(w){if(n&&n!=="left"||ce(w.target)||w.changedTouches.length===0)return;const x=w.changedTouches[0],A=m.getIsOpen(),M=x.clientX<=e.edgeActivationWidthPx;A&&!e.swipeToClose||!A&&!e.swipeToOpen||(A||M)&&ve({refs:y,clientX:x.clientX,clientY:x.clientY,touchId:x.identifier,isMouse:!1})}function L(w){if(n&&n!=="left"||!s.current||s.current.isMouse)return;const x=s.current.activeTouchId,A=Ee(w.changedTouches,x);A&&Qe({refs:y,callbacks:m,currentX:A.clientX,preventDefault:()=>w.preventDefault(),lockPane:I,options:e})}function _(w){if(n&&n!=="left"||!s.current||s.current.isMouse)return;const x=s.current.activeTouchId;Oe(w.changedTouches,x)&&Je({refs:y,callbacks:m,options:e})}function Y(){n&&n!=="left"||!s.current||s.current.isMouse||He({refs:y,dragSidebar:m.dragSidebar,onDeactivate:p})}function W(w){if(n&&n!=="left"||ce(w.target)||w.button!==0)return;const x=m.getIsOpen(),A=w.clientX<=e.edgeActivationWidthPx;x&&!e.swipeToClose||!x&&!e.swipeToOpen||(x||A)&&ve({refs:y,clientX:w.clientX,clientY:w.clientY,touchId:null,isMouse:!0})}function B(w){n&&n!=="left"||!s.current||!s.current.isMouse||Qe({refs:y,callbacks:m,currentX:w.clientX,preventDefault:()=>w.preventDefault(),lockPane:I,options:e})}function j(){n&&n!=="left"||!s.current||!s.current.isMouse||Je({refs:y,callbacks:m,options:e})}return window.addEventListener("touchstart",P,{passive:!0}),window.addEventListener("touchmove",L,{passive:!1}),window.addEventListener("touchend",_,{passive:!0}),window.addEventListener("touchcancel",Y,{passive:!0}),window.addEventListener("mousedown",W,{passive:!0}),window.addEventListener("mousemove",B,{passive:!1}),window.addEventListener("mouseup",j,{passive:!0}),()=>{window.removeEventListener("touchstart",P),window.removeEventListener("touchmove",L),window.removeEventListener("touchend",_),window.removeEventListener("touchcancel",Y),window.removeEventListener("mousedown",W),window.removeEventListener("mousemove",B),window.removeEventListener("mouseup",j)}},[t,c,o,d,g,n,i,u,e])}function Zt({className:e,children:t,ToggleComponent:n,ariaLabel:i,...c}){if((t==null?void 0:t.type)===O.Fragment)throw new Error("Fragments is not allowed in SwipeBarLeft");const{isLeftOpen:o,closeSidebar:d,leftSidebarRef:g,leftToggleRef:u}=V(),s=Ae("left",c),S=re(s.mediaQueryWidth);Ut(s);const R=l.useCallback(()=>d("left"),[d]);return Pe({sidebarRef:g,triggerRef:u,isOpen:o,onClose:R,transitionMs:s.transitionMs}),O.jsxs(O.Fragment,{children:[s.showOverlay&&O.jsx(we,{isCollapsed:!o,setCollapsed:()=>d("left"),closeSidebarOnClick:s.closeSidebarOnOverlayClick,transitionMs:s.transitionMs,overlayBackgroundColor:s.overlayBackgroundColor,overlayZIndex:s.overlayZIndex}),O.jsx(Ve,{options:s,showToggle:s.showToggle,ToggleComponent:n}),O.jsx("div",{ref:g,id:"swipebar-left",role:"dialog","aria-modal":o,"aria-label":i??"Left sidebar",inert:!o,style:{...Be,...Ct,...s.isAbsolute||S?Mt:{},...e?{}:{backgroundColor:ye},zIndex:s.swipeBarZIndex},className:e,children:t})]})}function Ke({options:e,showToggle:t=!0,ToggleComponent:n}){const{openSidebar:i,rightToggleRef:c,isRightOpen:o,closeSidebar:d}=V();return t?O.jsx("div",{ref:c,style:{...ke,transition:`transform ${e.transitionMs}ms ease, opacity ${e.transitionMs}ms ease`,right:0,zIndex:e.toggleZIndex},children:(!o||o&&!e.showOverlay)&&O.jsx("button",{type:"button","aria-expanded":o,"aria-controls":"swipebar-right","aria-label":o?"Close right sidebar":"Open right sidebar",onClick:()=>{e.disabled||(o?d("right"):i("right"))},disabled:e.disabled,style:{marginRight:`${e.toggleIconEdgeDistancePx}px`,...o?{}:{transform:"rotate(180deg)"}},children:n??O.jsx(Ce,{size:e.toggleIconSizePx,color:e.toggleIconColor})})}):null}const qe=({refs:e,callbacks:t,currentX:n,preventDefault:i,lockPane:c,options:o})=>{if(!e.draggingRef.current)return;const d=window.innerWidth,g=n-e.draggingRef.current.startX,u=e.draggingRef.current.startX>=d-o.edgeActivationWidthPx,s=e.draggingRef.current.isActivated;if(!s&&Math.abs(g)>=o.dragActivationDeltaPx&&(e.draggingRef.current.isActivated=!0,c()),!s)return;e.prevXRef.current=e.currentXRef.current,e.currentXRef.current=n;const S=t.getIsOpen();let R=!1;if((S||u)&&(R=!0),!R){e.draggingRef.current=null,t.dragSidebar(null);return}i();const m=o.sidebarWidthPx;if(S){const y=Math.max(0,Math.min(m,g-o.dragActivationDeltaPx));t.dragSidebar(y)}else{const y=Math.max(0,Math.min(m,m+g+o.dragActivationDeltaPx));t.dragSidebar(y)}},$e=({refs:e,callbacks:t,options:n})=>{if(!e.draggingRef.current)return;if(!e.draggingRef.current.isActivated){e.draggingRef.current=null,e.currentXRef.current=null,e.prevXRef.current=null;return}const i=e.currentXRef.current??e.draggingRef.current.startX,c=e.prevXRef.current??e.draggingRef.current.startX,o=e.draggingRef.current.startX,d=t.getIsOpen(),g=window.innerWidth;e.draggingRef.current=null,e.currentXRef.current=null,e.prevXRef.current=null;const u=i>c,s=i<c,S=o>=g-n.edgeActivationWidthPx;d?(u?t.closeSidebar():t.openSidebar(),t.dragSidebar(null)):S&&s?(t.openSidebar(),t.dragSidebar(null)):(t.closeSidebar(),t.dragSidebar(null))};function zt(e){const t=re(e.mediaQueryWidth),{lockedSidebar:n,setLockedSidebar:i,isRightOpen:c,openSidebar:o,closeSidebar:d,dragSidebar:g,rightSidebarRef:u}=V(),s=l.useRef(null),S=l.useRef(null),R=l.useRef(null);l.useEffect(()=>{if(!t||n&&n!=="right"||e.disabled)return;const m={getIsOpen:()=>c,openSidebar:()=>o("right"),closeSidebar:()=>d("right"),dragSidebar:w=>g("right",w)},y={draggingRef:s,currentXRef:S,prevXRef:R},I=()=>i("right"),p=()=>i(null);function P(w){if(n&&n!=="right"||ce(w.target)||w.changedTouches.length===0)return;const x=w.changedTouches[0],A=window.innerWidth,M=m.getIsOpen(),Q=x.clientX>=A-e.edgeActivationWidthPx;M&&!e.swipeToClose||!M&&!e.swipeToOpen||(M||Q)&&ve({refs:y,clientX:x.clientX,clientY:x.clientY,touchId:x.identifier,isMouse:!1})}function L(w){if(n&&n!=="right"||!s.current||s.current.isMouse)return;const x=s.current.activeTouchId,A=Ee(w.changedTouches,x);A&&qe({refs:y,callbacks:m,currentX:A.clientX,preventDefault:()=>w.preventDefault(),lockPane:I,options:e})}function _(w){if(n&&n!=="right"||!s.current||s.current.isMouse)return;const x=s.current.activeTouchId;Oe(w.changedTouches,x)&&$e({refs:y,callbacks:m,options:e})}function Y(){n&&n!=="right"||!s.current||s.current.isMouse||He({refs:y,dragSidebar:m.dragSidebar,onDeactivate:p})}function W(w){if(n&&n!=="right"||ce(w.target)||w.button!==0)return;const x=window.innerWidth,A=m.getIsOpen(),M=w.clientX>=x-e.edgeActivationWidthPx;A&&!e.swipeToClose||!A&&!e.swipeToOpen||(A||M)&&ve({refs:y,clientX:w.clientX,clientY:w.clientY,touchId:null,isMouse:!0})}function B(w){n&&n!=="right"||!s.current||!s.current.isMouse||qe({refs:y,callbacks:m,currentX:w.clientX,preventDefault:()=>w.preventDefault(),lockPane:I,options:e})}function j(){n&&n!=="right"||!s.current||!s.current.isMouse||$e({refs:y,callbacks:m,options:e})}return window.addEventListener("touchstart",P,{passive:!0}),window.addEventListener("touchmove",L,{passive:!1}),window.addEventListener("touchend",_,{passive:!0}),window.addEventListener("touchcancel",Y,{passive:!0}),window.addEventListener("mousedown",W,{passive:!0}),window.addEventListener("mousemove",B,{passive:!1}),window.addEventListener("mouseup",j,{passive:!0}),()=>{window.removeEventListener("touchstart",P),window.removeEventListener("touchmove",L),window.removeEventListener("touchend",_),window.removeEventListener("touchcancel",Y),window.removeEventListener("mousedown",W),window.removeEventListener("mousemove",B),window.removeEventListener("mouseup",j)}},[t,c,o,d,g,n,i,u,e])}function Vt({className:e,children:t,ToggleComponent:n,ariaLabel:i,...c}){if((t==null?void 0:t.type)===O.Fragment)throw new Error("Fragments is not allowed in SwipeBarRight");const{isRightOpen:o,closeSidebar:d,rightSidebarRef:g,rightToggleRef:u}=V(),s=Ae("right",c),S=re(s.mediaQueryWidth);zt(s);const R=l.useCallback(()=>d("right"),[d]);return Pe({sidebarRef:g,triggerRef:u,isOpen:o,onClose:R,transitionMs:s.transitionMs}),O.jsxs(O.Fragment,{children:[s.showOverlay&&O.jsx(we,{isCollapsed:!o,setCollapsed:()=>d("right"),closeSidebarOnClick:s.closeSidebarOnOverlayClick,transitionMs:s.transitionMs,overlayBackgroundColor:s.overlayBackgroundColor,overlayZIndex:s.overlayZIndex}),O.jsx(Ke,{options:s,showToggle:s.showToggle,ToggleComponent:n}),O.jsx("div",{ref:g,id:"swipebar-right",role:"dialog","aria-modal":o,"aria-label":i??"Right sidebar",inert:!o,style:{...Be,...Pt,...s.isAbsolute||S?It:{},...e?{}:{backgroundColor:ye},zIndex:s.swipeBarZIndex},className:e,children:t})]})}N.Overlay=we,N.SwipeBarBottom=Gt,N.SwipeBarLeft=Zt,N.SwipeBarProvider=st,N.SwipeBarRight=Vt,N.ToggleBottom=Ue,N.ToggleLeft=Ve,N.ToggleRight=Ke,N.useMediaQuery=re,N.useSwipeBarContext=V,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});
6
+ <%s key={someKey} {...props} />`,L,N,ee,N),Z[N+L]=!0)}if(N=null,Y!==void 0&&(n(Y),N=""+Y),f(v)&&(n(v.key),N=""+v.key),"key"in v){Y={};for(var de in v)de!=="key"&&(Y[de]=v[de])}else Y=v;return N&&m(Y,typeof a=="function"?a.displayName||a.name||"Unknown":a),p(a,N,Y,u(),ue,oe)}function O(a){b(a)?a._store&&(a._store.validated=1):typeof a=="object"&&a!==null&&a.$$typeof===V&&(a._payload.status==="fulfilled"?b(a._payload.value)&&a._payload.value._store&&(a._payload.value._store.validated=1):a._store&&(a._store.validated=1))}function b(a){return typeof a=="object"&&a!==null&&a.$$typeof===I}var E=l,I=Symbol.for("react.transitional.element"),d=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),X=Symbol.for("react.consumer"),D=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),J=Symbol.for("react.client.reference"),G=E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,y=Object.prototype.hasOwnProperty,P=Array.isArray,C=console.createTask?console.createTask:function(){return null};E={react_stack_bottom_frame:function(a){return a()}};var F,U={},ie=E.react_stack_bottom_frame.bind(E,c)(),A=C(r(c)),Z={};he.Fragment=w,he.jsx=function(a,v,Y){var L=1e4>G.recentlyCreatedOwnerStacks++;return R(a,v,Y,!1,L?Error("react-stack-top-frame"):ie,L?C(r(a)):A)},he.jsxs=function(a,v,Y){var L=1e4>G.recentlyCreatedOwnerStacks++;return R(a,v,Y,!0,L?Error("react-stack-top-frame"):ie,L?C(r(a)):A)}})()),he}var Be;function Tt(){return Be||(Be=1,process.env.NODE_ENV==="production"?ye.exports=xt():ye.exports=Ot()),ye.exports}var M=Tt();const We=l.createContext(null),Te=e=>{throw new Error(`Unhandled sidebar side: ${e}`)},ae={isOpen:!1,meta:null},ve={isOpen:!1,anchorState:"closed",meta:null},Et=({children:e,sidebarWidthPx:t,transitionMs:n,edgeActivationWidthPx:r,dragActivationDeltaPx:u,showOverlay:c,isAbsolute:f,overlayBackgroundColor:m,toggleIconColor:h,toggleIconSizePx:p,toggleIconEdgeDistancePx:R,showToggle:O,mediaQueryWidth:b,swipeBarZIndex:E,toggleZIndex:I,overlayZIndex:d,fadeContent:w,fadeContentTransitionMs:x,closeSidebarOnOverlayClick:_,resetMetaOnClose:X})=>{const[D,H]=l.useState(null),[B,W]=l.useState({}),[k,V]=l.useState({}),j=l.useRef(new Map),J=l.useRef(null),G=l.useRef([]),[y,P]=l.useState({}),[C,F]=l.useState({}),U=l.useRef(new Map),ie=l.useRef(null),A=l.useRef([]),[Z,a]=l.useState({}),[v,Y]=l.useState({}),L=l.useRef(new Map),ue=l.useRef(null),oe=l.useRef([]),N=B.primary?.isOpen??!1,ee=B.primary?.meta??null,de=l.useMemo(()=>Object.values(B).some(o=>o.isOpen),[B]),we=j.current.get("primary"),mn=we?.sidebarRef??{current:null},bn=we?.toggleRef??{current:null},pn=k.primary??{},yn=y.primary?.isOpen??!1,vn=y.primary?.meta??null,ft=l.useMemo(()=>Object.values(y).some(o=>o.isOpen),[y]),gt=U.current.get("primary"),Sn=gt?.sidebarRef??{current:null},Rn=gt?.toggleRef??{current:null},wn=C.primary??{},xn=Z.primary?.isOpen??!1,On=Z.primary?.anchorState??"closed",ht=l.useMemo(()=>Object.values(Z).some(o=>o.isOpen),[Z]),mt=L.current.get("primary"),Tn=mt?.sidebarRef??{current:null},En=mt?.toggleRef??{current:null},An=v.primary??{},[Cn,Pn]=l.useState({sidebarWidthPx:t??Mt,sidebarHeightPx:je,transitionMs:n??At,edgeActivationWidthPx:r??Ct,dragActivationDeltaPx:u??Pt,showOverlay:c??It,isAbsolute:f??Lt,overlayBackgroundColor:m??Fe,toggleIconColor:h??Dt,toggleIconSizePx:p??kt,toggleIconEdgeDistancePx:R??Yt,showToggle:O??Xt,mediaQueryWidth:b??Ae,swipeBarZIndex:E??Bt,toggleZIndex:I??Wt,overlayZIndex:d??jt,fadeContent:w??Ht,fadeContentTransitionMs:x??Nt,swipeToOpen:Gt,swipeToClose:Ut,midAnchorPoint:Zt,midAnchorPointPx:je/3,disabled:!1,closeSidebarOnOverlayClick:_??_t,resetMetaOnClose:X??!1}),Mn=l.useCallback((o,s)=>{j.current.set(o,s),W(i=>i[o]?i:{...i,[o]:{...ae}})},[]),In=l.useCallback(o=>{j.current.delete(o),W(s=>{const i={...s};return delete i[o],i}),V(s=>{const i={...s};return delete i[o],i})},[]),_n=l.useCallback(o=>j.current.get(o),[]),Ln=l.useCallback((o,s)=>{V(i=>i[o]===s?i:{...i,[o]:s})},[]),Dn=l.useCallback((o,s)=>{U.current.set(o,s),P(i=>i[o]?i:{...i,[o]:{...ae}})},[]),kn=l.useCallback(o=>{U.current.delete(o),P(s=>{const i={...s};return delete i[o],i}),F(s=>{const i={...s};return delete i[o],i})},[]),Yn=l.useCallback(o=>U.current.get(o),[]),Xn=l.useCallback((o,s)=>{F(i=>i[o]===s?i:{...i,[o]:s})},[]),Bn=l.useCallback((o,s)=>{L.current.set(o,s),a(i=>i[o]?i:{...i,[o]:{...ve}})},[]),Wn=l.useCallback(o=>{L.current.delete(o),a(s=>{const i={...s};return delete i[o],i}),Y(s=>{const i={...s};return delete i[o],i})},[]),jn=l.useCallback(o=>L.current.get(o),[]),Fn=l.useCallback((o,s)=>{Y(i=>i[o]===s?i:{...i,[o]:s})},[]),xe=l.useCallback((o,s)=>{W(i=>{const g=i[o]??ae;return g.isOpen===s?i:{...i,[o]:{...g,isOpen:s}}})},[]),me=l.useCallback((o,s)=>{W(i=>{const g=i[o]??ae;return g.meta===s?i:{...i,[o]:{...g,meta:s}}})},[]),Oe=l.useCallback((o,s)=>{P(i=>{const g=i[o]??ae;return g.isOpen===s?i:{...i,[o]:{...g,isOpen:s}}})},[]),be=l.useCallback((o,s)=>{P(i=>{const g=i[o]??ae;return g.meta===s?i:{...i,[o]:{...g,meta:s}}})},[]),q=l.useCallback((o,s)=>{a(i=>{const g=i[o]??ve;return g.isOpen===s?i:{...i,[o]:{...g,isOpen:s}}})},[]),$=l.useCallback((o,s)=>{a(i=>{const g=i[o]??ve;return g.anchorState===s?i:{...i,[o]:{...g,anchorState:s}}})},[]),pe=l.useCallback((o,s)=>{a(i=>{const g=i[o]??ve;return g.meta===s?i:{...i,[o]:{...g,meta:s}}})},[]);l.useEffect(()=>(de||ft||ht?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[de,ft,ht]),l.useEffect(()=>{for(const[o,s]of Object.entries(k))if(s.fadeContent===!1){const g=j.current.get(o)?.sidebarRef.current?.firstElementChild;g&&(g.style.opacity="1")}},[k]),l.useEffect(()=>{for(const[o,s]of Object.entries(C))if(s.fadeContent===!1){const g=U.current.get(o)?.sidebarRef.current?.firstElementChild;g&&(g.style.opacity="1")}},[C]),l.useEffect(()=>{for(const[o,s]of Object.entries(v))if(s.fadeContent===!1){const g=L.current.get(o)?.sidebarRef.current?.firstElementChild;g&&(g.style.opacity="1")}},[v]);const Nn=l.useCallback(o=>{Pn(s=>({...s,...o}))},[]),fe=l.useCallback((o,s,i)=>{const g=o==="left"?me:be;i?.resetMeta?g(s,null):i?.meta!==void 0&&g(s,i.meta)},[me,be]),te=l.useCallback((o,s)=>{s?.resetMeta?pe(o,null):s?.meta!==void 0&&pe(o,s.meta)},[pe]),Hn=l.useCallback((o,s)=>{if(o==="left"){const i=s;i&&typeof i=="object"&&"id"in i?me(i.id??"primary",i.meta):me("primary",s)}else if(o==="right"){const i=s;i&&typeof i=="object"&&"id"in i?be(i.id??"primary",i.meta):be("primary",s)}else{const i=s;pe(i.id,i.meta)}},[me,be,pe]),bt=l.useCallback(o=>{const s=G.current,i=s.indexOf(o);i!==-1&&s.splice(i,1),s.push(o),H("left")},[]),pt=l.useCallback(o=>{const s=G.current,i=s.indexOf(o);i!==-1&&s.splice(i,1),W(g=>(Object.entries(g).some(([T,z])=>T!==o&&z.isOpen)||H(null),g))},[]),yt=l.useCallback(o=>{const s=A.current,i=s.indexOf(o);i!==-1&&s.splice(i,1),s.push(o),H("right")},[]),vt=l.useCallback(o=>{const s=A.current,i=s.indexOf(o);i!==-1&&s.splice(i,1),P(g=>(Object.entries(g).some(([T,z])=>T!==o&&z.isOpen)||H(null),g))},[]),se=l.useCallback(o=>{const s=oe.current,i=s.indexOf(o);i!==-1&&s.splice(i,1),s.push(o),H("bottom")},[]),St=l.useCallback(o=>{const s=oe.current,i=s.indexOf(o);i!==-1&&s.splice(i,1),a(g=>(Object.entries(g).some(([T,z])=>T!==o&&z.isOpen)||H(null),g))},[]),Gn=l.useCallback((o,s)=>{const i=s?.skipTransition?ze:Ve,g=s?.skipTransition?on:Je;if(o==="left"){const S=s?.id??"primary",T=k[S],z=j.current.get(S);if(!T||!z||T.disabled)return;fe("left",S,s),i({side:o,ref:z.sidebarRef,options:T,toggleRef:z.toggleRef,afterApply:()=>{xe(S,!0),bt(S)}})}else if(o==="right"){const S=s?.id??"primary",T=C[S],z=U.current.get(S);if(!T||!z||T.disabled)return;fe("right",S,s),i({side:o,ref:z.sidebarRef,options:T,toggleRef:z.toggleRef,afterApply:()=>{Oe(S,!0),yt(S)}})}else if(o==="bottom"){const S=s?.id??"primary",T=v[S],z=L.current.get(S);if(!T||!z||T.disabled)return;te(S,s);const Rt=T.sidebarHeightPx??0,Qn=T.mediaQueryWidth??640,wt=window.innerWidth<Qn,Jn=wt?T.midAnchorPointPx??0:Rt;wt&&T.midAnchorPoint&&!T.swipeToOpen&&Jn<Rt?g({ref:z.sidebarRef,options:T,toggleRef:z.toggleRef,afterApply:()=>{q(S,!0),$(S,"midAnchor"),se(S)}}):i({side:o,ref:z.sidebarRef,options:T,toggleRef:z.toggleRef,afterApply:()=>{q(S,!0),$(S,"open"),se(S)}})}else Te(o)},[k,C,v,xe,Oe,q,$,bt,yt,se,fe,te]),Un=l.useCallback((o,s)=>{if(o!=="bottom")return;const i=s?.id??"primary",g=v[i],S=L.current.get(i);!g||!S||g.disabled||(te(i,s),Je({ref:S.sidebarRef,options:g,toggleRef:S.toggleRef,afterApply:()=>{q(i,!0),$(i,"midAnchor"),se(i)}}))},[v,q,$,se,te]),Zn=l.useCallback((o,s)=>{if(o!=="bottom")return;const i=s?.id??"primary",g=v[i],S=L.current.get(i);if(!g||!S||g.disabled)return;te(i,s),(s?.skipTransition?ze:Ve)({side:o,ref:S.sidebarRef,options:g,toggleRef:S.toggleRef,afterApply:()=>{q(i,!0),$(i,"open"),se(i)}})},[v,q,$,se,te]),zn=l.useCallback((o,s)=>{if(o==="left"){const i=s?.id??"primary",g=k[i],S=j.current.get(i);if(!g||!S||g.disabled)return;const T=g.resetMetaOnClose&&s?.meta===void 0&&s?.resetMeta===void 0?{...s,resetMeta:!0}:s;fe("left",i,T),Pe({ref:S.sidebarRef,options:g,toggleRef:S.toggleRef,side:o,afterApply:()=>{xe(i,!1),pt(i)}})}else if(o==="right"){const i=s?.id??"primary",g=C[i],S=U.current.get(i);if(!g||!S||g.disabled)return;const T=g.resetMetaOnClose&&s?.meta===void 0&&s?.resetMeta===void 0?{...s,resetMeta:!0}:s;fe("right",i,T),Pe({ref:S.sidebarRef,options:g,toggleRef:S.toggleRef,side:o,afterApply:()=>{Oe(i,!1),vt(i)}})}else if(o==="bottom"){const i=s?.id??"primary",g=v[i],S=L.current.get(i);if(!g||!S||g.disabled)return;const T=g.resetMetaOnClose&&s?.meta===void 0&&s?.resetMeta===void 0?{...s,resetMeta:!0}:s;te(i,T),Pe({ref:S.sidebarRef,options:g,toggleRef:S.toggleRef,side:o,afterApply:()=>{q(i,!1),$(i,"closed"),St(i)}})}else Te(o)},[k,C,v,xe,Oe,q,$,pt,vt,St,fe,te]),Vn=l.useCallback((o,s,i)=>{if(o==="left"){const g=i?.id??"primary",S=k[g],T=j.current.get(g);if(!S||!T)return;Ke({ref:T.sidebarRef,toggleRef:T.toggleRef,options:S,translateX:s})}else if(o==="right"){const g=i?.id??"primary",S=C[g],T=U.current.get(g);if(!S||!T)return;Ke({ref:T.sidebarRef,toggleRef:T.toggleRef,options:S,translateX:s})}else if(o==="bottom"){const g=i?.id??"primary",S=v[g],T=L.current.get(g);if(!S||!T)return;sn({ref:T.sidebarRef,toggleRef:T.toggleRef,options:S,translateY:s})}else Te(o)},[k,C,v]);return M.jsx(We.Provider,{value:{lockedSidebar:D,setLockedSidebar:H,leftSidebarRef:mn,rightSidebarRef:Sn,isLeftOpen:N,isRightOpen:yn,leftSidebarOptions:pn,rightSidebarOptions:wn,leftToggleRef:bn,rightToggleRef:Rn,leftMeta:ee,rightMeta:vn,leftSidebars:B,leftSidebarOptionsMap:k,registerLeftSidebar:Mn,unregisterLeftSidebar:In,getLeftSidebarRefs:_n,activeLeftDragIdRef:J,leftFocusStackRef:G,rightSidebars:y,rightSidebarOptionsMap:C,registerRightSidebar:Dn,unregisterRightSidebar:kn,getRightSidebarRefs:Yn,activeRightDragIdRef:ie,rightFocusStackRef:A,isBottomOpen:xn,bottomAnchorState:On,bottomSidebarRef:Tn,bottomToggleRef:En,bottomSidebarOptions:An,bottomSidebars:Z,bottomSidebarOptionsMap:v,registerBottomSidebar:Bn,unregisterBottomSidebar:Wn,getBottomSidebarRefs:jn,activeBottomDragIdRef:ue,bottomFocusStackRef:oe,openSidebar:Gn,openSidebarFully:Zn,openSidebarToMidAnchor:Un,closeSidebar:zn,dragSidebar:Vn,globalOptions:Cn,setGlobalOptions:Nn,setLeftSidebarOptionsById:Ln,setRightSidebarOptionsById:Xn,setBottomSidebarOptionsById:Fn,setMeta:Hn},children:e})};function K(){const e=l.useContext(We);if(!e)throw new Error("useSwipeBarContext must be used within SwipeBarProvider");return e}const At=300,Ct=40,Pt=20,Mt=320,je=window.innerHeight,It=!0,_t=!0,Lt=!1,Fe="rgba(0, 0, 0, 0.5)",Ee="rgb(36,36,36)",Dt="white",kt=40,Yt=40,Xt=!0,Ae=640,Bt=30,Wt=15,jt=20,Ne=.6,Ft=200,Nt=100,Ht=!1,Gt=!0,Ut=!0,Zt=!1,ce="cubic-bezier(0.22, 1, 0.36, 1)",He={width:0,top:0,bottom:0,flexShrink:0,overflowX:"hidden",willChange:"transform"},zt={transform:"translateX(-100%)"},Vt={transform:"translateX(100%)"},Qt={position:"fixed",left:0,top:0,bottom:0},Jt={position:"fixed",right:0,top:0,bottom:0},Kt={height:0,left:0,right:0,flexShrink:0,overflowY:"hidden",willChange:"transform"},qt={transform:"translateY(100%)"},$t={position:"fixed",bottom:0,left:0,right:0},en={position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:Fe,transitionProperty:"opacity",pointerEvents:"none",opacity:0},tn={opacity:1,pointerEvents:"auto"},Ge={position:"fixed",top:"50%",transform:"translateY(-50%)",width:"1px",display:"flex",justifyContent:"center"},nn={position:"fixed",bottom:0,left:"50%",transform:"translateX(-50%)",height:"1px",display:"flex",alignItems:"center"},rn={position:"relative",cursor:"pointer",display:"flex",height:"72px",alignItems:"center",justifyContent:"center"},Ce=e=>{throw new Error(`Unhandled sidebar side: ${e}`)},ne=e=>e.current?.firstElementChild,Ue=(e,t)=>e==="left"||e==="right"?{dimension:"width",sizePx:t.sidebarWidthPx}:e==="bottom"?{dimension:"height",sizePx:t.sidebarHeightPx}:Ce(e),Ze=(e,t,n)=>{!e.current||!n||(e.current.style.opacity="1",t==="left"?e.current.style.transform=`translateY(-50%) translateX(${n}px)`:t==="right"?e.current.style.transform=`translateY(-50%) translateX(-${n}px)`:t==="bottom"&&(e.current.style.transform=`translateX(-50%) translateY(-${n}px)`))},ze=({ref:e,side:t,options:n,toggleRef:r,afterApply:u})=>{if(!e.current)return;const c=ne(e),{dimension:f,sizePx:m}=Ue(t,n);c&&m&&(c.style[t==="bottom"?"minHeight":"minWidth"]=`${m}px`),e.current.style.transition="none",e.current.style.transform=t==="bottom"?"translateY(0px)":"translateX(0px)",e.current.style[f]=`${m}px`,c&&(c.style.opacity="1"),Ze(r,t,m),u()},Ve=({ref:e,side:t,options:n,toggleRef:r,afterApply:u})=>{const c=ne(e),{dimension:f,sizePx:m}=Ue(t,n);c&&m&&(c.style[t==="bottom"?"minHeight":"minWidth"]=`${m}px`);const h=n.transitionMs?n.transitionMs/2:0;c&&n.fadeContent&&(c.style.opacity="0"),requestAnimationFrame(()=>{if(!e.current)return;const p=`transform ${n.transitionMs}ms ${ce}`,R=n.isAbsolute?"":`, ${f} ${n.transitionMs}ms ${ce}`;e.current.style.transition=`${p}${R}`,c&&n.fadeContent&&(c.style.transition=`opacity ${n.fadeContentTransitionMs}ms ease`),requestAnimationFrame(()=>{if(e.current){if(e.current.style.transform=t==="bottom"?"translateY(0px)":"translateX(0px)",!n.isAbsolute)e.current.style[f]=`${m}px`;else if(e.current.style[f]!==`${m}px`){const O=e.current.style.transition;e.current.style.transition=p,e.current.style[f]=`${m}px`,e.current.style.transition=O}Ze(r,t,m),c&&n.fadeContent&&setTimeout(()=>{c.style.opacity="1"},h),u()}})}),setTimeout(()=>{},0)},Pe=({ref:e,options:t,side:n,toggleRef:r,afterApply:u})=>{const c=ne(e);let f;n==="left"||n==="right"?(f="width",c&&t.sidebarWidthPx&&(c.style.minWidth=`${t.sidebarWidthPx}px`)):n==="bottom"?(f="height",c&&t.sidebarHeightPx&&(c.style.minHeight=`${t.sidebarHeightPx}px`)):Ce(n),requestAnimationFrame(()=>{if(!e.current)return;const m=`transform ${t.transitionMs}ms ${ce}`,h=t.isAbsolute?"":`, ${f} ${t.transitionMs}ms ${ce}`;e.current.style.transition=`${m}${h}`,c&&t.fadeContent&&(c.style.transition=`opacity ${t.fadeContentTransitionMs}ms ease`),requestAnimationFrame(()=>{e.current&&(n==="left"?(e.current.style.transform="translateX(-100%)",t.isAbsolute||(e.current.style.width="0px")):n==="right"?(e.current.style.transform="translateX(100%)",t.isAbsolute||(e.current.style.width="0px")):n==="bottom"&&(e.current.style.transform="translateY(100%)",t.isAbsolute||(e.current.style.height="0px")),r.current&&(r.current.style.opacity="1",n==="left"||n==="right"?r.current.style.transform="translateY(-50%)":n==="bottom"&&(r.current.style.transform="translateX(-50%)")),c&&t.fadeContent&&(c.style.opacity="0"),u())})})},Qe=e=>{const t=e.midAnchorPointPx??0,n=e.sidebarHeightPx??0;return{midAnchorPx:t,sidebarHeightPx:n,translateY:n-t}},on=({ref:e,options:t,toggleRef:n,afterApply:r})=>{if(!e.current)return;const u=ne(e),{midAnchorPx:c,sidebarHeightPx:f,translateY:m}=Qe(t);u&&t.midAnchorPointPx&&(u.style.minHeight=`${f}px`),e.current.style.transition="none",e.current.style.transform=`translateY(${m}px)`,e.current.style.height=`${f}px`,u&&(u.style.opacity="1"),n.current&&(n.current.style.opacity="1",n.current.style.transform=`translateX(-50%) translateY(-${c}px)`),r()},Je=({ref:e,options:t,toggleRef:n,afterApply:r})=>{const u=ne(e),{midAnchorPx:c,sidebarHeightPx:f,translateY:m}=Qe(t);u&&t.midAnchorPointPx&&(u.style.minHeight=`${f}px`);const h=t.transitionMs?t.transitionMs/2:0;u&&t.fadeContent&&(u.style.opacity="0"),requestAnimationFrame(()=>{if(!e.current)return;const p=`transform ${t.transitionMs}ms ${ce}`,R=t.isAbsolute?"":`, height ${t.transitionMs}ms ${ce}`;e.current.style.transition=`${p}${R}`,u&&t.fadeContent&&(u.style.transition=`opacity ${t.fadeContentTransitionMs}ms ease`),requestAnimationFrame(()=>{if(e.current){if(e.current.style.transform=`translateY(${m}px)`,!t.isAbsolute)e.current.style.height=`${f}px`;else if(e.current.style.height!==`${f}px`){const O=e.current.style.transition;e.current.style.transition=p,e.current.style.height=`${f}px`,e.current.style.transition=O}n.current&&(n.current.style.opacity="1",n.current.style.transform=`translateX(-50%) translateY(-${c}px)`),u&&t.fadeContent&&setTimeout(()=>{u.style.opacity="1"},h),r()}})}),setTimeout(()=>{},0)},Ke=({ref:e,toggleRef:t,options:n,translateX:r})=>{!e.current||r===null||(e.current.style.transition="none",requestAnimationFrame(()=>{const u=ne(e);if(e.current){if(u&&n.fadeContent&&(u.style.opacity="0"),u&&n.sidebarWidthPx&&(u.style.minWidth=`${n.sidebarWidthPx}px`),!n.isAbsolute){const c=`${n.sidebarWidthPx}px`;e.current.style.width!==c&&(e.current.style.width=c)}e.current.style.transform=`translateX(${r}px)`,t.current&&(t.current.style.opacity="0",t.current.style.transform=`translateY(-50%) translateX(${r}px)`)}}))},sn=({ref:e,toggleRef:t,options:n,translateY:r})=>{!e.current||r===null||(e.current.style.transition="none",requestAnimationFrame(()=>{const u=ne(e);if(e.current){if(u&&n.fadeContent&&(u.style.opacity="0"),u&&n.sidebarHeightPx&&(u.style.minHeight=`${n.sidebarHeightPx}px`),!n.isAbsolute){const c=`${n.sidebarHeightPx}px`;e.current.style.height!==c&&(e.current.style.height=c)}e.current.style.transform=`translateY(${r}px)`,t.current&&(t.current.style.opacity="0",t.current.style.transform=`translateX(-50%) translateY(${r}px)`)}}))},Se=({refs:e,clientX:t,clientY:n,touchId:r,isMouse:u})=>{e.draggingRef.current={startX:t,startY:n,activeTouchId:r,isMouse:u,isActivated:!1},e.currentXRef.current=t,e.prevXRef.current=t},qe=({refs:e,clientX:t,clientY:n,touchId:r,isMouse:u})=>{e.draggingRef.current={startX:t,startY:n,activeTouchId:r,isMouse:u,isActivated:!1},e.currentYRef.current=n,e.prevYRef.current=n},$e=({refs:e,dragSidebar:t,onDeactivate:n})=>{e.draggingRef.current=null,e.currentXRef.current=null,e.prevXRef.current=null,t(null),n()},an=({refs:e,dragSidebar:t,onDeactivate:n})=>{e.draggingRef.current=null,e.currentYRef.current=null,e.prevYRef.current=null,t(null)},le=e=>e instanceof Element?!!e.closest("input, textarea, [contenteditable='true']"):!1;function et(e){let t=e instanceof HTMLElement?e:null;for(;t;){const n=getComputedStyle(t);if((n.overflowY==="auto"||n.overflowY==="scroll")&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return null}const Me=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];if(t==null||r.identifier===t)return r}return null},Ie=(e,t)=>{for(let n=0;n<e.length;n++)if(e[n].identifier===t)return!0;return!1},_e=(e,t,n)=>{const{globalOptions:r,setLeftSidebarOptionsById:u,setRightSidebarOptionsById:c,setBottomSidebarOptionsById:f}=K(),{sidebarWidthPx:m,sidebarHeightPx:h,transitionMs:p,edgeActivationWidthPx:R,dragActivationDeltaPx:O,showOverlay:b,isAbsolute:E,overlayBackgroundColor:I,toggleIconColor:d,toggleIconSizePx:w,toggleIconEdgeDistancePx:x,showToggle:_,mediaQueryWidth:X,swipeBarZIndex:D,toggleZIndex:H,overlayZIndex:B,fadeContent:W,fadeContentTransitionMs:k,swipeToOpen:V,swipeToClose:j,midAnchorPoint:J,midAnchorPointPx:G,disabled:y,closeSidebarOnOverlayClick:P,resetMetaOnClose:C}=t,F=l.useMemo(()=>{const U=h??r.sidebarHeightPx;return{sidebarWidthPx:m??r.sidebarWidthPx,sidebarHeightPx:U,transitionMs:p??r.transitionMs,edgeActivationWidthPx:R??r.edgeActivationWidthPx,dragActivationDeltaPx:O??r.dragActivationDeltaPx,showOverlay:b??r.showOverlay,isAbsolute:E??r.isAbsolute,overlayBackgroundColor:I??r.overlayBackgroundColor,toggleIconColor:d??r.toggleIconColor,toggleIconSizePx:w??r.toggleIconSizePx,toggleIconEdgeDistancePx:x??r.toggleIconEdgeDistancePx,showToggle:_??r.showToggle,mediaQueryWidth:X??r.mediaQueryWidth,swipeBarZIndex:D??r.swipeBarZIndex,toggleZIndex:H??r.toggleZIndex,overlayZIndex:B??r.overlayZIndex,fadeContent:W??r.fadeContent,fadeContentTransitionMs:k??r.fadeContentTransitionMs,swipeToOpen:V??r.swipeToOpen,swipeToClose:j??r.swipeToClose,midAnchorPoint:J??r.midAnchorPoint,midAnchorPointPx:G??r.midAnchorPointPx??Math.floor(U/3),disabled:y??r.disabled,closeSidebarOnOverlayClick:P??r.closeSidebarOnOverlayClick,resetMetaOnClose:C??r.resetMetaOnClose}},[m,h,p,R,O,b,E,I,d,w,x,_,r,X,D,H,B,W,k,V,j,J,G,y,P,C]);return l.useEffect(()=>{e==="left"?u(n??"primary",F):e==="right"?c(n??"primary",F):e==="bottom"?f(n??"primary",F):Ce(e)},[e,n,F,u,c,f]),F};function Re({isCollapsed:e,setCollapsed:t,closeSidebarOnClick:n=!0,transitionMs:r,overlayBackgroundColor:u,overlayZIndex:c}){return M.jsx("div",{"aria-hidden":"true",style:{transitionDuration:`${r}ms`,...en,...e?{}:tn,...u?{backgroundColor:u}:{},zIndex:c},onMouseDown:f=>{n&&(f.stopPropagation(),t())}})}function Le({size:e,color:t}){const n=l.useRef(null);return l.useEffect(()=>{const r=()=>{n.current&&(n.current.style.opacity="1")},u=()=>{n.current&&(n.current.style.opacity=`${Ne}`)};n.current&&(n.current.addEventListener("mouseenter",r),n.current.addEventListener("mouseleave",u))},[]),M.jsx("div",{style:{...rn},children:M.jsxs("svg",{style:{transition:`opacity ${Ft}ms ease`,opacity:`${Ne}`},ref:n,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:e,children:[M.jsx("g",{strokeWidth:"0"}),M.jsx("g",{strokeLinecap:"round",strokeLinejoin:"round",children:M.jsx("g",{children:M.jsx("path",{clipRule:"evenodd",d:"m9.46967 5.46967c.29289-.29289.76773-.29289 1.06063 0l2.6286 2.62858c.5748.57477 1.0384 1.03835 1.3831 1.44443.355.41812.6278.82432.7818 1.29852.2447.7531.2447 1.5645 0 2.3176-.154.4742-.4268.8804-.7818 1.2985-.3447.4061-.8083.8697-1.3831 1.4444l-2.6286 2.6286c-.2929.2929-.76774.2929-1.06063 0s-.29289-.7677 0-1.0606l2.60593-2.6059c.6027-.6028 1.0225-1.0234 1.3229-1.3773.2947-.3471.4302-.5804.4987-.7912.1469-.4519.1469-.9387 0-1.3906-.0685-.2108-.204-.4441-.4987-.7912-.3004-.3539-.7202-.77451-1.3229-1.37728l-2.60593-2.60589c-.29289-.29289-.29289-.76777 0-1.06066z",fill:t,fillRule:"evenodd"})})})]})})}function tt({id:e,toggleRef:t,options:n,showToggle:r=!0,ToggleComponent:u}){const{openSidebar:c,closeSidebar:f,bottomSidebars:m}=K(),h=m[e]?.isOpen??!1;return r?M.jsx("div",{ref:t,style:{...nn,transition:`transform ${n.transitionMs}ms ease, opacity ${n.transitionMs}ms ease`,zIndex:n.toggleZIndex},children:(!h||h&&!n.showOverlay)&&M.jsx("button",{type:"button","aria-expanded":h,"aria-controls":`swipebar-bottom-${e}`,"aria-label":h?"Close bottom sidebar":"Open bottom sidebar",onClick:()=>{n.disabled||(h?f("bottom",{id:e}):c("bottom",{id:e}))},disabled:n.disabled,style:{marginBottom:`${n.toggleIconEdgeDistancePx}px`,transform:h?"rotate(90deg)":"rotate(-90deg)"},children:u??M.jsx(Le,{size:n.toggleIconSizePx,color:n.toggleIconColor})})}):null}function De({defaultOpen:e,optionsReady:t,onOpen:n}){const r=l.useRef(!1);return l.useLayoutEffect(()=>{e&&(document.body.style.overflow="hidden")},[e]),l.useEffect(()=>{e&&!r.current&&t&&(r.current=!0,n())},[e,n,t]),{forceOverlayVisible:!!e&&!r.current}}const cn='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])',nt={preventScroll:!0,focusVisible:!1};function rt(e){return Array.from(e.querySelectorAll(cn)).filter(t=>!t.closest("[inert]"))}function ke({sidebarRef:e,triggerRef:t,isOpen:n,onClose:r,transitionMs:u}){const c=l.useRef(null);l.useEffect(()=>{if(n){c.current=document.activeElement;const m=setTimeout(()=>{if(!e.current)return;const h=nt,p=rt(e.current);p.length>0?p[0].focus(h):(e.current.setAttribute("tabindex","-1"),e.current.focus(h))},u);return()=>clearTimeout(m)}const f=c.current;if(f){const m=t.current?.querySelector("button")??f;requestAnimationFrame(()=>{m.focus(nt)}),c.current=null}},[n,e,t,u]),l.useEffect(()=>{if(!n)return;function f(m){if(m.key==="Escape"){if(!e.current)return;e.current.contains(document.activeElement)&&(m.preventDefault(),r());return}if(m.key!=="Tab"||!e.current)return;const h=rt(e.current);if(h.length===0)return;const p=h[0],R=h[h.length-1];m.shiftKey?document.activeElement===p&&(m.preventDefault(),R.focus()):document.activeElement===R&&(m.preventDefault(),p.focus())}return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[n,e,r])}function re(e=Ae){const t=`(max-width: ${Math.min(e,Ae)}px)`,n=()=>typeof window>"u"||typeof window.matchMedia>"u"?!1:window.matchMedia(t).matches,[r,u]=l.useState(n);return l.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia>"u")return;const c=window.matchMedia(t),f=()=>u(c.matches);return f(),c.addEventListener("change",f),()=>c.removeEventListener("change",f)},[t]),r}const it=({refs:e,callbacks:t,currentY:n,preventDefault:r,lockPane:u,options:c,scrollableAncestor:f,initialScrollTop:m})=>{if(!e.draggingRef.current)return;const h=n-e.draggingRef.current.startY;if(!e.draggingRef.current.isActivated&&Math.abs(h)>=c.dragActivationDeltaPx){if(f&&t.getIsOpen()){if(f.scrollTop!==m){e.draggingRef.current=null,t.dragSidebar(null);return}const{scrollTop:d,scrollHeight:w,clientHeight:x}=f,_=d>1,X=d+x<w-1;if(h>0&&_||h<0&&X){e.draggingRef.current=null,t.dragSidebar(null);return}}e.draggingRef.current.isActivated=!0,u()}if(!e.draggingRef.current.isActivated)return;e.prevYRef.current=e.currentYRef.current,e.currentYRef.current=n;const p=t.getIsOpen(),R=window.innerHeight;let O=!1;if((p||e.draggingRef.current.startY>=R-c.edgeActivationWidthPx)&&(O=!0),!O){e.draggingRef.current=null,t.dragSidebar(null);return}r();const b=c.sidebarHeightPx,E=c.midAnchorPointPx,I=c.midAnchorPoint&&!c.swipeToOpen&&E<b;if(p)if(I){const d=t.getBottomAnchorState();if(d==="open"){const w=Math.max(0,Math.min(b,h-c.dragActivationDeltaPx));t.dragSidebar(w)}else if(d==="midAnchor"){const w=b-E,x=Math.max(0,Math.min(b,w+h-c.dragActivationDeltaPx));t.dragSidebar(x)}}else{const d=Math.max(0,Math.min(b,h-c.dragActivationDeltaPx));t.dragSidebar(d)}else if(e.draggingRef.current.startY>=R-c.edgeActivationWidthPx)if(I){const d=b-E,w=Math.max(d,Math.min(b,b+h+c.dragActivationDeltaPx));t.dragSidebar(w)}else{const d=Math.max(0,Math.min(b,b+h+c.dragActivationDeltaPx));t.dragSidebar(d)}},ot=({refs:e,callbacks:t,options:n,onDragEnd:r})=>{if(!e.draggingRef.current)return;if(!e.draggingRef.current.isActivated){e.draggingRef.current=null,e.currentYRef.current=null,e.prevYRef.current=null;return}const u=e.currentYRef.current??e.draggingRef.current.startY,c=e.prevYRef.current??e.draggingRef.current.startY,f=e.draggingRef.current.startY,m=t.getIsOpen(),h=window.innerHeight;e.draggingRef.current=null,e.currentYRef.current=null,e.prevYRef.current=null,r();const p=u<c,R=u>=c,O=f>=h-n.edgeActivationWidthPx,b=n.midAnchorPointPx,E=n.sidebarHeightPx,I=n.midAnchorPoint&&!n.swipeToOpen&&b<E;if(m)if(I){const d=t.getBottomAnchorState(),w=E-b;if(d==="open"){const x=Math.max(0,u-f);R?x>w?t.closeSidebar():t.openToMidAnchor():x<w?t.openSidebarFully():t.closeSidebar(),t.dragSidebar(null)}else if(d==="midAnchor"){const x=E-b,_=Math.max(0,Math.min(E,x+(u-f)));p?_<w?t.openSidebarFully():t.openToMidAnchor():t.closeSidebar(),t.dragSidebar(null)}}else R?t.closeSidebar():t.openSidebar(),t.dragSidebar(null);else O&&p?(I?t.openToMidAnchor():t.openSidebar(),t.dragSidebar(null)):(t.closeSidebar(),t.dragSidebar(null))};function ln(e,t){const n=re(e.mediaQueryWidth),{lockedSidebar:r,setLockedSidebar:u,bottomSidebars:c,openSidebar:f,openSidebarFully:m,closeSidebar:h,dragSidebar:p,openSidebarToMidAnchor:R,activeBottomDragIdRef:O,bottomFocusStackRef:b}=K(),E=c[t]?.isOpen??!1,I=c[t]?.anchorState??"closed",d=l.useRef(null),w=l.useRef(null),x=l.useRef(null),_=l.useRef(null),X=l.useRef(0),D=l.useRef(null),H=l.useRef(I);l.useEffect(()=>{H.current=I},[I]),l.useEffect(()=>{if(!n||r&&r!=="bottom"||e.disabled)return;const B={getIsOpen:()=>E,openSidebar:()=>f("bottom",{id:t}),openSidebarFully:()=>m("bottom",{id:t}),closeSidebar:()=>h("bottom",{id:t}),dragSidebar:A=>p("bottom",A,{id:t}),getBottomAnchorState:()=>H.current,openToMidAnchor:()=>R("bottom",{id:t})},W={draggingRef:d,currentYRef:w,prevYRef:x},k=()=>O.current!==null&&O.current!==t,V=()=>{const A=b.current;return A.length===0?!0:A[A.length-1]===t},j=()=>{if(k()){d.current=null;return}O.current=t,u("bottom");const A=_.current;A&&(D.current=A.style.overflowY,A.style.overflowY="hidden")},J=()=>{O.current===t&&(O.current=null);const A=_.current;A&&D.current!==null&&(A.style.overflowY=D.current,D.current=null)};function G(A){if(r&&r!=="bottom"||k()||!V()||le(A.target)||A.changedTouches.length===0)return;const Z=A.changedTouches[0],a=window.innerHeight,v=B.getIsOpen(),Y=Z.clientY>=a-e.edgeActivationWidthPx;v&&!e.swipeToClose||!v&&!e.swipeToOpen||(v||Y)&&(_.current=et(A.target),X.current=_.current?.scrollTop??0,qe({refs:W,clientX:Z.clientX,clientY:Z.clientY,touchId:Z.identifier,isMouse:!1}))}function y(A){if(r&&r!=="bottom")return;if(k()){d.current=null;return}if(!d.current||d.current.isMouse)return;const Z=d.current.activeTouchId,a=Me(A.changedTouches,Z);a&&it({refs:W,callbacks:B,currentY:a.clientY,preventDefault:()=>A.preventDefault(),lockPane:j,options:e,scrollableAncestor:_.current,initialScrollTop:X.current})}function P(A){if(r&&r!=="bottom"||!d.current||d.current.isMouse)return;const Z=d.current.activeTouchId;Ie(A.changedTouches,Z)&&ot({refs:W,callbacks:B,options:e,onDragEnd:J})}function C(){r&&r!=="bottom"||!d.current||d.current.isMouse||(J(),an({refs:W,dragSidebar:B.dragSidebar,onDeactivate:()=>{}}))}function F(A){if(r&&r!=="bottom"||k()||!V()||le(A.target)||A.button!==0)return;const Z=window.innerHeight,a=B.getIsOpen(),v=A.clientY>=Z-e.edgeActivationWidthPx;a&&!e.swipeToClose||!a&&!e.swipeToOpen||(a||v)&&(_.current=et(A.target),X.current=_.current?.scrollTop??0,qe({refs:W,clientX:A.clientX,clientY:A.clientY,touchId:null,isMouse:!0}))}function U(A){if(!(r&&r!=="bottom")){if(k()){d.current=null;return}!d.current||!d.current.isMouse||it({refs:W,callbacks:B,currentY:A.clientY,preventDefault:()=>A.preventDefault(),lockPane:j,options:e,scrollableAncestor:_.current,initialScrollTop:X.current})}}function ie(){r&&r!=="bottom"||!d.current||!d.current.isMouse||ot({refs:W,callbacks:B,options:e,onDragEnd:J})}return window.addEventListener("touchstart",G,{passive:!0}),window.addEventListener("touchmove",y,{passive:!1}),window.addEventListener("touchend",P,{passive:!0}),window.addEventListener("touchcancel",C,{passive:!0}),window.addEventListener("mousedown",F,{passive:!0}),window.addEventListener("mousemove",U,{passive:!1}),window.addEventListener("mouseup",ie,{passive:!0}),()=>{window.removeEventListener("touchstart",G),window.removeEventListener("touchmove",y),window.removeEventListener("touchend",P),window.removeEventListener("touchcancel",C),window.removeEventListener("mousedown",F),window.removeEventListener("mousemove",U),window.removeEventListener("mouseup",ie)}},[t,n,E,f,m,h,p,r,u,e,R,O,b])}function un({id:e="primary",className:t,children:n,ToggleComponent:r,ariaLabel:u,defaultOpen:c,...f}){if(n?.type===M.Fragment)throw new Error("Fragments is not allowed in SwipeBarBottom");const{bottomSidebars:m,bottomSidebarOptionsMap:h,closeSidebar:p,openSidebarFully:R,registerBottomSidebar:O,unregisterBottomSidebar:b}=K(),E=l.useRef(null),I=l.useRef(null);l.useEffect(()=>(O(e,{sidebarRef:E,toggleRef:I}),()=>b(e)),[e,O,b]);const d=_e("bottom",f,e),w=re(d.mediaQueryWidth);ln(d,e);const x=m[e]?.isOpen??!1,_=l.useCallback(()=>R("bottom",{id:e,skipTransition:!0}),[R,e]),{forceOverlayVisible:X}=De({defaultOpen:c,optionsReady:!!h[e],onOpen:_}),D=l.useCallback(()=>p("bottom",{id:e}),[p,e]);return ke({sidebarRef:E,triggerRef:I,isOpen:x,onClose:D,transitionMs:d.transitionMs}),M.jsxs(M.Fragment,{children:[d.showOverlay&&M.jsx(Re,{isCollapsed:!x&&!X,setCollapsed:()=>p("bottom",{id:e}),closeSidebarOnClick:d.closeSidebarOnOverlayClick,transitionMs:d.transitionMs,overlayBackgroundColor:d.overlayBackgroundColor,overlayZIndex:d.overlayZIndex}),M.jsx(tt,{id:e,toggleRef:I,options:d,showToggle:d.showToggle,ToggleComponent:r}),M.jsx("div",{ref:E,id:`swipebar-bottom-${e}`,role:"dialog","aria-modal":x,"aria-label":u??"Bottom sidebar",inert:!x,style:{...Kt,...qt,...d.isAbsolute||w?$t:{},...t?{}:{backgroundColor:Ee},zIndex:d.swipeBarZIndex,...c?{transform:"translateY(0px)",height:`${d.sidebarHeightPx}px`}:{}},className:t,children:n})]})}function st({id:e,toggleRef:t,options:n,showToggle:r=!0,ToggleComponent:u}){const{openSidebar:c,closeSidebar:f,leftSidebars:m}=K(),h=m[e]?.isOpen??!1;return r?M.jsx("div",{ref:t,style:{...Ge,transition:`transform ${n.transitionMs}ms ease, opacity ${n.transitionMs}ms ease`,left:0,zIndex:n.toggleZIndex},children:(!h||h&&!n.showOverlay)&&M.jsx("button",{type:"button","aria-expanded":h,"aria-controls":`swipebar-left-${e}`,"aria-label":h?"Close left sidebar":"Open left sidebar",onClick:()=>{n.disabled||(h?f("left",{id:e}):c("left",{id:e}))},disabled:n.disabled,style:{marginLeft:`${n.toggleIconEdgeDistancePx}px`,...h?{transform:"rotate(180deg)"}:{}},children:u??M.jsx(Le,{size:n.toggleIconSizePx,color:n.toggleIconColor})})}):null}const at=({refs:e,callbacks:t,currentX:n,preventDefault:r,lockPane:u,options:c})=>{if(!e.draggingRef.current)return;const f=n-e.draggingRef.current.startX;if(!e.draggingRef.current.isActivated&&Math.abs(f)>=c.dragActivationDeltaPx&&(e.draggingRef.current.isActivated=!0,u()),!e.draggingRef.current.isActivated)return;e.prevXRef.current=e.currentXRef.current,e.currentXRef.current=n;const m=t.getIsOpen();let h=!1;if((m||e.draggingRef.current.startX<=c.edgeActivationWidthPx)&&(h=!0),!h){e.draggingRef.current=null,t.dragSidebar(null);return}r();const p=c.sidebarWidthPx;if(m){const R=Math.min(0,Math.max(-p,f+c.dragActivationDeltaPx));t.dragSidebar(R)}else if(e.draggingRef.current.startX<=c.edgeActivationWidthPx){const R=Math.min(0,Math.max(-p,-p+f-c.dragActivationDeltaPx));t.dragSidebar(R)}},ct=({refs:e,callbacks:t,options:n})=>{if(!e.draggingRef.current)return;if(!e.draggingRef.current.isActivated){e.draggingRef.current=null,e.currentXRef.current=null,e.prevXRef.current=null;return}const r=e.currentXRef.current??e.draggingRef.current.startX,u=e.prevXRef.current??e.draggingRef.current.startX,c=e.draggingRef.current.startX,f=t.getIsOpen();e.draggingRef.current=null,e.currentXRef.current=null,e.prevXRef.current=null;const m=r>=u,h=r<u,p=c<=n.edgeActivationWidthPx;f?(h?t.closeSidebar():t.openSidebar(),t.dragSidebar(null)):p&&m?(t.openSidebar(),t.dragSidebar(null)):(t.closeSidebar(),t.dragSidebar(null))};function dn(e,t){const n=re(e.mediaQueryWidth),{lockedSidebar:r,setLockedSidebar:u,leftSidebars:c,openSidebar:f,closeSidebar:m,dragSidebar:h,activeLeftDragIdRef:p,leftFocusStackRef:R}=K(),O=c[t]?.isOpen??!1,b=l.useRef(null),E=l.useRef(null),I=l.useRef(null);l.useEffect(()=>{if(!n||r&&r!=="left"||e.disabled)return;const d={getIsOpen:()=>O,openSidebar:()=>f("left",{id:t}),closeSidebar:()=>m("left",{id:t}),dragSidebar:y=>h("left",y,{id:t})},w={draggingRef:b,currentXRef:E,prevXRef:I},x=()=>p.current!==null&&p.current!==t,_=()=>{const y=R.current;return y.length===0?!0:y[y.length-1]===t},X=()=>{if(x()){b.current=null;return}p.current=t,u("left")},D=()=>{p.current===t&&(p.current=null)},H=()=>{D(),u(null)};function B(y){if(r&&r!=="left"||x()||!_()||le(y.target)||y.changedTouches.length===0)return;const P=y.changedTouches[0],C=d.getIsOpen(),F=P.clientX<=e.edgeActivationWidthPx;C&&!e.swipeToClose||!C&&!e.swipeToOpen||(C||F)&&Se({refs:w,clientX:P.clientX,clientY:P.clientY,touchId:P.identifier,isMouse:!1})}function W(y){if(r&&r!=="left")return;if(x()){b.current=null;return}if(!b.current||b.current.isMouse)return;const P=b.current.activeTouchId,C=Me(y.changedTouches,P);C&&at({refs:w,callbacks:d,currentX:C.clientX,preventDefault:()=>y.preventDefault(),lockPane:X,options:e})}function k(y){if(r&&r!=="left"||!b.current||b.current.isMouse)return;const P=b.current.activeTouchId;Ie(y.changedTouches,P)&&(D(),ct({refs:w,callbacks:d,options:e}))}function V(){r&&r!=="left"||!b.current||b.current.isMouse||(D(),$e({refs:w,dragSidebar:d.dragSidebar,onDeactivate:H}))}function j(y){if(r&&r!=="left"||x()||!_()||le(y.target)||y.button!==0)return;const P=d.getIsOpen(),C=y.clientX<=e.edgeActivationWidthPx;P&&!e.swipeToClose||!P&&!e.swipeToOpen||(P||C)&&Se({refs:w,clientX:y.clientX,clientY:y.clientY,touchId:null,isMouse:!0})}function J(y){if(!(r&&r!=="left")){if(x()){b.current=null;return}!b.current||!b.current.isMouse||at({refs:w,callbacks:d,currentX:y.clientX,preventDefault:()=>y.preventDefault(),lockPane:X,options:e})}}function G(){r&&r!=="left"||!b.current||!b.current.isMouse||(D(),ct({refs:w,callbacks:d,options:e}))}return window.addEventListener("touchstart",B,{passive:!0}),window.addEventListener("touchmove",W,{passive:!1}),window.addEventListener("touchend",k,{passive:!0}),window.addEventListener("touchcancel",V,{passive:!0}),window.addEventListener("mousedown",j,{passive:!0}),window.addEventListener("mousemove",J,{passive:!1}),window.addEventListener("mouseup",G,{passive:!0}),()=>{window.removeEventListener("touchstart",B),window.removeEventListener("touchmove",W),window.removeEventListener("touchend",k),window.removeEventListener("touchcancel",V),window.removeEventListener("mousedown",j),window.removeEventListener("mousemove",J),window.removeEventListener("mouseup",G)}},[t,n,O,f,m,h,r,u,e,p,R])}function fn({id:e="primary",className:t,children:n,ToggleComponent:r,ariaLabel:u,defaultOpen:c,...f}){if(n?.type===M.Fragment)throw new Error("Fragments is not allowed in SwipeBarLeft");const{leftSidebars:m,leftSidebarOptionsMap:h,closeSidebar:p,openSidebar:R,registerLeftSidebar:O,unregisterLeftSidebar:b}=K(),E=l.useRef(null),I=l.useRef(null);l.useEffect(()=>(O(e,{sidebarRef:E,toggleRef:I}),()=>b(e)),[e,O,b]);const d=_e("left",f,e),w=re(d.mediaQueryWidth);dn(d,e);const x=m[e]?.isOpen??!1,_=l.useCallback(()=>R("left",{id:e,skipTransition:!0}),[R,e]),{forceOverlayVisible:X}=De({defaultOpen:c,optionsReady:!!h[e],onOpen:_}),D=l.useCallback(()=>p("left",{id:e}),[p,e]);return ke({sidebarRef:E,triggerRef:I,isOpen:x,onClose:D,transitionMs:d.transitionMs}),M.jsxs(M.Fragment,{children:[d.showOverlay&&M.jsx(Re,{isCollapsed:!x&&!X,setCollapsed:()=>p("left",{id:e}),closeSidebarOnClick:d.closeSidebarOnOverlayClick,transitionMs:d.transitionMs,overlayBackgroundColor:d.overlayBackgroundColor,overlayZIndex:d.overlayZIndex}),M.jsx(st,{id:e,toggleRef:I,options:d,showToggle:d.showToggle,ToggleComponent:r}),M.jsx("div",{ref:E,id:`swipebar-left-${e}`,role:"dialog","aria-modal":x,"aria-label":u??"Left sidebar",inert:!x,style:{...He,...zt,...d.isAbsolute||w?Qt:{},...t?{}:{backgroundColor:Ee},zIndex:d.swipeBarZIndex,...c?{transform:"translateX(0px)",width:`${d.sidebarWidthPx}px`}:{}},className:t,children:n})]})}function lt({id:e,toggleRef:t,options:n,showToggle:r=!0,ToggleComponent:u}){const{openSidebar:c,closeSidebar:f,rightSidebars:m}=K(),h=m[e]?.isOpen??!1;return r?M.jsx("div",{ref:t,style:{...Ge,transition:`transform ${n.transitionMs}ms ease, opacity ${n.transitionMs}ms ease`,right:0,zIndex:n.toggleZIndex},children:(!h||h&&!n.showOverlay)&&M.jsx("button",{type:"button","aria-expanded":h,"aria-controls":`swipebar-right-${e}`,"aria-label":h?"Close right sidebar":"Open right sidebar",onClick:()=>{n.disabled||(h?f("right",{id:e}):c("right",{id:e}))},disabled:n.disabled,style:{marginRight:`${n.toggleIconEdgeDistancePx}px`,...h?{}:{transform:"rotate(180deg)"}},children:u??M.jsx(Le,{size:n.toggleIconSizePx,color:n.toggleIconColor})})}):null}const ut=({refs:e,callbacks:t,currentX:n,preventDefault:r,lockPane:u,options:c})=>{if(!e.draggingRef.current)return;const f=window.innerWidth,m=n-e.draggingRef.current.startX,h=e.draggingRef.current.startX>=f-c.edgeActivationWidthPx,p=e.draggingRef.current.isActivated;if(!p&&Math.abs(m)>=c.dragActivationDeltaPx&&(e.draggingRef.current.isActivated=!0,u()),!p)return;e.prevXRef.current=e.currentXRef.current,e.currentXRef.current=n;const R=t.getIsOpen();let O=!1;if((R||h)&&(O=!0),!O){e.draggingRef.current=null,t.dragSidebar(null);return}r();const b=c.sidebarWidthPx;if(R){const E=Math.max(0,Math.min(b,m-c.dragActivationDeltaPx));t.dragSidebar(E)}else{const E=Math.max(0,Math.min(b,b+m+c.dragActivationDeltaPx));t.dragSidebar(E)}},dt=({refs:e,callbacks:t,options:n})=>{if(!e.draggingRef.current)return;if(!e.draggingRef.current.isActivated){e.draggingRef.current=null,e.currentXRef.current=null,e.prevXRef.current=null;return}const r=e.currentXRef.current??e.draggingRef.current.startX,u=e.prevXRef.current??e.draggingRef.current.startX,c=e.draggingRef.current.startX,f=t.getIsOpen(),m=window.innerWidth;e.draggingRef.current=null,e.currentXRef.current=null,e.prevXRef.current=null;const h=r>u,p=r<u,R=c>=m-n.edgeActivationWidthPx;f?(h?t.closeSidebar():t.openSidebar(),t.dragSidebar(null)):R&&p?(t.openSidebar(),t.dragSidebar(null)):(t.closeSidebar(),t.dragSidebar(null))};function gn(e,t){const n=re(e.mediaQueryWidth),{lockedSidebar:r,setLockedSidebar:u,rightSidebars:c,openSidebar:f,closeSidebar:m,dragSidebar:h,activeRightDragIdRef:p,rightFocusStackRef:R}=K(),O=c[t]?.isOpen??!1,b=l.useRef(null),E=l.useRef(null),I=l.useRef(null);l.useEffect(()=>{if(!n||r&&r!=="right"||e.disabled)return;const d={getIsOpen:()=>O,openSidebar:()=>f("right",{id:t}),closeSidebar:()=>m("right",{id:t}),dragSidebar:y=>h("right",y,{id:t})},w={draggingRef:b,currentXRef:E,prevXRef:I},x=()=>p.current!==null&&p.current!==t,_=()=>{const y=R.current;return y.length===0?!0:y[y.length-1]===t},X=()=>{if(x()){b.current=null;return}p.current=t,u("right")},D=()=>{p.current===t&&(p.current=null)},H=()=>{D(),u(null)};function B(y){if(r&&r!=="right"||x()||!_()||le(y.target)||y.changedTouches.length===0)return;const P=y.changedTouches[0],C=window.innerWidth,F=d.getIsOpen(),U=P.clientX>=C-e.edgeActivationWidthPx;F&&!e.swipeToClose||!F&&!e.swipeToOpen||(F||U)&&Se({refs:w,clientX:P.clientX,clientY:P.clientY,touchId:P.identifier,isMouse:!1})}function W(y){if(r&&r!=="right")return;if(x()){b.current=null;return}if(!b.current||b.current.isMouse)return;const P=b.current.activeTouchId,C=Me(y.changedTouches,P);C&&ut({refs:w,callbacks:d,currentX:C.clientX,preventDefault:()=>y.preventDefault(),lockPane:X,options:e})}function k(y){if(r&&r!=="right"||!b.current||b.current.isMouse)return;const P=b.current.activeTouchId;Ie(y.changedTouches,P)&&(D(),dt({refs:w,callbacks:d,options:e}))}function V(){r&&r!=="right"||!b.current||b.current.isMouse||(D(),$e({refs:w,dragSidebar:d.dragSidebar,onDeactivate:H}))}function j(y){if(r&&r!=="right"||x()||!_()||le(y.target)||y.button!==0)return;const P=window.innerWidth,C=d.getIsOpen(),F=y.clientX>=P-e.edgeActivationWidthPx;C&&!e.swipeToClose||!C&&!e.swipeToOpen||(C||F)&&Se({refs:w,clientX:y.clientX,clientY:y.clientY,touchId:null,isMouse:!0})}function J(y){if(!(r&&r!=="right")){if(x()){b.current=null;return}!b.current||!b.current.isMouse||ut({refs:w,callbacks:d,currentX:y.clientX,preventDefault:()=>y.preventDefault(),lockPane:X,options:e})}}function G(){r&&r!=="right"||!b.current||!b.current.isMouse||(D(),dt({refs:w,callbacks:d,options:e}))}return window.addEventListener("touchstart",B,{passive:!0}),window.addEventListener("touchmove",W,{passive:!1}),window.addEventListener("touchend",k,{passive:!0}),window.addEventListener("touchcancel",V,{passive:!0}),window.addEventListener("mousedown",j,{passive:!0}),window.addEventListener("mousemove",J,{passive:!1}),window.addEventListener("mouseup",G,{passive:!0}),()=>{window.removeEventListener("touchstart",B),window.removeEventListener("touchmove",W),window.removeEventListener("touchend",k),window.removeEventListener("touchcancel",V),window.removeEventListener("mousedown",j),window.removeEventListener("mousemove",J),window.removeEventListener("mouseup",G)}},[t,n,O,f,m,h,r,u,e,p,R])}function hn({id:e="primary",className:t,children:n,ToggleComponent:r,ariaLabel:u,defaultOpen:c,...f}){if(n?.type===M.Fragment)throw new Error("Fragments is not allowed in SwipeBarRight");const{rightSidebars:m,rightSidebarOptionsMap:h,closeSidebar:p,openSidebar:R,registerRightSidebar:O,unregisterRightSidebar:b}=K(),E=l.useRef(null),I=l.useRef(null);l.useEffect(()=>(O(e,{sidebarRef:E,toggleRef:I}),()=>b(e)),[e,O,b]);const d=_e("right",f,e),w=re(d.mediaQueryWidth);gn(d,e);const x=m[e]?.isOpen??!1,_=l.useCallback(()=>R("right",{id:e,skipTransition:!0}),[R,e]),{forceOverlayVisible:X}=De({defaultOpen:c,optionsReady:!!h[e],onOpen:_}),D=l.useCallback(()=>p("right",{id:e}),[p,e]);return ke({sidebarRef:E,triggerRef:I,isOpen:x,onClose:D,transitionMs:d.transitionMs}),M.jsxs(M.Fragment,{children:[d.showOverlay&&M.jsx(Re,{isCollapsed:!x&&!X,setCollapsed:()=>p("right",{id:e}),closeSidebarOnClick:d.closeSidebarOnOverlayClick,transitionMs:d.transitionMs,overlayBackgroundColor:d.overlayBackgroundColor,overlayZIndex:d.overlayZIndex}),M.jsx(lt,{id:e,toggleRef:I,options:d,showToggle:d.showToggle,ToggleComponent:r}),M.jsx("div",{ref:E,id:`swipebar-right-${e}`,role:"dialog","aria-modal":x,"aria-label":u??"Right sidebar",inert:!x,style:{...He,...Vt,...d.isAbsolute||w?Jt:{},...t?{}:{backgroundColor:Ee},zIndex:d.swipeBarZIndex,...c?{transform:"translateX(0px)",width:`${d.sidebarWidthPx}px`}:{}},className:t,children:n})]})}Q.Overlay=Re,Q.SwipeBarBottom=un,Q.SwipeBarLeft=fn,Q.SwipeBarProvider=Et,Q.SwipeBarRight=hn,Q.ToggleBottom=tt,Q.ToggleLeft=st,Q.ToggleRight=lt,Q.useMediaQuery=re,Q.useSwipeBarContext=K,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})}));
@@ -56,6 +56,11 @@ export type TSwipeSidebar = TSwipeBarOptions & {
56
56
  ToggleComponent?: ReactElement;
57
57
  children?: ReactElement;
58
58
  ariaLabel?: string;
59
+ defaultOpen?: boolean;
60
+ };
61
+ export type TLeftRightSidebarState = {
62
+ isOpen: boolean;
63
+ meta: unknown;
59
64
  };
60
65
  export type TBottomSidebarState = {
61
66
  isOpen: boolean;
@@ -71,6 +76,7 @@ export type TSidebarOpts = {
71
76
  id?: string;
72
77
  meta?: unknown;
73
78
  resetMeta?: boolean;
79
+ skipTransition?: boolean;
74
80
  };
75
81
  export type TToggle = {
76
82
  side: TSidebarSide;
@@ -194,6 +200,7 @@ type TApplyOpenPaneStyles = {
194
200
  toggleRef: RefObject<HTMLDivElement | null>;
195
201
  afterApply: () => void;
196
202
  };
203
+ export declare const applyOpenPaneStylesImmediate: ({ ref, side, options, toggleRef, afterApply, }: TApplyOpenPaneStyles) => void;
197
204
  export declare const applyOpenPaneStyles: ({ ref, side, options, toggleRef, afterApply, }: TApplyOpenPaneStyles) => void;
198
205
  type TApplyClosePaneStyles = {
199
206
  ref: RefObject<HTMLDivElement | null>;
@@ -209,6 +216,7 @@ type TApplyMidAnchorPaneStyles = {
209
216
  toggleRef: RefObject<HTMLDivElement | null>;
210
217
  afterApply: () => void;
211
218
  };
219
+ export declare const applyMidAnchorPaneStylesImmediate: ({ ref, options, toggleRef, afterApply, }: TApplyMidAnchorPaneStyles) => void;
212
220
  export declare const applyMidAnchorPaneStyles: ({ ref, options, toggleRef, afterApply, }: TApplyMidAnchorPaneStyles) => void;
213
221
  type TApplyDragPaneStyles = {
214
222
  ref: RefObject<HTMLDivElement | null>;
@@ -1 +1 @@
1
- {"version":3,"file":"swipeSidebarShared.d.ts","sourceRoot":"","sources":["../src/swipeSidebarShared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,YAAY,EAAE,KAAK,SAAS,EAAsB,MAAM,OAAO,CAAC;AAGlG,MAAM,MAAM,iBAAiB,GAAG;IAC/B,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,OAAO,EAAE,OAAO,CA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AAG,IAAI,KACtB,OAOF,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,MAAM,YAAY,EAAE,SAAS,gBAAgB,EAAE,KAAK,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;CAmH7F,CAAC"}
@@ -14,18 +14,18 @@ export declare function makeDragRefsY(overrides?: {
14
14
  }): TDragRefsY;
15
15
  export declare function makeCallbacks(): {
16
16
  getIsOpen: import('vitest').Mock<() => boolean>;
17
- openSidebar: import('vitest').Mock<(...args: any[]) => any>;
18
- closeSidebar: import('vitest').Mock<(...args: any[]) => any>;
19
- dragSidebar: import('vitest').Mock<(...args: any[]) => any>;
17
+ openSidebar: import('vitest').Mock<import('@vitest/spy').Procedure>;
18
+ closeSidebar: import('vitest').Mock<import('@vitest/spy').Procedure>;
19
+ dragSidebar: import('vitest').Mock<import('@vitest/spy').Procedure>;
20
20
  };
21
21
  export declare function makeBottomCallbacks(): {
22
22
  getBottomAnchorState: import('vitest').Mock<() => "closed" | "midAnchor" | "open">;
23
- openToMidAnchor: import('vitest').Mock<(...args: any[]) => any>;
24
- openSidebarFully: import('vitest').Mock<(...args: any[]) => any>;
23
+ openToMidAnchor: import('vitest').Mock<import('@vitest/spy').Procedure>;
24
+ openSidebarFully: import('vitest').Mock<import('@vitest/spy').Procedure>;
25
25
  getIsOpen: import('vitest').Mock<() => boolean>;
26
- openSidebar: import('vitest').Mock<(...args: any[]) => any>;
27
- closeSidebar: import('vitest').Mock<(...args: any[]) => any>;
28
- dragSidebar: import('vitest').Mock<(...args: any[]) => any>;
26
+ openSidebar: import('vitest').Mock<import('@vitest/spy').Procedure>;
27
+ closeSidebar: import('vitest').Mock<import('@vitest/spy').Procedure>;
28
+ dragSidebar: import('vitest').Mock<import('@vitest/spy').Procedure>;
29
29
  };
30
30
  export declare function makeOptions(overrides?: Partial<TSwipeBarOptions>): Required<TSwipeBarOptions>;
31
31
  export declare function makeTouchList(...touches: Array<{
@@ -0,0 +1,10 @@
1
+ type TUseDefaultOpen = {
2
+ defaultOpen: boolean | undefined;
3
+ optionsReady: boolean;
4
+ onOpen: () => void;
5
+ };
6
+ export declare function useDefaultOpen({ defaultOpen, optionsReady, onOpen }: TUseDefaultOpen): {
7
+ forceOverlayVisible: boolean;
8
+ };
9
+ export {};
10
+ //# sourceMappingURL=useDefaultOpen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDefaultOpen.d.ts","sourceRoot":"","sources":["../src/useDefaultOpen.ts"],"names":[],"mappings":"AAEA,KAAK,eAAe,GAAG;IACtB,WAAW,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,MAAM,IAAI,CAAC;CACnB,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,eAAe;;EAsBpF"}
@@ -1 +1 @@
1
- {"version":3,"file":"useFocusTrap.d.ts","sourceRoot":"","sources":["../src/useFocusTrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAW1D,KAAK,aAAa,GAAG;IACpB,UAAU,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC1C,UAAU,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC1C,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC5B,UAAU,EACV,UAAU,EACV,MAAM,EACN,OAAO,EACP,YAAY,GACZ,EAAE,aAAa,QAmEf"}
1
+ {"version":3,"file":"useFocusTrap.d.ts","sourceRoot":"","sources":["../src/useFocusTrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAc1D,KAAK,aAAa,GAAG;IACpB,UAAU,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC1C,UAAU,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC1C,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC5B,UAAU,EACV,UAAU,EACV,MAAM,EACN,OAAO,EACP,YAAY,GACZ,EAAE,aAAa,QAyEf"}
@@ -1,31 +1,58 @@
1
1
  import { TSwipeSidebarContextInternal } from './SwipeBarProvider';
2
- import { TBottomSidebarState, TSidebarMetaMap, TSidebarSide } from './swipeSidebarShared';
2
+ import { TBottomSidebarState, TLeftRightSidebarState, TSidebarMetaMap, TSidebarSide } from './swipeSidebarShared';
3
3
 
4
- type TLeftRightOpts<TMap extends TSidebarMetaMap, S extends "left" | "right"> = S extends keyof TMap ? {
4
+ type TLeftRightOpts<TMap extends TSidebarMetaMap, S extends "left" | "right"> = S extends keyof TMap ? TMap[S] extends Record<string, unknown> ? {
5
+ [K in string & keyof TMap[S]]: {
6
+ id: K;
7
+ meta?: TMap[S][K];
8
+ resetMeta?: boolean;
9
+ skipTransition?: boolean;
10
+ };
11
+ }[string & keyof TMap[S]] | {
12
+ id?: string;
13
+ meta?: never;
14
+ resetMeta?: boolean;
15
+ skipTransition?: boolean;
16
+ } : {
17
+ id?: string;
5
18
  meta?: TMap[S];
6
19
  resetMeta?: boolean;
20
+ skipTransition?: boolean;
7
21
  } : {
22
+ id?: string;
8
23
  meta?: any;
9
24
  resetMeta?: boolean;
25
+ skipTransition?: boolean;
10
26
  };
11
27
  type TBottomSidebarOpts<TMap extends TSidebarMetaMap> = TMap["bottom"] extends Record<string, unknown> ? {
12
28
  [K in string & keyof TMap["bottom"]]: {
13
29
  id: K;
14
30
  meta?: TMap["bottom"][K];
15
31
  resetMeta?: boolean;
32
+ skipTransition?: boolean;
16
33
  };
17
34
  }[string & keyof TMap["bottom"]] | {
18
35
  id?: string;
19
36
  meta?: never;
20
37
  resetMeta?: boolean;
38
+ skipTransition?: boolean;
21
39
  } : {
22
40
  id?: string;
23
41
  meta?: any;
24
42
  resetMeta?: boolean;
43
+ skipTransition?: boolean;
25
44
  };
26
45
  type TSidebarCallOpts<TMap extends TSidebarMetaMap, S extends TSidebarSide> = S extends "left" ? TLeftRightOpts<TMap, "left"> : S extends "right" ? TLeftRightOpts<TMap, "right"> : TBottomSidebarOpts<TMap>;
27
46
  type TSidebarFn<TMap extends TSidebarMetaMap> = <S extends TSidebarSide>(side: S, opts?: TSidebarCallOpts<TMap, S>) => void;
28
- type TLeftRightSetMeta<TMap extends TSidebarMetaMap, S extends "left" | "right"> = S extends keyof TMap ? TMap[S] | null : any;
47
+ type TLeftRightSetMeta<TMap extends TSidebarMetaMap, S extends "left" | "right"> = S extends keyof TMap ? TMap[S] extends Record<string, unknown> ? {
48
+ [K in string & keyof TMap[S]]: {
49
+ id: K;
50
+ meta: TMap[S][K] | null;
51
+ };
52
+ }[string & keyof TMap[S]] | {
53
+ id: string;
54
+ meta: never;
55
+ } : TMap[S] | null : any;
29
56
  type TBottomSetMetaOpts<TMap extends TSidebarMetaMap> = TMap["bottom"] extends Record<string, unknown> ? {
30
57
  [K in string & keyof TMap["bottom"]]: {
31
58
  id: K;
@@ -40,17 +67,24 @@ type TBottomSetMetaOpts<TMap extends TSidebarMetaMap> = TMap["bottom"] extends R
40
67
  };
41
68
  type TSetMetaCallArg<TMap extends TSidebarMetaMap, S extends TSidebarSide> = S extends "left" ? TLeftRightSetMeta<TMap, "left"> : S extends "right" ? TLeftRightSetMeta<TMap, "right"> : TBottomSetMetaOpts<TMap>;
42
69
  type TSetMetaFn<TMap extends TSidebarMetaMap> = <S extends TSidebarSide>(side: S, metaOrOpts: TSetMetaCallArg<TMap, S>) => void;
70
+ type TTypedLeftRightSidebars<TMap extends TSidebarMetaMap, S extends "left" | "right"> = S extends keyof TMap ? TMap[S] extends Record<string, unknown> ? {
71
+ [K in keyof TMap[S]]: TLeftRightSidebarState & {
72
+ meta: TMap[S][K] | null;
73
+ };
74
+ } & Record<string, TLeftRightSidebarState> : Record<string, TLeftRightSidebarState> : Record<string, TLeftRightSidebarState>;
43
75
  type TTypedBottomSidebars<TMap extends TSidebarMetaMap> = TMap["bottom"] extends Record<string, unknown> ? {
44
76
  [K in keyof TMap["bottom"]]: TBottomSidebarState & {
45
77
  meta: TMap["bottom"][K] | null;
46
78
  };
47
79
  } & Record<string, TBottomSidebarState> : Record<string, TBottomSidebarState>;
48
- type TSwipeSidebarContext<TMap extends TSidebarMetaMap = object> = Omit<TSwipeSidebarContextInternal, "openSidebar" | "closeSidebar" | "openSidebarFully" | "openSidebarToMidAnchor" | "setMeta" | "bottomSidebars" | "leftMeta" | "rightMeta"> & {
80
+ type TSwipeSidebarContext<TMap extends TSidebarMetaMap = object> = Omit<TSwipeSidebarContextInternal, "openSidebar" | "closeSidebar" | "openSidebarFully" | "openSidebarToMidAnchor" | "setMeta" | "leftSidebars" | "rightSidebars" | "bottomSidebars" | "leftMeta" | "rightMeta"> & {
49
81
  openSidebar: TSidebarFn<TMap>;
50
82
  closeSidebar: TSidebarFn<TMap>;
51
83
  openSidebarFully: TSidebarFn<TMap>;
52
84
  openSidebarToMidAnchor: TSidebarFn<TMap>;
53
85
  setMeta: TSetMetaFn<TMap>;
86
+ leftSidebars: TTypedLeftRightSidebars<TMap, "left">;
87
+ rightSidebars: TTypedLeftRightSidebars<TMap, "right">;
54
88
  bottomSidebars: TTypedBottomSidebars<TMap>;
55
89
  leftMeta: "left" extends keyof TMap ? TMap["left"] | null : any;
56
90
  rightMeta: "right" extends keyof TMap ? TMap["right"] | null : any;
@@ -1 +1 @@
1
- {"version":3,"file":"useSwipeBarContext.d.ts","sourceRoot":"","sources":["../src/useSwipeBarContext.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,KAAK,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAC5F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d,kBAAkB,GAClB,wBAAwB,GACxB,SAAS,GACT,cAAc,GACd,eAAe,GACf,gBAAgB,GAChB,UAAU,GACV,WAAW,CACb,GAAG;IACH,WAAW,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;IAC9B,YAAY,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;IAC/B,gBAAgB,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;IACnC,sBAAsB,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;IACzC,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;IAC1B,YAAY,EAAE,uBAAuB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACpD,aAAa,EAAE,uBAAuB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACtD,cAAc,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAE3C,QAAQ,EAAE,MAAM,SAAS,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,GAAG,CAAC;IAEhE,SAAS,EAAE,OAAO,SAAS,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,GAAG,CAAC;CACnE,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,IAAI,SAAS,eAAe,GAAG,MAAM,KAK1C,oBAAoB,CAAC,IAAI,CAAC,CACvD"}
@@ -16,5 +16,5 @@ export type HandleLeftDragEndProps = {
16
16
  options: Required<TSwipeBarOptions>;
17
17
  };
18
18
  export declare const handleLeftDragEnd: ({ refs, callbacks, options }: HandleLeftDragEndProps) => void;
19
- export declare function useSwipeLeftSidebar(options: Required<TSwipeBarOptions>): void;
19
+ export declare function useSwipeLeftSidebar(options: Required<TSwipeBarOptions>, id: string): void;
20
20
  //# sourceMappingURL=useSwipeLeftSidebar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSwipeLeftSidebar.d.ts","sourceRoot":"","sources":["../src/useSwipeLeftSidebar.ts"],"names":[],"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BAAgB,CAAC,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,mEAOhC,uBAAuB,SAsDzB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACpC,IAAI,EAAE,SAAS,CAAC;IAChB,cAAc,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACvD,SAAS,EAAE,iBAAiB,CAAC;IAC7B,OAAO,EAAE,QAAQ,CAAC,gBAAgB,CAAC,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,8BAA8B,sBAAsB,SAwCrF,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,EAAE,EAAE,MAAM,QAoOlF"}
@@ -16,5 +16,5 @@ export type HandleRightDragEndProps = {
16
16
  options: Required<TSwipeBarOptions>;
17
17
  };
18
18
  export declare const handleRightDragEnd: ({ refs, callbacks, options }: HandleRightDragEndProps) => void;
19
- export declare function useSwipeRightSidebar(options: Required<TSwipeBarOptions>): void;
19
+ export declare function useSwipeRightSidebar(options: Required<TSwipeBarOptions>, id: string): void;
20
20
  //# sourceMappingURL=useSwipeRightSidebar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSwipeRightSidebar.d.ts","sourceRoot":"","sources":["../src/useSwipeRightSidebar.ts"],"names":[],"mappings":"AACA,OAAO,EAMN,KAAK,SAAS,EAEd,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,MAAM,sBAAsB,CAAC;AAI9B,MAAM,MAAM,wBAAwB,GAAG;IACtC,IAAI,EAAE,SAAS,CAAC;IAChB,SAAS,EAAE,iBAAiB,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,QAAQ,CAAC,gBAAgB,CAAC,CAAC;CACpC,CA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uBAAuB,SA0CvF,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,EAAE,EAAE,MAAM,QAsOnF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luciodale/swipe-bar",
3
- "version": "1.3.4",
3
+ "version": "1.3.6",
4
4
  "author": "Lucio D'Alessandro",
5
5
  "repository": {
6
6
  "type": "git",