PageSourceSearch

https://salonify.mx/_next/static/chunks/app/dashboard/calendario/page-0eb66b6f38608d5e.js

js salonify.mx collected 2026-10-02 00:24:30 UTC 45,819 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3152],{6251:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let l=s(52707).A.create({baseURL:"https://salonify.mx/api",headers:{"Content-Type":"application/json"}});l.interceptors.request.use(e=>{{let t=localStorage.getItem("salonify_token");t&&(e.headers.Authorization=`Bearer ${t}`)}return e.data instanceof FormData&&e.headers.delete("Content-Type"),e}),l.interceptors.response.use(e=>e,e=>{if(e.response?.status===401){let t=e.config?.url||"";t.includes("/auth/login")||t.includes("/auth/register")||(localStorage.removeItem("salonify_token"),localStorage.removeItem("salonify_user"),window.location.href="/login")}return Promise.reject(e)});let a=l},31468:(e,t,s)=>{Promise.resolve().then(s.bind(s,91568))},42997:(e,t,s)=>{"use strict";s.d(t,{M:()=>n,u:()=>a});var l=s(12115);let a=(0,l.createContext)({venue:null,venues:[],selectVenue:()=>{},refetchVenues:async()=>{},patchVenue:()=>{}}),n=()=>(0,l.useContext)(a)},91568:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>Y});var l=s(95155),a=s(19749),n=s(12115),o=s(82222),r=s(73549),i=s.n(r),c=s(6251),d=s(15266),x=s(99903),m=s(71395),u=s(65791),p=s(79401),h=s(46063),f=s(62874),b=s(2086),g=s(44951),y=s(357),v=s(58708),j=s(75162),F=s(31163),E=s(92558),N=s(61198),k=s(2513),w=s(42997);let C=[{targetId:"tutorial-calendar",icon:"\uD83D\uDCC5",title:"Selecciona un d\xeda",body:"Haz clic en cualquier d\xeda del calendario para ver/crear una reservaci\xf3n. Ya seleccionamos el \xfaltimo d\xeda del mes para que puedas practicar."},{targetId:"tutorial-add-booking",icon:"\uD83D\uDCCB",title:"Agregar reservaci\xf3n",body:"Con un d\xeda seleccionado, usa este bot\xf3n para registrar una reservaci\xf3n manual: boda, XV a\xf1os, corporativo y m\xe1s."},{targetId:"tutorial-block-date",icon:"\uD83D\uDD12",title:"Bloquear fecha",body:"Bloquea fechas por mantenimiento, evento privado u otro motivo. Los clientes n
1o podr\xe1n solicitar ese d\xeda desde el portal."},{targetId:"tutorial-legend",icon:"\uD83C\uDFA8",title:"Colores del calendario",body:"\uD83D\uDFE1 Pendiente — solicitud online esperando tu aprobaci\xf3n. Entra al detalle y presiona Aprobar para confirmarla o Rechazar sin cargo al cliente.\n\uD83D\uDFE2 Online confirmada — reservaci\xf3n confirmada.\n\uD83D\uDD35 Manual (Due\xf1o) — capturada por ti.\n\uD83D\uDFE3 Manual (coord.) — capturada por un coordinador.\n\uD83D\uDD34 Bloqueado — fecha no disponible."},{targetId:"tutorial-stats",icon:"\uD83D\uDCCA",title:"Resumen del mes",body:"Aqu\xed ver\xe1s en todo momento las reservaciones pendientes de aprobar, las confirmadas activas y el ingreso total del mes."},{targetId:"tutorial-chatbot",icon:"\uD83D\uDCAC",title:"\xbfTienes alguna duda?",body:"Si tienes alguna duda o pregunta no dudes en contactarnos. Nuestra asistente Alina est\xe1 disponible en todo momento para ayudarte."}],A=e=>`salonify_tutorial_done_${e}`;function S(e){let t,s,o,r,i,d,x,m,u,p,h,f,b,g,y,v,j,F,E,N,k,w,S,M,z,$,I,L,P,T,R,q,O,G,H,V,X,W,Y,U,J,K,Q,Z,ee,et=(0,a.c)(96),{venueId:es,onSelectLastDay:el}=e,[ea,en]=(0,n.useState)(0),[eo,er]=(0,n.useState)(!1),[ei,ec]=(0,n.useState)(null),[ed,ex]=(0,n.useState)(!1);et[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{let e=()=>ex(window.innerWidth<768);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},s=[],et[0]=t,et[1]=s):(t=et[0],s=et[1]),(0,n.useEffect)(t,s),et[2]!==es?(o=()=>{!es||localStorage.getItem(A(es))||c.A.get(`/bookings/has-any/${es}`).then(e=>{let{data:t}=e;t.exists?localStorage.setItem(A(es),"1"):er(!0)}).catch(()=>er(!0))},r=[es],et[2]=es,et[3]=o,et[4]=r):(o=et[3],r=et[4]),(0,n.useEffect)(o,r),et[5]!==el||et[6]!==ea||et[7]!==eo?(i=()=>{eo&&0===ea&&el()},d=[eo,ea,el],et[5]=el,et[6]=ea,et[7]=eo,et[8]=i,et[9]=d):(i=et[8],d=et[9]),(0,n.useEffect)(i,d),et[10]!==ea?(x=()=>{let e=document.getElementById(C[ea]?.targetId);ec(e?e.getBoundingClientRect():null)},et[10]=ea,et[11]=x):x=et[11];let em=x;et[12]!==em||et[13]!==eo?(m=()=>{if(!eo)return;let e=setTimeout(em,150),t=setTimeout(em,400);return window.addEventListener("resize",em),window.addEventListener("scroll",em,!0),()=>{clearTimeout(e),clearTimeout(t),window.removeEventListener("resize",em),window.removeEventListener("scroll",em,!0)}},u=[eo,em],et[12]=em,et[13]=eo,et[14]=m,et[15]=u):(m=et[14],u=et[15]),(0,n.useEffect)(m,u),et[16]!==ea||et[17]!==eo?(p=()=>
1{if(!eo)return;let e=document.getElementById(C[ea]?.targetId);e&&e.scrollIntoView({behavior:"smooth",block:"center"})},h=[ea,eo],et[16]=ea,et[17]=eo,et[18]=p,et[19]=h):(p=et[18],h=et[19]),(0,n.useEffect)(p,h),et[20]!==es?(f=()=>{localStorage.setItem(A(es),"1"),er(!1)},et[20]=es,et[21]=f):f=et[21];let eu=f;et[22]!==eu||et[23]!==ea?(b=()=>ea<C.length-1?en(_):eu(),et[22]=eu,et[23]=ea,et[24]=b):b=et[24];let ep=b;et[25]!==ea?(g=()=>ea>0&&en(D),et[25]=ea,et[26]=g):g=et[26];let eh=g;if(!eo)return null;let ef=C[ea];et[27]!==ei||et[28]!==ed?(y=()=>{let e=window.innerHeight;if(!ei)return{position:"fixed",bottom:ed?16:80,left:"50%",transform:"translateX(-50%)"};let t=ei.bottom+8,s=ei.top-8;return e-t>=276?{position:"fixed",top:t+16,left:"50%",transform:"translateX(-50%)"}:s>=276?{position:"fixed",top:Math.max(16,s-260-16),left:"50%",transform:"translateX(-50%)"}:{position:"fixed",bottom:ed?16:80,left:"50%",transform:"translateX(-50%)"}},et[27]=ei,et[28]=ed,et[29]=y):y=et[29];let eb=y;et[30]===Symbol.for("react.memo_cache_sentinel")?(v=(0,l.jsx)("div",{className:"fixed inset-0",style:{zIndex:9990,background:"rgba(0,0,0,0.45)",pointerEvents:"none"}}),et[30]=v):v=et[30],et[31]!==ei?(j=ei&&(0,l.jsx)("div",{style:{position:"fixed",top:ei.top-8,left:ei.left-8,width:ei.width+16,height:ei.height+16,zIndex:9991,borderRadius:14,border:"2.5px solid #6A3EF5",boxShadow:"0 0 0 4px rgba(106,62,245,0.25)",pointerEvents:"none",transition:"all 0.25s ease"}}),et[31]=ei,et[32]=j):j=et[32],et[33]!==eb?(F={...eb(),width:"min(420px, calc(100vw - 32px))",zIndex:9999},et[33]=eb,et[34]=F):F=et[34],et[35]===Symbol.for("react.memo_cache_sentinel")?(E={background:"#fff",boxShadow:"0 8px 40px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.12)",border:"1.5px solid #E8E8E8"},N={height:3,background:"#EDE8FE"},et[35]=E,et[36]=N):(E=et[35],N=et[36]);let eg=`${(ea+1)/C.length*100}%`;et[37]!==eg?(k=(0,l.jsx)("div",{style:N,children:(0,l.jsx)("div",{style:{height:"100%",width:eg,background:"linear-gradient(90deg, #6A3EF5, #8B5CF6)",transition:"width 0.3s ease"}})}),et[37]=eg,et[38]=k):k=et[38];let ey=ed?"p-4":"p-5";et[39]===Symbol.for("react.memo_cache_sentinel")?(w={background:"#EDE8FE"},et[39]=w):w=et[39],et[40]!==ef.icon?(S=(0,l.jsx)("div",{className:"w-9 h-9 rounded-xl flex items-center justify-center text-lg shrink-0",style:w,children:ef.icon}),et[40]=ef.icon,et[41]=S):S=et[41],et[42]===Symbol.for("react.memo_cache_sentinel")?(M={color:"#6A3EF5"},et[42]=M):M=et[42];let ev=ea+1;et[43]!==ev?(z=(0,l.jsxs)("span",{className:"text-xs font-semibold",style:M,children:["Paso ",ev," de ",C.length]}),et[43]=ev,et[44]=z):z=et[44],et[45]===Symbol.for("react.memo_cache_sentinel")?($={color:"#9CA3AF"},et[45]=$):$=et[45],et[46]!==eu?(I=(0,l.jsx)("button",{onClick:eu,className:"text-xs",style:$,children:"Saltar ✕"}),et[46]=eu,et[47]=I):I=et[47],et[48]!==z||et[49]!==I?(L=(0,l.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[z,I]}),et[48]=z,et[49]=I,et[50]=L):L=et[50];let ej=`font-black mt-0.5 ${ed?"text-sm":"text-base"}`;et[51]===Symbol.for("react.memo_cache_sentinel")?(P={color:"#1A1A1A"},et[51]=P):P=et[51],et[52]!==ef.title||et[53]!==ej?(T=(0,l.jsx)("h3",{className:ej,style:P,children:ef.title}),et[52]=ef.title,et[53]=ej,et[54]=T):T=et[54],et[55]!==L||et[56]!==T?(R=(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[L,T]}),et[55]=L,et[56]=T,et[57]=R):R=et[57],et[58]!==S||et[59]!==R?(q=(0,l.jsxs)("div",{className:"flex items-start gap-3 mb-2",children:[S,R]}),et[58]=S,et[59]=R,et[60]=q):q=et[60];let eF=`leading-relaxed mb-3 whitespace-pre-line ${ed?"text-xs":"text-sm"}`;et[61]===Symbol.for("react.memo_cache_sentinel")?(O={color:"#6B6B6B"},et[61]=O):O=et[61],et[62]!==ef.body||et[63]!==eF?(G=(0,l.jsx)("p",{className:eF,style:O,children:ef.body}),et[62]=ef.body,et[63]=eF,et[64]=G):G=et[64],et[65]!==ea?(H=C.map((e,t)=>(0,l.jsx)("div",{className:"rounded-full transition-all",style:{width:t===ea?18:6,height:6,background:t===ea?"#6A3EF5":t<ea?"#C4B5FD":"#E8E8E8"}},t)),et[65]=ea,et[66]=H):H=et[66],et[67]!==H?(V=(0,l.jsx)("div",{className:"flex gap-1.5",children:H}),et[67]=H,et[68]=V):V=et[68],et[69]!==eh||et[70]!==ea?(X=ea>0&&(0,l.jsx)("button",{onClick:eh,className:"px-3 py-2 rounded-xl text-xs font-bold",style:{border:"1.5px solid #E8E8E8",color:"#6B6B6B",background:"#fff"},children:"← Atr\xe1s"}),et[69]=eh,et[70]=ea,et[71]=X):X=et[71],et[72]===Symbol.for("react.memo_cache_sentinel")?(W={background:"linear-gradient(135deg, #6A3EF5, #8B5CF6)"},et[72]=W):W=et[72];let eE=ea===C.length-1?"\xa1Listo! \uD83C\uDF89":"Siguiente →";return et[73]!==ep||et[74]!==eE?(Y=(0,l.jsx)("button",{onClick:ep,className:"px-4 py-2 rounded-xl text-xs font-bold text-white",style:W,children:eE}),et[73]=ep,et[74]=eE,et[75]=Y):Y=et[75],et[76]!==X||et[77]!==Y?(U=(0,l.jsxs)("div",{className:"flex gap-2",children:[X,Y]}),et[76]=X,et[77]=Y,et[78]=U):U=et[78],et[79]!==V||et[80]!==U?(J=(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[V,U]}),et[79]=V,et[80]=U,et[81]=J):J=et[81],et[82]!==ey||et[83]!==q||et[84]!==G||et[85]!==J?(K=(0,l.jsxs)("div",{className:ey,children:[q,G,J]}),et[82]=ey,et[83]=q,et[84]=G,et[85]=J,et[86]=K):K=et[86],et[87]!==k||et[88]!==K?(Q=(0,l.jsxs)("div",{className:"rounded-2xl overflow-hidden",style:E,children:[k,K]}),et[87]=k,et[88]=K,et[89]=Q):Q=et[89],et[90]!==F||et[91]!==Q?(Z=(0,l.jsx)("div",{style:F,onClick:B,children:Q}),et[90]=F,et[91]=Q,et[92]=Z):Z=et[92],et[93]!==j||et[94]!==Z?(ee=(0,l.jsxs)(l.Fragment,{children:[v,j,Z]}),et[93]=j,et[94]=Z,et[95]=ee):ee=et[95],ee}function B(e){return e.stopPropagation()}function D(e){return e-1}function _(e){return e+1}let M={basic:"B\xe1sico",plus:"Plus",premium:"Premium"},z={basic:{bg:"#F0F9FF",color:"#0369A1",border:"#BAE6FD"},plus:{bg:"#EDE8FE",color:"#6A3EF5",border:"#C4B5FD"},premium:{bg:"#FFFBEB",color:"#92400E",border:"#FCD34D"}},$={basic:"\uD83D\uDCCB",plus:"⭐",premium:"\uD83D\uDC51"},I=["Dom","Lun","Mar","Mi\xe9","Jue","Vie","S\xe1b"],L=["pending","approved","confirmed","tentative"],P={boda:"Boda",xv_anos:"XV A\xf1os",cumpleanos:"Cumplea\xf1os",corporativo:"Corporativo",graduacion:"Graduaci\xf3n",fiesta_infantil:"Fiesta Infantil",bautizo:"Bautizo",primera_comunion:"Primera Comuni\xf3n",baby_shower:"Baby Shower",reunion_familiar:"Reuni\xf3n Familiar",aniversario:"Aniversario",otro:"Otro"};Object.entries(P).map(([e,t])=>({value:e,label:t}));let T={morning:"Ma\xf1ana",afternoon:"Tarde",night:"Noche",full_day:"Todo el d\xeda"};Object.entries(T).map(([e,t])=>({value:e,label:t}));let R=[{color:"#F5B700",label:"Pendiente"},{color:"#22C55E",label:"Online confirmada"},{color:"#3B82F6",label:"Manual (Due\xf1o)"},{color:"#6A3EF5",label:"Manual (coord.)"},{color:"#F97316",label:"Tentativa"},{color:"#EF4444",label:"Bloqueado"}
1,{color:"#9CA3AF",label:"Montaje/Desmontaje"}];function q(e){return"pending"===e.status?"#F5B700":"approved"===e.status?"#22C55E":"tentative"===e.status?"#F97316":"manual_coordinator"===e.source?"#6A3EF5":"manual_owner"===e.source||"confirmed"===e.status?"#3B82F6":"#9CA3AF"}function O(e){let t,s,n,o,r,i,c,d,x,m,u,p=(0,a.c)(19),{b:h}=e;p[0]===Symbol.for("react.memo_cache_sentinel")?(t={bg:"#FFF8E1",color:"#92400E",label:"Pendiente"},s={bg:"#F0FDF4",color:"#15803D",label:"Confirmada"},p[0]=t,p[1]=s):(t=p[0],s=p[1]),p[2]!==h.source?(n="manual_coordinator"===h.source?{bg:"#EDE8FE",color:"#6A3EF5",label:"Manual (coord.)"}:{bg:"#EFF6FF",color:"#1D4ED8",label:"Manual (Due\xf1o)"},p[2]=h.source,p[3]=n):n=p[3],p[4]===Symbol.for("react.memo_cache_sentinel")?(o={bg:"#FFF7ED",color:"#C2410C",label:"Tentativa"},r={bg:"#F9FAFB",color:"#6B7280",label:"Completada"},i={bg:"#FEF2F2",color:"#DC2626",label:"Cancelada"},c={bg:"#FEF2F2",color:"#DC2626",label:"Rechazada"},p[4]=o,p[5]=r,p[6]=i,p[7]=c):(o=p[4],r=p[5],i=p[6],c=p[7]),p[8]!==n?(d={pending:t,approved:s,confirmed:n,tentative:o,completed:r,cancelled:i,rejected:c},p[8]=n,p[9]=d):d=p[9];let f=d;p[10]!==h.status||p[11]!==f?(x=f[h.status]||{bg:"#F9FAFB",color:"#6B7280",label:h.status},p[10]=h.status,p[11]=f,p[12]=x):x=p[12];let b=x;return p[13]!==b.bg||p[14]!==b.color?(m={background:b.bg,color:b.color},p[13]=b.bg,p[14]=b.color,p[15]=m):m=p[15],p[16]!==b.label||p[17]!==m?(u=(0,l.jsx)("span",{className:"text-xs font-bold px-2 py-0.5 rounded-full whitespace-nowrap",style:m,children:b.label}),p[16]=b.label,p[17]=m,p[18]=u):u=p[18],u}let G=[{icon:"\uD83D\uDCF8",title:"Fotos de calidad",body:"Los salones con buenas fotos reciben m\xe1s solicitudes. Tienes 8 espacios: \xfasalos con im\xe1genes del sal\xf3n lleno, la decoraci\xf3n y los espacios exteriores."},{icon:"⚡",title:"Responde r\xe1pido",body:"El 70 % de los clientes elige el primer sal\xf3n que les responde. Acepta o rechaza solicitudes dentro de las primeras 2 horas."},{icon:"\uD83D\uDCAC",title:"Cuida las notas internas",body:"Usa el campo de notas para registrar preferencias del cliente: tipo de m\xfasica, decoraci\xf3n especial o restricciones de acceso."},{icon:"\uD83D\uDCC5",title:"Bloquea fechas anticipadamente",body:"Reserva tus fechas de mantenimiento y eventos privados con anticipaci\xf3n para evitar conflictos de agenda."},{icon:"\uD83D\uDCB0",title:"Anticipo estrat\xe9gico",body:"Solicitar un anticipo del 30–40 % reduce cancelaciones de \xfaltimo momento y asegura el compromiso del cliente."},{icon:"\uD83E\uDD1D",title:"Aprovecha a tus coordinadores",body:"Invita coordinadores para capturar reservaciones mientras t\xfa atiendes otros asuntos. Ellos pueden gestionar la agenda sin acceder a tu configuraci\xf3n."},{icon:"\uD83C\uDFF7️",title:"Precio base visible",body:"Mostrar un precio base claro en tu perfil p\xfablico filtra clientes n
1o calificados y atrae prospectos con mayor intenci\xf3n de compra."},{icon:"\uD83D\uDD14",title:"Revisa tus pendientes",body:"Las solicitudes online vencen en la ventana de aprobaci\xf3n configurada. Entra al dashboard cada ma\xf1ana para no perder ninguna oportunidad."},{icon:"\uD83D\uDCCA",title:"Consulta tus estad\xedsticas",body:"Compara el ingreso mes a mes desde la secci\xf3n de reportes. Identificar tus meses pico te ayuda a ajustar precios y disponibilidad."},{icon:"✉️",title:"Canal de contacto",body:"Registra siempre el canal por donde lleg\xf3 cada cliente (WhatsApp, referido, presencial). Con el tiempo sabr\xe1s qu\xe9 fuente te trae m\xe1s cierres."},{icon:"\uD83D\uDDD3️",title:"Vista semanal",body:"Usa la vista de semana en el calendario cuando tengas muchas reservaciones juntas. Es m\xe1s f\xe1cil detectar conflictos de turno."},{icon:"\uD83C\uDF1F",title:"Solicita rese\xf1as",body:"Despu\xe9s de cada evento completado, pide al cliente que deje una rese\xf1a en tu perfil. Las rese\xf1as aumentan la confianza de futuros clientes."}];function H(){let e,t,s,o,r,i,c,d,x,m,u,p,h,f,b,g,y,v,j,F,E,N,k,w=(0,a.c)(37),[C,A]=(0,n.use
1State)(W),S=G[C];w[0]===Symbol.for("react.memo_cache_sentinel")?(e=()=>A(X),w[0]=e):e=w[0];let B=e;w[1]===Symbol.for("react.memo_cache_sentinel")?(t=()=>A(V),w[1]=t):t=w[1];let D=t;w[2]===Symbol.for("react.memo_cache_sentinel")?(s={borderBottom:"1px solid #E8E8E8"},o=(0,l.jsx)("button",{onClick:B,className:"w-8 h-8 rounded-lg flex items-center justify-center hover:bg-gray-100 font-bold text-gray-500 transition-colors",children:"←"}),w[2]=s,w[3]=o):(s=w[2],o=w[3]),w[4]===Symbol.for("react.memo_cache_sentinel")?(r=(0,l.jsx)("span",{className:"text-xs font-black text-gray-900",children:"\uD83D\uDCA1 Consejos"}),w[4]=r):r=w[4],w[5]===Symbol.for("react.memo_cache_sentinel")?(i={color:"#9CA3AF"},w[5]=i):i=w[5];let _=C+1;return w[6]!==_?(c=(0,l.jsxs)("div",{className:"flex flex-col items-center gap-0.5",children:[r,(0,l.jsxs)("span",{className:"text-xs",style:i,children:[_," de ",G.length]})]}),w[6]=_,w[7]=c):c=w[7],w[8]===Symbol.for("react.memo_cache_sentinel")?(d=(0,l.jsx)("button",{onClick:D,className:"w-8 h-8 rounded-lg flex items-center justify-center hover:bg-gray-100 font-bold text-gray-500 transition-colors",children:"→"}),w[8]=d):d=w[8],w[9]!==c?(x=(0,l.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 flex-shrink-0",style:s,children:[o,c,d]}),w[9]=c,w[10]=x):x=w[10],w[11]===Symbol.for("react.memo_cache_sentinel")?(m={background:"#F3F0FD"},w[11]=m):m=w[11],w[12]===Symbol.for("react.memo_cache_sentinel")?(u={background:"#EDE8FE"},w[12]=u):u=w[12],w[13]!==S.icon?(p=(0,l.jsx)("div",{className:"w-12 h-12 rounded-2xl flex items-center justify-center text-2xl mb-4 flex-shrink-0",style:u,children:S.icon}),w[13]=S.icon,w[14]=p):p=w[14],w[15]===Symbol.for("react.memo_cache_sentinel")?(h={color:"#6A3EF5"},w[15]=h):h=w[15],w[16]!==S.title?(f=(0,l.jsx)("p",{className:"text-sm font-black mb-2",style:h,children:S.title}),w[16]=S.title,w[17]=f):f=w[17],w[18]===Symbol.for("react.memo_cache_sentinel")?(b={color:"#4B3A8C"},w[18]=b):b=w[18],w[19]!==S.body?(g=(0,l.jsx)("p",{className:"text-sm leading-relaxed",style:b,children:S.body}),w[19]=S.body,w[20]=g):g=w[20],w[21]!==p||w[22]!==f||w[23]!==g?(y=(0,l.jsxs)("div",{className:"flex-1 rounded-2xl p-5 flex flex-col",style:m,children:[p,f,g]}),w[21]=p,w[22]=f,w[23]=g,w[24]=y):y=w[24],w[25]!==C?(v=G.map((e,t)=>(0,l.jsx)("button",{onClick:()=>A(t),className:"rounded-full transition-all",style:{width:t===C?16:6,height:6,background:t===C?"#6A3EF5":"#E0D9FF"}},t)),w[25]=C,w[26]=v):v=w[26],w[27]!==v?(j=(0,l.jsx)("div",{className:"flex items-center justify-center gap-1.5 py-1",children:v}),w[27]=v,w[28]=j):j=w[28],w[29]!==y||w[30]!==j?(F=(0,l.jsxs)("div",{className:"flex-1 flex flex-col p-4 gap-3 overflow-y-auto",children:[y,j]}),w[29]=y,w[30]=j,w[31]=F):F=w[31],w[32]===Symbol.for("react.memo_cache_sentinel")?(E={borderTop:"1px solid #E8E8E8"},w[32]=E):E=w[32],w[33]===Symbol.for("react.memo_cache_sentinel")?(N=(0,l.jsx)("div",{className:"px-4 py-3 flex-shrink-0",style:E,children:(0,l.jsx)("p",{className:"text-xs text-center",style:{color:"#9CA3AF"},children:"Haz clic en un d\xeda del calendario para ver sus reservaciones"})}),w[33]=N):N=w[33],w[34]!==F||w[35]!==x?(k=(0,l.jsxs)("div",{className:"flex flex-col h-full",children:[x,F,N]}),w[34]=F,w[35]=x,w[36]=k):k=w[36],k}function V(e){return(e+1)%G.length}function X(e){return(e-1+G.length)%G.length}function W(){let e=sessionStorage.getItem("salonify_tip_idx");if(null!==e)return Number(e);let t=Math.floor(Math.random()*G.length);return sessionStorage.setItem("salonify_tip_idx",String(t)),t}function Y(){let e,t,s,a=(0,o.useRouter)(),{venue:r,venues:C}
1=(0,w.M)(),[A,B]=(0,n.useState)(null),[D,_]=(0,n.useState)(new Date),[G,V]=(0,n.useState)([]),[X,W]=(0,n.useState)([]),[Y,U]=(0,n.useState)(!1),[J,K]=(0,n.useState)(!1),[Q,Z]=(0,n.useState)(""),[ee,et]=(0,n.useState)({pending:0,confirmed:0,totalRevenue:0}),[es,el]=(0,n.useState)(null),ea=e=>{el(e),K(!1),Z("")},en=(0,n.useRef)(null),[eo,er]=(0,n.useState)("month"),[ei,ec]=(0,n.useState)(null),[ed,ex]=(0,n.useState)(null),[em,eu]=(0,n.useState)(""),[ep,eh]=(0,n.useState)(!1),ef=(0,n.useRef)(!1);(0,n.useEffect)(()=>{let e=sessionStorage.getItem("salonify_calendar_date");if(e){let t=new Date(e+"T12:00:00");_(t),el(t),sessionStorage.removeItem("salonify_calendar_date")}},[]),(0,n.useEffect)(()=>{r&&c.A.get(`/subscriptions/my?venueId=${r.id}`).then(e=>B(e.data)).catch(()=>B(null))},[r?.id]);let eb=(0,n.useCallback)(async()=>{if(!r)return;let e=D.getFullYear(),t=D.getMonth()+1;try{let s=(0,d.k)(D,{weekStartsOn:0}),l=(0,x.$)(D,{weekStartsOn:0}),a="week"===eo&&s.getMonth()!==l.getMonth(),n=[c.A.get(`/bookings/calendar/${r.id}?year=${e}&month=${t}`),c.A.get(`/bookings/stats/${r.id}?year=${e}&month=${t}`),c.A.get(`/blocked-dates/venue/${r.id}?year=${e}&month=${t}`)];if(a){let e=s.getMonth()!==D.getMonth()?s:l,t=e.getFullYear(),a=e.getMonth()+1;n.push(c.A.get(`/bookings/calendar/${r.id}?year=${t}&month=${a}`)),n.push(c.A.get(`/blocked-dates/venue/${r.id}?year=${t}&month=${a}`))}let[o,i,m,u,p]=await Promise.all(n),h=u?[...o.data,...u.data]:o.data,f=p?[...m.data,...p.data]:m.data;V(h),W(f);let b=i.data;et(b),!ef.current&&b.pending>0&&(ef.current=!0,eh(!0))}catch{}},[r,D,eo]);(0,n.useEffect)(()=>{eb()},[eb]),(0,n.useEffect)(()=>{es&&en.current&&(window.innerWidth>=1024||en.current.scrollIntoView({behavior:"smooth",block:"start"}))},[es]);let eg=es?G.filter(e=>(0,u.r)((0,p.H)(e.eventDate),es)):[],ey=async e=>{let t=e||ed;if(t){ec(t);try{await c.A.patch(`/bookings/${t}/reject`,{reason:em,venueId:r?.id}),ex(null),eu(""),await eb()}catch(e){alert(e.response?.data?.message||"Error al rechazar")}finally{ec(null)}}},ev=new Set((r?.closedDays||[]).map(Number)),ej=e=>ev.has(e.getDay()),eF=e=>X.find(t=>(0,u.r)((0,p.H)(t.date),e)),eE=async(e,t)=>{if(r){U(!0);try{let s=await c.A.post("/blocked-dates",{venueId:r.id,date:(0,h.GP)(e,"yyyy-MM-dd"),...t?.trim()?{reason:t.trim()}:{}});W(e=>[...e,s.data]),K(!1),Z("")}catch(e){alert(e.response?.data?.message||"Error al bloquear la fecha")}finally{U(!1)}}},eN=async e=>{if(r){U(!0);try{await c.A.delete(`/blocked-dates/${e}?venueId=${r.id}`),W(t=>t.filter(t=>t.id!==e))}catch{alert("Error al desbloquear la fecha")}finally{U(!1)}}};return C.every(e=>"pending"===e.status)?(0,l.jsx)("div",{className:"flex items-center justify-center min-h-screen p-8",children:(0,l.jsxs)("div",{className:"text-center max-w-md",children:[(0,l.jsx)("div",{className:"text-5xl mb-4",children:"⏳"}),(0,l.jsx)("h2",{className:"text-2xl font-black text-gray-900 mb-2",children:"Sal\xf3n en revisi\xf3n"}),(0,l.jsx)("p",{className:"text-sm mb-6",style:{color:"#6B6B6B"},children:"Te notificaremos por email cuando tu sal\xf3n haya sido aprobado."}),(0,l.jsx)("div",{className:"rounded-xl p-4 text-sm font-medium",style:{background:"#EDE8FE",color:"#6A3EF5"},children:"\uD83D\uDCE7 Revisaremos tu informaci\xf3n a la brevedad."})]})}):(0,l.jsxs)("div",{className:"px-4 pb-4 md:px-6 md:pb-6",style:{paddingTop:"15px"},children:[ep&&(0,l.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{background:"rgba(0,0,0,0.45)"},children:(0,l.jsxs)("div",{className:"bg-white rounded-2xl shadow-2xl p-8 max-w-sm w-full mx-4 flex flex-col items-center gap-4",children:[(0,l.jsx)("div",{className:"w-14 h-14 rounded-full flex items-center justify-center text-3xl flex-shrink-0",style:{background:"#FFF8E1"},children:"⏰"}),(0,l.jsx)("h2",{className:"text-lg font-black text-gray-900 text-center",children:"Reservaciones pendientes"}),(0,l.jsxs)("p",{className:"text-sm text-center",style:{color:"#6B6B6B"},children:["Tienes ",(0,l.jsx)("span",{className:"font-black",style:{color:"#FF4D6D"},children:ee.pending})," reservaci\xf3n",1!==ee.pending?"es":""," pendiente",1!==ee.pending?"s":""," de aprobaci\xf3n. Rev\xedsalas antes de que venza la ventana de respuesta."]}),(0,l.jsx)("button",{onClick:()=>{sessionStorage.setItem("salonify_reservaciones_filter_status","pen
1ding"),a.push("/dashboard/reservaciones")},className:"w-full py-2.5 rounded-xl font-bold text-white transition-opacity hover:opacity-90",style:{background:"#6A3EF5"},children:"Ver solicitudes"}),(0,l.jsx)("button",{onClick:()=>eh(!1),className:"w-full py-2 rounded-xl font-semibold text-sm transition-colors",style:{color:"#6B7280",background:"#F3F4F6"},children:"Cerrar"})]})}),(0,l.jsxs)("div",{className:"flex items-start justify-between gap-3 mb-5",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,l.jsx)("h1",{className:"text-xl font-black text-gray-900",children:r?.name}),A&&"active"===A.status&&(0,l.jsxs)(i(),{href:"/dashboard/suscripcion",className:"inline-flex items-center gap-1 text-xs font-semibold px-2.5 py-1 rounded-full no-underline transition-colors hover:opacity-80",style:{background:z[A.plan]?.bg??"#F9FAFB",color:z[A.plan]?.color??"#374151",border:`1px solid ${z[A.plan]?.border??"#E8E8E8"}`},children:[(0,l.jsx)("span",{children:$[A.plan]??"\uD83D\uDCCB"}),(0,l.jsx)("span",{children:M[A.plan]??A.plan})]})]}),(0,l.jsxs)("p",{className:"text-sm mt-0.5",style:{color:"#6B6B6B"},children:[r?.city,", ",r?.state," \xb7 Hasta ",r?.capacity," personas"]})]}),A&&"active"===A.status&&A.currentPeriodEnd&&(0,l.jsxs)("div",{className:"text-right shrink-0",children:[(0,l.jsx)("div",{className:"text-xs font-medium",style:{color:"#9CA3AF"},children:"Pr\xf3xima renovaci\xf3n"}),(0,l.jsx)("div",{className:"text-sm font-bold",style:{color:z[A.plan]?.color??"#374151"},children:new Date(A.currentPeriodEnd).toLocaleDateString("es-MX",{day:"2-digit",month:"short",year:"numeric"})})]})]}),(!A||"active"!==A.status)&&(0,l.jsxs)("div",{className:"flex items-center justify-between rounded-xl px-4 py-3 mb-4 text-sm",style:{background:"#FEF2F2",color:"#991B1B",border:"1px solid #FECACA"},children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 font-semibold",children:[(0,l.jsx)("span",{children:"⚠️"}),(0,l.jsx)("span",{children:"Sin suscripci\xf3n activa — tu sal\xf3n no es visible en el portal"})]}),(0,l.jsx)("a",{href:"/dashboard/suscripcion",className:"text-xs font-bold px-3 py-1.5 rounded-lg text-white",style:{background:"#FF4D6D"},children:"Suscribirse"})]}),(0,l.jsxs)("div",{id:"tutorial-stats",className:"grid grid-cols-3 gap-2 sm:gap-3 mb-4",children:[(0,l.jsxs)("div",{className:"rounded-xl px-3 py-2 flex items-center gap-2 relative overflow-hidden",style:{background:"linear-gradient(135deg, #FEF9C3 0%, #FEF3C7 100%)",border:"1.5px solid #FDE68A"},children:[(0,l.jsx)("span",{className:"text-base shrink-0",children:"⏳"}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("div",{className:"text-xl font-black leading-none",style:{color:ee.pending>0?"#B45309":"#78350F"},children:ee.pending}),(0,l.jsx)("div",{className:"text-xs font-bold leading-tight truncate",style:{color:"#92400E"},children:"Pendientes"})]})]}),(0,l.jsxs)("div",{className:"rounded-xl px-3 py-2 flex items-center gap-2 relative overflow-hidden",style:{background:"linear-gradient(135deg, #DCFCE7 0%, #D1FAE5 100%)",border:"1.5px solid #86EFAC"},children:[(0,l.jsx)("span",{className:"text-base shrink-0",children:"✅"}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("div",{className:"text-xl font-black leading-none",style:{color:"#15803D"},children:ee.confirmed}),(0,l.jsx)("div",{className:"text-xs font-bold leading-tight truncate",style:{color:"#15803D"},children:"Confirmadas"})]})]}),(0,l.jsxs)("div",{className:"rounded-xl px-3 py-2 flex items-center gap-2 relative overflow-hidden",style:{background:"linear-gradient(135deg, #EDE8FE 0%, #E9D5FF 100%)",border:"1.5px solid #C4B5FD"},children:[(0,l.jsx)("span",{className:"text-base shrink-0",children:"\uD83D\uDCB0"}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"text-sm font-black leading-none truncate",style:{color:"#6A3EF5"},children:["$",Number(ee.totalRevenue).toLocaleString("es-MX")," ",(0,l.jsx)("span",{className:"text-xs font-normal",style:{color:"#9CA3AF"},children:"(sin I.V.A)"})]}),(0,l.jsx)("div",{className:"text-xs font-bold leading-tight capitalize truncate",style:{color:"#7C3AED"},children:(0,h.GP)(D,"MMM yyyy",{locale:k.es})})]})]})]}),(0,l.jsxs)("div",{className:"flex gap-4 flex-col lg:flex-row",children:[(0,l.jsxs)("div",{className:"flex-1 bg-white rounded-xl",style:{border:"1px solid #E8E8E8"},children:[(0,l.jsxs)("div",{className:"flex items-center justify-between px-4 py-3",style:{borderBottom:"1px solid #E8E8E8"},children:[(0,l.jsxs)("button",{onClick:()=>_("month"===eo?(0,f.a)(D,1):(0,b.k)(D,1)),className:"w-9 h-9 lg:w-12 lg:h-10 rounded-xl flex items-center justify-center hover:bg-purple-50 text-gray-500 hover:text-purple-600 transition-colors",style:{border:"1.5px solid #E8E8E8"},children:[(0,l.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:"lg:hidden",children:(0,l.jsx)("path",{d:"M12 5L7 10L12 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,l.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:"hidden lg:block",children:(0,l.jsx)("path",{d:"M15 6L9 12L15 18",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})]}),(0,l.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,l.jsx)("h2",{className:"text-base font-black text-gray-900 capitalize",children:"month"===eo?(0,h.GP)(D,"MMMM yyyy",{locale:k.es}):(e=(0,d.k)(D,{weekStartsOn:0}),t=(0,x.$)(D,{weekStartsOn:0}),e.getMonth()===t.getMonth()?`${(0,h.GP)(e,"d")} – ${(0,h.GP)(t,"d MMM yyyy",{locale:k.es})}`:`${(0,h.GP)(e,"d MMM",{locale:k.es})} – ${(0,h.GP)(t,"d MMM yyyy",{locale:k.es})}`)}),(0,l.jsx)("div",{className:"flex rounded-lg overflow-hidden",style:{border:"1px solid #E8E8E8"},children:["month","week"].map(e=>(0,l.jsx)("button",{onClick:()=>er(e),className:"px-3 py-1 text-xs font-bold transition-colors",style:eo===e?{background:"#6A3EF5",color:"#fff"}:{background:"#fff",color:"#6B6B6B"},children:"month"===e?"Mes":"Semana"},e))})]}),(0,l.jsxs)("button",{onClick:()=>_("month"===eo?(0,g.P)(D,1):(0,y.J)(D,1)),className:"w-9 h-9 lg:w-12 lg:h-10 rounded-xl flex items-center justify-center hover:bg-purple-50 text-gray-500 hover:text-purple-600 transition-colors",style:{border:"1.5px solid #E8E8E8"},children:[(0,l.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:"lg:hidden",children:(0,l.jsx)("path",{d:"M8 5L13 10L8 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,l.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:"hidden lg:block",children:(0,l.jsx)("path",{d:"M9 6L15 12L9 18",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})]}),"month"===eo&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{id:"tutorial-calendar",children:[(0,l.jsx)("div",{className:"grid grid-cols-7 mx-3 mt-3 rounded-xl overflow-hidden",style:{background:"#F3F0
1FD"},children:I.map((e,t)=>(0,l.jsx)("div",{className:"text-center text-xs font-black py-2",style:{color:0===t||6===t?"#9C8AE0":"#6A3EF5"},children:e},e))}),(0,l.jsx)("div",{className:"mx-3 mb-3 mt-1 rounded-xl overflow-hidden",style:{border:"1px solid #E8E8E8"},children:(0,l.jsx)("div",{className:"grid grid-cols-7",style:{borderCollapse:"collapse"},children:(()=>{let e=D.getFullYear(),t=D.getMonth(),s=new Date(e,t,1),l=new Date(e,t+1,0).getDate(),a=Array((0,m.P)(s)).fill(null);for(let s=1;s<=l;s++)a.push(new Date(e,t,s));for(;a.length%7!=0;)a.push(null);return a})().map((e,t)=>{if(!e)return(0,l.jsx)("div",{style:{minHeight:"63px",borderRight:(t+1)%7!=0?"1px solid #E8E8E8":void 0,borderBottom:"1px solid #E8E8E8",background:"#FAFAFA"}},`pad-${t}`);let s=G.filter(t=>(0,u.r)((0,p.H)(t.eventDate),e)),n=eF(e),o=n?.reason==="montaje",r=n?.reason==="desmontaje",i=o||r,c=ej(e),d=!!es&&(0,u.r)(es,e),x=(0,v.c)(e),m=(0,j.Y)(e,(0,F.R)());return(0,l.jsxs)("div",{onClick:()=>ea(e),className:"relative p-1 transition-colors flex flex-col",style:{minHeight:"63px",background:d?"#EDE8FE":i?"#FFF7ED":n?"#FEF2F2":c?"#F9FAFB":"white",borderRight:6!=t%7?"1px solid #E8E8E8":void 0,borderBottom:"1px solid #E8E8E8",outline:d?"2px solid #6A3EF5":void 0,outlineOffset:"-2px",zIndex:d?1:void 0,opacity:c?.5:m&&0===s.length&&!n?.4:1,cursor:"pointer"},children:[(0,l.jsx)("span",{className:"text-xs font-bold w-6 h-6 flex items-center justify-center rounded-full mb-0.5 shrink-0",style:x?{background:"#6A3EF5",color:"white"}:i?{color:"#F97316"}:n?{color:"#EF4444"}:c?{color:"#9CA3AF"}:{color:"#1F1F1F"},children:(0,h.GP)(e,"d")}),c&&(0,l.jsx)("div",{className:"w-full rounded px-1 py-0.5 leading-tight",style:{background:"#F3F4F6",borderLeft:"2px solid #D1D5DB"},children:(0,l.jsx)("div",{className:"font-semibold truncate",style:{color:"#9CA3AF",fontSize:"9px"},children:"\uD83D\uDEAB Cerrado"})}),n&&!c&&i&&(0,l.jsx)("div",{className:"w-full rounded px-1 py-0.5 leading-tight",style:{background:"#FFEDD5",borderLeft:"2px solid #F97316"},children:(0,l.jsx)("div",{className:"font-semibold truncate",style:{color:"#EA580C",fontSize:"9px"},children:o?"\uD83D\uDD27 Montaje":"\uD83D\uDCE6 Desmontaje"})}),n&&!c&&!i&&(0,l.jsxs)("div",{className:"w-full rounded px-1 py-0.5 leading-tight",style:{background:"#FEE2E2",borderLeft:"2px solid #EF4444"},children:[(0,l.jsx)("div",{className:"font-semibold truncate",style:{color:"#DC2626",fontSize:"9px"},children:"\uD83D\uDD12 Bloqueado"}),n.reason&&(0,l.jsx)("div",{className:"truncate",style:{color:"#DC2626",fontSize:"9px",opacity:.75},children:n.reason})]}),!n&&!c&&s.length>0&&(0,l.jsxs)("div",{className:"flex flex-col gap-0.5 w-full",children:[s.slice(0,2).map(e=>{let t=e.clientName||e.client?.name||"—",s=P[e.eventType]||e.eventType||"";return(0,l.jsxs)("button",{onClick:t=>{t.stopPropagation(),a.push(`/dashboard/reservaciones/${e.id}`)},className:"w-full text-left rounded px-1 py-0.5 leading-tight truncate hover:opacity-80 transition-opacity",style:{background:q(e)+"22",borderLeft:`2px solid ${q(e)}`},children:[(0,l.jsx)("div",{className:"text-xs font-semibold truncate",style:{color:q(e),fontSize:"9px"},children:s}),(0,l.jsx)("div",{className:"truncate font-medium",style:{color:"#1F1F1F",fontSize:"9px"},children:t})]},e.id)}),s.length>2&&(0,l.jsxs)("span",{className:"text-center font-bold",style:{color:"#6B6B6B",fontSize:"9px"},children:["+",s.length-2," m\xe1s"]})]})]},e.toISOString())})})})]})}),"week"===eo&&(s=(0,E.k)({start:(0,d.k)(D,{weekStartsOn:0}),end:(0,x.$)(D,{weekStartsOn:0})}),(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("div",{className:"grid grid-cols-7 mx-3 mt-3 rounded-xl overflow-hidden",style:{background:"#F3F0FD"},children:s.map((e,t)=>{let s=(0,v.c)(e),a=(0,j.Y)(e,(0,F.R)()),n=!!es&&(0,u.r)(es,e),o=!!eF(e),r=ej(e);return(0,l.jsxs)("button",{onClick:()=>ea(e),className:"flex flex-col items-center py-3 transition-colors rounded-xl",style:{background:n?"#6A3EF5":o?"#FEE2E2":"transparent",opacity:a||r?.5:1},children:[(0,l.jsx)("span",{className:"text-xs font-black capitalize",style:{color:n?"#C4B5FD":o?"#DC2626":r?"#9CA3AF":"#6A3EF5"},children:(0,h.GP)(e,"EEE",{locale:k.es})}),(0,l.jsx)("span",{className:"text-base font-black w-9 h-9 flex items-center justify-center rounded-full mt-0.5",style:s&&!n?{background:"#EDE8FE",color:"#6A3EF5"}:n?{color:"#fff"}:{color:"#1F1F1F"},children:(0,h.GP)(e,"d")})]},e.toISOString())})}),(0,l.jsx)("div",{className:"grid grid-cols-7 divide-x",style:{minHeight:"260px",borderColor:"#E8E8E8"},children:s.map(e=>{let t=G.filter(t=>(0,u.r)((0,p.H)(t.eventDate),e)),s=eF(e),n=s?.reason==="montaje"||s?.reason==="desmontaje",o=ej(e),r=!!es&&(0,u.r)(es,e),i=(0,j.Y)(e,(0,F.R)());return(0,l.jsx)("div",{onClick:()=>ea(e),className:"flex flex-col gap-2 p-2 transition-colors",style:{background:r?"#F9F7FF":n?"#F
1FF7ED":s?"#FEF2F2":o?"#F9FAFB":"transparent",cursor:"pointer",opacity:o?.6:1},children:o&&!s?(0,l.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center gap-1.5 py-4",children:[(0,l.jsx)("span",{style:{fontSize:"20px"},children:"\uD83D\uDEAB"}),(0,l.jsx)("span",{className:"font-bold text-center",style:{color:"#9CA3AF",fontSize:"10px"},children:"Cerrado"})]}):s&&n?(0,l.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center gap-1.5 py-4",children:[(0,l.jsx)("span",{style:{fontSize:"20px"},children:"montaje"===s.reason?"\uD83D\uDD27":"\uD83D\uDCE6"}),(0,l.jsx)("span",{className:"font-bold text-center",style:{color:"#F97316",fontSize:"10px"},children:"montaje"===s.reason?"Montaje":"Desmontaje"})]}):s?(0,l.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center gap-1 py-4",children:[(0,l.jsx)("span",{style:{fontSize:"20px"},children:"\uD83D\uDD12"}),(0,l.jsx)("span",{className:"font-bold text-center",style:{color:"#EF4444",fontSize:"10px"},children:"Bloqueado"}),s.reason&&(0,l.jsx)("span",{className:"text-center leading-tight px-1",style:{color:"#EF4444",fontSize:"9px",opacity:.75},children:s.reason})]}):0===t.length?(0,l.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 py-4",children:[(0,l.jsx)("div",{className:"w-8 h-8 rounded-full flex items-center justify-center",style:{background:"#F3F4F6"},children:(0,l.jsx)("span",{style:{fontSize:"14px",opacity:.4},children:"\uD83D\uDCC5"})}),!i&&(0,l.jsx)("span",{className:"text-center font-medium",style:{color:"#C4C4C4",fontSize:"10px"},children:"Disponible"})]}):t.map(e=>{let t=e.clientName||e.client?.name||"—",s=P[e.eventType]||e.eventType||"",n=q(e),o={pending:"Pendiente",approved:"Confirmada",confirmed:"Manual",tentative:"Tentativa",completed:"Completada",cancelled:"Cancelada"}[e.status]||e.status;return(0,l.jsxs)("button",{onClick:t=>{t.stopPropagation(),a.push(`/dashboard/reservaciones/${e.id}`)},className:"w-full text-left rounded-xl hover:opacity-90 active:scale-95 transition-all flex flex-col overflow-hidden",style:{background:"#fff",border:`1.5px solid ${n}30`,boxShadow:`0 1px 4px ${n}18`},children:[(0,l.jsx)("div",{className:"h-1 w-full",style:{background:n}}),(0,l.jsxs)("div",{className:"p-2 flex flex-col gap-1",children:[(0,l.jsx)("span",{className:"self-start text-white font-bold rounded-md px-1.5 py-0.5 leading-none",style:{background:n,fontSize:"9px"},children:o}),(0,l.jsx)("span",{className:"font-black leading-tight",style:{color:"#1A1A1A",fontSize:"11px"},children:s}),(0,l.jsx)("span",{className:"font-medium leading-tight truncate",style:{color:"#6B6B6B",fontSize:"11px"},children:t}),(0,l.jsxs)("div",{className:"flex flex-col gap-0.5 mt-0.5",children:[(0,l.jsxs)("span",{className:"leading-tight",style:{color:"#9CA3AF",fontSize:"10px"},children:["\uD83D\uDD50 ",T[e.eventTime]||e.eventTime]}),e.guestsCount>0&&(0,l.jsxs)("span",{className:"leading-tight",style:{color:"#9CA3AF",fontSize:"10px"},children:["\uD83D\uDC65 ",e.guestsCount," personas"]}),e.venuePrice>0&&(0,l.jsxs)("span",{className:"font-bold leading-tight",style:{color:n,fontSize:"10px"},children:["$",Number(e.venuePrice).toLocaleString("es-MX")]})]})]})]},e.id)})},e.toISOString())})})]})),(0,l.jsx)("div",{id:"tutorial-legend",className:"flex flex-wrap gap-4 px-4 py-3",style:{borderTop:"1px solid #E8E8E8"},children:R.map(({color:e,label:t})=>(0,l.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,l.jsx)("div",{className:"w-2.5 h-2.5 rounded-full flex-shrink-0",style:{background:e}}),(0,l.jsx)("span",{className:"text-xs",style:{color:"#6B6B6B"},children:t})]},t))})]}),(0,l.jsx)("div",{ref:en,className:"w-full lg:w-72 bg-white rounded-xl flex flex-col lg:self-start lg:sticky lg:top-6",style:{border:"1px solid #E8E8E8",maxHeight:"calc(100vh - 8rem)"},children:es?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"p-4 flex-shrink-0",style:{borderBottom:"1px solid #E8E8E8"},children:[(0,l.jsx)("div",{className:"text-xs font-bold uppercase tracking-wide mb-0.5",style:{color:"#6B6B6B"},children:"Seleccionado"}),(0,l.jsx)("div",{className:"text-base font-black text-gray-900 capitalize",children:(0,h.GP)(es,"EEEE d 'de' MMMM",{locale:k.es})}),eg.length>0&&(0,l.jsxs)("div",{className:"text-xs mt-1",style:{color:"#6B6B6B"},children:[eg.length," reservaci\xf3n",eg.length>1?"es":""]})]}),(0,l.jsx)("div",{className:"flex-1 overflow-y-auto p-3 flex flex-col gap-2",children:0===eg.length?(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center py-10 text-center",children:[(0,l.jsx)("div",{className:"text-3xl mb-2",children:"\uD83D\uDCC5"}),(0,l.jsx)("p",{className:"text-sm font-medium",style:{color:"#6B6B6B"},children:"D\xeda disponible"}
1),(0,l.jsx)("p",{className:"text-xs mt-0.5",style:{color:"#9CA3AF"},children:"Sin reservaciones"})]}):eg.map(e=>{let t=e.clientName||e.client?.name||"Cliente";return(0,l.jsxs)("div",{className:"rounded-xl p-3",style:{border:"1px solid #E8E8E8"},children:[(0,l.jsxs)("div",{className:"flex items-start justify-between gap-2 mb-2",children:[(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("div",{className:"text-xs font-mono",style:{color:"#9CA3AF"},children:e.bookingNumber}),(0,l.jsx)("div",{className:"text-sm font-bold text-gray-900 truncate",children:t})]}),(0,l.jsx)(O,{b:e})]}),(0,l.jsxs)("div",{className:"text-xs flex flex-col gap-0.5 mb-2",style:{color:"#6B6B6B"},children:[(0,l.jsxs)("div",{children:["\uD83C\uDF89 ",P[e.eventType]||e.eventType," \xb7 ",T[e.eventTime]||e.eventTime]}),(0,l.jsxs)("div",{children:["\uD83D\uDC65 ",e.guestsCount," personas \xb7 \uD83D\uDCB0 $",Number(e.venuePrice).toLocaleString("es-MX")]})]}),(0,l.jsx)("button",{onClick:()=>a.push(`/dashboard/reservaciones/${e.id}`),className:"w-full text-xs font-bold py-1.5 rounded-lg border transition-colors hover:bg-gray-50",style:{borderColor:"#6A3EF5",color:"#6A3EF5"},children:"Ver detalle"})]},e.id)})}),(0,l.jsx)("div",{className:"p-3 flex-shrink-0 flex flex-col gap-2",style:{borderTop:"1px solid #E8E8E8"},children:(()=>{let e=es?eF(es):void 0,t=!!es&&ej(es),s=eg.some(e=>L.includes(e.status)),n=!!es&&(0,j.Y)(es,(0,F.R)());if(t)return(0,l.jsxs)("div",{className:"rounded-xl px-3 py-3 text-center",style:{background:"#F3F4F6",border:"1px solid #E5E7EB"},children:[(0,l.jsx)("div",{className:"text-2xl mb-1",children:"\uD83D\uDEAB"}),(0,l.jsx)("div",{className:"text-sm font-bold text-gray-500",children:"D\xeda cerrado"}),(0,l.jsx)("div",{className:"text-xs text-gray-400 mt-0.5",children:"Este d\xeda no acepta reservaciones"})]});if(e){let t="montaje"===e.reason||"desmontaje"===e.reason,s=t?"montaje"===e.reason?"\uD83D\uDD27 D\xeda de montaje":"\uD83D\uDCE6 D\xeda de desmontaje":e.reason;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"rounded-xl px-3 py-2.5",style:t?{background:"#FFEDD5",color:"#EA580C"}:{background:"#FEE2E2",color:"#DC2626"},children:[(0,l.jsx)("div",{className:"text-xs font-bold text-center mb-1",children:t?s:"\uD83D\uDD12 Fecha bloqueada"}),!t&&s&&(0,l.jsx)("div",{className:"text-xs text-center opacity-80 leading-snug",children:s})]}),(0,l.jsx)("button",{onClick:()=>eN(e.id),disabled:Y,className:"w-full text-sm font-bold py-2.5 rounded-xl transition-colors disabled:opacity-50",style:{border:"2px solid #22C55E",color:"#15803D"},children:Y?"Desbloqueando...":"\uD83D\uDD13 Desbloquear fecha"})]})}return s?(0,l.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,l.jsx)("div",{className:"w-full text-sm font-bold py-2.5 rounded-xl text-center cursor-not-allowed select-none",style:{border:"2px dashed #D1D5DB",color:"#9CA3AF"},children:"+ Agregar reservaci\xf3n"}),(0,l.jsx)("p",{className:"text-center text-xs",style:{color:"#9CA3AF"},children:"D\xeda no disponible"})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("button",{id:"tutorial-add-booking",onClick:()=>{let e;return e=es?`/dashboard/nueva-reservacion?date=${(0,h.GP)(es,"yyyy-MM-dd")}`:"/dashboard/nueva-reservacion",void a.push(e)},disabled:n,className:"w-full text-sm font-bold py-2.5 rounded-xl transition-colors disabled:opacity-40 disabled:cursor-not-allowed",style:{border:"2px dashed #6A3EF5",color:"#6A3EF5"},children:"+ Agregar reservaci\xf3n"}),!n&&!J&&(0,l.jsx)("button",{id:"tutorial-block-date",onClick:()=>K(!0),className:"w-full text-xs font-semibold py-2 rounded-xl transition-colors",style:{border:"1.5px solid #FCA5A5",color:"#DC2626",background:"#FFF5F5"},children:"\uD83D\uDD12 Bloquear fecha"}),!n&&J&&(0,l.jsxs)("div",{className:"rounded-xl p-3 flex flex-col gap-2",style:{background:"#FFF5F5",border:"1.5px solid #FCA5A5"},children:[(0,l.jsx)("p",{className:"text-xs font-bold text-red-700",children:"\uD83D\uDD12 Bloquear fecha"}),(0,l.jsx)("input",{type:"text",placeholder:"Motivo (opcional)",value:Q,onChange:e=>Z(e.target.value),maxLength:80,className:"w-full text-xs rounded-lg px-2.5 py-2 outline-none",style:{border:"1px solid #FECACA",background:"white",color:"#1F1F1F"},onKeyDown:e=>{"Enter"===e.key&&eE(es,Q)},autoFocus:!0}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)("button",{onClick:()=>eE(es,Q),disabled:Y,className:"flex-1 text-xs font-bold py-1.5 rounded-lg text-white disabled:opacity-50",style:{background:"#DC2626"},children:Y?"Bloqueando...":"Confirmar"}),(0,l.jsx)("button",{onClick:()=>{K(!1),Z("")},className:"flex-1 text-xs font-semibold py-1.5 rounded-lg",style:{border:"1px solid #E5E7EB",color:"#6B7280"},children:"Cancelar"})]})]})]})})()})]}):(0,l.jsx)(H,{})})]}),ed&&(0,l.jsx)("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:(0,l.jsxs)("div",{className:"bg-white rounded-2xl w-full max-w-sm shadow-2xl p-5",children:[(0,l.jsx)("h3",{className:"text-base font-black text-gray-900 mb-1",children:"Rechazar solicitud"}),(0,l.jsx)("p",{className:"text-sm mb-4",style:{color:"#6B6B6B"}
1,children:"El cliente ser\xe1 notificado. No se realizar\xe1 ning\xfan cargo."}),(0,l.jsx)("textarea",{value:em,onChange:e=>eu(e.target.value),rows:3,placeholder:"Motivo del rechazo (opcional)",className:"w-full rounded-xl px-3 py-2.5 text-sm outline-none resize-none mb-4",style:{border:"2px solid #E8E8E8"}}),(0,l.jsxs)("div",{className:"flex gap-3",children:[(0,l.jsx)("button",{onClick:()=>{ex(null),eu("")},className:"flex-1 py-2.5 rounded-xl text-sm font-bold",style:{border:"2px solid #E8E8E8",color:"#6B6B6B"},children:"Cancelar"}),(0,l.jsx)("button",{onClick:()=>ey(),disabled:!!ei,className:"flex-1 py-2.5 rounded-xl text-sm font-bold text-white transition-colors disabled:opacity-60",style:{background:"#FF4D6D"},children:ei?"Rechazando...":"Rechazar"})]})]})}),r&&(0,l.jsx)(S,{venueId:r.id,onSelectLastDay:()=>{ea((0,N.W)(D))}})]})}}},e=>{e.O(0,[2707,3549,98,721,8441,4398,7358],()=>e(e.s=31468)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.