PageSourceSearch

https://www.olingo.ai/_next/static/chunks/pages/ads/edit-ads/[templateId]-e3fca057f7d7b800.js

js olingo.ai collected 2026-10-05 14:56:30 UTC 5,664 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7752],{19782:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>j});var a=t(37876),n=t(26041),o=t(89099),i=t(14232),s=t(38443),l=t(60851),c=t(75656),d=t(8254),u=t(39955),h=t(79736),p=t(95812),m=t(91921),f=t(51362),g=t(96491),b=t(83679),x=t(26680);let j=(0,n.r)(e=>{let{user:r}=e,t=(0,o.useRouter)(),{templateId:n}=t.query,{notify:j}=(0,x.h)(),{data:v,isLoading:y,mutate:_}=(0,c.Ay)(n?"/campaign-templates/?documentId=".concat(n):null,d.A.fetcher,{revalidateOnFocus:!1}),w=null==v?void 0:v.data,[C,E]=(0,i.useState)(""),[S,W]=(0,i.useState)(!1);if((0,i.useEffect)(()=>{(null==w?void 0:w.name)&&E(w.name)},[w]),y)return(0,a.jsx)(s.o,{minH:"100vh",children:(0,a.jsx)(l.y,{size:"xl",color:"blue.500"})});let I=async()=>{if(!C.trim())return void j.error("Nombre requerido","El nombre no puede estar vac\xedo.");W(!0);try{await d.A.put("/campaign-templates/".concat(n),{name:C.trim()}),j.info("Anuncio actualizado","El anuncio fue guardado correctamente."),t.push("/ads")}catch(e){j.error("Error al guardar",(null==e?void 0:e.message)||"Intenta de nuevo.")}finally{W(!1)}};return(0,a.jsx)(u.a,{minH:"100vh",bg:"#F6F7FB",children:(0,a.jsxs)(u.a,{px:{base:4,md:6},py:6,maxW:"640px",mx:"auto",children:[(0,a.jsxs)(h.z,{spacing:4,mb:6,children:[(0,a.jsx)(p.$,{variant:"ghost",leftIcon:(0,a.jsx)(b.QVr,{}),onClick:()=>t.push("/ads"),color:"gray.600",fontWeight:"600",_hover:{bg:"gray.100"},children:"Volver"}),(0,a.jsx)(m.E,{fontWeight:"800",color:"gray.900",fontSize:"lg",children:"Editar borrador"})]}),(0,a.jsx)(u.a,{bg:"white",borderRadius:"xl",border:"1px solid",borderColor:"gray.200",p:6,children:(0,a.jsxs)(f.T,{align:"stretch",spacing:5,children:[(0,a.jsxs)(u.a,{children:[(0,a.jsx)(m.E,{fontSize:"sm",fontWeight:"700",color:"gray.700",mb:2,children:"Nombre del anuncio"}),(0,a.jsx)(g.p,{value:C,onChange:e=>E(e.target.value),placeholder:"Ej: Promoci\xf3n de verano",borderRadius:"lg",borderColor:"gray.200",_focus:{borderColor:"#3B82F6"}})]}),(0,a.jsxs)(h.z,{justify:"flex-end",spacing:3,pt:2,children:[(0,a.jsx)(p.$,{variant:"ghost",color:"gray.600",onClick:()=>t.push("/ads"),children:"Cancelar"}),(0,a.jsx)(p.$,{leftIcon:(0,a.jsx)(b.dIn,{}),bg:"#3B82F6",color:"white",borderRadius:"lg",fontWeight:"700",_hover:{bg:"#2563EB"},isLoading:S,onClick:I,children:"Guardar cambios"})]})]})})]})})})},22636:(e,r,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/ads/edit-ads/[templateId]",function(){return t(19782)}])},26041:(e,r,t)=>{"use strict";t.d(r,{r:()=>u});var a=t(37876),n=t(7095),o=t(44971),i=t(89099),s=t(14232),l=t(72830),c=t(46851),d=t(72218);let u=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/login";return function(t){let{user:u,isCheckingAuth:h,activePlanCode:p,planDaysRemaining:m}=(0,o.A)(),f=(0,i.useRouter)(),{isRequired:g}=(0,d.b)(),b=(0,c.qc)(u),x=(0,l.ND)(f.pathname),j=!!x||(0,l.kL)(p||null,f.pathname,null!==m&&m<=0),v=!!(null==u?void 0:u.is_collaborator),y=!x&&!b&&!v&&!j,_=("/profile"===f.pathname||f.pathname.startsWith("/profile/")&&"/profile/collaborators"!==f.pathname||f.pathname.startsWith("/dashboard")&&"/dashboard/pagos"!==f.pathname&&"/dashboard/usuarios"!==f.pathname||f.pathname.startsWith("/chat")||f.pathname.startsWith("/mensajes")||f.pathname.startsWith("/clients"))&&!f.pathname.startsWith("/plans")&&f.pathname!==l.bw.SUSCRIPCION,w=!x&&!b&&v&&!_,C=!x&&g&&!(0,d.l)(f.pathname);return((0,s.useEffect)(()=>{if(!h){if(!u)return void f.push(r);if(y)return void f.replace(l.bw.SUSCRIPCION);if(w||C)return void f.replace(l.bw.DASHBOARD)}},[u,h,y,w,C,f]),h||!u||y||C)?(0,a.jsx)(n.A,{}):(0,a.jsx)(e,{...t,user:u})}}},26680:(e,r,t)=>{"use strict";t.d(r,{P:()=>p,h:()=>f});var a=t(37876),n=t(14232),o=t(39955),i=t(79736),s=t(18387),l=t(51362),c=t(91921),d=t(5377),u=t(83679);let h={info:{icon:u.__w,color:"blue.500"},warning:{icon:u.__w,color:"blue.500"},error:{icon:u._Hm,color:"red.500"},success:{icon:u.A7C,color:"blue.500"}};function p(e){let{type:r,title:t,description:n}=e,{icon:d,color:u}=h[r];return(0,a.jsx)(o.a,{bg:"white",color:"gray.800",p:3,borderRadius:"md",boxShadow:"lg",border:"1px solid",borderColor:"error"===r?"red.100":"blue.100",children:(0,a.jsxs)(i.z,{spacing:2.5,align:"start",children:[(0,a.jsx)(s.I,{as:d,color:u,boxSize:4,mt:.5,flexShrink:0}),(0,a.jsxs)(l.T,{align:"start",spacing:.5,flex:1,minW:0,children:[(0,a.jsx)(c.E,{fontWeight:"bold",fontSize:"sm",color:u,children:t}),n?(0,a.jsx)(c.E,{fontSize:"xs",color:u,children:n}):null]})]})})}let m={duration:2e3,isClosable:!0,position:"top-right"};function f(){let e=(0,d.d)();return{notify:(0,n.useMemo)(()=>({info:(r,t,n)=>{e({...m,...null!=n?{duration:n}:{},render:()=>
1(0,a.jsx)(p,{type:"info",title:r,description:t})})},warning:(r,t,n)=>{e({...m,...null!=n?{duration:n}:{},render:()=>(0,a.jsx)(p,{type:"warning",title:r,description:t})})},error:(r,t,n)=>{e({...m,...null!=n?{duration:n}:{},render:()=>(0,a.jsx)(p,{type:"error",title:r,description:t})})},success:(r,t,n)=>{e({...m,...null!=n?{duration:n}:{},render:()=>(0,a.jsx)(p,{type:"success",title:r,description:t})})}}),[e]),toast:e}}},38443:(e,r,t)=>{"use strict";t.d(r,{o:()=>i});var a=t(37876),n=t(56044),o=t(89461);let i=(0,n.B)("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});i.displayName="Center";let s={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};(0,o.R)(function(e,r){let{axis:t="both",...o}=e;return(0,a.jsx)(n.B.div,{ref:r,__css:s[t],...o,position:"absolute"})})}},e=>{var r=r=>e(e.s=r);e.O(0,[636,6593,8792],()=>r(22636)),_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.