react-beauty-calendar 1.1.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/@types/calendar-instance.d.ts +9 -2
  2. package/dist/build/assets/main.css +1 -1
  3. package/dist/build/main.cjs.js +46 -37
  4. package/dist/build/main.es.js +6939 -6424
  5. package/dist/components/ui/Button.d.ts +1 -1
  6. package/dist/context/drag/dragStore.d.ts +4 -4
  7. package/dist/context/drag/useDragStateAtStore.d.ts +8 -0
  8. package/dist/context/global/config/ConfigProvider.d.ts +5 -0
  9. package/dist/context/global/config/config-context.d.ts +2 -0
  10. package/dist/context/global/config/config-store.d.ts +13 -0
  11. package/dist/context/global/days-and-week/day-and-week-store.d.ts +2 -0
  12. package/dist/context/index.d.ts +3 -1
  13. package/dist/context/new-event/new-event-store.d.ts +2 -0
  14. package/dist/core/Root.d.ts +1 -1
  15. package/dist/core/booking-card/BookingCard.d.ts +8 -2
  16. package/dist/core/booking-create/BookingCreate.d.ts +17 -0
  17. package/dist/core/calendar/CalendarHolder.d.ts +4 -1
  18. package/dist/core/calendar/ViewTypes.d.ts +3 -5
  19. package/dist/core/slots/Card.d.ts +5 -1
  20. package/dist/core/slots/CardBlockContent.d.ts +8 -0
  21. package/dist/core/slots/CardContent.d.ts +9 -2
  22. package/dist/core/slots/CardOverlay.d.ts +1 -1
  23. package/dist/core/slots/EventsTab.d.ts +4 -5
  24. package/dist/core/slots/SlotRender.d.ts +14 -0
  25. package/dist/core/slots/Slots.d.ts +2 -3
  26. package/dist/core/slots/TimeInfo.d.ts +6 -1
  27. package/dist/core/slots/useResizableCardHook.d.ts +3 -1
  28. package/dist/hooks/use-booking-model.d.ts +1 -1
  29. package/dist/hooks/useGlobalConfig.d.ts +3 -0
  30. package/dist/mock/booking-mock.d.ts +2 -1
  31. package/dist/utils/date-utils.d.ts +4 -0
  32. package/dist/utils/hours.d.ts +1 -1
  33. package/package.json +1 -1
@@ -1,108 +1,113 @@
1
- "use strict";require('./assets/main.css');var Uu=Object.defineProperty;var Ku=(e,t,n)=>t in e?Uu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var wt=(e,t,n)=>Ku(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react/jsx-runtime"),R=require("react"),Ke=require("react-dom");function ya(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const S=ya(R),Sr=ya(Ke);class nn extends ReferenceError{constructor(t="Reference error"){super(t),this.name="ReferenceErrorCustom"}}const Gu=R.createContext(null),Ks=e=>{let t;const n=new Set,r=(l,f)=>{const u=typeof l=="function"?l(t):l;if(!Object.is(u,t)){const b=t;t=f??(typeof u!="object"||u===null)?u:Object.assign({},t,u),n.forEach(y=>y(t,b))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>c,subscribe:l=>(n.add(l),()=>n.delete(l))},c=t=e(r,o,a);return a},Cr=e=>e?Ks(e):Ks,qu=e=>e;function Uo(e,t=qu){const n=R.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return R.useDebugValue(n),n}const Gs=e=>{const t=Cr(e),n=r=>Uo(t,r);return Object.assign(n,t),n},Ko=e=>e?Gs(e):Gs,ba={selectedDate:new Date,isBookingLoading:!1,bookingModalState:!1,selectedHour:"",cardsRef:new Map},Xu=e=>Cr(t=>({...ba,...e,clearDraggingBookings:()=>t(n=>({...n,draggingBooking:null})),changeNewBookingStateModal:()=>t({bookingModalState:!0}),openNewBookingModal:(n,r)=>{n&&t({selectedDate:n}),r&&t({selectedHour:r})},setIsBookingLoading:()=>t({isBookingLoading:!0}),setSelectedDate:n=>t(r=>({...r,selectedDate:n})),setSelectedHour:n=>t(r=>({...r,selectedHour:n})),setCardRef:(n,r)=>t(o=>({...o,cardsRef:o.cardsRef.set(n,r)}))})),Zu=({children:e,...t})=>{const n=R.useRef(null);return n.current||(n.current=Xu(t)),h.jsx(Gu,{value:n.current,children:e})},wa=R.createContext(void 0),Ju=({children:e,...t})=>h.jsx(wa,{value:{...t},children:e}),xa=R.createContext(null),ne={DAY:"day",WEEK:"week",TABLE:"table",MONTH:"month"},jt=["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],Sa={month:new Date().getMonth(),fullYear:new Date().getFullYear(),monthMessage:""},Qu=e=>Cr((t,n)=>({...e,...Sa,updateMonthMessage:r=>{t(o=>({...o,...r}))},updateHeaderDateLabel:r=>{n().updateMonthMessage({month:r.getMonth(),fullYear:r.getFullYear(),monthMessage:jt[r.getMonth()]})}})),ed=({children:e,...t})=>{const n=R.useRef(null);return n.current||(n.current=Qu(t)),h.jsx(xa,{value:n.current,children:e})},cr=e=>{const t=new Date(e.key),n=t.getDate().toString().padStart(2,"0"),r=(t.getMonth()+1).toString().padStart(2,"0");return`${`${t.getFullYear()}-${r}-${n}`};${e.time}`},Ht=Ko((e,t)=>({emptySlotNodes:new Map,selectedNode:"",setEmptySlotNode:(n,r)=>{e(o=>{const s=new Map(o.emptySlotNodes);s.size>447&&s.clear();const c=cr(r);return s.set(c,n),{...o,emptySlotNodes:s}})},setSelectedNode:n=>{const r=new Map(t().emptySlotNodes),o=t().selectedNode;e(s=>{if(o.length){const i=r.get(o);i&&i.closeEvent()}return{...s,selectedNode:n}})},resetNodes:()=>{e(n=>{const r=new Map(n.emptySlotNodes);return r.clear(),{...n,emptySlotNodes:r}})},resetSelectedNode:()=>e(n=>({...n,selectedNode:""}))})),Ca=6e4,qs=Symbol.for("constructDateFrom");function td(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&qs in e?e[qs](t):e instanceof Date?new e.constructor(t):new Date(t)}function So(e,t){return td(e,e)}function nd(e,t,n){const r=So(e);return r.setTime(r.getTime()+t*Ca),r}function rd(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function od(e,t){return+So(e)-+So(t)}function sd(e,t,n){const r=od(e,t)/Ca;return rd(n==null?void 0:n.roundingMethod)(r)}function id(e,t,n){return nd(e,-t)}function ad(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function cd(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var rr={exports:{}},ld=rr.exports,Xs;function ud(){return Xs||(Xs=1,function(e,t){(function(n,r){e.exports=r()})(ld,function(){var n=1e3,r=6e4,o=36e5,s="millisecond",i="second",a="minute",c="hour",l="day",f="week",u="month",b="quarter",y="year",C="date",p="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,d={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(j){var F=["th","st","nd","rd"],k=j%100;return"["+j+(F[(k-20)%10]||F[k]||F[0])+"]"}},m=function(j,F,k){var N=String(j);return!N||N.length>=F?j:""+Array(F+1-N.length).join(k)+j},E={s:m,z:function(j){var F=-j.utcOffset(),k=Math.abs(F),N=Math.floor(k/60),M=k%60;return(F<=0?"+":"-")+m(N,2,"0")+":"+m(M,2,"0")},m:function j(F,k){if(F.date()<k.date())return-j(k,F);var N=12*(k.year()-F.year())+(k.month()-F.month()),M=F.clone().add(N,u),A=k-M<0,O=F.clone().add(N+(A?-1:1),u);return+(-(N+(k-M)/(A?M-O:O-M))||0)},a:function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},p:function(j){return{M:u,y,w:f,d:l,D:C,h:c,m:a,s:i,ms:s,Q:b}[j]||String(j||"").toLowerCase().replace(/s$/,"")},u:function(j){return j===void 0}},v="en",T={};T[v]=d;var w="$isDayjsObject",D=function(j){return j instanceof H||!(!j||!j[w])},P=function j(F,k,N){var M;if(!F)return v;if(typeof F=="string"){var A=F.toLowerCase();T[A]&&(M=A),k&&(T[A]=k,M=A);var O=F.split("-");if(!M&&O.length>1)return j(O[0])}else{var L=F.name;T[L]=F,M=L}return!N&&M&&(v=M),M||!N&&v},_=function(j,F){if(D(j))return j.clone();var k=typeof F=="object"?F:{};return k.date=j,k.args=arguments,new H(k)},I=E;I.l=P,I.i=D,I.w=function(j,F){return _(j,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var H=function(){function j(k){this.$L=P(k.locale,null,!0),this.parse(k),this.$x=this.$x||k.x||{},this[w]=!0}var F=j.prototype;return F.parse=function(k){this.$d=function(N){var M=N.date,A=N.utc;if(M===null)return new Date(NaN);if(I.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var O=M.match(x);if(O){var L=O[2]-1||0,U=(O[7]||"0").substring(0,3);return A?new Date(Date.UTC(O[1],L,O[3]||1,O[4]||0,O[5]||0,O[6]||0,U)):new Date(O[1],L,O[3]||1,O[4]||0,O[5]||0,O[6]||0,U)}}return new Date(M)}(k),this.init()},F.init=function(){var k=this.$d;this.$y=k.getFullYear(),this.$M=k.getMonth(),this.$D=k.getDate(),this.$W=k.getDay(),this.$H=k.getHours(),this.$m=k.getMinutes(),this.$s=k.getSeconds(),this.$ms=k.getMilliseconds()},F.$utils=function(){return I},F.isValid=function(){return this.$d.toString()!==p},F.isSame=function(k,N){var M=_(k);return this.startOf(N)<=M&&M<=this.endOf(N)},F.isAfter=function(k,N){return _(k)<this.startOf(N)},F.isBefore=function(k,N){return this.endOf(N)<_(k)},F.$g=function(k,N,M){return I.u(k)?this[N]:this.set(M,k)},F.unix=function(){return Math.floor(this.valueOf()/1e3)},F.valueOf=function(){return this.$d.getTime()},F.startOf=function(k,N){var M=this,A=!!I.u(N)||N,O=I.p(k),L=function(W,B){var Z=I.w(M.$u?Date.UTC(M.$y,B,W):new Date(M.$y,B,W),M);return A?Z:Z.endOf(l)},U=function(W,B){return I.w(M.toDate()[W].apply(M.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(B)),M)},Y=this.$W,V=this.$M,X=this.$D,G="set"+(this.$u?"UTC":"");switch(O){case y:return A?L(1,0):L(31,11);case u:return A?L(1,V):L(0,V+1);case f:var $=this.$locale().weekStart||0,q=(Y<$?Y+7:Y)-$;return L(A?X-q:X+(6-q),V);case l:case C:return U(G+"Hours",0);case c:return U(G+"Minutes",1);case a:return U(G+"Seconds",2);case i:return U(G+"Milliseconds",3);default:return this.clone()}},F.endOf=function(k){return this.startOf(k,!1)},F.$set=function(k,N){var M,A=I.p(k),O="set"+(this.$u?"UTC":""),L=(M={},M[l]=O+"Date",M[C]=O+"Date",M[u]=O+"Month",M[y]=O+"FullYear",M[c]=O+"Hours",M[a]=O+"Minutes",M[i]=O+"Seconds",M[s]=O+"Milliseconds",M)[A],U=A===l?this.$D+(N-this.$W):N;if(A===u||A===y){var Y=this.clone().set(C,1);Y.$d[L](U),Y.init(),this.$d=Y.set(C,Math.min(this.$D,Y.daysInMonth())).$d}else L&&this.$d[L](U);return this.init(),this},F.set=function(k,N){return this.clone().$set(k,N)},F.get=function(k){return this[I.p(k)]()},F.add=function(k,N){var M,A=this;k=Number(k);var O=I.p(N),L=function(V){var X=_(A);return I.w(X.date(X.date()+Math.round(V*k)),A)};if(O===u)return this.set(u,this.$M+k);if(O===y)return this.set(y,this.$y+k);if(O===l)return L(1);if(O===f)return L(7);var U=(M={},M[a]=r,M[c]=o,M[i]=n,M)[O]||1,Y=this.$d.getTime()+k*U;return I.w(Y,this)},F.subtract=function(k,N){return this.add(-1*k,N)},F.format=function(k){var N=this,M=this.$locale();if(!this.isValid())return M.invalidDate||p;var A=k||"YYYY-MM-DDTHH:mm:ssZ",O=I.z(this),L=this.$H,U=this.$m,Y=this.$M,V=M.weekdays,X=M.months,G=M.meridiem,$=function(B,Z,z,oe){return B&&(B[Z]||B(N,A))||z[Z].slice(0,oe)},q=function(B){return I.s(L%12||12,B,"0")},W=G||function(B,Z,z){var oe=B<12?"AM":"PM";return z?oe.toLowerCase():oe};return A.replace(g,function(B,Z){return Z||function(z){switch(z){case"YY":return String(N.$y).slice(-2);case"YYYY":return I.s(N.$y,4,"0");case"M":return Y+1;case"MM":return I.s(Y+1,2,"0");case"MMM":return $(M.monthsShort,Y,X,3);case"MMMM":return $(X,Y);case"D":return N.$D;case"DD":return I.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return $(M.weekdaysMin,N.$W,V,2);case"ddd":return $(M.weekdaysShort,N.$W,V,3);case"dddd":return V[N.$W];case"H":return String(L);case"HH":return I.s(L,2,"0");case"h":return q(1);case"hh":return q(2);case"a":return W(L,U,!0);case"A":return W(L,U,!1);case"m":return String(U);case"mm":return I.s(U,2,"0");case"s":return String(N.$s);case"ss":return I.s(N.$s,2,"0");case"SSS":return I.s(N.$ms,3,"0");case"Z":return O}return null}(B)||O.replace(":","")})},F.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},F.diff=function(k,N,M){var A,O=this,L=I.p(N),U=_(k),Y=(U.utcOffset()-this.utcOffset())*r,V=this-U,X=function(){return I.m(O,U)};switch(L){case y:A=X()/12;break;case u:A=X();break;case b:A=X()/3;break;case f:A=(V-Y)/6048e5;break;case l:A=(V-Y)/864e5;break;case c:A=V/o;break;case a:A=V/r;break;case i:A=V/n;break;default:A=V}return M?A:I.a(A)},F.daysInMonth=function(){return this.endOf(u).$D},F.$locale=function(){return T[this.$L]},F.locale=function(k,N){if(!k)return this.$L;var M=this.clone(),A=P(k,N,!0);return A&&(M.$L=A),M},F.clone=function(){return I.w(this.$d,this)},F.toDate=function(){return new Date(this.valueOf())},F.toJSON=function(){return this.isValid()?this.toISOString():null},F.toISOString=function(){return this.$d.toISOString()},F.toString=function(){return this.$d.toUTCString()},j}(),K=H.prototype;return _.prototype=K,[["$ms",s],["$s",i],["$m",a],["$H",c],["$W",l],["$M",u],["$y",y],["$D",C]].forEach(function(j){K[j[1]]=function(F){return this.$g(F,j[0],j[1])}}),_.extend=function(j,F){return j.$i||(j(F,H,_),j.$i=!0),_},_.locale=P,_.isDayjs=D,_.unix=function(j){return _(1e3*j)},_.en=T[v],_.Ls=T,_.p={},_})}(rr)),rr.exports}var dd=ud();const Zs=ad(dd),Co=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],fd=["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],te={findIndexToStart(e=new Date){const t=Co[e.getDay()];return this.findActualDayIndex(t)},findActualDayIndex(e){return Co.indexOf(e)},generateWeekDays(e){const t=this.findIndexToStart(e);return{week:new Array(7).fill(0).map((o,s)=>{const i=e||new Date,a=s-t;return new Date(i.getFullYear(),i.getMonth(),i.getDate()+a)})}},generateDays(e,t){const n=[],r=new Date(e.getFullYear(),e.getMonth(),e.getDate()+t);return n.push(r),n},addDay(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t)},formatDate(e){return e.split(" ").slice(2,3).join(",").replace(","," | ")},dateTimeAsString(e){const t=String(e.getHours()).padStart(2,"0"),n=String(e.getMinutes()).padStart(2,"0");return`${t}:${n}`},minuteDifference(e,t){return sd(e,t)},dateAndHourDateToString(e){const t=new Date(e);return`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`},shortMonthDescription(...e){return`${jt[e[0].getMonth()].slice(0,3)} - ${jt[e[1].getMonth()].slice(0,3)}`},timeDiffInSeconds(e,t){const n=Zs(e),r=Zs(t);return n.diff(r)/6e4},subtractMinutes(e,t){return id(e,t)},addMinuteToHour(e,t){return`${e.split(":")[0]}:${t}`},dateToString(e){return new Date(e).toTimeString()},dateToStringSelected(e){return new Date(e).toDateString()},roundMinutes(e){return e>=15&&e<30?15:e>=30&&e<45?30:e>=45&&e<60?45:0},hourMinutesStringToDate(e){const t=new Date,[n,r]=e.split(":");return t.setHours(Number(n),Number(r)),t},addMinutesToDate(e,t){const n=new Date(e);return n.setHours(n.getHours(),n.getMinutes()+t,n.getMinutes()),n},newDateKey(e,t){const n=new Date(e);return n.setHours(Number(t.split(":")[0])),n.setMinutes(Number(t.split(":")[1])),n.toISOString()},addMinutesToHour(e,t){const n=te.hourMinutesStringToDate(e),r=te.addMinutesToDate(n,t);return te.dateAndHourDateToString(r)},convertStringTimeToDateFormat(e){const t=new Date,[n,r]=e.split(":");return t.setHours(Number(n),Number(r),0,0),t},isTodayDate(e){const t=new Date,n=e.getDate()===t.getDate(),r=e.getMonth()===t.getMonth(),o=e.getFullYear()===t.getFullYear();return n&&r&&o},firstAndLastWeekDays(e){return{firstDayOfWeek:e[0],lastDayOfWeek:e[e.length-1]}},generateWeekMonthLabel(e){const{firstDayOfWeek:t,lastDayOfWeek:n}=te.firstAndLastWeekDays(e),r=t.getMonth();return r!==n.getMonth()?te.shortMonthDescription(t,n):jt[r]}},Eo={date:"",startAt:"",finishAt:""},pd=e=>Cr((t,n)=>({...Eo,...e,updateForm:r=>t(o=>({...o,...r})),updateDynamicForm:(r,o)=>t(s=>({...s,[r]:o})),updateStartAt:r=>t(o=>({...o,startAt:r})),updateFinishAt:r=>t(o=>({...o,finishAt:r})),updateFinishAtWithOffset:(r,o=15)=>{const s=te.addMinutesToHour(r,o);return n().updateFinishAt(s),s},updateClient:(r,o)=>t(s=>({...s,client:{id:r,name:o}})),updateDate:r=>t(o=>({...o,date:r})),resetForm:()=>t(Eo)})),Ea=R.createContext(null),hd=({children:e,ref:t,...n})=>{const r=R.useRef(null);r.current||(r.current=pd(n));const o=s=>{var i;(i=r.current)==null||i.getState().updateFinishAt(s)};return R.useImperativeHandle(t,()=>({updateFinishAt:o})),h.jsx(Ea,{value:r.current,children:e})},gd=(e,t)=>({users:[],bookingViewType:"week",bookingBulkData:{user:{id:"",profile:{id:"",name:""}},booking:[]},updateUsers:n=>e(r=>({...r,users:n})),setBookingBulkData:n=>e(r=>({...r,bookingBulkData:{...n}})),updatingBookingBulkData:(n,r)=>{e(o=>{const s=o.bookingBulkData.booking.map(i=>new Date(i.startAt).getDate()===r&&n.id===i.id?n:i);return{...o,bookingBulkData:{...o.bookingBulkData,booking:s}}})},resetBookingResponse:()=>e(n=>({...n,bookingResponse:null})),setBookingViewType:n=>e(r=>({...r,bookingViewType:n})),optimisticCardUpdate:(n,r,o,s)=>{const i={...n,startAt:r,finishAt:o},a=new Date(s.day).getDate();t().updatingBookingBulkData(i,a)}}),md=(e,t,n)=>{const r=[],o=new Date(`1970/01/01 ${e}`),s=new Date(`1970/01/01 ${t}`);for(;o<s;){const i=te.dateTimeAsString(o);o.setMinutes(o.getMinutes()+n),r.push(i)}return r},vd="08:00",yd="23:30",bd=60,wd=te.generateWeekDays(),xd=(e,t)=>({hours:md(vd,yd,bd),daysOfWeek:wd.week,timesRendered:new Map,setTodayDay:n=>{const r=te.generateDays(n,0);return e(o=>({...o,daysOfWeek:r,lastDayOfWeek:r[0]||new Date})),r[0]},todayWeek:n=>{let r=[];return e(o=>{const{week:s}=te.generateWeekDays(n);return r=s,{...o,daysOfWeek:s}}),r},nextWeek:()=>{const n=te.addDay(t().getWeek().lastDayOfWeek,1);let r=[];const{week:o}=te.generateWeekDays(n);return r=o,e(s=>({...s,daysOfWeek:o})),r},previousWeek:()=>{const n=te.addDay(t().getWeek().firstDayOfWeek,-1);let r=[];const{week:o}=te.generateWeekDays(n);return r=o,e(s=>({...s,daysOfWeek:o})),r},setDays:n=>{const r=t().daysOfWeek[0];if(!r)return[];const o=te.generateDays(r,n);return e(s=>({...s,daysOfWeek:o})),o},getWeek:()=>{const n=t().daysOfWeek[0],r=t().daysOfWeek[t().daysOfWeek.length-1];return{firstDayOfWeek:n,lastDayOfWeek:r}},addTimesRendered:(n,r)=>{e(o=>{const s=o.timesRendered;return s.get(r)?{...o}:(s.set(r,n),{...o,timeRenderedPrev:s})})}}),Sd=(e,t)=>({setWeekAndViewType:n=>{const r=t().todayWeek(n);return t().setBookingViewType(ne.WEEK),te.firstAndLastWeekDays(r)},setTodayDayAndViewType:n=>{const r=t().setTodayDay(n);return t().setBookingViewType(ne.DAY),r}}),Oe=Ko()((...e)=>({...xd(...e),...gd(...e),...Sd(...e)})),Da=()=>{const{setBookingViewType:e,todayWeek:t,setTodayDay:n,daysOfWeek:r,getWeek:o}=Oe();return{onViewTypeChange:i=>{switch(i){case ne.DAY:{e(ne.DAY),n(r[0]);break}case ne.WEEK:{e(ne.WEEK),t(o().firstDayOfWeek);break}case ne.TABLE:{e(ne.TABLE),n(o().firstDayOfWeek);break}}}}},Ta=e=>{const t=R.use(xa);if(!t)throw new Error("Missing useMonthDescription must be within a MonthDescriptionProvider");return Uo(t,e)},Go=e=>{const t=R.use(Ea);if(!t)throw new Error("Missing useNewEventContextProvider must be within a NewEventProvider");return Uo(t,e)},Er=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Vt(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function qo(e){return"nodeType"in e}function be(e){var t,n;return e?Vt(e)?e:qo(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Xo(e){const{Document:t}=be(e);return e instanceof t}function Cn(e){return Vt(e)?!1:e instanceof be(e).HTMLElement}function Ra(e){return e instanceof be(e).SVGElement}function Yt(e){return e?Vt(e)?e.document:qo(e)?Xo(e)?e:Cn(e)||Ra(e)?e.ownerDocument:document:document:document}const Ge=Er?R.useLayoutEffect:R.useEffect;function Dr(e){const t=R.useRef(e);return Ge(()=>{t.current=e}),R.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Cd(){const e=R.useRef(null),t=R.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=R.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function mn(e,t){t===void 0&&(t=[e]);const n=R.useRef(e);return Ge(()=>{n.current!==e&&(n.current=e)},t),n}function En(e,t){const n=R.useRef();return R.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function lr(e){const t=Dr(e),n=R.useRef(null),r=R.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function ur(e){const t=R.useRef();return R.useEffect(()=>{t.current=e},[e]),t.current}let Jr={};function Tr(e,t){return R.useMemo(()=>{if(t)return t;const n=Jr[e]==null?0:Jr[e]+1;return Jr[e]=n,e+"-"+n},[e,t])}function Ma(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,i)=>{const a=Object.entries(i);for(const[c,l]of a){const f=s[c];f!=null&&(s[c]=f+e*l)}return s},{...t})}}const Lt=Ma(1),dr=Ma(-1);function Ed(e){return"clientX"in e&&"clientY"in e}function Zo(e){if(!e)return!1;const{KeyboardEvent:t}=be(e.target);return t&&e instanceof t}function Dd(e){if(!e)return!1;const{TouchEvent:t}=be(e.target);return t&&e instanceof t}function fr(e){if(Dd(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Ed(e)?{x:e.clientX,y:e.clientY}:null}const vn=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[vn.Translate.toString(e),vn.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Js="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Td(e){return e.matches(Js)?e:e.querySelector(Js)}const Rd={display:"none"};function Md(e){let{id:t,value:n}=e;return R.createElement("div",{id:t,style:Rd},n)}function Od(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return R.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Pd(){const[e,t]=R.useState("");return{announce:R.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Oa=R.createContext(null);function Dn(e){const t=R.useContext(Oa);R.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function kd(){const[e]=R.useState(()=>new Set),t=R.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[R.useCallback(r=>{let{type:o,event:s}=r;e.forEach(i=>{var a;return(a=i[o])==null?void 0:a.call(i,s)})},[e]),t]}const Ad={draggable:`
1
+ "use strict";require('./assets/main.css');var id=Object.defineProperty;var ad=(e,t,n)=>t in e?id(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var xt=(e,t,n)=>ad(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),R=require("react"),Ze=require("react-dom");function Ma(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const S=Ma(R),Tr=Ma(Ze);class cd extends ReferenceError{constructor(t="Calendar instance is not initialized. Ensure the calendar is rendered before calling this method."){super(t),this.name="ReferenceErrorCustom"}}const ni=e=>{let t;const n=new Set,r=(l,d)=>{const u=typeof l=="function"?l(t):l;if(!Object.is(u,t)){const v=t;t=d??(typeof u!="object"||u===null)?u:Object.assign({},t,u),n.forEach(h=>h(t,v))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>c,subscribe:l=>(n.add(l),()=>n.delete(l))},c=t=e(r,o,a);return a},Tn=e=>e?ni(e):ni,ld=e=>e;function Rr(e,t=ld){const n=R.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return R.useDebugValue(n),n}const ri=e=>{const t=Tn(e),n=r=>Rr(t,r);return Object.assign(n,t),n},Mr=e=>e?ri(e):ri,ka={selectedDate:new Date,isBookingLoading:!1,bookingModalState:!1,selectedHour:"",cardsRef:new Map},ud=e=>Tn(t=>({...ka,...e,clearDraggingBookings:()=>t(n=>({...n,draggingBooking:null})),changeNewBookingStateModal:()=>t({bookingModalState:!0}),openNewBookingModal:(n,r)=>{n&&t({selectedDate:n}),r&&t({selectedHour:r})},setIsBookingLoading:()=>t({isBookingLoading:!0}),setSelectedDate:n=>t(r=>({...r,selectedDate:n})),setSelectedHour:n=>t(r=>({...r,selectedHour:n})),setCardRef:(n,r)=>t(o=>({...o,cardsRef:o.cardsRef.set(n,r)}))})),Oa=6e4,dd=36e5,oi=Symbol.for("constructDateFrom");function es(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&oi in e?e[oi](t):e instanceof Date?new e.constructor(t):new Date(t)}function ko(e,t){return es(e,e)}function Pa(e,...t){const n=es.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function fd(e,t,n){const r=ko(e);return r.setTime(r.getTime()+t*Oa),r}function _a(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function pd(e,t,n){const[r,o]=Pa(n==null?void 0:n.in,e,t),s=(+r-+o)/dd;return _a(n==null?void 0:n.roundingMethod)(s)}function hd(e,t){return+ko(e)-+ko(t)}function gd(e,t,n){const r=hd(e,t)/Oa;return _a(n==null?void 0:n.roundingMethod)(r)}function md(e,t){const[n,r]=Pa(e,t.start,t.end);return{start:n,end:r}}function vd(e,t){const{start:n,end:r}=md(t==null?void 0:t.in,e);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setMinutes(0,0,0);let a=1;const c=[];for(;+i<=s;)c.push(es(n,i)),i.setHours(i.getHours()+a);return o?c.reverse():c}function yd(e,t,n){return fd(e,-t)}function bd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function wd(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var ir={exports:{}},xd=ir.exports,si;function Sd(){return si||(si=1,function(e,t){(function(n,r){e.exports=r()})(xd,function(){var n=1e3,r=6e4,o=36e5,s="millisecond",i="second",a="minute",c="hour",l="day",d="week",u="month",v="quarter",h="year",C="date",g="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(L){var $=["th","st","nd","rd"],k=L%100;return"["+L+($[(k-20)%10]||$[k]||$[0])+"]"}},w=function(L,$,k){var I=String(L);return!I||I.length>=$?L:""+Array($+1-I.length).join(k)+L},D={s:w,z:function(L){var $=-L.utcOffset(),k=Math.abs($),I=Math.floor(k/60),O=k%60;return($<=0?"+":"-")+w(I,2,"0")+":"+w(O,2,"0")},m:function L($,k){if($.date()<k.date())return-L(k,$);var I=12*(k.year()-$.year())+(k.month()-$.month()),O=$.clone().add(I,u),j=k-O<0,P=$.clone().add(I+(j?-1:1),u);return+(-(I+(k-O)/(j?O-P:P-O))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:u,y:h,w:d,d:l,D:C,h:c,m:a,s:i,ms:s,Q:v}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},m="en",T={};T[m]=f;var b="$isDayjsObject",E=function(L){return L instanceof W||!(!L||!L[b])},M=function L($,k,I){var O;if(!$)return m;if(typeof $=="string"){var j=$.toLowerCase();T[j]&&(O=j),k&&(T[j]=k,O=j);var P=$.split("-");if(!O&&P.length>1)return L(P[0])}else{var F=$.name;T[F]=$,O=F}return!I&&O&&(m=O),O||!I&&m},N=function(L,$){if(E(L))return L.clone();var k=typeof $=="object"?$:{};return k.date=L,k.args=arguments,new W(k)},A=D;A.l=M,A.i=E,A.w=function(L,$){return N(L,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var W=function(){function L(k){this.$L=M(k.locale,null,!0),this.parse(k),this.$x=this.$x||k.x||{},this[b]=!0}var $=L.prototype;return $.parse=function(k){this.$d=function(I){var O=I.date,j=I.utc;if(O===null)return new Date(NaN);if(A.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var P=O.match(x);if(P){var F=P[2]-1||0,U=(P[7]||"0").substring(0,3);return j?new Date(Date.UTC(P[1],F,P[3]||1,P[4]||0,P[5]||0,P[6]||0,U)):new Date(P[1],F,P[3]||1,P[4]||0,P[5]||0,P[6]||0,U)}}return new Date(O)}(k),this.init()},$.init=function(){var k=this.$d;this.$y=k.getFullYear(),this.$M=k.getMonth(),this.$D=k.getDate(),this.$W=k.getDay(),this.$H=k.getHours(),this.$m=k.getMinutes(),this.$s=k.getSeconds(),this.$ms=k.getMilliseconds()},$.$utils=function(){return A},$.isValid=function(){return this.$d.toString()!==g},$.isSame=function(k,I){var O=N(k);return this.startOf(I)<=O&&O<=this.endOf(I)},$.isAfter=function(k,I){return N(k)<this.startOf(I)},$.isBefore=function(k,I){return this.endOf(I)<N(k)},$.$g=function(k,I,O){return A.u(k)?this[I]:this.set(O,k)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(k,I){var O=this,j=!!A.u(I)||I,P=A.p(k),F=function(q,B){var te=A.w(O.$u?Date.UTC(O.$y,B,q):new Date(O.$y,B,q),O);return j?te:te.endOf(l)},U=function(q,B){return A.w(O.toDate()[q].apply(O.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(B)),O)},V=this.$W,H=this.$M,X=this.$D,K="set"+(this.$u?"UTC":"");switch(P){case h:return j?F(1,0):F(31,11);case u:return j?F(1,H):F(0,H+1);case d:var z=this.$locale().weekStart||0,G=(V<z?V+7:V)-z;return F(j?X-G:X+(6-G),H);case l:case C:return U(K+"Hours",0);case c:return U(K+"Minutes",1);case a:return U(K+"Seconds",2);case i:return U(K+"Milliseconds",3);default:return this.clone()}},$.endOf=function(k){return this.startOf(k,!1)},$.$set=function(k,I){var O,j=A.p(k),P="set"+(this.$u?"UTC":""),F=(O={},O[l]=P+"Date",O[C]=P+"Date",O[u]=P+"Month",O[h]=P+"FullYear",O[c]=P+"Hours",O[a]=P+"Minutes",O[i]=P+"Seconds",O[s]=P+"Milliseconds",O)[j],U=j===l?this.$D+(I-this.$W):I;if(j===u||j===h){var V=this.clone().set(C,1);V.$d[F](U),V.init(),this.$d=V.set(C,Math.min(this.$D,V.daysInMonth())).$d}else F&&this.$d[F](U);return this.init(),this},$.set=function(k,I){return this.clone().$set(k,I)},$.get=function(k){return this[A.p(k)]()},$.add=function(k,I){var O,j=this;k=Number(k);var P=A.p(I),F=function(H){var X=N(j);return A.w(X.date(X.date()+Math.round(H*k)),j)};if(P===u)return this.set(u,this.$M+k);if(P===h)return this.set(h,this.$y+k);if(P===l)return F(1);if(P===d)return F(7);var U=(O={},O[a]=r,O[c]=o,O[i]=n,O)[P]||1,V=this.$d.getTime()+k*U;return A.w(V,this)},$.subtract=function(k,I){return this.add(-1*k,I)},$.format=function(k){var I=this,O=this.$locale();if(!this.isValid())return O.invalidDate||g;var j=k||"YYYY-MM-DDTHH:mm:ssZ",P=A.z(this),F=this.$H,U=this.$m,V=this.$M,H=O.weekdays,X=O.months,K=O.meridiem,z=function(B,te,_,ne){return B&&(B[te]||B(I,j))||_[te].slice(0,ne)},G=function(B){return A.s(F%12||12,B,"0")},q=K||function(B,te,_){var ne=B<12?"AM":"PM";return _?ne.toLowerCase():ne};return j.replace(y,function(B,te){return te||function(_){switch(_){case"YY":return String(I.$y).slice(-2);case"YYYY":return A.s(I.$y,4,"0");case"M":return V+1;case"MM":return A.s(V+1,2,"0");case"MMM":return z(O.monthsShort,V,X,3);case"MMMM":return z(X,V);case"D":return I.$D;case"DD":return A.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return z(O.weekdaysMin,I.$W,H,2);case"ddd":return z(O.weekdaysShort,I.$W,H,3);case"dddd":return H[I.$W];case"H":return String(F);case"HH":return A.s(F,2,"0");case"h":return G(1);case"hh":return G(2);case"a":return q(F,U,!0);case"A":return q(F,U,!1);case"m":return String(U);case"mm":return A.s(U,2,"0");case"s":return String(I.$s);case"ss":return A.s(I.$s,2,"0");case"SSS":return A.s(I.$ms,3,"0");case"Z":return P}return null}(B)||P.replace(":","")})},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(k,I,O){var j,P=this,F=A.p(I),U=N(k),V=(U.utcOffset()-this.utcOffset())*r,H=this-U,X=function(){return A.m(P,U)};switch(F){case h:j=X()/12;break;case u:j=X();break;case v:j=X()/3;break;case d:j=(H-V)/6048e5;break;case l:j=(H-V)/864e5;break;case c:j=H/o;break;case a:j=H/r;break;case i:j=H/n;break;default:j=H}return O?j:A.a(j)},$.daysInMonth=function(){return this.endOf(u).$D},$.$locale=function(){return T[this.$L]},$.locale=function(k,I){if(!k)return this.$L;var O=this.clone(),j=M(k,I,!0);return j&&(O.$L=j),O},$.clone=function(){return A.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},L}(),Y=W.prototype;return N.prototype=Y,[["$ms",s],["$s",i],["$m",a],["$H",c],["$W",l],["$M",u],["$y",h],["$D",C]].forEach(function(L){Y[L[1]]=function($){return this.$g($,L[0],L[1])}}),N.extend=function(L,$){return L.$i||(L($,W,N),L.$i=!0),N},N.locale=M,N.isDayjs=E,N.unix=function(L){return N(1e3*L)},N.en=T[m],N.Ls=T,N.p={},N})}(ir)),ir.exports}var Cd=Sd();const ii=bd(Cd),re={DAY:"day",WEEK:"week",TABLE:"table",MONTH:"month"},Wt=["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],Oo=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Ed=["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],Q={findIndexToStart(e=new Date){const t=Oo[e.getDay()];return this.findActualDayIndex(t)},findActualDayIndex(e){return Oo.indexOf(e)},generateWeekDays(e){const t=this.findIndexToStart(e);return{week:new Array(7).fill(0).map((o,s)=>{const i=e||new Date,a=s-t;return new Date(i.getFullYear(),i.getMonth(),i.getDate()+a)})}},generateDays(e,t){const n=[],r=new Date(e.getFullYear(),e.getMonth(),e.getDate()+t);return n.push(r),n},addDay(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t)},formatDate(e){return e.split(" ").slice(2,3).join(",").replace(","," | ")},dateTimeAsString(e){const t=String(e.getHours()).padStart(2,"0"),n=String(e.getMinutes()).padStart(2,"0");return`${t}:${n}`},getTimeDiff(e,t){const n=Number(new Date(t))-Number(new Date(e)),r=Math.floor(n/1e3/60),o=Math.floor(r/60),s=r%60;return`${o}:${s.toString().padStart(2,"0")}`},bookingTimeRange:(e,t)=>{const n=Q.getTimeDiff(e.startAt,e.finishAt),r=Q.getNewFinishAt(t,n);return{id:e.id,startAt:new Date(t),finishAt:r}},getNewFinishAt(e,t){const n=new Date(e),r=t.split(":"),o=Number(r[0]),s=Number(r[1]);return n.setHours(n.getHours()+o),n.setMinutes(n.getMinutes()+s),n},minuteDifference(e,t){return gd(e,t)},dateAndHourDateToString(e){const t=new Date(e);return`${t.getHours().toLocaleString().padStart(2,"0")}:${t.getMinutes().toLocaleString().padStart(2,"0")}`},shortMonthDescription(...e){return`${Wt[e[0].getMonth()].slice(0,3)} - ${Wt[e[1].getMonth()].slice(0,3)}`},timeDiffInSeconds(e,t){const n=ii(e),r=ii(t);return n.diff(r)/6e4},subtractMinutes(e,t){return yd(e,t)},addMinuteToHour(e,t){return`${e.split(":")[0]}:${t}`},dateToString(e){return new Date(e).toTimeString()},dateToStringSelected(e){return new Date(e).toDateString()},roundMinutes(e){return e>=15&&e<30?15:e>=30&&e<45?30:e>=45&&e<60?45:0},hourMinutesStringToDate(e){const t=new Date,[n,r]=e.split(":");return t.setHours(Number(n),Number(r)),t},addMinutesToDate(e,t){const n=new Date(e);return n.setHours(n.getHours(),n.getMinutes()+t,n.getMinutes()),n},newDateKey(e,t){const n=new Date(e);return n.setHours(Number(t.split(":")[0])),n.setMinutes(Number(t.split(":")[1])),n.toString()},addMinutesToHour(e,t){const n=Q.hourMinutesStringToDate(e),r=Q.addMinutesToDate(n,t);return Q.dateAndHourDateToString(r)},convertStringTimeToDateFormat(e){const t=new Date,[n,r]=e.split(":");return t.setHours(Number(n),Number(r),0,0),t},isTodayDate(e){const t=new Date,n=e.getDate()===t.getDate(),r=e.getMonth()===t.getMonth(),o=e.getFullYear()===t.getFullYear();return n&&r&&o},firstAndLastWeekDays(e){return{firstDayOfWeek:e[0],lastDayOfWeek:e[e.length-1]}},generateWeekMonthLabel(e){const{firstDayOfWeek:t,lastDayOfWeek:n}=Q.firstAndLastWeekDays(e),r=t.getMonth();return r!==n.getMonth()?Q.shortMonthDescription(t,n):Wt[r]}},Dd=(e,t)=>{const n=vd({start:new Date(2014,9,6,e),end:new Date(2014,9,6,t)});return Object.values(n).map(r=>`${String(r.getHours()).padStart(2,"0")}:00`)},Aa=1,Na=24,Td=Q.generateWeekDays(),Rd=(e,t)=>({hours:Dd(Aa,Na),daysOfWeek:Td.week,timesRendered:new Map,setTodayDay:n=>{const r=Q.generateDays(n,0);return e(o=>({...o,daysOfWeek:r,lastDayOfWeek:r[0]||new Date})),r[0]},todayWeek:n=>{let r=[];return e(o=>{const{week:s}=Q.generateWeekDays(n);return r=s,{...o,daysOfWeek:s}}),r},nextWeek:()=>{const n=Q.addDay(t().getWeek().lastDayOfWeek,1);let r=[];const{week:o}=Q.generateWeekDays(n);return r=o,e(s=>({...s,daysOfWeek:o})),r},previousWeek:()=>{const n=Q.addDay(t().getWeek().firstDayOfWeek,-1);let r=[];const{week:o}=Q.generateWeekDays(n);return r=o,e(s=>({...s,daysOfWeek:o})),r},setDays:n=>{const r=t().daysOfWeek[0];if(!r)return[];const o=Q.generateDays(r,n);return e(s=>({...s,daysOfWeek:o})),o},getWeek:()=>{const n=t().daysOfWeek[0],r=t().daysOfWeek[t().daysOfWeek.length-1];return{firstDayOfWeek:n,lastDayOfWeek:r}},addTimesRendered:(n,r)=>{e(o=>{const s=o.timesRendered;return s.get(r)?{...o}:(s.set(r,n),{...o,timeRenderedPrev:s})})}}),dr=e=>{const t=new Date(e.key),n=t.getDate().toString().padStart(2,"0"),r=(t.getMonth()+1).toString().padStart(2,"0");return`${`${t.getFullYear()}-${r}-${n}`};${e.time}`},Mt=Mr((e,t)=>({emptySlotNodes:new Map,selectedNode:"",setEmptySlotNode:(n,r)=>{e(o=>{const s=new Map(o.emptySlotNodes),u=(pd(new Date(`1970/01/01 ${Na}`),new Date(2014,6,0,Number(Aa),0))+2)*4*7-1;s.size>u&&s.clear();const h=dr(r);return s.set(h,n),{...o,emptySlotNodes:s}})},setSelectedNode:n=>{const r=new Map(t().emptySlotNodes),o=t().selectedNode;e(s=>{if(o.length){const i=r.get(o);i&&i.closeEvent()}return{...s,selectedNode:n}})},resetNodes:()=>{e(n=>{const r=new Map(n.emptySlotNodes);return r.clear(),{...n,emptySlotNodes:r}})},resetSelectedNode:()=>e(n=>({...n,selectedNode:""}))})),Po={date:"",startAt:"",finishAt:"",slotStartAt:""},Md=e=>Tn((t,n)=>({...Po,...e,updateForm:r=>t(o=>({...o,...r})),updateDynamicForm:(r,o)=>t(s=>({...s,[r]:o})),updateStartAt:r=>t(o=>({...o,startAt:r})),updateFinishAt:r=>t(o=>({...o,finishAt:r})),updateFinishAtWithOffset:(r,o=15)=>{const s=Q.addMinutesToHour(r,o);return n().updateFinishAt(s),s},updateClient:(r,o)=>t(s=>({...s,client:{id:r,name:o}})),updateDate:r=>t(o=>({...o,date:r})),updatePrevStartAt:r=>t(o=>({...o,slotStartAt:r})),resetForm:()=>t(Po)})),kd=(e,t)=>({users:[],bookingViewType:"week",bookingBulkData:{user:{id:"",profile:{id:"",name:""}},booking:[]},updateUsers:n=>e(r=>({...r,users:n})),setBookingBulkData:n=>e(r=>({...r,bookingBulkData:{...n}})),updatingBookingBulkData:(n,r)=>{e(o=>{const s=o.bookingBulkData.booking.map(i=>new Date(i.startAt).getDate()===r&&n.id===i.id?n:i);return{...o,bookingBulkData:{...o.bookingBulkData,booking:s}}})},resetBookingResponse:()=>e(n=>({...n,bookingResponse:null})),setBookingViewType:n=>e(r=>({...r,bookingViewType:n})),optimisticCardUpdate:(n,r,o,s)=>{const i={...n,startAt:r,finishAt:o},a=new Date(s.day).getDate();t().updatingBookingBulkData(i,a)}}),Od=(e,t)=>({setWeekAndViewType:n=>{const r=t().todayWeek(n);return t().setBookingViewType(re.WEEK),Q.firstAndLastWeekDays(r)},setTodayDayAndViewType:n=>{const r=t().setTodayDay(n);return t().setBookingViewType(re.DAY),r}}),xe=Mr()((...e)=>({...Rd(...e),...kd(...e),...Od(...e)})),Ia=()=>{const{setBookingViewType:e,todayWeek:t,setTodayDay:n,daysOfWeek:r,getWeek:o}=xe();return{onViewTypeChange:i=>{switch(i){case re.DAY:{e(re.DAY),n(r[0]);break}case re.WEEK:{e(re.WEEK),t(o().firstDayOfWeek);break}case re.TABLE:{e(re.TABLE),n(o().firstDayOfWeek);break}}}}},ja=R.createContext(null),La=e=>{const t=R.use(ja);if(!t)throw new Error("Missing useMonthDescription must be within a MonthDescriptionProvider");return Rr(t,e)},Pd=R.createContext(null),$a=R.createContext(null),_d=({children:e,ref:t,...n})=>{const r=R.useRef(null);r.current||(r.current=Md(n));const o=s=>{var i;(i=r.current)==null||i.getState().updateFinishAt(s)};return R.useImperativeHandle(t,()=>({updateFinishAt:o})),p.jsx($a,{value:r.current,children:e})},ts=e=>{const t=R.use($a);if(!t)throw new Error("Missing useNewEventContextProvider must be within a NewEventProvider");return Rr(t,e)},kr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Gt(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function ns(e){return"nodeType"in e}function Ce(e){var t,n;return e?Gt(e)?e:ns(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function rs(e){const{Document:t}=Ce(e);return e instanceof t}function Rn(e){return Gt(e)?!1:e instanceof Ce(e).HTMLElement}function Fa(e){return e instanceof Ce(e).SVGElement}function qt(e){return e?Gt(e)?e.document:ns(e)?rs(e)?e:Rn(e)||Fa(e)?e.ownerDocument:document:document:document}const Je=kr?R.useLayoutEffect:R.useEffect;function Or(e){const t=R.useRef(e);return Je(()=>{t.current=e}),R.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Ad(){const e=R.useRef(null),t=R.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=R.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function bn(e,t){t===void 0&&(t=[e]);const n=R.useRef(e);return Je(()=>{n.current!==e&&(n.current=e)},t),n}function Mn(e,t){const n=R.useRef();return R.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function fr(e){const t=Or(e),n=R.useRef(null),r=R.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function pr(e){const t=R.useRef();return R.useEffect(()=>{t.current=e},[e]),t.current}let ro={};function Pr(e,t){return R.useMemo(()=>{if(t)return t;const n=ro[e]==null?0:ro[e]+1;return ro[e]=n,e+"-"+n},[e,t])}function za(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,i)=>{const a=Object.entries(i);for(const[c,l]of a){const d=s[c];d!=null&&(s[c]=d+e*l)}return s},{...t})}}const Bt=za(1),hr=za(-1);function Nd(e){return"clientX"in e&&"clientY"in e}function os(e){if(!e)return!1;const{KeyboardEvent:t}=Ce(e.target);return t&&e instanceof t}function Id(e){if(!e)return!1;const{TouchEvent:t}=Ce(e.target);return t&&e instanceof t}function gr(e){if(Id(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Nd(e)?{x:e.clientX,y:e.clientY}:null}const wn=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[wn.Translate.toString(e),wn.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),ai="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function jd(e){return e.matches(ai)?e:e.querySelector(ai)}const Ld={display:"none"};function $d(e){let{id:t,value:n}=e;return R.createElement("div",{id:t,style:Ld},n)}function Fd(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return R.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function zd(){const[e,t]=R.useState("");return{announce:R.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Wa=R.createContext(null);function kn(e){const t=R.useContext(Wa);R.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Wd(){const[e]=R.useState(()=>new Set),t=R.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[R.useCallback(r=>{let{type:o,event:s}=r;e.forEach(i=>{var a;return(a=i[o])==null?void 0:a.call(i,s)})},[e]),t]}const Bd={draggable:`
2
2
  To pick up a draggable item, press the space bar.
3
3
  While dragging, use the arrow keys to move the item.
4
4
  Press space again to drop the item in its new position, or press escape to cancel.
5
- `},_d={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Nd(e){let{announcements:t=_d,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Ad}=e;const{announce:s,announcement:i}=Pd(),a=Tr("DndLiveRegion"),[c,l]=R.useState(!1);if(R.useEffect(()=>{l(!0)},[]),Dn(R.useMemo(()=>({onDragStart(u){let{active:b}=u;s(t.onDragStart({active:b}))},onDragMove(u){let{active:b,over:y}=u;t.onDragMove&&s(t.onDragMove({active:b,over:y}))},onDragOver(u){let{active:b,over:y}=u;s(t.onDragOver({active:b,over:y}))},onDragEnd(u){let{active:b,over:y}=u;s(t.onDragEnd({active:b,over:y}))},onDragCancel(u){let{active:b,over:y}=u;s(t.onDragCancel({active:b,over:y}))}}),[s,t])),!c)return null;const f=R.createElement(R.Fragment,null,R.createElement(Md,{id:r,value:o.draggable}),R.createElement(Od,{id:a,announcement:i}));return n?Ke.createPortal(f,n):f}var he;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(he||(he={}));function pr(){}function Qs(e,t){return R.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Id(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const Ie=Object.freeze({x:0,y:0});function jd(e,t){const n=fr(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function Ld(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function $d(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Fd(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),i=o-r,a=s-n;if(r<o&&n<s){const c=t.width*t.height,l=e.width*e.height,f=i*a,u=f/(c+l-f);return Number(u.toFixed(4))}return 0}const zd=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const s of r){const{id:i}=s,a=n.get(i);if(a){const c=Fd(a,t);c>0&&o.push({id:i,data:{droppableContainer:s,value:c}})}}return o.sort(Ld)};function Wd(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Pa(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ie}function Bd(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];return o.reduce((i,a)=>({...i,top:i.top+e*a.y,bottom:i.bottom+e*a.y,left:i.left+e*a.x,right:i.right+e*a.x}),{...n})}}const Hd=Bd(1);function ka(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Vd(e,t,n){const r=ka(t);if(!r)return e;const{scaleX:o,scaleY:s,x:i,y:a}=r,c=e.left-i-(1-o)*parseFloat(n),l=e.top-a-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),f=o?e.width/o:e.width,u=s?e.height/s:e.height;return{width:f,height:u,top:l,right:c+f,bottom:l+u,left:c}}const Yd={ignoreTransform:!1};function Tn(e,t){t===void 0&&(t=Yd);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:l,transformOrigin:f}=be(e).getComputedStyle(e);l&&(n=Vd(n,l,f))}const{top:r,left:o,width:s,height:i,bottom:a,right:c}=n;return{top:r,left:o,width:s,height:i,bottom:a,right:c}}function ei(e){return Tn(e,{ignoreTransform:!0})}function Ud(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Kd(e,t){return t===void 0&&(t=be(e).getComputedStyle(e)),t.position==="fixed"}function Gd(e,t){t===void 0&&(t=be(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const s=t[o];return typeof s=="string"?n.test(s):!1})}function Jo(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(Xo(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Cn(o)||Ra(o)||n.includes(o))return n;const s=be(e).getComputedStyle(o);return o!==e&&Gd(o,s)&&n.push(o),Kd(o,s)?n:r(o.parentNode)}return e?r(e):n}function Aa(e){const[t]=Jo(e,1);return t??null}function Qr(e){return!Er||!e?null:Vt(e)?e:qo(e)?Xo(e)||e===Yt(e).scrollingElement?window:Cn(e)?e:null:null}function _a(e){return Vt(e)?e.scrollX:e.scrollLeft}function Na(e){return Vt(e)?e.scrollY:e.scrollTop}function Do(e){return{x:_a(e),y:Na(e)}}var ge;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ge||(ge={}));function Ia(e){return!Er||!e?!1:e===document.scrollingElement}function ja(e){const t={x:0,y:0},n=Ia(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,s=e.scrollLeft<=t.x,i=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return{isTop:o,isLeft:s,isBottom:i,isRight:a,maxScroll:r,minScroll:t}}const qd={x:.2,y:.2};function Xd(e,t,n,r,o){let{top:s,left:i,right:a,bottom:c}=n;r===void 0&&(r=10),o===void 0&&(o=qd);const{isTop:l,isBottom:f,isLeft:u,isRight:b}=ja(e),y={x:0,y:0},C={x:0,y:0},p={height:t.height*o.y,width:t.width*o.x};return!l&&s<=t.top+p.height?(y.y=ge.Backward,C.y=r*Math.abs((t.top+p.height-s)/p.height)):!f&&c>=t.bottom-p.height&&(y.y=ge.Forward,C.y=r*Math.abs((t.bottom-p.height-c)/p.height)),!b&&a>=t.right-p.width?(y.x=ge.Forward,C.x=r*Math.abs((t.right-p.width-a)/p.width)):!u&&i<=t.left+p.width&&(y.x=ge.Backward,C.x=r*Math.abs((t.left+p.width-i)/p.width)),{direction:y,speed:C}}function Zd(e){if(e===document.scrollingElement){const{innerWidth:s,innerHeight:i}=window;return{top:0,left:0,right:s,bottom:i,width:s,height:i}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function La(e){return e.reduce((t,n)=>Lt(t,Do(n)),Ie)}function Jd(e){return e.reduce((t,n)=>t+_a(n),0)}function Qd(e){return e.reduce((t,n)=>t+Na(n),0)}function $a(e,t){if(t===void 0&&(t=Tn),!e)return;const{top:n,left:r,bottom:o,right:s}=t(e);Aa(e)&&(o<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const ef=[["x",["left","right"],Jd],["y",["top","bottom"],Qd]];class Qo{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=Jo(n),o=La(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[s,i,a]of ef)for(const c of i)Object.defineProperty(this,c,{get:()=>{const l=a(r),f=o[s]-l;return this.rect[c]+f},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class pn{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function tf(e){const{EventTarget:t}=be(e);return e instanceof t?e:Yt(e)}function eo(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var ke;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ke||(ke={}));function ti(e){e.preventDefault()}function nf(e){e.stopPropagation()}var ue;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(ue||(ue={}));const Fa={start:[ue.Space,ue.Enter],cancel:[ue.Esc],end:[ue.Space,ue.Enter,ue.Tab]},rf=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ue.Right:return{...n,x:n.x+25};case ue.Left:return{...n,x:n.x-25};case ue.Down:return{...n,y:n.y+25};case ue.Up:return{...n,y:n.y-25}}};class za{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new pn(Yt(n)),this.windowListeners=new pn(be(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ke.Resize,this.handleCancel),this.windowListeners.add(ke.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ke.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&$a(r),n(Ie)}handleKeyDown(t){if(Zo(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:s=Fa,coordinateGetter:i=rf,scrollBehavior:a="smooth"}=o,{code:c}=t;if(s.end.includes(c)){this.handleEnd(t);return}if(s.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:l}=r.current,f=l?{x:l.left,y:l.top}:Ie;this.referenceCoordinates||(this.referenceCoordinates=f);const u=i(t,{active:n,context:r.current,currentCoordinates:f});if(u){const b=dr(u,f),y={x:0,y:0},{scrollableAncestors:C}=r.current;for(const p of C){const x=t.code,{isTop:g,isRight:d,isLeft:m,isBottom:E,maxScroll:v,minScroll:T}=ja(p),w=Zd(p),D={x:Math.min(x===ue.Right?w.right-w.width/2:w.right,Math.max(x===ue.Right?w.left:w.left+w.width/2,u.x)),y:Math.min(x===ue.Down?w.bottom-w.height/2:w.bottom,Math.max(x===ue.Down?w.top:w.top+w.height/2,u.y))},P=x===ue.Right&&!d||x===ue.Left&&!m,_=x===ue.Down&&!E||x===ue.Up&&!g;if(P&&D.x!==u.x){const I=p.scrollLeft+b.x,H=x===ue.Right&&I<=v.x||x===ue.Left&&I>=T.x;if(H&&!b.y){p.scrollTo({left:I,behavior:a});return}H?y.x=p.scrollLeft-I:y.x=x===ue.Right?p.scrollLeft-v.x:p.scrollLeft-T.x,y.x&&p.scrollBy({left:-y.x,behavior:a});break}else if(_&&D.y!==u.y){const I=p.scrollTop+b.y,H=x===ue.Down&&I<=v.y||x===ue.Up&&I>=T.y;if(H&&!b.x){p.scrollTo({top:I,behavior:a});return}H?y.y=p.scrollTop-I:y.y=x===ue.Down?p.scrollTop-v.y:p.scrollTop-T.y,y.y&&p.scrollBy({top:-y.y,behavior:a});break}}this.handleMove(t,Lt(dr(u,this.referenceCoordinates),y))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}za.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Fa,onActivation:o}=t,{active:s}=n;const{code:i}=e.nativeEvent;if(r.start.includes(i)){const a=s.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function ni(e){return!!(e&&"distance"in e)}function ri(e){return!!(e&&"delay"in e)}class es{constructor(t,n,r){var o;r===void 0&&(r=tf(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:s}=t,{target:i}=s;this.props=t,this.events=n,this.document=Yt(i),this.documentListeners=new pn(this.document),this.listeners=new pn(r),this.windowListeners=new pn(be(i)),this.initialCoordinates=(o=fr(s))!=null?o:Ie,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(ke.Resize,this.handleCancel),this.windowListeners.add(ke.DragStart,ti),this.windowListeners.add(ke.VisibilityChange,this.handleCancel),this.windowListeners.add(ke.ContextMenu,ti),this.documentListeners.add(ke.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ri(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(ni(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:o}=this.props;o(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(ke.Click,nf,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ke.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:s}=this,{onMove:i,options:{activationConstraint:a}}=s;if(!o)return;const c=(n=fr(t))!=null?n:Ie,l=dr(o,c);if(!r&&a){if(ni(a)){if(a.tolerance!=null&&eo(l,a.tolerance))return this.handleCancel();if(eo(l,a.distance))return this.handleStart()}if(ri(a)&&eo(l,a.tolerance))return this.handleCancel();this.handlePending(a,l);return}t.cancelable&&t.preventDefault(),i(c)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===ue.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const of={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Wa extends es{constructor(t){const{event:n}=t,r=Yt(n.target);super(t,of,r)}}Wa.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const sf={move:{name:"mousemove"},end:{name:"mouseup"}};var To;(function(e){e[e.RightClick=2]="RightClick"})(To||(To={}));class Ba extends es{constructor(t){super(t,sf,Yt(t.event.target))}}Ba.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===To.RightClick?!1:(r==null||r({event:n}),!0)}}];const to={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Ha extends es{constructor(t){super(t,to)}static setup(){return window.addEventListener(to.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(to.move.name,t)};function t(){}}}Ha.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r==null||r({event:n}),!0)}}];var hn;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(hn||(hn={}));var hr;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(hr||(hr={}));function af(e){let{acceleration:t,activator:n=hn.Pointer,canScroll:r,draggingRect:o,enabled:s,interval:i=5,order:a=hr.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:f,delta:u,threshold:b}=e;const y=lf({delta:u,disabled:!s}),[C,p]=Cd(),x=R.useRef({x:0,y:0}),g=R.useRef({x:0,y:0}),d=R.useMemo(()=>{switch(n){case hn.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case hn.DraggableRect:return o}},[n,o,c]),m=R.useRef(null),E=R.useCallback(()=>{const T=m.current;if(!T)return;const w=x.current.x*g.current.x,D=x.current.y*g.current.y;T.scrollBy(w,D)},[]),v=R.useMemo(()=>a===hr.TreeOrder?[...l].reverse():l,[a,l]);R.useEffect(()=>{if(!s||!l.length||!d){p();return}for(const T of v){if((r==null?void 0:r(T))===!1)continue;const w=l.indexOf(T),D=f[w];if(!D)continue;const{direction:P,speed:_}=Xd(T,D,d,t,b);for(const I of["x","y"])y[I][P[I]]||(_[I]=0,P[I]=0);if(_.x>0||_.y>0){p(),m.current=T,C(E,i),x.current=_,g.current=P;return}}x.current={x:0,y:0},g.current={x:0,y:0},p()},[t,E,r,p,s,i,JSON.stringify(d),JSON.stringify(y),C,l,v,f,JSON.stringify(b)])}const cf={x:{[ge.Backward]:!1,[ge.Forward]:!1},y:{[ge.Backward]:!1,[ge.Forward]:!1}};function lf(e){let{delta:t,disabled:n}=e;const r=ur(t);return En(o=>{if(n||!r||!o)return cf;const s={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[ge.Backward]:o.x[ge.Backward]||s.x===-1,[ge.Forward]:o.x[ge.Forward]||s.x===1},y:{[ge.Backward]:o.y[ge.Backward]||s.y===-1,[ge.Forward]:o.y[ge.Forward]||s.y===1}}},[n,t,r])}function uf(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return En(o=>{var s;return t==null?null:(s=r??o)!=null?s:null},[r,t])}function df(e,t){return R.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,s=o.activators.map(i=>({eventName:i.eventName,handler:t(i.handler,r)}));return[...n,...s]},[]),[e,t])}var yn;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(yn||(yn={}));var Ro;(function(e){e.Optimized="optimized"})(Ro||(Ro={}));const oi=new Map;function ff(e,t){let{dragging:n,dependencies:r,config:o}=t;const[s,i]=R.useState(null),{frequency:a,measure:c,strategy:l}=o,f=R.useRef(e),u=x(),b=mn(u),y=R.useCallback(function(g){g===void 0&&(g=[]),!b.current&&i(d=>d===null?g:d.concat(g.filter(m=>!d.includes(m))))},[b]),C=R.useRef(null),p=En(g=>{if(u&&!n)return oi;if(!g||g===oi||f.current!==e||s!=null){const d=new Map;for(let m of e){if(!m)continue;if(s&&s.length>0&&!s.includes(m.id)&&m.rect.current){d.set(m.id,m.rect.current);continue}const E=m.node.current,v=E?new Qo(c(E),E):null;m.rect.current=v,v&&d.set(m.id,v)}return d}return g},[e,s,n,u,c]);return R.useEffect(()=>{f.current=e},[e]),R.useEffect(()=>{u||y()},[n,u]),R.useEffect(()=>{s&&s.length>0&&i(null)},[JSON.stringify(s)]),R.useEffect(()=>{u||typeof a!="number"||C.current!==null||(C.current=setTimeout(()=>{y(),C.current=null},a))},[a,u,y,...r]),{droppableRects:p,measureDroppableContainers:y,measuringScheduled:s!=null};function x(){switch(l){case yn.Always:return!1;case yn.BeforeDragging:return n;default:return!n}}}function ts(e,t){return En(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function pf(e,t){return ts(e,t)}function hf(e){let{callback:t,disabled:n}=e;const r=Dr(t),o=R.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(r)},[r,n]);return R.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Rr(e){let{callback:t,disabled:n}=e;const r=Dr(t),o=R.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(r)},[n]);return R.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function gf(e){return new Qo(Tn(e),e)}function si(e,t,n){t===void 0&&(t=gf);const[r,o]=R.useState(null);function s(){o(c=>{if(!e)return null;if(e.isConnected===!1){var l;return(l=c??n)!=null?l:null}const f=t(e);return JSON.stringify(c)===JSON.stringify(f)?c:f})}const i=hf({callback(c){if(e)for(const l of c){const{type:f,target:u}=l;if(f==="childList"&&u instanceof HTMLElement&&u.contains(e)){s();break}}}}),a=Rr({callback:s});return Ge(()=>{s(),e?(a==null||a.observe(e),i==null||i.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),i==null||i.disconnect())},[e]),r}function mf(e){const t=ts(e);return Pa(e,t)}const ii=[];function vf(e){const t=R.useRef(e),n=En(r=>e?r&&r!==ii&&e&&t.current&&e.parentNode===t.current.parentNode?r:Jo(e):ii,[e]);return R.useEffect(()=>{t.current=e},[e]),n}function yf(e){const[t,n]=R.useState(null),r=R.useRef(e),o=R.useCallback(s=>{const i=Qr(s.target);i&&n(a=>a?(a.set(i,Do(i)),new Map(a)):null)},[]);return R.useEffect(()=>{const s=r.current;if(e!==s){i(s);const a=e.map(c=>{const l=Qr(c);return l?(l.addEventListener("scroll",o,{passive:!0}),[l,Do(l)]):null}).filter(c=>c!=null);n(a.length?new Map(a):null),r.current=e}return()=>{i(e),i(s)};function i(a){a.forEach(c=>{const l=Qr(c);l==null||l.removeEventListener("scroll",o)})}},[o,e]),R.useMemo(()=>e.length?t?Array.from(t.values()).reduce((s,i)=>Lt(s,i),Ie):La(e):Ie,[e,t])}function ai(e,t){t===void 0&&(t=[]);const n=R.useRef(null);return R.useEffect(()=>{n.current=null},t),R.useEffect(()=>{const r=e!==Ie;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?dr(e,n.current):Ie}function bf(e){R.useEffect(()=>{if(!Er)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function wf(e,t){return R.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:s}=r;return n[o]=i=>{s(i,t)},n},{}),[e,t])}function Va(e){return R.useMemo(()=>e?Ud(e):null,[e])}const ci=[];function xf(e,t){t===void 0&&(t=Tn);const[n]=e,r=Va(n?be(n):null),[o,s]=R.useState(ci);function i(){s(()=>e.length?e.map(c=>Ia(c)?r:new Qo(t(c),c)):ci)}const a=Rr({callback:i});return Ge(()=>{a==null||a.disconnect(),i(),e.forEach(c=>a==null?void 0:a.observe(c))},[e]),o}function Ya(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Cn(t)?t:e}function Sf(e){let{measure:t}=e;const[n,r]=R.useState(null),o=R.useCallback(l=>{for(const{target:f}of l)if(Cn(f)){r(u=>{const b=t(f);return u?{...u,width:b.width,height:b.height}:b});break}},[t]),s=Rr({callback:o}),i=R.useCallback(l=>{const f=Ya(l);s==null||s.disconnect(),f&&(s==null||s.observe(f)),r(f?t(f):null)},[t,s]),[a,c]=lr(i);return R.useMemo(()=>({nodeRef:a,rect:n,setRef:c}),[n,a,c])}const Cf=[{sensor:Wa,options:{}},{sensor:za,options:{}}],Ef={current:{}},or={draggable:{measure:ei},droppable:{measure:ei,strategy:yn.WhileDragging,frequency:Ro.Optimized},dragOverlay:{measure:Tn}};class gn extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const Df={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new gn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:pr},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:or,measureDroppableContainers:pr,windowRect:null,measuringScheduled:!1},Ua={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:pr,draggableNodes:new Map,over:null,measureDroppableContainers:pr},Rn=R.createContext(Ua),Ka=R.createContext(Df);function Tf(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new gn}}}function Rf(e,t){switch(t.type){case he.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case he.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case he.DragEnd:case he.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case he.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new gn(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case he.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,s=e.droppable.containers.get(n);if(!s||r!==s.key)return e;const i=new gn(e.droppable.containers);return i.set(n,{...s,disabled:o}),{...e,droppable:{...e.droppable,containers:i}}}case he.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new gn(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function Mf(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=R.useContext(Rn),s=ur(r),i=ur(n==null?void 0:n.id);return R.useEffect(()=>{if(!t&&!r&&s&&i!=null){if(!Zo(s)||document.activeElement===s.target)return;const a=o.get(i);if(!a)return;const{activatorNode:c,node:l}=a;if(!c.current&&!l.current)return;requestAnimationFrame(()=>{for(const f of[c.current,l.current]){if(!f)continue;const u=Td(f);if(u){u.focus();break}}})}},[r,t,o,i,s]),null}function Ga(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,s)=>s({transform:o,...r}),n):n}function Of(e){return R.useMemo(()=>({draggable:{...or.draggable,...e==null?void 0:e.draggable},droppable:{...or.droppable,...e==null?void 0:e.droppable},dragOverlay:{...or.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function Pf(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const s=R.useRef(!1),{x:i,y:a}=typeof o=="boolean"?{x:o,y:o}:o;Ge(()=>{if(!i&&!a||!t){s.current=!1;return}if(s.current||!r)return;const l=t==null?void 0:t.node.current;if(!l||l.isConnected===!1)return;const f=n(l),u=Pa(f,r);if(i||(u.x=0),a||(u.y=0),s.current=!0,Math.abs(u.x)>0||Math.abs(u.y)>0){const b=Aa(l);b&&b.scrollBy({top:u.y,left:u.x})}},[t,i,a,r,n])}const Mr=R.createContext({...Ie,scaleX:1,scaleY:1});var ut;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(ut||(ut={}));const ns=R.memo(function(t){var n,r,o,s;let{id:i,accessibility:a,autoScroll:c=!0,children:l,sensors:f=Cf,collisionDetection:u=zd,measuring:b,modifiers:y,...C}=t;const p=R.useReducer(Rf,void 0,Tf),[x,g]=p,[d,m]=kd(),[E,v]=R.useState(ut.Uninitialized),T=E===ut.Initialized,{draggable:{active:w,nodes:D,translate:P},droppable:{containers:_}}=x,I=w!=null?D.get(w):null,H=R.useRef({initial:null,translated:null}),K=R.useMemo(()=>{var ve;return w!=null?{id:w,data:(ve=I==null?void 0:I.data)!=null?ve:Ef,rect:H}:null},[w,I]),j=R.useRef(null),[F,k]=R.useState(null),[N,M]=R.useState(null),A=mn(C,Object.values(C)),O=Tr("DndDescribedBy",i),L=R.useMemo(()=>_.getEnabled(),[_]),U=Of(b),{droppableRects:Y,measureDroppableContainers:V,measuringScheduled:X}=ff(L,{dragging:T,dependencies:[P.x,P.y],config:U.droppable}),G=uf(D,w),$=R.useMemo(()=>N?fr(N):null,[N]),q=Yu(),W=pf(G,U.draggable.measure);Pf({activeNode:w!=null?D.get(w):null,config:q.layoutShiftCompensation,initialRect:W,measure:U.draggable.measure});const B=si(G,U.draggable.measure,W),Z=si(G?G.parentElement:null),z=R.useRef({activatorEvent:null,active:null,activeNode:G,collisionRect:null,collisions:null,droppableRects:Y,draggableNodes:D,draggingNode:null,draggingNodeRect:null,droppableContainers:_,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),oe=_.getNodeFor((n=z.current.over)==null?void 0:n.id),de=Sf({measure:U.dragOverlay.measure}),Se=(r=de.nodeRef.current)!=null?r:G,Ce=T?(o=de.rect)!=null?o:B:null,Qe=!!(de.nodeRef.current&&de.rect),Ln=mf(Qe?null:B),et=Va(Se?be(Se):null),tt=vf(T?oe??G:null),$n=xf(tt),Fn=Ga(y,{transform:{x:P.x-Ln.x,y:P.y-Ln.y,scaleX:1,scaleY:1},activatorEvent:N,active:K,activeNodeRect:B,containerNodeRect:Z,draggingNodeRect:Ce,over:z.current.over,overlayNodeRect:de.rect,scrollableAncestors:tt,scrollableAncestorRects:$n,windowRect:et}),Ws=$?Lt($,P):null,Bs=yf(tt),$u=ai(Bs),Fu=ai(Bs,[B]),Ot=Lt(Fn,$u),Pt=Ce?Hd(Ce,Fn):null,Jt=K&&Pt?u({active:K,collisionRect:Pt,droppableRects:Y,droppableContainers:L,pointerCoordinates:Ws}):null,Hs=$d(Jt,"id"),[nt,Vs]=R.useState(null),zu=Qe?Fn:Lt(Fn,Fu),Wu=Wd(zu,(s=nt==null?void 0:nt.rect)!=null?s:null,B),Xr=R.useRef(null),Ys=R.useCallback((ve,Ee)=>{let{sensor:De,options:rt}=Ee;if(j.current==null)return;const Pe=D.get(j.current);if(!Pe)return;const Te=ve.nativeEvent,$e=new De({active:j.current,activeNode:Pe,event:Te,options:rt,context:z,onAbort(me){if(!D.get(me))return;const{onDragAbort:Fe}=A.current,Ye={id:me};Fe==null||Fe(Ye),d({type:"onDragAbort",event:Ye})},onPending(me,ot,Fe,Ye){if(!D.get(me))return;const{onDragPending:en}=A.current,st={id:me,constraint:ot,initialCoordinates:Fe,offset:Ye};en==null||en(st),d({type:"onDragPending",event:st})},onStart(me){const ot=j.current;if(ot==null)return;const Fe=D.get(ot);if(!Fe)return;const{onDragStart:Ye}=A.current,Qt={activatorEvent:Te,active:{id:ot,data:Fe.data,rect:H}};Ke.unstable_batchedUpdates(()=>{Ye==null||Ye(Qt),v(ut.Initializing),g({type:he.DragStart,initialCoordinates:me,active:ot}),d({type:"onDragStart",event:Qt}),k(Xr.current),M(Te)})},onMove(me){g({type:he.DragMove,coordinates:me})},onEnd:kt(he.DragEnd),onCancel:kt(he.DragCancel)});Xr.current=$e;function kt(me){return async function(){const{active:Fe,collisions:Ye,over:Qt,scrollAdjustedTranslate:en}=z.current;let st=null;if(Fe&&en){const{cancelDrop:tn}=A.current;st={activatorEvent:Te,active:Fe,collisions:Ye,delta:en,over:Qt},me===he.DragEnd&&typeof tn=="function"&&await Promise.resolve(tn(st))&&(me=he.DragCancel)}j.current=null,Ke.unstable_batchedUpdates(()=>{g({type:me}),v(ut.Uninitialized),Vs(null),k(null),M(null),Xr.current=null;const tn=me===he.DragEnd?"onDragEnd":"onDragCancel";if(st){const Zr=A.current[tn];Zr==null||Zr(st),d({type:tn,event:st})}})}}},[D]),Bu=R.useCallback((ve,Ee)=>(De,rt)=>{const Pe=De.nativeEvent,Te=D.get(rt);if(j.current!==null||!Te||Pe.dndKit||Pe.defaultPrevented)return;const $e={active:Te};ve(De,Ee.options,$e)===!0&&(Pe.dndKit={capturedBy:Ee.sensor},j.current=rt,Ys(De,Ee))},[D,Ys]),Us=df(f,Bu);bf(f),Ge(()=>{B&&E===ut.Initializing&&v(ut.Initialized)},[B,E]),R.useEffect(()=>{const{onDragMove:ve}=A.current,{active:Ee,activatorEvent:De,collisions:rt,over:Pe}=z.current;if(!Ee||!De)return;const Te={active:Ee,activatorEvent:De,collisions:rt,delta:{x:Ot.x,y:Ot.y},over:Pe};Ke.unstable_batchedUpdates(()=>{ve==null||ve(Te),d({type:"onDragMove",event:Te})})},[Ot.x,Ot.y]),R.useEffect(()=>{const{active:ve,activatorEvent:Ee,collisions:De,droppableContainers:rt,scrollAdjustedTranslate:Pe}=z.current;if(!ve||j.current==null||!Ee||!Pe)return;const{onDragOver:Te}=A.current,$e=rt.get(Hs),kt=$e&&$e.rect.current?{id:$e.id,rect:$e.rect.current,data:$e.data,disabled:$e.disabled}:null,me={active:ve,activatorEvent:Ee,collisions:De,delta:{x:Pe.x,y:Pe.y},over:kt};Ke.unstable_batchedUpdates(()=>{Vs(kt),Te==null||Te(me),d({type:"onDragOver",event:me})})},[Hs]),Ge(()=>{z.current={activatorEvent:N,active:K,activeNode:G,collisionRect:Pt,collisions:Jt,droppableRects:Y,draggableNodes:D,draggingNode:Se,draggingNodeRect:Ce,droppableContainers:_,over:nt,scrollableAncestors:tt,scrollAdjustedTranslate:Ot},H.current={initial:Ce,translated:Pt}},[K,G,Jt,Pt,D,Se,Ce,Y,_,nt,tt,Ot]),af({...q,delta:P,draggingRect:Pt,pointerCoordinates:Ws,scrollableAncestors:tt,scrollableAncestorRects:$n});const Hu=R.useMemo(()=>({active:K,activeNode:G,activeNodeRect:B,activatorEvent:N,collisions:Jt,containerNodeRect:Z,dragOverlay:de,draggableNodes:D,droppableContainers:_,droppableRects:Y,over:nt,measureDroppableContainers:V,scrollableAncestors:tt,scrollableAncestorRects:$n,measuringConfiguration:U,measuringScheduled:X,windowRect:et}),[K,G,B,N,Jt,Z,de,D,_,Y,nt,V,tt,$n,U,X,et]),Vu=R.useMemo(()=>({activatorEvent:N,activators:Us,active:K,activeNodeRect:B,ariaDescribedById:{draggable:O},dispatch:g,draggableNodes:D,over:nt,measureDroppableContainers:V}),[N,Us,K,B,g,O,D,nt,V]);return R.createElement(Oa.Provider,{value:m},R.createElement(Rn.Provider,{value:Vu},R.createElement(Ka.Provider,{value:Hu},R.createElement(Mr.Provider,{value:Wu},l)),R.createElement(Mf,{disabled:(a==null?void 0:a.restoreFocus)===!1})),R.createElement(Nd,{...a,hiddenTextDescribedById:O}));function Yu(){const ve=(F==null?void 0:F.autoScrollEnabled)===!1,Ee=typeof c=="object"?c.enabled===!1:c===!1,De=T&&!ve&&!Ee;return typeof c=="object"?{...c,enabled:De}:{enabled:De}}}),kf=R.createContext(null),li="button",Af="Draggable";function rs(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const s=Tr(Af),{activators:i,activatorEvent:a,active:c,activeNodeRect:l,ariaDescribedById:f,draggableNodes:u,over:b}=R.useContext(Rn),{role:y=li,roleDescription:C="draggable",tabIndex:p=0}=o??{},x=(c==null?void 0:c.id)===t,g=R.useContext(x?Mr:kf),[d,m]=lr(),[E,v]=lr(),T=wf(i,t),w=mn(n);Ge(()=>(u.set(t,{id:t,key:s,node:d,activatorNode:E,data:w}),()=>{const P=u.get(t);P&&P.key===s&&u.delete(t)}),[u,t]);const D=R.useMemo(()=>({role:y,tabIndex:p,"aria-disabled":r,"aria-pressed":x&&y===li?!0:void 0,"aria-roledescription":C,"aria-describedby":f.draggable}),[r,y,p,x,C,f.draggable]);return{active:c,activatorEvent:a,activeNodeRect:l,attributes:D,isDragging:x,listeners:r?void 0:T,node:d,over:b,setNodeRef:m,setActivatorNodeRef:v,transform:g}}function _f(){return R.useContext(Ka)}const Nf="Droppable",If={timeout:25};function zn(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const s=Tr(Nf),{active:i,dispatch:a,over:c,measureDroppableContainers:l}=R.useContext(Rn),f=R.useRef({disabled:n}),u=R.useRef(!1),b=R.useRef(null),y=R.useRef(null),{disabled:C,updateMeasurementsFor:p,timeout:x}={...If,...o},g=mn(p??r),d=R.useCallback(()=>{if(!u.current){u.current=!0;return}y.current!=null&&clearTimeout(y.current),y.current=setTimeout(()=>{l(Array.isArray(g.current)?g.current:[g.current]),y.current=null},x)},[x]),m=Rr({callback:d,disabled:C||!i}),E=R.useCallback((D,P)=>{m&&(P&&(m.unobserve(P),u.current=!1),D&&m.observe(D))},[m]),[v,T]=lr(E),w=mn(t);return R.useEffect(()=>{!m||!v.current||(m.disconnect(),u.current=!1,m.observe(v.current))},[v,m]),R.useEffect(()=>(a({type:he.RegisterDroppable,element:{id:r,key:s,disabled:n,node:v,rect:b,data:w}}),()=>a({type:he.UnregisterDroppable,key:s,id:r})),[r]),R.useEffect(()=>{n!==f.current.disabled&&(a({type:he.SetDroppableDisabled,id:r,key:s,disabled:n}),f.current.disabled=n)},[r,s,n,a]),{active:i,rect:b,isOver:(c==null?void 0:c.id)===r,node:v,over:c,setNodeRef:T}}function jf(e){let{animation:t,children:n}=e;const[r,o]=R.useState(null),[s,i]=R.useState(null),a=ur(n);return!n&&!r&&a&&o(a),Ge(()=>{if(!s)return;const c=r==null?void 0:r.key,l=r==null?void 0:r.props.id;if(c==null||l==null){o(null);return}Promise.resolve(t(l,s)).then(()=>{o(null)})},[t,r,s]),R.createElement(R.Fragment,null,n,r?R.cloneElement(r,{ref:i}):null)}const Lf={x:0,y:0,scaleX:1,scaleY:1};function $f(e){let{children:t}=e;return R.createElement(Rn.Provider,{value:Ua},R.createElement(Mr.Provider,{value:Lf},t))}const Ff={position:"fixed",touchAction:"none"},zf=e=>Zo(e)?"transform 250ms ease":void 0,Wf=R.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:o,children:s,className:i,rect:a,style:c,transform:l,transition:f=zf}=e;if(!a)return null;const u=o?l:{...l,scaleX:1,scaleY:1},b={...Ff,width:a.width,height:a.height,top:a.top,left:a.left,transform:vn.Transform.toString(u),transformOrigin:o&&r?jd(r,a):void 0,transition:typeof f=="function"?f(r):f,...c};return R.createElement(n,{className:i,style:b,ref:t},s)}),Bf=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:s,className:i}=e;if(s!=null&&s.active)for(const[a,c]of Object.entries(s.active))c!==void 0&&(o[a]=n.node.style.getPropertyValue(a),n.node.style.setProperty(a,c));if(s!=null&&s.dragOverlay)for(const[a,c]of Object.entries(s.dragOverlay))c!==void 0&&r.node.style.setProperty(a,c);return i!=null&&i.active&&n.node.classList.add(i.active),i!=null&&i.dragOverlay&&r.node.classList.add(i.dragOverlay),function(){for(const[c,l]of Object.entries(o))n.node.style.setProperty(c,l);i!=null&&i.active&&n.node.classList.remove(i.active)}},Hf=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:vn.Transform.toString(t)},{transform:vn.Transform.toString(n)}]},Vf={duration:250,easing:"ease",keyframes:Hf,sideEffects:Bf({styles:{active:{opacity:"0"}}})};function Yf(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return Dr((s,i)=>{if(t===null)return;const a=n.get(s);if(!a)return;const c=a.node.current;if(!c)return;const l=Ya(i);if(!l)return;const{transform:f}=be(i).getComputedStyle(i),u=ka(f);if(!u)return;const b=typeof t=="function"?t:Uf(t);return $a(c,o.draggable.measure),b({active:{id:s,data:a.data,node:c,rect:o.draggable.measure(c)},draggableNodes:n,dragOverlay:{node:i,rect:o.dragOverlay.measure(l)},droppableContainers:r,measuringConfiguration:o,transform:u})})}function Uf(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...Vf,...e};return s=>{let{active:i,dragOverlay:a,transform:c,...l}=s;if(!t)return;const f={x:a.rect.left-i.rect.left,y:a.rect.top-i.rect.top},u={scaleX:c.scaleX!==1?i.rect.width*c.scaleX/a.rect.width:1,scaleY:c.scaleY!==1?i.rect.height*c.scaleY/a.rect.height:1},b={x:c.x-f.x,y:c.y-f.y,...u},y=o({...l,active:i,dragOverlay:a,transform:{initial:c,final:b}}),[C]=y,p=y[y.length-1];if(JSON.stringify(C)===JSON.stringify(p))return;const x=r==null?void 0:r({active:i,dragOverlay:a,...l}),g=a.node.animate(y,{duration:t,easing:n,fill:"forwards"});return new Promise(d=>{g.onfinish=()=>{x==null||x(),d()}})}}let ui=0;function Kf(e){return R.useMemo(()=>{if(e!=null)return ui++,ui},[e])}const Gf=R.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:o,transition:s,modifiers:i,wrapperElement:a="div",className:c,zIndex:l=999}=e;const{activatorEvent:f,active:u,activeNodeRect:b,containerNodeRect:y,draggableNodes:C,droppableContainers:p,dragOverlay:x,over:g,measuringConfiguration:d,scrollableAncestors:m,scrollableAncestorRects:E,windowRect:v}=_f(),T=R.useContext(Mr),w=Kf(u==null?void 0:u.id),D=Ga(i,{activatorEvent:f,active:u,activeNodeRect:b,containerNodeRect:y,draggingNodeRect:x.rect,over:g,overlayNodeRect:x.rect,scrollableAncestors:m,scrollableAncestorRects:E,transform:T,windowRect:v}),P=ts(b),_=Yf({config:r,draggableNodes:C,droppableContainers:p,measuringConfiguration:d}),I=P?x.setRef:void 0;return R.createElement($f,null,R.createElement(jf,{animation:_},u&&w?R.createElement(Wf,{key:w,id:u.id,ref:I,as:a,activatorEvent:f,adjustScale:t,className:c,transition:s,rect:P,style:{zIndex:l,...o},transform:D},n):null))}),qe=()=>{const e=R.use(wa);if(!e)throw new Error("useBookingModal must be used within a BookingModalProvider");return e};function qa(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=qa(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Xa(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=qa(e))&&(r&&(r+=" "),r+=t);return r}const os="-",qf=e=>{const t=Zf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(os);return a[0]===""&&a.length!==1&&a.shift(),Za(a,t)||Xf(i)},getConflictingClassGroupIds:(i,a)=>{const c=n[i]||[];return a&&r[i]?[...c,...r[i]]:c}}},Za=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Za(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(os);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},di=/^\[(.+)\]$/,Xf=e=>{if(di.test(e)){const t=di.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Zf=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Mo(n[o],r,o,t);return r},Mo=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:fi(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Jf(o)){Mo(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Mo(i,fi(t,s),n,r)})})},fi=(e,t)=>{let n=e;return t.split(os).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Jf=e=>e.isThemeGetter,Qf=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},Oo="!",Po=":",ep=Po.length,tp=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,a=0,c=0,l;for(let C=0;C<o.length;C++){let p=o[C];if(i===0&&a===0){if(p===Po){s.push(o.slice(c,C)),c=C+ep;continue}if(p==="/"){l=C;continue}}p==="["?i++:p==="]"?i--:p==="("?a++:p===")"&&a--}const f=s.length===0?o:o.substring(c),u=np(f),b=u!==f,y=l&&l>c?l-c:void 0;return{modifiers:s,hasImportantModifier:b,baseClassName:u,maybePostfixModifierPosition:y}};if(t){const o=t+Po,s=r;r=i=>i.startsWith(o)?s(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},np=e=>e.endsWith(Oo)?e.substring(0,e.length-1):e.startsWith(Oo)?e.substring(1):e,rp=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let s=[];return r.forEach(i=>{i[0]==="["||t[i]?(o.push(...s.sort(),i),s=[]):s.push(i)}),o.push(...s.sort()),o}},op=e=>({cache:Qf(e.cacheSize),parseClassName:tp(e),sortModifiers:rp(e),...qf(e)}),sp=/\s+/,ip=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(sp);let c="";for(let l=a.length-1;l>=0;l-=1){const f=a[l],{isExternal:u,modifiers:b,hasImportantModifier:y,baseClassName:C,maybePostfixModifierPosition:p}=n(f);if(u){c=f+(c.length>0?" "+c:c);continue}let x=!!p,g=r(x?C.substring(0,p):C);if(!g){if(!x){c=f+(c.length>0?" "+c:c);continue}if(g=r(C),!g){c=f+(c.length>0?" "+c:c);continue}x=!1}const d=s(b).join(":"),m=y?d+Oo:d,E=m+g;if(i.includes(E))continue;i.push(E);const v=o(g,x);for(let T=0;T<v.length;++T){const w=v[T];i.push(m+w)}c=f+(c.length>0?" "+c:c)}return c};function ap(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ja(t))&&(r&&(r+=" "),r+=n);return r}const Ja=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ja(e[r]))&&(n&&(n+=" "),n+=t);return n};function cp(e,...t){let n,r,o,s=i;function i(c){const l=t.reduce((f,u)=>u(f),e());return n=op(l),r=n.cache.get,o=n.cache.set,s=a,a(c)}function a(c){const l=r(c);if(l)return l;const f=ip(c,n);return o(c,f),f}return function(){return s(ap.apply(null,arguments))}}const pe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Qa=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ec=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lp=/^\d+\/\d+$/,up=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dp=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,fp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,pp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,At=e=>lp.test(e),re=e=>!!e&&!Number.isNaN(Number(e)),it=e=>!!e&&Number.isInteger(Number(e)),no=e=>e.endsWith("%")&&re(e.slice(0,-1)),Ue=e=>up.test(e),gp=()=>!0,mp=e=>dp.test(e)&&!fp.test(e),tc=()=>!1,vp=e=>pp.test(e),yp=e=>hp.test(e),bp=e=>!J(e)&&!Q(e),wp=e=>Ut(e,oc,tc),J=e=>Qa.test(e),xt=e=>Ut(e,sc,mp),ro=e=>Ut(e,Dp,re),pi=e=>Ut(e,nc,tc),xp=e=>Ut(e,rc,yp),Wn=e=>Ut(e,ic,vp),Q=e=>ec.test(e),rn=e=>Kt(e,sc),Sp=e=>Kt(e,Tp),hi=e=>Kt(e,nc),Cp=e=>Kt(e,oc),Ep=e=>Kt(e,rc),Bn=e=>Kt(e,ic,!0),Ut=(e,t,n)=>{const r=Qa.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Kt=(e,t,n=!1)=>{const r=ec.exec(e);return r?r[1]?t(r[1]):n:!1},nc=e=>e==="position"||e==="percentage",rc=e=>e==="image"||e==="url",oc=e=>e==="length"||e==="size"||e==="bg-size",sc=e=>e==="length",Dp=e=>e==="number",Tp=e=>e==="family-name",ic=e=>e==="shadow",Rp=()=>{const e=pe("color"),t=pe("font"),n=pe("text"),r=pe("font-weight"),o=pe("tracking"),s=pe("leading"),i=pe("breakpoint"),a=pe("container"),c=pe("spacing"),l=pe("radius"),f=pe("shadow"),u=pe("inset-shadow"),b=pe("text-shadow"),y=pe("drop-shadow"),C=pe("blur"),p=pe("perspective"),x=pe("aspect"),g=pe("ease"),d=pe("animate"),m=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...E(),Q,J],T=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],D=()=>[Q,J,c],P=()=>[At,"full","auto",...D()],_=()=>[it,"none","subgrid",Q,J],I=()=>["auto",{span:["full",it,Q,J]},it,Q,J],H=()=>[it,"auto",Q,J],K=()=>["auto","min","max","fr",Q,J],j=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...D()],N=()=>[At,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],M=()=>[e,Q,J],A=()=>[...E(),hi,pi,{position:[Q,J]}],O=()=>["no-repeat",{repeat:["","x","y","space","round"]}],L=()=>["auto","cover","contain",Cp,wp,{size:[Q,J]}],U=()=>[no,rn,xt],Y=()=>["","none","full",l,Q,J],V=()=>["",re,rn,xt],X=()=>["solid","dashed","dotted","double"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$=()=>[re,no,hi,pi],q=()=>["","none",C,Q,J],W=()=>["none",re,Q,J],B=()=>["none",re,Q,J],Z=()=>[re,Q,J],z=()=>[At,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ue],breakpoint:[Ue],color:[gp],container:[Ue],"drop-shadow":[Ue],ease:["in","out","in-out"],font:[bp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ue],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ue],shadow:[Ue],spacing:["px",re],text:[Ue],"text-shadow":[Ue],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",At,J,Q,x]}],container:["container"],columns:[{columns:[re,J,Q,a]}],"break-after":[{"break-after":m()}],"break-before":[{"break-before":m()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[it,"auto",Q,J]}],basis:[{basis:[At,"full","auto",a,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[re,At,"auto","initial","none",J]}],grow:[{grow:["",re,Q,J]}],shrink:[{shrink:["",re,Q,J]}],order:[{order:[it,"first","last","none",Q,J]}],"grid-cols":[{"grid-cols":_()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":_()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:N()}],w:[{w:[a,"screen",...N()]}],"min-w":[{"min-w":[a,"screen","none",...N()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...N()]}],h:[{h:["screen",...N()]}],"min-h":[{"min-h":["screen","none",...N()]}],"max-h":[{"max-h":["screen",...N()]}],"font-size":[{text:["base",n,rn,xt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Q,ro]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",no,J]}],"font-family":[{font:[Sp,J,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Q,J]}],"line-clamp":[{"line-clamp":[re,"none",Q,ro]}],leading:[{leading:[s,...D()]}],"list-image":[{"list-image":["none",Q,J]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Q,J]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:[re,"from-font","auto",Q,xt]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[re,"auto",Q,J]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Q,J]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Q,J]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:A()}],"bg-repeat":[{bg:O()}],"bg-size":[{bg:L()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},it,Q,J],radial:["",Q,J],conic:[it,Q,J]},Ep,xp]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:V()}],"border-w-x":[{"border-x":V()}],"border-w-y":[{"border-y":V()}],"border-w-s":[{"border-s":V()}],"border-w-e":[{"border-e":V()}],"border-w-t":[{"border-t":V()}],"border-w-r":[{"border-r":V()}],"border-w-b":[{"border-b":V()}],"border-w-l":[{"border-l":V()}],"divide-x":[{"divide-x":V()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":V()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...X(),"hidden","none"]}],"divide-style":[{divide:[...X(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...X(),"none","hidden"]}],"outline-offset":[{"outline-offset":[re,Q,J]}],"outline-w":[{outline:["",re,rn,xt]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",f,Bn,Wn]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",u,Bn,Wn]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[re,xt]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":V()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",b,Bn,Wn]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[re,Q,J]}],"mix-blend":[{"mix-blend":[...G(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":G()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[re]}],"mask-image-linear-from-pos":[{"mask-linear-from":$()}],"mask-image-linear-to-pos":[{"mask-linear-to":$()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":$()}],"mask-image-t-to-pos":[{"mask-t-to":$()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":$()}],"mask-image-r-to-pos":[{"mask-r-to":$()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":$()}],"mask-image-b-to-pos":[{"mask-b-to":$()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":$()}],"mask-image-l-to-pos":[{"mask-l-to":$()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":$()}],"mask-image-x-to-pos":[{"mask-x-to":$()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":$()}],"mask-image-y-to-pos":[{"mask-y-to":$()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[Q,J]}],"mask-image-radial-from-pos":[{"mask-radial-from":$()}],"mask-image-radial-to-pos":[{"mask-radial-to":$()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[re]}],"mask-image-conic-from-pos":[{"mask-conic-from":$()}],"mask-image-conic-to-pos":[{"mask-conic-to":$()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:A()}],"mask-repeat":[{mask:O()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Q,J]}],filter:[{filter:["","none",Q,J]}],blur:[{blur:q()}],brightness:[{brightness:[re,Q,J]}],contrast:[{contrast:[re,Q,J]}],"drop-shadow":[{"drop-shadow":["","none",y,Bn,Wn]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",re,Q,J]}],"hue-rotate":[{"hue-rotate":[re,Q,J]}],invert:[{invert:["",re,Q,J]}],saturate:[{saturate:[re,Q,J]}],sepia:[{sepia:["",re,Q,J]}],"backdrop-filter":[{"backdrop-filter":["","none",Q,J]}],"backdrop-blur":[{"backdrop-blur":q()}],"backdrop-brightness":[{"backdrop-brightness":[re,Q,J]}],"backdrop-contrast":[{"backdrop-contrast":[re,Q,J]}],"backdrop-grayscale":[{"backdrop-grayscale":["",re,Q,J]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[re,Q,J]}],"backdrop-invert":[{"backdrop-invert":["",re,Q,J]}],"backdrop-opacity":[{"backdrop-opacity":[re,Q,J]}],"backdrop-saturate":[{"backdrop-saturate":[re,Q,J]}],"backdrop-sepia":[{"backdrop-sepia":["",re,Q,J]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Q,J]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[re,"initial",Q,J]}],ease:[{ease:["linear","initial",g,Q,J]}],delay:[{delay:[re,Q,J]}],animate:[{animate:["none",d,Q,J]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,Q,J]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:W()}],"rotate-x":[{"rotate-x":W()}],"rotate-y":[{"rotate-y":W()}],"rotate-z":[{"rotate-z":W()}],scale:[{scale:B()}],"scale-x":[{"scale-x":B()}],"scale-y":[{"scale-y":B()}],"scale-z":[{"scale-z":B()}],"scale-3d":["scale-3d"],skew:[{skew:Z()}],"skew-x":[{"skew-x":Z()}],"skew-y":[{"skew-y":Z()}],transform:[{transform:[Q,J,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:z()}],"translate-x":[{"translate-x":z()}],"translate-y":[{"translate-y":z()}],"translate-z":[{"translate-z":z()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Q,J]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Q,J]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[re,rn,xt,ro]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Mp=cp(Rp);function ie(...e){return Mp(Xa(e))}const Op=({daysOfWeek:e,bookingViewType:t})=>{const{setTodayDay:n,setBookingViewType:r}=Oe(),{updateMonthMessage:o,updateHeaderDateLabel:s}=Ta(b=>b),{onViewTypeChange:i}=Da(),{onHeaderDayClick:a}=qe(),c=R.useCallback(b=>{const y=()=>{r(ne.WEEK),i(ne.WEEK)},C=()=>t===ne.DAY;if(a==null||a(b,t),C())return y();const p=n(b);if(!p)return;const x={month:p.getMonth(),fullYear:p.getFullYear(),monthMessage:jt[p.getMonth()]};o(x),r(ne.DAY)},[t,n,o,r]),l=t===ne.TABLE?{justifySelf:"start"}:{},f=R.useMemo(()=>{const b=y=>new Date(y).toDateString()===new Date().toDateString();return e.map(y=>{const C=Co[new Date(y).getDay()];return h.jsx("th",{className:ie("daysOfWeek",t!==ne.DAY&&"daysOfWeek_day"),children:h.jsxs("div",{style:l,className:"daysOfWeek_parent",children:[h.jsx("span",{className:ie(b(y)&&"daysOfWeek_day_today_title"),children:C}),h.jsx("div",{style:{width:"100%"},children:h.jsx("button",{type:"button",className:ie("daysOfWeek_day",b(y)?"daysOfWeek_day_today":"daysOfWeek_day_rest"),onClick:()=>c(y),children:te.formatDate(y.toDateString())})})]})},C)})},[e,c,t]),u=h.jsx("th",{style:l,className:"calendarHeader",children:h.jsx("div",{className:"daysOfWeek_emptySlot"})},"emptyBlocks");return R.useEffect(()=>{switch(t){case ne.DAY:{s(e[0]);break}case ne.WEEK:{const b=te.generateWeekMonthLabel(e);o({monthMessage:b})}}},[e]),h.jsx("table",{className:"daysOfWeek_emptySlot_table",children:h.jsx("tbody",{children:h.jsxs("tr",{children:[u,f]})})})};/**
5
+ `},Hd={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Vd(e){let{announcements:t=Hd,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Bd}=e;const{announce:s,announcement:i}=zd(),a=Pr("DndLiveRegion"),[c,l]=R.useState(!1);if(R.useEffect(()=>{l(!0)},[]),kn(R.useMemo(()=>({onDragStart(u){let{active:v}=u;s(t.onDragStart({active:v}))},onDragMove(u){let{active:v,over:h}=u;t.onDragMove&&s(t.onDragMove({active:v,over:h}))},onDragOver(u){let{active:v,over:h}=u;s(t.onDragOver({active:v,over:h}))},onDragEnd(u){let{active:v,over:h}=u;s(t.onDragEnd({active:v,over:h}))},onDragCancel(u){let{active:v,over:h}=u;s(t.onDragCancel({active:v,over:h}))}}),[s,t])),!c)return null;const d=R.createElement(R.Fragment,null,R.createElement($d,{id:r,value:o.draggable}),R.createElement(Fd,{id:a,announcement:i}));return n?Ze.createPortal(d,n):d}var ge;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ge||(ge={}));function mr(){}function ci(e,t){return R.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Ud(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const $e=Object.freeze({x:0,y:0});function Yd(e,t){const n=gr(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function Kd(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Gd(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function qd(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),i=o-r,a=s-n;if(r<o&&n<s){const c=t.width*t.height,l=e.width*e.height,d=i*a,u=d/(c+l-d);return Number(u.toFixed(4))}return 0}const Xd=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const s of r){const{id:i}=s,a=n.get(i);if(a){const c=qd(a,t);c>0&&o.push({id:i,data:{droppableContainer:s,value:c}})}}return o.sort(Kd)};function Zd(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Ba(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:$e}function Jd(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];return o.reduce((i,a)=>({...i,top:i.top+e*a.y,bottom:i.bottom+e*a.y,left:i.left+e*a.x,right:i.right+e*a.x}),{...n})}}const Qd=Jd(1);function Ha(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function ef(e,t,n){const r=Ha(t);if(!r)return e;const{scaleX:o,scaleY:s,x:i,y:a}=r,c=e.left-i-(1-o)*parseFloat(n),l=e.top-a-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),d=o?e.width/o:e.width,u=s?e.height/s:e.height;return{width:d,height:u,top:l,right:c+d,bottom:l+u,left:c}}const tf={ignoreTransform:!1};function On(e,t){t===void 0&&(t=tf);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:l,transformOrigin:d}=Ce(e).getComputedStyle(e);l&&(n=ef(n,l,d))}const{top:r,left:o,width:s,height:i,bottom:a,right:c}=n;return{top:r,left:o,width:s,height:i,bottom:a,right:c}}function li(e){return On(e,{ignoreTransform:!0})}function nf(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function rf(e,t){return t===void 0&&(t=Ce(e).getComputedStyle(e)),t.position==="fixed"}function of(e,t){t===void 0&&(t=Ce(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const s=t[o];return typeof s=="string"?n.test(s):!1})}function ss(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(rs(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Rn(o)||Fa(o)||n.includes(o))return n;const s=Ce(e).getComputedStyle(o);return o!==e&&of(o,s)&&n.push(o),rf(o,s)?n:r(o.parentNode)}return e?r(e):n}function Va(e){const[t]=ss(e,1);return t??null}function oo(e){return!kr||!e?null:Gt(e)?e:ns(e)?rs(e)||e===qt(e).scrollingElement?window:Rn(e)?e:null:null}function Ua(e){return Gt(e)?e.scrollX:e.scrollLeft}function Ya(e){return Gt(e)?e.scrollY:e.scrollTop}function _o(e){return{x:Ua(e),y:Ya(e)}}var me;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(me||(me={}));function Ka(e){return!kr||!e?!1:e===document.scrollingElement}function Ga(e){const t={x:0,y:0},n=Ka(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,s=e.scrollLeft<=t.x,i=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return{isTop:o,isLeft:s,isBottom:i,isRight:a,maxScroll:r,minScroll:t}}const sf={x:.2,y:.2};function af(e,t,n,r,o){let{top:s,left:i,right:a,bottom:c}=n;r===void 0&&(r=10),o===void 0&&(o=sf);const{isTop:l,isBottom:d,isLeft:u,isRight:v}=Ga(e),h={x:0,y:0},C={x:0,y:0},g={height:t.height*o.y,width:t.width*o.x};return!l&&s<=t.top+g.height?(h.y=me.Backward,C.y=r*Math.abs((t.top+g.height-s)/g.height)):!d&&c>=t.bottom-g.height&&(h.y=me.Forward,C.y=r*Math.abs((t.bottom-g.height-c)/g.height)),!v&&a>=t.right-g.width?(h.x=me.Forward,C.x=r*Math.abs((t.right-g.width-a)/g.width)):!u&&i<=t.left+g.width&&(h.x=me.Backward,C.x=r*Math.abs((t.left+g.width-i)/g.width)),{direction:h,speed:C}}function cf(e){if(e===document.scrollingElement){const{innerWidth:s,innerHeight:i}=window;return{top:0,left:0,right:s,bottom:i,width:s,height:i}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function qa(e){return e.reduce((t,n)=>Bt(t,_o(n)),$e)}function lf(e){return e.reduce((t,n)=>t+Ua(n),0)}function uf(e){return e.reduce((t,n)=>t+Ya(n),0)}function Xa(e,t){if(t===void 0&&(t=On),!e)return;const{top:n,left:r,bottom:o,right:s}=t(e);Va(e)&&(o<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const df=[["x",["left","right"],lf],["y",["top","bottom"],uf]];class is{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=ss(n),o=qa(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[s,i,a]of df)for(const c of i)Object.defineProperty(this,c,{get:()=>{const l=a(r),d=o[s]-l;return this.rect[c]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class mn{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function ff(e){const{EventTarget:t}=Ce(e);return e instanceof t?e:qt(e)}function so(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var Pe;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Pe||(Pe={}));function ui(e){e.preventDefault()}function pf(e){e.stopPropagation()}var de;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(de||(de={}));const Za={start:[de.Space,de.Enter],cancel:[de.Esc],end:[de.Space,de.Enter,de.Tab]},hf=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case de.Right:return{...n,x:n.x+25};case de.Left:return{...n,x:n.x-25};case de.Down:return{...n,y:n.y+25};case de.Up:return{...n,y:n.y-25}}};class Ja{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new mn(qt(n)),this.windowListeners=new mn(Ce(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Pe.Resize,this.handleCancel),this.windowListeners.add(Pe.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Pe.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&Xa(r),n($e)}handleKeyDown(t){if(os(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:s=Za,coordinateGetter:i=hf,scrollBehavior:a="smooth"}=o,{code:c}=t;if(s.end.includes(c)){this.handleEnd(t);return}if(s.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:l}=r.current,d=l?{x:l.left,y:l.top}:$e;this.referenceCoordinates||(this.referenceCoordinates=d);const u=i(t,{active:n,context:r.current,currentCoordinates:d});if(u){const v=hr(u,d),h={x:0,y:0},{scrollableAncestors:C}=r.current;for(const g of C){const x=t.code,{isTop:y,isRight:f,isLeft:w,isBottom:D,maxScroll:m,minScroll:T}=Ga(g),b=cf(g),E={x:Math.min(x===de.Right?b.right-b.width/2:b.right,Math.max(x===de.Right?b.left:b.left+b.width/2,u.x)),y:Math.min(x===de.Down?b.bottom-b.height/2:b.bottom,Math.max(x===de.Down?b.top:b.top+b.height/2,u.y))},M=x===de.Right&&!f||x===de.Left&&!w,N=x===de.Down&&!D||x===de.Up&&!y;if(M&&E.x!==u.x){const A=g.scrollLeft+v.x,W=x===de.Right&&A<=m.x||x===de.Left&&A>=T.x;if(W&&!v.y){g.scrollTo({left:A,behavior:a});return}W?h.x=g.scrollLeft-A:h.x=x===de.Right?g.scrollLeft-m.x:g.scrollLeft-T.x,h.x&&g.scrollBy({left:-h.x,behavior:a});break}else if(N&&E.y!==u.y){const A=g.scrollTop+v.y,W=x===de.Down&&A<=m.y||x===de.Up&&A>=T.y;if(W&&!v.x){g.scrollTo({top:A,behavior:a});return}W?h.y=g.scrollTop-A:h.y=x===de.Down?g.scrollTop-m.y:g.scrollTop-T.y,h.y&&g.scrollBy({top:-h.y,behavior:a});break}}this.handleMove(t,Bt(hr(u,this.referenceCoordinates),h))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Ja.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Za,onActivation:o}=t,{active:s}=n;const{code:i}=e.nativeEvent;if(r.start.includes(i)){const a=s.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function di(e){return!!(e&&"distance"in e)}function fi(e){return!!(e&&"delay"in e)}class as{constructor(t,n,r){var o;r===void 0&&(r=ff(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:s}=t,{target:i}=s;this.props=t,this.events=n,this.document=qt(i),this.documentListeners=new mn(this.document),this.listeners=new mn(r),this.windowListeners=new mn(Ce(i)),this.initialCoordinates=(o=gr(s))!=null?o:$e,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Pe.Resize,this.handleCancel),this.windowListeners.add(Pe.DragStart,ui),this.windowListeners.add(Pe.VisibilityChange,this.handleCancel),this.windowListeners.add(Pe.ContextMenu,ui),this.documentListeners.add(Pe.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(fi(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(di(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:o}=this.props;o(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Pe.Click,pf,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Pe.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:s}=this,{onMove:i,options:{activationConstraint:a}}=s;if(!o)return;const c=(n=gr(t))!=null?n:$e,l=hr(o,c);if(!r&&a){if(di(a)){if(a.tolerance!=null&&so(l,a.tolerance))return this.handleCancel();if(so(l,a.distance))return this.handleStart()}if(fi(a)&&so(l,a.tolerance))return this.handleCancel();this.handlePending(a,l);return}t.cancelable&&t.preventDefault(),i(c)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===de.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const gf={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Qa extends as{constructor(t){const{event:n}=t,r=qt(n.target);super(t,gf,r)}}Qa.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const mf={move:{name:"mousemove"},end:{name:"mouseup"}};var Ao;(function(e){e[e.RightClick=2]="RightClick"})(Ao||(Ao={}));class ec extends as{constructor(t){super(t,mf,qt(t.event.target))}}ec.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Ao.RightClick?!1:(r==null||r({event:n}),!0)}}];const io={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class tc extends as{constructor(t){super(t,io)}static setup(){return window.addEventListener(io.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(io.move.name,t)};function t(){}}}tc.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r==null||r({event:n}),!0)}}];var vn;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(vn||(vn={}));var vr;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(vr||(vr={}));function vf(e){let{acceleration:t,activator:n=vn.Pointer,canScroll:r,draggingRect:o,enabled:s,interval:i=5,order:a=vr.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:d,delta:u,threshold:v}=e;const h=bf({delta:u,disabled:!s}),[C,g]=Ad(),x=R.useRef({x:0,y:0}),y=R.useRef({x:0,y:0}),f=R.useMemo(()=>{switch(n){case vn.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case vn.DraggableRect:return o}},[n,o,c]),w=R.useRef(null),D=R.useCallback(()=>{const T=w.current;if(!T)return;const b=x.current.x*y.current.x,E=x.current.y*y.current.y;T.scrollBy(b,E)},[]),m=R.useMemo(()=>a===vr.TreeOrder?[...l].reverse():l,[a,l]);R.useEffect(()=>{if(!s||!l.length||!f){g();return}for(const T of m){if((r==null?void 0:r(T))===!1)continue;const b=l.indexOf(T),E=d[b];if(!E)continue;const{direction:M,speed:N}=af(T,E,f,t,v);for(const A of["x","y"])h[A][M[A]]||(N[A]=0,M[A]=0);if(N.x>0||N.y>0){g(),w.current=T,C(D,i),x.current=N,y.current=M;return}}x.current={x:0,y:0},y.current={x:0,y:0},g()},[t,D,r,g,s,i,JSON.stringify(f),JSON.stringify(h),C,l,m,d,JSON.stringify(v)])}const yf={x:{[me.Backward]:!1,[me.Forward]:!1},y:{[me.Backward]:!1,[me.Forward]:!1}};function bf(e){let{delta:t,disabled:n}=e;const r=pr(t);return Mn(o=>{if(n||!r||!o)return yf;const s={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[me.Backward]:o.x[me.Backward]||s.x===-1,[me.Forward]:o.x[me.Forward]||s.x===1},y:{[me.Backward]:o.y[me.Backward]||s.y===-1,[me.Forward]:o.y[me.Forward]||s.y===1}}},[n,t,r])}function wf(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return Mn(o=>{var s;return t==null?null:(s=r??o)!=null?s:null},[r,t])}function xf(e,t){return R.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,s=o.activators.map(i=>({eventName:i.eventName,handler:t(i.handler,r)}));return[...n,...s]},[]),[e,t])}var xn;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(xn||(xn={}));var No;(function(e){e.Optimized="optimized"})(No||(No={}));const pi=new Map;function Sf(e,t){let{dragging:n,dependencies:r,config:o}=t;const[s,i]=R.useState(null),{frequency:a,measure:c,strategy:l}=o,d=R.useRef(e),u=x(),v=bn(u),h=R.useCallback(function(y){y===void 0&&(y=[]),!v.current&&i(f=>f===null?y:f.concat(y.filter(w=>!f.includes(w))))},[v]),C=R.useRef(null),g=Mn(y=>{if(u&&!n)return pi;if(!y||y===pi||d.current!==e||s!=null){const f=new Map;for(let w of e){if(!w)continue;if(s&&s.length>0&&!s.includes(w.id)&&w.rect.current){f.set(w.id,w.rect.current);continue}const D=w.node.current,m=D?new is(c(D),D):null;w.rect.current=m,m&&f.set(w.id,m)}return f}return y},[e,s,n,u,c]);return R.useEffect(()=>{d.current=e},[e]),R.useEffect(()=>{u||h()},[n,u]),R.useEffect(()=>{s&&s.length>0&&i(null)},[JSON.stringify(s)]),R.useEffect(()=>{u||typeof a!="number"||C.current!==null||(C.current=setTimeout(()=>{h(),C.current=null},a))},[a,u,h,...r]),{droppableRects:g,measureDroppableContainers:h,measuringScheduled:s!=null};function x(){switch(l){case xn.Always:return!1;case xn.BeforeDragging:return n;default:return!n}}}function cs(e,t){return Mn(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Cf(e,t){return cs(e,t)}function Ef(e){let{callback:t,disabled:n}=e;const r=Or(t),o=R.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(r)},[r,n]);return R.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function _r(e){let{callback:t,disabled:n}=e;const r=Or(t),o=R.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(r)},[n]);return R.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Df(e){return new is(On(e),e)}function hi(e,t,n){t===void 0&&(t=Df);const[r,o]=R.useState(null);function s(){o(c=>{if(!e)return null;if(e.isConnected===!1){var l;return(l=c??n)!=null?l:null}const d=t(e);return JSON.stringify(c)===JSON.stringify(d)?c:d})}const i=Ef({callback(c){if(e)for(const l of c){const{type:d,target:u}=l;if(d==="childList"&&u instanceof HTMLElement&&u.contains(e)){s();break}}}}),a=_r({callback:s});return Je(()=>{s(),e?(a==null||a.observe(e),i==null||i.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),i==null||i.disconnect())},[e]),r}function Tf(e){const t=cs(e);return Ba(e,t)}const gi=[];function Rf(e){const t=R.useRef(e),n=Mn(r=>e?r&&r!==gi&&e&&t.current&&e.parentNode===t.current.parentNode?r:ss(e):gi,[e]);return R.useEffect(()=>{t.current=e},[e]),n}function Mf(e){const[t,n]=R.useState(null),r=R.useRef(e),o=R.useCallback(s=>{const i=oo(s.target);i&&n(a=>a?(a.set(i,_o(i)),new Map(a)):null)},[]);return R.useEffect(()=>{const s=r.current;if(e!==s){i(s);const a=e.map(c=>{const l=oo(c);return l?(l.addEventListener("scroll",o,{passive:!0}),[l,_o(l)]):null}).filter(c=>c!=null);n(a.length?new Map(a):null),r.current=e}return()=>{i(e),i(s)};function i(a){a.forEach(c=>{const l=oo(c);l==null||l.removeEventListener("scroll",o)})}},[o,e]),R.useMemo(()=>e.length?t?Array.from(t.values()).reduce((s,i)=>Bt(s,i),$e):qa(e):$e,[e,t])}function mi(e,t){t===void 0&&(t=[]);const n=R.useRef(null);return R.useEffect(()=>{n.current=null},t),R.useEffect(()=>{const r=e!==$e;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?hr(e,n.current):$e}function kf(e){R.useEffect(()=>{if(!kr)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function Of(e,t){return R.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:s}=r;return n[o]=i=>{s(i,t)},n},{}),[e,t])}function nc(e){return R.useMemo(()=>e?nf(e):null,[e])}const vi=[];function Pf(e,t){t===void 0&&(t=On);const[n]=e,r=nc(n?Ce(n):null),[o,s]=R.useState(vi);function i(){s(()=>e.length?e.map(c=>Ka(c)?r:new is(t(c),c)):vi)}const a=_r({callback:i});return Je(()=>{a==null||a.disconnect(),i(),e.forEach(c=>a==null?void 0:a.observe(c))},[e]),o}function rc(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Rn(t)?t:e}function _f(e){let{measure:t}=e;const[n,r]=R.useState(null),o=R.useCallback(l=>{for(const{target:d}of l)if(Rn(d)){r(u=>{const v=t(d);return u?{...u,width:v.width,height:v.height}:v});break}},[t]),s=_r({callback:o}),i=R.useCallback(l=>{const d=rc(l);s==null||s.disconnect(),d&&(s==null||s.observe(d)),r(d?t(d):null)},[t,s]),[a,c]=fr(i);return R.useMemo(()=>({nodeRef:a,rect:n,setRef:c}),[n,a,c])}const Af=[{sensor:Qa,options:{}},{sensor:Ja,options:{}}],Nf={current:{}},ar={draggable:{measure:li},droppable:{measure:li,strategy:xn.WhileDragging,frequency:No.Optimized},dragOverlay:{measure:On}};class yn extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const If={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new yn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:mr},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ar,measureDroppableContainers:mr,windowRect:null,measuringScheduled:!1},oc={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:mr,draggableNodes:new Map,over:null,measureDroppableContainers:mr},Pn=R.createContext(oc),sc=R.createContext(If);function jf(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new yn}}}function Lf(e,t){switch(t.type){case ge.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ge.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case ge.DragEnd:case ge.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ge.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new yn(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case ge.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,s=e.droppable.containers.get(n);if(!s||r!==s.key)return e;const i=new yn(e.droppable.containers);return i.set(n,{...s,disabled:o}),{...e,droppable:{...e.droppable,containers:i}}}case ge.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new yn(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function $f(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=R.useContext(Pn),s=pr(r),i=pr(n==null?void 0:n.id);return R.useEffect(()=>{if(!t&&!r&&s&&i!=null){if(!os(s)||document.activeElement===s.target)return;const a=o.get(i);if(!a)return;const{activatorNode:c,node:l}=a;if(!c.current&&!l.current)return;requestAnimationFrame(()=>{for(const d of[c.current,l.current]){if(!d)continue;const u=jd(d);if(u){u.focus();break}}})}},[r,t,o,i,s]),null}function ic(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,s)=>s({transform:o,...r}),n):n}function Ff(e){return R.useMemo(()=>({draggable:{...ar.draggable,...e==null?void 0:e.draggable},droppable:{...ar.droppable,...e==null?void 0:e.droppable},dragOverlay:{...ar.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function zf(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const s=R.useRef(!1),{x:i,y:a}=typeof o=="boolean"?{x:o,y:o}:o;Je(()=>{if(!i&&!a||!t){s.current=!1;return}if(s.current||!r)return;const l=t==null?void 0:t.node.current;if(!l||l.isConnected===!1)return;const d=n(l),u=Ba(d,r);if(i||(u.x=0),a||(u.y=0),s.current=!0,Math.abs(u.x)>0||Math.abs(u.y)>0){const v=Va(l);v&&v.scrollBy({top:u.y,left:u.x})}},[t,i,a,r,n])}const Ar=R.createContext({...$e,scaleX:1,scaleY:1});var dt;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(dt||(dt={}));const ls=R.memo(function(t){var n,r,o,s;let{id:i,accessibility:a,autoScroll:c=!0,children:l,sensors:d=Af,collisionDetection:u=Xd,measuring:v,modifiers:h,...C}=t;const g=R.useReducer(Lf,void 0,jf),[x,y]=g,[f,w]=Wd(),[D,m]=R.useState(dt.Uninitialized),T=D===dt.Initialized,{draggable:{active:b,nodes:E,translate:M},droppable:{containers:N}}=x,A=b!=null?E.get(b):null,W=R.useRef({initial:null,translated:null}),Y=R.useMemo(()=>{var be;return b!=null?{id:b,data:(be=A==null?void 0:A.data)!=null?be:Nf,rect:W}:null},[b,A]),L=R.useRef(null),[$,k]=R.useState(null),[I,O]=R.useState(null),j=bn(C,Object.values(C)),P=Pr("DndDescribedBy",i),F=R.useMemo(()=>N.getEnabled(),[N]),U=Ff(v),{droppableRects:V,measureDroppableContainers:H,measuringScheduled:X}=Sf(F,{dragging:T,dependencies:[M.x,M.y],config:U.droppable}),K=wf(E,b),z=R.useMemo(()=>I?gr(I):null,[I]),G=sd(),q=Cf(K,U.draggable.measure);zf({activeNode:b!=null?E.get(b):null,config:G.layoutShiftCompensation,initialRect:q,measure:U.draggable.measure});const B=hi(K,U.draggable.measure,q),te=hi(K?K.parentElement:null),_=R.useRef({activatorEvent:null,active:null,activeNode:K,collisionRect:null,collisions:null,droppableRects:V,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:N,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ne=N.getNodeFor((n=_.current.over)==null?void 0:n.id),ae=_f({measure:U.dragOverlay.measure}),fe=(r=ae.nodeRef.current)!=null?r:K,ve=T?(o=ae.rect)!=null?o:B:null,Ne=!!(ae.nodeRef.current&&ae.rect),Pt=Tf(Ne?null:B),Ie=nc(fe?Ce(fe):null),je=Rf(T?ne??K:null),_t=Pf(je),At=ic(h,{transform:{x:M.x-Pt.x,y:M.y-Pt.y,scaleX:1,scaleY:1},activatorEvent:I,active:Y,activeNodeRect:B,containerNodeRect:te,draggingNodeRect:ve,over:_.current.over,overlayNodeRect:ae.rect,scrollableAncestors:je,scrollableAncestorRects:_t,windowRect:Ie}),Wn=z?Bt(z,M):null,Bn=Mf(je),Xs=mi(Bn),Zs=mi(Bn,[B]),Nt=Bt(At,Xs),It=ve?Qd(ve,At):null,nn=Y&&It?u({active:Y,collisionRect:It,droppableRects:V,droppableContainers:F,pointerCoordinates:Wn}):null,Js=Gd(nn,"id"),[rt,Qs]=R.useState(null),ed=Ne?At:Bt(At,Zs),td=Zd(ed,(s=rt==null?void 0:rt.rect)!=null?s:null,B),to=R.useRef(null),ei=R.useCallback((be,De)=>{let{sensor:Te,options:ot}=De;if(L.current==null)return;const Oe=E.get(L.current);if(!Oe)return;const Re=be.nativeEvent,We=new Te({active:L.current,activeNode:Oe,event:Re,options:ot,context:_,onAbort(ye){if(!E.get(ye))return;const{onDragAbort:Be}=j.current,Ge={id:ye};Be==null||Be(Ge),f({type:"onDragAbort",event:Ge})},onPending(ye,st,Be,Ge){if(!E.get(ye))return;const{onDragPending:on}=j.current,it={id:ye,constraint:st,initialCoordinates:Be,offset:Ge};on==null||on(it),f({type:"onDragPending",event:it})},onStart(ye){const st=L.current;if(st==null)return;const Be=E.get(st);if(!Be)return;const{onDragStart:Ge}=j.current,rn={activatorEvent:Re,active:{id:st,data:Be.data,rect:W}};Ze.unstable_batchedUpdates(()=>{Ge==null||Ge(rn),m(dt.Initializing),y({type:ge.DragStart,initialCoordinates:ye,active:st}),f({type:"onDragStart",event:rn}),k(to.current),O(Re)})},onMove(ye){y({type:ge.DragMove,coordinates:ye})},onEnd:jt(ge.DragEnd),onCancel:jt(ge.DragCancel)});to.current=We;function jt(ye){return async function(){const{active:Be,collisions:Ge,over:rn,scrollAdjustedTranslate:on}=_.current;let it=null;if(Be&&on){const{cancelDrop:sn}=j.current;it={activatorEvent:Re,active:Be,collisions:Ge,delta:on,over:rn},ye===ge.DragEnd&&typeof sn=="function"&&await Promise.resolve(sn(it))&&(ye=ge.DragCancel)}L.current=null,Ze.unstable_batchedUpdates(()=>{y({type:ye}),m(dt.Uninitialized),Qs(null),k(null),O(null),to.current=null;const sn=ye===ge.DragEnd?"onDragEnd":"onDragCancel";if(it){const no=j.current[sn];no==null||no(it),f({type:sn,event:it})}})}}},[E]),nd=R.useCallback((be,De)=>(Te,ot)=>{const Oe=Te.nativeEvent,Re=E.get(ot);if(L.current!==null||!Re||Oe.dndKit||Oe.defaultPrevented)return;const We={active:Re};be(Te,De.options,We)===!0&&(Oe.dndKit={capturedBy:De.sensor},L.current=ot,ei(Te,De))},[E,ei]),ti=xf(d,nd);kf(d),Je(()=>{B&&D===dt.Initializing&&m(dt.Initialized)},[B,D]),R.useEffect(()=>{const{onDragMove:be}=j.current,{active:De,activatorEvent:Te,collisions:ot,over:Oe}=_.current;if(!De||!Te)return;const Re={active:De,activatorEvent:Te,collisions:ot,delta:{x:Nt.x,y:Nt.y},over:Oe};Ze.unstable_batchedUpdates(()=>{be==null||be(Re),f({type:"onDragMove",event:Re})})},[Nt.x,Nt.y]),R.useEffect(()=>{const{active:be,activatorEvent:De,collisions:Te,droppableContainers:ot,scrollAdjustedTranslate:Oe}=_.current;if(!be||L.current==null||!De||!Oe)return;const{onDragOver:Re}=j.current,We=ot.get(Js),jt=We&&We.rect.current?{id:We.id,rect:We.rect.current,data:We.data,disabled:We.disabled}:null,ye={active:be,activatorEvent:De,collisions:Te,delta:{x:Oe.x,y:Oe.y},over:jt};Ze.unstable_batchedUpdates(()=>{Qs(jt),Re==null||Re(ye),f({type:"onDragOver",event:ye})})},[Js]),Je(()=>{_.current={activatorEvent:I,active:Y,activeNode:K,collisionRect:It,collisions:nn,droppableRects:V,draggableNodes:E,draggingNode:fe,draggingNodeRect:ve,droppableContainers:N,over:rt,scrollableAncestors:je,scrollAdjustedTranslate:Nt},W.current={initial:ve,translated:It}},[Y,K,nn,It,E,fe,ve,V,N,rt,je,Nt]),vf({...G,delta:M,draggingRect:It,pointerCoordinates:Wn,scrollableAncestors:je,scrollableAncestorRects:_t});const rd=R.useMemo(()=>({active:Y,activeNode:K,activeNodeRect:B,activatorEvent:I,collisions:nn,containerNodeRect:te,dragOverlay:ae,draggableNodes:E,droppableContainers:N,droppableRects:V,over:rt,measureDroppableContainers:H,scrollableAncestors:je,scrollableAncestorRects:_t,measuringConfiguration:U,measuringScheduled:X,windowRect:Ie}),[Y,K,B,I,nn,te,ae,E,N,V,rt,H,je,_t,U,X,Ie]),od=R.useMemo(()=>({activatorEvent:I,activators:ti,active:Y,activeNodeRect:B,ariaDescribedById:{draggable:P},dispatch:y,draggableNodes:E,over:rt,measureDroppableContainers:H}),[I,ti,Y,B,y,P,E,rt,H]);return R.createElement(Wa.Provider,{value:w},R.createElement(Pn.Provider,{value:od},R.createElement(sc.Provider,{value:rd},R.createElement(Ar.Provider,{value:td},l)),R.createElement($f,{disabled:(a==null?void 0:a.restoreFocus)===!1})),R.createElement(Vd,{...a,hiddenTextDescribedById:P}));function sd(){const be=($==null?void 0:$.autoScrollEnabled)===!1,De=typeof c=="object"?c.enabled===!1:c===!1,Te=T&&!be&&!De;return typeof c=="object"?{...c,enabled:Te}:{enabled:Te}}}),Wf=R.createContext(null),yi="button",Bf="Draggable";function us(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const s=Pr(Bf),{activators:i,activatorEvent:a,active:c,activeNodeRect:l,ariaDescribedById:d,draggableNodes:u,over:v}=R.useContext(Pn),{role:h=yi,roleDescription:C="draggable",tabIndex:g=0}=o??{},x=(c==null?void 0:c.id)===t,y=R.useContext(x?Ar:Wf),[f,w]=fr(),[D,m]=fr(),T=Of(i,t),b=bn(n);Je(()=>(u.set(t,{id:t,key:s,node:f,activatorNode:D,data:b}),()=>{const M=u.get(t);M&&M.key===s&&u.delete(t)}),[u,t]);const E=R.useMemo(()=>({role:h,tabIndex:g,"aria-disabled":r,"aria-pressed":x&&h===yi?!0:void 0,"aria-roledescription":C,"aria-describedby":d.draggable}),[r,h,g,x,C,d.draggable]);return{active:c,activatorEvent:a,activeNodeRect:l,attributes:E,isDragging:x,listeners:r?void 0:T,node:f,over:v,setNodeRef:w,setActivatorNodeRef:m,transform:y}}function Hf(){return R.useContext(sc)}const Vf="Droppable",Uf={timeout:25};function Hn(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const s=Pr(Vf),{active:i,dispatch:a,over:c,measureDroppableContainers:l}=R.useContext(Pn),d=R.useRef({disabled:n}),u=R.useRef(!1),v=R.useRef(null),h=R.useRef(null),{disabled:C,updateMeasurementsFor:g,timeout:x}={...Uf,...o},y=bn(g??r),f=R.useCallback(()=>{if(!u.current){u.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{l(Array.isArray(y.current)?y.current:[y.current]),h.current=null},x)},[x]),w=_r({callback:f,disabled:C||!i}),D=R.useCallback((E,M)=>{w&&(M&&(w.unobserve(M),u.current=!1),E&&w.observe(E))},[w]),[m,T]=fr(D),b=bn(t);return R.useEffect(()=>{!w||!m.current||(w.disconnect(),u.current=!1,w.observe(m.current))},[m,w]),R.useEffect(()=>(a({type:ge.RegisterDroppable,element:{id:r,key:s,disabled:n,node:m,rect:v,data:b}}),()=>a({type:ge.UnregisterDroppable,key:s,id:r})),[r]),R.useEffect(()=>{n!==d.current.disabled&&(a({type:ge.SetDroppableDisabled,id:r,key:s,disabled:n}),d.current.disabled=n)},[r,s,n,a]),{active:i,rect:v,isOver:(c==null?void 0:c.id)===r,node:m,over:c,setNodeRef:T}}function Yf(e){let{animation:t,children:n}=e;const[r,o]=R.useState(null),[s,i]=R.useState(null),a=pr(n);return!n&&!r&&a&&o(a),Je(()=>{if(!s)return;const c=r==null?void 0:r.key,l=r==null?void 0:r.props.id;if(c==null||l==null){o(null);return}Promise.resolve(t(l,s)).then(()=>{o(null)})},[t,r,s]),R.createElement(R.Fragment,null,n,r?R.cloneElement(r,{ref:i}):null)}const Kf={x:0,y:0,scaleX:1,scaleY:1};function Gf(e){let{children:t}=e;return R.createElement(Pn.Provider,{value:oc},R.createElement(Ar.Provider,{value:Kf},t))}const qf={position:"fixed",touchAction:"none"},Xf=e=>os(e)?"transform 250ms ease":void 0,Zf=R.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:o,children:s,className:i,rect:a,style:c,transform:l,transition:d=Xf}=e;if(!a)return null;const u=o?l:{...l,scaleX:1,scaleY:1},v={...qf,width:a.width,height:a.height,top:a.top,left:a.left,transform:wn.Transform.toString(u),transformOrigin:o&&r?Yd(r,a):void 0,transition:typeof d=="function"?d(r):d,...c};return R.createElement(n,{className:i,style:v,ref:t},s)}),Jf=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:s,className:i}=e;if(s!=null&&s.active)for(const[a,c]of Object.entries(s.active))c!==void 0&&(o[a]=n.node.style.getPropertyValue(a),n.node.style.setProperty(a,c));if(s!=null&&s.dragOverlay)for(const[a,c]of Object.entries(s.dragOverlay))c!==void 0&&r.node.style.setProperty(a,c);return i!=null&&i.active&&n.node.classList.add(i.active),i!=null&&i.dragOverlay&&r.node.classList.add(i.dragOverlay),function(){for(const[c,l]of Object.entries(o))n.node.style.setProperty(c,l);i!=null&&i.active&&n.node.classList.remove(i.active)}},Qf=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:wn.Transform.toString(t)},{transform:wn.Transform.toString(n)}]},ep={duration:250,easing:"ease",keyframes:Qf,sideEffects:Jf({styles:{active:{opacity:"0"}}})};function tp(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return Or((s,i)=>{if(t===null)return;const a=n.get(s);if(!a)return;const c=a.node.current;if(!c)return;const l=rc(i);if(!l)return;const{transform:d}=Ce(i).getComputedStyle(i),u=Ha(d);if(!u)return;const v=typeof t=="function"?t:np(t);return Xa(c,o.draggable.measure),v({active:{id:s,data:a.data,node:c,rect:o.draggable.measure(c)},draggableNodes:n,dragOverlay:{node:i,rect:o.dragOverlay.measure(l)},droppableContainers:r,measuringConfiguration:o,transform:u})})}function np(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...ep,...e};return s=>{let{active:i,dragOverlay:a,transform:c,...l}=s;if(!t)return;const d={x:a.rect.left-i.rect.left,y:a.rect.top-i.rect.top},u={scaleX:c.scaleX!==1?i.rect.width*c.scaleX/a.rect.width:1,scaleY:c.scaleY!==1?i.rect.height*c.scaleY/a.rect.height:1},v={x:c.x-d.x,y:c.y-d.y,...u},h=o({...l,active:i,dragOverlay:a,transform:{initial:c,final:v}}),[C]=h,g=h[h.length-1];if(JSON.stringify(C)===JSON.stringify(g))return;const x=r==null?void 0:r({active:i,dragOverlay:a,...l}),y=a.node.animate(h,{duration:t,easing:n,fill:"forwards"});return new Promise(f=>{y.onfinish=()=>{x==null||x(),f()}})}}let bi=0;function rp(e){return R.useMemo(()=>{if(e!=null)return bi++,bi},[e])}const op=R.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:o,transition:s,modifiers:i,wrapperElement:a="div",className:c,zIndex:l=999}=e;const{activatorEvent:d,active:u,activeNodeRect:v,containerNodeRect:h,draggableNodes:C,droppableContainers:g,dragOverlay:x,over:y,measuringConfiguration:f,scrollableAncestors:w,scrollableAncestorRects:D,windowRect:m}=Hf(),T=R.useContext(Ar),b=rp(u==null?void 0:u.id),E=ic(i,{activatorEvent:d,active:u,activeNodeRect:v,containerNodeRect:h,draggingNodeRect:x.rect,over:y,overlayNodeRect:x.rect,scrollableAncestors:w,scrollableAncestorRects:D,transform:T,windowRect:m}),M=cs(v),N=tp({config:r,draggableNodes:C,droppableContainers:g,measuringConfiguration:f}),A=M?x.setRef:void 0;return R.createElement(Gf,null,R.createElement(Yf,{animation:N},u&&b?R.createElement(Zf,{key:b,id:u.id,ref:A,as:a,activatorEvent:d,adjustScale:t,className:c,transition:s,rect:M,style:{zIndex:l,...o},transform:E},n):null))});/**
6
6
  * @license lucide-react v0.483.0 - ISC
7
7
  *
8
8
  * This source code is licensed under the ISC license.
9
9
  * See the LICENSE file in the root directory of this source tree.
10
- */const Pp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ac=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
10
+ */const sp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ac=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
11
11
  * @license lucide-react v0.483.0 - ISC
12
12
  *
13
13
  * This source code is licensed under the ISC license.
14
14
  * See the LICENSE file in the root directory of this source tree.
15
- */var kp={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
15
+ */var ip={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
16
16
  * @license lucide-react v0.483.0 - ISC
17
17
  *
18
18
  * This source code is licensed under the ISC license.
19
19
  * See the LICENSE file in the root directory of this source tree.
20
- */const Ap=R.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},c)=>R.createElement("svg",{ref:c,...kp,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ac("lucide",o),...a},[...i.map(([l,f])=>R.createElement(l,f)),...Array.isArray(s)?s:[s]]));/**
20
+ */const ap=R.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},c)=>R.createElement("svg",{ref:c,...ip,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ac("lucide",o),...a},[...i.map(([l,d])=>R.createElement(l,d)),...Array.isArray(s)?s:[s]]));/**
21
21
  * @license lucide-react v0.483.0 - ISC
22
22
  *
23
23
  * This source code is licensed under the ISC license.
24
24
  * See the LICENSE file in the root directory of this source tree.
25
- */const we=(e,t)=>{const n=R.forwardRef(({className:r,...o},s)=>R.createElement(Ap,{ref:s,iconNode:t,className:ac(`lucide-${Pp(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
25
+ */const we=(e,t)=>{const n=R.forwardRef(({className:r,...o},s)=>R.createElement(ap,{ref:s,iconNode:t,className:ac(`lucide-${sp(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
26
26
  * @license lucide-react v0.483.0 - ISC
27
27
  *
28
28
  * This source code is licensed under the ISC license.
29
29
  * See the LICENSE file in the root directory of this source tree.
30
- */const _p=[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]],Np=we("Bookmark",_p);/**
30
+ */const cp=[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]],lp=we("Bookmark",cp);/**
31
31
  * @license lucide-react v0.483.0 - ISC
32
32
  *
33
33
  * This source code is licensed under the ISC license.
34
34
  * See the LICENSE file in the root directory of this source tree.
35
- */const Ip=[["path",{d:"m15.2 16.9-.9-.4",key:"1r0w5f"}],["path",{d:"m15.2 19.1-.9.4",key:"j188fs"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"m16.9 15.2-.4-.9",key:"699xu"}],["path",{d:"m16.9 20.8-.4.9",key:"dfjc4z"}],["path",{d:"m19.5 14.3-.4.9",key:"1eb35c"}],["path",{d:"m19.5 21.7-.4-.9",key:"1tonu5"}],["path",{d:"M21 10.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6",key:"11kmuh"}],["path",{d:"m21.7 16.5-.9.4",key:"1knoei"}],["path",{d:"m21.7 19.5-.9-.4",key:"q4dx6b"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}]],jp=we("CalendarCog",Ip);/**
35
+ */const up=[["path",{d:"m15.2 16.9-.9-.4",key:"1r0w5f"}],["path",{d:"m15.2 19.1-.9.4",key:"j188fs"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"m16.9 15.2-.4-.9",key:"699xu"}],["path",{d:"m16.9 20.8-.4.9",key:"dfjc4z"}],["path",{d:"m19.5 14.3-.4.9",key:"1eb35c"}],["path",{d:"m19.5 21.7-.4-.9",key:"1tonu5"}],["path",{d:"M21 10.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6",key:"11kmuh"}],["path",{d:"m21.7 16.5-.9.4",key:"1knoei"}],["path",{d:"m21.7 19.5-.9-.4",key:"q4dx6b"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}]],dp=we("CalendarCog",up);/**
36
36
  * @license lucide-react v0.483.0 - ISC
37
37
  *
38
38
  * This source code is licensed under the ISC license.
39
39
  * See the LICENSE file in the root directory of this source tree.
40
- */const Lp=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],$p=we("CalendarDays",Lp);/**
40
+ */const fp=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],pp=we("CalendarDays",fp);/**
41
41
  * @license lucide-react v0.483.0 - ISC
42
42
  *
43
43
  * This source code is licensed under the ISC license.
44
44
  * See the LICENSE file in the root directory of this source tree.
45
- */const Fp=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],cc=we("Check",Fp);/**
45
+ */const hp=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],cc=we("Check",hp);/**
46
46
  * @license lucide-react v0.483.0 - ISC
47
47
  *
48
48
  * This source code is licensed under the ISC license.
49
49
  * See the LICENSE file in the root directory of this source tree.
50
- */const zp=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],lc=we("ChevronDown",zp);/**
50
+ */const gp=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],lc=we("ChevronDown",gp);/**
51
51
  * @license lucide-react v0.483.0 - ISC
52
52
  *
53
53
  * This source code is licensed under the ISC license.
54
54
  * See the LICENSE file in the root directory of this source tree.
55
- */const Wp=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Bp=we("ChevronLeft",Wp);/**
55
+ */const mp=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],vp=we("ChevronLeft",mp);/**
56
56
  * @license lucide-react v0.483.0 - ISC
57
57
  *
58
58
  * This source code is licensed under the ISC license.
59
59
  * See the LICENSE file in the root directory of this source tree.
60
- */const Hp=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Vp=we("ChevronRight",Hp);/**
60
+ */const yp=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],bp=we("ChevronRight",yp);/**
61
61
  * @license lucide-react v0.483.0 - ISC
62
62
  *
63
63
  * This source code is licensed under the ISC license.
64
64
  * See the LICENSE file in the root directory of this source tree.
65
- */const Yp=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Up=we("ChevronUp",Yp);/**
65
+ */const wp=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],xp=we("ChevronUp",wp);/**
66
66
  * @license lucide-react v0.483.0 - ISC
67
67
  *
68
68
  * This source code is licensed under the ISC license.
69
69
  * See the LICENSE file in the root directory of this source tree.
70
- */const Kp=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7.5 3v18",key:"w0wo6v"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M16.5 3v18",key:"10tjh1"}]],Gp=we("Columns4",Kp);/**
70
+ */const Sp=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],Cp=we("CirclePlus",Sp);/**
71
71
  * @license lucide-react v0.483.0 - ISC
72
72
  *
73
73
  * This source code is licensed under the ISC license.
74
74
  * See the LICENSE file in the root directory of this source tree.
75
- */const qp=[["path",{d:"M3 2h18",key:"15qxfx"}],["rect",{width:"18",height:"12",x:"3",y:"6",rx:"2",key:"1439r6"}],["path",{d:"M3 22h18",key:"8prr45"}]],Xp=we("GalleryVertical",qp);/**
75
+ */const Ep=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7.5 3v18",key:"w0wo6v"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M16.5 3v18",key:"10tjh1"}]],Dp=we("Columns4",Ep);/**
76
76
  * @license lucide-react v0.483.0 - ISC
77
77
  *
78
78
  * This source code is licensed under the ISC license.
79
79
  * See the LICENSE file in the root directory of this source tree.
80
- */const Zp=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Jp=we("Grid3x3",Zp);/**
80
+ */const Tp=[["path",{d:"M3 2h18",key:"15qxfx"}],["rect",{width:"18",height:"12",x:"3",y:"6",rx:"2",key:"1439r6"}],["path",{d:"M3 22h18",key:"8prr45"}]],Rp=we("GalleryVertical",Tp);/**
81
81
  * @license lucide-react v0.483.0 - ISC
82
82
  *
83
83
  * This source code is licensed under the ISC license.
84
84
  * See the LICENSE file in the root directory of this source tree.
85
- */const Qp=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],eh=we("Pencil",Qp);/**
85
+ */const Mp=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],kp=we("Grid3x3",Mp);/**
86
86
  * @license lucide-react v0.483.0 - ISC
87
87
  *
88
88
  * This source code is licensed under the ISC license.
89
89
  * See the LICENSE file in the root directory of this source tree.
90
- */const th=[["path",{d:"M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z",key:"xwnzip"}],["path",{d:"M21 11V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6",key:"14rsvq"}]],nh=we("SquareMousePointer",th);/**
90
+ */const Op=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Pp=we("Pencil",Op);/**
91
91
  * @license lucide-react v0.483.0 - ISC
92
92
  *
93
93
  * This source code is licensed under the ISC license.
94
94
  * See the LICENSE file in the root directory of this source tree.
95
- */const rh=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],oh=we("Trash2",rh);/**
95
+ */const _p=[["path",{d:"M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z",key:"xwnzip"}],["path",{d:"M21 11V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6",key:"14rsvq"}]],Ap=we("SquareMousePointer",_p);/**
96
96
  * @license lucide-react v0.483.0 - ISC
97
97
  *
98
98
  * This source code is licensed under the ISC license.
99
99
  * See the LICENSE file in the root directory of this source tree.
100
- */const sh=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ih=we("X",sh);function gi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Or(...e){return t=>{let n=!1;const r=e.map(o=>{const s=gi(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():gi(e[o],null)}}}}function le(...e){return S.useCallback(Or(...e),e)}function St(e){const t=ch(e),n=S.forwardRef((r,o)=>{const{children:s,...i}=r,a=S.Children.toArray(s),c=a.find(uh);if(c){const l=c.props.children,f=a.map(u=>u===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:u);return h.jsx(t,{...i,ref:o,children:S.isValidElement(l)?S.cloneElement(l,void 0,f):null})}return h.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var ah=St("Slot");function ch(e){const t=S.forwardRef((n,r)=>{const{children:o,...s}=n;if(S.isValidElement(o)){const i=fh(o),a=dh(s,o.props);return o.type!==S.Fragment&&(a.ref=r?Or(r,i):i),S.cloneElement(o,a)}return S.Children.count(o)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var uc=Symbol("radix.slottable");function lh(e){const t=({children:n})=>h.jsx(h.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=uc,t}function uh(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===uc}function dh(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function fh(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const mi=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,vi=Xa,ss=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return vi(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(l=>{const f=n==null?void 0:n[l],u=s==null?void 0:s[l];if(f===null)return null;const b=mi(f)||mi(u);return o[l][b]}),a=n&&Object.entries(n).reduce((l,f)=>{let[u,b]=f;return b===void 0||(l[u]=b),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,f)=>{let{class:u,className:b,...y}=f;return Object.entries(y).every(C=>{let[p,x]=C;return Array.isArray(x)?x.includes({...s,...a}[p]):{...s,...a}[p]===x})?[...l,u,b]:l},[]);return vi(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},ph=ss("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary cursor-pointer text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 hover:bg-accent",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Ct({className:e,variant:t,size:n,asChild:r=!1,...o}){const s=r?ah:"button";return h.jsx(s,{"data-slot":"button",className:ie(ph({variant:t,size:n,className:e})),...o})}const hh=({handleWeekChange:e})=>h.jsxs("div",{className:"header_day_actions",children:[h.jsx(Ct,{className:"header_day_actions_button",variant:"ghost",size:"lg",onClick:()=>e("previous"),children:h.jsx(Bp,{className:"header_day_actions_button_icon"})}),h.jsx(Ct,{className:"header_day_actions_button",variant:"ghost",size:"lg",onClick:()=>e("next"),children:h.jsx(Vp,{className:"header_day_actions_button_icon"})})]});function ee(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function gt(e,t=[]){let n=[];function r(s,i){const a=S.createContext(i),c=n.length;n=[...n,i];const l=u=>{var g;const{scope:b,children:y,...C}=u,p=((g=b==null?void 0:b[e])==null?void 0:g[c])||a,x=S.useMemo(()=>C,Object.values(C));return h.jsx(p.Provider,{value:x,children:y})};l.displayName=s+"Provider";function f(u,b){var p;const y=((p=b==null?void 0:b[e])==null?void 0:p[c])||a,C=S.useContext(y);if(C)return C;if(i!==void 0)return i;throw new Error(`\`${u}\` must be used within \`${s}\``)}return[l,f]}const o=()=>{const s=n.map(i=>S.createContext(i));return function(a){const c=(a==null?void 0:a[e])||s;return S.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,gh(o,...t)]}function gh(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:c,scopeName:l})=>{const u=c(s)[`__scope${l}`];return{...a,...u}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var mh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],se=mh.reduce((e,t)=>{const n=St(`Primitive.${t}`),r=S.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function dc(e,t){e&&Sr.flushSync(()=>e.dispatchEvent(t))}function _e(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function vh(e,t=globalThis==null?void 0:globalThis.document){const n=_e(e);S.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var yh="DismissableLayer",ko="dismissableLayer.update",bh="dismissableLayer.pointerDownOutside",wh="dismissableLayer.focusOutside",yi,fc=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Mn=S.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...c}=e,l=S.useContext(fc),[f,u]=S.useState(null),b=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=S.useState({}),C=le(t,w=>u(w)),p=Array.from(l.layers),[x]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=p.indexOf(x),d=f?p.indexOf(f):-1,m=l.layersWithOutsidePointerEventsDisabled.size>0,E=d>=g,v=Ch(w=>{const D=w.target,P=[...l.branches].some(_=>_.contains(D));!E||P||(o==null||o(w),i==null||i(w),w.defaultPrevented||a==null||a())},b),T=Eh(w=>{const D=w.target;[...l.branches].some(_=>_.contains(D))||(s==null||s(w),i==null||i(w),w.defaultPrevented||a==null||a())},b);return vh(w=>{d===l.layers.size-1&&(r==null||r(w),!w.defaultPrevented&&a&&(w.preventDefault(),a()))},b),S.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(yi=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),bi(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=yi)}},[f,b,n,l]),S.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),bi())},[f,l]),S.useEffect(()=>{const w=()=>y({});return document.addEventListener(ko,w),()=>document.removeEventListener(ko,w)},[]),h.jsx(se.div,{...c,ref:C,style:{pointerEvents:m?E?"auto":"none":void 0,...e.style},onFocusCapture:ee(e.onFocusCapture,T.onFocusCapture),onBlurCapture:ee(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:ee(e.onPointerDownCapture,v.onPointerDownCapture)})});Mn.displayName=yh;var xh="DismissableLayerBranch",Sh=S.forwardRef((e,t)=>{const n=S.useContext(fc),r=S.useRef(null),o=le(t,r);return S.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),h.jsx(se.div,{...e,ref:o})});Sh.displayName=xh;function Ch(e,t=globalThis==null?void 0:globalThis.document){const n=_e(e),r=S.useRef(!1),o=S.useRef(()=>{});return S.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let c=function(){pc(bh,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Eh(e,t=globalThis==null?void 0:globalThis.document){const n=_e(e),r=S.useRef(!1);return S.useEffect(()=>{const o=s=>{s.target&&!r.current&&pc(wh,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bi(){const e=new CustomEvent(ko);document.dispatchEvent(e)}function pc(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?dc(o,s):o.dispatchEvent(s)}var ye=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{},Dh=S[" useId ".trim().toString()]||(()=>{}),Th=0;function dt(e){const[t,n]=S.useState(Dh());return ye(()=>{n(r=>r??String(Th++))},[e]),e||(t?`radix-${t}`:"")}const Rh=["top","right","bottom","left"],ft=Math.min,Re=Math.max,gr=Math.round,Hn=Math.floor,Be=e=>({x:e,y:e}),Mh={left:"right",right:"left",bottom:"top",top:"bottom"},Oh={start:"end",end:"start"};function Ao(e,t,n){return Re(e,ft(t,n))}function Xe(e,t){return typeof e=="function"?e(t):e}function Ze(e){return e.split("-")[0]}function Gt(e){return e.split("-")[1]}function is(e){return e==="x"?"y":"x"}function as(e){return e==="y"?"height":"width"}function pt(e){return["top","bottom"].includes(Ze(e))?"y":"x"}function cs(e){return is(pt(e))}function Ph(e,t,n){n===void 0&&(n=!1);const r=Gt(e),o=cs(e),s=as(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=mr(i)),[i,mr(i)]}function kh(e){const t=mr(e);return[_o(e),t,_o(t)]}function _o(e){return e.replace(/start|end/g,t=>Oh[t])}function Ah(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function _h(e,t,n,r){const o=Gt(e);let s=Ah(Ze(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(_o)))),s}function mr(e){return e.replace(/left|right|bottom|top/g,t=>Mh[t])}function Nh(e){return{top:0,right:0,bottom:0,left:0,...e}}function hc(e){return typeof e!="number"?Nh(e):{top:e,right:e,bottom:e,left:e}}function vr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function wi(e,t,n){let{reference:r,floating:o}=e;const s=pt(t),i=cs(t),a=as(i),c=Ze(t),l=s==="y",f=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,b=r[a]/2-o[a]/2;let y;switch(c){case"top":y={x:f,y:r.y-o.height};break;case"bottom":y={x:f,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:u};break;case"left":y={x:r.x-o.width,y:u};break;default:y={x:r.x,y:r.y}}switch(Gt(t)){case"start":y[i]-=b*(n&&l?-1:1);break;case"end":y[i]+=b*(n&&l?-1:1);break}return y}const Ih=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:u}=wi(l,r,c),b=r,y={},C=0;for(let p=0;p<a.length;p++){const{name:x,fn:g}=a[p],{x:d,y:m,data:E,reset:v}=await g({x:f,y:u,initialPlacement:r,placement:b,strategy:o,middlewareData:y,rects:l,platform:i,elements:{reference:e,floating:t}});f=d??f,u=m??u,y={...y,[x]:{...y[x],...E}},v&&C<=50&&(C++,typeof v=="object"&&(v.placement&&(b=v.placement),v.rects&&(l=v.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):v.rects),{x:f,y:u}=wi(l,b,c)),p=-1)}return{x:f,y:u,placement:b,strategy:o,middlewareData:y}};async function bn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:b=!1,padding:y=0}=Xe(t,e),C=hc(y),x=a[b?u==="floating"?"reference":"floating":u],g=vr(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:f,strategy:c})),d=u==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,m=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),E=await(s.isElement==null?void 0:s.isElement(m))?await(s.getScale==null?void 0:s.getScale(m))||{x:1,y:1}:{x:1,y:1},v=vr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:d,offsetParent:m,strategy:c}):d);return{top:(g.top-v.top+C.top)/E.y,bottom:(v.bottom-g.bottom+C.bottom)/E.y,left:(g.left-v.left+C.left)/E.x,right:(v.right-g.right+C.right)/E.x}}const jh=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:l,padding:f=0}=Xe(e,t)||{};if(l==null)return{};const u=hc(f),b={x:n,y:r},y=cs(o),C=as(y),p=await i.getDimensions(l),x=y==="y",g=x?"top":"left",d=x?"bottom":"right",m=x?"clientHeight":"clientWidth",E=s.reference[C]+s.reference[y]-b[y]-s.floating[C],v=b[y]-s.reference[y],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let w=T?T[m]:0;(!w||!await(i.isElement==null?void 0:i.isElement(T)))&&(w=a.floating[m]||s.floating[C]);const D=E/2-v/2,P=w/2-p[C]/2-1,_=ft(u[g],P),I=ft(u[d],P),H=_,K=w-p[C]-I,j=w/2-p[C]/2+D,F=Ao(H,j,K),k=!c.arrow&&Gt(o)!=null&&j!==F&&s.reference[C]/2-(j<H?_:I)-p[C]/2<0,N=k?j<H?j-H:j-K:0;return{[y]:b[y]+N,data:{[y]:F,centerOffset:j-F-N,...k&&{alignmentOffset:N}},reset:k}}}),Lh=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:b,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:p=!0,...x}=Xe(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=Ze(o),d=pt(a),m=Ze(a)===a,E=await(c.isRTL==null?void 0:c.isRTL(l.floating)),v=b||(m||!p?[mr(a)]:kh(a)),T=C!=="none";!b&&T&&v.push(..._h(a,p,C,E));const w=[a,...v],D=await bn(t,x),P=[];let _=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&P.push(D[g]),u){const j=Ph(o,i,E);P.push(D[j[0]],D[j[1]])}if(_=[..._,{placement:o,overflows:P}],!P.every(j=>j<=0)){var I,H;const j=(((I=s.flip)==null?void 0:I.index)||0)+1,F=w[j];if(F)return{data:{index:j,overflows:_},reset:{placement:F}};let k=(H=_.filter(N=>N.overflows[0]<=0).sort((N,M)=>N.overflows[1]-M.overflows[1])[0])==null?void 0:H.placement;if(!k)switch(y){case"bestFit":{var K;const N=(K=_.filter(M=>{if(T){const A=pt(M.placement);return A===d||A==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(A=>A>0).reduce((A,O)=>A+O,0)]).sort((M,A)=>M[1]-A[1])[0])==null?void 0:K[0];N&&(k=N);break}case"initialPlacement":k=a;break}if(o!==k)return{reset:{placement:k}}}return{}}}};function xi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Si(e){return Rh.some(t=>e[t]>=0)}const $h=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Xe(e,t);switch(r){case"referenceHidden":{const s=await bn(t,{...o,elementContext:"reference"}),i=xi(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Si(i)}}}case"escaped":{const s=await bn(t,{...o,altBoundary:!0}),i=xi(s,n.floating);return{data:{escapedOffsets:i,escaped:Si(i)}}}default:return{}}}}};async function Fh(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Ze(n),a=Gt(n),c=pt(n)==="y",l=["left","top"].includes(i)?-1:1,f=s&&c?-1:1,u=Xe(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:C}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof C=="number"&&(y=a==="end"?C*-1:C),c?{x:y*f,y:b*l}:{x:b*l,y:y*f}}const zh=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await Fh(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},Wh=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:x=>{let{x:g,y:d}=x;return{x:g,y:d}}},...c}=Xe(e,t),l={x:n,y:r},f=await bn(t,c),u=pt(Ze(o)),b=is(u);let y=l[b],C=l[u];if(s){const x=b==="y"?"top":"left",g=b==="y"?"bottom":"right",d=y+f[x],m=y-f[g];y=Ao(d,y,m)}if(i){const x=u==="y"?"top":"left",g=u==="y"?"bottom":"right",d=C+f[x],m=C-f[g];C=Ao(d,C,m)}const p=a.fn({...t,[b]:y,[u]:C});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[b]:s,[u]:i}}}}}},Bh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=Xe(e,t),f={x:n,y:r},u=pt(o),b=is(u);let y=f[b],C=f[u];const p=Xe(a,t),x=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const m=b==="y"?"height":"width",E=s.reference[b]-s.floating[m]+x.mainAxis,v=s.reference[b]+s.reference[m]-x.mainAxis;y<E?y=E:y>v&&(y=v)}if(l){var g,d;const m=b==="y"?"width":"height",E=["top","left"].includes(Ze(o)),v=s.reference[u]-s.floating[m]+(E&&((g=i.offset)==null?void 0:g[u])||0)+(E?0:x.crossAxis),T=s.reference[u]+s.reference[m]+(E?0:((d=i.offset)==null?void 0:d[u])||0)-(E?x.crossAxis:0);C<v?C=v:C>T&&(C=T)}return{[b]:y,[u]:C}}}},Hh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:c=()=>{},...l}=Xe(e,t),f=await bn(t,l),u=Ze(o),b=Gt(o),y=pt(o)==="y",{width:C,height:p}=s.floating;let x,g;u==="top"||u==="bottom"?(x=u,g=b===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(g=u,x=b==="end"?"top":"bottom");const d=p-f.top-f.bottom,m=C-f.left-f.right,E=ft(p-f[x],d),v=ft(C-f[g],m),T=!t.middlewareData.shift;let w=E,D=v;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=m),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=d),T&&!b){const _=Re(f.left,0),I=Re(f.right,0),H=Re(f.top,0),K=Re(f.bottom,0);y?D=C-2*(_!==0||I!==0?_+I:Re(f.left,f.right)):w=p-2*(H!==0||K!==0?H+K:Re(f.top,f.bottom))}await c({...t,availableWidth:D,availableHeight:w});const P=await i.getDimensions(a.floating);return C!==P.width||p!==P.height?{reset:{rects:!0}}:{}}}};function Pr(){return typeof window<"u"}function qt(e){return gc(e)?(e.nodeName||"").toLowerCase():"#document"}function Me(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ve(e){var t;return(t=(gc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gc(e){return Pr()?e instanceof Node||e instanceof Me(e).Node:!1}function je(e){return Pr()?e instanceof Element||e instanceof Me(e).Element:!1}function He(e){return Pr()?e instanceof HTMLElement||e instanceof Me(e).HTMLElement:!1}function Ci(e){return!Pr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Me(e).ShadowRoot}function On(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Vh(e){return["table","td","th"].includes(qt(e))}function kr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ls(e){const t=us(),n=je(e)?Le(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Yh(e){let t=ht(e);for(;He(t)&&!zt(t);){if(ls(t))return t;if(kr(t))return null;t=ht(t)}return null}function us(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function zt(e){return["html","body","#document"].includes(qt(e))}function Le(e){return Me(e).getComputedStyle(e)}function Ar(e){return je(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ht(e){if(qt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ci(e)&&e.host||Ve(e);return Ci(t)?t.host:t}function mc(e){const t=ht(e);return zt(t)?e.ownerDocument?e.ownerDocument.body:e.body:He(t)&&On(t)?t:mc(t)}function wn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=mc(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Me(o);if(s){const a=No(i);return t.concat(i,i.visualViewport||[],On(o)?o:[],a&&n?wn(a):[])}return t.concat(o,wn(o,[],n))}function No(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vc(e){const t=Le(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=He(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=gr(n)!==s||gr(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function ds(e){return je(e)?e:e.contextElement}function $t(e){const t=ds(e);if(!He(t))return Be(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=vc(t);let i=(s?gr(n.width):n.width)/r,a=(s?gr(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Uh=Be(0);function yc(e){const t=Me(e);return!us()||!t.visualViewport?Uh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Kh(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Me(e)?!1:t}function Et(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=ds(e);let i=Be(1);t&&(r?je(r)&&(i=$t(r)):i=$t(e));const a=Kh(s,n,r)?yc(s):Be(0);let c=(o.left+a.x)/i.x,l=(o.top+a.y)/i.y,f=o.width/i.x,u=o.height/i.y;if(s){const b=Me(s),y=r&&je(r)?Me(r):r;let C=b,p=No(C);for(;p&&r&&y!==C;){const x=$t(p),g=p.getBoundingClientRect(),d=Le(p),m=g.left+(p.clientLeft+parseFloat(d.paddingLeft))*x.x,E=g.top+(p.clientTop+parseFloat(d.paddingTop))*x.y;c*=x.x,l*=x.y,f*=x.x,u*=x.y,c+=m,l+=E,C=Me(p),p=No(C)}}return vr({width:f,height:u,x:c,y:l})}function fs(e,t){const n=Ar(e).scrollLeft;return t?t.left+n:Et(Ve(e)).left+n}function bc(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:fs(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function Gh(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Ve(r),a=t?kr(t.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=Be(1);const f=Be(0),u=He(r);if((u||!u&&!s)&&((qt(r)!=="body"||On(i))&&(c=Ar(r)),He(r))){const y=Et(r);l=$t(r),f.x=y.x+r.clientLeft,f.y=y.y+r.clientTop}const b=i&&!u&&!s?bc(i,c,!0):Be(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+f.x+b.x,y:n.y*l.y-c.scrollTop*l.y+f.y+b.y}}function qh(e){return Array.from(e.getClientRects())}function Xh(e){const t=Ve(e),n=Ar(e),r=e.ownerDocument.body,o=Re(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Re(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+fs(e);const a=-n.scrollTop;return Le(r).direction==="rtl"&&(i+=Re(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function Zh(e,t){const n=Me(e),r=Ve(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const l=us();(!l||l&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:a,y:c}}function Jh(e,t){const n=Et(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=He(e)?$t(e):Be(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,l=r*s.y;return{width:i,height:a,x:c,y:l}}function Ei(e,t,n){let r;if(t==="viewport")r=Zh(e,n);else if(t==="document")r=Xh(Ve(e));else if(je(t))r=Jh(t,n);else{const o=yc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return vr(r)}function wc(e,t){const n=ht(e);return n===t||!je(n)||zt(n)?!1:Le(n).position==="fixed"||wc(n,t)}function Qh(e,t){const n=t.get(e);if(n)return n;let r=wn(e,[],!1).filter(a=>je(a)&&qt(a)!=="body"),o=null;const s=Le(e).position==="fixed";let i=s?ht(e):e;for(;je(i)&&!zt(i);){const a=Le(i),c=ls(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||On(i)&&!c&&wc(e,i))?r=r.filter(f=>f!==i):o=a,i=ht(i)}return t.set(e,r),r}function eg(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?kr(t)?[]:Qh(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((l,f)=>{const u=Ei(t,f,o);return l.top=Re(u.top,l.top),l.right=ft(u.right,l.right),l.bottom=ft(u.bottom,l.bottom),l.left=Re(u.left,l.left),l},Ei(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function tg(e){const{width:t,height:n}=vc(e);return{width:t,height:n}}function ng(e,t,n){const r=He(t),o=Ve(t),s=n==="fixed",i=Et(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Be(0);if(r||!r&&!s)if((qt(t)!=="body"||On(o))&&(a=Ar(t)),r){const b=Et(t,!0,s,t);c.x=b.x+t.clientLeft,c.y=b.y+t.clientTop}else o&&(c.x=fs(o));const l=o&&!r&&!s?bc(o,a):Be(0),f=i.left+a.scrollLeft-c.x-l.x,u=i.top+a.scrollTop-c.y-l.y;return{x:f,y:u,width:i.width,height:i.height}}function oo(e){return Le(e).position==="static"}function Di(e,t){if(!He(e)||Le(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ve(e)===n&&(n=n.ownerDocument.body),n}function xc(e,t){const n=Me(e);if(kr(e))return n;if(!He(e)){let o=ht(e);for(;o&&!zt(o);){if(je(o)&&!oo(o))return o;o=ht(o)}return n}let r=Di(e,t);for(;r&&Vh(r)&&oo(r);)r=Di(r,t);return r&&zt(r)&&oo(r)&&!ls(r)?n:r||Yh(e)||n}const rg=async function(e){const t=this.getOffsetParent||xc,n=this.getDimensions,r=await n(e.floating);return{reference:ng(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function og(e){return Le(e).direction==="rtl"}const sg={convertOffsetParentRelativeRectToViewportRelativeRect:Gh,getDocumentElement:Ve,getClippingRect:eg,getOffsetParent:xc,getElementRects:rg,getClientRects:qh,getDimensions:tg,getScale:$t,isElement:je,isRTL:og};function Sc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ig(e,t){let n=null,r;const o=Ve(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:f,top:u,width:b,height:y}=l;if(a||t(),!b||!y)return;const C=Hn(u),p=Hn(o.clientWidth-(f+b)),x=Hn(o.clientHeight-(u+y)),g=Hn(f),m={rootMargin:-C+"px "+-p+"px "+-x+"px "+-g+"px",threshold:Re(0,ft(1,c))||1};let E=!0;function v(T){const w=T[0].intersectionRatio;if(w!==c){if(!E)return i();w?i(!1,w):r=setTimeout(()=>{i(!1,1e-7)},1e3)}w===1&&!Sc(l,e.getBoundingClientRect())&&i(),E=!1}try{n=new IntersectionObserver(v,{...m,root:o.ownerDocument})}catch{n=new IntersectionObserver(v,m)}n.observe(e)}return i(!0),s}function ag(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=ds(e),f=o||s?[...l?wn(l):[],...wn(t)]:[];f.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const u=l&&a?ig(l,n):null;let b=-1,y=null;i&&(y=new ResizeObserver(g=>{let[d]=g;d&&d.target===l&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var m;(m=y)==null||m.observe(t)})),n()}),l&&!c&&y.observe(l),y.observe(t));let C,p=c?Et(e):null;c&&x();function x(){const g=Et(e);p&&!Sc(p,g)&&n(),p=g,C=requestAnimationFrame(x)}return n(),()=>{var g;f.forEach(d=>{o&&d.removeEventListener("scroll",n),s&&d.removeEventListener("resize",n)}),u==null||u(),(g=y)==null||g.disconnect(),y=null,c&&cancelAnimationFrame(C)}}const cg=zh,lg=Wh,ug=Lh,dg=Hh,fg=$h,Ti=jh,pg=Bh,hg=(e,t,n)=>{const r=new Map,o={platform:sg,...n},s={...o.platform,_c:r};return Ih(e,t,{...o,platform:s})};var sr=typeof document<"u"?R.useLayoutEffect:R.useEffect;function yr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!yr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!yr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Cc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ri(e,t){const n=Cc(e);return Math.round(t*n)/n}function so(e){const t=S.useRef(e);return sr(()=>{t.current=e}),t}function gg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[f,u]=S.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,y]=S.useState(r);yr(b,r)||y(r);const[C,p]=S.useState(null),[x,g]=S.useState(null),d=S.useCallback(M=>{M!==T.current&&(T.current=M,p(M))},[]),m=S.useCallback(M=>{M!==w.current&&(w.current=M,g(M))},[]),E=s||C,v=i||x,T=S.useRef(null),w=S.useRef(null),D=S.useRef(f),P=c!=null,_=so(c),I=so(o),H=so(l),K=S.useCallback(()=>{if(!T.current||!w.current)return;const M={placement:t,strategy:n,middleware:b};I.current&&(M.platform=I.current),hg(T.current,w.current,M).then(A=>{const O={...A,isPositioned:H.current!==!1};j.current&&!yr(D.current,O)&&(D.current=O,Sr.flushSync(()=>{u(O)}))})},[b,t,n,I,H]);sr(()=>{l===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,u(M=>({...M,isPositioned:!1})))},[l]);const j=S.useRef(!1);sr(()=>(j.current=!0,()=>{j.current=!1}),[]),sr(()=>{if(E&&(T.current=E),v&&(w.current=v),E&&v){if(_.current)return _.current(E,v,K);K()}},[E,v,K,_,P]);const F=S.useMemo(()=>({reference:T,floating:w,setReference:d,setFloating:m}),[d,m]),k=S.useMemo(()=>({reference:E,floating:v}),[E,v]),N=S.useMemo(()=>{const M={position:n,left:0,top:0};if(!k.floating)return M;const A=Ri(k.floating,f.x),O=Ri(k.floating,f.y);return a?{...M,transform:"translate("+A+"px, "+O+"px)",...Cc(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:O}},[n,a,k.floating,f.x,f.y]);return S.useMemo(()=>({...f,update:K,refs:F,elements:k,floatingStyles:N}),[f,K,F,k,N])}const mg=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ti({element:r.current,padding:o}).fn(n):{}:r?Ti({element:r,padding:o}).fn(n):{}}}},vg=(e,t)=>({...cg(e),options:[e,t]}),yg=(e,t)=>({...lg(e),options:[e,t]}),bg=(e,t)=>({...pg(e),options:[e,t]}),wg=(e,t)=>({...ug(e),options:[e,t]}),xg=(e,t)=>({...dg(e),options:[e,t]}),Sg=(e,t)=>({...fg(e),options:[e,t]}),Cg=(e,t)=>({...mg(e),options:[e,t]});var Eg="Arrow",Ec=S.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return h.jsx(se.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:h.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ec.displayName=Eg;var Dg=Ec;function Tg(e){const[t,n]=S.useState(void 0);return ye(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,a=l.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var ps="Popper",[Dc,mt]=gt(ps),[Rg,Tc]=Dc(ps),Rc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=S.useState(null);return h.jsx(Rg,{scope:t,anchor:r,onAnchorChange:o,children:n})};Rc.displayName=ps;var Mc="PopperAnchor",Oc=S.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Tc(Mc,n),i=S.useRef(null),a=le(t,i);return S.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:h.jsx(se.div,{...o,ref:a})});Oc.displayName=Mc;var hs="PopperContent",[Mg,Og]=Dc(hs),Pc=S.forwardRef((e,t)=>{var $,q,W,B,Z,z;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:f=0,sticky:u="partial",hideWhenDetached:b=!1,updatePositionStrategy:y="optimized",onPlaced:C,...p}=e,x=Tc(hs,n),[g,d]=S.useState(null),m=le(t,oe=>d(oe)),[E,v]=S.useState(null),T=Tg(E),w=(T==null?void 0:T.width)??0,D=(T==null?void 0:T.height)??0,P=r+(s!=="center"?"-"+s:""),_=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},I=Array.isArray(l)?l:[l],H=I.length>0,K={padding:_,boundary:I.filter(kg),altBoundary:H},{refs:j,floatingStyles:F,placement:k,isPositioned:N,middlewareData:M}=gg({strategy:"fixed",placement:P,whileElementsMounted:(...oe)=>ag(...oe,{animationFrame:y==="always"}),elements:{reference:x.anchor},middleware:[vg({mainAxis:o+D,alignmentAxis:i}),c&&yg({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?bg():void 0,...K}),c&&wg({...K}),xg({...K,apply:({elements:oe,rects:de,availableWidth:Se,availableHeight:Ce})=>{const{width:Qe,height:Ln}=de.reference,et=oe.floating.style;et.setProperty("--radix-popper-available-width",`${Se}px`),et.setProperty("--radix-popper-available-height",`${Ce}px`),et.setProperty("--radix-popper-anchor-width",`${Qe}px`),et.setProperty("--radix-popper-anchor-height",`${Ln}px`)}}),E&&Cg({element:E,padding:a}),Ag({arrowWidth:w,arrowHeight:D}),b&&Sg({strategy:"referenceHidden",...K})]}),[A,O]=_c(k),L=_e(C);ye(()=>{N&&(L==null||L())},[N,L]);const U=($=M.arrow)==null?void 0:$.x,Y=(q=M.arrow)==null?void 0:q.y,V=((W=M.arrow)==null?void 0:W.centerOffset)!==0,[X,G]=S.useState();return ye(()=>{g&&G(window.getComputedStyle(g).zIndex)},[g]),h.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:N?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[(B=M.transformOrigin)==null?void 0:B.x,(Z=M.transformOrigin)==null?void 0:Z.y].join(" "),...((z=M.hide)==null?void 0:z.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:h.jsx(Mg,{scope:n,placedSide:A,onArrowChange:v,arrowX:U,arrowY:Y,shouldHideArrow:V,children:h.jsx(se.div,{"data-side":A,"data-align":O,...p,ref:m,style:{...p.style,animation:N?void 0:"none"}})})})});Pc.displayName=hs;var kc="PopperArrow",Pg={top:"bottom",right:"left",bottom:"top",left:"right"},Ac=S.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Og(kc,r),i=Pg[s.placedSide];return h.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:h.jsx(Dg,{...o,ref:n,style:{...o.style,display:"block"}})})});Ac.displayName=kc;function kg(e){return e!==null}var Ag=e=>({name:"transformOrigin",options:e,fn(t){var x,g,d;const{placement:n,rects:r,middlewareData:o}=t,i=((x=o.arrow)==null?void 0:x.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[l,f]=_c(n),u={start:"0%",center:"50%",end:"100%"}[f],b=(((g=o.arrow)==null?void 0:g.x)??0)+a/2,y=(((d=o.arrow)==null?void 0:d.y)??0)+c/2;let C="",p="";return l==="bottom"?(C=i?u:`${b}px`,p=`${-c}px`):l==="top"?(C=i?u:`${b}px`,p=`${r.floating.height+c}px`):l==="right"?(C=`${-c}px`,p=i?u:`${y}px`):l==="left"&&(C=`${r.floating.width+c}px`,p=i?u:`${y}px`),{data:{x:C,y:p}}}});function _c(e){const[t,n="center"]=e.split("-");return[t,n]}var _r=Rc,Pn=Oc,Nr=Pc,Ir=Ac,_g="Portal",kn=S.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=S.useState(!1);ye(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Ke.createPortal(h.jsx(se.div,{...r,ref:t}),i):null});kn.displayName=_g;function Ng(e,t){return S.useReducer((n,r)=>t[n][r]??n,e)}var Je=e=>{const{present:t,children:n}=e,r=Ig(t),o=typeof n=="function"?n({present:r.isPresent}):S.Children.only(n),s=le(r.ref,jg(o));return typeof n=="function"||r.isPresent?S.cloneElement(o,{ref:s}):null};Je.displayName="Presence";function Ig(e){const[t,n]=S.useState(),r=S.useRef({}),o=S.useRef(e),s=S.useRef("none"),i=e?"mounted":"unmounted",[a,c]=Ng(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const l=Vn(r.current);s.current=a==="mounted"?l:"none"},[a]),ye(()=>{const l=r.current,f=o.current;if(f!==e){const b=s.current,y=Vn(l);e?c("MOUNT"):y==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(f&&b!==y?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),ye(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,u=y=>{const p=Vn(r.current).includes(y.animationName);if(y.target===t&&p&&(c("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},b=y=>{y.target===t&&(s.current=Vn(r.current))};return t.addEventListener("animationstart",b),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",b),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:S.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Vn(e){return(e==null?void 0:e.animationName)||"none"}function jg(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Dt({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Lg({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,a=_e(n),c=S.useCallback(l=>{if(s){const u=typeof l=="function"?l(e):l;u!==e&&a(u)}else o(l)},[s,e,o,a]);return[i,c]}function Lg({defaultProp:e,onChange:t}){const n=S.useState(e),[r]=n,o=S.useRef(r),s=_e(t);return S.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var $g="VisuallyHidden",gs=S.forwardRef((e,t)=>h.jsx(se.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));gs.displayName=$g;var Fg=gs,[jr,qw]=gt("Tooltip",[mt]),Lr=mt(),Nc="TooltipProvider",zg=700,Io="tooltip.open",[Wg,ms]=jr(Nc),Ic=e=>{const{__scopeTooltip:t,delayDuration:n=zg,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=S.useRef(!0),a=S.useRef(!1),c=S.useRef(0);return S.useEffect(()=>{const l=c.current;return()=>window.clearTimeout(l)},[]),h.jsx(Wg,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:S.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:S.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:S.useCallback(l=>{a.current=l},[]),disableHoverableContent:o,children:s})};Ic.displayName=Nc;var $r="Tooltip",[Bg,An]=jr($r),jc=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,c=ms($r,e.__scopeTooltip),l=Lr(t),[f,u]=S.useState(null),b=dt(),y=S.useRef(0),C=i??c.disableHoverableContent,p=a??c.delayDuration,x=S.useRef(!1),[g=!1,d]=Dt({prop:r,defaultProp:o,onChange:w=>{w?(c.onOpen(),document.dispatchEvent(new CustomEvent(Io))):c.onClose(),s==null||s(w)}}),m=S.useMemo(()=>g?x.current?"delayed-open":"instant-open":"closed",[g]),E=S.useCallback(()=>{window.clearTimeout(y.current),y.current=0,x.current=!1,d(!0)},[d]),v=S.useCallback(()=>{window.clearTimeout(y.current),y.current=0,d(!1)},[d]),T=S.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{x.current=!0,d(!0),y.current=0},p)},[p,d]);return S.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),h.jsx(_r,{...l,children:h.jsx(Bg,{scope:t,contentId:b,open:g,stateAttribute:m,trigger:f,onTriggerChange:u,onTriggerEnter:S.useCallback(()=>{c.isOpenDelayedRef.current?T():E()},[c.isOpenDelayedRef,T,E]),onTriggerLeave:S.useCallback(()=>{C?v():(window.clearTimeout(y.current),y.current=0)},[v,C]),onOpen:E,onClose:v,disableHoverableContent:C,children:n})})};jc.displayName=$r;var jo="TooltipTrigger",Lc=S.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=An(jo,n),s=ms(jo,n),i=Lr(n),a=S.useRef(null),c=le(t,a,o.onTriggerChange),l=S.useRef(!1),f=S.useRef(!1),u=S.useCallback(()=>l.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),h.jsx(Pn,{asChild:!0,...i,children:h.jsx(se.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:ee(e.onPointerMove,b=>{b.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:ee(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:ee(e.onPointerDown,()=>{o.open&&o.onClose(),l.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:ee(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:ee(e.onBlur,o.onClose),onClick:ee(e.onClick,o.onClose)})})});Lc.displayName=jo;var vs="TooltipPortal",[Hg,Vg]=jr(vs,{forceMount:void 0}),$c=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=An(vs,t);return h.jsx(Hg,{scope:t,forceMount:n,children:h.jsx(Je,{present:n||s.open,children:h.jsx(kn,{asChild:!0,container:o,children:r})})})};$c.displayName=vs;var Wt="TooltipContent",Fc=S.forwardRef((e,t)=>{const n=Vg(Wt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=An(Wt,e.__scopeTooltip);return h.jsx(Je,{present:r||i.open,children:i.disableHoverableContent?h.jsx(zc,{side:o,...s,ref:t}):h.jsx(Yg,{side:o,...s,ref:t})})}),Yg=S.forwardRef((e,t)=>{const n=An(Wt,e.__scopeTooltip),r=ms(Wt,e.__scopeTooltip),o=S.useRef(null),s=le(t,o),[i,a]=S.useState(null),{trigger:c,onClose:l}=n,f=o.current,{onPointerInTransitChange:u}=r,b=S.useCallback(()=>{a(null),u(!1)},[u]),y=S.useCallback((C,p)=>{const x=C.currentTarget,g={x:C.clientX,y:C.clientY},d=Xg(g,x.getBoundingClientRect()),m=Zg(g,d),E=Jg(p.getBoundingClientRect()),v=em([...m,...E]);a(v),u(!0)},[u]);return S.useEffect(()=>()=>b(),[b]),S.useEffect(()=>{if(c&&f){const C=x=>y(x,f),p=x=>y(x,c);return c.addEventListener("pointerleave",C),f.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",C),f.removeEventListener("pointerleave",p)}}},[c,f,y,b]),S.useEffect(()=>{if(i){const C=p=>{const x=p.target,g={x:p.clientX,y:p.clientY},d=(c==null?void 0:c.contains(x))||(f==null?void 0:f.contains(x)),m=!Qg(g,i);d?b():m&&(b(),l())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[c,f,i,l,b]),h.jsx(zc,{...e,ref:s})}),[Ug,Kg]=jr($r,{isInside:!1}),Gg=lh("TooltipContent"),zc=S.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,c=An(Wt,n),l=Lr(n),{onClose:f}=c;return S.useEffect(()=>(document.addEventListener(Io,f),()=>document.removeEventListener(Io,f)),[f]),S.useEffect(()=>{if(c.trigger){const u=b=>{const y=b.target;y!=null&&y.contains(c.trigger)&&f()};return window.addEventListener("scroll",u,{capture:!0}),()=>window.removeEventListener("scroll",u,{capture:!0})}},[c.trigger,f]),h.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:u=>u.preventDefault(),onDismiss:f,children:h.jsxs(Nr,{"data-state":c.stateAttribute,...l,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[h.jsx(Gg,{children:r}),h.jsx(Ug,{scope:n,isInside:!0,children:h.jsx(Fg,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Fc.displayName=Wt;var Wc="TooltipArrow",qg=S.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Lr(n);return Kg(Wc,n).isInside?null:h.jsx(Ir,{...o,...r,ref:t})});qg.displayName=Wc;function Xg(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Zg(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Jg(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Qg(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s].x,c=t[s].y,l=t[i].x,f=t[i].y;c>r!=f>r&&n<(l-a)*(r-c)/(f-c)+a&&(o=!o)}return o}function em(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),tm(t)}function tm(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var nm=Ic,rm=jc,om=Lc,sm=$c,im=Fc;function ys({delayDuration:e=0,...t}){return h.jsx(nm,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Bc({...e}){return h.jsx(ys,{children:h.jsx(rm,{"data-slot":"tooltip",...e})})}function Hc({...e}){return h.jsx(om,{"data-slot":"tooltip-trigger",...e})}function Vc({className:e,sideOffset:t=0,children:n,...r}){return h.jsx(sm,{children:h.jsx(im,{"data-slot":"tooltip-content",sideOffset:t,className:ie("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r,children:n})})}const Yc=({children:e,content:t})=>h.jsx(ys,{children:h.jsxs(Bc,{children:[h.jsx(Hc,{asChild:!0,children:e}),h.jsx(Vc,{sideOffset:3,side:"bottom",className:"border border-input bg-popover px-2 py-1 text-xs text-muted-foreground",children:t})]})}),am=({onClick:e})=>h.jsx(Yc,{content:"Today",children:h.jsx(Ct,{variant:"ghost",onClick:e,children:h.jsx(nh,{style:{paddingTop:"0.8px"}})})});function bs(e){const t=e+"CollectionProvider",[n,r]=gt(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=p=>{const{scope:x,children:g}=p,d=R.useRef(null),m=R.useRef(new Map).current;return h.jsx(o,{scope:x,itemMap:m,collectionRef:d,children:g})};i.displayName=t;const a=e+"CollectionSlot",c=St(a),l=R.forwardRef((p,x)=>{const{scope:g,children:d}=p,m=s(a,g),E=le(x,m.collectionRef);return h.jsx(c,{ref:E,children:d})});l.displayName=a;const f=e+"CollectionItemSlot",u="data-radix-collection-item",b=St(f),y=R.forwardRef((p,x)=>{const{scope:g,children:d,...m}=p,E=R.useRef(null),v=le(x,E),T=s(f,g);return R.useEffect(()=>(T.itemMap.set(E,{ref:E,...m}),()=>void T.itemMap.delete(E))),h.jsx(b,{[u]:"",ref:v,children:d})});y.displayName=f;function C(p){const x=s(e+"CollectionConsumer",p);return R.useCallback(()=>{const d=x.collectionRef.current;if(!d)return[];const m=Array.from(d.querySelectorAll(`[${u}]`));return Array.from(x.itemMap.values()).sort((T,w)=>m.indexOf(T.ref.current)-m.indexOf(w.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:l,ItemSlot:y},C,r]}var cm=S.createContext(void 0);function ws(e){const t=S.useContext(cm);return e||t||"ltr"}var io=0;function xs(){S.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Mi()),document.body.insertAdjacentElement("beforeend",e[1]??Mi()),io++,()=>{io===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),io--}},[])}function Mi(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ao="focusScope.autoFocusOnMount",co="focusScope.autoFocusOnUnmount",Oi={bubbles:!1,cancelable:!0},lm="FocusScope",Fr=S.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,c]=S.useState(null),l=_e(o),f=_e(s),u=S.useRef(null),b=le(t,p=>c(p)),y=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(r){let p=function(m){if(y.paused||!a)return;const E=m.target;a.contains(E)?u.current=E:lt(u.current,{select:!0})},x=function(m){if(y.paused||!a)return;const E=m.relatedTarget;E!==null&&(a.contains(E)||lt(u.current,{select:!0}))},g=function(m){if(document.activeElement===document.body)for(const v of m)v.removedNodes.length>0&&lt(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",x);const d=new MutationObserver(g);return a&&d.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",x),d.disconnect()}}},[r,a,y.paused]),S.useEffect(()=>{if(a){ki.add(y);const p=document.activeElement;if(!a.contains(p)){const g=new CustomEvent(ao,Oi);a.addEventListener(ao,l),a.dispatchEvent(g),g.defaultPrevented||(um(gm(Uc(a)),{select:!0}),document.activeElement===p&&lt(a))}return()=>{a.removeEventListener(ao,l),setTimeout(()=>{const g=new CustomEvent(co,Oi);a.addEventListener(co,f),a.dispatchEvent(g),g.defaultPrevented||lt(p??document.body,{select:!0}),a.removeEventListener(co,f),ki.remove(y)},0)}}},[a,l,f,y]);const C=S.useCallback(p=>{if(!n&&!r||y.paused)return;const x=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,g=document.activeElement;if(x&&g){const d=p.currentTarget,[m,E]=dm(d);m&&E?!p.shiftKey&&g===E?(p.preventDefault(),n&&lt(m,{select:!0})):p.shiftKey&&g===m&&(p.preventDefault(),n&&lt(E,{select:!0})):g===d&&p.preventDefault()}},[n,r,y.paused]);return h.jsx(se.div,{tabIndex:-1,...i,ref:b,onKeyDown:C})});Fr.displayName=lm;function um(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(lt(r,{select:t}),document.activeElement!==n)return}function dm(e){const t=Uc(e),n=Pi(t,e),r=Pi(t.reverse(),e);return[n,r]}function Uc(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Pi(e,t){for(const n of e)if(!fm(n,{upTo:t}))return n}function fm(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function pm(e){return e instanceof HTMLInputElement&&"select"in e}function lt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&pm(e)&&t&&e.select()}}var ki=hm();function hm(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ai(e,t),e.unshift(t)},remove(t){var n;e=Ai(e,t),(n=e[0])==null||n.resume()}}}function Ai(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function gm(e){return e.filter(t=>t.tagName!=="A")}var lo="rovingFocusGroup.onEntryFocus",mm={bubbles:!1,cancelable:!0},zr="RovingFocusGroup",[Lo,Kc,vm]=bs(zr),[ym,Gc]=gt(zr,[vm]),[bm,wm]=ym(zr),qc=S.forwardRef((e,t)=>h.jsx(Lo.Provider,{scope:e.__scopeRovingFocusGroup,children:h.jsx(Lo.Slot,{scope:e.__scopeRovingFocusGroup,children:h.jsx(xm,{...e,ref:t})})}));qc.displayName=zr;var xm=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:f=!1,...u}=e,b=S.useRef(null),y=le(t,b),C=ws(s),[p=null,x]=Dt({prop:i,defaultProp:a,onChange:c}),[g,d]=S.useState(!1),m=_e(l),E=Kc(n),v=S.useRef(!1),[T,w]=S.useState(0);return S.useEffect(()=>{const D=b.current;if(D)return D.addEventListener(lo,m),()=>D.removeEventListener(lo,m)},[m]),h.jsx(bm,{scope:n,orientation:r,dir:C,loop:o,currentTabStopId:p,onItemFocus:S.useCallback(D=>x(D),[x]),onItemShiftTab:S.useCallback(()=>d(!0),[]),onFocusableItemAdd:S.useCallback(()=>w(D=>D+1),[]),onFocusableItemRemove:S.useCallback(()=>w(D=>D-1),[]),children:h.jsx(se.div,{tabIndex:g||T===0?-1:0,"data-orientation":r,...u,ref:y,style:{outline:"none",...e.style},onMouseDown:ee(e.onMouseDown,()=>{v.current=!0}),onFocus:ee(e.onFocus,D=>{const P=!v.current;if(D.target===D.currentTarget&&P&&!g){const _=new CustomEvent(lo,mm);if(D.currentTarget.dispatchEvent(_),!_.defaultPrevented){const I=E().filter(k=>k.focusable),H=I.find(k=>k.active),K=I.find(k=>k.id===p),F=[H,K,...I].filter(Boolean).map(k=>k.ref.current);Jc(F,f)}}v.current=!1}),onBlur:ee(e.onBlur,()=>d(!1))})})}),Xc="RovingFocusGroupItem",Zc=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,...i}=e,a=dt(),c=s||a,l=wm(Xc,n),f=l.currentTabStopId===c,u=Kc(n),{onFocusableItemAdd:b,onFocusableItemRemove:y}=l;return S.useEffect(()=>{if(r)return b(),()=>y()},[r,b,y]),h.jsx(Lo.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:h.jsx(se.span,{tabIndex:f?0:-1,"data-orientation":l.orientation,...i,ref:t,onMouseDown:ee(e.onMouseDown,C=>{r?l.onItemFocus(c):C.preventDefault()}),onFocus:ee(e.onFocus,()=>l.onItemFocus(c)),onKeyDown:ee(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){l.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const p=Em(C,l.orientation,l.dir);if(p!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let g=u().filter(d=>d.focusable).map(d=>d.ref.current);if(p==="last")g.reverse();else if(p==="prev"||p==="next"){p==="prev"&&g.reverse();const d=g.indexOf(C.currentTarget);g=l.loop?Dm(g,d+1):g.slice(d+1)}setTimeout(()=>Jc(g))}})})})});Zc.displayName=Xc;var Sm={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Cm(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Em(e,t,n){const r=Cm(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Sm[r]}function Jc(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Dm(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Tm=qc,Rm=Zc,Mm=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_t=new WeakMap,Yn=new WeakMap,Un={},uo=0,Qc=function(e){return e&&(e.host||Qc(e.parentNode))},Om=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Qc(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Pm=function(e,t,n,r){var o=Om(t,Array.isArray(e)?e:[e]);Un[n]||(Un[n]=new WeakMap);var s=Un[n],i=[],a=new Set,c=new Set(o),l=function(u){!u||a.has(u)||(a.add(u),l(u.parentNode))};o.forEach(l);var f=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(b){if(a.has(b))f(b);else try{var y=b.getAttribute(r),C=y!==null&&y!=="false",p=(_t.get(b)||0)+1,x=(s.get(b)||0)+1;_t.set(b,p),s.set(b,x),i.push(b),p===1&&C&&Yn.set(b,!0),x===1&&b.setAttribute(n,"true"),C||b.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",b,g)}})};return f(t),a.clear(),uo++,function(){i.forEach(function(u){var b=_t.get(u)-1,y=s.get(u)-1;_t.set(u,b),s.set(u,y),b||(Yn.has(u)||u.removeAttribute(r),Yn.delete(u)),y||u.removeAttribute(n)}),uo--,uo||(_t=new WeakMap,_t=new WeakMap,Yn=new WeakMap,Un={})}},Ss=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Mm(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Pm(r,o,n,"aria-hidden")):function(){return null}},We=function(){return We=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},We.apply(this,arguments)};function el(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function km(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var ir="right-scroll-bar-position",ar="width-before-scroll-bar",Am="with-scroll-bars-hidden",_m="--removed-body-scroll-bar-size";function fo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Nm(e,t){var n=R.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Im=typeof window<"u"?S.useLayoutEffect:S.useEffect,_i=new WeakMap;function jm(e,t){var n=Nm(null,function(r){return e.forEach(function(o){return fo(o,r)})});return Im(function(){var r=_i.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||fo(a,null)}),s.forEach(function(a){o.has(a)||fo(a,i)})}_i.set(n,e)},[e]),n}function Lm(e){return e}function $m(e,t){t===void 0&&(t=Lm);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var c=function(){var f=i;i=[],f.forEach(s)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(f){i.push(f),l()},filter:function(f){return i=i.filter(f),n}}}};return o}function Fm(e){e===void 0&&(e={});var t=$m(null);return t.options=We({async:!0,ssr:!1},e),t}var tl=function(e){var t=e.sideCar,n=el(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return S.createElement(r,We({},n))};tl.isSideCarExport=!0;function zm(e,t){return e.useMedium(t),tl}var nl=Fm(),po=function(){},Wr=S.forwardRef(function(e,t){var n=S.useRef(null),r=S.useState({onScrollCapture:po,onWheelCapture:po,onTouchMoveCapture:po}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,l=e.removeScrollBar,f=e.enabled,u=e.shards,b=e.sideCar,y=e.noIsolation,C=e.inert,p=e.allowPinchZoom,x=e.as,g=x===void 0?"div":x,d=e.gapMode,m=el(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=b,v=jm([n,t]),T=We(We({},m),o);return S.createElement(S.Fragment,null,f&&S.createElement(E,{sideCar:nl,removeScrollBar:l,shards:u,noIsolation:y,inert:C,setCallbacks:s,allowPinchZoom:!!p,lockRef:n,gapMode:d}),i?S.cloneElement(S.Children.only(a),We(We({},T),{ref:v})):S.createElement(g,We({},T,{className:c,ref:v}),a))});Wr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Wr.classNames={fullWidth:ar,zeroRight:ir};var Wm=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Bm(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Wm();return t&&e.setAttribute("nonce",t),e}function Hm(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Vm(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ym=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Bm())&&(Hm(t,n),Vm(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Um=function(){var e=Ym();return function(t,n){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},rl=function(){var e=Um(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Km={left:0,top:0,right:0,gap:0},ho=function(e){return parseInt(e||"",10)||0},Gm=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ho(n),ho(r),ho(o)]},qm=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Km;var t=Gm(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Xm=rl(),Ft="data-scroll-locked",Zm=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
101
- .`.concat(Am,` {
100
+ */const Np=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Ip=we("Trash2",Np);/**
101
+ * @license lucide-react v0.483.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const jp=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Lp=we("X",jp),uc=R.createContext(void 0),Qe=()=>{const e=R.use(uc);if(!e)throw new Error("useBookingModal must be used within a BookingModalProvider");return e};function dc(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=dc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fc(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=dc(e))&&(r&&(r+=" "),r+=t);return r}const ds="-",$p=e=>{const t=zp(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(ds);return a[0]===""&&a.length!==1&&a.shift(),pc(a,t)||Fp(i)},getConflictingClassGroupIds:(i,a)=>{const c=n[i]||[];return a&&r[i]?[...c,...r[i]]:c}}},pc=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?pc(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(ds);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},wi=/^\[(.+)\]$/,Fp=e=>{if(wi.test(e)){const t=wi.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},zp=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Io(n[o],r,o,t);return r},Io=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:xi(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Wp(o)){Io(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Io(i,xi(t,s),n,r)})})},xi=(e,t)=>{let n=e;return t.split(ds).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Wp=e=>e.isThemeGetter,Bp=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},jo="!",Lo=":",Hp=Lo.length,Vp=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,a=0,c=0,l;for(let C=0;C<o.length;C++){let g=o[C];if(i===0&&a===0){if(g===Lo){s.push(o.slice(c,C)),c=C+Hp;continue}if(g==="/"){l=C;continue}}g==="["?i++:g==="]"?i--:g==="("?a++:g===")"&&a--}const d=s.length===0?o:o.substring(c),u=Up(d),v=u!==d,h=l&&l>c?l-c:void 0;return{modifiers:s,hasImportantModifier:v,baseClassName:u,maybePostfixModifierPosition:h}};if(t){const o=t+Lo,s=r;r=i=>i.startsWith(o)?s(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},Up=e=>e.endsWith(jo)?e.substring(0,e.length-1):e.startsWith(jo)?e.substring(1):e,Yp=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let s=[];return r.forEach(i=>{i[0]==="["||t[i]?(o.push(...s.sort(),i),s=[]):s.push(i)}),o.push(...s.sort()),o}},Kp=e=>({cache:Bp(e.cacheSize),parseClassName:Vp(e),sortModifiers:Yp(e),...$p(e)}),Gp=/\s+/,qp=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(Gp);let c="";for(let l=a.length-1;l>=0;l-=1){const d=a[l],{isExternal:u,modifiers:v,hasImportantModifier:h,baseClassName:C,maybePostfixModifierPosition:g}=n(d);if(u){c=d+(c.length>0?" "+c:c);continue}let x=!!g,y=r(x?C.substring(0,g):C);if(!y){if(!x){c=d+(c.length>0?" "+c:c);continue}if(y=r(C),!y){c=d+(c.length>0?" "+c:c);continue}x=!1}const f=s(v).join(":"),w=h?f+jo:f,D=w+y;if(i.includes(D))continue;i.push(D);const m=o(y,x);for(let T=0;T<m.length;++T){const b=m[T];i.push(w+b)}c=d+(c.length>0?" "+c:c)}return c};function Xp(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=hc(t))&&(r&&(r+=" "),r+=n);return r}const hc=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=hc(e[r]))&&(n&&(n+=" "),n+=t);return n};function Zp(e,...t){let n,r,o,s=i;function i(c){const l=t.reduce((d,u)=>u(d),e());return n=Kp(l),r=n.cache.get,o=n.cache.set,s=a,a(c)}function a(c){const l=r(c);if(l)return l;const d=qp(c,n);return o(c,d),d}return function(){return s(Xp.apply(null,arguments))}}const he=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},gc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,mc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Jp=/^\d+\/\d+$/,Qp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,eh=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,th=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,nh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,rh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Lt=e=>Jp.test(e),oe=e=>!!e&&!Number.isNaN(Number(e)),at=e=>!!e&&Number.isInteger(Number(e)),ao=e=>e.endsWith("%")&&oe(e.slice(0,-1)),qe=e=>Qp.test(e),oh=()=>!0,sh=e=>eh.test(e)&&!th.test(e),vc=()=>!1,ih=e=>nh.test(e),ah=e=>rh.test(e),ch=e=>!Z(e)&&!J(e),lh=e=>Xt(e,wc,vc),Z=e=>gc.test(e),St=e=>Xt(e,xc,sh),co=e=>Xt(e,hh,oe),Si=e=>Xt(e,yc,vc),uh=e=>Xt(e,bc,ah),Vn=e=>Xt(e,Sc,ih),J=e=>mc.test(e),an=e=>Zt(e,xc),dh=e=>Zt(e,gh),Ci=e=>Zt(e,yc),fh=e=>Zt(e,wc),ph=e=>Zt(e,bc),Un=e=>Zt(e,Sc,!0),Xt=(e,t,n)=>{const r=gc.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Zt=(e,t,n=!1)=>{const r=mc.exec(e);return r?r[1]?t(r[1]):n:!1},yc=e=>e==="position"||e==="percentage",bc=e=>e==="image"||e==="url",wc=e=>e==="length"||e==="size"||e==="bg-size",xc=e=>e==="length",hh=e=>e==="number",gh=e=>e==="family-name",Sc=e=>e==="shadow",mh=()=>{const e=he("color"),t=he("font"),n=he("text"),r=he("font-weight"),o=he("tracking"),s=he("leading"),i=he("breakpoint"),a=he("container"),c=he("spacing"),l=he("radius"),d=he("shadow"),u=he("inset-shadow"),v=he("text-shadow"),h=he("drop-shadow"),C=he("blur"),g=he("perspective"),x=he("aspect"),y=he("ease"),f=he("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],m=()=>[...D(),J,Z],T=()=>["auto","hidden","clip","visible","scroll"],b=()=>["auto","contain","none"],E=()=>[J,Z,c],M=()=>[Lt,"full","auto",...E()],N=()=>[at,"none","subgrid",J,Z],A=()=>["auto",{span:["full",at,J,Z]},at,J,Z],W=()=>[at,"auto",J,Z],Y=()=>["auto","min","max","fr",J,Z],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],$=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...E()],I=()=>[Lt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],O=()=>[e,J,Z],j=()=>[...D(),Ci,Si,{position:[J,Z]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",fh,lh,{size:[J,Z]}],U=()=>[ao,an,St],V=()=>["","none","full",l,J,Z],H=()=>["",oe,an,St],X=()=>["solid","dashed","dotted","double"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>[oe,ao,Ci,Si],G=()=>["","none",C,J,Z],q=()=>["none",oe,J,Z],B=()=>["none",oe,J,Z],te=()=>[oe,J,Z],_=()=>[Lt,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[qe],breakpoint:[qe],color:[oh],container:[qe],"drop-shadow":[qe],ease:["in","out","in-out"],font:[ch],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[qe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[qe],shadow:[qe],spacing:["px",oe],text:[qe],"text-shadow":[qe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Lt,Z,J,x]}],container:["container"],columns:[{columns:[oe,Z,J,a]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:m()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:b()}],"overscroll-x":[{"overscroll-x":b()}],"overscroll-y":[{"overscroll-y":b()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[at,"auto",J,Z]}],basis:[{basis:[Lt,"full","auto",a,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[oe,Lt,"auto","initial","none",Z]}],grow:[{grow:["",oe,J,Z]}],shrink:[{shrink:["",oe,J,Z]}],order:[{order:[at,"first","last","none",J,Z]}],"grid-cols":[{"grid-cols":N()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":N()}],"row-start-end":[{row:A()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Y()}],"auto-rows":[{"auto-rows":Y()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...$(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...$(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:I()}],w:[{w:[a,"screen",...I()]}],"min-w":[{"min-w":[a,"screen","none",...I()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...I()]}],h:[{h:["screen",...I()]}],"min-h":[{"min-h":["screen","none",...I()]}],"max-h":[{"max-h":["screen",...I()]}],"font-size":[{text:["base",n,an,St]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,J,co]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ao,Z]}],"font-family":[{font:[dh,Z,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,J,Z]}],"line-clamp":[{"line-clamp":[oe,"none",J,co]}],leading:[{leading:[s,...E()]}],"list-image":[{"list-image":["none",J,Z]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",J,Z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:[oe,"from-font","auto",J,St]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[oe,"auto",J,Z]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J,Z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",J,Z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:j()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},at,J,Z],radial:["",J,Z],conic:[at,J,Z]},ph,uh]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...X(),"hidden","none"]}],"divide-style":[{divide:[...X(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...X(),"none","hidden"]}],"outline-offset":[{"outline-offset":[oe,J,Z]}],"outline-w":[{outline:["",oe,an,St]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",d,Un,Vn]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",u,Un,Vn]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[oe,St]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",v,Un,Vn]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[oe,J,Z]}],"mix-blend":[{"mix-blend":[...K(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":K()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[oe]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[J,Z]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[oe]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:j()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",J,Z]}],filter:[{filter:["","none",J,Z]}],blur:[{blur:G()}],brightness:[{brightness:[oe,J,Z]}],contrast:[{contrast:[oe,J,Z]}],"drop-shadow":[{"drop-shadow":["","none",h,Un,Vn]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",oe,J,Z]}],"hue-rotate":[{"hue-rotate":[oe,J,Z]}],invert:[{invert:["",oe,J,Z]}],saturate:[{saturate:[oe,J,Z]}],sepia:[{sepia:["",oe,J,Z]}],"backdrop-filter":[{"backdrop-filter":["","none",J,Z]}],"backdrop-blur":[{"backdrop-blur":G()}],"backdrop-brightness":[{"backdrop-brightness":[oe,J,Z]}],"backdrop-contrast":[{"backdrop-contrast":[oe,J,Z]}],"backdrop-grayscale":[{"backdrop-grayscale":["",oe,J,Z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[oe,J,Z]}],"backdrop-invert":[{"backdrop-invert":["",oe,J,Z]}],"backdrop-opacity":[{"backdrop-opacity":[oe,J,Z]}],"backdrop-saturate":[{"backdrop-saturate":[oe,J,Z]}],"backdrop-sepia":[{"backdrop-sepia":["",oe,J,Z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",J,Z]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[oe,"initial",J,Z]}],ease:[{ease:["linear","initial",y,J,Z]}],delay:[{delay:[oe,J,Z]}],animate:[{animate:["none",f,J,Z]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,J,Z]}],"perspective-origin":[{"perspective-origin":m()}],rotate:[{rotate:q()}],"rotate-x":[{"rotate-x":q()}],"rotate-y":[{"rotate-y":q()}],"rotate-z":[{"rotate-z":q()}],scale:[{scale:B()}],"scale-x":[{"scale-x":B()}],"scale-y":[{"scale-y":B()}],"scale-z":[{"scale-z":B()}],"scale-3d":["scale-3d"],skew:[{skew:te()}],"skew-x":[{"skew-x":te()}],"skew-y":[{"skew-y":te()}],transform:[{transform:[J,Z,"","none","gpu","cpu"]}],"transform-origin":[{origin:m()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:_()}],"translate-x":[{"translate-x":_()}],"translate-y":[{"translate-y":_()}],"translate-z":[{"translate-z":_()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",J,Z]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",J,Z]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[oe,an,St,co]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},vh=Zp(mh);function se(...e){return vh(fc(e))}function Ei(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Nr(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Ei(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Ei(e[o],null)}}}}function ue(...e){return S.useCallback(Nr(...e),e)}function Ct(e){const t=bh(e),n=S.forwardRef((r,o)=>{const{children:s,...i}=r,a=S.Children.toArray(s),c=a.find(xh);if(c){const l=c.props.children,d=a.map(u=>u===c?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:u);return p.jsx(t,{...i,ref:o,children:S.isValidElement(l)?S.cloneElement(l,void 0,d):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var yh=Ct("Slot");function bh(e){const t=S.forwardRef((n,r)=>{const{children:o,...s}=n;if(S.isValidElement(o)){const i=Ch(o),a=Sh(s,o.props);return o.type!==S.Fragment&&(a.ref=r?Nr(r,i):i),S.cloneElement(o,a)}return S.Children.count(o)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Cc=Symbol("radix.slottable");function wh(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Cc,t}function xh(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Cc}function Sh(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Ch(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Di=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ti=fc,fs=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ti(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(l=>{const d=n==null?void 0:n[l],u=s==null?void 0:s[l];if(d===null)return null;const v=Di(d)||Di(u);return o[l][v]}),a=n&&Object.entries(n).reduce((l,d)=>{let[u,v]=d;return v===void 0||(l[u]=v),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,d)=>{let{class:u,className:v,...h}=d;return Object.entries(h).every(C=>{let[g,x]=C;return Array.isArray(x)?x.includes({...s,...a}[g]):{...s,...a}[g]===x})?[...l,u,v]:l},[]);return Ti(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},Eh=fs("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary cursor-pointer text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 hover:bg-accent",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Et({className:e,variant:t,size:n,asChild:r=!1,...o}){const s=r?yh:"button";return p.jsx(s,{"data-slot":"button",className:se(Eh({variant:t,size:n,className:e})),...o})}function ee(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function mt(e,t=[]){let n=[];function r(s,i){const a=S.createContext(i),c=n.length;n=[...n,i];const l=u=>{var y;const{scope:v,children:h,...C}=u,g=((y=v==null?void 0:v[e])==null?void 0:y[c])||a,x=S.useMemo(()=>C,Object.values(C));return p.jsx(g.Provider,{value:x,children:h})};l.displayName=s+"Provider";function d(u,v){var g;const h=((g=v==null?void 0:v[e])==null?void 0:g[c])||a,C=S.useContext(h);if(C)return C;if(i!==void 0)return i;throw new Error(`\`${u}\` must be used within \`${s}\``)}return[l,d]}const o=()=>{const s=n.map(i=>S.createContext(i));return function(a){const c=(a==null?void 0:a[e])||s;return S.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,Dh(o,...t)]}function Dh(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:c,scopeName:l})=>{const u=c(s)[`__scope${l}`];return{...a,...u}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Th=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ie=Th.reduce((e,t)=>{const n=Ct(`Primitive.${t}`),r=S.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ec(e,t){e&&Tr.flushSync(()=>e.dispatchEvent(t))}function Ae(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Rh(e,t=globalThis==null?void 0:globalThis.document){const n=Ae(e);S.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Mh="DismissableLayer",$o="dismissableLayer.update",kh="dismissableLayer.pointerDownOutside",Oh="dismissableLayer.focusOutside",Ri,Dc=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_n=S.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...c}=e,l=S.useContext(Dc),[d,u]=S.useState(null),v=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=S.useState({}),C=ue(t,b=>u(b)),g=Array.from(l.layers),[x]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(x),f=d?g.indexOf(d):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,D=f>=y,m=Ah(b=>{const E=b.target,M=[...l.branches].some(N=>N.contains(E));!D||M||(o==null||o(b),i==null||i(b),b.defaultPrevented||a==null||a())},v),T=Nh(b=>{const E=b.target;[...l.branches].some(N=>N.contains(E))||(s==null||s(b),i==null||i(b),b.defaultPrevented||a==null||a())},v);return Rh(b=>{f===l.layers.size-1&&(r==null||r(b),!b.defaultPrevented&&a&&(b.preventDefault(),a()))},v),S.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Ri=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),Mi(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Ri)}},[d,v,n,l]),S.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),Mi())},[d,l]),S.useEffect(()=>{const b=()=>h({});return document.addEventListener($o,b),()=>document.removeEventListener($o,b)},[]),p.jsx(ie.div,{...c,ref:C,style:{pointerEvents:w?D?"auto":"none":void 0,...e.style},onFocusCapture:ee(e.onFocusCapture,T.onFocusCapture),onBlurCapture:ee(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:ee(e.onPointerDownCapture,m.onPointerDownCapture)})});_n.displayName=Mh;var Ph="DismissableLayerBranch",_h=S.forwardRef((e,t)=>{const n=S.useContext(Dc),r=S.useRef(null),o=ue(t,r);return S.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(ie.div,{...e,ref:o})});_h.displayName=Ph;function Ah(e,t=globalThis==null?void 0:globalThis.document){const n=Ae(e),r=S.useRef(!1),o=S.useRef(()=>{});return S.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let c=function(){Tc(kh,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Nh(e,t=globalThis==null?void 0:globalThis.document){const n=Ae(e),r=S.useRef(!1);return S.useEffect(()=>{const o=s=>{s.target&&!r.current&&Tc(Oh,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Mi(){const e=new CustomEvent($o);document.dispatchEvent(e)}function Tc(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ec(o,s):o.dispatchEvent(s)}var Se=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{},Ih=S[" useId ".trim().toString()]||(()=>{}),jh=0;function ft(e){const[t,n]=S.useState(Ih());return Se(()=>{n(r=>r??String(jh++))},[e]),e||(t?`radix-${t}`:"")}const Lh=["top","right","bottom","left"],pt=Math.min,Me=Math.max,yr=Math.round,Yn=Math.floor,Ue=e=>({x:e,y:e}),$h={left:"right",right:"left",bottom:"top",top:"bottom"},Fh={start:"end",end:"start"};function Fo(e,t,n){return Me(e,pt(t,n))}function et(e,t){return typeof e=="function"?e(t):e}function tt(e){return e.split("-")[0]}function Jt(e){return e.split("-")[1]}function ps(e){return e==="x"?"y":"x"}function hs(e){return e==="y"?"height":"width"}function ht(e){return["top","bottom"].includes(tt(e))?"y":"x"}function gs(e){return ps(ht(e))}function zh(e,t,n){n===void 0&&(n=!1);const r=Jt(e),o=gs(e),s=hs(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=br(i)),[i,br(i)]}function Wh(e){const t=br(e);return[zo(e),t,zo(t)]}function zo(e){return e.replace(/start|end/g,t=>Fh[t])}function Bh(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function Hh(e,t,n,r){const o=Jt(e);let s=Bh(tt(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(zo)))),s}function br(e){return e.replace(/left|right|bottom|top/g,t=>$h[t])}function Vh(e){return{top:0,right:0,bottom:0,left:0,...e}}function Rc(e){return typeof e!="number"?Vh(e):{top:e,right:e,bottom:e,left:e}}function wr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ki(e,t,n){let{reference:r,floating:o}=e;const s=ht(t),i=gs(t),a=hs(i),c=tt(t),l=s==="y",d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,v=r[a]/2-o[a]/2;let h;switch(c){case"top":h={x:d,y:r.y-o.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:u};break;case"left":h={x:r.x-o.width,y:u};break;default:h={x:r.x,y:r.y}}switch(Jt(t)){case"start":h[i]-=v*(n&&l?-1:1);break;case"end":h[i]+=v*(n&&l?-1:1);break}return h}const Uh=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=ki(l,r,c),v=r,h={},C=0;for(let g=0;g<a.length;g++){const{name:x,fn:y}=a[g],{x:f,y:w,data:D,reset:m}=await y({x:d,y:u,initialPlacement:r,placement:v,strategy:o,middlewareData:h,rects:l,platform:i,elements:{reference:e,floating:t}});d=f??d,u=w??u,h={...h,[x]:{...h[x],...D}},m&&C<=50&&(C++,typeof m=="object"&&(m.placement&&(v=m.placement),m.rects&&(l=m.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):m.rects),{x:d,y:u}=ki(l,v,c)),g=-1)}return{x:d,y:u,placement:v,strategy:o,middlewareData:h}};async function Sn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:v=!1,padding:h=0}=et(t,e),C=Rc(h),x=a[v?u==="floating"?"reference":"floating":u],y=wr(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:c})),f=u==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),D=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},m=wr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:f,offsetParent:w,strategy:c}):f);return{top:(y.top-m.top+C.top)/D.y,bottom:(m.bottom-y.bottom+C.bottom)/D.y,left:(y.left-m.left+C.left)/D.x,right:(m.right-y.right+C.right)/D.x}}const Yh=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:l,padding:d=0}=et(e,t)||{};if(l==null)return{};const u=Rc(d),v={x:n,y:r},h=gs(o),C=hs(h),g=await i.getDimensions(l),x=h==="y",y=x?"top":"left",f=x?"bottom":"right",w=x?"clientHeight":"clientWidth",D=s.reference[C]+s.reference[h]-v[h]-s.floating[C],m=v[h]-s.reference[h],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let b=T?T[w]:0;(!b||!await(i.isElement==null?void 0:i.isElement(T)))&&(b=a.floating[w]||s.floating[C]);const E=D/2-m/2,M=b/2-g[C]/2-1,N=pt(u[y],M),A=pt(u[f],M),W=N,Y=b-g[C]-A,L=b/2-g[C]/2+E,$=Fo(W,L,Y),k=!c.arrow&&Jt(o)!=null&&L!==$&&s.reference[C]/2-(L<W?N:A)-g[C]/2<0,I=k?L<W?L-W:L-Y:0;return{[h]:v[h]+I,data:{[h]:$,centerOffset:L-$-I,...k&&{alignmentOffset:I}},reset:k}}}),Kh=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:v,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:g=!0,...x}=et(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=tt(o),f=ht(a),w=tt(a)===a,D=await(c.isRTL==null?void 0:c.isRTL(l.floating)),m=v||(w||!g?[br(a)]:Wh(a)),T=C!=="none";!v&&T&&m.push(...Hh(a,g,C,D));const b=[a,...m],E=await Sn(t,x),M=[];let N=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&M.push(E[y]),u){const L=zh(o,i,D);M.push(E[L[0]],E[L[1]])}if(N=[...N,{placement:o,overflows:M}],!M.every(L=>L<=0)){var A,W;const L=(((A=s.flip)==null?void 0:A.index)||0)+1,$=b[L];if($)return{data:{index:L,overflows:N},reset:{placement:$}};let k=(W=N.filter(I=>I.overflows[0]<=0).sort((I,O)=>I.overflows[1]-O.overflows[1])[0])==null?void 0:W.placement;if(!k)switch(h){case"bestFit":{var Y;const I=(Y=N.filter(O=>{if(T){const j=ht(O.placement);return j===f||j==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(j=>j>0).reduce((j,P)=>j+P,0)]).sort((O,j)=>O[1]-j[1])[0])==null?void 0:Y[0];I&&(k=I);break}case"initialPlacement":k=a;break}if(o!==k)return{reset:{placement:k}}}return{}}}};function Oi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Pi(e){return Lh.some(t=>e[t]>=0)}const Gh=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=et(e,t);switch(r){case"referenceHidden":{const s=await Sn(t,{...o,elementContext:"reference"}),i=Oi(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Pi(i)}}}case"escaped":{const s=await Sn(t,{...o,altBoundary:!0}),i=Oi(s,n.floating);return{data:{escapedOffsets:i,escaped:Pi(i)}}}default:return{}}}}};async function qh(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=tt(n),a=Jt(n),c=ht(n)==="y",l=["left","top"].includes(i)?-1:1,d=s&&c?-1:1,u=et(t,e);let{mainAxis:v,crossAxis:h,alignmentAxis:C}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof C=="number"&&(h=a==="end"?C*-1:C),c?{x:h*d,y:v*l}:{x:v*l,y:h*d}}const Xh=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await qh(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},Zh=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:x=>{let{x:y,y:f}=x;return{x:y,y:f}}},...c}=et(e,t),l={x:n,y:r},d=await Sn(t,c),u=ht(tt(o)),v=ps(u);let h=l[v],C=l[u];if(s){const x=v==="y"?"top":"left",y=v==="y"?"bottom":"right",f=h+d[x],w=h-d[y];h=Fo(f,h,w)}if(i){const x=u==="y"?"top":"left",y=u==="y"?"bottom":"right",f=C+d[x],w=C-d[y];C=Fo(f,C,w)}const g=a.fn({...t,[v]:h,[u]:C});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[v]:s,[u]:i}}}}}},Jh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=et(e,t),d={x:n,y:r},u=ht(o),v=ps(u);let h=d[v],C=d[u];const g=et(a,t),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const w=v==="y"?"height":"width",D=s.reference[v]-s.floating[w]+x.mainAxis,m=s.reference[v]+s.reference[w]-x.mainAxis;h<D?h=D:h>m&&(h=m)}if(l){var y,f;const w=v==="y"?"width":"height",D=["top","left"].includes(tt(o)),m=s.reference[u]-s.floating[w]+(D&&((y=i.offset)==null?void 0:y[u])||0)+(D?0:x.crossAxis),T=s.reference[u]+s.reference[w]+(D?0:((f=i.offset)==null?void 0:f[u])||0)-(D?x.crossAxis:0);C<m?C=m:C>T&&(C=T)}return{[v]:h,[u]:C}}}},Qh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:c=()=>{},...l}=et(e,t),d=await Sn(t,l),u=tt(o),v=Jt(o),h=ht(o)==="y",{width:C,height:g}=s.floating;let x,y;u==="top"||u==="bottom"?(x=u,y=v===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(y=u,x=v==="end"?"top":"bottom");const f=g-d.top-d.bottom,w=C-d.left-d.right,D=pt(g-d[x],f),m=pt(C-d[y],w),T=!t.middlewareData.shift;let b=D,E=m;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(b=f),T&&!v){const N=Me(d.left,0),A=Me(d.right,0),W=Me(d.top,0),Y=Me(d.bottom,0);h?E=C-2*(N!==0||A!==0?N+A:Me(d.left,d.right)):b=g-2*(W!==0||Y!==0?W+Y:Me(d.top,d.bottom))}await c({...t,availableWidth:E,availableHeight:b});const M=await i.getDimensions(a.floating);return C!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}};function Ir(){return typeof window<"u"}function Qt(e){return Mc(e)?(e.nodeName||"").toLowerCase():"#document"}function ke(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ke(e){var t;return(t=(Mc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Mc(e){return Ir()?e instanceof Node||e instanceof ke(e).Node:!1}function Fe(e){return Ir()?e instanceof Element||e instanceof ke(e).Element:!1}function Ye(e){return Ir()?e instanceof HTMLElement||e instanceof ke(e).HTMLElement:!1}function _i(e){return!Ir()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ke(e).ShadowRoot}function An(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ze(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function eg(e){return["table","td","th"].includes(Qt(e))}function jr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ms(e){const t=vs(),n=Fe(e)?ze(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function tg(e){let t=gt(e);for(;Ye(t)&&!Ut(t);){if(ms(t))return t;if(jr(t))return null;t=gt(t)}return null}function vs(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ut(e){return["html","body","#document"].includes(Qt(e))}function ze(e){return ke(e).getComputedStyle(e)}function Lr(e){return Fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function gt(e){if(Qt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_i(e)&&e.host||Ke(e);return _i(t)?t.host:t}function kc(e){const t=gt(e);return Ut(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ye(t)&&An(t)?t:kc(t)}function Cn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=kc(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=ke(o);if(s){const a=Wo(i);return t.concat(i,i.visualViewport||[],An(o)?o:[],a&&n?Cn(a):[])}return t.concat(o,Cn(o,[],n))}function Wo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Oc(e){const t=ze(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ye(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=yr(n)!==s||yr(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function ys(e){return Fe(e)?e:e.contextElement}function Ht(e){const t=ys(e);if(!Ye(t))return Ue(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Oc(t);let i=(s?yr(n.width):n.width)/r,a=(s?yr(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const ng=Ue(0);function Pc(e){const t=ke(e);return!vs()||!t.visualViewport?ng:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function rg(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ke(e)?!1:t}function Dt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=ys(e);let i=Ue(1);t&&(r?Fe(r)&&(i=Ht(r)):i=Ht(e));const a=rg(s,n,r)?Pc(s):Ue(0);let c=(o.left+a.x)/i.x,l=(o.top+a.y)/i.y,d=o.width/i.x,u=o.height/i.y;if(s){const v=ke(s),h=r&&Fe(r)?ke(r):r;let C=v,g=Wo(C);for(;g&&r&&h!==C;){const x=Ht(g),y=g.getBoundingClientRect(),f=ze(g),w=y.left+(g.clientLeft+parseFloat(f.paddingLeft))*x.x,D=y.top+(g.clientTop+parseFloat(f.paddingTop))*x.y;c*=x.x,l*=x.y,d*=x.x,u*=x.y,c+=w,l+=D,C=ke(g),g=Wo(C)}}return wr({width:d,height:u,x:c,y:l})}function bs(e,t){const n=Lr(e).scrollLeft;return t?t.left+n:Dt(Ke(e)).left+n}function _c(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:bs(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function og(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Ke(r),a=t?jr(t.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=Ue(1);const d=Ue(0),u=Ye(r);if((u||!u&&!s)&&((Qt(r)!=="body"||An(i))&&(c=Lr(r)),Ye(r))){const h=Dt(r);l=Ht(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}const v=i&&!u&&!s?_c(i,c,!0):Ue(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+d.x+v.x,y:n.y*l.y-c.scrollTop*l.y+d.y+v.y}}function sg(e){return Array.from(e.getClientRects())}function ig(e){const t=Ke(e),n=Lr(e),r=e.ownerDocument.body,o=Me(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Me(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+bs(e);const a=-n.scrollTop;return ze(r).direction==="rtl"&&(i+=Me(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function ag(e,t){const n=ke(e),r=Ke(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const l=vs();(!l||l&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:a,y:c}}function cg(e,t){const n=Dt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Ye(e)?Ht(e):Ue(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,l=r*s.y;return{width:i,height:a,x:c,y:l}}function Ai(e,t,n){let r;if(t==="viewport")r=ag(e,n);else if(t==="document")r=ig(Ke(e));else if(Fe(t))r=cg(t,n);else{const o=Pc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return wr(r)}function Ac(e,t){const n=gt(e);return n===t||!Fe(n)||Ut(n)?!1:ze(n).position==="fixed"||Ac(n,t)}function lg(e,t){const n=t.get(e);if(n)return n;let r=Cn(e,[],!1).filter(a=>Fe(a)&&Qt(a)!=="body"),o=null;const s=ze(e).position==="fixed";let i=s?gt(e):e;for(;Fe(i)&&!Ut(i);){const a=ze(i),c=ms(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||An(i)&&!c&&Ac(e,i))?r=r.filter(d=>d!==i):o=a,i=gt(i)}return t.set(e,r),r}function ug(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?jr(t)?[]:lg(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((l,d)=>{const u=Ai(t,d,o);return l.top=Me(u.top,l.top),l.right=pt(u.right,l.right),l.bottom=pt(u.bottom,l.bottom),l.left=Me(u.left,l.left),l},Ai(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function dg(e){const{width:t,height:n}=Oc(e);return{width:t,height:n}}function fg(e,t,n){const r=Ye(t),o=Ke(t),s=n==="fixed",i=Dt(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Ue(0);if(r||!r&&!s)if((Qt(t)!=="body"||An(o))&&(a=Lr(t)),r){const v=Dt(t,!0,s,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else o&&(c.x=bs(o));const l=o&&!r&&!s?_c(o,a):Ue(0),d=i.left+a.scrollLeft-c.x-l.x,u=i.top+a.scrollTop-c.y-l.y;return{x:d,y:u,width:i.width,height:i.height}}function lo(e){return ze(e).position==="static"}function Ni(e,t){if(!Ye(e)||ze(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ke(e)===n&&(n=n.ownerDocument.body),n}function Nc(e,t){const n=ke(e);if(jr(e))return n;if(!Ye(e)){let o=gt(e);for(;o&&!Ut(o);){if(Fe(o)&&!lo(o))return o;o=gt(o)}return n}let r=Ni(e,t);for(;r&&eg(r)&&lo(r);)r=Ni(r,t);return r&&Ut(r)&&lo(r)&&!ms(r)?n:r||tg(e)||n}const pg=async function(e){const t=this.getOffsetParent||Nc,n=this.getDimensions,r=await n(e.floating);return{reference:fg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function hg(e){return ze(e).direction==="rtl"}const gg={convertOffsetParentRelativeRectToViewportRelativeRect:og,getDocumentElement:Ke,getClippingRect:ug,getOffsetParent:Nc,getElementRects:pg,getClientRects:sg,getDimensions:dg,getScale:Ht,isElement:Fe,isRTL:hg};function Ic(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mg(e,t){let n=null,r;const o=Ke(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:d,top:u,width:v,height:h}=l;if(a||t(),!v||!h)return;const C=Yn(u),g=Yn(o.clientWidth-(d+v)),x=Yn(o.clientHeight-(u+h)),y=Yn(d),w={rootMargin:-C+"px "+-g+"px "+-x+"px "+-y+"px",threshold:Me(0,pt(1,c))||1};let D=!0;function m(T){const b=T[0].intersectionRatio;if(b!==c){if(!D)return i();b?i(!1,b):r=setTimeout(()=>{i(!1,1e-7)},1e3)}b===1&&!Ic(l,e.getBoundingClientRect())&&i(),D=!1}try{n=new IntersectionObserver(m,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(m,w)}n.observe(e)}return i(!0),s}function vg(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=ys(e),d=o||s?[...l?Cn(l):[],...Cn(t)]:[];d.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const u=l&&a?mg(l,n):null;let v=-1,h=null;i&&(h=new ResizeObserver(y=>{let[f]=y;f&&f.target===l&&h&&(h.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),l&&!c&&h.observe(l),h.observe(t));let C,g=c?Dt(e):null;c&&x();function x(){const y=Dt(e);g&&!Ic(g,y)&&n(),g=y,C=requestAnimationFrame(x)}return n(),()=>{var y;d.forEach(f=>{o&&f.removeEventListener("scroll",n),s&&f.removeEventListener("resize",n)}),u==null||u(),(y=h)==null||y.disconnect(),h=null,c&&cancelAnimationFrame(C)}}const yg=Xh,bg=Zh,wg=Kh,xg=Qh,Sg=Gh,Ii=Yh,Cg=Jh,Eg=(e,t,n)=>{const r=new Map,o={platform:gg,...n},s={...o.platform,_c:r};return Uh(e,t,{...o,platform:s})};var cr=typeof document<"u"?R.useLayoutEffect:R.useEffect;function xr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!xr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!xr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function jc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ji(e,t){const n=jc(e);return Math.round(t*n)/n}function uo(e){const t=S.useRef(e);return cr(()=>{t.current=e}),t}function Dg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[d,u]=S.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,h]=S.useState(r);xr(v,r)||h(r);const[C,g]=S.useState(null),[x,y]=S.useState(null),f=S.useCallback(O=>{O!==T.current&&(T.current=O,g(O))},[]),w=S.useCallback(O=>{O!==b.current&&(b.current=O,y(O))},[]),D=s||C,m=i||x,T=S.useRef(null),b=S.useRef(null),E=S.useRef(d),M=c!=null,N=uo(c),A=uo(o),W=uo(l),Y=S.useCallback(()=>{if(!T.current||!b.current)return;const O={placement:t,strategy:n,middleware:v};A.current&&(O.platform=A.current),Eg(T.current,b.current,O).then(j=>{const P={...j,isPositioned:W.current!==!1};L.current&&!xr(E.current,P)&&(E.current=P,Tr.flushSync(()=>{u(P)}))})},[v,t,n,A,W]);cr(()=>{l===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,u(O=>({...O,isPositioned:!1})))},[l]);const L=S.useRef(!1);cr(()=>(L.current=!0,()=>{L.current=!1}),[]),cr(()=>{if(D&&(T.current=D),m&&(b.current=m),D&&m){if(N.current)return N.current(D,m,Y);Y()}},[D,m,Y,N,M]);const $=S.useMemo(()=>({reference:T,floating:b,setReference:f,setFloating:w}),[f,w]),k=S.useMemo(()=>({reference:D,floating:m}),[D,m]),I=S.useMemo(()=>{const O={position:n,left:0,top:0};if(!k.floating)return O;const j=ji(k.floating,d.x),P=ji(k.floating,d.y);return a?{...O,transform:"translate("+j+"px, "+P+"px)",...jc(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:P}},[n,a,k.floating,d.x,d.y]);return S.useMemo(()=>({...d,update:Y,refs:$,elements:k,floatingStyles:I}),[d,Y,$,k,I])}const Tg=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ii({element:r.current,padding:o}).fn(n):{}:r?Ii({element:r,padding:o}).fn(n):{}}}},Rg=(e,t)=>({...yg(e),options:[e,t]}),Mg=(e,t)=>({...bg(e),options:[e,t]}),kg=(e,t)=>({...Cg(e),options:[e,t]}),Og=(e,t)=>({...wg(e),options:[e,t]}),Pg=(e,t)=>({...xg(e),options:[e,t]}),_g=(e,t)=>({...Sg(e),options:[e,t]}),Ag=(e,t)=>({...Tg(e),options:[e,t]});var Ng="Arrow",Lc=S.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return p.jsx(ie.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Lc.displayName=Ng;var Ig=Lc;function jg(e){const[t,n]=S.useState(void 0);return Se(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,a=l.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var ws="Popper",[$c,vt]=mt(ws),[Lg,Fc]=$c(ws),zc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=S.useState(null);return p.jsx(Lg,{scope:t,anchor:r,onAnchorChange:o,children:n})};zc.displayName=ws;var Wc="PopperAnchor",Bc=S.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Fc(Wc,n),i=S.useRef(null),a=ue(t,i);return S.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:p.jsx(ie.div,{...o,ref:a})});Bc.displayName=Wc;var xs="PopperContent",[$g,Fg]=$c(xs),Hc=S.forwardRef((e,t)=>{var z,G,q,B,te,_;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:d=0,sticky:u="partial",hideWhenDetached:v=!1,updatePositionStrategy:h="optimized",onPlaced:C,...g}=e,x=Fc(xs,n),[y,f]=S.useState(null),w=ue(t,ne=>f(ne)),[D,m]=S.useState(null),T=jg(D),b=(T==null?void 0:T.width)??0,E=(T==null?void 0:T.height)??0,M=r+(s!=="center"?"-"+s:""),N=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},A=Array.isArray(l)?l:[l],W=A.length>0,Y={padding:N,boundary:A.filter(Wg),altBoundary:W},{refs:L,floatingStyles:$,placement:k,isPositioned:I,middlewareData:O}=Dg({strategy:"fixed",placement:M,whileElementsMounted:(...ne)=>vg(...ne,{animationFrame:h==="always"}),elements:{reference:x.anchor},middleware:[Rg({mainAxis:o+E,alignmentAxis:i}),c&&Mg({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?kg():void 0,...Y}),c&&Og({...Y}),Pg({...Y,apply:({elements:ne,rects:ae,availableWidth:fe,availableHeight:ve})=>{const{width:Ne,height:Pt}=ae.reference,Ie=ne.floating.style;Ie.setProperty("--radix-popper-available-width",`${fe}px`),Ie.setProperty("--radix-popper-available-height",`${ve}px`),Ie.setProperty("--radix-popper-anchor-width",`${Ne}px`),Ie.setProperty("--radix-popper-anchor-height",`${Pt}px`)}}),D&&Ag({element:D,padding:a}),Bg({arrowWidth:b,arrowHeight:E}),v&&_g({strategy:"referenceHidden",...Y})]}),[j,P]=Yc(k),F=Ae(C);Se(()=>{I&&(F==null||F())},[I,F]);const U=(z=O.arrow)==null?void 0:z.x,V=(G=O.arrow)==null?void 0:G.y,H=((q=O.arrow)==null?void 0:q.centerOffset)!==0,[X,K]=S.useState();return Se(()=>{y&&K(window.getComputedStyle(y).zIndex)},[y]),p.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:I?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[(B=O.transformOrigin)==null?void 0:B.x,(te=O.transformOrigin)==null?void 0:te.y].join(" "),...((_=O.hide)==null?void 0:_.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx($g,{scope:n,placedSide:j,onArrowChange:m,arrowX:U,arrowY:V,shouldHideArrow:H,children:p.jsx(ie.div,{"data-side":j,"data-align":P,...g,ref:w,style:{...g.style,animation:I?void 0:"none"}})})})});Hc.displayName=xs;var Vc="PopperArrow",zg={top:"bottom",right:"left",bottom:"top",left:"right"},Uc=S.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Fg(Vc,r),i=zg[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(Ig,{...o,ref:n,style:{...o.style,display:"block"}})})});Uc.displayName=Vc;function Wg(e){return e!==null}var Bg=e=>({name:"transformOrigin",options:e,fn(t){var x,y,f;const{placement:n,rects:r,middlewareData:o}=t,i=((x=o.arrow)==null?void 0:x.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[l,d]=Yc(n),u={start:"0%",center:"50%",end:"100%"}[d],v=(((y=o.arrow)==null?void 0:y.x)??0)+a/2,h=(((f=o.arrow)==null?void 0:f.y)??0)+c/2;let C="",g="";return l==="bottom"?(C=i?u:`${v}px`,g=`${-c}px`):l==="top"?(C=i?u:`${v}px`,g=`${r.floating.height+c}px`):l==="right"?(C=`${-c}px`,g=i?u:`${h}px`):l==="left"&&(C=`${r.floating.width+c}px`,g=i?u:`${h}px`),{data:{x:C,y:g}}}});function Yc(e){const[t,n="center"]=e.split("-");return[t,n]}var $r=zc,Nn=Bc,Fr=Hc,zr=Uc,Hg="Portal",In=S.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=S.useState(!1);Se(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Ze.createPortal(p.jsx(ie.div,{...r,ref:t}),i):null});In.displayName=Hg;function Vg(e,t){return S.useReducer((n,r)=>t[n][r]??n,e)}var nt=e=>{const{present:t,children:n}=e,r=Ug(t),o=typeof n=="function"?n({present:r.isPresent}):S.Children.only(n),s=ue(r.ref,Yg(o));return typeof n=="function"||r.isPresent?S.cloneElement(o,{ref:s}):null};nt.displayName="Presence";function Ug(e){const[t,n]=S.useState(),r=S.useRef({}),o=S.useRef(e),s=S.useRef("none"),i=e?"mounted":"unmounted",[a,c]=Vg(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const l=Kn(r.current);s.current=a==="mounted"?l:"none"},[a]),Se(()=>{const l=r.current,d=o.current;if(d!==e){const v=s.current,h=Kn(l);e?c("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(d&&v!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Se(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,u=h=>{const g=Kn(r.current).includes(h.animationName);if(h.target===t&&g&&(c("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},v=h=>{h.target===t&&(s.current=Kn(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:S.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Kn(e){return(e==null?void 0:e.animationName)||"none"}function Yg(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Tt({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Kg({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,a=Ae(n),c=S.useCallback(l=>{if(s){const u=typeof l=="function"?l(e):l;u!==e&&a(u)}else o(l)},[s,e,o,a]);return[i,c]}function Kg({defaultProp:e,onChange:t}){const n=S.useState(e),[r]=n,o=S.useRef(r),s=Ae(t);return S.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var Gg="VisuallyHidden",Ss=S.forwardRef((e,t)=>p.jsx(ie.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Ss.displayName=Gg;var qg=Ss,[Wr,Cx]=mt("Tooltip",[vt]),Br=vt(),Kc="TooltipProvider",Xg=700,Bo="tooltip.open",[Zg,Cs]=Wr(Kc),Gc=e=>{const{__scopeTooltip:t,delayDuration:n=Xg,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=S.useRef(!0),a=S.useRef(!1),c=S.useRef(0);return S.useEffect(()=>{const l=c.current;return()=>window.clearTimeout(l)},[]),p.jsx(Zg,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:S.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:S.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:S.useCallback(l=>{a.current=l},[]),disableHoverableContent:o,children:s})};Gc.displayName=Kc;var Hr="Tooltip",[Jg,jn]=Wr(Hr),qc=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,c=Cs(Hr,e.__scopeTooltip),l=Br(t),[d,u]=S.useState(null),v=ft(),h=S.useRef(0),C=i??c.disableHoverableContent,g=a??c.delayDuration,x=S.useRef(!1),[y=!1,f]=Tt({prop:r,defaultProp:o,onChange:b=>{b?(c.onOpen(),document.dispatchEvent(new CustomEvent(Bo))):c.onClose(),s==null||s(b)}}),w=S.useMemo(()=>y?x.current?"delayed-open":"instant-open":"closed",[y]),D=S.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x.current=!1,f(!0)},[f]),m=S.useCallback(()=>{window.clearTimeout(h.current),h.current=0,f(!1)},[f]),T=S.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{x.current=!0,f(!0),h.current=0},g)},[g,f]);return S.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),p.jsx($r,{...l,children:p.jsx(Jg,{scope:t,contentId:v,open:y,stateAttribute:w,trigger:d,onTriggerChange:u,onTriggerEnter:S.useCallback(()=>{c.isOpenDelayedRef.current?T():D()},[c.isOpenDelayedRef,T,D]),onTriggerLeave:S.useCallback(()=>{C?m():(window.clearTimeout(h.current),h.current=0)},[m,C]),onOpen:D,onClose:m,disableHoverableContent:C,children:n})})};qc.displayName=Hr;var Ho="TooltipTrigger",Xc=S.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=jn(Ho,n),s=Cs(Ho,n),i=Br(n),a=S.useRef(null),c=ue(t,a,o.onTriggerChange),l=S.useRef(!1),d=S.useRef(!1),u=S.useCallback(()=>l.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),p.jsx(Nn,{asChild:!0,...i,children:p.jsx(ie.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:ee(e.onPointerMove,v=>{v.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:ee(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:ee(e.onPointerDown,()=>{o.open&&o.onClose(),l.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:ee(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:ee(e.onBlur,o.onClose),onClick:ee(e.onClick,o.onClose)})})});Xc.displayName=Ho;var Es="TooltipPortal",[Qg,em]=Wr(Es,{forceMount:void 0}),Zc=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=jn(Es,t);return p.jsx(Qg,{scope:t,forceMount:n,children:p.jsx(nt,{present:n||s.open,children:p.jsx(In,{asChild:!0,container:o,children:r})})})};Zc.displayName=Es;var Yt="TooltipContent",Jc=S.forwardRef((e,t)=>{const n=em(Yt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=jn(Yt,e.__scopeTooltip);return p.jsx(nt,{present:r||i.open,children:i.disableHoverableContent?p.jsx(Qc,{side:o,...s,ref:t}):p.jsx(tm,{side:o,...s,ref:t})})}),tm=S.forwardRef((e,t)=>{const n=jn(Yt,e.__scopeTooltip),r=Cs(Yt,e.__scopeTooltip),o=S.useRef(null),s=ue(t,o),[i,a]=S.useState(null),{trigger:c,onClose:l}=n,d=o.current,{onPointerInTransitChange:u}=r,v=S.useCallback(()=>{a(null),u(!1)},[u]),h=S.useCallback((C,g)=>{const x=C.currentTarget,y={x:C.clientX,y:C.clientY},f=im(y,x.getBoundingClientRect()),w=am(y,f),D=cm(g.getBoundingClientRect()),m=um([...w,...D]);a(m),u(!0)},[u]);return S.useEffect(()=>()=>v(),[v]),S.useEffect(()=>{if(c&&d){const C=x=>h(x,d),g=x=>h(x,c);return c.addEventListener("pointerleave",C),d.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",C),d.removeEventListener("pointerleave",g)}}},[c,d,h,v]),S.useEffect(()=>{if(i){const C=g=>{const x=g.target,y={x:g.clientX,y:g.clientY},f=(c==null?void 0:c.contains(x))||(d==null?void 0:d.contains(x)),w=!lm(y,i);f?v():w&&(v(),l())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[c,d,i,l,v]),p.jsx(Qc,{...e,ref:s})}),[nm,rm]=Wr(Hr,{isInside:!1}),om=wh("TooltipContent"),Qc=S.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,c=jn(Yt,n),l=Br(n),{onClose:d}=c;return S.useEffect(()=>(document.addEventListener(Bo,d),()=>document.removeEventListener(Bo,d)),[d]),S.useEffect(()=>{if(c.trigger){const u=v=>{const h=v.target;h!=null&&h.contains(c.trigger)&&d()};return window.addEventListener("scroll",u,{capture:!0}),()=>window.removeEventListener("scroll",u,{capture:!0})}},[c.trigger,d]),p.jsx(_n,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:u=>u.preventDefault(),onDismiss:d,children:p.jsxs(Fr,{"data-state":c.stateAttribute,...l,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(om,{children:r}),p.jsx(nm,{scope:n,isInside:!0,children:p.jsx(qg,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Jc.displayName=Yt;var el="TooltipArrow",sm=S.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Br(n);return rm(el,n).isInside?null:p.jsx(zr,{...o,...r,ref:t})});sm.displayName=el;function im(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function am(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function cm(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function lm(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s].x,c=t[s].y,l=t[i].x,d=t[i].y;c>r!=d>r&&n<(l-a)*(r-c)/(d-c)+a&&(o=!o)}return o}function um(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),dm(t)}function dm(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var fm=Gc,pm=qc,hm=Xc,gm=Zc,mm=Jc;function Ds({delayDuration:e=0,...t}){return p.jsx(fm,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function tl({...e}){return p.jsx(Ds,{children:p.jsx(pm,{"data-slot":"tooltip",...e})})}function nl({...e}){return p.jsx(hm,{"data-slot":"tooltip-trigger",...e})}function rl({className:e,sideOffset:t=0,children:n,...r}){return p.jsx(gm,{children:p.jsx(mm,{"data-slot":"tooltip-content",sideOffset:t,className:se("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r,children:n})})}const Ts=({children:e,content:t})=>p.jsx(Ds,{children:p.jsxs(tl,{children:[p.jsx(nl,{asChild:!0,children:e}),p.jsx(rl,{sideOffset:3,side:"bottom",className:"border border-input bg-popover px-2 py-1 text-xs text-muted-foreground",children:t})]})});function Rs(e){const t=e+"CollectionProvider",[n,r]=mt(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:x,children:y}=g,f=R.useRef(null),w=R.useRef(new Map).current;return p.jsx(o,{scope:x,itemMap:w,collectionRef:f,children:y})};i.displayName=t;const a=e+"CollectionSlot",c=Ct(a),l=R.forwardRef((g,x)=>{const{scope:y,children:f}=g,w=s(a,y),D=ue(x,w.collectionRef);return p.jsx(c,{ref:D,children:f})});l.displayName=a;const d=e+"CollectionItemSlot",u="data-radix-collection-item",v=Ct(d),h=R.forwardRef((g,x)=>{const{scope:y,children:f,...w}=g,D=R.useRef(null),m=ue(x,D),T=s(d,y);return R.useEffect(()=>(T.itemMap.set(D,{ref:D,...w}),()=>void T.itemMap.delete(D))),p.jsx(v,{[u]:"",ref:m,children:f})});h.displayName=d;function C(g){const x=s(e+"CollectionConsumer",g);return R.useCallback(()=>{const f=x.collectionRef.current;if(!f)return[];const w=Array.from(f.querySelectorAll(`[${u}]`));return Array.from(x.itemMap.values()).sort((T,b)=>w.indexOf(T.ref.current)-w.indexOf(b.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:l,ItemSlot:h},C,r]}var vm=S.createContext(void 0);function Ms(e){const t=S.useContext(vm);return e||t||"ltr"}var fo=0;function ks(){S.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Li()),document.body.insertAdjacentElement("beforeend",e[1]??Li()),fo++,()=>{fo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),fo--}},[])}function Li(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var po="focusScope.autoFocusOnMount",ho="focusScope.autoFocusOnUnmount",$i={bubbles:!1,cancelable:!0},ym="FocusScope",Vr=S.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,c]=S.useState(null),l=Ae(o),d=Ae(s),u=S.useRef(null),v=ue(t,g=>c(g)),h=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(r){let g=function(w){if(h.paused||!a)return;const D=w.target;a.contains(D)?u.current=D:ut(u.current,{select:!0})},x=function(w){if(h.paused||!a)return;const D=w.relatedTarget;D!==null&&(a.contains(D)||ut(u.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const m of w)m.removedNodes.length>0&&ut(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",x);const f=new MutationObserver(y);return a&&f.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",x),f.disconnect()}}},[r,a,h.paused]),S.useEffect(()=>{if(a){zi.add(h);const g=document.activeElement;if(!a.contains(g)){const y=new CustomEvent(po,$i);a.addEventListener(po,l),a.dispatchEvent(y),y.defaultPrevented||(bm(Em(ol(a)),{select:!0}),document.activeElement===g&&ut(a))}return()=>{a.removeEventListener(po,l),setTimeout(()=>{const y=new CustomEvent(ho,$i);a.addEventListener(ho,d),a.dispatchEvent(y),y.defaultPrevented||ut(g??document.body,{select:!0}),a.removeEventListener(ho,d),zi.remove(h)},0)}}},[a,l,d,h]);const C=S.useCallback(g=>{if(!n&&!r||h.paused)return;const x=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(x&&y){const f=g.currentTarget,[w,D]=wm(f);w&&D?!g.shiftKey&&y===D?(g.preventDefault(),n&&ut(w,{select:!0})):g.shiftKey&&y===w&&(g.preventDefault(),n&&ut(D,{select:!0})):y===f&&g.preventDefault()}},[n,r,h.paused]);return p.jsx(ie.div,{tabIndex:-1,...i,ref:v,onKeyDown:C})});Vr.displayName=ym;function bm(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ut(r,{select:t}),document.activeElement!==n)return}function wm(e){const t=ol(e),n=Fi(t,e),r=Fi(t.reverse(),e);return[n,r]}function ol(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Fi(e,t){for(const n of e)if(!xm(n,{upTo:t}))return n}function xm(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Sm(e){return e instanceof HTMLInputElement&&"select"in e}function ut(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Sm(e)&&t&&e.select()}}var zi=Cm();function Cm(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Wi(e,t),e.unshift(t)},remove(t){var n;e=Wi(e,t),(n=e[0])==null||n.resume()}}}function Wi(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Em(e){return e.filter(t=>t.tagName!=="A")}var go="rovingFocusGroup.onEntryFocus",Dm={bubbles:!1,cancelable:!0},Ur="RovingFocusGroup",[Vo,sl,Tm]=Rs(Ur),[Rm,il]=mt(Ur,[Tm]),[Mm,km]=Rm(Ur),al=S.forwardRef((e,t)=>p.jsx(Vo.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Vo.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Om,{...e,ref:t})})}));al.displayName=Ur;var Om=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:d=!1,...u}=e,v=S.useRef(null),h=ue(t,v),C=Ms(s),[g=null,x]=Tt({prop:i,defaultProp:a,onChange:c}),[y,f]=S.useState(!1),w=Ae(l),D=sl(n),m=S.useRef(!1),[T,b]=S.useState(0);return S.useEffect(()=>{const E=v.current;if(E)return E.addEventListener(go,w),()=>E.removeEventListener(go,w)},[w]),p.jsx(Mm,{scope:n,orientation:r,dir:C,loop:o,currentTabStopId:g,onItemFocus:S.useCallback(E=>x(E),[x]),onItemShiftTab:S.useCallback(()=>f(!0),[]),onFocusableItemAdd:S.useCallback(()=>b(E=>E+1),[]),onFocusableItemRemove:S.useCallback(()=>b(E=>E-1),[]),children:p.jsx(ie.div,{tabIndex:y||T===0?-1:0,"data-orientation":r,...u,ref:h,style:{outline:"none",...e.style},onMouseDown:ee(e.onMouseDown,()=>{m.current=!0}),onFocus:ee(e.onFocus,E=>{const M=!m.current;if(E.target===E.currentTarget&&M&&!y){const N=new CustomEvent(go,Dm);if(E.currentTarget.dispatchEvent(N),!N.defaultPrevented){const A=D().filter(k=>k.focusable),W=A.find(k=>k.active),Y=A.find(k=>k.id===g),$=[W,Y,...A].filter(Boolean).map(k=>k.ref.current);ul($,d)}}m.current=!1}),onBlur:ee(e.onBlur,()=>f(!1))})})}),cl="RovingFocusGroupItem",ll=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,...i}=e,a=ft(),c=s||a,l=km(cl,n),d=l.currentTabStopId===c,u=sl(n),{onFocusableItemAdd:v,onFocusableItemRemove:h}=l;return S.useEffect(()=>{if(r)return v(),()=>h()},[r,v,h]),p.jsx(Vo.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:p.jsx(ie.span,{tabIndex:d?0:-1,"data-orientation":l.orientation,...i,ref:t,onMouseDown:ee(e.onMouseDown,C=>{r?l.onItemFocus(c):C.preventDefault()}),onFocus:ee(e.onFocus,()=>l.onItemFocus(c)),onKeyDown:ee(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){l.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const g=Am(C,l.orientation,l.dir);if(g!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let y=u().filter(f=>f.focusable).map(f=>f.ref.current);if(g==="last")y.reverse();else if(g==="prev"||g==="next"){g==="prev"&&y.reverse();const f=y.indexOf(C.currentTarget);y=l.loop?Nm(y,f+1):y.slice(f+1)}setTimeout(()=>ul(y))}})})})});ll.displayName=cl;var Pm={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _m(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Am(e,t,n){const r=_m(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Pm[r]}function ul(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Nm(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Im=al,jm=ll,Lm=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},$t=new WeakMap,Gn=new WeakMap,qn={},mo=0,dl=function(e){return e&&(e.host||dl(e.parentNode))},$m=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=dl(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Fm=function(e,t,n,r){var o=$m(t,Array.isArray(e)?e:[e]);qn[n]||(qn[n]=new WeakMap);var s=qn[n],i=[],a=new Set,c=new Set(o),l=function(u){!u||a.has(u)||(a.add(u),l(u.parentNode))};o.forEach(l);var d=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(v){if(a.has(v))d(v);else try{var h=v.getAttribute(r),C=h!==null&&h!=="false",g=($t.get(v)||0)+1,x=(s.get(v)||0)+1;$t.set(v,g),s.set(v,x),i.push(v),g===1&&C&&Gn.set(v,!0),x===1&&v.setAttribute(n,"true"),C||v.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",v,y)}})};return d(t),a.clear(),mo++,function(){i.forEach(function(u){var v=$t.get(u)-1,h=s.get(u)-1;$t.set(u,v),s.set(u,h),v||(Gn.has(u)||u.removeAttribute(r),Gn.delete(u)),h||u.removeAttribute(n)}),mo--,mo||($t=new WeakMap,$t=new WeakMap,Gn=new WeakMap,qn={})}},Os=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Lm(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Fm(r,o,n,"aria-hidden")):function(){return null}},Ve=function(){return Ve=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Ve.apply(this,arguments)};function fl(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function zm(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var lr="right-scroll-bar-position",ur="width-before-scroll-bar",Wm="with-scroll-bars-hidden",Bm="--removed-body-scroll-bar-size";function vo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Hm(e,t){var n=R.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Vm=typeof window<"u"?S.useLayoutEffect:S.useEffect,Bi=new WeakMap;function Um(e,t){var n=Hm(null,function(r){return e.forEach(function(o){return vo(o,r)})});return Vm(function(){var r=Bi.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||vo(a,null)}),s.forEach(function(a){o.has(a)||vo(a,i)})}Bi.set(n,e)},[e]),n}function Ym(e){return e}function Km(e,t){t===void 0&&(t=Ym);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var c=function(){var d=i;i=[],d.forEach(s)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(d){i.push(d),l()},filter:function(d){return i=i.filter(d),n}}}};return o}function Gm(e){e===void 0&&(e={});var t=Km(null);return t.options=Ve({async:!0,ssr:!1},e),t}var pl=function(e){var t=e.sideCar,n=fl(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return S.createElement(r,Ve({},n))};pl.isSideCarExport=!0;function qm(e,t){return e.useMedium(t),pl}var hl=Gm(),yo=function(){},Yr=S.forwardRef(function(e,t){var n=S.useRef(null),r=S.useState({onScrollCapture:yo,onWheelCapture:yo,onTouchMoveCapture:yo}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,l=e.removeScrollBar,d=e.enabled,u=e.shards,v=e.sideCar,h=e.noIsolation,C=e.inert,g=e.allowPinchZoom,x=e.as,y=x===void 0?"div":x,f=e.gapMode,w=fl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=v,m=Um([n,t]),T=Ve(Ve({},w),o);return S.createElement(S.Fragment,null,d&&S.createElement(D,{sideCar:hl,removeScrollBar:l,shards:u,noIsolation:h,inert:C,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:f}),i?S.cloneElement(S.Children.only(a),Ve(Ve({},T),{ref:m})):S.createElement(y,Ve({},T,{className:c,ref:m}),a))});Yr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Yr.classNames={fullWidth:ur,zeroRight:lr};var Xm=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Zm(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Xm();return t&&e.setAttribute("nonce",t),e}function Jm(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Qm(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ev=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Zm())&&(Jm(t,n),Qm(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},tv=function(){var e=ev();return function(t,n){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},gl=function(){var e=tv(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},nv={left:0,top:0,right:0,gap:0},bo=function(e){return parseInt(e||"",10)||0},rv=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[bo(n),bo(r),bo(o)]},ov=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return nv;var t=rv(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},sv=gl(),Vt="data-scroll-locked",iv=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
106
+ .`.concat(Wm,` {
102
107
  overflow: hidden `).concat(r,`;
103
108
  padding-right: `).concat(a,"px ").concat(r,`;
104
109
  }
105
- body[`).concat(Ft,`] {
110
+ body[`).concat(Vt,`] {
106
111
  overflow: hidden `).concat(r,`;
107
112
  overscroll-behavior: contain;
108
113
  `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
@@ -115,47 +120,51 @@
115
120
  `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
116
121
  }
117
122
 
118
- .`).concat(ir,` {
123
+ .`).concat(lr,` {
119
124
  right: `).concat(a,"px ").concat(r,`;
120
125
  }
121
126
 
122
- .`).concat(ar,` {
127
+ .`).concat(ur,` {
123
128
  margin-right: `).concat(a,"px ").concat(r,`;
124
129
  }
125
130
 
126
- .`).concat(ir," .").concat(ir,` {
131
+ .`).concat(lr," .").concat(lr,` {
127
132
  right: 0 `).concat(r,`;
128
133
  }
129
134
 
130
- .`).concat(ar," .").concat(ar,` {
135
+ .`).concat(ur," .").concat(ur,` {
131
136
  margin-right: 0 `).concat(r,`;
132
137
  }
133
138
 
134
- body[`).concat(Ft,`] {
135
- `).concat(_m,": ").concat(a,`px;
139
+ body[`).concat(Vt,`] {
140
+ `).concat(Bm,": ").concat(a,`px;
136
141
  }
137
- `)},Ni=function(){var e=parseInt(document.body.getAttribute(Ft)||"0",10);return isFinite(e)?e:0},Jm=function(){S.useEffect(function(){return document.body.setAttribute(Ft,(Ni()+1).toString()),function(){var e=Ni()-1;e<=0?document.body.removeAttribute(Ft):document.body.setAttribute(Ft,e.toString())}},[])},Qm=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Jm();var s=S.useMemo(function(){return qm(o)},[o]);return S.createElement(Xm,{styles:Zm(s,!t,o,n?"":"!important")})},$o=!1;if(typeof window<"u")try{var Kn=Object.defineProperty({},"passive",{get:function(){return $o=!0,!0}});window.addEventListener("test",Kn,Kn),window.removeEventListener("test",Kn,Kn)}catch{$o=!1}var Nt=$o?{passive:!1}:!1,ev=function(e){return e.tagName==="TEXTAREA"},ol=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ev(e)&&n[t]==="visible")},tv=function(e){return ol(e,"overflowY")},nv=function(e){return ol(e,"overflowX")},Ii=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=sl(e,r);if(o){var s=il(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},rv=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ov=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},sl=function(e,t){return e==="v"?tv(t):nv(t)},il=function(e,t){return e==="v"?rv(t):ov(t)},sv=function(e,t){return e==="h"&&t==="rtl"?-1:1},iv=function(e,t,n,r,o){var s=sv(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,c=t.contains(a),l=!1,f=i>0,u=0,b=0;do{var y=il(e,a),C=y[0],p=y[1],x=y[2],g=p-x-s*C;(C||g)&&sl(e,a)&&(u+=g,b+=C),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(f&&Math.abs(u)<1||!f&&Math.abs(b)<1)&&(l=!0),l},Gn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ji=function(e){return[e.deltaX,e.deltaY]},Li=function(e){return e&&"current"in e?e.current:e},av=function(e,t){return e[0]===t[0]&&e[1]===t[1]},cv=function(e){return`
142
+ `)},Hi=function(){var e=parseInt(document.body.getAttribute(Vt)||"0",10);return isFinite(e)?e:0},av=function(){S.useEffect(function(){return document.body.setAttribute(Vt,(Hi()+1).toString()),function(){var e=Hi()-1;e<=0?document.body.removeAttribute(Vt):document.body.setAttribute(Vt,e.toString())}},[])},cv=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;av();var s=S.useMemo(function(){return ov(o)},[o]);return S.createElement(sv,{styles:iv(s,!t,o,n?"":"!important")})},Uo=!1;if(typeof window<"u")try{var Xn=Object.defineProperty({},"passive",{get:function(){return Uo=!0,!0}});window.addEventListener("test",Xn,Xn),window.removeEventListener("test",Xn,Xn)}catch{Uo=!1}var Ft=Uo?{passive:!1}:!1,lv=function(e){return e.tagName==="TEXTAREA"},ml=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!lv(e)&&n[t]==="visible")},uv=function(e){return ml(e,"overflowY")},dv=function(e){return ml(e,"overflowX")},Vi=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=vl(e,r);if(o){var s=yl(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},fv=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},pv=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},vl=function(e,t){return e==="v"?uv(t):dv(t)},yl=function(e,t){return e==="v"?fv(t):pv(t)},hv=function(e,t){return e==="h"&&t==="rtl"?-1:1},gv=function(e,t,n,r,o){var s=hv(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,c=t.contains(a),l=!1,d=i>0,u=0,v=0;do{var h=yl(e,a),C=h[0],g=h[1],x=h[2],y=g-x-s*C;(C||y)&&vl(e,a)&&(u+=y,v+=C),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(d&&Math.abs(u)<1||!d&&Math.abs(v)<1)&&(l=!0),l},Zn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ui=function(e){return[e.deltaX,e.deltaY]},Yi=function(e){return e&&"current"in e?e.current:e},mv=function(e,t){return e[0]===t[0]&&e[1]===t[1]},vv=function(e){return`
138
143
  .block-interactivity-`.concat(e,` {pointer-events: none;}
139
144
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
140
- `)},lv=0,It=[];function uv(e){var t=S.useRef([]),n=S.useRef([0,0]),r=S.useRef(),o=S.useState(lv++)[0],s=S.useState(rl)[0],i=S.useRef(e);S.useEffect(function(){i.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=km([e.lockRef.current],(e.shards||[]).map(Li),!0).filter(Boolean);return p.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=S.useCallback(function(p,x){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!i.current.allowPinchZoom;var g=Gn(p),d=n.current,m="deltaX"in p?p.deltaX:d[0]-g[0],E="deltaY"in p?p.deltaY:d[1]-g[1],v,T=p.target,w=Math.abs(m)>Math.abs(E)?"h":"v";if("touches"in p&&w==="h"&&T.type==="range")return!1;var D=Ii(w,T);if(!D)return!0;if(D?v=w:(v=w==="v"?"h":"v",D=Ii(w,T)),!D)return!1;if(!r.current&&"changedTouches"in p&&(m||E)&&(r.current=v),!v)return!0;var P=r.current||v;return iv(P,x,p,P==="h"?m:E)},[]),c=S.useCallback(function(p){var x=p;if(!(!It.length||It[It.length-1]!==s)){var g="deltaY"in x?ji(x):Gn(x),d=t.current.filter(function(v){return v.name===x.type&&(v.target===x.target||x.target===v.shadowParent)&&av(v.delta,g)})[0];if(d&&d.should){x.cancelable&&x.preventDefault();return}if(!d){var m=(i.current.shards||[]).map(Li).filter(Boolean).filter(function(v){return v.contains(x.target)}),E=m.length>0?a(x,m[0]):!i.current.noIsolation;E&&x.cancelable&&x.preventDefault()}}},[]),l=S.useCallback(function(p,x,g,d){var m={name:p,delta:x,target:g,should:d,shadowParent:dv(g)};t.current.push(m),setTimeout(function(){t.current=t.current.filter(function(E){return E!==m})},1)},[]),f=S.useCallback(function(p){n.current=Gn(p),r.current=void 0},[]),u=S.useCallback(function(p){l(p.type,ji(p),p.target,a(p,e.lockRef.current))},[]),b=S.useCallback(function(p){l(p.type,Gn(p),p.target,a(p,e.lockRef.current))},[]);S.useEffect(function(){return It.push(s),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:b}),document.addEventListener("wheel",c,Nt),document.addEventListener("touchmove",c,Nt),document.addEventListener("touchstart",f,Nt),function(){It=It.filter(function(p){return p!==s}),document.removeEventListener("wheel",c,Nt),document.removeEventListener("touchmove",c,Nt),document.removeEventListener("touchstart",f,Nt)}},[]);var y=e.removeScrollBar,C=e.inert;return S.createElement(S.Fragment,null,C?S.createElement(s,{styles:cv(o)}):null,y?S.createElement(Qm,{gapMode:e.gapMode}):null)}function dv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const fv=zm(nl,uv);var Br=S.forwardRef(function(e,t){return S.createElement(Wr,We({},e,{ref:t,sideCar:fv}))});Br.classNames=Wr.classNames;var Fo=["Enter"," "],pv=["ArrowDown","PageUp","Home"],al=["ArrowUp","PageDown","End"],hv=[...pv,...al],gv={ltr:[...Fo,"ArrowRight"],rtl:[...Fo,"ArrowLeft"]},mv={ltr:["ArrowLeft"],rtl:["ArrowRight"]},_n="Menu",[xn,vv,yv]=bs(_n),[Rt,cl]=gt(_n,[yv,mt,Gc]),Hr=mt(),ll=Gc(),[bv,Mt]=Rt(_n),[wv,Nn]=Rt(_n),ul=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=Hr(t),[c,l]=S.useState(null),f=S.useRef(!1),u=_e(s),b=ws(o);return S.useEffect(()=>{const y=()=>{f.current=!0,document.addEventListener("pointerdown",C,{capture:!0,once:!0}),document.addEventListener("pointermove",C,{capture:!0,once:!0})},C=()=>f.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",C,{capture:!0}),document.removeEventListener("pointermove",C,{capture:!0})}},[]),h.jsx(_r,{...a,children:h.jsx(bv,{scope:t,open:n,onOpenChange:u,content:c,onContentChange:l,children:h.jsx(wv,{scope:t,onClose:S.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:f,dir:b,modal:i,children:r})})})};ul.displayName=_n;var xv="MenuAnchor",Cs=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Hr(n);return h.jsx(Pn,{...o,...r,ref:t})});Cs.displayName=xv;var Es="MenuPortal",[Sv,dl]=Rt(Es,{forceMount:void 0}),fl=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Mt(Es,t);return h.jsx(Sv,{scope:t,forceMount:n,children:h.jsx(Je,{present:n||s.open,children:h.jsx(kn,{asChild:!0,container:o,children:r})})})};fl.displayName=Es;var Ae="MenuContent",[Cv,Ds]=Rt(Ae),pl=S.forwardRef((e,t)=>{const n=dl(Ae,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Mt(Ae,e.__scopeMenu),i=Nn(Ae,e.__scopeMenu);return h.jsx(xn.Provider,{scope:e.__scopeMenu,children:h.jsx(Je,{present:r||s.open,children:h.jsx(xn.Slot,{scope:e.__scopeMenu,children:i.modal?h.jsx(Ev,{...o,ref:t}):h.jsx(Dv,{...o,ref:t})})})})}),Ev=S.forwardRef((e,t)=>{const n=Mt(Ae,e.__scopeMenu),r=S.useRef(null),o=le(t,r);return S.useEffect(()=>{const s=r.current;if(s)return Ss(s)},[]),h.jsx(Ts,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ee(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Dv=S.forwardRef((e,t)=>{const n=Mt(Ae,e.__scopeMenu);return h.jsx(Ts,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Tv=St("MenuContent.ScrollLock"),Ts=S.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:f,onFocusOutside:u,onInteractOutside:b,onDismiss:y,disableOutsideScroll:C,...p}=e,x=Mt(Ae,n),g=Nn(Ae,n),d=Hr(n),m=ll(n),E=vv(n),[v,T]=S.useState(null),w=S.useRef(null),D=le(t,w,x.onContentChange),P=S.useRef(0),_=S.useRef(""),I=S.useRef(0),H=S.useRef(null),K=S.useRef("right"),j=S.useRef(0),F=C?Br:S.Fragment,k=C?{as:Tv,allowPinchZoom:!0}:void 0,N=A=>{var $,q;const O=_.current+A,L=E().filter(W=>!W.disabled),U=document.activeElement,Y=($=L.find(W=>W.ref.current===U))==null?void 0:$.textValue,V=L.map(W=>W.textValue),X=$v(V,O,Y),G=(q=L.find(W=>W.textValue===X))==null?void 0:q.ref.current;(function W(B){_.current=B,window.clearTimeout(P.current),B!==""&&(P.current=window.setTimeout(()=>W(""),1e3))})(O),G&&setTimeout(()=>G.focus())};S.useEffect(()=>()=>window.clearTimeout(P.current),[]),xs();const M=S.useCallback(A=>{var L,U;return K.current===((L=H.current)==null?void 0:L.side)&&zv(A,(U=H.current)==null?void 0:U.area)},[]);return h.jsx(Cv,{scope:n,searchRef:_,onItemEnter:S.useCallback(A=>{M(A)&&A.preventDefault()},[M]),onItemLeave:S.useCallback(A=>{var O;M(A)||((O=w.current)==null||O.focus(),T(null))},[M]),onTriggerLeave:S.useCallback(A=>{M(A)&&A.preventDefault()},[M]),pointerGraceTimerRef:I,onPointerGraceIntentChange:S.useCallback(A=>{H.current=A},[]),children:h.jsx(F,{...k,children:h.jsx(Fr,{asChild:!0,trapped:o,onMountAutoFocus:ee(s,A=>{var O;A.preventDefault(),(O=w.current)==null||O.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:h.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:f,onFocusOutside:u,onInteractOutside:b,onDismiss:y,children:h.jsx(Tm,{asChild:!0,...m,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:v,onCurrentTabStopIdChange:T,onEntryFocus:ee(c,A=>{g.isUsingKeyboardRef.current||A.preventDefault()}),preventScrollOnEntryFocus:!0,children:h.jsx(Nr,{role:"menu","aria-orientation":"vertical","data-state":Ol(x.open),"data-radix-menu-content":"",dir:g.dir,...d,...p,ref:D,style:{outline:"none",...p.style},onKeyDown:ee(p.onKeyDown,A=>{const L=A.target.closest("[data-radix-menu-content]")===A.currentTarget,U=A.ctrlKey||A.altKey||A.metaKey,Y=A.key.length===1;L&&(A.key==="Tab"&&A.preventDefault(),!U&&Y&&N(A.key));const V=w.current;if(A.target!==V||!hv.includes(A.key))return;A.preventDefault();const G=E().filter($=>!$.disabled).map($=>$.ref.current);al.includes(A.key)&&G.reverse(),jv(G)}),onBlur:ee(e.onBlur,A=>{A.currentTarget.contains(A.target)||(window.clearTimeout(P.current),_.current="")}),onPointerMove:ee(e.onPointerMove,Sn(A=>{const O=A.target,L=j.current!==A.clientX;if(A.currentTarget.contains(O)&&L){const U=A.clientX>j.current?"right":"left";K.current=U,j.current=A.clientX}}))})})})})})})});pl.displayName=Ae;var Rv="MenuGroup",Rs=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(se.div,{role:"group",...r,ref:t})});Rs.displayName=Rv;var Mv="MenuLabel",hl=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(se.div,{...r,ref:t})});hl.displayName=Mv;var br="MenuItem",$i="menu.itemSelect",Vr=S.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=S.useRef(null),i=Nn(br,e.__scopeMenu),a=Ds(br,e.__scopeMenu),c=le(t,s),l=S.useRef(!1),f=()=>{const u=s.current;if(!n&&u){const b=new CustomEvent($i,{bubbles:!0,cancelable:!0});u.addEventListener($i,y=>r==null?void 0:r(y),{once:!0}),dc(u,b),b.defaultPrevented?l.current=!1:i.onClose()}};return h.jsx(gl,{...o,ref:c,disabled:n,onClick:ee(e.onClick,f),onPointerDown:u=>{var b;(b=e.onPointerDown)==null||b.call(e,u),l.current=!0},onPointerUp:ee(e.onPointerUp,u=>{var b;l.current||(b=u.currentTarget)==null||b.click()}),onKeyDown:ee(e.onKeyDown,u=>{const b=a.searchRef.current!=="";n||b&&u.key===" "||Fo.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});Vr.displayName=br;var gl=S.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=Ds(br,n),a=ll(n),c=S.useRef(null),l=le(t,c),[f,u]=S.useState(!1),[b,y]=S.useState("");return S.useEffect(()=>{const C=c.current;C&&y((C.textContent??"").trim())},[s.children]),h.jsx(xn.ItemSlot,{scope:n,disabled:r,textValue:o??b,children:h.jsx(Rm,{asChild:!0,...a,focusable:!r,children:h.jsx(se.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:l,onPointerMove:ee(e.onPointerMove,Sn(C=>{r?i.onItemLeave(C):(i.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ee(e.onPointerLeave,Sn(C=>i.onItemLeave(C))),onFocus:ee(e.onFocus,()=>u(!0)),onBlur:ee(e.onBlur,()=>u(!1))})})})}),Ov="MenuCheckboxItem",ml=S.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return h.jsx(xl,{scope:e.__scopeMenu,checked:n,children:h.jsx(Vr,{role:"menuitemcheckbox","aria-checked":wr(n)?"mixed":n,...o,ref:t,"data-state":Os(n),onSelect:ee(o.onSelect,()=>r==null?void 0:r(wr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});ml.displayName=Ov;var vl="MenuRadioGroup",[Pv,kv]=Rt(vl,{value:void 0,onValueChange:()=>{}}),yl=S.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=_e(r);return h.jsx(Pv,{scope:e.__scopeMenu,value:n,onValueChange:s,children:h.jsx(Rs,{...o,ref:t})})});yl.displayName=vl;var bl="MenuRadioItem",wl=S.forwardRef((e,t)=>{const{value:n,...r}=e,o=kv(bl,e.__scopeMenu),s=n===o.value;return h.jsx(xl,{scope:e.__scopeMenu,checked:s,children:h.jsx(Vr,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Os(s),onSelect:ee(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});wl.displayName=bl;var Ms="MenuItemIndicator",[xl,Av]=Rt(Ms,{checked:!1}),Sl=S.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Av(Ms,n);return h.jsx(Je,{present:r||wr(s.checked)||s.checked===!0,children:h.jsx(se.span,{...o,ref:t,"data-state":Os(s.checked)})})});Sl.displayName=Ms;var _v="MenuSeparator",Cl=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(se.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Cl.displayName=_v;var Nv="MenuArrow",El=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Hr(n);return h.jsx(Ir,{...o,...r,ref:t})});El.displayName=Nv;var Iv="MenuSub",[Xw,Dl]=Rt(Iv),dn="MenuSubTrigger",Tl=S.forwardRef((e,t)=>{const n=Mt(dn,e.__scopeMenu),r=Nn(dn,e.__scopeMenu),o=Dl(dn,e.__scopeMenu),s=Ds(dn,e.__scopeMenu),i=S.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=s,l={__scopeMenu:e.__scopeMenu},f=S.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return S.useEffect(()=>f,[f]),S.useEffect(()=>{const u=a.current;return()=>{window.clearTimeout(u),c(null)}},[a,c]),h.jsx(Cs,{asChild:!0,...l,children:h.jsx(gl,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Ol(n.open),...e,ref:Or(t,o.onTriggerChange),onClick:u=>{var b;(b=e.onClick)==null||b.call(e,u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ee(e.onPointerMove,Sn(u=>{s.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:ee(e.onPointerLeave,Sn(u=>{var y,C;f();const b=(y=n.content)==null?void 0:y.getBoundingClientRect();if(b){const p=(C=n.content)==null?void 0:C.dataset.side,x=p==="right",g=x?-5:5,d=b[x?"left":"right"],m=b[x?"right":"left"];s.onPointerGraceIntentChange({area:[{x:u.clientX+g,y:u.clientY},{x:d,y:b.top},{x:m,y:b.top},{x:m,y:b.bottom},{x:d,y:b.bottom}],side:p}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(u),u.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:ee(e.onKeyDown,u=>{var y;const b=s.searchRef.current!=="";e.disabled||b&&u.key===" "||gv[r.dir].includes(u.key)&&(n.onOpenChange(!0),(y=n.content)==null||y.focus(),u.preventDefault())})})})});Tl.displayName=dn;var Rl="MenuSubContent",Ml=S.forwardRef((e,t)=>{const n=dl(Ae,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Mt(Ae,e.__scopeMenu),i=Nn(Ae,e.__scopeMenu),a=Dl(Rl,e.__scopeMenu),c=S.useRef(null),l=le(t,c);return h.jsx(xn.Provider,{scope:e.__scopeMenu,children:h.jsx(Je,{present:r||s.open,children:h.jsx(xn.Slot,{scope:e.__scopeMenu,children:h.jsx(Ts,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:l,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var u;i.isUsingKeyboardRef.current&&((u=c.current)==null||u.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:ee(e.onFocusOutside,f=>{f.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:ee(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:ee(e.onKeyDown,f=>{var y;const u=f.currentTarget.contains(f.target),b=mv[i.dir].includes(f.key);u&&b&&(s.onOpenChange(!1),(y=a.trigger)==null||y.focus(),f.preventDefault())})})})})})});Ml.displayName=Rl;function Ol(e){return e?"open":"closed"}function wr(e){return e==="indeterminate"}function Os(e){return wr(e)?"indeterminate":e?"checked":"unchecked"}function jv(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Lv(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function $v(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Lv(e,Math.max(s,0));o.length===1&&(i=i.filter(l=>l!==n));const c=i.find(l=>l.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function Fv(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s].x,c=t[s].y,l=t[i].x,f=t[i].y;c>r!=f>r&&n<(l-a)*(r-c)/(f-c)+a&&(o=!o)}return o}function zv(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Fv(n,t)}function Sn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Wv=ul,Bv=Cs,Hv=fl,Vv=pl,Yv=Rs,Uv=hl,Kv=Vr,Gv=ml,qv=yl,Xv=wl,Zv=Sl,Jv=Cl,Qv=El,ey=Tl,ty=Ml,Ps="DropdownMenu",[ny,Zw]=gt(Ps,[cl]),xe=cl(),[ry,Pl]=ny(Ps),kl=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,c=xe(t),l=S.useRef(null),[f=!1,u]=Dt({prop:o,defaultProp:s,onChange:i});return h.jsx(ry,{scope:t,triggerId:dt(),triggerRef:l,contentId:dt(),open:f,onOpenChange:u,onOpenToggle:S.useCallback(()=>u(b=>!b),[u]),modal:a,children:h.jsx(Wv,{...c,open:f,onOpenChange:u,dir:r,modal:a,children:n})})};kl.displayName=Ps;var Al="DropdownMenuTrigger",_l=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=Pl(Al,n),i=xe(n);return h.jsx(Bv,{asChild:!0,...i,children:h.jsx(se.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Or(t,s.triggerRef),onPointerDown:ee(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:ee(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});_l.displayName=Al;var oy="DropdownMenuPortal",Nl=e=>{const{__scopeDropdownMenu:t,...n}=e,r=xe(t);return h.jsx(Hv,{...r,...n})};Nl.displayName=oy;var Il="DropdownMenuContent",jl=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pl(Il,n),s=xe(n),i=S.useRef(!1);return h.jsx(Vv,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:ee(e.onCloseAutoFocus,a=>{var c;i.current||(c=o.triggerRef.current)==null||c.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:ee(e.onInteractOutside,a=>{const c=a.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,f=c.button===2||l;(!o.modal||f)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});jl.displayName=Il;var sy="DropdownMenuGroup",iy=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return h.jsx(Yv,{...o,...r,ref:t})});iy.displayName=sy;var ay="DropdownMenuLabel",Ll=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return h.jsx(Uv,{...o,...r,ref:t})});Ll.displayName=ay;var cy="DropdownMenuItem",$l=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return h.jsx(Kv,{...o,...r,ref:t})});$l.displayName=cy;var ly="DropdownMenuCheckboxItem",Fl=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return h.jsx(Gv,{...o,...r,ref:t})});Fl.displayName=ly;var uy="DropdownMenuRadioGroup",dy=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return h.jsx(qv,{...o,...r,ref:t})});dy.displayName=uy;var fy="DropdownMenuRadioItem",py=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return h.jsx(Xv,{...o,...r,ref:t})});py.displayName=fy;var hy="DropdownMenuItemIndicator",zl=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return h.jsx(Zv,{...o,...r,ref:t})});zl.displayName=hy;var gy="DropdownMenuSeparator",Wl=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return h.jsx(Jv,{...o,...r,ref:t})});Wl.displayName=gy;var my="DropdownMenuArrow",vy=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return h.jsx(Qv,{...o,...r,ref:t})});vy.displayName=my;var yy="DropdownMenuSubTrigger",by=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return h.jsx(ey,{...o,...r,ref:t})});by.displayName=yy;var wy="DropdownMenuSubContent",xy=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return h.jsx(ty,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});xy.displayName=wy;var Sy=kl,Cy=_l,Ey=Nl,Dy=jl,Ty=Ll,Ry=$l,My=Fl,Oy=zl,Py=Wl;function ks({...e}){return h.jsx(Sy,{"data-slot":"dropdown-menu",...e})}function As({...e}){return h.jsx(Cy,{"data-slot":"dropdown-menu-trigger",...e})}function _s({className:e,sideOffset:t=4,...n}){return h.jsx(Ey,{children:h.jsx(Dy,{"data-slot":"dropdown-menu-content",sideOffset:t,style:{zIndex:100},className:ie("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function Fi({className:e,inset:t,variant:n="default",...r}){return h.jsx(Ry,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:ie("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function ky({className:e,children:t,checked:n,...r}){return h.jsxs(My,{"data-slot":"dropdown-menu-checkbox-item",className:ie("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[h.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:h.jsx(Oy,{children:h.jsx(cc,{className:"size-4"})})}),t]})}function Ay({className:e,inset:t,...n}){return h.jsx(Ty,{"data-slot":"dropdown-menu-label","data-inset":t,className:ie("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function _y({className:e,...t}){return h.jsx(Py,{"data-slot":"dropdown-menu-separator",className:ie("bg-border -mx-1 my-1 h-px",e),...t})}const Ny={capitalize(e){return`${this.returnFirstChar(e)}${e.slice(1,e.length)}`},returnFirstChar(e){return e.charAt(0).toUpperCase()}},Iy=({code:e})=>h.jsx("p",{className:"text-sm text-muted-foreground",children:h.jsxs("kbd",{className:"pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100",children:[h.jsx("span",{className:"text-xs",children:"⌘"}),e]})}),jy={[ne.DAY]:h.jsx(Xp,{size:"20px"}),[ne.WEEK]:h.jsx(Gp,{size:"20px"}),[ne.TABLE]:h.jsx($p,{size:"20px"}),[ne.MONTH]:h.jsx(Jp,{size:"20px"})},zi=()=>{const{bookingViewType:e}=Oe(),{onViewTypeChange:t}=Da(),{viewModes:n}=qe(),r=R.useCallback(a=>a===e?"custom":"outline",[e]),o=R.useCallback(a=>{a!==e&&t(a)},[t]),s=R.useMemo(()=>n.map(a=>({variant:r(a),icon:jy[a],events:c=>o(c),label:a})),[n,o,r]),i=R.useMemo(()=>{const a=s.find(c=>c.label===e);if(a)return a.icon},[e,s]);return h.jsxs(ks,{children:[h.jsx(As,{children:h.jsx(Ct,{variant:"ghost",className:"w-8 h-8",asChild:!0,children:h.jsx(Yc,{content:"Calendar Modes",children:h.jsx(Ct,{variant:"ghost",children:i||h.jsx(jp,{className:"w-full h-full"})})})})}),h.jsx(_s,{children:s.map(a=>h.jsxs(ky,{checked:a.label===e,onCheckedChange:()=>a.events(a.label),className:"flex flex-row justify-between gap-6",children:[h.jsxs("div",{className:"flex flex-row gap-4",children:[a.icon,h.jsx("div",{children:Ny.capitalize(a.label)})]}),h.jsx(Iy,{code:"o"})]},a.label))})]})},Ly=566,$y=()=>{const{todayWeek:e,bookingViewType:t,setTodayDay:n,nextWeek:r,previousWeek:o,setDays:s}=Oe(),{resetSelectedNode:i,resetNodes:a}=Ht(v=>v),{onTodayClick:c}=qe(),{fullYear:l,monthMessage:f}=Ta(v=>v),{onDayChange:u}=qe(),[b,y]=R.useState(!1),C=()=>{const v=new Date;switch(c(v),t){case ne.TABLE:case ne.DAY:{n(v);break}default:{e();break}}},p=()=>s(1),x=()=>s(-1),g=v=>v==="next"?r():o(),d=v=>v==="next"?p():x(),m=v=>{switch(a(),i(),t){case ne.TABLE:case ne.DAY:{const T=d(v);u(T,v);break}case ne.WEEK:{const T=g(v),{firstDayOfWeek:w,lastDayOfWeek:D}=te.firstAndLastWeekDays(T);u([w,D],v);break}}};R.useEffect(()=>{e()},[e]),R.useEffect(()=>{const v=()=>{if(typeof window>"u")return!1;window.innerWidth<=Ly?y(!0):y(!1)};return v(),window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)},[]);const E=h.jsxs("div",{className:"header_actions",children:[h.jsx(hh,{handleWeekChange:m}),h.jsx(am,{onClick:C})]});return h.jsx(h.Fragment,{children:b?h.jsxs("div",{className:"headerCalendar_mobile",children:[h.jsx("div",{className:"headerCalendar_mobile_month",children:h.jsxs("span",{className:"headerCalendar_mobile_month_span",children:[f," ",l]})}),h.jsxs("div",{className:"headerCalendar_mobile_actions",children:[E,h.jsx(zi,{})]})]}):h.jsxs("div",{className:"headerCalendar",children:[h.jsx("div",{className:"headerCalendar_actions",children:E}),h.jsx("div",{className:"headerCalendar_month",children:h.jsxs("span",{className:"headerCalendar_month_span",children:[f," ",l]})}),h.jsx(zi,{})]})})},Xt=Ko(e=>({isDragging:!1,updateIsDragging:t=>e(n=>({...n,isDragging:t}))}));function Fy(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}const zy=e=>{let{transform:t,draggingNodeRect:n,windowRect:r}=e;return!n||!r?t:Fy(t,n,r)},Wy=({bookingInit:e,slotData:t,heightStyle:n})=>h.jsx(Gf,{modifiers:[zy],dropAnimation:{duration:2e3,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},className:"Draggable dragging",children:h.jsx("div",{className:"cardOverlay_content",style:{height:n},children:h.jsx(zo,{booking:e,slotData:t,heightStyleTransformer:n})})}),By=4,Wi=100,zo=({booking:e,slotData:t,layerCount:n,onClick:r,heightStyleTransformer:o,customClasses:s})=>{const{day:i,hour:a}=t,{bookingViewType:c}=Oe(),{updateIsDragging:l,isDragging:f}=Xt(w=>w),{attributes:u,listeners:b,setNodeRef:y,isDragging:C,transform:p}=rs({id:e.id,data:{type:"booking-slots",booking:e,slotData:t}}),x=p?{transform:`translate3d(${p.x}px, ${p.y}px, 0)`}:void 0;Dn({onDragStart:()=>l(!0),onDragAbort:()=>g(),onDragCancel:()=>g(),onDragEnd:()=>g()});const g=R.useCallback(()=>{l(!1)},[]),d=w=>w<="11:30",m=c===ne.DAY?{width:"99%"}:{width:"100%"},E={height:o,position:"relative",zIndex:50,cursor:f?"ns-resize":"pointer",...x,...m},v=(w,D)=>{const P=te.dateAndHourDateToString(new Date(w.finishAt));return te.isTodayDate(D)&&d(P)?{backgroundColor:"#000000c0"}:{backgroundColor:"#000456c0"}},T=R.useMemo(()=>{if(!n)return`${Wi}%`;const w=n*By;return`${Wi-w}%`},[n]);return C?h.jsx(Wy,{bookingInit:e,slotData:t,heightStyle:String(o)}):h.jsx("div",{ref:y,className:ie("cardContent_render",s),style:{...x,...E,width:T},...b,...u,children:h.jsx("div",{className:"relative w-full h-full",style:v(e,new Date(i.split(":")[1])),onPointerUp:r,children:h.jsxs("div",{className:ie("flex flex-col h-full text-white pl-2 lg:pl-2 justify-start items-start"),children:[h.jsx("p",{className:"text-[0.8rem] h-[0.8rem]",children:`${te.dateAndHourDateToString(e.startAt)} - ${te.dateAndHourDateToString(e.finishAt)}`}),h.jsx("span",{className:"flex flex-row items-center justify-center"})]})},`${i}-${a}`)},e.id)};var on={exports:{}},sn={},an={exports:{}},go={},qn={exports:{}},Xn={exports:{}},ae={};/** @license React v16.13.1
145
+ `)},yv=0,zt=[];function bv(e){var t=S.useRef([]),n=S.useRef([0,0]),r=S.useRef(),o=S.useState(yv++)[0],s=S.useState(gl)[0],i=S.useRef(e);S.useEffect(function(){i.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=zm([e.lockRef.current],(e.shards||[]).map(Yi),!0).filter(Boolean);return g.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=S.useCallback(function(g,x){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var y=Zn(g),f=n.current,w="deltaX"in g?g.deltaX:f[0]-y[0],D="deltaY"in g?g.deltaY:f[1]-y[1],m,T=g.target,b=Math.abs(w)>Math.abs(D)?"h":"v";if("touches"in g&&b==="h"&&T.type==="range")return!1;var E=Vi(b,T);if(!E)return!0;if(E?m=b:(m=b==="v"?"h":"v",E=Vi(b,T)),!E)return!1;if(!r.current&&"changedTouches"in g&&(w||D)&&(r.current=m),!m)return!0;var M=r.current||m;return gv(M,x,g,M==="h"?w:D)},[]),c=S.useCallback(function(g){var x=g;if(!(!zt.length||zt[zt.length-1]!==s)){var y="deltaY"in x?Ui(x):Zn(x),f=t.current.filter(function(m){return m.name===x.type&&(m.target===x.target||x.target===m.shadowParent)&&mv(m.delta,y)})[0];if(f&&f.should){x.cancelable&&x.preventDefault();return}if(!f){var w=(i.current.shards||[]).map(Yi).filter(Boolean).filter(function(m){return m.contains(x.target)}),D=w.length>0?a(x,w[0]):!i.current.noIsolation;D&&x.cancelable&&x.preventDefault()}}},[]),l=S.useCallback(function(g,x,y,f){var w={name:g,delta:x,target:y,should:f,shadowParent:wv(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(D){return D!==w})},1)},[]),d=S.useCallback(function(g){n.current=Zn(g),r.current=void 0},[]),u=S.useCallback(function(g){l(g.type,Ui(g),g.target,a(g,e.lockRef.current))},[]),v=S.useCallback(function(g){l(g.type,Zn(g),g.target,a(g,e.lockRef.current))},[]);S.useEffect(function(){return zt.push(s),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:v}),document.addEventListener("wheel",c,Ft),document.addEventListener("touchmove",c,Ft),document.addEventListener("touchstart",d,Ft),function(){zt=zt.filter(function(g){return g!==s}),document.removeEventListener("wheel",c,Ft),document.removeEventListener("touchmove",c,Ft),document.removeEventListener("touchstart",d,Ft)}},[]);var h=e.removeScrollBar,C=e.inert;return S.createElement(S.Fragment,null,C?S.createElement(s,{styles:vv(o)}):null,h?S.createElement(cv,{gapMode:e.gapMode}):null)}function wv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const xv=qm(hl,bv);var Kr=S.forwardRef(function(e,t){return S.createElement(Yr,Ve({},e,{ref:t,sideCar:xv}))});Kr.classNames=Yr.classNames;var Yo=["Enter"," "],Sv=["ArrowDown","PageUp","Home"],bl=["ArrowUp","PageDown","End"],Cv=[...Sv,...bl],Ev={ltr:[...Yo,"ArrowRight"],rtl:[...Yo,"ArrowLeft"]},Dv={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ln="Menu",[En,Tv,Rv]=Rs(Ln),[kt,wl]=mt(Ln,[Rv,vt,il]),Gr=vt(),xl=il(),[Mv,Ot]=kt(Ln),[kv,$n]=kt(Ln),Sl=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=Gr(t),[c,l]=S.useState(null),d=S.useRef(!1),u=Ae(s),v=Ms(o);return S.useEffect(()=>{const h=()=>{d.current=!0,document.addEventListener("pointerdown",C,{capture:!0,once:!0}),document.addEventListener("pointermove",C,{capture:!0,once:!0})},C=()=>d.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",C,{capture:!0}),document.removeEventListener("pointermove",C,{capture:!0})}},[]),p.jsx($r,{...a,children:p.jsx(Mv,{scope:t,open:n,onOpenChange:u,content:c,onContentChange:l,children:p.jsx(kv,{scope:t,onClose:S.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:d,dir:v,modal:i,children:r})})})};Sl.displayName=Ln;var Ov="MenuAnchor",Ps=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Gr(n);return p.jsx(Nn,{...o,...r,ref:t})});Ps.displayName=Ov;var _s="MenuPortal",[Pv,Cl]=kt(_s,{forceMount:void 0}),El=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Ot(_s,t);return p.jsx(Pv,{scope:t,forceMount:n,children:p.jsx(nt,{present:n||s.open,children:p.jsx(In,{asChild:!0,container:o,children:r})})})};El.displayName=_s;var _e="MenuContent",[_v,As]=kt(_e),Dl=S.forwardRef((e,t)=>{const n=Cl(_e,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ot(_e,e.__scopeMenu),i=$n(_e,e.__scopeMenu);return p.jsx(En.Provider,{scope:e.__scopeMenu,children:p.jsx(nt,{present:r||s.open,children:p.jsx(En.Slot,{scope:e.__scopeMenu,children:i.modal?p.jsx(Av,{...o,ref:t}):p.jsx(Nv,{...o,ref:t})})})})}),Av=S.forwardRef((e,t)=>{const n=Ot(_e,e.__scopeMenu),r=S.useRef(null),o=ue(t,r);return S.useEffect(()=>{const s=r.current;if(s)return Os(s)},[]),p.jsx(Ns,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ee(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Nv=S.forwardRef((e,t)=>{const n=Ot(_e,e.__scopeMenu);return p.jsx(Ns,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Iv=Ct("MenuContent.ScrollLock"),Ns=S.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:v,onDismiss:h,disableOutsideScroll:C,...g}=e,x=Ot(_e,n),y=$n(_e,n),f=Gr(n),w=xl(n),D=Tv(n),[m,T]=S.useState(null),b=S.useRef(null),E=ue(t,b,x.onContentChange),M=S.useRef(0),N=S.useRef(""),A=S.useRef(0),W=S.useRef(null),Y=S.useRef("right"),L=S.useRef(0),$=C?Kr:S.Fragment,k=C?{as:Iv,allowPinchZoom:!0}:void 0,I=j=>{var z,G;const P=N.current+j,F=D().filter(q=>!q.disabled),U=document.activeElement,V=(z=F.find(q=>q.ref.current===U))==null?void 0:z.textValue,H=F.map(q=>q.textValue),X=Kv(H,P,V),K=(G=F.find(q=>q.textValue===X))==null?void 0:G.ref.current;(function q(B){N.current=B,window.clearTimeout(M.current),B!==""&&(M.current=window.setTimeout(()=>q(""),1e3))})(P),K&&setTimeout(()=>K.focus())};S.useEffect(()=>()=>window.clearTimeout(M.current),[]),ks();const O=S.useCallback(j=>{var F,U;return Y.current===((F=W.current)==null?void 0:F.side)&&qv(j,(U=W.current)==null?void 0:U.area)},[]);return p.jsx(_v,{scope:n,searchRef:N,onItemEnter:S.useCallback(j=>{O(j)&&j.preventDefault()},[O]),onItemLeave:S.useCallback(j=>{var P;O(j)||((P=b.current)==null||P.focus(),T(null))},[O]),onTriggerLeave:S.useCallback(j=>{O(j)&&j.preventDefault()},[O]),pointerGraceTimerRef:A,onPointerGraceIntentChange:S.useCallback(j=>{W.current=j},[]),children:p.jsx($,{...k,children:p.jsx(Vr,{asChild:!0,trapped:o,onMountAutoFocus:ee(s,j=>{var P;j.preventDefault(),(P=b.current)==null||P.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:p.jsx(_n,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:v,onDismiss:h,children:p.jsx(Im,{asChild:!0,...w,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:m,onCurrentTabStopIdChange:T,onEntryFocus:ee(c,j=>{y.isUsingKeyboardRef.current||j.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(Fr,{role:"menu","aria-orientation":"vertical","data-state":Wl(x.open),"data-radix-menu-content":"",dir:y.dir,...f,...g,ref:E,style:{outline:"none",...g.style},onKeyDown:ee(g.onKeyDown,j=>{const F=j.target.closest("[data-radix-menu-content]")===j.currentTarget,U=j.ctrlKey||j.altKey||j.metaKey,V=j.key.length===1;F&&(j.key==="Tab"&&j.preventDefault(),!U&&V&&I(j.key));const H=b.current;if(j.target!==H||!Cv.includes(j.key))return;j.preventDefault();const K=D().filter(z=>!z.disabled).map(z=>z.ref.current);bl.includes(j.key)&&K.reverse(),Uv(K)}),onBlur:ee(e.onBlur,j=>{j.currentTarget.contains(j.target)||(window.clearTimeout(M.current),N.current="")}),onPointerMove:ee(e.onPointerMove,Dn(j=>{const P=j.target,F=L.current!==j.clientX;if(j.currentTarget.contains(P)&&F){const U=j.clientX>L.current?"right":"left";Y.current=U,L.current=j.clientX}}))})})})})})})});Dl.displayName=_e;var jv="MenuGroup",Is=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(ie.div,{role:"group",...r,ref:t})});Is.displayName=jv;var Lv="MenuLabel",Tl=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(ie.div,{...r,ref:t})});Tl.displayName=Lv;var Sr="MenuItem",Ki="menu.itemSelect",qr=S.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=S.useRef(null),i=$n(Sr,e.__scopeMenu),a=As(Sr,e.__scopeMenu),c=ue(t,s),l=S.useRef(!1),d=()=>{const u=s.current;if(!n&&u){const v=new CustomEvent(Ki,{bubbles:!0,cancelable:!0});u.addEventListener(Ki,h=>r==null?void 0:r(h),{once:!0}),Ec(u,v),v.defaultPrevented?l.current=!1:i.onClose()}};return p.jsx(Rl,{...o,ref:c,disabled:n,onClick:ee(e.onClick,d),onPointerDown:u=>{var v;(v=e.onPointerDown)==null||v.call(e,u),l.current=!0},onPointerUp:ee(e.onPointerUp,u=>{var v;l.current||(v=u.currentTarget)==null||v.click()}),onKeyDown:ee(e.onKeyDown,u=>{const v=a.searchRef.current!=="";n||v&&u.key===" "||Yo.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});qr.displayName=Sr;var Rl=S.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=As(Sr,n),a=xl(n),c=S.useRef(null),l=ue(t,c),[d,u]=S.useState(!1),[v,h]=S.useState("");return S.useEffect(()=>{const C=c.current;C&&h((C.textContent??"").trim())},[s.children]),p.jsx(En.ItemSlot,{scope:n,disabled:r,textValue:o??v,children:p.jsx(jm,{asChild:!0,...a,focusable:!r,children:p.jsx(ie.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:l,onPointerMove:ee(e.onPointerMove,Dn(C=>{r?i.onItemLeave(C):(i.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ee(e.onPointerLeave,Dn(C=>i.onItemLeave(C))),onFocus:ee(e.onFocus,()=>u(!0)),onBlur:ee(e.onBlur,()=>u(!1))})})})}),$v="MenuCheckboxItem",Ml=S.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return p.jsx(Al,{scope:e.__scopeMenu,checked:n,children:p.jsx(qr,{role:"menuitemcheckbox","aria-checked":Cr(n)?"mixed":n,...o,ref:t,"data-state":Ls(n),onSelect:ee(o.onSelect,()=>r==null?void 0:r(Cr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ml.displayName=$v;var kl="MenuRadioGroup",[Fv,zv]=kt(kl,{value:void 0,onValueChange:()=>{}}),Ol=S.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=Ae(r);return p.jsx(Fv,{scope:e.__scopeMenu,value:n,onValueChange:s,children:p.jsx(Is,{...o,ref:t})})});Ol.displayName=kl;var Pl="MenuRadioItem",_l=S.forwardRef((e,t)=>{const{value:n,...r}=e,o=zv(Pl,e.__scopeMenu),s=n===o.value;return p.jsx(Al,{scope:e.__scopeMenu,checked:s,children:p.jsx(qr,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Ls(s),onSelect:ee(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});_l.displayName=Pl;var js="MenuItemIndicator",[Al,Wv]=kt(js,{checked:!1}),Nl=S.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Wv(js,n);return p.jsx(nt,{present:r||Cr(s.checked)||s.checked===!0,children:p.jsx(ie.span,{...o,ref:t,"data-state":Ls(s.checked)})})});Nl.displayName=js;var Bv="MenuSeparator",Il=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(ie.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Il.displayName=Bv;var Hv="MenuArrow",jl=S.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Gr(n);return p.jsx(zr,{...o,...r,ref:t})});jl.displayName=Hv;var Vv="MenuSub",[Ex,Ll]=kt(Vv),hn="MenuSubTrigger",$l=S.forwardRef((e,t)=>{const n=Ot(hn,e.__scopeMenu),r=$n(hn,e.__scopeMenu),o=Ll(hn,e.__scopeMenu),s=As(hn,e.__scopeMenu),i=S.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=s,l={__scopeMenu:e.__scopeMenu},d=S.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return S.useEffect(()=>d,[d]),S.useEffect(()=>{const u=a.current;return()=>{window.clearTimeout(u),c(null)}},[a,c]),p.jsx(Ps,{asChild:!0,...l,children:p.jsx(Rl,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Wl(n.open),...e,ref:Nr(t,o.onTriggerChange),onClick:u=>{var v;(v=e.onClick)==null||v.call(e,u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ee(e.onPointerMove,Dn(u=>{s.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:ee(e.onPointerLeave,Dn(u=>{var h,C;d();const v=(h=n.content)==null?void 0:h.getBoundingClientRect();if(v){const g=(C=n.content)==null?void 0:C.dataset.side,x=g==="right",y=x?-5:5,f=v[x?"left":"right"],w=v[x?"right":"left"];s.onPointerGraceIntentChange({area:[{x:u.clientX+y,y:u.clientY},{x:f,y:v.top},{x:w,y:v.top},{x:w,y:v.bottom},{x:f,y:v.bottom}],side:g}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(u),u.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:ee(e.onKeyDown,u=>{var h;const v=s.searchRef.current!=="";e.disabled||v&&u.key===" "||Ev[r.dir].includes(u.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),u.preventDefault())})})})});$l.displayName=hn;var Fl="MenuSubContent",zl=S.forwardRef((e,t)=>{const n=Cl(_e,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ot(_e,e.__scopeMenu),i=$n(_e,e.__scopeMenu),a=Ll(Fl,e.__scopeMenu),c=S.useRef(null),l=ue(t,c);return p.jsx(En.Provider,{scope:e.__scopeMenu,children:p.jsx(nt,{present:r||s.open,children:p.jsx(En.Slot,{scope:e.__scopeMenu,children:p.jsx(Ns,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:l,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var u;i.isUsingKeyboardRef.current&&((u=c.current)==null||u.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:ee(e.onFocusOutside,d=>{d.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:ee(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:ee(e.onKeyDown,d=>{var h;const u=d.currentTarget.contains(d.target),v=Dv[i.dir].includes(d.key);u&&v&&(s.onOpenChange(!1),(h=a.trigger)==null||h.focus(),d.preventDefault())})})})})})});zl.displayName=Fl;function Wl(e){return e?"open":"closed"}function Cr(e){return e==="indeterminate"}function Ls(e){return Cr(e)?"indeterminate":e?"checked":"unchecked"}function Uv(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Yv(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Kv(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Yv(e,Math.max(s,0));o.length===1&&(i=i.filter(l=>l!==n));const c=i.find(l=>l.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function Gv(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s].x,c=t[s].y,l=t[i].x,d=t[i].y;c>r!=d>r&&n<(l-a)*(r-c)/(d-c)+a&&(o=!o)}return o}function qv(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Gv(n,t)}function Dn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Xv=Sl,Zv=Ps,Jv=El,Qv=Dl,ey=Is,ty=Tl,ny=qr,ry=Ml,oy=Ol,sy=_l,iy=Nl,ay=Il,cy=jl,ly=$l,uy=zl,$s="DropdownMenu",[dy,Dx]=mt($s,[wl]),Ee=wl(),[fy,Bl]=dy($s),Hl=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,c=Ee(t),l=S.useRef(null),[d=!1,u]=Tt({prop:o,defaultProp:s,onChange:i});return p.jsx(fy,{scope:t,triggerId:ft(),triggerRef:l,contentId:ft(),open:d,onOpenChange:u,onOpenToggle:S.useCallback(()=>u(v=>!v),[u]),modal:a,children:p.jsx(Xv,{...c,open:d,onOpenChange:u,dir:r,modal:a,children:n})})};Hl.displayName=$s;var Vl="DropdownMenuTrigger",Ul=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=Bl(Vl,n),i=Ee(n);return p.jsx(Zv,{asChild:!0,...i,children:p.jsx(ie.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Nr(t,s.triggerRef),onPointerDown:ee(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:ee(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});Ul.displayName=Vl;var py="DropdownMenuPortal",Yl=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ee(t);return p.jsx(Jv,{...r,...n})};Yl.displayName=py;var Kl="DropdownMenuContent",Gl=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Bl(Kl,n),s=Ee(n),i=S.useRef(!1);return p.jsx(Qv,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:ee(e.onCloseAutoFocus,a=>{var c;i.current||(c=o.triggerRef.current)==null||c.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:ee(e.onInteractOutside,a=>{const c=a.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,d=c.button===2||l;(!o.modal||d)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Gl.displayName=Kl;var hy="DropdownMenuGroup",gy=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return p.jsx(ey,{...o,...r,ref:t})});gy.displayName=hy;var my="DropdownMenuLabel",ql=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return p.jsx(ty,{...o,...r,ref:t})});ql.displayName=my;var vy="DropdownMenuItem",Xl=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return p.jsx(ny,{...o,...r,ref:t})});Xl.displayName=vy;var yy="DropdownMenuCheckboxItem",Zl=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return p.jsx(ry,{...o,...r,ref:t})});Zl.displayName=yy;var by="DropdownMenuRadioGroup",wy=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return p.jsx(oy,{...o,...r,ref:t})});wy.displayName=by;var xy="DropdownMenuRadioItem",Sy=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return p.jsx(sy,{...o,...r,ref:t})});Sy.displayName=xy;var Cy="DropdownMenuItemIndicator",Jl=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return p.jsx(iy,{...o,...r,ref:t})});Jl.displayName=Cy;var Ey="DropdownMenuSeparator",Ql=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return p.jsx(ay,{...o,...r,ref:t})});Ql.displayName=Ey;var Dy="DropdownMenuArrow",Ty=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return p.jsx(cy,{...o,...r,ref:t})});Ty.displayName=Dy;var Ry="DropdownMenuSubTrigger",My=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return p.jsx(ly,{...o,...r,ref:t})});My.displayName=Ry;var ky="DropdownMenuSubContent",Oy=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return p.jsx(uy,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Oy.displayName=ky;var Py=Hl,_y=Ul,Ay=Yl,Ny=Gl,Iy=ql,jy=Xl,Ly=Zl,$y=Jl,Fy=Ql;function Fs({...e}){return p.jsx(Py,{"data-slot":"dropdown-menu",...e})}function zs({...e}){return p.jsx(_y,{"data-slot":"dropdown-menu-trigger",...e})}function Ws({className:e,sideOffset:t=4,...n}){return p.jsx(Ay,{children:p.jsx(Ny,{"data-slot":"dropdown-menu-content",sideOffset:t,style:{zIndex:100},className:se("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function Gi({className:e,inset:t,variant:n="default",...r}){return p.jsx(jy,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:se("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function zy({className:e,children:t,checked:n,...r}){return p.jsxs(Ly,{"data-slot":"dropdown-menu-checkbox-item",className:se("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[p.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:p.jsx($y,{children:p.jsx(cc,{className:"size-4"})})}),t]})}function Wy({className:e,inset:t,...n}){return p.jsx(Iy,{"data-slot":"dropdown-menu-label","data-inset":t,className:se("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function By({className:e,...t}){return p.jsx(Fy,{"data-slot":"dropdown-menu-separator",className:se("bg-border -mx-1 my-1 h-px",e),...t})}var Hy="Label",eu=S.forwardRef((e,t)=>p.jsx(ie.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));eu.displayName=Hy;var Vy=eu;function Uy({className:e,...t}){return p.jsx(Vy,{"data-slot":"label",className:se("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const Yy={isDragging:!1},en=Mr(e=>({...Yy,updateIsDragging:t=>e(n=>({...n,isDragging:t}))})),Ky=({onClose:e,side:t,onOpenChange:n,buttonTrigger:r,modal:o=!1,children:s})=>{const[i,a]=R.useState({x:0,y:0}),c=en(g=>g.updateIsDragging),{attributes:l,listeners:d,setNodeRef:u,transform:v,setActivatorNodeRef:h}=us({id:"booking_info",data:{type:"another"}}),C={transform:`translate3d(${i.x+((v==null?void 0:v.x)||0)}px, ${i.y+((v==null?void 0:v.y)||0)}px, 0)`};return kn({onDragStart(){c(!0)},onDragEnd(g){if(g.active.id){const{y:x,x:y}=i;a({x:y+((v==null?void 0:v.x)||0),y:x+((v==null?void 0:v.y)||0)}),c(!1)}}}),p.jsxs(Fs,{dir:"ltr",modal:o,open:!0,onOpenChange:n,children:[p.jsx(zs,{asChild:!0,children:r||p.jsx("div",{})}),p.jsxs(Ws,{ref:u,style:{...C,zIndex:50,width:"25rem"},forceMount:!0,avoidCollisions:!0,side:t,sticky:"always",updatePositionStrategy:"always",...l,children:[p.jsxs("div",{className:"dropdownLabelContent",children:[p.jsx(Uy,{ref:h,className:"dropdownLabelContent_dropdownLabel",...d,children:"Appointment"}),p.jsx(Lp,{className:"dropdownLabelContent_close",onClick:e})]}),s]})]})},tu=({modal:e=!1,side:t,onClose:n,onOpenChange:r,buttonTrigger:o,ref:s})=>{const[i,a]=R.useState(!1),{createBookingModal:c}=Qe(),l=()=>{a(!1),n==null||n()},d=u=>{a(u),r==null||r(u)};return R.useImperativeHandle(s,()=>({showCreationModal:()=>a(!0),closeModal:()=>a(!1),isModalOpen:()=>i})),p.jsx(p.Fragment,{children:i&&p.jsx(ls,{children:p.jsx(Ky,{onClose:l,onOpenChange:d,modal:e,side:t,buttonTrigger:o,children:c})})})},Gy=({daysOfWeek:e,bookingViewType:t})=>{const{setTodayDay:n,setBookingViewType:r}=xe(),{updateMonthMessage:o,updateHeaderDateLabel:s}=La(x=>x),{onViewTypeChange:i}=Ia(),{onHeaderDayClick:a}=Qe(),{resetSelectedNode:c,resetNodes:l}=Mt(x=>x),d=R.useRef(null),u=()=>d.current,v=()=>{var x;(x=u())==null||x.showCreationModal()},h=R.useCallback(x=>{const y=()=>{r(re.WEEK),i(re.WEEK)},f=()=>t===re.DAY;if(a==null||a(x,t),f())return y();const w=n(x);if(!w)return;const D={month:w.getMonth(),fullYear:w.getFullYear(),monthMessage:Wt[w.getMonth()]};o(D),r(re.DAY)},[t,n,o,r]),C=t===re.TABLE?{justifySelf:"start"}:{},g=R.useMemo(()=>{const x=y=>new Date(y).toDateString()===new Date().toDateString();return e.map(y=>{const f=Oo[new Date(y).getDay()];return p.jsx("th",{className:se("daysOfWeek",t!==re.DAY&&"daysOfWeek_day"),children:p.jsxs("div",{style:{...C,maxWidth:t===re.DAY?"11rem":void 0},className:"daysOfWeek_parent",children:[p.jsx("span",{className:se(x(y)&&"daysOfWeek_day_today_title"),children:f}),p.jsx("div",{style:{width:"100%"},children:p.jsx("button",{type:"button",className:se("daysOfWeek_day",x(y)?"daysOfWeek_day_today":"daysOfWeek_day_rest"),onClick:()=>h(y),children:Q.formatDate(y.toDateString())})})]})},f)})},[e,h,t]);return R.useEffect(()=>{switch(t){case re.DAY:{l(),c(),s(e[0]);break}case re.WEEK:{const x=Q.generateWeekMonthLabel(e);o({monthMessage:x})}}},[e]),p.jsxs(p.Fragment,{children:[p.jsx("table",{className:"daysOfWeek_emptySlot_table",children:p.jsx("tbody",{children:p.jsxs("tr",{children:[p.jsx("th",{style:C,className:"calendarHeader",children:p.jsx("div",{className:"daysOfWeek_emptySlot",children:p.jsx(Ts,{content:"Create booking",children:p.jsx(Et,{variant:"ghost",onClick:v,children:p.jsx(Cp,{})})})})},"emptyBlocks"),g]})})}),p.jsx(tu,{modal:!0,ref:d})]})},qy=({handleWeekChange:e})=>p.jsxs("div",{className:"header_day_actions",children:[p.jsx(Et,{className:"header_day_actions_button",variant:"ghost",size:"lg",onClick:()=>e("previous"),children:p.jsx(vp,{className:"header_day_actions_button_icon"})}),p.jsx(Et,{className:"header_day_actions_button",variant:"ghost",size:"lg",onClick:()=>e("next"),children:p.jsx(bp,{className:"header_day_actions_button_icon"})})]}),Xy=({onClick:e})=>p.jsx(Ts,{content:"Today",children:p.jsx(Et,{variant:"ghost",onClick:e,children:p.jsx(Ap,{style:{paddingTop:"0.8px"}})})}),Zy={capitalize(e){return`${this.returnFirstChar(e)}${e.slice(1,e.length)}`},returnFirstChar(e){return e.charAt(0).toUpperCase()}},Jy=({code:e})=>p.jsx("p",{className:"text-sm text-muted-foreground",children:p.jsxs("kbd",{className:"pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100",children:[p.jsx("span",{className:"text-xs",children:"⌘"}),e]})}),Qy={[re.DAY]:p.jsx(Rp,{width:"90%"}),[re.WEEK]:p.jsx(Dp,{width:"90%"}),[re.TABLE]:p.jsx(pp,{width:"90%"}),[re.MONTH]:p.jsx(kp,{width:"90%"})},qi=()=>{const{bookingViewType:e}=xe(),{onViewTypeChange:t}=Ia(),{viewModes:n}=Qe(),r=R.useCallback(a=>a===e?"custom":"outline",[e]),o=R.useCallback(a=>{a!==e&&t(a)},[t]),s=R.useMemo(()=>n.map(a=>({variant:r(a),icon:Qy[a],events:c=>o(c),label:a})),[n,o,r]),i=R.useMemo(()=>{const a=s.find(c=>c.label===e);if(a)return a.icon},[e,s]);return p.jsxs(Fs,{children:[p.jsx(zs,{children:p.jsx(Ts,{content:"Calendar Modes",children:p.jsx(Et,{variant:"ghost",asChild:!0,children:i||p.jsx(dp,{className:"w-full h-full"})})})}),p.jsx(Ws,{children:s.map(a=>p.jsxs(zy,{checked:a.label===e,onCheckedChange:()=>a.events(a.label),className:"flex flex-row justify-between gap-6",children:[p.jsxs("div",{className:"flex flex-row gap-4",children:[a.icon,p.jsx("div",{children:Zy.capitalize(a.label)})]}),p.jsx(Jy,{code:"o"})]},a.label))})]})},eb=566,tb=()=>{const{todayWeek:e,bookingViewType:t,setTodayDay:n,nextWeek:r,previousWeek:o,setDays:s}=xe(),{resetSelectedNode:i,resetNodes:a}=Mt(m=>m),{onTodayClick:c}=Qe(),{fullYear:l,monthMessage:d}=La(m=>m),{onDayChange:u}=Qe(),[v,h]=R.useState(!1),C=()=>{const m=new Date;switch(c(m),t){case re.TABLE:case re.DAY:{n(m);break}default:{e();break}}},g=()=>s(1),x=()=>s(-1),y=m=>m==="next"?r():o(),f=m=>m==="next"?g():x(),w=m=>{switch(a(),i(),t){case re.TABLE:case re.DAY:{const T=f(m);u(T,m);break}case re.WEEK:{const T=y(m),{firstDayOfWeek:b,lastDayOfWeek:E}=Q.firstAndLastWeekDays(T);u([b,E],m);break}}};R.useEffect(()=>{e()},[e]),R.useEffect(()=>{const m=()=>{if(typeof window>"u")return!1;window.innerWidth<=eb?h(!0):h(!1)};return m(),window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[]);const D=p.jsxs("div",{className:"header_actions",children:[p.jsx(qy,{handleWeekChange:w}),p.jsx(Xy,{onClick:C})]});return p.jsx(p.Fragment,{children:v?p.jsxs("div",{className:"headerCalendar_mobile",children:[p.jsx("div",{className:"headerCalendar_mobile_month",children:p.jsxs("span",{className:"headerCalendar_mobile_month_span",children:[d," ",l]})}),p.jsxs("div",{className:"headerCalendar_mobile_actions",children:[D,p.jsx(qi,{})]})]}):p.jsxs("div",{className:"headerCalendar",children:[p.jsx("div",{className:"headerCalendar_actions",children:D}),p.jsx("div",{className:"headerCalendar_month",children:p.jsxs("span",{className:"headerCalendar_month_span",children:[d," ",l]})}),p.jsx(qi,{})]})})},nb=({children:e})=>{const{resetSelectedNode:t,resetNodes:n}=Mt(o=>o),r=xe(o=>o.bookingViewType);switch(R.useEffect(()=>{(r===re.DAY||r===re.WEEK)&&(t(),n())},[r,n,t]),r){case re.DAY:case re.WEEK:return e;default:return null}},rb=({children:e,...t})=>{const n=R.useRef(null);return n.current||(n.current=ud(t)),p.jsx(Pd,{value:n.current,children:e})},ob=({children:e,...t})=>p.jsx(uc,{value:{...t},children:e}),nu=R.createContext(null),sb={systemColor:"#000000",isTimeInfoVisible:!0},ib=e=>Tn(t=>({...sb,...e,updateSystemColor:n=>{t(r=>({...r,systemColor:n}))},changeTimeInfoVisibility:n=>{t(r=>({...r,isTimeInfoVisible:n}))}})),ab=({children:e,...t})=>{const n=R.useRef(null);return n.current||(n.current=ib(t)),p.jsx(nu,{value:n.current,children:e})},ru={month:new Date().getMonth(),fullYear:new Date().getFullYear(),monthMessage:""},cb=e=>Tn((t,n)=>({...e,...ru,updateMonthMessage:r=>{t(o=>({...o,...r}))},updateHeaderDateLabel:r=>{n().updateMonthMessage({month:r.getMonth(),fullYear:r.getFullYear(),monthMessage:Wt[r.getMonth()]})}})),lb=({children:e,...t})=>{const n=R.useRef(null);return n.current||(n.current=cb(t)),p.jsx(ja,{value:n.current,children:e})};var ub={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function Ko(e){if(typeof e=="number")return{value:e,unit:"px"};var t,n=(e.match(/^[0-9.]*/)||"").toString();n.includes(".")?t=parseFloat(n):t=parseInt(n,10);var r=(e.match(/[^0-9]*$/)||"").toString();return ub[r]?{value:t,unit:r}:(console.warn("React Spinners: ".concat(e," is not a valid css value. Defaulting to ").concat(t,"px.")),{value:t,unit:"px"})}function wo(e){var t=Ko(e);return"".concat(t.value).concat(t.unit)}var db=function(e,t,n){var r="react-spinners-".concat(e,"-").concat(n);if(typeof window>"u"||!window.document)return r;var o=document.createElement("style");document.head.appendChild(o);var s=o.sheet,i=`
146
+ @keyframes `.concat(r,` {
147
+ `).concat(t,`
148
+ }
149
+ `);return s&&s.insertRule(i,0),r},Er=function(){return Er=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Er.apply(this,arguments)},fb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},pb=db("GridLoader","0% {transform: scale(1)} 50% {transform: scale(0.5); opacity: 0.7} 100% {transform: scale(1); opacity: 1}","grid"),Xe=function(e){return Math.random()*e};function hb(e){var t=e.loading,n=t===void 0?!0:t,r=e.color,o=r===void 0?"#000000":r,s=e.speedMultiplier,i=s===void 0?1:s,a=e.cssOverride,c=a===void 0?{}:a,l=e.size,d=l===void 0?15:l,u=e.margin,v=u===void 0?2:u,h=fb(e,["loading","color","speedMultiplier","cssOverride","size","margin"]),C=Ko(d),g=Ko(v),x=parseFloat(C.value.toString())*3+parseFloat(g.value.toString())*6,y=Er({width:"".concat(x).concat(C.unit),fontSize:0,display:"inline-block"},c),f=function(w){return{display:"inline-block",backgroundColor:o,width:"".concat(wo(d)),height:"".concat(wo(d)),margin:wo(v),borderRadius:"100%",animationFillMode:"both",animation:"".concat(pb," ").concat((w/100+.6)/i,"s ").concat(w/100-.2,"s infinite ease")}};return n?S.createElement("span",Er({style:y},h,{ref:function(w){w&&w.style.setProperty("width","".concat(x).concat(C.unit),"important")}}),S.createElement("span",{style:f(Xe(100))}),S.createElement("span",{style:f(Xe(100))}),S.createElement("span",{style:f(Xe(100))}),S.createElement("span",{style:f(Xe(100))}),S.createElement("span",{style:f(Xe(100))}),S.createElement("span",{style:f(Xe(100))}),S.createElement("span",{style:f(Xe(100))}),S.createElement("span",{style:f(Xe(100))}),S.createElement("span",{style:f(Xe(100))})):null}const gb={id:"user-123",profile:{id:"profile-123",name:"Diego",email:"jane.smith@example.com"},createdAt:new Date,updatedAt:new Date},Xi=e=>Symbol.iterator in e,Zi=e=>"entries"in e,Ji=(e,t)=>{const n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(const[o,s]of n)if(!Object.is(s,r.get(o)))return!1;return!0},mb=(e,t)=>{const n=e[Symbol.iterator](),r=t[Symbol.iterator]();let o=n.next(),s=r.next();for(;!o.done&&!s.done;){if(!Object.is(o.value,s.value))return!1;o=n.next(),s=r.next()}return!!o.done&&!!s.done};function vb(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null?!1:!Xi(e)||!Xi(t)?Ji({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)}):Zi(e)&&Zi(t)?Ji(e,t):mb(e,t)}function Bs(e){const t=R.useRef(void 0);return n=>{const r=e(n);return vb(t.current,r)?t.current:t.current=r}}const ou=Mr(e=>({startAt:"",updateStartAt:t=>e(n=>({...n,startAt:t}))}));var cn={exports:{}},ln={},un={exports:{}},xo={},Jn={exports:{}},Qn={exports:{}},ce={};/** @license React v16.13.1
141
150
  * react-is.production.min.js
142
151
  *
143
152
  * Copyright (c) Facebook, Inc. and its affiliates.
144
153
  *
145
154
  * This source code is licensed under the MIT license found in the
146
155
  * LICENSE file in the root directory of this source tree.
147
- */var Bi;function Hy(){if(Bi)return ae;Bi=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,C=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,d=e?Symbol.for("react.scope"):60119;function m(v){if(typeof v=="object"&&v!==null){var T=v.$$typeof;switch(T){case t:switch(v=v.type,v){case c:case l:case r:case s:case o:case u:return v;default:switch(v=v&&v.$$typeof,v){case a:case f:case C:case y:case i:return v;default:return T}}case n:return T}}}function E(v){return m(v)===l}return ae.AsyncMode=c,ae.ConcurrentMode=l,ae.ContextConsumer=a,ae.ContextProvider=i,ae.Element=t,ae.ForwardRef=f,ae.Fragment=r,ae.Lazy=C,ae.Memo=y,ae.Portal=n,ae.Profiler=s,ae.StrictMode=o,ae.Suspense=u,ae.isAsyncMode=function(v){return E(v)||m(v)===c},ae.isConcurrentMode=E,ae.isContextConsumer=function(v){return m(v)===a},ae.isContextProvider=function(v){return m(v)===i},ae.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===t},ae.isForwardRef=function(v){return m(v)===f},ae.isFragment=function(v){return m(v)===r},ae.isLazy=function(v){return m(v)===C},ae.isMemo=function(v){return m(v)===y},ae.isPortal=function(v){return m(v)===n},ae.isProfiler=function(v){return m(v)===s},ae.isStrictMode=function(v){return m(v)===o},ae.isSuspense=function(v){return m(v)===u},ae.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===r||v===l||v===s||v===o||v===u||v===b||typeof v=="object"&&v!==null&&(v.$$typeof===C||v.$$typeof===y||v.$$typeof===i||v.$$typeof===a||v.$$typeof===f||v.$$typeof===x||v.$$typeof===g||v.$$typeof===d||v.$$typeof===p)},ae.typeOf=m,ae}var ce={};/** @license React v16.13.1
156
+ */var Qi;function yb(){if(Qi)return ce;Qi=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,v=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,C=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,f=e?Symbol.for("react.scope"):60119;function w(m){if(typeof m=="object"&&m!==null){var T=m.$$typeof;switch(T){case t:switch(m=m.type,m){case c:case l:case r:case s:case o:case u:return m;default:switch(m=m&&m.$$typeof,m){case a:case d:case C:case h:case i:return m;default:return T}}case n:return T}}}function D(m){return w(m)===l}return ce.AsyncMode=c,ce.ConcurrentMode=l,ce.ContextConsumer=a,ce.ContextProvider=i,ce.Element=t,ce.ForwardRef=d,ce.Fragment=r,ce.Lazy=C,ce.Memo=h,ce.Portal=n,ce.Profiler=s,ce.StrictMode=o,ce.Suspense=u,ce.isAsyncMode=function(m){return D(m)||w(m)===c},ce.isConcurrentMode=D,ce.isContextConsumer=function(m){return w(m)===a},ce.isContextProvider=function(m){return w(m)===i},ce.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},ce.isForwardRef=function(m){return w(m)===d},ce.isFragment=function(m){return w(m)===r},ce.isLazy=function(m){return w(m)===C},ce.isMemo=function(m){return w(m)===h},ce.isPortal=function(m){return w(m)===n},ce.isProfiler=function(m){return w(m)===s},ce.isStrictMode=function(m){return w(m)===o},ce.isSuspense=function(m){return w(m)===u},ce.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===l||m===s||m===o||m===u||m===v||typeof m=="object"&&m!==null&&(m.$$typeof===C||m.$$typeof===h||m.$$typeof===i||m.$$typeof===a||m.$$typeof===d||m.$$typeof===x||m.$$typeof===y||m.$$typeof===f||m.$$typeof===g)},ce.typeOf=w,ce}var le={};/** @license React v16.13.1
148
157
  * react-is.development.js
149
158
  *
150
159
  * Copyright (c) Facebook, Inc. and its affiliates.
151
160
  *
152
161
  * This source code is licensed under the MIT license found in the
153
162
  * LICENSE file in the root directory of this source tree.
154
- */var Hi;function Vy(){return Hi||(Hi=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,C=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,d=e?Symbol.for("react.scope"):60119;function m(z){return typeof z=="string"||typeof z=="function"||z===r||z===l||z===s||z===o||z===u||z===b||typeof z=="object"&&z!==null&&(z.$$typeof===C||z.$$typeof===y||z.$$typeof===i||z.$$typeof===a||z.$$typeof===f||z.$$typeof===x||z.$$typeof===g||z.$$typeof===d||z.$$typeof===p)}function E(z){if(typeof z=="object"&&z!==null){var oe=z.$$typeof;switch(oe){case t:var de=z.type;switch(de){case c:case l:case r:case s:case o:case u:return de;default:var Se=de&&de.$$typeof;switch(Se){case a:case f:case C:case y:case i:return Se;default:return oe}}case n:return oe}}}var v=c,T=l,w=a,D=i,P=t,_=f,I=r,H=C,K=y,j=n,F=s,k=o,N=u,M=!1;function A(z){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),O(z)||E(z)===c}function O(z){return E(z)===l}function L(z){return E(z)===a}function U(z){return E(z)===i}function Y(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function V(z){return E(z)===f}function X(z){return E(z)===r}function G(z){return E(z)===C}function $(z){return E(z)===y}function q(z){return E(z)===n}function W(z){return E(z)===s}function B(z){return E(z)===o}function Z(z){return E(z)===u}ce.AsyncMode=v,ce.ConcurrentMode=T,ce.ContextConsumer=w,ce.ContextProvider=D,ce.Element=P,ce.ForwardRef=_,ce.Fragment=I,ce.Lazy=H,ce.Memo=K,ce.Portal=j,ce.Profiler=F,ce.StrictMode=k,ce.Suspense=N,ce.isAsyncMode=A,ce.isConcurrentMode=O,ce.isContextConsumer=L,ce.isContextProvider=U,ce.isElement=Y,ce.isForwardRef=V,ce.isFragment=X,ce.isLazy=G,ce.isMemo=$,ce.isPortal=q,ce.isProfiler=W,ce.isStrictMode=B,ce.isSuspense=Z,ce.isValidElementType=m,ce.typeOf=E}()),ce}var Vi;function Bl(){return Vi||(Vi=1,process.env.NODE_ENV==="production"?Xn.exports=Hy():Xn.exports=Vy()),Xn.exports}/*
163
+ */var ea;function bb(){return ea||(ea=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,v=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,C=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,f=e?Symbol.for("react.scope"):60119;function w(_){return typeof _=="string"||typeof _=="function"||_===r||_===l||_===s||_===o||_===u||_===v||typeof _=="object"&&_!==null&&(_.$$typeof===C||_.$$typeof===h||_.$$typeof===i||_.$$typeof===a||_.$$typeof===d||_.$$typeof===x||_.$$typeof===y||_.$$typeof===f||_.$$typeof===g)}function D(_){if(typeof _=="object"&&_!==null){var ne=_.$$typeof;switch(ne){case t:var ae=_.type;switch(ae){case c:case l:case r:case s:case o:case u:return ae;default:var fe=ae&&ae.$$typeof;switch(fe){case a:case d:case C:case h:case i:return fe;default:return ne}}case n:return ne}}}var m=c,T=l,b=a,E=i,M=t,N=d,A=r,W=C,Y=h,L=n,$=s,k=o,I=u,O=!1;function j(_){return O||(O=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),P(_)||D(_)===c}function P(_){return D(_)===l}function F(_){return D(_)===a}function U(_){return D(_)===i}function V(_){return typeof _=="object"&&_!==null&&_.$$typeof===t}function H(_){return D(_)===d}function X(_){return D(_)===r}function K(_){return D(_)===C}function z(_){return D(_)===h}function G(_){return D(_)===n}function q(_){return D(_)===s}function B(_){return D(_)===o}function te(_){return D(_)===u}le.AsyncMode=m,le.ConcurrentMode=T,le.ContextConsumer=b,le.ContextProvider=E,le.Element=M,le.ForwardRef=N,le.Fragment=A,le.Lazy=W,le.Memo=Y,le.Portal=L,le.Profiler=$,le.StrictMode=k,le.Suspense=I,le.isAsyncMode=j,le.isConcurrentMode=P,le.isContextConsumer=F,le.isContextProvider=U,le.isElement=V,le.isForwardRef=H,le.isFragment=X,le.isLazy=K,le.isMemo=z,le.isPortal=G,le.isProfiler=q,le.isStrictMode=B,le.isSuspense=te,le.isValidElementType=w,le.typeOf=D}()),le}var ta;function su(){return ta||(ta=1,process.env.NODE_ENV==="production"?Qn.exports=yb():Qn.exports=bb()),Qn.exports}/*
155
164
  object-assign
156
165
  (c) Sindre Sorhus
157
166
  @license MIT
158
- */var mo,Yi;function Yy(){if(Yi)return mo;Yi=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(i).map(function(f){return i[f]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(f){l[f]=f}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return mo=o()?Object.assign:function(s,i){for(var a,c=r(s),l,f=1;f<arguments.length;f++){a=Object(arguments[f]);for(var u in a)t.call(a,u)&&(c[u]=a[u]);if(e){l=e(a);for(var b=0;b<l.length;b++)n.call(a,l[b])&&(c[l[b]]=a[l[b]])}}return c},mo}var vo,Ui;function Ns(){if(Ui)return vo;Ui=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return vo=e,vo}var yo,Ki;function Hl(){return Ki||(Ki=1,yo=Function.call.bind(Object.prototype.hasOwnProperty)),yo}var bo,Gi;function Uy(){if(Gi)return bo;Gi=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Ns(),n={},r=Hl();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,c,l){if(process.env.NODE_ENV!=="production"){for(var f in s)if(r(s,f)){var u;try{if(typeof s[f]!="function"){var b=Error((c||"React class")+": "+a+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw b.name="Invariant Violation",b}u=s[f](i,f,c,a,null,t)}catch(C){u=C}if(u&&!(u instanceof Error)&&e((c||"React class")+": type specification of "+a+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in n)){n[u.message]=!0;var y=l?l():"";e("Failed "+a+" type: "+u.message+(y??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},bo=o,bo}var wo,qi;function Ky(){if(qi)return wo;qi=1;var e=Bl(),t=Yy(),n=Ns(),r=Hl(),o=Uy(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var c="Warning: "+a;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return wo=function(a,c){var l=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function u(O){var L=O&&(l&&O[l]||O[f]);if(typeof L=="function")return L}var b="<<anonymous>>",y={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:d(),arrayOf:m,element:E(),elementType:v(),instanceOf:T,node:_(),objectOf:D,oneOf:w,oneOfType:P,shape:H,exact:K};function C(O,L){return O===L?O!==0||1/O===1/L:O!==O&&L!==L}function p(O,L){this.message=O,this.data=L&&typeof L=="object"?L:{},this.stack=""}p.prototype=Error.prototype;function x(O){if(process.env.NODE_ENV!=="production")var L={},U=0;function Y(X,G,$,q,W,B,Z){if(q=q||b,B=B||$,Z!==n){if(c){var z=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw z.name="Invariant Violation",z}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var oe=q+":"+$;!L[oe]&&U<3&&(s("You are manually calling a React.PropTypes validation function for the `"+B+"` prop on `"+q+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),L[oe]=!0,U++)}}return G[$]==null?X?G[$]===null?new p("The "+W+" `"+B+"` is marked as required "+("in `"+q+"`, but its value is `null`.")):new p("The "+W+" `"+B+"` is marked as required in "+("`"+q+"`, but its value is `undefined`.")):null:O(G,$,q,W,B)}var V=Y.bind(null,!1);return V.isRequired=Y.bind(null,!0),V}function g(O){function L(U,Y,V,X,G,$){var q=U[Y],W=k(q);if(W!==O){var B=N(q);return new p("Invalid "+X+" `"+G+"` of type "+("`"+B+"` supplied to `"+V+"`, expected ")+("`"+O+"`."),{expectedType:O})}return null}return x(L)}function d(){return x(i)}function m(O){function L(U,Y,V,X,G){if(typeof O!="function")return new p("Property `"+G+"` of component `"+V+"` has invalid PropType notation inside arrayOf.");var $=U[Y];if(!Array.isArray($)){var q=k($);return new p("Invalid "+X+" `"+G+"` of type "+("`"+q+"` supplied to `"+V+"`, expected an array."))}for(var W=0;W<$.length;W++){var B=O($,W,V,X,G+"["+W+"]",n);if(B instanceof Error)return B}return null}return x(L)}function E(){function O(L,U,Y,V,X){var G=L[U];if(!a(G)){var $=k(G);return new p("Invalid "+V+" `"+X+"` of type "+("`"+$+"` supplied to `"+Y+"`, expected a single ReactElement."))}return null}return x(O)}function v(){function O(L,U,Y,V,X){var G=L[U];if(!e.isValidElementType(G)){var $=k(G);return new p("Invalid "+V+" `"+X+"` of type "+("`"+$+"` supplied to `"+Y+"`, expected a single ReactElement type."))}return null}return x(O)}function T(O){function L(U,Y,V,X,G){if(!(U[Y]instanceof O)){var $=O.name||b,q=A(U[Y]);return new p("Invalid "+X+" `"+G+"` of type "+("`"+q+"` supplied to `"+V+"`, expected ")+("instance of `"+$+"`."))}return null}return x(L)}function w(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function L(U,Y,V,X,G){for(var $=U[Y],q=0;q<O.length;q++)if(C($,O[q]))return null;var W=JSON.stringify(O,function(Z,z){var oe=N(z);return oe==="symbol"?String(z):z});return new p("Invalid "+X+" `"+G+"` of value `"+String($)+"` "+("supplied to `"+V+"`, expected one of "+W+"."))}return x(L)}function D(O){function L(U,Y,V,X,G){if(typeof O!="function")return new p("Property `"+G+"` of component `"+V+"` has invalid PropType notation inside objectOf.");var $=U[Y],q=k($);if(q!=="object")return new p("Invalid "+X+" `"+G+"` of type "+("`"+q+"` supplied to `"+V+"`, expected an object."));for(var W in $)if(r($,W)){var B=O($,W,V,X,G+"."+W,n);if(B instanceof Error)return B}return null}return x(L)}function P(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var L=0;L<O.length;L++){var U=O[L];if(typeof U!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+M(U)+" at index "+L+"."),i}function Y(V,X,G,$,q){for(var W=[],B=0;B<O.length;B++){var Z=O[B],z=Z(V,X,G,$,q,n);if(z==null)return null;z.data&&r(z.data,"expectedType")&&W.push(z.data.expectedType)}var oe=W.length>0?", expected one of type ["+W.join(", ")+"]":"";return new p("Invalid "+$+" `"+q+"` supplied to "+("`"+G+"`"+oe+"."))}return x(Y)}function _(){function O(L,U,Y,V,X){return j(L[U])?null:new p("Invalid "+V+" `"+X+"` supplied to "+("`"+Y+"`, expected a ReactNode."))}return x(O)}function I(O,L,U,Y,V){return new p((O||"React class")+": "+L+" type `"+U+"."+Y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+V+"`.")}function H(O){function L(U,Y,V,X,G){var $=U[Y],q=k($);if(q!=="object")return new p("Invalid "+X+" `"+G+"` of type `"+q+"` "+("supplied to `"+V+"`, expected `object`."));for(var W in O){var B=O[W];if(typeof B!="function")return I(V,X,G,W,N(B));var Z=B($,W,V,X,G+"."+W,n);if(Z)return Z}return null}return x(L)}function K(O){function L(U,Y,V,X,G){var $=U[Y],q=k($);if(q!=="object")return new p("Invalid "+X+" `"+G+"` of type `"+q+"` "+("supplied to `"+V+"`, expected `object`."));var W=t({},U[Y],O);for(var B in W){var Z=O[B];if(r(O,B)&&typeof Z!="function")return I(V,X,G,B,N(Z));if(!Z)return new p("Invalid "+X+" `"+G+"` key `"+B+"` supplied to `"+V+"`.\nBad object: "+JSON.stringify(U[Y],null," ")+`
159
- Valid keys: `+JSON.stringify(Object.keys(O),null," "));var z=Z($,B,V,X,G+"."+B,n);if(z)return z}return null}return x(L)}function j(O){switch(typeof O){case"number":case"string":case"undefined":return!0;case"boolean":return!O;case"object":if(Array.isArray(O))return O.every(j);if(O===null||a(O))return!0;var L=u(O);if(L){var U=L.call(O),Y;if(L!==O.entries){for(;!(Y=U.next()).done;)if(!j(Y.value))return!1}else for(;!(Y=U.next()).done;){var V=Y.value;if(V&&!j(V[1]))return!1}}else return!1;return!0;default:return!1}}function F(O,L){return O==="symbol"?!0:L?L["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&L instanceof Symbol:!1}function k(O){var L=typeof O;return Array.isArray(O)?"array":O instanceof RegExp?"object":F(L,O)?"symbol":L}function N(O){if(typeof O>"u"||O===null)return""+O;var L=k(O);if(L==="object"){if(O instanceof Date)return"date";if(O instanceof RegExp)return"regexp"}return L}function M(O){var L=N(O);switch(L){case"array":case"object":return"an "+L;case"boolean":case"date":case"regexp":return"a "+L;default:return L}}function A(O){return!O.constructor||!O.constructor.name?b:O.constructor.name}return y.checkPropTypes=o,y.resetWarningCache=o.resetWarningCache,y.PropTypes=y,y},wo}var xo,Xi;function Gy(){if(Xi)return xo;Xi=1;var e=Ns();function t(){}function n(){}return n.resetWarningCache=t,xo=function(){function r(i,a,c,l,f,u){if(u!==e){var b=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw b.name="Invariant Violation",b}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},xo}var Zi;function Yr(){if(Zi)return qn.exports;if(Zi=1,process.env.NODE_ENV!=="production"){var e=Bl(),t=!0;qn.exports=Ky()(e.isElement,t)}else qn.exports=Gy()();return qn.exports}function Vl(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Vl(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Ji(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Vl(e))&&(r&&(r+=" "),r+=t);return r}const qy=Object.freeze(Object.defineProperty({__proto__:null,clsx:Ji,default:Ji},Symbol.toStringTag,{value:"Module"})),Xy=cd(qy);var fe={},at={},Qi;function Ur(){if(Qi)return at;Qi=1,Object.defineProperty(at,"__esModule",{value:!0}),at.dontSetMe=o,at.findInArray=e,at.int=r,at.isFunction=t,at.isNum=n;function e(s,i){for(let a=0,c=s.length;a<c;a++)if(i.apply(i,[s[a],a,s]))return s[a]}function t(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Function]"}function n(s){return typeof s=="number"&&!isNaN(s)}function r(s){return parseInt(s,10)}function o(s,i,a){if(s[i])return new Error("Invalid prop ".concat(i," passed to ").concat(a," - do not set this, set it on the child."))}return at}var ct={},ea;function Zy(){if(ea)return ct;ea=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.browserPrefixToKey=n,ct.browserPrefixToStyle=r,ct.default=void 0,ct.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){var s;let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const a=(s=window.document)===null||s===void 0||(s=s.documentElement)===null||s===void 0?void 0:s.style;if(!a||i in a)return"";for(let c=0;c<e.length;c++)if(n(i,e[c])in a)return e[c];return""}function n(s,i){return i?"".concat(i).concat(o(s)):s}function r(s,i){return i?"-".concat(i.toLowerCase(),"-").concat(s):s}function o(s){let i="",a=!0;for(let c=0;c<s.length;c++)a?(i+=s[c].toUpperCase(),a=!1):s[c]==="-"?a=!0:i+=s[c];return i}return ct.default=t(),ct}var ta;function Is(){if(ta)return fe;ta=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.addClassName=v,fe.addEvent=a,fe.addUserSelectStyles=m,fe.createCSSTransform=C,fe.createSVGTransform=p,fe.getTouch=g,fe.getTouchIdentifier=d,fe.getTranslation=x,fe.innerHeight=u,fe.innerWidth=b,fe.matchesSelector=s,fe.matchesSelectorAndParentsTo=i,fe.offsetXYFromParent=y,fe.outerHeight=l,fe.outerWidth=f,fe.removeClassName=T,fe.removeEvent=c,fe.removeUserSelectStyles=E;var e=Ur(),t=r(Zy());function n(w){if(typeof WeakMap!="function")return null;var D=new WeakMap,P=new WeakMap;return(n=function(_){return _?P:D})(w)}function r(w,D){if(w&&w.__esModule)return w;if(w===null||typeof w!="object"&&typeof w!="function")return{default:w};var P=n(D);if(P&&P.has(w))return P.get(w);var _={},I=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var H in w)if(H!=="default"&&Object.prototype.hasOwnProperty.call(w,H)){var K=I?Object.getOwnPropertyDescriptor(w,H):null;K&&(K.get||K.set)?Object.defineProperty(_,H,K):_[H]=w[H]}return _.default=w,P&&P.set(w,_),_}let o="";function s(w,D){return o||(o=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(P){return(0,e.isFunction)(w[P])})),(0,e.isFunction)(w[o])?w[o](D):!1}function i(w,D,P){let _=w;do{if(s(_,D))return!0;if(_===P)return!1;_=_.parentNode}while(_);return!1}function a(w,D,P,_){if(!w)return;const I={capture:!0,..._};w.addEventListener?w.addEventListener(D,P,I):w.attachEvent?w.attachEvent("on"+D,P):w["on"+D]=P}function c(w,D,P,_){if(!w)return;const I={capture:!0,..._};w.removeEventListener?w.removeEventListener(D,P,I):w.detachEvent?w.detachEvent("on"+D,P):w["on"+D]=null}function l(w){let D=w.clientHeight;const P=w.ownerDocument.defaultView.getComputedStyle(w);return D+=(0,e.int)(P.borderTopWidth),D+=(0,e.int)(P.borderBottomWidth),D}function f(w){let D=w.clientWidth;const P=w.ownerDocument.defaultView.getComputedStyle(w);return D+=(0,e.int)(P.borderLeftWidth),D+=(0,e.int)(P.borderRightWidth),D}function u(w){let D=w.clientHeight;const P=w.ownerDocument.defaultView.getComputedStyle(w);return D-=(0,e.int)(P.paddingTop),D-=(0,e.int)(P.paddingBottom),D}function b(w){let D=w.clientWidth;const P=w.ownerDocument.defaultView.getComputedStyle(w);return D-=(0,e.int)(P.paddingLeft),D-=(0,e.int)(P.paddingRight),D}function y(w,D,P){const I=D===D.ownerDocument.body?{left:0,top:0}:D.getBoundingClientRect(),H=(w.clientX+D.scrollLeft-I.left)/P,K=(w.clientY+D.scrollTop-I.top)/P;return{x:H,y:K}}function C(w,D){const P=x(w,D,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:P}}function p(w,D){return x(w,D,"")}function x(w,D,P){let{x:_,y:I}=w,H="translate(".concat(_).concat(P,",").concat(I).concat(P,")");if(D){const K="".concat(typeof D.x=="string"?D.x:D.x+P),j="".concat(typeof D.y=="string"?D.y:D.y+P);H="translate(".concat(K,", ").concat(j,")")+H}return H}function g(w,D){return w.targetTouches&&(0,e.findInArray)(w.targetTouches,P=>D===P.identifier)||w.changedTouches&&(0,e.findInArray)(w.changedTouches,P=>D===P.identifier)}function d(w){if(w.targetTouches&&w.targetTouches[0])return w.targetTouches[0].identifier;if(w.changedTouches&&w.changedTouches[0])return w.changedTouches[0].identifier}function m(w){if(!w)return;let D=w.getElementById("react-draggable-style-el");D||(D=w.createElement("style"),D.type="text/css",D.id="react-draggable-style-el",D.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
160
- `,D.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
161
- `,w.getElementsByTagName("head")[0].appendChild(D)),w.body&&v(w.body,"react-draggable-transparent-selection")}function E(w){if(w)try{if(w.body&&T(w.body,"react-draggable-transparent-selection"),w.selection)w.selection.empty();else{const D=(w.defaultView||window).getSelection();D&&D.type!=="Caret"&&D.removeAllRanges()}}catch{}}function v(w,D){w.classList?w.classList.add(D):w.className.match(new RegExp("(?:^|\\s)".concat(D,"(?!\\S)")))||(w.className+=" ".concat(D))}function T(w,D){w.classList?w.classList.remove(D):w.className=w.className.replace(new RegExp("(?:^|\\s)".concat(D,"(?!\\S)"),"g"),"")}return fe}var ze={},na;function Yl(){if(na)return ze;na=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.canDragX=o,ze.canDragY=s,ze.createCoreData=a,ze.createDraggableData=c,ze.getBoundPosition=n,ze.getControlPosition=i,ze.snapToGrid=r;var e=Ur(),t=Is();function n(u,b,y){if(!u.props.bounds)return[b,y];let{bounds:C}=u.props;C=typeof C=="string"?C:l(C);const p=f(u);if(typeof C=="string"){const{ownerDocument:x}=p,g=x.defaultView;let d;if(C==="parent"?d=p.parentNode:d=x.querySelector(C),!(d instanceof g.HTMLElement))throw new Error('Bounds selector "'+C+'" could not find an element.');const m=d,E=g.getComputedStyle(p),v=g.getComputedStyle(m);C={left:-p.offsetLeft+(0,e.int)(v.paddingLeft)+(0,e.int)(E.marginLeft),top:-p.offsetTop+(0,e.int)(v.paddingTop)+(0,e.int)(E.marginTop),right:(0,t.innerWidth)(m)-(0,t.outerWidth)(p)-p.offsetLeft+(0,e.int)(v.paddingRight)-(0,e.int)(E.marginRight),bottom:(0,t.innerHeight)(m)-(0,t.outerHeight)(p)-p.offsetTop+(0,e.int)(v.paddingBottom)-(0,e.int)(E.marginBottom)}}return(0,e.isNum)(C.right)&&(b=Math.min(b,C.right)),(0,e.isNum)(C.bottom)&&(y=Math.min(y,C.bottom)),(0,e.isNum)(C.left)&&(b=Math.max(b,C.left)),(0,e.isNum)(C.top)&&(y=Math.max(y,C.top)),[b,y]}function r(u,b,y){const C=Math.round(b/u[0])*u[0],p=Math.round(y/u[1])*u[1];return[C,p]}function o(u){return u.props.axis==="both"||u.props.axis==="x"}function s(u){return u.props.axis==="both"||u.props.axis==="y"}function i(u,b,y){const C=typeof b=="number"?(0,t.getTouch)(u,b):null;if(typeof b=="number"&&!C)return null;const p=f(y),x=y.props.offsetParent||p.offsetParent||p.ownerDocument.body;return(0,t.offsetXYFromParent)(C||u,x,y.props.scale)}function a(u,b,y){const C=!(0,e.isNum)(u.lastX),p=f(u);return C?{node:p,deltaX:0,deltaY:0,lastX:b,lastY:y,x:b,y}:{node:p,deltaX:b-u.lastX,deltaY:y-u.lastY,lastX:u.lastX,lastY:u.lastY,x:b,y}}function c(u,b){const y=u.props.scale;return{node:b.node,x:u.state.x+b.deltaX/y,y:u.state.y+b.deltaY/y,deltaX:b.deltaX/y,deltaY:b.deltaY/y,lastX:u.state.x,lastY:u.state.y}}function l(u){return{left:u.left,top:u.top,right:u.right,bottom:u.bottom}}function f(u){const b=u.findDOMNode();if(!b)throw new Error("<DraggableCore>: Unmounted during event!");return b}return ze}var cn={},Zn={},ra;function Ul(){if(ra)return Zn;ra=1,Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.default=e;function e(){}return Zn}var oa;function Jy(){if(oa)return cn;oa=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.default=void 0;var e=l(R),t=a(Yr()),n=a(Ke),r=Is(),o=Yl(),s=Ur(),i=a(Ul());function a(x){return x&&x.__esModule?x:{default:x}}function c(x){if(typeof WeakMap!="function")return null;var g=new WeakMap,d=new WeakMap;return(c=function(m){return m?d:g})(x)}function l(x,g){if(x&&x.__esModule)return x;if(x===null||typeof x!="object"&&typeof x!="function")return{default:x};var d=c(g);if(d&&d.has(x))return d.get(x);var m={},E=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in x)if(v!=="default"&&Object.prototype.hasOwnProperty.call(x,v)){var T=E?Object.getOwnPropertyDescriptor(x,v):null;T&&(T.get||T.set)?Object.defineProperty(m,v,T):m[v]=x[v]}return m.default=x,d&&d.set(x,m),m}function f(x,g,d){return g=u(g),g in x?Object.defineProperty(x,g,{value:d,enumerable:!0,configurable:!0,writable:!0}):x[g]=d,x}function u(x){var g=b(x,"string");return typeof g=="symbol"?g:String(g)}function b(x,g){if(typeof x!="object"||x===null)return x;var d=x[Symbol.toPrimitive];if(d!==void 0){var m=d.call(x,g);if(typeof m!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(x)}const y={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let C=y.mouse,p=class extends e.Component{constructor(){super(...arguments),f(this,"dragging",!1),f(this,"lastX",NaN),f(this,"lastY",NaN),f(this,"touchIdentifier",null),f(this,"mounted",!1),f(this,"handleDragStart",g=>{if(this.props.onMouseDown(g),!this.props.allowAnyClick&&typeof g.button=="number"&&g.button!==0)return!1;const d=this.findDOMNode();if(!d||!d.ownerDocument||!d.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:m}=d;if(this.props.disabled||!(g.target instanceof m.defaultView.Node)||this.props.handle&&!(0,r.matchesSelectorAndParentsTo)(g.target,this.props.handle,d)||this.props.cancel&&(0,r.matchesSelectorAndParentsTo)(g.target,this.props.cancel,d))return;g.type==="touchstart"&&g.preventDefault();const E=(0,r.getTouchIdentifier)(g);this.touchIdentifier=E;const v=(0,o.getControlPosition)(g,E,this);if(v==null)return;const{x:T,y:w}=v,D=(0,o.createCoreData)(this,T,w);(0,i.default)("DraggableCore: handleDragStart: %j",D),(0,i.default)("calling",this.props.onStart),!(this.props.onStart(g,D)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,r.addUserSelectStyles)(m),this.dragging=!0,this.lastX=T,this.lastY=w,(0,r.addEvent)(m,C.move,this.handleDrag),(0,r.addEvent)(m,C.stop,this.handleDragStop))}),f(this,"handleDrag",g=>{const d=(0,o.getControlPosition)(g,this.touchIdentifier,this);if(d==null)return;let{x:m,y:E}=d;if(Array.isArray(this.props.grid)){let w=m-this.lastX,D=E-this.lastY;if([w,D]=(0,o.snapToGrid)(this.props.grid,w,D),!w&&!D)return;m=this.lastX+w,E=this.lastY+D}const v=(0,o.createCoreData)(this,m,E);if((0,i.default)("DraggableCore: handleDrag: %j",v),this.props.onDrag(g,v)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const D=document.createEvent("MouseEvents");D.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(D)}return}this.lastX=m,this.lastY=E}),f(this,"handleDragStop",g=>{if(!this.dragging)return;const d=(0,o.getControlPosition)(g,this.touchIdentifier,this);if(d==null)return;let{x:m,y:E}=d;if(Array.isArray(this.props.grid)){let D=m-this.lastX||0,P=E-this.lastY||0;[D,P]=(0,o.snapToGrid)(this.props.grid,D,P),m=this.lastX+D,E=this.lastY+P}const v=(0,o.createCoreData)(this,m,E);if(this.props.onStop(g,v)===!1||this.mounted===!1)return!1;const w=this.findDOMNode();w&&this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(w.ownerDocument),(0,i.default)("DraggableCore: handleDragStop: %j",v),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,w&&((0,i.default)("DraggableCore: Removing handlers"),(0,r.removeEvent)(w.ownerDocument,C.move,this.handleDrag),(0,r.removeEvent)(w.ownerDocument,C.stop,this.handleDragStop))}),f(this,"onMouseDown",g=>(C=y.mouse,this.handleDragStart(g))),f(this,"onMouseUp",g=>(C=y.mouse,this.handleDragStop(g))),f(this,"onTouchStart",g=>(C=y.touch,this.handleDragStart(g))),f(this,"onTouchEnd",g=>(C=y.touch,this.handleDragStop(g)))}componentDidMount(){this.mounted=!0;const g=this.findDOMNode();g&&(0,r.addEvent)(g,y.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const g=this.findDOMNode();if(g){const{ownerDocument:d}=g;(0,r.removeEvent)(d,y.mouse.move,this.handleDrag),(0,r.removeEvent)(d,y.touch.move,this.handleDrag),(0,r.removeEvent)(d,y.mouse.stop,this.handleDragStop),(0,r.removeEvent)(d,y.touch.stop,this.handleDragStop),(0,r.removeEvent)(g,y.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(d)}}findDOMNode(){var g,d;return(g=this.props)!==null&&g!==void 0&&g.nodeRef?(d=this.props)===null||d===void 0||(d=d.nodeRef)===null||d===void 0?void 0:d.current:n.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return cn.default=p,f(p,"displayName","DraggableCore"),f(p,"propTypes",{allowAnyClick:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(x,g){if(x[g]&&x[g].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),f(p,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),cn}var sa;function Qy(){return sa||(sa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),e.default=void 0;var t=b(R),n=f(Yr()),r=f(Ke),o=f(Xy),s=Is(),i=Yl(),a=Ur(),c=f(Jy()),l=f(Ul());function f(d){return d&&d.__esModule?d:{default:d}}function u(d){if(typeof WeakMap!="function")return null;var m=new WeakMap,E=new WeakMap;return(u=function(v){return v?E:m})(d)}function b(d,m){if(d&&d.__esModule)return d;if(d===null||typeof d!="object"&&typeof d!="function")return{default:d};var E=u(m);if(E&&E.has(d))return E.get(d);var v={},T=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var w in d)if(w!=="default"&&Object.prototype.hasOwnProperty.call(d,w)){var D=T?Object.getOwnPropertyDescriptor(d,w):null;D&&(D.get||D.set)?Object.defineProperty(v,w,D):v[w]=d[w]}return v.default=d,E&&E.set(d,v),v}function y(){return y=Object.assign?Object.assign.bind():function(d){for(var m=1;m<arguments.length;m++){var E=arguments[m];for(var v in E)Object.prototype.hasOwnProperty.call(E,v)&&(d[v]=E[v])}return d},y.apply(this,arguments)}function C(d,m,E){return m=p(m),m in d?Object.defineProperty(d,m,{value:E,enumerable:!0,configurable:!0,writable:!0}):d[m]=E,d}function p(d){var m=x(d,"string");return typeof m=="symbol"?m:String(m)}function x(d,m){if(typeof d!="object"||d===null)return d;var E=d[Symbol.toPrimitive];if(E!==void 0){var v=E.call(d,m);if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(d)}class g extends t.Component{static getDerivedStateFromProps(m,E){let{position:v}=m,{prevPropsPosition:T}=E;return v&&(!T||v.x!==T.x||v.y!==T.y)?((0,l.default)("Draggable: getDerivedStateFromProps %j",{position:v,prevPropsPosition:T}),{x:v.x,y:v.y,prevPropsPosition:{...v}}):null}constructor(m){super(m),C(this,"onDragStart",(E,v)=>{if((0,l.default)("Draggable: onDragStart: %j",v),this.props.onStart(E,(0,i.createDraggableData)(this,v))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),C(this,"onDrag",(E,v)=>{if(!this.state.dragging)return!1;(0,l.default)("Draggable: onDrag: %j",v);const T=(0,i.createDraggableData)(this,v),w={x:T.x,y:T.y,slackX:0,slackY:0};if(this.props.bounds){const{x:P,y:_}=w;w.x+=this.state.slackX,w.y+=this.state.slackY;const[I,H]=(0,i.getBoundPosition)(this,w.x,w.y);w.x=I,w.y=H,w.slackX=this.state.slackX+(P-w.x),w.slackY=this.state.slackY+(_-w.y),T.x=w.x,T.y=w.y,T.deltaX=w.x-this.state.x,T.deltaY=w.y-this.state.y}if(this.props.onDrag(E,T)===!1)return!1;this.setState(w)}),C(this,"onDragStop",(E,v)=>{if(!this.state.dragging||this.props.onStop(E,(0,i.createDraggableData)(this,v))===!1)return!1;(0,l.default)("Draggable: onDragStop: %j",v);const w={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:P,y:_}=this.props.position;w.x=P,w.y=_}this.setState(w)}),this.state={dragging:!1,dragged:!1,x:m.position?m.position.x:m.defaultPosition.x,y:m.position?m.position.y:m.defaultPosition.y,prevPropsPosition:{...m.position},slackX:0,slackY:0,isElementSVG:!1},m.position&&!(m.onDrag||m.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var m,E;return(m=(E=this.props)===null||E===void 0||(E=E.nodeRef)===null||E===void 0?void 0:E.current)!==null&&m!==void 0?m:r.default.findDOMNode(this)}render(){const{axis:m,bounds:E,children:v,defaultPosition:T,defaultClassName:w,defaultClassNameDragging:D,defaultClassNameDragged:P,position:_,positionOffset:I,scale:H,...K}=this.props;let j={},F=null;const N=!!!_||this.state.dragging,M=_||T,A={x:(0,i.canDragX)(this)&&N?this.state.x:M.x,y:(0,i.canDragY)(this)&&N?this.state.y:M.y};this.state.isElementSVG?F=(0,s.createSVGTransform)(A,I):j=(0,s.createCSSTransform)(A,I);const O=(0,o.default)(v.props.className||"",w,{[D]:this.state.dragging,[P]:this.state.dragged});return t.createElement(c.default,y({},K,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(v),{className:O,style:{...v.props.style,...j},transform:F}))}}e.default=g,C(g,"displayName","Draggable"),C(g,"propTypes",{...c.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),C(g,"defaultProps",{...c.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(go)),go}var ia;function Kl(){if(ia)return an.exports;ia=1;const{default:e,DraggableCore:t}=Qy();return an.exports=e,an.exports.default=e,an.exports.DraggableCore=t,an.exports}var Jn={},aa;function eb(){if(aa)return Jn;aa=1,Jn.__esModule=!0,Jn.cloneElement=a;var e=t(R);function t(c){return c&&c.__esModule?c:{default:c}}function n(c,l){var f=Object.keys(c);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(c);l&&(u=u.filter(function(b){return Object.getOwnPropertyDescriptor(c,b).enumerable})),f.push.apply(f,u)}return f}function r(c){for(var l=1;l<arguments.length;l++){var f=arguments[l]!=null?arguments[l]:{};l%2?n(Object(f),!0).forEach(function(u){o(c,u,f[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(f)):n(Object(f)).forEach(function(u){Object.defineProperty(c,u,Object.getOwnPropertyDescriptor(f,u))})}return c}function o(c,l,f){return l=s(l),l in c?Object.defineProperty(c,l,{value:f,enumerable:!0,configurable:!0,writable:!0}):c[l]=f,c}function s(c){var l=i(c,"string");return typeof l=="symbol"?l:String(l)}function i(c,l){if(typeof c!="object"||c===null)return c;var f=c[Symbol.toPrimitive];if(f!==void 0){var u=f.call(c,l);if(typeof u!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(c)}function a(c,l){return l.style&&c.props.style&&(l.style=r(r({},c.props.style),l.style)),l.className&&c.props.className&&(l.className=c.props.className+" "+l.className),e.default.cloneElement(c,l)}return Jn}var ln={},ca;function Gl(){if(ca)return ln;ca=1,ln.__esModule=!0,ln.resizableProps=void 0;var e=t(Yr());Kl();function t(r){return r&&r.__esModule?r:{default:r}}var n={axis:e.default.oneOf(["both","x","y","none"]),className:e.default.string,children:e.default.element.isRequired,draggableOpts:e.default.shape({allowAnyClick:e.default.bool,cancel:e.default.string,children:e.default.node,disabled:e.default.bool,enableUserSelectHack:e.default.bool,offsetParent:e.default.node,grid:e.default.arrayOf(e.default.number),handle:e.default.string,nodeRef:e.default.object,onStart:e.default.func,onDrag:e.default.func,onStop:e.default.func,onMouseDown:e.default.func,scale:e.default.number}),height:function(){for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];var a=s[0];if(a.axis==="both"||a.axis==="y"){var c;return(c=e.default.number).isRequired.apply(c,s)}return e.default.number.apply(e.default,s)},handle:e.default.oneOfType([e.default.node,e.default.func]),handleSize:e.default.arrayOf(e.default.number),lockAspectRatio:e.default.bool,maxConstraints:e.default.arrayOf(e.default.number),minConstraints:e.default.arrayOf(e.default.number),onResizeStop:e.default.func,onResizeStart:e.default.func,onResize:e.default.func,resizeHandles:e.default.arrayOf(e.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:e.default.number,width:function(){for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];var a=s[0];if(a.axis==="both"||a.axis==="x"){var c;return(c=e.default.number).isRequired.apply(c,s)}return e.default.number.apply(e.default,s)}};return ln.resizableProps=n,ln}var la;function ql(){if(la)return sn;la=1,sn.__esModule=!0,sn.default=void 0;var e=i(R),t=Kl(),n=eb(),r=Gl(),o=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function s(g){if(typeof WeakMap!="function")return null;var d=new WeakMap,m=new WeakMap;return(s=function(v){return v?m:d})(g)}function i(g,d){if(g&&g.__esModule)return g;if(g===null||typeof g!="object"&&typeof g!="function")return{default:g};var m=s(d);if(m&&m.has(g))return m.get(g);var E={},v=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var T in g)if(T!=="default"&&Object.prototype.hasOwnProperty.call(g,T)){var w=v?Object.getOwnPropertyDescriptor(g,T):null;w&&(w.get||w.set)?Object.defineProperty(E,T,w):E[T]=g[T]}return E.default=g,m&&m.set(g,E),E}function a(){return a=Object.assign?Object.assign.bind():function(g){for(var d=1;d<arguments.length;d++){var m=arguments[d];for(var E in m)Object.prototype.hasOwnProperty.call(m,E)&&(g[E]=m[E])}return g},a.apply(this,arguments)}function c(g,d){if(g==null)return{};var m={},E=Object.keys(g),v,T;for(T=0;T<E.length;T++)v=E[T],!(d.indexOf(v)>=0)&&(m[v]=g[v]);return m}function l(g,d){var m=Object.keys(g);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(g);d&&(E=E.filter(function(v){return Object.getOwnPropertyDescriptor(g,v).enumerable})),m.push.apply(m,E)}return m}function f(g){for(var d=1;d<arguments.length;d++){var m=arguments[d]!=null?arguments[d]:{};d%2?l(Object(m),!0).forEach(function(E){u(g,E,m[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(m)):l(Object(m)).forEach(function(E){Object.defineProperty(g,E,Object.getOwnPropertyDescriptor(m,E))})}return g}function u(g,d,m){return d=b(d),d in g?Object.defineProperty(g,d,{value:m,enumerable:!0,configurable:!0,writable:!0}):g[d]=m,g}function b(g){var d=y(g,"string");return typeof d=="symbol"?d:String(d)}function y(g,d){if(typeof g!="object"||g===null)return g;var m=g[Symbol.toPrimitive];if(m!==void 0){var E=m.call(g,d);if(typeof E!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(g)}function C(g,d){g.prototype=Object.create(d.prototype),g.prototype.constructor=g,p(g,d)}function p(g,d){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(E,v){return E.__proto__=v,E},p(g,d)}var x=function(g){C(d,g);function d(){for(var E,v=arguments.length,T=new Array(v),w=0;w<v;w++)T[w]=arguments[w];return E=g.call.apply(g,[this].concat(T))||this,E.handleRefs={},E.lastHandleRect=null,E.slack=null,E}var m=d.prototype;return m.componentWillUnmount=function(){this.resetData()},m.resetData=function(){this.lastHandleRect=this.slack=null},m.runConstraints=function(v,T){var w=this.props,D=w.minConstraints,P=w.maxConstraints,_=w.lockAspectRatio;if(!D&&!P&&!_)return[v,T];if(_){var I=this.props.width/this.props.height,H=v-this.props.width,K=T-this.props.height;Math.abs(H)>Math.abs(K*I)?T=v/I:v=T*I}var j=v,F=T,k=this.slack||[0,0],N=k[0],M=k[1];return v+=N,T+=M,D&&(v=Math.max(D[0],v),T=Math.max(D[1],T)),P&&(v=Math.min(P[0],v),T=Math.min(P[1],T)),this.slack=[N+(j-v),M+(F-T)],[v,T]},m.resizeHandler=function(v,T){var w=this;return function(D,P){var _=P.node,I=P.deltaX,H=P.deltaY;v==="onResizeStart"&&w.resetData();var K=(w.props.axis==="both"||w.props.axis==="x")&&T!=="n"&&T!=="s",j=(w.props.axis==="both"||w.props.axis==="y")&&T!=="e"&&T!=="w";if(!(!K&&!j)){var F=T[0],k=T[T.length-1],N=_.getBoundingClientRect();if(w.lastHandleRect!=null){if(k==="w"){var M=N.left-w.lastHandleRect.left;I+=M}if(F==="n"){var A=N.top-w.lastHandleRect.top;H+=A}}w.lastHandleRect=N,k==="w"&&(I=-I),F==="n"&&(H=-H);var O=w.props.width+(K?I/w.props.transformScale:0),L=w.props.height+(j?H/w.props.transformScale:0),U=w.runConstraints(O,L);O=U[0],L=U[1];var Y=O!==w.props.width||L!==w.props.height,V=typeof w.props[v]=="function"?w.props[v]:null,X=v==="onResize"&&!Y;V&&!X&&(D.persist==null||D.persist(),V(D,{node:_,size:{width:O,height:L},handle:T})),v==="onResizeStop"&&w.resetData()}}},m.renderResizeHandle=function(v,T){var w=this.props.handle;if(!w)return e.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+v,ref:T});if(typeof w=="function")return w(v,T);var D=typeof w.type=="string",P=f({ref:T},D?{}:{handleAxis:v});return e.cloneElement(w,P)},m.render=function(){var v=this,T=this.props,w=T.children,D=T.className,P=T.draggableOpts;T.width,T.height,T.handle,T.handleSize,T.lockAspectRatio,T.axis,T.minConstraints,T.maxConstraints,T.onResize,T.onResizeStop,T.onResizeStart;var _=T.resizeHandles;T.transformScale;var I=c(T,o);return(0,n.cloneElement)(w,f(f({},I),{},{className:(D?D+" ":"")+"react-resizable",children:[].concat(w.props.children,_.map(function(H){var K,j=(K=v.handleRefs[H])!=null?K:v.handleRefs[H]=e.createRef();return e.createElement(t.DraggableCore,a({},P,{nodeRef:j,key:"resizableHandle-"+H,onStop:v.resizeHandler("onResizeStop",H),onStart:v.resizeHandler("onResizeStart",H),onDrag:v.resizeHandler("onResize",H)}),v.renderResizeHandle(H,j))}))}))},d}(e.Component);return sn.default=x,x.propTypes=r.resizableProps,x.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},sn}var un={},ua;function tb(){if(ua)return un;ua=1,un.__esModule=!0,un.default=void 0;var e=a(R),t=s(Yr()),n=s(ql()),r=Gl(),o=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function s(d){return d&&d.__esModule?d:{default:d}}function i(d){if(typeof WeakMap!="function")return null;var m=new WeakMap,E=new WeakMap;return(i=function(T){return T?E:m})(d)}function a(d,m){if(d&&d.__esModule)return d;if(d===null||typeof d!="object"&&typeof d!="function")return{default:d};var E=i(m);if(E&&E.has(d))return E.get(d);var v={},T=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var w in d)if(w!=="default"&&Object.prototype.hasOwnProperty.call(d,w)){var D=T?Object.getOwnPropertyDescriptor(d,w):null;D&&(D.get||D.set)?Object.defineProperty(v,w,D):v[w]=d[w]}return v.default=d,E&&E.set(d,v),v}function c(){return c=Object.assign?Object.assign.bind():function(d){for(var m=1;m<arguments.length;m++){var E=arguments[m];for(var v in E)Object.prototype.hasOwnProperty.call(E,v)&&(d[v]=E[v])}return d},c.apply(this,arguments)}function l(d,m){var E=Object.keys(d);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(d);m&&(v=v.filter(function(T){return Object.getOwnPropertyDescriptor(d,T).enumerable})),E.push.apply(E,v)}return E}function f(d){for(var m=1;m<arguments.length;m++){var E=arguments[m]!=null?arguments[m]:{};m%2?l(Object(E),!0).forEach(function(v){u(d,v,E[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(E)):l(Object(E)).forEach(function(v){Object.defineProperty(d,v,Object.getOwnPropertyDescriptor(E,v))})}return d}function u(d,m,E){return m=b(m),m in d?Object.defineProperty(d,m,{value:E,enumerable:!0,configurable:!0,writable:!0}):d[m]=E,d}function b(d){var m=y(d,"string");return typeof m=="symbol"?m:String(m)}function y(d,m){if(typeof d!="object"||d===null)return d;var E=d[Symbol.toPrimitive];if(E!==void 0){var v=E.call(d,m);if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(d)}function C(d,m){if(d==null)return{};var E={},v=Object.keys(d),T,w;for(w=0;w<v.length;w++)T=v[w],!(m.indexOf(T)>=0)&&(E[T]=d[T]);return E}function p(d,m){d.prototype=Object.create(m.prototype),d.prototype.constructor=d,x(d,m)}function x(d,m){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(v,T){return v.__proto__=T,v},x(d,m)}var g=function(d){p(m,d);function m(){for(var v,T=arguments.length,w=new Array(T),D=0;D<T;D++)w[D]=arguments[D];return v=d.call.apply(d,[this].concat(w))||this,v.state={width:v.props.width,height:v.props.height,propsWidth:v.props.width,propsHeight:v.props.height},v.onResize=function(P,_){var I=_.size;v.props.onResize?(P.persist==null||P.persist(),v.setState(I,function(){return v.props.onResize&&v.props.onResize(P,_)})):v.setState(I)},v}m.getDerivedStateFromProps=function(T,w){return w.propsWidth!==T.width||w.propsHeight!==T.height?{width:T.width,height:T.height,propsWidth:T.width,propsHeight:T.height}:null};var E=m.prototype;return E.render=function(){var T=this.props,w=T.handle,D=T.handleSize;T.onResize;var P=T.onResizeStart,_=T.onResizeStop,I=T.draggableOpts,H=T.minConstraints,K=T.maxConstraints,j=T.lockAspectRatio,F=T.axis;T.width,T.height;var k=T.resizeHandles,N=T.style,M=T.transformScale,A=C(T,o);return e.createElement(n.default,{axis:F,draggableOpts:I,handle:w,handleSize:D,height:this.state.height,lockAspectRatio:j,maxConstraints:K,minConstraints:H,onResizeStart:P,onResize:this.onResize,onResizeStop:_,resizeHandles:k,transformScale:M,width:this.state.width},e.createElement("div",c({},A,{style:f(f({},N),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},m}(e.Component);return un.default=g,g.propTypes=f(f({},r.resizableProps),{},{children:t.default.element}),un}var da;function nb(){return da||(da=1,on.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},on.exports.Resizable=ql().default,on.exports.ResizableBox=tb().default),on.exports}var Xl=nb();function rb(e,t){const n=e>new Date(t.startAt),r=e<new Date(t.finishAt);return n&&r}const ob={calculateOverlappingBookings:(e,t)=>{const n=t.filter(o=>{const s=new Date(o.startAt).getDate(),i=e.startAt.getDate();return s===i&&o.id!==e.id});let r=0;for(const o of n)rb(e.startAt,o)&&r++;return r}},js=({bookingInit:e,slotData:t,heightStyleTransformer:n,onClick:r,customClasses:o,bookingViewType:s,resizableParam:i,events:a,open:c=!0,ref:l})=>{var d;const[f,u]=R.useState(""),b=Xt(m=>m.updateIsDragging),{bookings:y}=qe(),C=s===ne.DAY?{width:"99%"}:{width:"100%"};R.useEffect(()=>()=>{a!=null&&a.onUnmount&&(a==null||a.onUnmount())},[]);const p=(m,E)=>{u("show-handle"),b(!0),i!=null&&i.onResizeStart&&i.onResizeStart(m,E)},x=(m,E)=>{u(""),b(!1),i!=null&&i.onResizeStop&&i.onResizeStop(m,E)},g=R.useMemo(()=>ob.calculateOverlappingBookings(e,y),[e,y]);if(!c&&!e.finishAt)return null;if((d=i==null?void 0:i.state)!=null&&d.height){const{state:m,onResize:E}=i;return h.jsx(Xl.Resizable,{className:ie("cardContent_resizable",i.customClass,f,g>0&&"inner_cards_parent"),height:m==null?void 0:m.height,width:m==null?void 0:m.width,onResize:E,onResizeStart:p,onResizeStop:x,resizeHandles:["s"],draggableOpts:{grid:[35,35]},handleSize:[20,20],maxConstraints:[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],transformScale:1,children:h.jsx("div",{style:{display:"flex",height:n,zIndex:99},children:h.jsx(zo,{heightStyleTransformer:n,booking:e,slotData:t,onClick:r,layerCount:g},e.id)})})}return h.jsx("div",{ref:l,style:{height:n,display:"flex",zIndex:100,...C},children:h.jsx(zo,{heightStyleTransformer:n,customClasses:o,booking:e,slotData:t,onClick:r})})};var sb="Label",Zl=S.forwardRef((e,t)=>h.jsx(se.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Zl.displayName=sb;var ib=Zl;function ab({className:e,...t}){return h.jsx(ib,{"data-slot":"label",className:ie("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const cb=({onClose:e,side:t,onOpenChange:n,buttonTrigger:r,children:o})=>{const[s,i]=R.useState({x:0,y:0}),a=Xt(C=>C.updateIsDragging),{attributes:c,listeners:l,setNodeRef:f,transform:u,setActivatorNodeRef:b}=rs({id:"booking_info",data:{type:"another"}}),y={transform:`translate3d(${s.x+((u==null?void 0:u.x)||0)}px, ${s.y+((u==null?void 0:u.y)||0)}px, 0)`};return Dn({onDragStart(){a(!0)},onDragEnd(C){if(C.active.id){const{y:p,x}=s;i({x:x+((u==null?void 0:u.x)||0),y:p+((u==null?void 0:u.y)||0)}),a(!1)}}}),h.jsxs(ks,{dir:"ltr",modal:!1,open:!0,onOpenChange:n,children:[h.jsx(As,{asChild:!0,children:r}),h.jsxs(_s,{ref:f,style:{...y,zIndex:50,width:"25rem"},forceMount:!0,avoidCollisions:!0,side:t,sticky:"always",updatePositionStrategy:"always",...c,children:[h.jsxs("div",{className:"dropdownLabelContent",children:[h.jsx(ab,{ref:b,className:"dropdownLabelContent_dropdownLabel",...l,children:"Appointment"}),h.jsx(ih,{className:"dropdownLabelContent_close",onClick:e})]}),o]})]})};function fa(e,[t,n]){return Math.min(n,Math.max(t,e))}function lb(e){const t=S.useRef({value:e,previous:e});return S.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var ub=[" ","Enter","ArrowUp","ArrowDown"],db=[" ","Enter"],In="Select",[Kr,Gr,fb]=bs(In),[Zt,Qw]=gt(In,[fb,mt]),qr=mt(),[pb,vt]=Zt(In),[hb,gb]=Zt(In),Jl=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:c,dir:l,name:f,autoComplete:u,disabled:b,required:y,form:C}=e,p=qr(t),[x,g]=S.useState(null),[d,m]=S.useState(null),[E,v]=S.useState(!1),T=ws(l),[w=!1,D]=Dt({prop:r,defaultProp:o,onChange:s}),[P,_]=Dt({prop:i,defaultProp:a,onChange:c}),I=S.useRef(null),H=x?C||!!x.closest("form"):!0,[K,j]=S.useState(new Set),F=Array.from(K).map(k=>k.props.value).join(";");return h.jsx(_r,{...p,children:h.jsxs(pb,{required:y,scope:t,trigger:x,onTriggerChange:g,valueNode:d,onValueNodeChange:m,valueNodeHasChildren:E,onValueNodeHasChildrenChange:v,contentId:dt(),value:P,onValueChange:_,open:w,onOpenChange:D,dir:T,triggerPointerDownPosRef:I,disabled:b,children:[h.jsx(Kr.Provider,{scope:t,children:h.jsx(hb,{scope:e.__scopeSelect,onNativeOptionAdd:S.useCallback(k=>{j(N=>new Set(N).add(k))},[]),onNativeOptionRemove:S.useCallback(k=>{j(N=>{const M=new Set(N);return M.delete(k),M})},[]),children:n})}),H?h.jsxs(xu,{"aria-hidden":!0,required:y,tabIndex:-1,name:f,autoComplete:u,value:P,onChange:k=>_(k.target.value),disabled:b,form:C,children:[P===void 0?h.jsx("option",{value:""}):null,Array.from(K)]},F):null]})})};Jl.displayName=In;var Ql="SelectTrigger",eu=S.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=qr(n),i=vt(Ql,n),a=i.disabled||r,c=le(t,i.onTriggerChange),l=Gr(n),f=S.useRef("touch"),[u,b,y]=Su(p=>{const x=l().filter(m=>!m.disabled),g=x.find(m=>m.value===i.value),d=Cu(x,p,g);d!==void 0&&i.onValueChange(d.value)}),C=p=>{a||(i.onOpenChange(!0),y()),p&&(i.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return h.jsx(Pn,{asChild:!0,...s,children:h.jsx(se.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":wu(i.value)?"":void 0,...o,ref:c,onClick:ee(o.onClick,p=>{p.currentTarget.focus(),f.current!=="mouse"&&C(p)}),onPointerDown:ee(o.onPointerDown,p=>{f.current=p.pointerType;const x=p.target;x.hasPointerCapture(p.pointerId)&&x.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(C(p),p.preventDefault())}),onKeyDown:ee(o.onKeyDown,p=>{const x=u.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&b(p.key),!(x&&p.key===" ")&&ub.includes(p.key)&&(C(),p.preventDefault())})})})});eu.displayName=Ql;var tu="SelectValue",nu=S.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,c=vt(tu,n),{onValueNodeHasChildrenChange:l}=c,f=s!==void 0,u=le(t,c.onValueNodeChange);return ye(()=>{l(f)},[l,f]),h.jsx(se.span,{...a,ref:u,style:{pointerEvents:"none"},children:wu(c.value)?h.jsx(h.Fragment,{children:i}):s})});nu.displayName=tu;var mb="SelectIcon",ru=S.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return h.jsx(se.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});ru.displayName=mb;var vb="SelectPortal",ou=e=>h.jsx(kn,{asChild:!0,...e});ou.displayName=vb;var Tt="SelectContent",su=S.forwardRef((e,t)=>{const n=vt(Tt,e.__scopeSelect),[r,o]=S.useState();if(ye(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Sr.createPortal(h.jsx(iu,{scope:e.__scopeSelect,children:h.jsx(Kr.Slot,{scope:e.__scopeSelect,children:h.jsx("div",{children:e.children})})}),s):null}return h.jsx(au,{...e,ref:t})});su.displayName=Tt;var Ne=10,[iu,yt]=Zt(Tt),yb="SelectContentImpl",bb=St("SelectContent.RemoveScroll"),au=S.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:c,align:l,alignOffset:f,arrowPadding:u,collisionBoundary:b,collisionPadding:y,sticky:C,hideWhenDetached:p,avoidCollisions:x,...g}=e,d=vt(Tt,n),[m,E]=S.useState(null),[v,T]=S.useState(null),w=le(t,$=>E($)),[D,P]=S.useState(null),[_,I]=S.useState(null),H=Gr(n),[K,j]=S.useState(!1),F=S.useRef(!1);S.useEffect(()=>{if(m)return Ss(m)},[m]),xs();const k=S.useCallback($=>{const[q,...W]=H().map(z=>z.ref.current),[B]=W.slice(-1),Z=document.activeElement;for(const z of $)if(z===Z||(z==null||z.scrollIntoView({block:"nearest"}),z===q&&v&&(v.scrollTop=0),z===B&&v&&(v.scrollTop=v.scrollHeight),z==null||z.focus(),document.activeElement!==Z))return},[H,v]),N=S.useCallback(()=>k([D,m]),[k,D,m]);S.useEffect(()=>{K&&N()},[K,N]);const{onOpenChange:M,triggerPointerDownPosRef:A}=d;S.useEffect(()=>{if(m){let $={x:0,y:0};const q=B=>{var Z,z;$={x:Math.abs(Math.round(B.pageX)-(((Z=A.current)==null?void 0:Z.x)??0)),y:Math.abs(Math.round(B.pageY)-(((z=A.current)==null?void 0:z.y)??0))}},W=B=>{$.x<=10&&$.y<=10?B.preventDefault():m.contains(B.target)||M(!1),document.removeEventListener("pointermove",q),A.current=null};return A.current!==null&&(document.addEventListener("pointermove",q),document.addEventListener("pointerup",W,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",q),document.removeEventListener("pointerup",W,{capture:!0})}}},[m,M,A]),S.useEffect(()=>{const $=()=>M(!1);return window.addEventListener("blur",$),window.addEventListener("resize",$),()=>{window.removeEventListener("blur",$),window.removeEventListener("resize",$)}},[M]);const[O,L]=Su($=>{const q=H().filter(Z=>!Z.disabled),W=q.find(Z=>Z.ref.current===document.activeElement),B=Cu(q,$,W);B&&setTimeout(()=>B.ref.current.focus())}),U=S.useCallback(($,q,W)=>{const B=!F.current&&!W;(d.value!==void 0&&d.value===q||B)&&(P($),B&&(F.current=!0))},[d.value]),Y=S.useCallback(()=>m==null?void 0:m.focus(),[m]),V=S.useCallback(($,q,W)=>{const B=!F.current&&!W;(d.value!==void 0&&d.value===q||B)&&I($)},[d.value]),X=r==="popper"?Wo:cu,G=X===Wo?{side:a,sideOffset:c,align:l,alignOffset:f,arrowPadding:u,collisionBoundary:b,collisionPadding:y,sticky:C,hideWhenDetached:p,avoidCollisions:x}:{};return h.jsx(iu,{scope:n,content:m,viewport:v,onViewportChange:T,itemRefCallback:U,selectedItem:D,onItemLeave:Y,itemTextRefCallback:V,focusSelectedItem:N,selectedItemText:_,position:r,isPositioned:K,searchRef:O,children:h.jsx(Br,{as:bb,allowPinchZoom:!0,children:h.jsx(Fr,{asChild:!0,trapped:d.open,onMountAutoFocus:$=>{$.preventDefault()},onUnmountAutoFocus:ee(o,$=>{var q;(q=d.trigger)==null||q.focus({preventScroll:!0}),$.preventDefault()}),children:h.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:$=>$.preventDefault(),onDismiss:()=>d.onOpenChange(!1),children:h.jsx(X,{role:"listbox",id:d.contentId,"data-state":d.open?"open":"closed",dir:d.dir,onContextMenu:$=>$.preventDefault(),...g,...G,onPlaced:()=>j(!0),ref:w,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:ee(g.onKeyDown,$=>{const q=$.ctrlKey||$.altKey||$.metaKey;if($.key==="Tab"&&$.preventDefault(),!q&&$.key.length===1&&L($.key),["ArrowUp","ArrowDown","Home","End"].includes($.key)){let B=H().filter(Z=>!Z.disabled).map(Z=>Z.ref.current);if(["ArrowUp","End"].includes($.key)&&(B=B.slice().reverse()),["ArrowUp","ArrowDown"].includes($.key)){const Z=$.target,z=B.indexOf(Z);B=B.slice(z+1)}setTimeout(()=>k(B)),$.preventDefault()}})})})})})})});au.displayName=yb;var wb="SelectItemAlignedPosition",cu=S.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=vt(Tt,n),i=yt(Tt,n),[a,c]=S.useState(null),[l,f]=S.useState(null),u=le(t,w=>f(w)),b=Gr(n),y=S.useRef(!1),C=S.useRef(!0),{viewport:p,selectedItem:x,selectedItemText:g,focusSelectedItem:d}=i,m=S.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&l&&p&&x&&g){const w=s.trigger.getBoundingClientRect(),D=l.getBoundingClientRect(),P=s.valueNode.getBoundingClientRect(),_=g.getBoundingClientRect();if(s.dir!=="rtl"){const Z=_.left-D.left,z=P.left-Z,oe=w.left-z,de=w.width+oe,Se=Math.max(de,D.width),Ce=window.innerWidth-Ne,Qe=fa(z,[Ne,Math.max(Ne,Ce-Se)]);a.style.minWidth=de+"px",a.style.left=Qe+"px"}else{const Z=D.right-_.right,z=window.innerWidth-P.right-Z,oe=window.innerWidth-w.right-z,de=w.width+oe,Se=Math.max(de,D.width),Ce=window.innerWidth-Ne,Qe=fa(z,[Ne,Math.max(Ne,Ce-Se)]);a.style.minWidth=de+"px",a.style.right=Qe+"px"}const I=b(),H=window.innerHeight-Ne*2,K=p.scrollHeight,j=window.getComputedStyle(l),F=parseInt(j.borderTopWidth,10),k=parseInt(j.paddingTop,10),N=parseInt(j.borderBottomWidth,10),M=parseInt(j.paddingBottom,10),A=F+k+K+M+N,O=Math.min(x.offsetHeight*5,A),L=window.getComputedStyle(p),U=parseInt(L.paddingTop,10),Y=parseInt(L.paddingBottom,10),V=w.top+w.height/2-Ne,X=H-V,G=x.offsetHeight/2,$=x.offsetTop+G,q=F+k+$,W=A-q;if(q<=V){const Z=I.length>0&&x===I[I.length-1].ref.current;a.style.bottom="0px";const z=l.clientHeight-p.offsetTop-p.offsetHeight,oe=Math.max(X,G+(Z?Y:0)+z+N),de=q+oe;a.style.height=de+"px"}else{const Z=I.length>0&&x===I[0].ref.current;a.style.top="0px";const oe=Math.max(V,F+p.offsetTop+(Z?U:0)+G)+W;a.style.height=oe+"px",p.scrollTop=q-V+p.offsetTop}a.style.margin=`${Ne}px 0`,a.style.minHeight=O+"px",a.style.maxHeight=H+"px",r==null||r(),requestAnimationFrame(()=>y.current=!0)}},[b,s.trigger,s.valueNode,a,l,p,x,g,s.dir,r]);ye(()=>m(),[m]);const[E,v]=S.useState();ye(()=>{l&&v(window.getComputedStyle(l).zIndex)},[l]);const T=S.useCallback(w=>{w&&C.current===!0&&(m(),d==null||d(),C.current=!1)},[m,d]);return h.jsx(Sb,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:y,onScrollButtonChange:T,children:h.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:h.jsx(se.div,{...o,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});cu.displayName=wb;var xb="SelectPopperPosition",Wo=S.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Ne,...s}=e,i=qr(n);return h.jsx(Nr,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Wo.displayName=xb;var[Sb,Ls]=Zt(Tt,{}),Bo="SelectViewport",lu=S.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=yt(Bo,n),i=Ls(Bo,n),a=le(t,s.onViewportChange),c=S.useRef(0);return h.jsxs(h.Fragment,{children:[h.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),h.jsx(Kr.Slot,{scope:n,children:h.jsx(se.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ee(o.onScroll,l=>{const f=l.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:b}=i;if(b!=null&&b.current&&u){const y=Math.abs(c.current-f.scrollTop);if(y>0){const C=window.innerHeight-Ne*2,p=parseFloat(u.style.minHeight),x=parseFloat(u.style.height),g=Math.max(p,x);if(g<C){const d=g+y,m=Math.min(C,d),E=d-m;u.style.height=m+"px",u.style.bottom==="0px"&&(f.scrollTop=E>0?E:0,u.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});lu.displayName=Bo;var uu="SelectGroup",[Cb,Eb]=Zt(uu),Db=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=dt();return h.jsx(Cb,{scope:n,id:o,children:h.jsx(se.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Db.displayName=uu;var du="SelectLabel",Tb=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Eb(du,n);return h.jsx(se.div,{id:o.id,...r,ref:t})});Tb.displayName=du;var xr="SelectItem",[Rb,fu]=Zt(xr),pu=S.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=vt(xr,n),c=yt(xr,n),l=a.value===r,[f,u]=S.useState(s??""),[b,y]=S.useState(!1),C=le(t,d=>{var m;return(m=c.itemRefCallback)==null?void 0:m.call(c,d,r,o)}),p=dt(),x=S.useRef("touch"),g=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return h.jsx(Rb,{scope:n,value:r,disabled:o,textId:p,isSelected:l,onItemTextChange:S.useCallback(d=>{u(m=>m||((d==null?void 0:d.textContent)??"").trim())},[]),children:h.jsx(Kr.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:h.jsx(se.div,{role:"option","aria-labelledby":p,"data-highlighted":b?"":void 0,"aria-selected":l&&b,"data-state":l?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:C,onFocus:ee(i.onFocus,()=>y(!0)),onBlur:ee(i.onBlur,()=>y(!1)),onClick:ee(i.onClick,()=>{x.current!=="mouse"&&g()}),onPointerUp:ee(i.onPointerUp,()=>{x.current==="mouse"&&g()}),onPointerDown:ee(i.onPointerDown,d=>{x.current=d.pointerType}),onPointerMove:ee(i.onPointerMove,d=>{var m;x.current=d.pointerType,o?(m=c.onItemLeave)==null||m.call(c):x.current==="mouse"&&d.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ee(i.onPointerLeave,d=>{var m;d.currentTarget===document.activeElement&&((m=c.onItemLeave)==null||m.call(c))}),onKeyDown:ee(i.onKeyDown,d=>{var E;((E=c.searchRef)==null?void 0:E.current)!==""&&d.key===" "||(db.includes(d.key)&&g(),d.key===" "&&d.preventDefault())})})})})});pu.displayName=xr;var fn="SelectItemText",hu=S.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=vt(fn,n),a=yt(fn,n),c=fu(fn,n),l=gb(fn,n),[f,u]=S.useState(null),b=le(t,g=>u(g),c.onItemTextChange,g=>{var d;return(d=a.itemTextRefCallback)==null?void 0:d.call(a,g,c.value,c.disabled)}),y=f==null?void 0:f.textContent,C=S.useMemo(()=>h.jsx("option",{value:c.value,disabled:c.disabled,children:y},c.value),[c.disabled,c.value,y]),{onNativeOptionAdd:p,onNativeOptionRemove:x}=l;return ye(()=>(p(C),()=>x(C)),[p,x,C]),h.jsxs(h.Fragment,{children:[h.jsx(se.span,{id:c.textId,...s,ref:b}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Sr.createPortal(s.children,i.valueNode):null]})});hu.displayName=fn;var gu="SelectItemIndicator",mu=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return fu(gu,n).isSelected?h.jsx(se.span,{"aria-hidden":!0,...r,ref:t}):null});mu.displayName=gu;var Ho="SelectScrollUpButton",vu=S.forwardRef((e,t)=>{const n=yt(Ho,e.__scopeSelect),r=Ls(Ho,e.__scopeSelect),[o,s]=S.useState(!1),i=le(t,r.onScrollButtonChange);return ye(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollTop>0;s(l)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?h.jsx(bu,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});vu.displayName=Ho;var Vo="SelectScrollDownButton",yu=S.forwardRef((e,t)=>{const n=yt(Vo,e.__scopeSelect),r=Ls(Vo,e.__scopeSelect),[o,s]=S.useState(!1),i=le(t,r.onScrollButtonChange);return ye(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<l;s(f)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?h.jsx(bu,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});yu.displayName=Vo;var bu=S.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=yt("SelectScrollButton",n),i=S.useRef(null),a=Gr(n),c=S.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return S.useEffect(()=>()=>c(),[c]),ye(()=>{var f;const l=a().find(u=>u.ref.current===document.activeElement);(f=l==null?void 0:l.ref.current)==null||f.scrollIntoView({block:"nearest"})},[a]),h.jsx(se.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:ee(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:ee(o.onPointerMove,()=>{var l;(l=s.onItemLeave)==null||l.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:ee(o.onPointerLeave,()=>{c()})})}),Mb="SelectSeparator",Ob=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return h.jsx(se.div,{"aria-hidden":!0,...r,ref:t})});Ob.displayName=Mb;var Yo="SelectArrow",Pb=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=qr(n),s=vt(Yo,n),i=yt(Yo,n);return s.open&&i.position==="popper"?h.jsx(Ir,{...o,...r,ref:t}):null});Pb.displayName=Yo;function wu(e){return e===""||e===void 0}var xu=S.forwardRef((e,t)=>{const{value:n,...r}=e,o=S.useRef(null),s=le(t,o),i=lb(n);return S.useEffect(()=>{const a=o.current,c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==n&&f){const u=new Event("change",{bubbles:!0});f.call(a,n),a.dispatchEvent(u)}},[i,n]),h.jsx(gs,{asChild:!0,children:h.jsx("select",{...r,ref:s,defaultValue:n})})});xu.displayName="BubbleSelect";function Su(e){const t=_e(e),n=S.useRef(""),r=S.useRef(0),o=S.useCallback(i=>{const a=n.current+i;t(a),function c(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[t]),s=S.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Cu(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=kb(e,Math.max(s,0));o.length===1&&(i=i.filter(l=>l!==n));const c=i.find(l=>l.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function kb(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ab=Jl,_b=eu,Nb=nu,Ib=ru,jb=ou,Lb=su,$b=lu,Fb=pu,zb=hu,Wb=mu,Bb=vu,Hb=yu;function Vb({...e}){return h.jsx(Ab,{"data-slot":"select",...e})}function Yb({...e}){return h.jsx(Nb,{"data-slot":"select-value",...e})}function Ub({className:e,size:t="default",children:n,...r}){return h.jsxs(_b,{"data-slot":"select-trigger","data-size":t,className:ie("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,h.jsx(Ib,{asChild:!0,children:h.jsx(lc,{className:"size-4 opacity-50"})})]})}function Kb({className:e,children:t,position:n="popper",...r}){return h.jsx(jb,{children:h.jsxs(Lb,{"data-slot":"select-content",className:ie("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[h.jsx(qb,{}),h.jsx($b,{className:ie("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),h.jsx(Xb,{})]})})}function Gb({className:e,children:t,...n}){return h.jsxs(Fb,{"data-slot":"select-item",className:ie("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[h.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:h.jsx(Wb,{children:h.jsx(cc,{className:"size-4"})})}),h.jsx(zb,{children:t})]})}function qb({className:e,...t}){return h.jsx(Bb,{"data-slot":"select-scroll-up-button",className:ie("flex cursor-default items-center justify-center py-1",e),...t,children:h.jsx(Up,{className:"size-4"})})}function Xb({className:e,...t}){return h.jsx(Hb,{"data-slot":"select-scroll-down-button",className:ie("flex cursor-default items-center justify-center py-1",e),...t,children:h.jsx(lc,{className:"size-4"})})}const Zb=15,pa=600,Jb=15,Qn=1.98,$s=({booking:e,onAddTime:t,onAddStartTime:n,onSubTime:r,starter:o=!1})=>{const[s,i]=R.useState({height:pa,width:600}),a=(g,d)=>{const m=te.timeDiffInSeconds(g,d),E=2,v=Math.ceil(m/Zb);return Qn+(v-1)*E},[c,l]=R.useState(o?a(e.finishAt,e.startAt):Qn),f=async(g=["se","s"])=>{if(g.includes("n")){const d=b(e.startAt,"remove");n&&n(d)}else{const d=b(e.finishAt,"add");l(m=>Math.round(m)+Qn),t&&t(d)}},u=async()=>{const g=b(e.finishAt,"remove");te.timeDiffInSeconds(e.finishAt,e.startAt)!==Jb&&(l(m=>m-Qn),r&&r(g))},b=(g,d)=>{const m=new Date(g),E=m.getMinutes();return d==="add"&&m.setMinutes(E+15),d==="remove"&&m.setMinutes(E-15),m};return{state:s,setState:i,resetState:()=>{i({height:pa,width:600})},resetHeightStyle:()=>{l(2)},heightStyle:c,onResize:(g,{size:d,handle:m})=>{switch(g.stopPropagation(),g.preventDefault(),m){case"se":case"s":{i(E=>(Number(E.height)<Number(d.height)&&f(),Number(E.height)>Number(d.height)&&u(),{...E,height:d.height,width:d.width}));break}case"n":{i(E=>(Number(d.height)>Number(E.height)&&f(["n"]),{...E,height:d.height,width:d.width}));break}}},updateHeightStyle:(g,d)=>{l(a(g,d))}}},Qb=({isDragging:e,slotData:t,events:{onClick:n,renderPreviewCard:r,resetPrevView:o}})=>{const s=Go(D=>D.startAt),i=Oe(D=>D.bookingViewType),[a,c]=R.useState(te.addMinutesToHour(t.time,15)),[l,f]=R.useState(!1),u=l?{backgroundColor:"white",border:"none"}:{},b=R.useMemo(()=>({id:"dragging_booking_preview",startAt:te.convertStringTimeToDateFormat(s),finishAt:te.convertStringTimeToDateFormat(a)}),[a,s]),y=()=>{f(!0),r()},C=()=>{n(a),w()},{state:p,resetState:x,resetHeightStyle:g,heightStyle:d,onResize:m,updateHeightStyle:E}=$s({booking:b,onAddTime:D=>{c(te.dateTimeAsString(D))},onSubTime:D=>{c(te.dateTimeAsString(D))}}),v=()=>{w()},T=R.useCallback(()=>{c(te.addMinutesToHour(t.time,15))},[t.time]),w=R.useCallback(()=>{f(!1),x(),T(),g(),o()},[T,g,o,x]);return R.useEffect(()=>{if(!a||!s)return;const D=te.convertStringTimeToDateFormat(a),P=te.convertStringTimeToDateFormat(s);Number.isNaN(D)||Number.isNaN(P)||!(D instanceof Date)||!(P instanceof Date)||E(D,P)},[a,s]),R.useEffect(()=>()=>{w()},[]),h.jsx("div",{style:{...u},className:ie("timeInfo_core",u),children:h.jsx(Xl.Resizable,{className:"slot-resizable",height:p.height,width:p.width,onResizeStart:y,onResizeStop:C,onResize:m,resizeHandles:["se"],draggableOpts:{grid:[35,35]},handleSize:[30,30],maxConstraints:[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],transformScale:1,children:l?h.jsx("div",{className:"timeInfo_core_dragging",children:h.jsx(js,{bookingInit:b,bookingViewType:i,slotData:{day:new Date().toISOString(),hour:"09:00"},heightStyleTransformer:`${d}rem`,resizableParam:{state:p,onResize:m,customClass:"show-handle"},events:{onUnmount:v}})}):h.jsx("div",{className:"timeInfo_core_timeParent",children:!e&&h.jsx("span",{className:"timeInfo_core_timeParent_time",children:t.time})})})})},er=({slotData:e,slotPosition:t,disabledCss:n,events:r,actualTimerIndicatorChildren:o,children:s,ref:i})=>{const{isDragging:a,updateIsDragging:c}=Xt(W=>W),l=qe(),{emptySlotNodes:f,setSelectedNode:u,resetSelectedNode:b}=Ht(),{onModalClose:y,onSlotClick:C}=qe(),{startAt:p,finishAt:x,updateDate:g,updateStartAt:d,updateFinishAtWithOffset:m,resetForm:E}=Go(W=>W),v=Oe(W=>W.bookingViewType),T=R.useMemo(()=>({id:"dragging_booking_preview",startAt:te.convertStringTimeToDateFormat(p),finishAt:te.convertStringTimeToDateFormat(x)}),[x,p]),{updateHeightStyle:w,heightStyle:D}=$s({booking:T}),[P,_]=R.useState(!1),[I,H]=R.useState(!1),[K,j]=R.useState(!1),[F,k]=R.useState(!1),N=R.useRef(null),M=R.useCallback(()=>{if(a||I)return;r.onMouseEnterEvent()===t&&j(!0)},[t,r,a,I]),A=()=>{E(),c(!1),b()},O=W=>{A();const B=cr(e),Z=f==null?void 0:f.get(B);Z&&Z.closeEvent(),y==null||y(),W==null||W.stopPropagation(),W==null||W.preventDefault(),H(!1)},L=W=>{W||O(),_(W),j(W),H(W)},U=R.useCallback(W=>{if(a&&!W)return;c(!1);const{time:B,key:Z}=e,z=cr({key:Z,time:B}),oe=f==null?void 0:f.get(z);u(z),oe&&oe.showEvent(B),g(Z);const Ce=m(W||B,W?0:15);C({slotData:e,finishTime:Ce}),H(!0)},[e,f,a,u,C,g,d,c,m]),Y=()=>{a||I||j(!1)},V=n.length||F?n:"hovering_slotTrigger_core",X=R.useCallback(()=>{const{time:W,key:B}=e;c(!0),k(!0),g(B),d(W),m(W)},[m,e,g,c,d]),G=()=>{H(!0)},$=R.useCallback(()=>{k(!1)},[]),q=()=>{j(!1),H(!0),_(!0)};return R.useEffect(()=>{a?document.body.style.cursor="ns-resize":document.body.style.cursor="default"},[a]),R.useEffect(()=>{if(!x||!p)return;const W=te.convertStringTimeToDateFormat(x),B=te.convertStringTimeToDateFormat(p);Number.isNaN(W)||Number.isNaN(B)||!(W instanceof Date)||!(B instanceof Date)||w(W,B)},[x,p]),R.useEffect(()=>{P&&N!=null&&N.current&&N.current.scrollIntoView({behavior:"smooth",block:"center"})},[P]),R.useEffect(()=>{s||j(!1)},[s]),R.useImperativeHandle(i,()=>({showEvent:W=>{d(W),q()},closeEvent:()=>{H(!1),_(!1),j(!1),$()},onOpenCloseChange:W=>{j(W),_(W),$()}})),h.jsxs(h.Fragment,{children:[h.jsxs("div",{ref:e.ref,style:{borderBottom:t==="fourth"?"1px solid #8080807a":"",...e.style},className:ie("slotTrigger_core",v===ne.DAY&&"slotTrigger_core_day",V),onMouseOver:M,onMouseLeave:Y,onFocus:()=>{},children:[(!s&&K&&!P||F)&&h.jsx(Qb,{isDragging:a,slotData:e,events:{onClick:U,openOptions:G,renderPreviewCard:X,resetPrevView:$}}),o,P&&h.jsx("div",{style:{width:"100%"},children:h.jsx(js,{ref:N,bookingInit:T,bookingViewType:v,slotData:{day:new Date().toISOString(),hour:"09:00"},heightStyleTransformer:`${D}rem`})}),s]},e.key),I&&h.jsx(ns,{children:h.jsx(cb,{onClose:O,onOpenChange:L,buttonTrigger:h.jsx("div",{},e.key),side:v===ne.DAY?"top":"right",children:l.createBookingModal})})]})};var Fs="Popover",[Eu,ex]=gt(Fs,[mt]),jn=mt(),[ew,bt]=Eu(Fs),Du=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=jn(t),c=S.useRef(null),[l,f]=S.useState(!1),[u=!1,b]=Dt({prop:r,defaultProp:o,onChange:s});return h.jsx(_r,{...a,children:h.jsx(ew,{scope:t,contentId:dt(),triggerRef:c,open:u,onOpenChange:b,onOpenToggle:S.useCallback(()=>b(y=>!y),[b]),hasCustomAnchor:l,onCustomAnchorAdd:S.useCallback(()=>f(!0),[]),onCustomAnchorRemove:S.useCallback(()=>f(!1),[]),modal:i,children:n})})};Du.displayName=Fs;var Tu="PopoverAnchor",Ru=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=bt(Tu,n),s=jn(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return S.useEffect(()=>(i(),()=>a()),[i,a]),h.jsx(Pn,{...s,...r,ref:t})});Ru.displayName=Tu;var Mu="PopoverTrigger",Ou=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=bt(Mu,n),s=jn(n),i=le(t,o.triggerRef),a=h.jsx(se.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Nu(o.open),...r,ref:i,onClick:ee(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:h.jsx(Pn,{asChild:!0,...s,children:a})});Ou.displayName=Mu;var zs="PopoverPortal",[tw,nw]=Eu(zs,{forceMount:void 0}),Pu=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=bt(zs,t);return h.jsx(tw,{scope:t,forceMount:n,children:h.jsx(Je,{present:n||s.open,children:h.jsx(kn,{asChild:!0,container:o,children:r})})})};Pu.displayName=zs;var Bt="PopoverContent",ku=S.forwardRef((e,t)=>{const n=nw(Bt,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=bt(Bt,e.__scopePopover);return h.jsx(Je,{present:r||s.open,children:s.modal?h.jsx(ow,{...o,ref:t}):h.jsx(sw,{...o,ref:t})})});ku.displayName=Bt;var rw=St("PopoverContent.RemoveScroll"),ow=S.forwardRef((e,t)=>{const n=bt(Bt,e.__scopePopover),r=S.useRef(null),o=le(t,r),s=S.useRef(!1);return S.useEffect(()=>{const i=r.current;if(i)return Ss(i)},[]),h.jsx(Br,{as:rw,allowPinchZoom:!0,children:h.jsx(Au,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ee(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),s.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:ee(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,l=a.button===2||c;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:ee(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),sw=S.forwardRef((e,t)=>{const n=bt(Bt,e.__scopePopover),r=S.useRef(!1),o=S.useRef(!1);return h.jsx(Au,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var c,l;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((l=n.triggerRef.current)==null?void 0:l.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Au=S.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:f,...u}=e,b=bt(Bt,n),y=jn(n);return xs(),h.jsx(Fr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:h.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>b.onOpenChange(!1),children:h.jsx(Nr,{"data-state":Nu(b.open),role:"dialog",id:b.contentId,...y,...u,ref:t,style:{...u.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),_u="PopoverClose",iw=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=bt(_u,n);return h.jsx(se.button,{type:"button",...r,ref:t,onClick:ee(e.onClick,()=>o.onOpenChange(!1))})});iw.displayName=_u;var aw="PopoverArrow",cw=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=jn(n);return h.jsx(Ir,{...o,...r,ref:t})});cw.displayName=aw;function Nu(e){return e?"open":"closed"}var lw=Du,uw=Ru,dw=Ou,fw=Pu,pw=ku;function hw({...e}){return h.jsx(lw,{"data-slot":"popover",...e})}function gw({...e}){return h.jsx(dw,{"data-slot":"popover-trigger",...e})}function mw({className:e,align:t="center",sideOffset:n=4,...r}){return h.jsx(fw,{children:h.jsx(pw,{"data-slot":"popover-content",align:t,sideOffset:n,className:ie("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...r})})}function vw({...e}){return h.jsx(uw,{"data-slot":"popover-anchor",...e})}var yw="Toggle",Iu=S.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:o,...s}=e,[i=!1,a]=Dt({prop:n,onChange:o,defaultProp:r});return h.jsx(se.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:ee(e.onClick,()=>{e.disabled||a(!i)})})});Iu.displayName=yw;var bw=Iu;const ww=ss("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function xw({className:e,variant:t,size:n,...r}){return h.jsx(bw,{"data-slot":"toggle",className:ie(ww({variant:t,size:n,className:e})),...r})}const Sw=()=>{const[e,t]=R.useState(!1);return h.jsx(ys,{children:h.jsxs(Bc,{children:[h.jsx(Hc,{asChild:!0,children:h.jsx("div",{children:h.jsx(xw,{className:"group size-10 p-0 hover:bg-indigo-50 hover:text-indigo-500 data-[state=on]:bg-indigo-50 data-[state=on]:text-indigo-500","aria-label":"Bookmark this",variant:e?"default":"outline",pressed:e,onPressedChange:t,children:h.jsx(Np,{size:16,strokeWidth:2,"aria-hidden":"true"})})})}),h.jsx(Vc,{className:"border border-input bg-popover px-2 py-1 text-xs text-muted-foreground",children:h.jsx("p",{children:e?"Remove bookmark":"Bookmark this"})})]})})},Cw=({options:e,onChange:t})=>h.jsxs(Vb,{onValueChange:n=>t(n),defaultValue:e[1].text,children:[h.jsx(Ub,{className:"w-[180px]",children:h.jsx(Yb,{placeholder:"view"})}),h.jsx(Kb,{children:e.map(n=>h.jsx(Gb,{value:n.text,children:n.text},n.text))})]}),Ew=[{text:"teste1",onClick:()=>console.log("teste1")},{text:"teste2",onClick:()=>console.log("teste2")}],Dw=5,Tw=0,Rw=({side:e,xAxis:t,yAxis:n,updatePosition:r,children:o})=>{const{attributes:s,listeners:i,setNodeRef:a,transform:c,setActivatorNodeRef:l}=rs({id:"booking-info-id",data:{type:"booking-info-options"}}),f=Xt(b=>b.updateIsDragging),u={transform:`translate3d(${t+((c==null?void 0:c.x)||0)}px, ${n+((c==null?void 0:c.y)||0)}px, 0)`};return Dn({onDragStart(){f(!0)},onDragEnd(b){b.active.id&&r(c)}}),h.jsx(mw,{ref:a,updatePositionStrategy:"optimized",side:e,align:"start",sticky:"always",sideOffset:Dw,alignOffset:Tw,style:{...u,width:"25rem"},children:h.jsxs("div",{className:"grid gap-3",children:[h.jsx("input",{type:"text",style:{position:"absolute",opacity:0,height:0,width:0}}),h.jsxs("div",{className:"flex justify-end gap-1",children:[h.jsx("div",{ref:l,className:"w-full cursor-move",...s,...i}),h.jsx(Sw,{}),h.jsx(Ct,{type:"button",variant:"outline",size:"icon",children:h.jsx(eh,{className:"h-3 w-3"})}),h.jsx(Ct,{type:"button",variant:"outline",size:"icon",onClick:()=>{},children:h.jsx(oh,{className:"h-3 w-3"})}),h.jsx(Cw,{options:Ew,onChange:()=>{}})]}),o]})})},ha={xAxis:0,yAxis:0},ju=({isEditingOpen:e,side:t,booking:n,onOpenChange:r,children:o})=>{const[s,i]=R.useState({...ha}),a=Xt(y=>y.updateIsDragging),c=R.useMemo(()=>`${te.dateAndHourDateToString(n.startAt)} - ${te.dateAndHourDateToString(n.finishAt)}`,[n.startAt,n.finishAt]),l=R.useMemo(()=>{const y=new Date(n.startAt),C=y.getDate(),p=y.getDay(),x=jt[y.getMonth()];return h.jsx("span",{children:`${fd[p]}, ${C} ${x}`})},[n.startAt]),f=()=>({backgroundColor:""}),u=y=>{y||console.info("No transform info to show "),i({xAxis:s.xAxis+((y==null?void 0:y.x)||0),yAxis:s.yAxis+((y==null?void 0:y.y)||0)})};Dn({onDragStart(y){const C=y.active.data.current,p=y.active.id,x=C.type==="booking-info-options";p&&x&&a(!0)}});const b=y=>{y===!1&&i({...ha}),r(y)};return h.jsxs(hw,{open:e,onOpenChange:b,defaultOpen:!1,children:[h.jsx(vw,{style:{width:"100%"},children:h.jsx(gw,{asChild:!0,children:o})}),h.jsx(ns,{children:h.jsx(Rw,{side:t,xAxis:s.xAxis,yAxis:s.yAxis,updatePosition:u,children:h.jsxs("div",{className:"bookingCard_content",children:[h.jsx("span",{style:f(),className:"flex h-4 w-4 translate-y-0 rounded-sm"}),h.jsx("div",{className:"space-y-1",children:h.jsxs("p",{className:"text-sm text-muted-foreground",children:[l," | ",c]})})]})})})]})};ju.displayName="BookingInfoOptions";const Mw=({booking:e,slotData:t,ref:n})=>{const{bookingViewType:r,optimisticCardUpdate:o}=Oe(),[s,i]=R.useState({...e}),[a,c]=R.useState(!1),l=R.useRef("left"),f=()=>{const g=t.day.split(":")[0].trim();if(r===ne.DAY)l.current="top";else switch(g){case"Mon":case"Sun":l.current="right";break;default:l.current="left";break}c(!0)},u=async g=>{try{i(d=>({...d,finishAt:g}))}catch(d){console.log(d)}},b=async g=>{o(s,g,s.finishAt,t),i(d=>({...d,startAt:g}))},y=async g=>{try{i(d=>({...d,finishAt:g}))}catch(d){console.log(d)}},{state:C,heightStyle:p,onResize:x}=$s({booking:s,onAddTime:u,onAddStartTime:b,onSubTime:y,starter:!0});return R.useImperativeHandle(n,()=>({bookingId:e.id}),[e.id]),h.jsx(ju,{booking:s,onOpenChange:c,side:r===ne.DAY?"top":"left",isEditingOpen:a,children:h.jsx(js,{resizableParam:{state:C,onResize:x,resizeHandle:["s"]},customClasses:"Draggable",bookingInit:s,bookingViewType:r,slotData:t,heightStyleTransformer:`${p}rem`,onClick:f})})};var Ow="Separator",ga="horizontal",Pw=["horizontal","vertical"],Lu=S.forwardRef((e,t)=>{const{decorative:n,orientation:r=ga,...o}=e,s=kw(r)?r:ga,a=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return h.jsx(se.div,{"data-orientation":s,...a,...o,ref:t})});Lu.displayName=Ow;function kw(e){return Pw.includes(e)}var Aw=Lu;function ma({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return h.jsx(Aw,{"data-slot":"separator-root",decorative:n,orientation:t,className:ie("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}const _w=ss("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Nw({className:e,variant:t,...n}){return h.jsx("div",{className:ie(_w({variant:t}),e),...n})}const Iw=({dateToRender:e,isFirstDay:t})=>h.jsx("div",{style:{left:t?"19px":"10px"},className:"first_day_slot",children:h.jsx("span",{children:h.jsx(Nw,{children:e})})});class jw{constructor(){wt(this,"positionBasedOnSeconds",t=>{const[,n]=t.split(":");if(!t.length)return-3;const r=Number(n);return this.normalizingMinutes(r)});wt(this,"normalizingMinutes",t=>t>=0&&t<=15?t*2:t>15&&t<30?(t-15)*2:t>=30&&t<=59?t-30:-3);wt(this,"isInitialMinute",t=>t>=0&&t<=8);wt(this,"isSameHour",(t,n)=>n.split(":")[0]===t)}}class Lw{constructor(){wt(this,"is15MinLess",t=>{const n=new Date,[r,o]=t.split(":"),s=new Date(n.getFullYear(),n.getMonth(),n.getDate(),Number(r),Number(o),0),i=new Date(n),a=te.roundMinutes(n.getMinutes());i.setHours(n.getHours(),a,0,0);const c=te.minuteDifference(s,i);return c>30||c<-30});wt(this,"normalizeDateNow",t=>{const n=t.getHours(),r=te.roundMinutes(t.getMinutes());return`${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`})}}const tr=({color:e="#000",isFirstDay:t,slotData:n})=>{const{timesRendered:r,bookingViewType:o}=Oe(),[s,i]=R.useState(""),[a,c]=R.useState(!1),[l,f]=R.useState(!1),u=R.useMemo(()=>{const d=new Date,m=new Date(n.key);return m.getDay()===d.getDay()&&m.getDate()===d.getDate()},[n.key]),b=d=>{i(d)},y=()=>{c(!0)},C=()=>{c(!1)},p=R.useMemo(()=>new jw().positionBasedOnSeconds(s),[n.time,s,r]),x=R.useMemo(()=>t?o===ne.DAY?"101%":"100vw":o===ne.DAY?"102%":"104%",[t,o]),g=R.useMemo(()=>u?{top:`${p-2}px`,left:t?"-18px":"-3px",width:t?"110%":"104%"}:{top:`${p-1}px`,left:t?"-18px":"-9px",width:x},[u,t,x,p]);if(R.useEffect(()=>{const d=n.time,m=new Lw,E=()=>{const T=new Date,w=m.normalizeDateNow(T),D=te.dateAndHourDateToString(T);s!==D&&b(D),f(w===d)};let v;return m.is15MinLess(d)||(v=setInterval(()=>E(),1e3)),()=>clearInterval(v)},[n.time,s]),!!l)return h.jsxs("div",{style:{...g},className:ie("timeIndicator_today",u&&x),onMouseEnter:y,onMouseOut:C,onBlur:()=>{},children:[h.jsx(ma,{style:{height:u?"4px":"2px",backgroundColor:e}}),u&&t&&h.jsx("div",{className:"today_first_day",children:h.jsx(ma,{orientation:"vertical",style:{height:"11px",backgroundColor:e}})}),a&&h.jsx(Iw,{isFirstDay:t,dateToRender:s})]})},va=({bookings:e,first:t,second:n,third:r,fourth:o,disabledCss:s,firstDay:i,dayHour:a})=>{const{setEmptySlotNode:c,emptySlotNodes:l}=Ht(),f=nr({bookings:e,blockTimeString:"00",slotData:a}),u=nr({bookings:e,blockTimeString:"15",slotData:a}),b=nr({bookings:e,blockTimeString:"30",slotData:a}),y=nr({bookings:e,blockTimeString:"45",slotData:a}),C=R.useCallback((p,x)=>{if(!p)return;const g=cr(x);l.get(g)||c(p,x)},[c,l]);return h.jsxs(h.Fragment,{children:[h.jsx(er,{ref:p=>C(p,{key:t.key,time:t.time}),slotData:t,disabledCss:s,events:{onMouseEnterEvent:()=>"first"},slotPosition:"first",actualTimerIndicatorChildren:h.jsx(tr,{isFirstDay:i,slotData:t}),children:f}),h.jsx(er,{ref:p=>C(p,{key:n.key,time:n.time}),slotData:n,disabledCss:s,events:{onMouseEnterEvent:()=>"second"},slotPosition:"second",actualTimerIndicatorChildren:h.jsx(tr,{isFirstDay:i,slotData:n}),children:u}),h.jsx(er,{ref:p=>C(p,{key:r.key,time:r.time}),slotData:r,disabledCss:s,events:{onMouseEnterEvent:()=>"third"},slotPosition:"third",actualTimerIndicatorChildren:h.jsx(tr,{isFirstDay:i,slotData:r}),children:b}),h.jsx(er,{ref:p=>C(p,{key:o.key,time:o.time}),slotData:o,disabledCss:s,events:{onMouseEnterEvent:()=>"fourth"},slotPosition:"fourth",actualTimerIndicatorChildren:h.jsx(tr,{isFirstDay:i,slotData:o}),children:y})]})},nr=({bookings:e,blockTimeString:t,slotData:n})=>{if(e!=null&&e.length&&(n!=null&&n.day)&&(n!=null&&n.hour)){const r=e.find(o=>te.dateAndHourDateToString(new Date(o.startAt)).split(":")[1]===t);if(r)return h.jsx(Mw,{booking:r,slotData:n})}return null},$w=({dayHour:e,lunchTimeBlock:t,firstDay:n,bookingBulk:r,bookingViewType:o})=>{const s=R.useRef(""),i=w=>w===t.startAt||w===t.finishAt?(s.current="slot_disabled",!0):!1,a=te.addMinuteToHour(e.hour,15),c=te.addMinuteToHour(e.hour,30),l=te.addMinuteToHour(e.hour,45),{isOver:f,setNodeRef:u}=zn({id:`${te.newDateKey(e.day,e.hour)}`,data:{accepts:["booking-slots"]},disabled:i(e.hour)}),{isOver:b,setNodeRef:y}=zn({id:`${te.newDateKey(e.day,a)}`,data:{accepts:["booking-slots"]},disabled:i(a)}),{isOver:C,setNodeRef:p}=zn({id:`${te.newDateKey(e.day,c)}`,data:{accepts:["booking-slots"]},disabled:i(c)}),{isOver:x,setNodeRef:g}=zn({id:`${te.newDateKey(e.day,l)}`,data:{accepts:["booking-slots"]},disabled:i(l)}),d=R.useMemo(()=>({ref:u,style:{backgroundColor:f?"#0066ff":""},key:te.newDateKey(e.day,e.hour),time:e.hour}),[e.day,e.hour,f,u]),m=R.useMemo(()=>({ref:y,style:{backgroundColor:b?"#0066ff":""},key:te.newDateKey(e.day,a),time:a}),[e.day,b,a,y]),E=R.useMemo(()=>({ref:p,style:{backgroundColor:C?"#0066ff":""},key:te.newDateKey(e.day,c),time:c}),[e.day,C,p,c]),v=R.useMemo(()=>({ref:g,style:{backgroundColor:x?"#0066ff":""},key:te.newDateKey(e.day,l),time:l}),[e.day,l,x,g]),T=R.useMemo(()=>{const{day:w,hour:D}=e,P=r.filter(_=>{const I=te.dateAndHourDateToString(_.startAt),H=new Date(_.startAt).getDate(),K=new Date(w).getDate(),j=D.split(":")[0];return I.split(":")[0]===j&&H===K});return P.length?h.jsx(va,{dayHour:e,bookings:P,first:d,second:m,third:E,fourth:v,disabledCss:s.current,firstDay:n}):h.jsx(va,{first:d,second:m,third:E,fourth:v,disabledCss:s.current,firstDay:n})},[r,e,n,d,v,m,E]);return h.jsx("td",{className:ie("slot",o===ne.WEEK&&"slotWeek"),children:T},`${e.day}-${e.hour}-slot`)};function Fw({className:e,...t}){return h.jsx("div",{"data-slot":"table-container",className:"relative w-full z-10 overflow-hidden",children:h.jsx("table",{"data-slot":"table",className:ie("w-full caption-bottom text-sm",e),...t})})}function zw({className:e,...t}){return h.jsx("td",{"data-slot":"table-cell",className:ie("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}const Ww=({hour:e,ref:t})=>{const n="Set lunch interval",r="Remove lunch interval",o="Hour options",s=R.useRef(null),i="border-solid hover:border-b-2 hover:border-b-purple-600 border-b-white",a=()=>{s!=null&&s.current&&s.current.setAttribute("class",ie("activateVisibilityTime",i))};return R.useImperativeHandle(t,()=>({setActivateHour:a})),h.jsxs(ks,{children:[h.jsx(As,{children:h.jsx("span",{ref:s,className:ie(i),children:e})}),h.jsxs(_s,{children:[h.jsx(Ay,{children:o}),h.jsx(_y,{}),h.jsx(Fi,{children:n}),h.jsx(Fi,{children:r})]})]})},Bw=()=>{const{hours:e,daysOfWeek:t,bookingViewType:n,bookingBulkData:r,addTimesRendered:o}=Oe(),{selectedNode:s,emptySlotNodes:i}=Ht(),{finishAt:a,updateFinishAtWithOffset:c}=Go(p=>p),[l]=R.useState({startAt:"12:00",finishAt:"12:30"}),f=R.useCallback((p,x)=>{p&&o(p,x)},[o]),u=R.useMemo(()=>n===ne.DAY?{maxWidth:"5rem",padding:0,minWidth:"4rem"}:{},[n]),b=R.useMemo(()=>({borderLeft:"none",backgroundColor:"white"}),[]),y=()=>s.split(";")[1];return R.useEffect(()=>{if(s){const p=i.get(s);p==null||p.showEvent(y())}},[s,i]),R.useEffect(()=>{y()===a&&c(y())},[s,a]),R.useMemo(()=>{const p=x=>x===0;return h.jsx("div",{className:ie("calendarCore",n===ne.WEEK&&"calendarCore_max"),children:h.jsx(Fw,{children:h.jsx("tbody",{children:e.map(x=>h.jsxs("tr",{children:[h.jsx(zw,{style:{...b,...u,padding:0,position:"relative"},className:"calendarCore_cell",children:h.jsx("div",{className:"calendarCore_actions",children:h.jsx(Ww,{ref:g=>f(g,x),hour:x})})},`${x}-hour`),t.map((g,d)=>h.jsx($w,{dayHour:{day:String(g),hour:x},lunchTimeBlock:l,firstDay:p(d),bookingBulk:r.booking,bookingViewType:n},`${g}-${x}-slot-content`))]},`${x}-content`))})})})},[u,e,l,b,r,f,n,t])},Hw=({bookingViewType:e})=>{const{resetSelectedNode:t,resetNodes:n}=Ht(o=>o);return R.useEffect(()=>{(e===ne.DAY||e===ne.WEEK)&&(t(),n())},[e,n,t]),R.useMemo(()=>{switch(e){case ne.DAY:case ne.WEEK:return h.jsx(Bw,{});default:return null}},[e])},Vw={id:"user-123",profile:{id:"profile-123",name:"Diego",email:"jane.smith@example.com"},createdAt:new Date,updatedAt:new Date},Yw=()=>{const{bookings:e}=qe(),t={distance:5},{setBookingBulkData:n,optimisticCardUpdate:r}=Oe(),{onCardDropCallback:o}=qe(),s=Id(Qs(Ba,{activationConstraint:t}),Qs(Ha,{activationConstraint:t})),{bookingViewType:i,daysOfWeek:a}=Oe(),c=R.useCallback(C=>{const{active:p}=C;p.id},[]),l=(C,p)=>{const x=Number(new Date(p))-Number(new Date(C)),g=Math.floor(x/1e3/60),d=Math.floor(g/60),m=g%60;return`${d}:${m.toString().padStart(2,"0")}`},f=(C,p)=>{const x=new Date(C),g=p.split(":"),d=Number(g[0]),m=Number(g[1]);return x.setHours(x.getHours()+d),x.setMinutes(x.getMinutes()+m),x},u=(C,p)=>{const x=new Date(p),g=l(C.startAt,C.finishAt),d=f(p,g);return{id:C.id,startAt:x,finishAt:d}},b=async(C,p,x)=>{try{const{startAt:g,finishAt:d}=u(C,p);r(C,g,d,x),await o(C,p,x,{id:C.id,startAt:g,finishAt:d})}catch(g){console.warn(g)}},y=C=>{const{over:p,active:x}=C;if(p&&x){const g=p.data.current,d=x.data.current;d&&g&&g.accepts.includes(d.type)&&d.booking.id&&p.id&&b(d.booking,String(p.id),d.slotData)}};return R.useEffect(()=>{n({user:Vw,booking:e})},[e,n]),h.jsx("div",{className:"calendarHolder",children:h.jsx(ed,{...Sa,children:h.jsxs("div",{className:"calendarHolder_parent",children:[h.jsx($y,{}),h.jsxs("div",{className:"calendarHolder_parent_content",children:[h.jsx(Op,{daysOfWeek:a,bookingViewType:i}),h.jsx(ns,{onDragEnd:y,onDragStart:c,sensors:s,children:h.jsx(Hw,{bookingViewType:i})})]})]})})})},Uw=({viewModes:e,createBookingModal:t,onChangeViewType:n,onCardDropCallback:r,onDayChange:o,onHeaderDayClick:s,onTodayClick:i,onSlotClick:a,onModalClose:c,bookings:l,ref:f})=>{const u=R.useRef(null),{setBookingViewType:b,setWeekAndViewType:y,setTodayDayAndViewType:C,bookingViewType:p}=Oe(),{setSelectedNode:x}=Ht(d=>d),g=d=>{var m;(m=u==null?void 0:u.current)==null||m.updateFinishAt(d)};return R.useImperativeHandle(f,()=>({updateViewType:d=>b(d),updateWeekAndViewType:d=>y(d),updateTodayDayAndViewType:d=>C(d),updateSelectedNode:d=>x(d),updateFinishAt:d=>g(d)})),R.useEffect(()=>{n(p)},[p]),h.jsx(Zu,{...ba,children:h.jsx(Ju,{createBookingModal:t,viewModes:e,onHeaderDayClick:s,onTodayClick:i,onCardDropCallback:r,onDayChange:o,onSlotClick:a,onModalClose:c,bookings:l,children:h.jsx(hd,{ref:u,...Eo,children:h.jsx(Yw,{})})})})},Kw=e=>{const t=R.useRef(null);return{getCalendar:()=>h.jsx(Uw,{ref:t,...e}),updateViewType:c=>{if(!(t!=null&&t.current))throw new nn;t.current.updateViewType(c)},updateWeekAndViewType:c=>{if(!(t!=null&&t.current))throw new nn;return t.current.updateWeekAndViewType(c)},updateTodayDayAndViewType:c=>{if(!(t!=null&&t.current))throw new nn;return t.current.updateTodayDayAndViewType(c)},updateSelectedNode:c=>{if(!(t!=null&&t.current))throw new nn;return t.current.updateSelectedNode(c)},updateFinishAt:c=>{if(!(t!=null&&t.current))throw new nn;return t.current.updateFinishAt(c)}}};exports.useCalendarInstance=Kw;
167
+ */var So,na;function wb(){if(na)return So;na=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(i).map(function(d){return i[d]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(d){l[d]=d}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return So=o()?Object.assign:function(s,i){for(var a,c=r(s),l,d=1;d<arguments.length;d++){a=Object(arguments[d]);for(var u in a)t.call(a,u)&&(c[u]=a[u]);if(e){l=e(a);for(var v=0;v<l.length;v++)n.call(a,l[v])&&(c[l[v]]=a[l[v]])}}return c},So}var Co,ra;function Hs(){if(ra)return Co;ra=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Co=e,Co}var Eo,oa;function iu(){return oa||(oa=1,Eo=Function.call.bind(Object.prototype.hasOwnProperty)),Eo}var Do,sa;function xb(){if(sa)return Do;sa=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Hs(),n={},r=iu();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,c,l){if(process.env.NODE_ENV!=="production"){for(var d in s)if(r(s,d)){var u;try{if(typeof s[d]!="function"){var v=Error((c||"React class")+": "+a+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw v.name="Invariant Violation",v}u=s[d](i,d,c,a,null,t)}catch(C){u=C}if(u&&!(u instanceof Error)&&e((c||"React class")+": type specification of "+a+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in n)){n[u.message]=!0;var h=l?l():"";e("Failed "+a+" type: "+u.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Do=o,Do}var To,ia;function Sb(){if(ia)return To;ia=1;var e=su(),t=wb(),n=Hs(),r=iu(),o=xb(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var c="Warning: "+a;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return To=function(a,c){var l=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function u(P){var F=P&&(l&&P[l]||P[d]);if(typeof F=="function")return F}var v="<<anonymous>>",h={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:f(),arrayOf:w,element:D(),elementType:m(),instanceOf:T,node:N(),objectOf:E,oneOf:b,oneOfType:M,shape:W,exact:Y};function C(P,F){return P===F?P!==0||1/P===1/F:P!==P&&F!==F}function g(P,F){this.message=P,this.data=F&&typeof F=="object"?F:{},this.stack=""}g.prototype=Error.prototype;function x(P){if(process.env.NODE_ENV!=="production")var F={},U=0;function V(X,K,z,G,q,B,te){if(G=G||v,B=B||z,te!==n){if(c){var _=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw _.name="Invariant Violation",_}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ne=G+":"+z;!F[ne]&&U<3&&(s("You are manually calling a React.PropTypes validation function for the `"+B+"` prop on `"+G+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),F[ne]=!0,U++)}}return K[z]==null?X?K[z]===null?new g("The "+q+" `"+B+"` is marked as required "+("in `"+G+"`, but its value is `null`.")):new g("The "+q+" `"+B+"` is marked as required in "+("`"+G+"`, but its value is `undefined`.")):null:P(K,z,G,q,B)}var H=V.bind(null,!1);return H.isRequired=V.bind(null,!0),H}function y(P){function F(U,V,H,X,K,z){var G=U[V],q=k(G);if(q!==P){var B=I(G);return new g("Invalid "+X+" `"+K+"` of type "+("`"+B+"` supplied to `"+H+"`, expected ")+("`"+P+"`."),{expectedType:P})}return null}return x(F)}function f(){return x(i)}function w(P){function F(U,V,H,X,K){if(typeof P!="function")return new g("Property `"+K+"` of component `"+H+"` has invalid PropType notation inside arrayOf.");var z=U[V];if(!Array.isArray(z)){var G=k(z);return new g("Invalid "+X+" `"+K+"` of type "+("`"+G+"` supplied to `"+H+"`, expected an array."))}for(var q=0;q<z.length;q++){var B=P(z,q,H,X,K+"["+q+"]",n);if(B instanceof Error)return B}return null}return x(F)}function D(){function P(F,U,V,H,X){var K=F[U];if(!a(K)){var z=k(K);return new g("Invalid "+H+" `"+X+"` of type "+("`"+z+"` supplied to `"+V+"`, expected a single ReactElement."))}return null}return x(P)}function m(){function P(F,U,V,H,X){var K=F[U];if(!e.isValidElementType(K)){var z=k(K);return new g("Invalid "+H+" `"+X+"` of type "+("`"+z+"` supplied to `"+V+"`, expected a single ReactElement type."))}return null}return x(P)}function T(P){function F(U,V,H,X,K){if(!(U[V]instanceof P)){var z=P.name||v,G=j(U[V]);return new g("Invalid "+X+" `"+K+"` of type "+("`"+G+"` supplied to `"+H+"`, expected ")+("instance of `"+z+"`."))}return null}return x(F)}function b(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function F(U,V,H,X,K){for(var z=U[V],G=0;G<P.length;G++)if(C(z,P[G]))return null;var q=JSON.stringify(P,function(te,_){var ne=I(_);return ne==="symbol"?String(_):_});return new g("Invalid "+X+" `"+K+"` of value `"+String(z)+"` "+("supplied to `"+H+"`, expected one of "+q+"."))}return x(F)}function E(P){function F(U,V,H,X,K){if(typeof P!="function")return new g("Property `"+K+"` of component `"+H+"` has invalid PropType notation inside objectOf.");var z=U[V],G=k(z);if(G!=="object")return new g("Invalid "+X+" `"+K+"` of type "+("`"+G+"` supplied to `"+H+"`, expected an object."));for(var q in z)if(r(z,q)){var B=P(z,q,H,X,K+"."+q,n);if(B instanceof Error)return B}return null}return x(F)}function M(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var F=0;F<P.length;F++){var U=P[F];if(typeof U!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+O(U)+" at index "+F+"."),i}function V(H,X,K,z,G){for(var q=[],B=0;B<P.length;B++){var te=P[B],_=te(H,X,K,z,G,n);if(_==null)return null;_.data&&r(_.data,"expectedType")&&q.push(_.data.expectedType)}var ne=q.length>0?", expected one of type ["+q.join(", ")+"]":"";return new g("Invalid "+z+" `"+G+"` supplied to "+("`"+K+"`"+ne+"."))}return x(V)}function N(){function P(F,U,V,H,X){return L(F[U])?null:new g("Invalid "+H+" `"+X+"` supplied to "+("`"+V+"`, expected a ReactNode."))}return x(P)}function A(P,F,U,V,H){return new g((P||"React class")+": "+F+" type `"+U+"."+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+H+"`.")}function W(P){function F(U,V,H,X,K){var z=U[V],G=k(z);if(G!=="object")return new g("Invalid "+X+" `"+K+"` of type `"+G+"` "+("supplied to `"+H+"`, expected `object`."));for(var q in P){var B=P[q];if(typeof B!="function")return A(H,X,K,q,I(B));var te=B(z,q,H,X,K+"."+q,n);if(te)return te}return null}return x(F)}function Y(P){function F(U,V,H,X,K){var z=U[V],G=k(z);if(G!=="object")return new g("Invalid "+X+" `"+K+"` of type `"+G+"` "+("supplied to `"+H+"`, expected `object`."));var q=t({},U[V],P);for(var B in q){var te=P[B];if(r(P,B)&&typeof te!="function")return A(H,X,K,B,I(te));if(!te)return new g("Invalid "+X+" `"+K+"` key `"+B+"` supplied to `"+H+"`.\nBad object: "+JSON.stringify(U[V],null," ")+`
168
+ Valid keys: `+JSON.stringify(Object.keys(P),null," "));var _=te(z,B,H,X,K+"."+B,n);if(_)return _}return null}return x(F)}function L(P){switch(typeof P){case"number":case"string":case"undefined":return!0;case"boolean":return!P;case"object":if(Array.isArray(P))return P.every(L);if(P===null||a(P))return!0;var F=u(P);if(F){var U=F.call(P),V;if(F!==P.entries){for(;!(V=U.next()).done;)if(!L(V.value))return!1}else for(;!(V=U.next()).done;){var H=V.value;if(H&&!L(H[1]))return!1}}else return!1;return!0;default:return!1}}function $(P,F){return P==="symbol"?!0:F?F["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&F instanceof Symbol:!1}function k(P){var F=typeof P;return Array.isArray(P)?"array":P instanceof RegExp?"object":$(F,P)?"symbol":F}function I(P){if(typeof P>"u"||P===null)return""+P;var F=k(P);if(F==="object"){if(P instanceof Date)return"date";if(P instanceof RegExp)return"regexp"}return F}function O(P){var F=I(P);switch(F){case"array":case"object":return"an "+F;case"boolean":case"date":case"regexp":return"a "+F;default:return F}}function j(P){return!P.constructor||!P.constructor.name?v:P.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},To}var Ro,aa;function Cb(){if(aa)return Ro;aa=1;var e=Hs();function t(){}function n(){}return n.resetWarningCache=t,Ro=function(){function r(i,a,c,l,d,u){if(u!==e){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},Ro}var ca;function Xr(){if(ca)return Jn.exports;if(ca=1,process.env.NODE_ENV!=="production"){var e=su(),t=!0;Jn.exports=Sb()(e.isElement,t)}else Jn.exports=Cb()();return Jn.exports}function au(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=au(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function la(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=au(e))&&(r&&(r+=" "),r+=t);return r}const Eb=Object.freeze(Object.defineProperty({__proto__:null,clsx:la,default:la},Symbol.toStringTag,{value:"Module"})),Db=wd(Eb);var pe={},ct={},ua;function Zr(){if(ua)return ct;ua=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.dontSetMe=o,ct.findInArray=e,ct.int=r,ct.isFunction=t,ct.isNum=n;function e(s,i){for(let a=0,c=s.length;a<c;a++)if(i.apply(i,[s[a],a,s]))return s[a]}function t(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Function]"}function n(s){return typeof s=="number"&&!isNaN(s)}function r(s){return parseInt(s,10)}function o(s,i,a){if(s[i])return new Error("Invalid prop ".concat(i," passed to ").concat(a," - do not set this, set it on the child."))}return ct}var lt={},da;function Tb(){if(da)return lt;da=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.browserPrefixToKey=n,lt.browserPrefixToStyle=r,lt.default=void 0,lt.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){var s;let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const a=(s=window.document)===null||s===void 0||(s=s.documentElement)===null||s===void 0?void 0:s.style;if(!a||i in a)return"";for(let c=0;c<e.length;c++)if(n(i,e[c])in a)return e[c];return""}function n(s,i){return i?"".concat(i).concat(o(s)):s}function r(s,i){return i?"-".concat(i.toLowerCase(),"-").concat(s):s}function o(s){let i="",a=!0;for(let c=0;c<s.length;c++)a?(i+=s[c].toUpperCase(),a=!1):s[c]==="-"?a=!0:i+=s[c];return i}return lt.default=t(),lt}var fa;function Vs(){if(fa)return pe;fa=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.addClassName=m,pe.addEvent=a,pe.addUserSelectStyles=w,pe.createCSSTransform=C,pe.createSVGTransform=g,pe.getTouch=y,pe.getTouchIdentifier=f,pe.getTranslation=x,pe.innerHeight=u,pe.innerWidth=v,pe.matchesSelector=s,pe.matchesSelectorAndParentsTo=i,pe.offsetXYFromParent=h,pe.outerHeight=l,pe.outerWidth=d,pe.removeClassName=T,pe.removeEvent=c,pe.removeUserSelectStyles=D;var e=Zr(),t=r(Tb());function n(b){if(typeof WeakMap!="function")return null;var E=new WeakMap,M=new WeakMap;return(n=function(N){return N?M:E})(b)}function r(b,E){if(b&&b.__esModule)return b;if(b===null||typeof b!="object"&&typeof b!="function")return{default:b};var M=n(E);if(M&&M.has(b))return M.get(b);var N={},A=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var W in b)if(W!=="default"&&Object.prototype.hasOwnProperty.call(b,W)){var Y=A?Object.getOwnPropertyDescriptor(b,W):null;Y&&(Y.get||Y.set)?Object.defineProperty(N,W,Y):N[W]=b[W]}return N.default=b,M&&M.set(b,N),N}let o="";function s(b,E){return o||(o=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(M){return(0,e.isFunction)(b[M])})),(0,e.isFunction)(b[o])?b[o](E):!1}function i(b,E,M){let N=b;do{if(s(N,E))return!0;if(N===M)return!1;N=N.parentNode}while(N);return!1}function a(b,E,M,N){if(!b)return;const A={capture:!0,...N};b.addEventListener?b.addEventListener(E,M,A):b.attachEvent?b.attachEvent("on"+E,M):b["on"+E]=M}function c(b,E,M,N){if(!b)return;const A={capture:!0,...N};b.removeEventListener?b.removeEventListener(E,M,A):b.detachEvent?b.detachEvent("on"+E,M):b["on"+E]=null}function l(b){let E=b.clientHeight;const M=b.ownerDocument.defaultView.getComputedStyle(b);return E+=(0,e.int)(M.borderTopWidth),E+=(0,e.int)(M.borderBottomWidth),E}function d(b){let E=b.clientWidth;const M=b.ownerDocument.defaultView.getComputedStyle(b);return E+=(0,e.int)(M.borderLeftWidth),E+=(0,e.int)(M.borderRightWidth),E}function u(b){let E=b.clientHeight;const M=b.ownerDocument.defaultView.getComputedStyle(b);return E-=(0,e.int)(M.paddingTop),E-=(0,e.int)(M.paddingBottom),E}function v(b){let E=b.clientWidth;const M=b.ownerDocument.defaultView.getComputedStyle(b);return E-=(0,e.int)(M.paddingLeft),E-=(0,e.int)(M.paddingRight),E}function h(b,E,M){const A=E===E.ownerDocument.body?{left:0,top:0}:E.getBoundingClientRect(),W=(b.clientX+E.scrollLeft-A.left)/M,Y=(b.clientY+E.scrollTop-A.top)/M;return{x:W,y:Y}}function C(b,E){const M=x(b,E,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:M}}function g(b,E){return x(b,E,"")}function x(b,E,M){let{x:N,y:A}=b,W="translate(".concat(N).concat(M,",").concat(A).concat(M,")");if(E){const Y="".concat(typeof E.x=="string"?E.x:E.x+M),L="".concat(typeof E.y=="string"?E.y:E.y+M);W="translate(".concat(Y,", ").concat(L,")")+W}return W}function y(b,E){return b.targetTouches&&(0,e.findInArray)(b.targetTouches,M=>E===M.identifier)||b.changedTouches&&(0,e.findInArray)(b.changedTouches,M=>E===M.identifier)}function f(b){if(b.targetTouches&&b.targetTouches[0])return b.targetTouches[0].identifier;if(b.changedTouches&&b.changedTouches[0])return b.changedTouches[0].identifier}function w(b){if(!b)return;let E=b.getElementById("react-draggable-style-el");E||(E=b.createElement("style"),E.type="text/css",E.id="react-draggable-style-el",E.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
169
+ `,E.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
170
+ `,b.getElementsByTagName("head")[0].appendChild(E)),b.body&&m(b.body,"react-draggable-transparent-selection")}function D(b){if(b)try{if(b.body&&T(b.body,"react-draggable-transparent-selection"),b.selection)b.selection.empty();else{const E=(b.defaultView||window).getSelection();E&&E.type!=="Caret"&&E.removeAllRanges()}}catch{}}function m(b,E){b.classList?b.classList.add(E):b.className.match(new RegExp("(?:^|\\s)".concat(E,"(?!\\S)")))||(b.className+=" ".concat(E))}function T(b,E){b.classList?b.classList.remove(E):b.className=b.className.replace(new RegExp("(?:^|\\s)".concat(E,"(?!\\S)"),"g"),"")}return pe}var He={},pa;function cu(){if(pa)return He;pa=1,Object.defineProperty(He,"__esModule",{value:!0}),He.canDragX=o,He.canDragY=s,He.createCoreData=a,He.createDraggableData=c,He.getBoundPosition=n,He.getControlPosition=i,He.snapToGrid=r;var e=Zr(),t=Vs();function n(u,v,h){if(!u.props.bounds)return[v,h];let{bounds:C}=u.props;C=typeof C=="string"?C:l(C);const g=d(u);if(typeof C=="string"){const{ownerDocument:x}=g,y=x.defaultView;let f;if(C==="parent"?f=g.parentNode:f=x.querySelector(C),!(f instanceof y.HTMLElement))throw new Error('Bounds selector "'+C+'" could not find an element.');const w=f,D=y.getComputedStyle(g),m=y.getComputedStyle(w);C={left:-g.offsetLeft+(0,e.int)(m.paddingLeft)+(0,e.int)(D.marginLeft),top:-g.offsetTop+(0,e.int)(m.paddingTop)+(0,e.int)(D.marginTop),right:(0,t.innerWidth)(w)-(0,t.outerWidth)(g)-g.offsetLeft+(0,e.int)(m.paddingRight)-(0,e.int)(D.marginRight),bottom:(0,t.innerHeight)(w)-(0,t.outerHeight)(g)-g.offsetTop+(0,e.int)(m.paddingBottom)-(0,e.int)(D.marginBottom)}}return(0,e.isNum)(C.right)&&(v=Math.min(v,C.right)),(0,e.isNum)(C.bottom)&&(h=Math.min(h,C.bottom)),(0,e.isNum)(C.left)&&(v=Math.max(v,C.left)),(0,e.isNum)(C.top)&&(h=Math.max(h,C.top)),[v,h]}function r(u,v,h){const C=Math.round(v/u[0])*u[0],g=Math.round(h/u[1])*u[1];return[C,g]}function o(u){return u.props.axis==="both"||u.props.axis==="x"}function s(u){return u.props.axis==="both"||u.props.axis==="y"}function i(u,v,h){const C=typeof v=="number"?(0,t.getTouch)(u,v):null;if(typeof v=="number"&&!C)return null;const g=d(h),x=h.props.offsetParent||g.offsetParent||g.ownerDocument.body;return(0,t.offsetXYFromParent)(C||u,x,h.props.scale)}function a(u,v,h){const C=!(0,e.isNum)(u.lastX),g=d(u);return C?{node:g,deltaX:0,deltaY:0,lastX:v,lastY:h,x:v,y:h}:{node:g,deltaX:v-u.lastX,deltaY:h-u.lastY,lastX:u.lastX,lastY:u.lastY,x:v,y:h}}function c(u,v){const h=u.props.scale;return{node:v.node,x:u.state.x+v.deltaX/h,y:u.state.y+v.deltaY/h,deltaX:v.deltaX/h,deltaY:v.deltaY/h,lastX:u.state.x,lastY:u.state.y}}function l(u){return{left:u.left,top:u.top,right:u.right,bottom:u.bottom}}function d(u){const v=u.findDOMNode();if(!v)throw new Error("<DraggableCore>: Unmounted during event!");return v}return He}var dn={},er={},ha;function lu(){if(ha)return er;ha=1,Object.defineProperty(er,"__esModule",{value:!0}),er.default=e;function e(){}return er}var ga;function Rb(){if(ga)return dn;ga=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.default=void 0;var e=l(R),t=a(Xr()),n=a(Ze),r=Vs(),o=cu(),s=Zr(),i=a(lu());function a(x){return x&&x.__esModule?x:{default:x}}function c(x){if(typeof WeakMap!="function")return null;var y=new WeakMap,f=new WeakMap;return(c=function(w){return w?f:y})(x)}function l(x,y){if(x&&x.__esModule)return x;if(x===null||typeof x!="object"&&typeof x!="function")return{default:x};var f=c(y);if(f&&f.has(x))return f.get(x);var w={},D=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in x)if(m!=="default"&&Object.prototype.hasOwnProperty.call(x,m)){var T=D?Object.getOwnPropertyDescriptor(x,m):null;T&&(T.get||T.set)?Object.defineProperty(w,m,T):w[m]=x[m]}return w.default=x,f&&f.set(x,w),w}function d(x,y,f){return y=u(y),y in x?Object.defineProperty(x,y,{value:f,enumerable:!0,configurable:!0,writable:!0}):x[y]=f,x}function u(x){var y=v(x,"string");return typeof y=="symbol"?y:String(y)}function v(x,y){if(typeof x!="object"||x===null)return x;var f=x[Symbol.toPrimitive];if(f!==void 0){var w=f.call(x,y);if(typeof w!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(x)}const h={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let C=h.mouse,g=class extends e.Component{constructor(){super(...arguments),d(this,"dragging",!1),d(this,"lastX",NaN),d(this,"lastY",NaN),d(this,"touchIdentifier",null),d(this,"mounted",!1),d(this,"handleDragStart",y=>{if(this.props.onMouseDown(y),!this.props.allowAnyClick&&typeof y.button=="number"&&y.button!==0)return!1;const f=this.findDOMNode();if(!f||!f.ownerDocument||!f.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:w}=f;if(this.props.disabled||!(y.target instanceof w.defaultView.Node)||this.props.handle&&!(0,r.matchesSelectorAndParentsTo)(y.target,this.props.handle,f)||this.props.cancel&&(0,r.matchesSelectorAndParentsTo)(y.target,this.props.cancel,f))return;y.type==="touchstart"&&y.preventDefault();const D=(0,r.getTouchIdentifier)(y);this.touchIdentifier=D;const m=(0,o.getControlPosition)(y,D,this);if(m==null)return;const{x:T,y:b}=m,E=(0,o.createCoreData)(this,T,b);(0,i.default)("DraggableCore: handleDragStart: %j",E),(0,i.default)("calling",this.props.onStart),!(this.props.onStart(y,E)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,r.addUserSelectStyles)(w),this.dragging=!0,this.lastX=T,this.lastY=b,(0,r.addEvent)(w,C.move,this.handleDrag),(0,r.addEvent)(w,C.stop,this.handleDragStop))}),d(this,"handleDrag",y=>{const f=(0,o.getControlPosition)(y,this.touchIdentifier,this);if(f==null)return;let{x:w,y:D}=f;if(Array.isArray(this.props.grid)){let b=w-this.lastX,E=D-this.lastY;if([b,E]=(0,o.snapToGrid)(this.props.grid,b,E),!b&&!E)return;w=this.lastX+b,D=this.lastY+E}const m=(0,o.createCoreData)(this,w,D);if((0,i.default)("DraggableCore: handleDrag: %j",m),this.props.onDrag(y,m)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const E=document.createEvent("MouseEvents");E.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(E)}return}this.lastX=w,this.lastY=D}),d(this,"handleDragStop",y=>{if(!this.dragging)return;const f=(0,o.getControlPosition)(y,this.touchIdentifier,this);if(f==null)return;let{x:w,y:D}=f;if(Array.isArray(this.props.grid)){let E=w-this.lastX||0,M=D-this.lastY||0;[E,M]=(0,o.snapToGrid)(this.props.grid,E,M),w=this.lastX+E,D=this.lastY+M}const m=(0,o.createCoreData)(this,w,D);if(this.props.onStop(y,m)===!1||this.mounted===!1)return!1;const b=this.findDOMNode();b&&this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(b.ownerDocument),(0,i.default)("DraggableCore: handleDragStop: %j",m),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,b&&((0,i.default)("DraggableCore: Removing handlers"),(0,r.removeEvent)(b.ownerDocument,C.move,this.handleDrag),(0,r.removeEvent)(b.ownerDocument,C.stop,this.handleDragStop))}),d(this,"onMouseDown",y=>(C=h.mouse,this.handleDragStart(y))),d(this,"onMouseUp",y=>(C=h.mouse,this.handleDragStop(y))),d(this,"onTouchStart",y=>(C=h.touch,this.handleDragStart(y))),d(this,"onTouchEnd",y=>(C=h.touch,this.handleDragStop(y)))}componentDidMount(){this.mounted=!0;const y=this.findDOMNode();y&&(0,r.addEvent)(y,h.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const y=this.findDOMNode();if(y){const{ownerDocument:f}=y;(0,r.removeEvent)(f,h.mouse.move,this.handleDrag),(0,r.removeEvent)(f,h.touch.move,this.handleDrag),(0,r.removeEvent)(f,h.mouse.stop,this.handleDragStop),(0,r.removeEvent)(f,h.touch.stop,this.handleDragStop),(0,r.removeEvent)(y,h.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(f)}}findDOMNode(){var y,f;return(y=this.props)!==null&&y!==void 0&&y.nodeRef?(f=this.props)===null||f===void 0||(f=f.nodeRef)===null||f===void 0?void 0:f.current:n.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return dn.default=g,d(g,"displayName","DraggableCore"),d(g,"propTypes",{allowAnyClick:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(x,y){if(x[y]&&x[y].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),d(g,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),dn}var ma;function Mb(){return ma||(ma=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),e.default=void 0;var t=v(R),n=d(Xr()),r=d(Ze),o=d(Db),s=Vs(),i=cu(),a=Zr(),c=d(Rb()),l=d(lu());function d(f){return f&&f.__esModule?f:{default:f}}function u(f){if(typeof WeakMap!="function")return null;var w=new WeakMap,D=new WeakMap;return(u=function(m){return m?D:w})(f)}function v(f,w){if(f&&f.__esModule)return f;if(f===null||typeof f!="object"&&typeof f!="function")return{default:f};var D=u(w);if(D&&D.has(f))return D.get(f);var m={},T=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var b in f)if(b!=="default"&&Object.prototype.hasOwnProperty.call(f,b)){var E=T?Object.getOwnPropertyDescriptor(f,b):null;E&&(E.get||E.set)?Object.defineProperty(m,b,E):m[b]=f[b]}return m.default=f,D&&D.set(f,m),m}function h(){return h=Object.assign?Object.assign.bind():function(f){for(var w=1;w<arguments.length;w++){var D=arguments[w];for(var m in D)Object.prototype.hasOwnProperty.call(D,m)&&(f[m]=D[m])}return f},h.apply(this,arguments)}function C(f,w,D){return w=g(w),w in f?Object.defineProperty(f,w,{value:D,enumerable:!0,configurable:!0,writable:!0}):f[w]=D,f}function g(f){var w=x(f,"string");return typeof w=="symbol"?w:String(w)}function x(f,w){if(typeof f!="object"||f===null)return f;var D=f[Symbol.toPrimitive];if(D!==void 0){var m=D.call(f,w);if(typeof m!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(f)}class y extends t.Component{static getDerivedStateFromProps(w,D){let{position:m}=w,{prevPropsPosition:T}=D;return m&&(!T||m.x!==T.x||m.y!==T.y)?((0,l.default)("Draggable: getDerivedStateFromProps %j",{position:m,prevPropsPosition:T}),{x:m.x,y:m.y,prevPropsPosition:{...m}}):null}constructor(w){super(w),C(this,"onDragStart",(D,m)=>{if((0,l.default)("Draggable: onDragStart: %j",m),this.props.onStart(D,(0,i.createDraggableData)(this,m))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),C(this,"onDrag",(D,m)=>{if(!this.state.dragging)return!1;(0,l.default)("Draggable: onDrag: %j",m);const T=(0,i.createDraggableData)(this,m),b={x:T.x,y:T.y,slackX:0,slackY:0};if(this.props.bounds){const{x:M,y:N}=b;b.x+=this.state.slackX,b.y+=this.state.slackY;const[A,W]=(0,i.getBoundPosition)(this,b.x,b.y);b.x=A,b.y=W,b.slackX=this.state.slackX+(M-b.x),b.slackY=this.state.slackY+(N-b.y),T.x=b.x,T.y=b.y,T.deltaX=b.x-this.state.x,T.deltaY=b.y-this.state.y}if(this.props.onDrag(D,T)===!1)return!1;this.setState(b)}),C(this,"onDragStop",(D,m)=>{if(!this.state.dragging||this.props.onStop(D,(0,i.createDraggableData)(this,m))===!1)return!1;(0,l.default)("Draggable: onDragStop: %j",m);const b={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:M,y:N}=this.props.position;b.x=M,b.y=N}this.setState(b)}),this.state={dragging:!1,dragged:!1,x:w.position?w.position.x:w.defaultPosition.x,y:w.position?w.position.y:w.defaultPosition.y,prevPropsPosition:{...w.position},slackX:0,slackY:0,isElementSVG:!1},w.position&&!(w.onDrag||w.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var w,D;return(w=(D=this.props)===null||D===void 0||(D=D.nodeRef)===null||D===void 0?void 0:D.current)!==null&&w!==void 0?w:r.default.findDOMNode(this)}render(){const{axis:w,bounds:D,children:m,defaultPosition:T,defaultClassName:b,defaultClassNameDragging:E,defaultClassNameDragged:M,position:N,positionOffset:A,scale:W,...Y}=this.props;let L={},$=null;const I=!!!N||this.state.dragging,O=N||T,j={x:(0,i.canDragX)(this)&&I?this.state.x:O.x,y:(0,i.canDragY)(this)&&I?this.state.y:O.y};this.state.isElementSVG?$=(0,s.createSVGTransform)(j,A):L=(0,s.createCSSTransform)(j,A);const P=(0,o.default)(m.props.className||"",b,{[E]:this.state.dragging,[M]:this.state.dragged});return t.createElement(c.default,h({},Y,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(m),{className:P,style:{...m.props.style,...L},transform:$}))}}e.default=y,C(y,"displayName","Draggable"),C(y,"propTypes",{...c.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),C(y,"defaultProps",{...c.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(xo)),xo}var va;function uu(){if(va)return un.exports;va=1;const{default:e,DraggableCore:t}=Mb();return un.exports=e,un.exports.default=e,un.exports.DraggableCore=t,un.exports}var tr={},ya;function kb(){if(ya)return tr;ya=1,tr.__esModule=!0,tr.cloneElement=a;var e=t(R);function t(c){return c&&c.__esModule?c:{default:c}}function n(c,l){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(c);l&&(u=u.filter(function(v){return Object.getOwnPropertyDescriptor(c,v).enumerable})),d.push.apply(d,u)}return d}function r(c){for(var l=1;l<arguments.length;l++){var d=arguments[l]!=null?arguments[l]:{};l%2?n(Object(d),!0).forEach(function(u){o(c,u,d[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):n(Object(d)).forEach(function(u){Object.defineProperty(c,u,Object.getOwnPropertyDescriptor(d,u))})}return c}function o(c,l,d){return l=s(l),l in c?Object.defineProperty(c,l,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[l]=d,c}function s(c){var l=i(c,"string");return typeof l=="symbol"?l:String(l)}function i(c,l){if(typeof c!="object"||c===null)return c;var d=c[Symbol.toPrimitive];if(d!==void 0){var u=d.call(c,l);if(typeof u!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(c)}function a(c,l){return l.style&&c.props.style&&(l.style=r(r({},c.props.style),l.style)),l.className&&c.props.className&&(l.className=c.props.className+" "+l.className),e.default.cloneElement(c,l)}return tr}var fn={},ba;function du(){if(ba)return fn;ba=1,fn.__esModule=!0,fn.resizableProps=void 0;var e=t(Xr());uu();function t(r){return r&&r.__esModule?r:{default:r}}var n={axis:e.default.oneOf(["both","x","y","none"]),className:e.default.string,children:e.default.element.isRequired,draggableOpts:e.default.shape({allowAnyClick:e.default.bool,cancel:e.default.string,children:e.default.node,disabled:e.default.bool,enableUserSelectHack:e.default.bool,offsetParent:e.default.node,grid:e.default.arrayOf(e.default.number),handle:e.default.string,nodeRef:e.default.object,onStart:e.default.func,onDrag:e.default.func,onStop:e.default.func,onMouseDown:e.default.func,scale:e.default.number}),height:function(){for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];var a=s[0];if(a.axis==="both"||a.axis==="y"){var c;return(c=e.default.number).isRequired.apply(c,s)}return e.default.number.apply(e.default,s)},handle:e.default.oneOfType([e.default.node,e.default.func]),handleSize:e.default.arrayOf(e.default.number),lockAspectRatio:e.default.bool,maxConstraints:e.default.arrayOf(e.default.number),minConstraints:e.default.arrayOf(e.default.number),onResizeStop:e.default.func,onResizeStart:e.default.func,onResize:e.default.func,resizeHandles:e.default.arrayOf(e.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:e.default.number,width:function(){for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];var a=s[0];if(a.axis==="both"||a.axis==="x"){var c;return(c=e.default.number).isRequired.apply(c,s)}return e.default.number.apply(e.default,s)}};return fn.resizableProps=n,fn}var wa;function fu(){if(wa)return ln;wa=1,ln.__esModule=!0,ln.default=void 0;var e=i(R),t=uu(),n=kb(),r=du(),o=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function s(y){if(typeof WeakMap!="function")return null;var f=new WeakMap,w=new WeakMap;return(s=function(m){return m?w:f})(y)}function i(y,f){if(y&&y.__esModule)return y;if(y===null||typeof y!="object"&&typeof y!="function")return{default:y};var w=s(f);if(w&&w.has(y))return w.get(y);var D={},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var T in y)if(T!=="default"&&Object.prototype.hasOwnProperty.call(y,T)){var b=m?Object.getOwnPropertyDescriptor(y,T):null;b&&(b.get||b.set)?Object.defineProperty(D,T,b):D[T]=y[T]}return D.default=y,w&&w.set(y,D),D}function a(){return a=Object.assign?Object.assign.bind():function(y){for(var f=1;f<arguments.length;f++){var w=arguments[f];for(var D in w)Object.prototype.hasOwnProperty.call(w,D)&&(y[D]=w[D])}return y},a.apply(this,arguments)}function c(y,f){if(y==null)return{};var w={},D=Object.keys(y),m,T;for(T=0;T<D.length;T++)m=D[T],!(f.indexOf(m)>=0)&&(w[m]=y[m]);return w}function l(y,f){var w=Object.keys(y);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(y);f&&(D=D.filter(function(m){return Object.getOwnPropertyDescriptor(y,m).enumerable})),w.push.apply(w,D)}return w}function d(y){for(var f=1;f<arguments.length;f++){var w=arguments[f]!=null?arguments[f]:{};f%2?l(Object(w),!0).forEach(function(D){u(y,D,w[D])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(w)):l(Object(w)).forEach(function(D){Object.defineProperty(y,D,Object.getOwnPropertyDescriptor(w,D))})}return y}function u(y,f,w){return f=v(f),f in y?Object.defineProperty(y,f,{value:w,enumerable:!0,configurable:!0,writable:!0}):y[f]=w,y}function v(y){var f=h(y,"string");return typeof f=="symbol"?f:String(f)}function h(y,f){if(typeof y!="object"||y===null)return y;var w=y[Symbol.toPrimitive];if(w!==void 0){var D=w.call(y,f);if(typeof D!="object")return D;throw new TypeError("@@toPrimitive must return a primitive value.")}return(f==="string"?String:Number)(y)}function C(y,f){y.prototype=Object.create(f.prototype),y.prototype.constructor=y,g(y,f)}function g(y,f){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(D,m){return D.__proto__=m,D},g(y,f)}var x=function(y){C(f,y);function f(){for(var D,m=arguments.length,T=new Array(m),b=0;b<m;b++)T[b]=arguments[b];return D=y.call.apply(y,[this].concat(T))||this,D.handleRefs={},D.lastHandleRect=null,D.slack=null,D}var w=f.prototype;return w.componentWillUnmount=function(){this.resetData()},w.resetData=function(){this.lastHandleRect=this.slack=null},w.runConstraints=function(m,T){var b=this.props,E=b.minConstraints,M=b.maxConstraints,N=b.lockAspectRatio;if(!E&&!M&&!N)return[m,T];if(N){var A=this.props.width/this.props.height,W=m-this.props.width,Y=T-this.props.height;Math.abs(W)>Math.abs(Y*A)?T=m/A:m=T*A}var L=m,$=T,k=this.slack||[0,0],I=k[0],O=k[1];return m+=I,T+=O,E&&(m=Math.max(E[0],m),T=Math.max(E[1],T)),M&&(m=Math.min(M[0],m),T=Math.min(M[1],T)),this.slack=[I+(L-m),O+($-T)],[m,T]},w.resizeHandler=function(m,T){var b=this;return function(E,M){var N=M.node,A=M.deltaX,W=M.deltaY;m==="onResizeStart"&&b.resetData();var Y=(b.props.axis==="both"||b.props.axis==="x")&&T!=="n"&&T!=="s",L=(b.props.axis==="both"||b.props.axis==="y")&&T!=="e"&&T!=="w";if(!(!Y&&!L)){var $=T[0],k=T[T.length-1],I=N.getBoundingClientRect();if(b.lastHandleRect!=null){if(k==="w"){var O=I.left-b.lastHandleRect.left;A+=O}if($==="n"){var j=I.top-b.lastHandleRect.top;W+=j}}b.lastHandleRect=I,k==="w"&&(A=-A),$==="n"&&(W=-W);var P=b.props.width+(Y?A/b.props.transformScale:0),F=b.props.height+(L?W/b.props.transformScale:0),U=b.runConstraints(P,F);P=U[0],F=U[1];var V=P!==b.props.width||F!==b.props.height,H=typeof b.props[m]=="function"?b.props[m]:null,X=m==="onResize"&&!V;H&&!X&&(E.persist==null||E.persist(),H(E,{node:N,size:{width:P,height:F},handle:T})),m==="onResizeStop"&&b.resetData()}}},w.renderResizeHandle=function(m,T){var b=this.props.handle;if(!b)return e.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+m,ref:T});if(typeof b=="function")return b(m,T);var E=typeof b.type=="string",M=d({ref:T},E?{}:{handleAxis:m});return e.cloneElement(b,M)},w.render=function(){var m=this,T=this.props,b=T.children,E=T.className,M=T.draggableOpts;T.width,T.height,T.handle,T.handleSize,T.lockAspectRatio,T.axis,T.minConstraints,T.maxConstraints,T.onResize,T.onResizeStop,T.onResizeStart;var N=T.resizeHandles;T.transformScale;var A=c(T,o);return(0,n.cloneElement)(b,d(d({},A),{},{className:(E?E+" ":"")+"react-resizable",children:[].concat(b.props.children,N.map(function(W){var Y,L=(Y=m.handleRefs[W])!=null?Y:m.handleRefs[W]=e.createRef();return e.createElement(t.DraggableCore,a({},M,{nodeRef:L,key:"resizableHandle-"+W,onStop:m.resizeHandler("onResizeStop",W),onStart:m.resizeHandler("onResizeStart",W),onDrag:m.resizeHandler("onResize",W)}),m.renderResizeHandle(W,L))}))}))},f}(e.Component);return ln.default=x,x.propTypes=r.resizableProps,x.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},ln}var pn={},xa;function Ob(){if(xa)return pn;xa=1,pn.__esModule=!0,pn.default=void 0;var e=a(R),t=s(Xr()),n=s(fu()),r=du(),o=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function s(f){return f&&f.__esModule?f:{default:f}}function i(f){if(typeof WeakMap!="function")return null;var w=new WeakMap,D=new WeakMap;return(i=function(T){return T?D:w})(f)}function a(f,w){if(f&&f.__esModule)return f;if(f===null||typeof f!="object"&&typeof f!="function")return{default:f};var D=i(w);if(D&&D.has(f))return D.get(f);var m={},T=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var b in f)if(b!=="default"&&Object.prototype.hasOwnProperty.call(f,b)){var E=T?Object.getOwnPropertyDescriptor(f,b):null;E&&(E.get||E.set)?Object.defineProperty(m,b,E):m[b]=f[b]}return m.default=f,D&&D.set(f,m),m}function c(){return c=Object.assign?Object.assign.bind():function(f){for(var w=1;w<arguments.length;w++){var D=arguments[w];for(var m in D)Object.prototype.hasOwnProperty.call(D,m)&&(f[m]=D[m])}return f},c.apply(this,arguments)}function l(f,w){var D=Object.keys(f);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(f);w&&(m=m.filter(function(T){return Object.getOwnPropertyDescriptor(f,T).enumerable})),D.push.apply(D,m)}return D}function d(f){for(var w=1;w<arguments.length;w++){var D=arguments[w]!=null?arguments[w]:{};w%2?l(Object(D),!0).forEach(function(m){u(f,m,D[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(D)):l(Object(D)).forEach(function(m){Object.defineProperty(f,m,Object.getOwnPropertyDescriptor(D,m))})}return f}function u(f,w,D){return w=v(w),w in f?Object.defineProperty(f,w,{value:D,enumerable:!0,configurable:!0,writable:!0}):f[w]=D,f}function v(f){var w=h(f,"string");return typeof w=="symbol"?w:String(w)}function h(f,w){if(typeof f!="object"||f===null)return f;var D=f[Symbol.toPrimitive];if(D!==void 0){var m=D.call(f,w);if(typeof m!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(f)}function C(f,w){if(f==null)return{};var D={},m=Object.keys(f),T,b;for(b=0;b<m.length;b++)T=m[b],!(w.indexOf(T)>=0)&&(D[T]=f[T]);return D}function g(f,w){f.prototype=Object.create(w.prototype),f.prototype.constructor=f,x(f,w)}function x(f,w){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,T){return m.__proto__=T,m},x(f,w)}var y=function(f){g(w,f);function w(){for(var m,T=arguments.length,b=new Array(T),E=0;E<T;E++)b[E]=arguments[E];return m=f.call.apply(f,[this].concat(b))||this,m.state={width:m.props.width,height:m.props.height,propsWidth:m.props.width,propsHeight:m.props.height},m.onResize=function(M,N){var A=N.size;m.props.onResize?(M.persist==null||M.persist(),m.setState(A,function(){return m.props.onResize&&m.props.onResize(M,N)})):m.setState(A)},m}w.getDerivedStateFromProps=function(T,b){return b.propsWidth!==T.width||b.propsHeight!==T.height?{width:T.width,height:T.height,propsWidth:T.width,propsHeight:T.height}:null};var D=w.prototype;return D.render=function(){var T=this.props,b=T.handle,E=T.handleSize;T.onResize;var M=T.onResizeStart,N=T.onResizeStop,A=T.draggableOpts,W=T.minConstraints,Y=T.maxConstraints,L=T.lockAspectRatio,$=T.axis;T.width,T.height;var k=T.resizeHandles,I=T.style,O=T.transformScale,j=C(T,o);return e.createElement(n.default,{axis:$,draggableOpts:A,handle:b,handleSize:E,height:this.state.height,lockAspectRatio:L,maxConstraints:Y,minConstraints:W,onResizeStart:M,onResize:this.onResize,onResizeStop:N,resizeHandles:k,transformScale:O,width:this.state.width},e.createElement("div",c({},j,{style:d(d({},I),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},w}(e.Component);return pn.default=y,y.propTypes=d(d({},r.resizableProps),{},{children:t.default.element}),pn}var Sa;function Pb(){return Sa||(Sa=1,cn.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},cn.exports.Resizable=fu().default,cn.exports.ResizableBox=Ob().default),cn.exports}var pu=Pb();function _b(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}const Ab=e=>{let{transform:t,draggingNodeRect:n,windowRect:r}=e;return!n||!r?t:_b(t,n,r)},Nb=({bookingInit:e,slotData:t,heightStyle:n})=>p.jsx(op,{modifiers:[Ab],dropAnimation:{duration:2e3,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},className:"Draggable dragging",children:p.jsx(Go,{booking:e,slotData:t,heightStyle:n})}),Go=({booking:e,slotData:t,onClick:n,heightStyle:r,customClasses:o,ref:s})=>{const{day:i,hour:a}=t,[c,l]=R.useState(!1),d=xe(Bs(N=>N.bookingViewType)),{updateIsDragging:u,isDragging:v}=en(N=>N),h=ou(N=>N.startAt),{attributes:C,listeners:g,setNodeRef:x,isDragging:y,transform:f}=us({id:e.id,data:{type:"booking-slots",booking:e,slotData:t}}),w=f?{transform:`translate3d(${f.x}px, ${f.y}px, 0)`}:void 0;kn({onDragStart:()=>u(!0),onDragAbort:()=>D(),onDragCancel:()=>D(),onDragEnd:()=>D()});const D=R.useCallback(()=>{u(!1)},[]),m=N=>N<="11:30",T=R.useMemo(()=>({cursor:v?"ns-resize":"pointer",width:d===re.DAY?"99%":"100%"}),[v,d]),b=(N,A)=>{const W=Q.dateAndHourDateToString(new Date(N.finishAt));return Q.isTodayDate(A)&&m(W)?{backgroundColor:"#000000c0"}:{backgroundColor:"#000456c0"}},[E,M]=R.useState(e);return R.useEffect(()=>{if(h.length){const N=Q.bookingTimeRange(e,h);M({...N})}},[h]),R.useImperativeHandle(s,()=>({changeCurrentCardResize:()=>l(N=>!N)})),y?p.jsx(Nb,{bookingInit:E,slotData:t,heightStyle:r}):p.jsx("div",{ref:x,className:se("cardContent_render",c&&"cardContent_render_dragging",o),style:{...w,...T},...g,...C,children:p.jsx("div",{className:"relative w-full h-full",style:b(e,new Date(i.split(":")[1])),onPointerUp:n,children:p.jsxs("div",{className:se("flex flex-col h-full text-white pl-2 lg:pl-2 justify-start items-start"),children:[p.jsx("p",{style:{height:"1.8rem",alignContent:"center"},children:`${Q.dateAndHourDateToString(e.startAt)} - ${Q.dateAndHourDateToString(e.finishAt)}`}),p.jsx("span",{className:"flex flex-row items-center justify-center"})]})},`${i}-${a}`)},e.id)};function Ib(e,t){const n=e>new Date(t.startAt),r=e<new Date(t.finishAt);return n&&r}const jb={calculateOverlappingBookings:(e,t)=>{const n=t.filter(o=>{const s=new Date(o.startAt).getDate(),i=e.startAt.getDate();return s===i&&o.id!==e.id});let r=0;for(const o of n)Ib(e.startAt,o)&&r++;return r}},Us=({bookingInit:e,slotData:t,heightStyle:n,topHeightIncrement:r,onClick:o,customClasses:s,bookingViewType:i,resizableParam:a,events:c,open:l=!0,lastCard:d,half:u,cardContentRef:v,cardsQuantity:h,cardIndex:C,ref:g})=>{var $;const x=en(k=>k.updateIsDragging),{bookings:y,onCardResizeEnd:f}=Qe(),[w,D]=R.useState(""),m=R.useRef(null),T=i===re.DAY?{width:"99%"}:{width:"100%"},b=(k,I)=>{var O;D("show-handle"),x(!0),a!=null&&a.onResizeStart&&a.onResizeStart(k,I),(O=m.current)==null||O.changeCurrentCardResize()},E=(k,I)=>{var O;(O=m.current)==null||O.changeCurrentCardResize(),D(""),x(!1),f(e),a!=null&&a.onResizeStop&&a.onResizeStop(k,I)},M=R.useMemo(()=>jb.calculateOverlappingBookings(e,y),[e,y]),N=R.useMemo(()=>se(a==null?void 0:a.customClass,w,u&&M>0&&"",u?"":M>0&&"inner_cards_parent",d&&M&&u&&"inner_cards_parent_last_card_disable",d&&M&&"inner_cards_parent_last_card",d&&M===2&&"inner_cards_parent_last_card_layer_2",M===1&&!u&&"inner_cards_parent_1_layer",M===2&&"inner_cards_parent_2_layer",u&&M===3&&"inner_cards_parent_resizable_layer_3_half inner_cards_parent_3_layer_half",M===3&&"inner_cards_parent_resizable_layer_3 inner_cards_parent_3_layer"),[a,w,u,M,d]),A=k=>k===0?"8rem":"4rem",W=R.useMemo(()=>u&&C===0&&h===3||u&&C===1&&h===3?A(C):M===2?"0.8rem":d&&M===1?"0.2rem":d&&M?"1rem":M===1?"0.4rem":0,[u,d,M,C,h]),Y=R.useMemo(()=>u&&C===0&&h===3&&!M?"0rem":u&&C===0&&h===3?"0.4rem":u&&C===1&&h===3?"5rem":d&&h===3?"9rem":d?"6.5rem":0,[u,d,C,M,h]),L=R.useMemo(()=>u&&h===3&&(u&&C===0||u&&C===1)||u&&d&&h===3||u&&d?{inset:`${r}rem ${W} ${n}rem ${Y}`}:u&&h===3||u?{inset:`${r}rem 6.5rem ${n}rem ${W}`}:{inset:`${r||0}rem ${W} ${n}rem`},[u,M,n,r,C,h,W,Y]);if(R.useEffect(()=>()=>{c!=null&&c.onUnmount&&(c==null||c.onUnmount())},[]),R.useImperativeHandle(v,()=>({changeCurrentCardResize:()=>{var k;(k=m.current)==null||k.changeCurrentCardResize()}})),!l&&!e.finishAt)return null;if(($=a==null?void 0:a.state)!=null&&$.height){const{state:k,onResize:I}=a;return p.jsx(pu.Resizable,{className:se(N),height:k==null?void 0:k.height,width:k==null?void 0:k.width,onResize:I,onResizeStart:b,onResizeStop:E,resizeHandles:["s","n"],draggableOpts:{grid:[35,35]},handleSize:[20,20],maxConstraints:[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],transformScale:1,children:p.jsx("div",{className:"card_content_core",style:{...L},children:p.jsx(Go,{ref:m,heightStyle:n,booking:e,slotData:t,onClick:o,layerCount:M,half:u},e.id)})})}return p.jsx("div",{ref:g,className:"card_content_core",style:{...T,...L},children:p.jsx(Go,{heightStyle:n,customClasses:s,booking:e,slotData:t,onClick:o})})},Lb=e=>{const t=R.use(nu);if(!t)throw new Error("useConfig must be used within a ConfigContext");return Rr(t,e)};function Ca(e,[t,n]){return Math.min(n,Math.max(t,e))}function $b(e){const t=S.useRef({value:e,previous:e});return S.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Fb=[" ","Enter","ArrowUp","ArrowDown"],zb=[" ","Enter"],Fn="Select",[Jr,Qr,Wb]=Rs(Fn),[tn,Rx]=mt(Fn,[Wb,vt]),eo=vt(),[Bb,yt]=tn(Fn),[Hb,Vb]=tn(Fn),hu=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:c,dir:l,name:d,autoComplete:u,disabled:v,required:h,form:C}=e,g=eo(t),[x,y]=S.useState(null),[f,w]=S.useState(null),[D,m]=S.useState(!1),T=Ms(l),[b=!1,E]=Tt({prop:r,defaultProp:o,onChange:s}),[M,N]=Tt({prop:i,defaultProp:a,onChange:c}),A=S.useRef(null),W=x?C||!!x.closest("form"):!0,[Y,L]=S.useState(new Set),$=Array.from(Y).map(k=>k.props.value).join(";");return p.jsx($r,{...g,children:p.jsxs(Bb,{required:h,scope:t,trigger:x,onTriggerChange:y,valueNode:f,onValueNodeChange:w,valueNodeHasChildren:D,onValueNodeHasChildrenChange:m,contentId:ft(),value:M,onValueChange:N,open:b,onOpenChange:E,dir:T,triggerPointerDownPosRef:A,disabled:v,children:[p.jsx(Jr.Provider,{scope:t,children:p.jsx(Hb,{scope:e.__scopeSelect,onNativeOptionAdd:S.useCallback(k=>{L(I=>new Set(I).add(k))},[]),onNativeOptionRemove:S.useCallback(k=>{L(I=>{const O=new Set(I);return O.delete(k),O})},[]),children:n})}),W?p.jsxs(Lu,{"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:u,value:M,onChange:k=>N(k.target.value),disabled:v,form:C,children:[M===void 0?p.jsx("option",{value:""}):null,Array.from(Y)]},$):null]})})};hu.displayName=Fn;var gu="SelectTrigger",mu=S.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=eo(n),i=yt(gu,n),a=i.disabled||r,c=ue(t,i.onTriggerChange),l=Qr(n),d=S.useRef("touch"),[u,v,h]=$u(g=>{const x=l().filter(w=>!w.disabled),y=x.find(w=>w.value===i.value),f=Fu(x,g,y);f!==void 0&&i.onValueChange(f.value)}),C=g=>{a||(i.onOpenChange(!0),h()),g&&(i.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return p.jsx(Nn,{asChild:!0,...s,children:p.jsx(ie.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":ju(i.value)?"":void 0,...o,ref:c,onClick:ee(o.onClick,g=>{g.currentTarget.focus(),d.current!=="mouse"&&C(g)}),onPointerDown:ee(o.onPointerDown,g=>{d.current=g.pointerType;const x=g.target;x.hasPointerCapture(g.pointerId)&&x.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(C(g),g.preventDefault())}),onKeyDown:ee(o.onKeyDown,g=>{const x=u.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&v(g.key),!(x&&g.key===" ")&&Fb.includes(g.key)&&(C(),g.preventDefault())})})})});mu.displayName=gu;var vu="SelectValue",yu=S.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,c=yt(vu,n),{onValueNodeHasChildrenChange:l}=c,d=s!==void 0,u=ue(t,c.onValueNodeChange);return Se(()=>{l(d)},[l,d]),p.jsx(ie.span,{...a,ref:u,style:{pointerEvents:"none"},children:ju(c.value)?p.jsx(p.Fragment,{children:i}):s})});yu.displayName=vu;var Ub="SelectIcon",bu=S.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.jsx(ie.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});bu.displayName=Ub;var Yb="SelectPortal",wu=e=>p.jsx(In,{asChild:!0,...e});wu.displayName=Yb;var Rt="SelectContent",xu=S.forwardRef((e,t)=>{const n=yt(Rt,e.__scopeSelect),[r,o]=S.useState();if(Se(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Tr.createPortal(p.jsx(Su,{scope:e.__scopeSelect,children:p.jsx(Jr.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),s):null}return p.jsx(Cu,{...e,ref:t})});xu.displayName=Rt;var Le=10,[Su,bt]=tn(Rt),Kb="SelectContentImpl",Gb=Ct("SelectContent.RemoveScroll"),Cu=S.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:c,align:l,alignOffset:d,arrowPadding:u,collisionBoundary:v,collisionPadding:h,sticky:C,hideWhenDetached:g,avoidCollisions:x,...y}=e,f=yt(Rt,n),[w,D]=S.useState(null),[m,T]=S.useState(null),b=ue(t,z=>D(z)),[E,M]=S.useState(null),[N,A]=S.useState(null),W=Qr(n),[Y,L]=S.useState(!1),$=S.useRef(!1);S.useEffect(()=>{if(w)return Os(w)},[w]),ks();const k=S.useCallback(z=>{const[G,...q]=W().map(_=>_.ref.current),[B]=q.slice(-1),te=document.activeElement;for(const _ of z)if(_===te||(_==null||_.scrollIntoView({block:"nearest"}),_===G&&m&&(m.scrollTop=0),_===B&&m&&(m.scrollTop=m.scrollHeight),_==null||_.focus(),document.activeElement!==te))return},[W,m]),I=S.useCallback(()=>k([E,w]),[k,E,w]);S.useEffect(()=>{Y&&I()},[Y,I]);const{onOpenChange:O,triggerPointerDownPosRef:j}=f;S.useEffect(()=>{if(w){let z={x:0,y:0};const G=B=>{var te,_;z={x:Math.abs(Math.round(B.pageX)-(((te=j.current)==null?void 0:te.x)??0)),y:Math.abs(Math.round(B.pageY)-(((_=j.current)==null?void 0:_.y)??0))}},q=B=>{z.x<=10&&z.y<=10?B.preventDefault():w.contains(B.target)||O(!1),document.removeEventListener("pointermove",G),j.current=null};return j.current!==null&&(document.addEventListener("pointermove",G),document.addEventListener("pointerup",q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",q,{capture:!0})}}},[w,O,j]),S.useEffect(()=>{const z=()=>O(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[O]);const[P,F]=$u(z=>{const G=W().filter(te=>!te.disabled),q=G.find(te=>te.ref.current===document.activeElement),B=Fu(G,z,q);B&&setTimeout(()=>B.ref.current.focus())}),U=S.useCallback((z,G,q)=>{const B=!$.current&&!q;(f.value!==void 0&&f.value===G||B)&&(M(z),B&&($.current=!0))},[f.value]),V=S.useCallback(()=>w==null?void 0:w.focus(),[w]),H=S.useCallback((z,G,q)=>{const B=!$.current&&!q;(f.value!==void 0&&f.value===G||B)&&A(z)},[f.value]),X=r==="popper"?qo:Eu,K=X===qo?{side:a,sideOffset:c,align:l,alignOffset:d,arrowPadding:u,collisionBoundary:v,collisionPadding:h,sticky:C,hideWhenDetached:g,avoidCollisions:x}:{};return p.jsx(Su,{scope:n,content:w,viewport:m,onViewportChange:T,itemRefCallback:U,selectedItem:E,onItemLeave:V,itemTextRefCallback:H,focusSelectedItem:I,selectedItemText:N,position:r,isPositioned:Y,searchRef:P,children:p.jsx(Kr,{as:Gb,allowPinchZoom:!0,children:p.jsx(Vr,{asChild:!0,trapped:f.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:ee(o,z=>{var G;(G=f.trigger)==null||G.focus({preventScroll:!0}),z.preventDefault()}),children:p.jsx(_n,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:z=>z.preventDefault(),onDismiss:()=>f.onOpenChange(!1),children:p.jsx(X,{role:"listbox",id:f.contentId,"data-state":f.open?"open":"closed",dir:f.dir,onContextMenu:z=>z.preventDefault(),...y,...K,onPlaced:()=>L(!0),ref:b,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:ee(y.onKeyDown,z=>{const G=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!G&&z.key.length===1&&F(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let B=W().filter(te=>!te.disabled).map(te=>te.ref.current);if(["ArrowUp","End"].includes(z.key)&&(B=B.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){const te=z.target,_=B.indexOf(te);B=B.slice(_+1)}setTimeout(()=>k(B)),z.preventDefault()}})})})})})})});Cu.displayName=Kb;var qb="SelectItemAlignedPosition",Eu=S.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=yt(Rt,n),i=bt(Rt,n),[a,c]=S.useState(null),[l,d]=S.useState(null),u=ue(t,b=>d(b)),v=Qr(n),h=S.useRef(!1),C=S.useRef(!0),{viewport:g,selectedItem:x,selectedItemText:y,focusSelectedItem:f}=i,w=S.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&l&&g&&x&&y){const b=s.trigger.getBoundingClientRect(),E=l.getBoundingClientRect(),M=s.valueNode.getBoundingClientRect(),N=y.getBoundingClientRect();if(s.dir!=="rtl"){const te=N.left-E.left,_=M.left-te,ne=b.left-_,ae=b.width+ne,fe=Math.max(ae,E.width),ve=window.innerWidth-Le,Ne=Ca(_,[Le,Math.max(Le,ve-fe)]);a.style.minWidth=ae+"px",a.style.left=Ne+"px"}else{const te=E.right-N.right,_=window.innerWidth-M.right-te,ne=window.innerWidth-b.right-_,ae=b.width+ne,fe=Math.max(ae,E.width),ve=window.innerWidth-Le,Ne=Ca(_,[Le,Math.max(Le,ve-fe)]);a.style.minWidth=ae+"px",a.style.right=Ne+"px"}const A=v(),W=window.innerHeight-Le*2,Y=g.scrollHeight,L=window.getComputedStyle(l),$=parseInt(L.borderTopWidth,10),k=parseInt(L.paddingTop,10),I=parseInt(L.borderBottomWidth,10),O=parseInt(L.paddingBottom,10),j=$+k+Y+O+I,P=Math.min(x.offsetHeight*5,j),F=window.getComputedStyle(g),U=parseInt(F.paddingTop,10),V=parseInt(F.paddingBottom,10),H=b.top+b.height/2-Le,X=W-H,K=x.offsetHeight/2,z=x.offsetTop+K,G=$+k+z,q=j-G;if(G<=H){const te=A.length>0&&x===A[A.length-1].ref.current;a.style.bottom="0px";const _=l.clientHeight-g.offsetTop-g.offsetHeight,ne=Math.max(X,K+(te?V:0)+_+I),ae=G+ne;a.style.height=ae+"px"}else{const te=A.length>0&&x===A[0].ref.current;a.style.top="0px";const ne=Math.max(H,$+g.offsetTop+(te?U:0)+K)+q;a.style.height=ne+"px",g.scrollTop=G-H+g.offsetTop}a.style.margin=`${Le}px 0`,a.style.minHeight=P+"px",a.style.maxHeight=W+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[v,s.trigger,s.valueNode,a,l,g,x,y,s.dir,r]);Se(()=>w(),[w]);const[D,m]=S.useState();Se(()=>{l&&m(window.getComputedStyle(l).zIndex)},[l]);const T=S.useCallback(b=>{b&&C.current===!0&&(w(),f==null||f(),C.current=!1)},[w,f]);return p.jsx(Zb,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:T,children:p.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:D},children:p.jsx(ie.div,{...o,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Eu.displayName=qb;var Xb="SelectPopperPosition",qo=S.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Le,...s}=e,i=eo(n);return p.jsx(Fr,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});qo.displayName=Xb;var[Zb,Ys]=tn(Rt,{}),Xo="SelectViewport",Du=S.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=bt(Xo,n),i=Ys(Xo,n),a=ue(t,s.onViewportChange),c=S.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),p.jsx(Jr.Slot,{scope:n,children:p.jsx(ie.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ee(o.onScroll,l=>{const d=l.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:v}=i;if(v!=null&&v.current&&u){const h=Math.abs(c.current-d.scrollTop);if(h>0){const C=window.innerHeight-Le*2,g=parseFloat(u.style.minHeight),x=parseFloat(u.style.height),y=Math.max(g,x);if(y<C){const f=y+h,w=Math.min(C,f),D=f-w;u.style.height=w+"px",u.style.bottom==="0px"&&(d.scrollTop=D>0?D:0,u.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});Du.displayName=Xo;var Tu="SelectGroup",[Jb,Qb]=tn(Tu),ew=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ft();return p.jsx(Jb,{scope:n,id:o,children:p.jsx(ie.div,{role:"group","aria-labelledby":o,...r,ref:t})})});ew.displayName=Tu;var Ru="SelectLabel",tw=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Qb(Ru,n);return p.jsx(ie.div,{id:o.id,...r,ref:t})});tw.displayName=Ru;var Dr="SelectItem",[nw,Mu]=tn(Dr),ku=S.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=yt(Dr,n),c=bt(Dr,n),l=a.value===r,[d,u]=S.useState(s??""),[v,h]=S.useState(!1),C=ue(t,f=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,f,r,o)}),g=ft(),x=S.useRef("touch"),y=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(nw,{scope:n,value:r,disabled:o,textId:g,isSelected:l,onItemTextChange:S.useCallback(f=>{u(w=>w||((f==null?void 0:f.textContent)??"").trim())},[]),children:p.jsx(Jr.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:p.jsx(ie.div,{role:"option","aria-labelledby":g,"data-highlighted":v?"":void 0,"aria-selected":l&&v,"data-state":l?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:C,onFocus:ee(i.onFocus,()=>h(!0)),onBlur:ee(i.onBlur,()=>h(!1)),onClick:ee(i.onClick,()=>{x.current!=="mouse"&&y()}),onPointerUp:ee(i.onPointerUp,()=>{x.current==="mouse"&&y()}),onPointerDown:ee(i.onPointerDown,f=>{x.current=f.pointerType}),onPointerMove:ee(i.onPointerMove,f=>{var w;x.current=f.pointerType,o?(w=c.onItemLeave)==null||w.call(c):x.current==="mouse"&&f.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ee(i.onPointerLeave,f=>{var w;f.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:ee(i.onKeyDown,f=>{var D;((D=c.searchRef)==null?void 0:D.current)!==""&&f.key===" "||(zb.includes(f.key)&&y(),f.key===" "&&f.preventDefault())})})})})});ku.displayName=Dr;var gn="SelectItemText",Ou=S.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=yt(gn,n),a=bt(gn,n),c=Mu(gn,n),l=Vb(gn,n),[d,u]=S.useState(null),v=ue(t,y=>u(y),c.onItemTextChange,y=>{var f;return(f=a.itemTextRefCallback)==null?void 0:f.call(a,y,c.value,c.disabled)}),h=d==null?void 0:d.textContent,C=S.useMemo(()=>p.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:x}=l;return Se(()=>(g(C),()=>x(C)),[g,x,C]),p.jsxs(p.Fragment,{children:[p.jsx(ie.span,{id:c.textId,...s,ref:v}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Tr.createPortal(s.children,i.valueNode):null]})});Ou.displayName=gn;var Pu="SelectItemIndicator",_u=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Mu(Pu,n).isSelected?p.jsx(ie.span,{"aria-hidden":!0,...r,ref:t}):null});_u.displayName=Pu;var Zo="SelectScrollUpButton",Au=S.forwardRef((e,t)=>{const n=bt(Zo,e.__scopeSelect),r=Ys(Zo,e.__scopeSelect),[o,s]=S.useState(!1),i=ue(t,r.onScrollButtonChange);return Se(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollTop>0;s(l)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(Iu,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});Au.displayName=Zo;var Jo="SelectScrollDownButton",Nu=S.forwardRef((e,t)=>{const n=bt(Jo,e.__scopeSelect),r=Ys(Jo,e.__scopeSelect),[o,s]=S.useState(!1),i=ue(t,r.onScrollButtonChange);return Se(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<l;s(d)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(Iu,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});Nu.displayName=Jo;var Iu=S.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=bt("SelectScrollButton",n),i=S.useRef(null),a=Qr(n),c=S.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return S.useEffect(()=>()=>c(),[c]),Se(()=>{var d;const l=a().find(u=>u.ref.current===document.activeElement);(d=l==null?void 0:l.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),p.jsx(ie.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:ee(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:ee(o.onPointerMove,()=>{var l;(l=s.onItemLeave)==null||l.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:ee(o.onPointerLeave,()=>{c()})})}),rw="SelectSeparator",ow=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.jsx(ie.div,{"aria-hidden":!0,...r,ref:t})});ow.displayName=rw;var Qo="SelectArrow",sw=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=eo(n),s=yt(Qo,n),i=bt(Qo,n);return s.open&&i.position==="popper"?p.jsx(zr,{...o,...r,ref:t}):null});sw.displayName=Qo;function ju(e){return e===""||e===void 0}var Lu=S.forwardRef((e,t)=>{const{value:n,...r}=e,o=S.useRef(null),s=ue(t,o),i=$b(n);return S.useEffect(()=>{const a=o.current,c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==n&&d){const u=new Event("change",{bubbles:!0});d.call(a,n),a.dispatchEvent(u)}},[i,n]),p.jsx(Ss,{asChild:!0,children:p.jsx("select",{...r,ref:s,defaultValue:n})})});Lu.displayName="BubbleSelect";function $u(e){const t=Ae(e),n=S.useRef(""),r=S.useRef(0),o=S.useCallback(i=>{const a=n.current+i;t(a),function c(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[t]),s=S.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Fu(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=iw(e,Math.max(s,0));o.length===1&&(i=i.filter(l=>l!==n));const c=i.find(l=>l.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function iw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var aw=hu,cw=mu,lw=yu,uw=bu,dw=wu,fw=xu,pw=Du,hw=ku,gw=Ou,mw=_u,vw=Au,yw=Nu;function bw({...e}){return p.jsx(aw,{"data-slot":"select",...e})}function ww({...e}){return p.jsx(lw,{"data-slot":"select-value",...e})}function xw({className:e,size:t="default",children:n,...r}){return p.jsxs(cw,{"data-slot":"select-trigger","data-size":t,className:se("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,p.jsx(uw,{asChild:!0,children:p.jsx(lc,{className:"size-4 opacity-50"})})]})}function Sw({className:e,children:t,position:n="popper",...r}){return p.jsx(dw,{children:p.jsxs(fw,{"data-slot":"select-content",className:se("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[p.jsx(Ew,{}),p.jsx(pw,{className:se("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),p.jsx(Dw,{})]})})}function Cw({className:e,children:t,...n}){return p.jsxs(hw,{"data-slot":"select-item",className:se("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[p.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:p.jsx(mw,{children:p.jsx(cc,{className:"size-4"})})}),p.jsx(gw,{children:t})]})}function Ew({className:e,...t}){return p.jsx(vw,{"data-slot":"select-scroll-up-button",className:se("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(xp,{className:"size-4"})})}function Dw({className:e,...t}){return p.jsx(yw,{"data-slot":"select-scroll-down-button",className:se("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(lc,{className:"size-4"})})}const Tw=15,nr=600,Rw=15,Mo=-Math.abs(1.98),Ks=({booking:e,onAddTime:t,onAddStartTime:n,onSubTime:r,starter:o=!1})=>{const[s,i]=R.useState({height:nr,width:nr}),[a,c]=R.useState(0),l=(T,b)=>{const E=Q.timeDiffInSeconds(T,b),M=Math.ceil(E/Tw);return-Math.abs((M-1)*2)},[d,u]=R.useState(o?l(e.finishAt,e.startAt):Mo),v=T=>T===-Math.abs(0)||T===0,h=()=>Q.timeDiffInSeconds(e.finishAt,e.startAt)===Rw,C=async T=>{if(T.includes("n")){const b=y(e.startAt,"add");if(h())return;c(E=>E+2),n&&n(b)}else{const b=x(e.finishAt,"add");u(E=>v(E)?Mo:E-2),t&&t(b)}},g=async T=>{if(T.includes("n")){const E=y(e.startAt,"remove");c(M=>M-2),n&&n(E);return}const b=x(e.finishAt,"remove");h()||(u(E=>E+2),r&&r(b))},x=(T,b)=>{const E=new Date(T),M=E.getMinutes();return b==="add"&&E.setMinutes(M+15),b==="remove"&&E.setMinutes(M-15),E},y=(T,b)=>{const E=new Date(T),M=E.getMinutes();return b==="add"&&E.setMinutes(M+15),b==="remove"&&E.setMinutes(M-15),E};return{state:s,setState:i,resetState:()=>{i({height:nr,width:nr})},resetHeightStyle:()=>{u(Mo)},heightStyle:d,topHeightIncrement:a,onResize:(T,{size:b,handle:E})=>{switch(T.stopPropagation(),T.preventDefault(),E){case"se":case"s":{i(M=>(Number(M.height)<Number(b.height)&&C(["s","se"]),Number(M.height)>Number(b.height)&&g(["s","se"]),{...M,height:b.height}));break}case"n":{i(M=>Math.abs(Number(b.height-Number(M.height)))<10?{...M,height:b.height}:(+(M.height<Number(b.height))&&g(["n"]),+(M.height>Number(b.height))&&C(["n"]),{...M,height:b.height}));break}}},updateHeightStyle:(T,b)=>{u(l(T,b))}}},Mw=R.forwardRef(({isDragging:e,slotData:t,events:{onClick:n,renderPreviewCard:r,resetPrevView:o}},s)=>{const[i,a]=R.useState(!1),c=ts(k=>k.startAt),l=xe(k=>k.bookingViewType),{systemColor:d,isTimeInfoVisible:u}=Lb(k=>k),[v,h]=R.useState(!1),[C,g]=R.useState(Q.addMinutesToHour(t.time,15)),[x,y]=R.useState(!1),f=R.useRef(null),w=x?{backgroundColor:"white",border:"none"}:{},D=R.useMemo(()=>({id:"dragging_booking_preview",startAt:Q.convertStringTimeToDateFormat(c),finishAt:Q.convertStringTimeToDateFormat(C)}),[C,c]),m=()=>{h(!0),y(!0),r()},T=()=>{h(!1),n(C),$()};R.useEffect(()=>{var k;v&&((k=f.current)==null||k.changeCurrentCardResize())},[v]);const{state:b,resetState:E,resetHeightStyle:M,heightStyle:N,onResize:A,updateHeightStyle:W}=Ks({booking:D,onAddTime:k=>{g(Q.dateTimeAsString(k))},onSubTime:k=>{g(Q.dateTimeAsString(k))}}),Y=()=>{$()},L=R.useCallback(()=>{g(Q.addMinutesToHour(t.time,15))},[t.time]),$=R.useCallback(()=>{y(!1),E(),L(),M(),o()},[L,M,o,E]);if(R.useEffect(()=>{if(!C||!c)return;const k=Q.convertStringTimeToDateFormat(C),I=Q.convertStringTimeToDateFormat(c);Number.isNaN(k)||Number.isNaN(I)||!(k instanceof Date)||!(I instanceof Date)||W(k,I)},[C,c]),R.useEffect(()=>()=>{$()},[]),R.useImperativeHandle(s,()=>({show:()=>a(!0),hide:()=>a(!1),changeIsOpen:k=>a(k)}),[]),!!i)return p.jsx("div",{style:{...w,border:u&&!e?`1.5px solid ${d}`:"none"},className:se("timeInfo_core",w),children:p.jsx(pu.Resizable,{className:"slot-resizable",height:b.height,width:b.width,onResizeStart:m,onResizeStop:T,onResize:A,resizeHandles:["se"],draggableOpts:{grid:[35,35]},handleSize:[30,30],maxConstraints:[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],transformScale:1,children:x?p.jsx("div",{className:"timeInfo_core_dragging",children:p.jsx(Us,{bookingInit:D,bookingViewType:l,slotData:{day:new Date().toISOString(),hour:"09:00"},heightStyle:N,cardContentRef:f,resizableParam:{state:b,onResize:A,customClass:"show-handle"},events:{onUnmount:Y}})}):p.jsx("div",{className:"timeInfo_core_timeParent",children:!e&&p.jsx("span",{className:"timeInfo_core_timeParent_time",style:{color:d,display:u?"initial":"none"},children:t.time})})})})}),rr=({slotData:e,slotPosition:t,disabledCss:n,events:r,actualTimerIndicatorChildren:o,children:s,ref:i})=>{const{isDragging:a,updateIsDragging:c}=en(_=>_),{emptySlotNodes:l,setSelectedNode:d,resetSelectedNode:u}=Mt(),{onModalClose:v,onSlotClick:h}=Qe(),{startAt:C,finishAt:g,updateDate:x,updateStartAt:y,updateFinishAtWithOffset:f,resetForm:w}=ts(_=>_),D=xe(_=>_.bookingViewType),[m,T]=R.useState(!1),[b,E]=R.useState(!1),M=R.useRef(null),N=R.useRef(null),A=R.useRef(null),W=()=>A.current,Y=()=>{var _;(_=A.current)==null||_.isModalOpen()},L=()=>{var _;(_=W())==null||_.showCreationModal()},$=()=>{var _;(_=N.current)==null||_.show()},k=()=>{var _;(_=N.current)==null||_.hide()},I=_=>{var ne;(ne=N.current)==null||ne.changeIsOpen(_)},O=R.useMemo(()=>({id:"dragging_booking_preview",startAt:Q.convertStringTimeToDateFormat(C),finishAt:Q.convertStringTimeToDateFormat(g)}),[g,C]),{updateHeightStyle:j,heightStyle:P}=Ks({booking:O}),F=R.useCallback(()=>{var ne,ae,fe;if(!s||typeof s!="object")return;if("props"in s&&s.props&&typeof s.props=="object"&&"bookings"in s.props&&Array.isArray(s.props.bookings)&&(ne=s.props)!=null&&ne.bookings.length&&"slotData"in s.props&&typeof((ae=s==null?void 0:s.props)==null?void 0:ae.slotData)=="object"&&(fe=s==null?void 0:s.props)!=null&&fe.slotData&&"hour"in s.props.slotData&&typeof s.props.slotData.hour=="string"&&"blockTimeString"in s.props&&typeof s.props.blockTimeString=="string"){const ve=s.props.blockTimeString,Ne=s.props.slotData.hour;if(s.props.bookings.findIndex(je=>{const _t=Number(Ne.split(":")[0]),At=Number(ve),Wn=je.startAt.getHours(),Bn=je.startAt.getMinutes();return _t===Wn&&At===Bn})!==-1)return}if(a||Y()||m)return;r.onMouseEnterEvent()===t&&$()},[t,a,m,s,r]),U=()=>{w(),c(!1),u()},V=_=>{var fe;U();const ne=dr(e),ae=l==null?void 0:l.get(ne);ae&&ae.closeEvent(),v==null||v(),_==null||_.stopPropagation(),_==null||_.preventDefault(),(fe=W())==null||fe.closeModal()},H=_=>{_||V(),T(_),I(_)},X=R.useCallback(_=>{if(U(),a&&!_)return;c(!1);const{time:ne,key:ae}=e,fe=dr({key:ae,time:ne}),ve=l==null?void 0:l.get(fe);d(fe),ve&&ve.showEvent(ne),x(ae);const Ie=f(_||ne,_?0:15);h({slotData:e,finishTime:Ie}),L()},[e,l,a,d,h,x,y,c,f]),K=()=>{a||Y()||k()},z=n.length||b?n:"hovering_slotTrigger_core",G=R.useCallback(()=>{const{time:_,key:ne}=e;c(!0),E(!0),x(ne),y(_),f(_)},[f,e,x,c,y]),q=()=>{L()},B=R.useCallback(()=>{E(!1)},[]),te=()=>{k(),L(),T(!0)};return R.useEffect(()=>{a?document.body.style.cursor="ns-resize":document.body.style.cursor="default"},[a]),R.useEffect(()=>{if(!g||!C)return;const _=Q.convertStringTimeToDateFormat(g),ne=Q.convertStringTimeToDateFormat(C);Number.isNaN(_)||Number.isNaN(ne)||!(_ instanceof Date)||!(ne instanceof Date)||j(_,ne)},[g,C]),R.useEffect(()=>{if(!m){k();return}M!=null&&M.current&&M.current.scrollIntoView({behavior:"smooth",block:"center"})},[m]),R.useEffect(()=>{s||k(),b&&$()},[s,b]),R.useEffect(()=>{b&&$()},[b]),R.useImperativeHandle(i,()=>({showEvent:_=>{y(_),te()},closeEvent:()=>{var _;(_=W())==null||_.closeModal(),T(!1),k(),B()},onOpenCloseChange:_=>{I(_),T(_),B()}})),p.jsxs(p.Fragment,{children:[p.jsxs("div",{ref:e.ref,style:{borderBottom:t==="fourth"?"1px solid #8080807a":"",...e.style},className:se("slotTrigger_core",D===re.DAY&&"slotTrigger_core_day",z),onMouseOver:F,onMouseLeave:K,onFocus:()=>{},children:[p.jsx(Mw,{ref:N,isDragging:a,slotData:e,events:{onClick:X,openOptions:q,renderPreviewCard:G,resetPrevView:B}}),o,m&&p.jsx(Us,{ref:M,bookingInit:O,bookingViewType:D,slotData:{day:new Date().toISOString(),hour:"09:00"},heightStyle:P}),s]},e.key),p.jsx(tu,{ref:A,onClose:V,onOpenChange:H,buttonTrigger:p.jsx("div",{},e.key),side:D===re.DAY?"top":"right"})]})};var Gs="Popover",[zu,Mx]=mt(Gs,[vt]),zn=vt(),[kw,wt]=zu(Gs),Wu=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=zn(t),c=S.useRef(null),[l,d]=S.useState(!1),[u=!1,v]=Tt({prop:r,defaultProp:o,onChange:s});return p.jsx($r,{...a,children:p.jsx(kw,{scope:t,contentId:ft(),triggerRef:c,open:u,onOpenChange:v,onOpenToggle:S.useCallback(()=>v(h=>!h),[v]),hasCustomAnchor:l,onCustomAnchorAdd:S.useCallback(()=>d(!0),[]),onCustomAnchorRemove:S.useCallback(()=>d(!1),[]),modal:i,children:n})})};Wu.displayName=Gs;var Bu="PopoverAnchor",Hu=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wt(Bu,n),s=zn(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return S.useEffect(()=>(i(),()=>a()),[i,a]),p.jsx(Nn,{...s,...r,ref:t})});Hu.displayName=Bu;var Vu="PopoverTrigger",Uu=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wt(Vu,n),s=zn(n),i=ue(t,o.triggerRef),a=p.jsx(ie.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Xu(o.open),...r,ref:i,onClick:ee(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:p.jsx(Nn,{asChild:!0,...s,children:a})});Uu.displayName=Vu;var qs="PopoverPortal",[Ow,Pw]=zu(qs,{forceMount:void 0}),Yu=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=wt(qs,t);return p.jsx(Ow,{scope:t,forceMount:n,children:p.jsx(nt,{present:n||s.open,children:p.jsx(In,{asChild:!0,container:o,children:r})})})};Yu.displayName=qs;var Kt="PopoverContent",Ku=S.forwardRef((e,t)=>{const n=Pw(Kt,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=wt(Kt,e.__scopePopover);return p.jsx(nt,{present:r||s.open,children:s.modal?p.jsx(Aw,{...o,ref:t}):p.jsx(Nw,{...o,ref:t})})});Ku.displayName=Kt;var _w=Ct("PopoverContent.RemoveScroll"),Aw=S.forwardRef((e,t)=>{const n=wt(Kt,e.__scopePopover),r=S.useRef(null),o=ue(t,r),s=S.useRef(!1);return S.useEffect(()=>{const i=r.current;if(i)return Os(i)},[]),p.jsx(Kr,{as:_w,allowPinchZoom:!0,children:p.jsx(Gu,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ee(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),s.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:ee(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,l=a.button===2||c;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:ee(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Nw=S.forwardRef((e,t)=>{const n=wt(Kt,e.__scopePopover),r=S.useRef(!1),o=S.useRef(!1);return p.jsx(Gu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var c,l;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((l=n.triggerRef.current)==null?void 0:l.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Gu=S.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:d,...u}=e,v=wt(Kt,n),h=zn(n);return ks(),p.jsx(Vr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:p.jsx(_n,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:d,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>v.onOpenChange(!1),children:p.jsx(Fr,{"data-state":Xu(v.open),role:"dialog",id:v.contentId,...h,...u,ref:t,style:{...u.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),qu="PopoverClose",Iw=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wt(qu,n);return p.jsx(ie.button,{type:"button",...r,ref:t,onClick:ee(e.onClick,()=>o.onOpenChange(!1))})});Iw.displayName=qu;var jw="PopoverArrow",Lw=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=zn(n);return p.jsx(zr,{...o,...r,ref:t})});Lw.displayName=jw;function Xu(e){return e?"open":"closed"}var $w=Wu,Fw=Hu,zw=Uu,Ww=Yu,Bw=Ku;function Hw({...e}){return p.jsx($w,{"data-slot":"popover",...e})}function Vw({...e}){return p.jsx(zw,{"data-slot":"popover-trigger",...e})}function Uw({className:e,align:t="center",sideOffset:n=4,...r}){return p.jsx(Ww,{children:p.jsx(Bw,{"data-slot":"popover-content",align:t,sideOffset:n,className:se("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...r})})}function Yw({...e}){return p.jsx(Fw,{"data-slot":"popover-anchor",...e})}var Kw="Toggle",Zu=S.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:o,...s}=e,[i=!1,a]=Tt({prop:n,onChange:o,defaultProp:r});return p.jsx(ie.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:ee(e.onClick,()=>{e.disabled||a(!i)})})});Zu.displayName=Kw;var Gw=Zu;const qw=fs("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function Xw({className:e,variant:t,size:n,...r}){return p.jsx(Gw,{"data-slot":"toggle",className:se(qw({variant:t,size:n,className:e})),...r})}const Zw=()=>{const[e,t]=R.useState(!1);return p.jsx(Ds,{children:p.jsxs(tl,{children:[p.jsx(nl,{asChild:!0,children:p.jsx("div",{children:p.jsx(Xw,{className:"group size-10 p-0 hover:bg-indigo-50 hover:text-indigo-500 data-[state=on]:bg-indigo-50 data-[state=on]:text-indigo-500","aria-label":"Bookmark this",variant:e?"default":"outline",pressed:e,onPressedChange:t,children:p.jsx(lp,{size:16,strokeWidth:2,"aria-hidden":"true"})})})}),p.jsx(rl,{className:"border border-input bg-popover px-2 py-1 text-xs text-muted-foreground",children:p.jsx("p",{children:e?"Remove bookmark":"Bookmark this"})})]})})},Jw=({options:e,onChange:t})=>p.jsxs(bw,{onValueChange:n=>t(n),defaultValue:e[1].text,children:[p.jsx(xw,{className:"w-[180px]",children:p.jsx(ww,{placeholder:"view"})}),p.jsx(Sw,{children:e.map(n=>p.jsx(Cw,{value:n.text,children:n.text},n.text))})]}),Qw=[{text:"teste1",onClick:()=>console.log("teste1")},{text:"teste2",onClick:()=>console.log("teste2")}],ex=5,tx=0,nx=({side:e,xAxis:t,yAxis:n,updatePosition:r,children:o})=>{const{attributes:s,listeners:i,setNodeRef:a,transform:c,setActivatorNodeRef:l}=us({id:"booking-info-id",data:{type:"booking-info-options"}}),d=en(v=>v.updateIsDragging),u={transform:`translate3d(${t+((c==null?void 0:c.x)||0)}px, ${n+((c==null?void 0:c.y)||0)}px, 0)`};return kn({onDragStart(){d(!0)},onDragEnd(v){v.active.id&&r(c)}}),p.jsx(Uw,{ref:a,updatePositionStrategy:"optimized",side:e,align:"start",sticky:"always",sideOffset:ex,alignOffset:tx,style:{...u,width:"25rem"},children:p.jsxs("div",{className:"grid gap-3",children:[p.jsx("input",{type:"text",style:{position:"absolute",opacity:0,height:0,width:0}}),p.jsxs("div",{className:"flex justify-end gap-1",children:[p.jsx("div",{ref:l,className:"w-full cursor-move",...s,...i}),p.jsx(Zw,{}),p.jsx(Et,{type:"button",variant:"outline",size:"icon",children:p.jsx(Pp,{className:"h-3 w-3"})}),p.jsx(Et,{type:"button",variant:"outline",size:"icon",onClick:()=>{},children:p.jsx(Ip,{className:"h-3 w-3"})}),p.jsx(Jw,{options:Qw,onChange:()=>{}})]}),o]})})},Ea={xAxis:0,yAxis:0},Ju=({isEditingOpen:e,side:t,booking:n,onOpenChange:r,children:o})=>{const[s,i]=R.useState({...Ea}),a=en(h=>h.updateIsDragging),c=R.useMemo(()=>`${Q.dateAndHourDateToString(n.startAt)} - ${Q.dateAndHourDateToString(n.finishAt)}`,[n.startAt,n.finishAt]),l=R.useMemo(()=>{const h=new Date(n.startAt),C=h.getDate(),g=h.getDay(),x=Wt[h.getMonth()];return p.jsx("span",{children:`${Ed[g]}, ${C} ${x}`})},[n.startAt]),d=()=>({backgroundColor:""}),u=h=>{h||console.info("No transform info to show "),i({xAxis:s.xAxis+((h==null?void 0:h.x)||0),yAxis:s.yAxis+((h==null?void 0:h.y)||0)})};kn({onDragStart(h){const C=h.active.data.current,g=h.active.id,x=C.type==="booking-info-options";g&&x&&a(!0)}});const v=h=>{h===!1&&i({...Ea}),r(h)};return p.jsxs(Hw,{open:e,onOpenChange:v,defaultOpen:!1,children:[p.jsx(Yw,{style:{width:"100%"},children:p.jsx(Vw,{asChild:!0,children:o})}),p.jsx(ls,{children:p.jsx(nx,{side:t,xAxis:s.xAxis,yAxis:s.yAxis,updatePosition:u,children:p.jsxs("div",{className:"bookingCard_content",children:[p.jsx("span",{style:d(),className:"flex h-4 w-4 translate-y-0 rounded-sm"}),p.jsx("div",{className:"space-y-1",children:p.jsxs("p",{className:"text-sm text-muted-foreground",children:[l," | ",c]})})]})})})]})};Ju.displayName="BookingInfoOptions";const Da=({booking:e,slotData:t,cardsQuantity:n=1,cardIndex:r=0,lastCard:o=!1,half:s=!1,ref:i})=>{const{bookingViewType:a}=xe(),[c,l]=R.useState({...e}),[d,u]=R.useState(!1),v=R.useRef("left"),h=()=>{const m=t.day.split(":")[0].trim();if(a===re.DAY)v.current="top";else switch(m){case"Mon":case"Sun":v.current="right";break;default:v.current="left";break}u(!0)},C=async m=>{try{l(T=>({...T,finishAt:m}))}catch(T){console.log(T)}},g=async m=>{l(T=>({...T,startAt:m}))},x=async m=>{try{l(T=>({...T,finishAt:m}))}catch(T){console.log(T)}},{state:y,heightStyle:f,topHeightIncrement:w,onResize:D}=Ks({booking:c,onAddTime:C,onAddStartTime:g,onSubTime:x,starter:!0});return R.useImperativeHandle(i,()=>({bookingId:e.id}),[e.id]),p.jsx(Ju,{booking:c,onOpenChange:u,side:a===re.DAY?"top":"left",isEditingOpen:d,children:p.jsx(Us,{resizableParam:{state:y,onResize:D,resizeHandle:["s","n"]},customClasses:"Draggable",bookingInit:c,bookingViewType:a,slotData:t,topHeightIncrement:w,heightStyle:f,onClick:h,half:s,lastCard:o,cardsQuantity:n,cardIndex:r})})},or=({bookings:e,blockTimeString:t,slotData:n})=>{if(!e||!(n!=null&&n.day)&&!(n!=null&&n.hour))return null;const r=e.filter(o=>Q.dateAndHourDateToString(new Date(o.startAt)).split(":")[1]===t);if(!(!r||!(r!=null&&r.length)))return r.length===1?p.jsx(Da,{booking:r[0],slotData:n}):p.jsx(p.Fragment,{children:r.map((o,s)=>p.jsx(Da,{booking:o,half:!0,slotData:n,lastCard:r.length-1===s,cardsQuantity:r.length,cardIndex:s},o.id))})};var rx="Separator",Ta="horizontal",ox=["horizontal","vertical"],Qu=S.forwardRef((e,t)=>{const{decorative:n,orientation:r=Ta,...o}=e,s=sx(r)?r:Ta,a=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return p.jsx(ie.div,{"data-orientation":s,...a,...o,ref:t})});Qu.displayName=rx;function sx(e){return ox.includes(e)}var ix=Qu;function ax({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return p.jsx(ix,{"data-slot":"separator-root",decorative:n,orientation:t,className:se("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}const cx=fs("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function lx({className:e,variant:t,...n}){return p.jsx("div",{className:se(cx({variant:t}),e),...n})}const ux=({dateToRender:e,isFirstDay:t})=>p.jsx("div",{style:{left:t?"3px":"10px"},className:"first_day_slot",children:p.jsx("span",{children:p.jsx(lx,{children:e})})});class dx{constructor(){xt(this,"positionBasedOnSeconds",t=>{const[,n]=t.split(":");if(!t.length)return-3;const r=Number(n);return this.normalizingMinutes(r)});xt(this,"normalizingMinutes",t=>t>=0&&t<=15?t*2:t>15&&t<30?(t-15)*2:t>=30&&t<=59?t-30:-3);xt(this,"isInitialMinute",t=>t>=0&&t<=8);xt(this,"isSameHour",(t,n)=>n.split(":")[0]===t)}}class fx{constructor(){xt(this,"is15MinLess",t=>{const n=new Date,[r,o]=t.split(":"),s=new Date(n.getFullYear(),n.getMonth(),n.getDate(),Number(r),Number(o),0),i=new Date(n),a=Q.roundMinutes(n.getMinutes());i.setHours(n.getHours(),a,0,0);const c=Q.minuteDifference(s,i);return c>30||c<-30});xt(this,"normalizeDateNow",t=>{const n=t.getHours(),r=Q.roundMinutes(t.getMinutes());return`${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`})}}const sr=({color:e="#000",isFirstDay:t,slotData:n})=>{const{timesRendered:r,bookingViewType:o}=xe(),[s,i]=R.useState(""),[a,c]=R.useState(!1),[l,d]=R.useState(!1),u=R.useMemo(()=>{const f=new Date,w=new Date(n.key);return w.getDay()===f.getDay()&&w.getDate()===f.getDate()},[n.key]),v=f=>{i(f)},h=()=>{c(!0)},C=()=>{c(!1)},g=R.useMemo(()=>new dx().positionBasedOnSeconds(s),[n.time,s,r]),x=R.useMemo(()=>t?"101%":o===re.DAY?"102%":"104%",[t,o]),y=R.useMemo(()=>u?{top:`${g-2}px`,left:t?"-1px":"-3px",width:t?"101%":"104%"}:{top:`${g-1}px`,left:t?"-1px":"0px",width:x},[u,t,x,g]);if(R.useEffect(()=>{const f=n.time,w=new fx,D=()=>{const T=new Date,b=w.normalizeDateNow(T),E=Q.dateAndHourDateToString(T);s!==E&&v(E),d(b===f)};let m;return w.is15MinLess(f)||(m=setInterval(()=>D(),1e3)),()=>clearInterval(m)},[n.time,s]),!!l)return p.jsxs("div",{style:{...y},className:se("timeIndicator_today",u&&x,u&&"timeIndicator_today_circle"),onMouseEnter:h,onMouseOut:C,onBlur:()=>{},children:[p.jsx(ax,{className:"focus-effect",style:{height:u?"4px":"2px",backgroundColor:e}}),a&&p.jsx(ux,{isFirstDay:t,dateToRender:s})]})},Ra=({bookings:e,first:t,second:n,third:r,fourth:o,disabledCss:s,firstDay:i,dayHour:a})=>{const{setEmptySlotNode:c,emptySlotNodes:l}=Mt(),d=R.useCallback((u,v)=>{if(!u)return;const h=dr(v);l.get(h)||c(u,v)},[c,l]);return p.jsxs(p.Fragment,{children:[p.jsx(rr,{ref:u=>d(u,{key:t.key,time:t.time}),slotData:t,disabledCss:s,events:{onMouseEnterEvent:()=>"first"},slotPosition:"first",actualTimerIndicatorChildren:p.jsx(sr,{isFirstDay:i,slotData:t}),children:p.jsx(or,{bookings:e,blockTimeString:"00",slotData:a})}),p.jsx(rr,{ref:u=>d(u,{key:n.key,time:n.time}),slotData:n,disabledCss:s,events:{onMouseEnterEvent:()=>"second"},slotPosition:"second",actualTimerIndicatorChildren:p.jsx(sr,{isFirstDay:i,slotData:n}),children:p.jsx(or,{bookings:e,blockTimeString:"15",slotData:a})}),p.jsx(rr,{ref:u=>d(u,{key:r.key,time:r.time}),slotData:r,disabledCss:s,events:{onMouseEnterEvent:()=>"third"},slotPosition:"third",actualTimerIndicatorChildren:p.jsx(sr,{isFirstDay:i,slotData:r}),children:p.jsx(or,{bookings:e,blockTimeString:"30",slotData:a})}),p.jsx(rr,{ref:u=>d(u,{key:o.key,time:o.time}),slotData:o,disabledCss:s,events:{onMouseEnterEvent:()=>"fourth"},slotPosition:"fourth",actualTimerIndicatorChildren:p.jsx(sr,{isFirstDay:i,slotData:o}),children:p.jsx(or,{bookings:e,blockTimeString:"45",slotData:a})})]})},px=R.memo(({firstDay:e,booking:t,dayHour:n,disabledCss:r,firstBlockTimeData:o,secondBlockTimeData:s,thirdBlockTimeData:i,fourthBlockTimeData:a})=>{const{day:c,hour:l}=n,d=R.useMemo(()=>t.filter(u=>{const v=Q.dateAndHourDateToString(u.startAt),h=new Date(u.startAt).getDate(),C=new Date(c).getDate(),g=l.split(":")[0];return v.split(":")[0]===g&&h===C}),[t,n]);return d.length?p.jsx(Ra,{dayHour:n,bookings:d,first:o,second:s,third:i,fourth:a,disabledCss:r,firstDay:e}):p.jsx(Ra,{first:o,second:s,third:i,fourth:a,disabledCss:r,firstDay:e})}),hx=({dayHour:e,firstDay:t,bookingBulk:n})=>{const r=R.useRef(""),o=ou(m=>m.updateStartAt),{bookingViewType:s}=xe(Bs(m=>({bookingViewType:m.bookingViewType}))),i=R.useMemo(()=>Q.addMinuteToHour(e.hour,15),[e.hour]),a=R.useMemo(()=>Q.addMinuteToHour(e.hour,30),[e.hour]),c=R.useMemo(()=>Q.addMinuteToHour(e.hour,45),[e.hour]),{isOver:l,setNodeRef:d}=Hn({id:`${Q.newDateKey(e.day,e.hour)}`,data:{accepts:["booking-slots"]}}),{isOver:u,setNodeRef:v}=Hn({id:`${Q.newDateKey(e.day,i)}`,data:{accepts:["booking-slots"]}}),{isOver:h,setNodeRef:C}=Hn({id:`${Q.newDateKey(e.day,a)}`,data:{accepts:["booking-slots"]}}),{isOver:g,setNodeRef:x}=Hn({id:`${Q.newDateKey(e.day,c)}`,data:{accepts:["booking-slots"]}});R.useEffect(()=>{l&&o(`${Q.newDateKey(e.day,e.hour)}`),u&&o(`${Q.newDateKey(e.day,i)}`),h&&o(`${Q.newDateKey(e.day,a)}`),g&&o(`${Q.newDateKey(e.day,c)}`)},[l,u,h,g]);const y=R.useMemo(()=>({ref:d,style:{backgroundColor:l?"#0066ff":""},key:Q.newDateKey(e.day,e.hour),time:e.hour}),[e.day,l,e.hour,d]),f=R.useMemo(()=>({ref:v,style:{backgroundColor:u?"#0066ff":""},key:Q.newDateKey(e.day,i),time:i}),[e.day,u,i,v]),w=R.useMemo(()=>({ref:C,style:{backgroundColor:h?"#0066ff":""},key:Q.newDateKey(e.day,a),time:a}),[e.day,h,a,C]),D=R.useMemo(()=>({ref:x,style:{backgroundColor:g?"#0066ff":""},key:Q.newDateKey(e.day,c),time:c}),[e.day,c,g,x]);return p.jsx("td",{className:se("slot",s===re.WEEK&&"slotWeek"),children:p.jsx(px,{booking:n,dayHour:e,firstDay:t,disabledCss:r.current,firstBlockTimeData:y,secondBlockTimeData:f,thirdBlockTimeData:w,fourthBlockTimeData:D})},`${e.day}-${e.hour}-slot`)};function gx({className:e,...t}){return p.jsx("div",{"data-slot":"table-container",className:"relative w-full z-10 overflow-hidden",children:p.jsx("table",{"data-slot":"table",className:se("w-full caption-bottom text-sm",e),...t})})}function mx({className:e,...t}){return p.jsx("td",{"data-slot":"table-cell",className:se("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}const vx=({hour:e,ref:t})=>{const n="Set lunch interval",r="Remove lunch interval",o="Hour options",s=R.useRef(null),i="border-solid hover:border-b-2 hover:border-b-purple-600 border-b-white",a=()=>{s!=null&&s.current&&s.current.setAttribute("class",se("activateVisibilityTime",i))};return R.useImperativeHandle(t,()=>({setActivateHour:a})),p.jsxs(Fs,{children:[p.jsx(zs,{children:p.jsx("span",{ref:s,className:se(i),children:e})}),p.jsxs(Ws,{children:[p.jsx(Wy,{children:o}),p.jsx(By,{}),p.jsx(Gi,{children:n}),p.jsx(Gi,{children:r})]})]})},yx=()=>{const{hours:e,daysOfWeek:t,bookingViewType:n,bookingBulkData:r,addTimesRendered:o}=xe(Bs(g=>({addTimesRendered:g.addTimesRendered,bookingBulkData:g.bookingBulkData,bookingViewType:g.bookingViewType,daysOfWeek:g.daysOfWeek,hours:g.hours}))),{selectedNode:s,emptySlotNodes:i}=Mt(),{finishAt:a,updateFinishAtWithOffset:c}=ts(g=>g),[l]=R.useState({startAt:"12:00",finishAt:"12:30"}),d=R.useCallback((g,x)=>{g&&o(g,x)},[o]),u=R.useMemo(()=>n===re.DAY?{maxWidth:"5rem",padding:0,minWidth:"4rem"}:{},[n]),v=R.useMemo(()=>({borderLeft:"none",backgroundColor:"white"}),[]),h=R.useMemo(()=>s.split(";")[1],[s]);return R.useEffect(()=>{if(s){const g=i.get(s);g==null||g.showEvent(h)}},[s,i]),R.useEffect(()=>{h===a&&c(h)},[s,a]),R.useMemo(()=>{const g=x=>x===0;return p.jsx("div",{className:se("calendarCore",n===re.WEEK&&"calendarCore_max"),children:p.jsx(gx,{children:p.jsx("tbody",{children:e.map(x=>p.jsxs("tr",{children:[p.jsx(mx,{style:{...v,...u,padding:0,position:"relative"},className:"calendarCore_cell",children:p.jsx("div",{className:"calendarCore_actions",children:p.jsx(vx,{ref:y=>d(y,x),hour:x})})},`${x}-hour`),t.map((y,f)=>p.jsx(hx,{dayHour:{day:String(y),hour:x},lunchTimeBlock:l,firstDay:g(f),bookingBulk:r.booking},`${y}-${x}-slot-content`))]},`${x}-content`))})})})},[u,e,v,r.booking,d,n,t,t.length])},bx=({isLoading:e})=>{const{bookings:t}=Qe(),n={distance:5},{setBookingBulkData:r,optimisticCardUpdate:o}=xe(),{onCardDropCallback:s}=Qe(),i=Ud(ci(ec,{activationConstraint:n}),ci(tc,{activationConstraint:n})),{bookingViewType:a,daysOfWeek:c}=xe(),l=R.useCallback(h=>{const{active:C}=h;C.id},[]),d=async(h,C,g)=>{try{const{startAt:x,finishAt:y}=Q.bookingTimeRange(h,C);o(h,x,y,g),await s(h,C,g,{id:h.id,startAt:x,finishAt:y})}catch(x){console.warn(x)}},u=h=>{const{over:C,active:g}=h;if(C&&g){const x=C.data.current,y=g.data.current;y&&x&&x.accepts.includes(y.type)&&y.booking.id&&C.id&&d(y.booking,String(C.id),y.slotData)}},v={position:"absolute",top:"50%",left:"50%",transform:"translate('-50%', '-50%')",zIndex:100};return R.useEffect(()=>{r({user:gb,booking:t})},[t,r]),p.jsxs("div",{className:"calendarHolder",children:[p.jsx(lb,{...ru,children:p.jsxs("div",{className:"calendarHolder_parent",children:[p.jsx(tb,{}),p.jsxs("div",{className:"calendarHolder_parent_content",children:[p.jsx(Gy,{daysOfWeek:c,bookingViewType:a}),p.jsx(nb,{children:p.jsx(ls,{onDragEnd:u,onDragStart:l,sensors:i,children:p.jsx(yx,{})})})]})]})}),p.jsx(hb,{color:"#000000aa",loading:e,cssOverride:v,size:15,"aria-label":"Loading Spinner","data-testid":"GridLoader"})]})},wx=({viewModes:e,createBookingModal:t,onChangeViewType:n,onCardDropCallback:r,onCardResizeEnd:o,onDayChange:s,onHeaderDayClick:i,onTodayClick:a,onSlotClick:c,onModalClose:l,bookings:d,isTimeInfoVisible:u,systemColor:v,ref:h})=>{const[C,g]=R.useState(!1),x=R.useRef(null),{setBookingViewType:y,setWeekAndViewType:f,setTodayDayAndViewType:w,bookingViewType:D,setTodayDay:m,todayWeek:T}=xe(),{setSelectedNode:b}=Mt(A=>A),E=A=>{var W;console.log("hour24Format",A),(W=x==null?void 0:x.current)==null||W.updateFinishAt(A)},M=A=>{m(new Date(A))},N=A=>{T(new Date(A))};return R.useImperativeHandle(h,()=>({updateViewType:A=>y(A),updateWeekAndViewType:A=>f(A),updateTodayDayAndViewType:A=>w(A),updateSelectedNode:A=>{setTimeout(()=>{b(A)},10)},updateFinishAt:A=>E(A),changeLoading:A=>g(A),goToDay:A=>M(A),goToWeek:A=>N(A)})),R.useEffect(()=>{n(D)},[D]),p.jsx(ab,{isTimeInfoVisible:u,systemColor:v,children:p.jsx(rb,{...ka,children:p.jsx(ob,{createBookingModal:t,viewModes:e,onHeaderDayClick:i,onTodayClick:a,onCardDropCallback:r,onCardResizeEnd:o,onDayChange:s,onSlotClick:c,onModalClose:l,bookings:d,children:p.jsx(_d,{ref:x,...Po,children:p.jsx(bx,{isLoading:C})})})})})},xx=e=>{const t=R.useRef(null),n=()=>{if(!(t!=null&&t.current))throw new cd};return{getCalendar:()=>p.jsx(wx,{ref:t,...e}),updateViewType:v=>{var h;n(),(h=t.current)==null||h.updateViewType(v)},updateWeekAndViewType:v=>{var h;return n(),(h=t.current)==null?void 0:h.updateWeekAndViewType(v)},updateTodayDayAndViewType:v=>{var h;return n(),(h=t.current)==null?void 0:h.updateTodayDayAndViewType(v)},updateSelectedNode:v=>{var h;n(),(h=t.current)==null||h.updateSelectedNode(v)},updateFinishAt:v=>{var h;n(),(h=t.current)==null||h.updateFinishAt(v)},changeLoading:v=>{var h;n(),(h=t.current)==null||h.changeLoading(v)},goToDay:v=>{var h;n(),(h=t.current)==null||h.goToDay(v)},goToWeek:v=>{var h;n(),(h=t.current)==null||h.goToWeek(v)}}};exports.useCalendarInstance=xx;