1import{a as x,P as N}from"./CO3jJX8u.js";import{aA as n,q as p,n as i,aS as y,ap as B,F as v,aJ as I,as as b,p as g,bf as h,o as P,aL as C,u as A,bd as F,b6 as q,x as f,bc as E,aN as W,v as S,b5 as Z,b as V}from"./DY9uiTjd.js";import{s as D}from"./Bixtki4f.js";import{d as Q}from"./DdX1BDnZ.js";function X(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}function T(t){if(!t)return"";const e={"&":"&","<":"<",">":">",'"':""","'":"'"};return String(t).replace(/[&<>"']/g,o=>e[o])}function R(t,e){return typeof t=="string"&&/^#[0-9a-fA-F]{3,8}$/.test(t.trim())?t.trim():e}function Y(t){if(!t)return null;const e=t.match(/(?:youtube\.com\/(?:watch\?v=|embed\/|shorts\/)|youtu\.be\/)([a-zA-Z0-9_-]{11})/);return e?e[1]:null}function _(t){if(!t)return null;const e=t.match(/vimeo\.com\/(?:video\/)?(\d+)/);return e?e[1]:null}const ee={banner(t){const e=t.props||{},o=e.bgImage?`background-image: url('${e.bgImage}'); background-size: cover; background-position: center;`:"";return`<div style="background-color: ${e.bgColor||"#002a3c"}; ${o} padding: ${e.padding||"40px"} 20px; text-align: ${e.textAlign||"center"};"> 2 <h2 style="color: ${e.textColor||"#ffffff"}; font-size: ${e.fontSize||"28px"}; font-family: ${e.fontFamily||"Roboto, sans-serif"}; margin: 0 0 10px 0; font-weight: ${e.fontWeight||"700"};">${e.title||""}</h2> 3 ${e.subtitle?`<p style="color: ${e.textColor||"#ffffff"}; font-size: ${parseInt(e.fontSize||"28")*.6}px; font-family: ${e.fontFamily||"Roboto, sans-serif"}; margin: 0; opacity: 0.9;">${e.subtitle}</p>`:""} 4 </div>`},text(t){const e=t.props||{};return`<div style="background-color: ${e.bgColor||"transparent"}; padding: ${e.padding||"20px"}; text-align: ${e.textAlign||"left"};"> 5 <div style="line-height: 1.6; max-width: 1270px; margin: 0 auto;">${e.content||""}</div> 6 </div>`},image(t){const e=t.props||{},o=`<img src="${T(e.imageUrl||"")}" alt="${T(e.alt||"")}" style="max-width: 100%; width: ${e.width||"100%"}; border-radius: ${e.borderRadius||"0px"}; display: block; margin: 0 auto;" />`,d=e.link?`<a href="${T(e.link)}" target="_blank" rel="noopener noreferrer">${o}</a>`:o;return`<div style="padding: ${e.padding||"20px"}; text-align: center;">${d}</div>`},video(t){const e=t.props||{},o=e.videoUrl||"";let d="";const s=Y(o),a=_(o);return s?d=`https://www.youtube.com/embed/${s}`:a&&(d=`https://player.vimeo.com/video/${a}`),d?`<div style="padding: ${e.padding||"20px"};"> 7 <div style="max-width: 800px; margin: 0 auto; overflow: hidden; border-radius: 8px;"> 8 <iframe src="${d}" style="width: 100%; aspect-ratio: 16/9; max-height: 460px; border: 0; display: block;" allowfullscreen></iframe> 9 </div> 10 </div>`:`<div style="padding: ${e.padding||"20px"}; text-align: center; color: #999;">Video URL inválida</div>`},guarantee(t){const e=t.props||{};return`<div style="background-color: ${e.bgColor||"#f4f5f7"}; padding: ${e.padding||"30px"} 20px;"> 11 <div style="max-width: 600px; margin: 0 auto; display: flex; align-items: center; gap: 20px;"> 12 <img src="https://fiapy.nyc3.cdn.digitaloceanspaces.com/builder/landing/img/selo.png" alt="Selo de garantia" style="width: 100px; height: 100px; flex-shrink: 0; object-fit: contain;" /> 13 <div style="flex: 1; min-width: 0;"> 14 <h3 style="color: ${e.textColor||"#333333"}; font-size: 20px; font-weight: ${e.fontWeight||"700"}; margin: 0 0 8px 0;">${e.title||"Garantia de "+(e.days||"7")+" dias"}</h3> 15 <p style="color: ${e.textColor||"#333333"}; font-size: 14px; opacity: 0.8; margin: 0; line-height: 1.5;">${e.description||"Se você não ficar satisfeito, devolvemos seu dinheiro."}</p> 16 </div> 17 </div> 18 </div>`},testimonial(t){const e=t.props||{},o=e.items||[],d=e.showAvatar!==!1,s="https://fiapy.nyc3.cdn.digitaloceanspaces.com/builder/landing/img/120x120.png",a=o.map(l=>{const u="★".repeat(parseInt(l.rating||"5")),m=d?`<img src="${T(l.avatar||s)}" style="width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: 0 auto 16px; display: block;" />`:"";return`<div style="background-color: ${e.bgColor||"#ffffff"}; border-radius: 8px; padding: 24px; flex: 1; min-width: 180px; max-width: ${o.length===1?"400px":"300px"}; text-align: center;"> 19 ${m} 20 <p style="color: ${e.textColor||"#1f2937"}; font-weight: 700; font-size: 16px; margin: 0 0 8px;">${l.name||""}</p> 21 <p style="color: ${e.textColor||"#1f2937"}; font-size: 14px; line-height: 1.6; margin: 0 0 12px;">${l.text||""}</p> 22 <div style="color: #f59e0b; font-size: 14px;">${u}</div> 23 </div>`}).join(` 24`);return`<div style="padding: ${e.padding||"30px"} 20px;"> 25 <div style="display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; max-width: 1200px; margin: 0 auto;"> 26 ${a} 27 </div> 28 </div>`},whatsapp(t){const e=t.props||{},o=(e.phone||"").replace(/\D/g,""),d=encodeURIComponent(e.message||""),s=`https://wa.me/${o}?text=${d}`,a=e.position||"bottom-right",l=a.startsWith("top")?"top: 20px":"bottom: 20px",u=a.endsWith("left")?"left: 20px":"right: 20px";return`<a href="${s}" target="_blank" rel="noopener noreferrer" style="position: fixed; ${l}; ${u}; z-index: 9999; width: 60px; height: 60px; background-color: ${e.bgColor||"#25D366"}; border-radius: 50%; display: flex; align-items: center; justify-content: center; text-decoration: none; box-shadow: 0 4px 12px rgba(0,0,0,0.2); transition: transform 0.2s;"> 29 <svg width="32" height="32" viewBox="0 0 24 24" fill="white"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.
29198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347z"/><path d="M12 0C5.373 0 0 5.373 0 12c0 2.625.846 5.059 2.284 7.034L.789 23.492a.5.5 0 00.627.616l4.584-1.208A11.937 11.937 0 0012 24c6.627 0 12-5.373 12-12S18.627 0 12 0zm0 22c-2.239 0-4.308-.724-5.994-1.952l-.418-.312-3.06.806.82-2.996-.343-.543A9.963 9.963 0 012 12C2 6.486 6.486 2 12 2s10 4.486 10 10-4.486 10-10 10z"/></svg> 30 </a>`},spacer(t){return`<div style="height: ${(t.props||{}).height||"40px"};"></div>`},timer(t){const e=t.props||{},o=e.minutes||"15",d=e.seconds||"00",s=String(o).padStart(2,"0"),a=String(d).padStart(2,"0");return`<div class="style-checkout-promo" style="width: 100%; height: 80px; background-color: ${e.bgColor||"#1ddf75"}; display: flex; align-items: center; text-align: center;"> 31 <div class="style-checkout-promo-rel" style="height: 100%; width: 100%; display: flex; justify-content: center; align-items: center; gap: 10px; color: ${e.textColor||"#ffffff"};"> 32 <div style="display: flex; justify-content: center; align-items: center;"> 33 <p class="timer" id="minute" style="font-weight: bold; font-size: 21pt; margin: 0;">${s}</p> 34 <p style="margin: 0 5px; font-weight: bold; font-size: 21pt;">:</p> 35 <p class="timer" id="second" style="font-weight: bold; font-size: 21pt; margin: 0;">${a}</p> 36 </div> 37 <p style="margin: 0 0 0 10px; font-size: ${e.fontSize||"16px"}; font-weight: ${e.fontWeight||"400"};"><i class="fa-solid fa-clock" style="font-size: 17pt;"></i> ${e.text||"Oferta por tempo limitado"}</p> 38 </div> 39 </div>`},notification(t){const e=t.props||{},o=e.messages||[];if(o.length===0)return"";const d=e.position||"bottom-left",s=d.startsWith("top")?"top: 20px":"bottom: 20px",a=d.endsWith("left")?"left: 20px":"right: 20px",l=(e.borderRadius||"8")+"px",u=e.bgColor||"#ffffff";return`<div id="fiapy-notifications" data-messages="${T(JSON.stringify(o))}" data-display="${e.displayTime||"5"}" data-interval="${e.interval||"8"}" data-position="${d}" data-cycle="${e.cycle||"loop"}" style="position:fixed;${s};${a};z-index:9998;"> 40 <div id="fiapy-notif-box" style="display:none;background:${u};padding:12px 16px;border-radius:${l};box-shadow:0 4px 12px rgba(0,0,0,0.15);align-items:center;gap:10px;max-width:320px;"> 41 <i class="fa-solid fa-bag-shopping" style="font-size:20px;color:#00d769;flex-shrink:0;"></i> 42 <span id="fiapy-notif-text" style="font-size:13px;color:#333;"></span> 43 </div> 44 </div>`},discountPopup(t){const e=t.props||{},o=parseInt(e.delay||"5",10),d=T(e.coupon||""),s=e.title||"Oferta exclusiva para você!",a=e.description||"Use o cupom abaixo e garanta seu desconto agora.",l=e.bgColor||"#ff4757",u=e.textColor||"#ffffff",m=e.bgOverlay||"rgba(0,0,0,0.55)";return`<div id="fiapy-discount-popup" data-delay="${o}" data-coupon="${d}" style="display:none;position:fixed;inset:0;z-index:99999;background:${m};align-items:center;justify-content:center;"> 45 <div style="background:#ffffff;border-radius:16px;padding:0;max-width:420px;width:calc(100% - 32px);box-shadow:0 20px 60px rgba(0,0,0,0.3);overflow:hidden;position:relative;"> 46 <div style="background:${l};padding:28px 28px 20px;text-align:center;"> 47 <button id="fiapy-discount-popup-close" style="position:absolute;top:12px;right:12px;width:32px;height:32px;border-radius:50%;background:rgba(255,255,255,0.2);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;color:${u};font-size:16px;line-height:1;">✕</button> 48 <div style="width:56px;height:56px;background:rgba(255,255,255,0.2);border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 auto 14px;font-size:24px;">ð·ï¸</div> 49 <h3 style="color:${u};font-size:22px;font-weight:700;margin:0 0 8px;line-height:1.3;">${s}</h3> 50 <p style="color:${u};font-size:14px;margin:0;opacity:0.9;line-height:1.5;">${a}
50</p> 51 </div> 52 ${d?`<div style="padding:20px 28px 24px;text-align:center;"> 53 <p style="font-size:12px;color:#888;margin:0 0 10px;text-transform:uppercase;letter-spacing:0.5px;">Seu cupom de desconto</p> 54 <div style="display:flex;align-items:center;gap:8px;justify-content:center;"> 55 <div style="flex:1;background:#f4f5f7;border:2px dashed #d1d5db;border-radius:8px;padding:12px 16px;font-size:20px;font-weight:700;letter-spacing:3px;color:#1f2937;text-align:center;">${d}</div> 56 <button id="fiapy-discount-popup-copy" style="background:${l};color:#ffffff;border:none;border-radius:8px;padding:12px 16px;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap;transition:opacity 0.2s;">Copiar</button> 57 </div> 58 <p id="fiapy-discount-popup-copied" style="display:none;font-size:12px;color:#00b16a;margin:8px 0 0;font-weight:600;">â Cupom copiado!</p> 59 </div>`:'<div style="padding:20px 28px 24px;"></div>'} 60 </div> 61 </div>`},html(t){const e=t.props||{};return D(e.customHtml||"")},orderbumpColor(t){const e=t.props||{},o=R(e.colorLight,"#0900ff"),d=R(e.colorDark,"#15c36b"),s=R(e.allColorLight,"#0900ff"),a=R(e.allColorDark,"#15c36b");return`<style> 62 .orderbump-section-title, .orderbump-title { color: ${o} !important; } 63 .theme-dark .orderbump-section-title, .theme-dark .orderbump-title { color: ${d} !important; } 64 .orderbump-all-title { color: ${s} !important; } 65 .theme-dark .orderbump-all-title { color: ${a} !important; } 66 </style>`}};function O(t){return!t||t.length===0?"":t.map(e=>{const o=ee[e.type];return o?o(e):""}).join(` 67`)}function H(t){const e={banner:{title:"Seu tÃtulo aqui",subtitle:"SubtÃtulo do checkout",bgColor:"#002a3c",textColor:"#ffffff",fontSize:"28px",fontFamily:"Roboto, sans-serif",fontWeight:"700",textAlign:"center",padding:"40px",bgImage:""},text:{content:'<p style="color: #333333; font-size: 16px;">Seu texto aqui</p>',bgColor:"transparent",textAlign:"left",padding:"20px"},image:{imageUrl:"",alt:"",link:"",width:"100%",borderRadius:"0px",padding:"20px"},video:{videoUrl:"",aspectRatio:"16:9",padding:"20px"},guarantee:{days:"7",title:"Garantia de 7 dias",description:"Se você não ficar satisfeito, devolvemos 100% do seu dinheiro.",bgColor:"#f4f5f7",textColor:"#333333",fontWeight:"700",padding:"30px"},testimonial:{items:[{name:"Nome do cliente",text:"Depoimento do cliente depoimento do cliente depoimento do cliente",avatar:"",rating:"5"}
67],showAvatar:!0,bgColor:"#ffffff",textColor:"#1f2937",padding:"30px"},whatsapp:{phone:"",message:"Olá! Gostaria de saber mais.",buttonText:"Fale conosco no WhatsApp",bgColor:"#25D366",position:"bottom-right",fontWeight:"600",padding:"20px"},timer:{minutes:"15",seconds:"00",text:"Oferta por tempo limitado",bgColor:"#1ddf75",textColor:"#ffffff",fontSize:"16px",fontWeight:"400"},spacer:{height:"40px"},notification:{messages:["João acabou de comprar!","Maria comprou há 2 minutos!"],displayTime:"5",interval:"8",position:"bottom-left",bgColor:"#ffffff",borderRadius:"8",cycle:"loop"},html:{customHtml:""},discountPopup:{title:"Oferta exclusiva para você!",description:"Use o cupom abaixo e garanta seu desconto agora.",coupon:"DESCONTO10",delay:"60",bgColor:"#ff4757",textColor:"#ffffff",bgOverlay:"rgba(0,0,0,0.55)"},orderbumpColor:{colorLight:"#0900ff",colorDark:"#15c36b",allColorLight:"#0900ff",allColorDark:"#15c36b"}};return{id:X(),type:t,props:{...e[t]||{}}}}const te=[{type:"image",label:"Imagem",icon:"fa-solid fa-image",description:"Imagem com link"},{type:"text",label:"Texto",icon:"fa-solid fa-align-left",description:"Bloco de texto"},{type:"banner",label:"Banner",icon:"fa-solid fa-heading",description:"TÃtulo com fundo"},{type:"video",label:"VÃdeo",icon:"fa-solid fa-play",description:"YouTube ou Vimeo"},{type:"guarantee",label:"Garantia",icon:"fa-solid fa-shield",description:"Selo de garantia"},{type:"testimonial",label:"Depoimento",icon:"fa-solid fa-quote-left",description:"Avaliação de cliente"},{type:"whatsapp",label:"WhatsApp",icon:"fa-brands fa-whatsapp",description:"Botão WhatsApp"},{type:"timer",label:"Cronômetro",icon:"fa-solid fa-clock",description:"Contador regressivo"},{type:"notification",label:"Notificação",icon:"fa-solid fa-bell",description:"Prova social"},{type:"spacer",label:"Espaçador",icon:"fa-solid fa-arrows-up-down",description:"Espaço entre blocos"},{type:"html",label:"HTML",icon:"fa-solid fa-code",description:"Código HTML livre"},{type:"discountPopup",label:"Popup Desconto",icon:"fa-solid fa-tag",description:"Banner popup com cupom"},{type:"orderbumpColor",label:"Cor do Orderbump",icon:"fa-solid fa-palette",description:"Destaque do orderbump (claro/escuro)"}],oe={props:{title:{type:String,default:""},saving:{type:Boolean,default:!1},canUndo:{type:Boolean,default:!1},canRedo:{type:Boolean,default:!1},viewport:{type:String,default:"desktop"}},data(){return{viewports:[{value:"desktop",label:"Desktop",icon:"fa-solid fa-desktop"},{value:"tablet",label:"Tablet",icon:"fa-solid fa-tablet-screen-button"},{value:"mobile",label:"Mobile",icon:"fa-solid fa-mobile-screen-button"}]}}},ie={class:"flex items-center justify-between px-3 lg:px-4 py-2 bg-white dark:bg-primary-900 border-b border-gray-200 dark:border-primary-800"},ae={class:"flex items-center gap-2 lg:gap-3 min-w-0"},le={class:"text-sm font-medium text-primary dark:text-primary-200 truncate max-w-[120px] lg:max-w-[200px] hidden sm:inline"},re={class:"flex items-center gap-1"},ne=["disabled"],se=["disabled"],de=["onClick","title"],pe={class:"flex items-center gap-2"},ue=["disabled"],ce={class:"hidden sm:inline"};function fe(t,e,o,d,s,a){return n(),p("div",ie,[i("div",ae,[i("button",{onClick:e[0]||(e[0]=l=>t.$emit("toggle-blocks")),class:"lg:hidden p-2 text-sm rounded hover:bg-gray-100 dark:hover:bg-primary-800 text-gray-600 dark:text-primary-300 transition-colors",title:"Elementos"},[...e[7]||(e[7]=[i("i",{class:"fa-solid fa-layer-group"},null,-1)])]),i("button",{onClick:e[1]||(e[1]=l=>t.$emit("back")),class:"flex items-center gap-2 px-3 py-1.5 text-sm text-gray-600 dark:text-primary-300 hover:text-primary dark:hover:text-primary-100 transition-colors"},[...e[8]||(e[8]=[i("i",{class:"fa-solid fa-arrow-left"},null,-1),i("span",{class:"hidden sm:inline"},"Voltar",-1)])]),e[9]||(e[9]=i("div",{class:"h-5 w-px bg-gray-300 dark:bg-primary-700 hidden sm:block"},null,-1)),i("span",le,y(o.title||"Editor de Checkout"),1)]),i("div",re,[i("button",{onClick:e[2]||(e[2]=l=>t.$emit("undo")),disabled:!o.canUndo,class:B(["p-2 text-sm rounded hover:bg-gray-100 dark:hover:bg-primary-800 transition-colors",o.canUndo?"text-gray-600 dark:text-primary-300":"text-gray-300 dark:text-primary-600 cursor-not-allowed"]),title:"Desfazer"},[...e[10]||(e[10]=[i("i",{class:"fa-solid fa-rotate-left"},null,-1)])],10,ne),i("button",{onClick:e[3]||(e[3]=l=>t.$emit("redo")),disabled:!o.canRedo,class:B(["p-2 text-sm rounded hover:bg-gray-100 dark:hover:bg-primary-800 transition-colors",o.canRedo?"text-gray-600 dark:text-primary-300":"text-gray-300 dark:text-primary-600 cursor-not-allowed"]),title:"Refazer"},[...e[11]||(e[11]=[i("i",{class:"fa-solid fa-rotate-right"},null,-1)])],10,se),e[12]||(e[12]=i("div",{class:"h-5 w-px bg-gray-300 dark:bg-primary-700 mx-1 hidden lg:block"},null,-1)),(n(!0),p(v,null,I(s.viewports,l=>(n(),p("button",{key:l.value,onClick:u=>t.$emit("viewport",l.value),class:B(["p-2 text-sm rounded hover:bg-gray-100 dark:hover:bg-primary-800 transition-colors hidden lg:block",o.viewport===l.value?"text-secondary":"text-gray-600 dark:text-primary-300"]),title:l.label},[i("i",{class:B(l.icon)},null,2)],10,de))),128))]),i("div",pe,[i("button",{onClick:e[4]||(e[4]=l=>t.$emit("preview")),class:"hidden sm:flex items-center gap-2 px-3 py-1.5 text-sm rounded-lg border border-gray-300 dark:border-primary-700 bg-[#f4f5f7] text-gray-600 dark:text-primary-300 hover:bg-[#e9ebef] dark:hover:bg-primary-800 transition-colors"},[...e[13]||(e[13]=[i("i",{class:"fa-solid fa-eye"},null,-1),i("span",{class:"hidden md:inline"},"Preview",-1)])]),i("button",{onClick:e[5]||(e[5]=l=>t.$emit("save")),disabled:o.saving,class:"flex items-center gap-2 px-3 lg:px-4 py-1.5 text-sm font-medium rounded-lg bg-secondary text-white hover:bg-secondary-600 transition-colors disabled:opacity-50"},[i("i",{class:B(o.saving?"fa-solid fa-spinner fa-spin":"fa-solid fa-check")},null,2),i("span",ce,y(o.saving?"Salvando...":"Salvar"),1)],8,ue),i("button",{onClick:e[6]||(e[6]=l=>t.$emit("toggle-props")),class:"lg:hidden p-2 text-sm rounded hover:bg-gray-100 dark:hover:bg-primary-800 text-gray-600 dark:text-primary-300 transition-colors",title:"Propriedades"},[...e[14]||(e[14]=[i("i",{class:"fa-solid fa-sliders"},null,-1)])])])])}const G=Object.assign(x(oe,[["render",fe]]),{__name:"EditorToolbar"}),ge={data(){return{blockTypes:te}},methods:{onDragStart(t,e){t.dataTransfer.setData("block-type",e),t.dataTransfer.effectAllowed="copy"},onBlockClick(t){this.$emit("add-block",t),this.$emit("close")}}},be={class:"w-[240px] min-w-[240px] bg-white dark:bg-primary-900 border-r border-gray-200 dark:border-primary-800 overflow-y-auto"},me={class:"p-3 border-b border-gray-200 dark:border-primary-800 flex items-center justify-between"},ye={class:"p-2"},xe=["onDragstart","onClick"],ve={class:"w-8 h-8 rounded-lg bg-gray-100 dark:bg-primary-800 flex items-center justify-center text-gray-500 dark:text-primary-400 group-hover:bg-secondary-50 group-hover:text-secondary dark:group-hover:bg-secondary-900 dark:group-hover:text-secondary transition-colors"},he={class:"text-sm font-medium text-primary dark:text-primary-200"},ke={class:"text-xs text-gray-400 dark:text-primary-500"};function we(t,e,o,d,s,a){return n(),p("div",be,[i("div",me,[e[2]||(e[2]=i("h3",{class:"text-xs font-semibold text-gray-500 dark:text-primary-400 uppercase tracking-wider"}," Elementos ",-1)),i("button",{onClick:e[0]||(e[0]=l=>t.$emit("close")),class:"lg:hidden w-6 h-6 flex items-center justify-center rounded text-gray-400 dark:text-primary-500 hover:text-gray-600 dark:hover:text-primary-300 hover:bg-gray-100 dark:hover:bg-primary-800 transition-colors"},[...e[1]||(e[1]=[i("i",{class:"fa-solid fa-xmark text-sm"},null,-1)])])]),i("div",ye,[(n(!0),p(v,null,I(s.blockTypes,l=>(n(),p("div",{key:l.type,class:"flex items-center gap-3 px-3 py-2.5 rounded-lg cursor-pointer mb-1 border border-transparent hover:border-gray-200 dark:hover:border-primary-700 hover:bg-gray-50 dark:hover:bg-primary-950 transition-colors group",draggable:"true",onDragstart:u=>a.onDragStart(u,l.type),onClick:u=>a.onBlockClick(l.type)},[i("div",ve,[i("i",{class:B([l.icon,"text-sm"])},null,2)]),i("div",null,[i("div",he,y(l.label),1),i("div",ke,y(l.description),1)])],40,xe))),128))])])}const L=Object.assign(x(ge,[["render",we]]),{__name:"EditorBlockPanel"}),Ce={props:{align:{type:String,default:"left"},currentColor:{type:String,default:"#333333"},currentFontSize:{type:String,default:"16"},showAlign:{type:Boolean,default:!0}},data(){return{showFontSizes:!1,fontSizes:["8","10","12","14","16","18","20","24","28","32","36","48","64","72"]}}},ze={style:{display:"inline-flex","align-items":"center",height:"28px",border:"1px solid #d1d5db","border-radius":"4px",position:"relative"},title:"Tamanho da fonte"},Se={key:0,style:{position:"absolute",top:"100%",left:"50%",transform:"translateX(-50%)","margin-top":"4px",background:"white",border:"1px solid #e5e7eb","border-radius":"6px","box-shadow":"0 4px 12px rgba(0,0,0,0.15)",padding:"4px",display:"flex","flex-wrap":"wrap",gap:"2px",width:"130px","z-index":"10"}},Pe=["onClick"],Be={style:{position:"relative",width:"28px",height:"28px"},title:"Cor do texto"},Ie=["value"];function $e(t,e,o,d,s,a){return n(),p("div",{style:{position:"absolute",bottom:"-40px",left:"0","z-index":"50",display:"inline-flex","align-items":"center",gap:"2px",padding:"4px 8px",background:"white",border:"1px solid #e5e7eb","border-radius":"8px","box-shadow":"0 2px 8px rgba(0,0,0,0.12)","white-space":"nowrap"},onMousedown:e[11]||(e[11]=h(()=>{},["prevent"]))},[i("button",{onClick:e[0]||(e[0]=l=>t.$emit("format","bold")),style:{width:"28px",height:"28px",display:"flex","align-items":"center","justify-content":"center",border:"none",background:"transparent","border-radius":"4px",cursor:"pointer","font-size":"13px",color:"#374151"},title:"Negrito"},[...e[12]||(e[12]=[i("i",{class:"fa-solid fa-bold"},null,-1)])]),i("button",{onClick:e[1]||(e[1]=l=>t.$emit("format","italic")),style:{width:"28px",height:"28px",display:"flex","align-items":"center","justify-content":"center",border:"none",background:"transparent","border-radius":"4px",cursor:"pointer","font-size":"13px",color:"#374151"},title:"Itálico"},[...e[13]||(e[13]=[i("i",{class:"fa-solid fa-italic"},null,-1)])]),i("button",{onClick:e[2]||(e[2]=l=>t.$emit("format","underline")),style:{width:"28px",height:"28px",display:"flex","align-items":"center","justify-content":"center",border:"none",background:"transparent","border-radius":"4px",cursor:"pointer","font-size":"13px",color:"#374151"},title:"Sublinhado"},[...e[14]||(e[14]=[i("i",{class:"fa-solid fa-underline"},null,-1)])]),e[22]||(e[22]=i("div",{style:{width:"1px",height:"20px",background:"#d1d5db",margin:"0 4px"}},null,-1)),i("div",ze,[i("button",{onClick:e[3]||(e[3]=l=>t.$emit("font-size",String(Math.max(8,parseInt(o.currentFontSize)-1)))),style:{width:"22px",height:"28px",display:"flex","align-items":"center","justify-content":"center",border:"none",background:"transparent",curs
67or:"pointer","font-size":"12px",color:"#374151","border-right":"1px solid #e5e7eb"}},[...e[15]||(e[15]=[i("i",{class:"fa-solid fa-minus",style:{"font-size":"9px"}},null,-1)])]),i("span",{onClick:e[4]||(e[4]=l=>s.showFontSizes=!s.showFontSizes),style:{width:"30px","text-align":"center","font-size":"11px",color:"#374151","user-select":"none",cursor:"pointer"}},y(o.currentFontSize),1),i("button",{onClick:e[5]||(e[5]=l=>t.$emit("font-size",String(Math.min(120,parseInt(o.currentFontSize)+1)))),style:{width:"22px",height:"28px",display:"flex","align-items":"center","justify-content":"center",border:"none",background:"transparent",cursor:"pointer","font-size":"12px",color:"#374151","border-left":"1px solid #e5e7eb"}},[...e[16]||(e[16]=[i("i",{class:"fa-solid fa-plus",style:{"font-size":"9px"}},null,-1)])]),s.showFontSizes?(n(),p("div",Se,[(n(!0),p(v,null,I(s.fontSizes,l=>(n(),p("button",{key:l,onClick:u=>{t.$emit("font-size",l),s.showFontSizes=!1},style:b({width:"28px",height:"26px",display:"flex",alignItems:"center",justifyContent:"center",border:"none",background:o.currentFontSize===l?"#e5e7eb":"transparent",borderRadius:"4px",cursor:"pointer",fontSize:"11px",color:"#374151"})},y(l),13,Pe))),128))])):g("",!0)]),e[23]||(e[23]=i("div",{style:{width:"1px",height:"20px",background:"#d1d5db",margin:"0 4px"}},null,-1)),i("div",Be,[i("input",{type:"color",value:o.currentColor,onInput:e[6]||(e[6]=l=>t.$emit("color",l.target.value)),onMousedown:e[7]||(e[7]=h(()=>{},["stop"])),style:{position:"absolute",inset:"0",width:"100%",height:"100%",opacity:"0",cursor:"pointer"}},null,40,Ie),e[17]||(e[17]=i("div",{style:{width:"28px",height:"28px",display:"flex","align-items":"center","justify-content":"center","border-radius":"4px",cursor:"pointer","font-size":"13px",color:"#374151"}},[i("i",{class:"fa-solid fa-palette"})],-1)),i("div",{style:b({position:"absolute",bottom:"2px",left:"4px",right:"4px",height:"3px",borderRadius:"2px",backgroundColor:o.currentColor})},null,4)]),o.showAlign?(n(),p(v,{key:0},[e[21]||(e[21]=i("div",{style:{width:"1px",height:"20px",background:"#d1d5db",margin:"0 4px"}},null,-1)),i("button",{onClick:e[8]||(e[8]=l=>t.$emit("align","left")),style:b({width:"28px",height:"28px",display:"flex",alignItems:"center",justifyContent:"center",border:"none",background:o.align==="left"?"#f3f4f6":"transparent",borderRadius:"4px",cursor:"pointer",fontSize:"13px",color:"#374151"}),title:"Alinhar à esquerda"},[...e[18]||(e[18]=[i("i",{class:"fa-solid fa-align-left"},null,-1)])],4),i("button",{onClick:e[9]||(e[9]=l=>t.$emit("align","center")),style:b({width:"28px",height:"28px",display:"flex",alignItems:"center",justifyContent:"center",border:"none",background:o.align==="center"?"#f3f4f6":"transparent",borderRadius:"4px",cursor:"pointer",fontSize:"13px",color:"#374151"}),title:"Centralizar"},[...e[19]||(e[19]=[i("i",{class:"fa-solid fa-align-center"},null,-1)])],4),i("button",{onClick:e[10]||(e[10]=l=>t.$emit("align","right")),style:b({width:"28px",height:"28px",display:"flex",alignItems:"center",justifyContent:"center",border:"none",background:o.align==="right"?"#f3f4f6":"transparent",borderRadius:"4px",cursor:"pointer",fontSize:"13px",color:"#374151"}),title:"Alinhar à direita"},[...e[20]||(e[20]=[i("i",{class:"fa-solid fa-align-right"},null,-1)])],4)],64)):g("",!0)],32)}const j=Object.assign(x(Ce,[["render",$e]]),{__name:"EditorBlocksTextToolbar"}),M={data(){return{activeColor:"#333333",activeFontSize:"16",savedRange:null}},methods:{saveSelection(){const t=window.getSelection();t&&t.rangeCount>0&&(this.savedRange=t.getRangeAt(0).cloneRange())},restoreSelection(){if(this.savedRange){const t=window.getSelection();t.removeAllRanges(),t.addRange(this.savedRange)}},execFormat(t){this.restoreSelection(),document.execCommand(t,!1,null),this.saveSelection()},applyColor(t){this.restoreSelection(),document.execCommand("foreColor",!1,t),this.activeColor=t,this.saveSelection()},applyFontSize(t){this.restoreSelection(),document.execCommand("fontSize",!1,"7");const e=window.getSelection(),o=e&&e.rangeCount>0?e.getRangeAt(0).commonAncestorContainer:null,d=o?(o.nodeType===3?o.parentElement:o).closest('[contenteditable="true"]'):null,s=[];if(d&&d.querySelectorAll('font[size="7"]').forEach(l=>{const u=document.createElement("span");u.style.fontSize=t+"px",u.innerHTML=l.innerHTML,l.parentNode.replaceChild(u,l),s.push(u)}),s.length>0){const a=document.createRange();a.setStartBefore(s[0].firstChild||s[0]);const l=s[s.length-1];a.setEndAfter(l.lastChild||l);const u=window.getSelection();u.removeAllRanges(),u.addRange(a)}this.activeFontSize=t,this.saveSelection()},updateActiveStyles(){const t=window.getSelection();if(t&&t.rangeCount>0){this.savedRange=t.getRangeAt(0).cloneRange();const e=t.focusNode,o=e&&e.nodeType===3?e.parentElement:e;if(o&&o instanceof HTMLElement){const d=window.getComputedStyle(o);this.activeFontSize=String(parseInt(d.fontSize)||16),this.activeColor=this.rgbToHex(d.color||"#333333")}}},rgbToHex(t){if(t.startsWith("#"))return t;const e=t.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);if(!e)return t;const o=parseInt(e[1]).toString(16).padStart(2,"0"),d=parseInt(e[2]).toString(16).padStart(2,"0"),s=parseInt(e[3]).toString(16).padStart(2,"0");return"#"+o+d+s},fontSizeToPixels(t){return{1:"10",2:"13",3:"16",4:"18",5:"24",6:"32",7:"48"}[t]||"16"},sanitize(t){return D(t)}}},Te={components:{TextToolbar:j},mixins:[M],props:{block:{type:Object,required:!0},editing:{type:Boolean,default:!1}}},Ae=["contenteditable","innerHTML"],je=["contenteditable","innerHTML"];function Me(t,e,o,d,s,a){const l=C("TextToolbar");return n(),p("div",{style:b({backgroundColor:o.block.props.bgColor,backgroundImage:o.block.props.bgImage?"url("+o.block.props.bgImage+")":"none",backgroundSize:"cover",backgroundPosition:"center",padding:o.block.props.padding+" 20px",textAlign:o.block.props.textAlign,position:"relative"})},[o.editing?(n(),P(l,{key:0,align:o.block.props.textAlign||"center","current-color":t.activeColor,"current-font-size":t.activeFontSize,onFormat:t.execFormat,onFontSize:t.applyFontSize,onColor:t.applyColor,onAlign:e[0]||(e[0]=u=>t.$emit("update-prop","textAlign",u))},null,8,["align","current-color","current-font-size","onFormat","onFontSize","onColor"])):g("",!0),i("h2",{contenteditable:o.editing,onBlur:e[1]||(e[1]=u=>t.$emit("update-prop","title",t.sanitize(u.target.innerHTML))),onMouseup:e[2]||(e[2]=(...u)=>t.updateActiveStyles&&t.updateActiveStyles(...u)),onKeyup:e[3]||(e[3]=(...u)=>t.updateActiveStyles&&t.updateActiveStyles(...u)),style:b({color:o.block.props.textColor,fontSize:o.block.props.fontSize,fontFamily:o.block.props.fontFamily,margin:"0 0 10px 0",fontWeight:o.block.props.fontWeight||"700",outline:"none"}),innerHTML:t.sanitize(o.block.props.title)},null,44,Ae),o.block.props.subtitle?(n(),p("p",{key:1,contenteditable:o.editing,onBlur:e[4]||(e[4]=u=>t.$emit("update-prop","subtitle",t.sanitize(u.target.innerHTML))),onMouseup:e[5]||(e[5]=(...u)=>t.updateActiveStyles&&t.updateActiveStyles(...u)),onKeyup:e[6]||(e[6]=(...u)=>t.updateActiveStyles&&t.updateActiveStyles(...u)),style:b({color:o.block.props.textColor,fontSize:parseInt(o.block.props.fontSize)*.6+"px",fontFamily:o.block.props.fontFamily,margin:"0",opacity:"0.9",outline:"none"}),innerHTML:t.sanitize(o.block.props.subtitle)},null,44,je)):g("",!0)],4)}const Re=Object.assign(x(Te,[["render",Me]]),{__name:"EditorBlocksBlockBanner"}),Oe={components:{TextToolbar:j},mixins:[M],props:{block:{type:Object,required:!0},editing:{type:Boolean,default:!1}}},Ee=["contenteditable","innerHTML"];function He(t,e,o,d,s,a){const l=C("TextToolbar");return n(),p("div",{style:b({backgroundColor:o.block.props.bgColor,padding:o.block.props.padding,textAlign:o.block.props.textAlign,position:"relative"})},[o.editing?(n(),P(l,{key:0,align:o.block.props.textAlign||"left","current-color":t.activeColor,"current-font-size":t.activeFontSize,onFormat:t.execFormat,onFontSize:t.applyFontSize,onColor:t.applyColor,onAlign:e[0]||(e[0]=u=>t.$emit("update-prop","textAlign",u))},null,8,["align","current-color","current-font-size","onFormat","onFontSize","onColor"])):g("",!0),i("div",{contenteditable:o.editing,onBlur:e[1]||(e[1]=u=>t.$emit("update-prop","content",t.sanitize(u.target.innerHTML))),onMouseup:e[2]||(e[2]=(...u)=>t.updateActiveStyles&&t.updateActiveStyles(...u)),onKeyup:e[3]||(e[3]=(...u)=>t.updateActiveStyles&&t.updateActiveStyles(...u)),style:{lineHeight:"1.6",maxWidth:"800px",margin:"0 auto",outline:"none",minHeight:"1.6em"},innerHTML:t.sanitize(o.block.props.content)},null,40,Ee)],4)}const Fe=Object.assign(x(Oe,[["render",He]]),{__name:"EditorBlocksBlockText"}),Le={props:{block:{type:Object,required:!0},editing:{type:Boolean,default:!1}}},Ue=["src","alt"],De={key:1,class:"flex flex-col items-center justify-center gap-2 py-12 text-gray-400 border-2 border-dashed border-gray-300 rounded-lg"};function Ne(t,e,o,d,s,a){return n(),p("div",{style:b({padding:o.block.props.padding,textAlign:"center"})},[o.block.props.imageUrl?(n(),p("img",{key:0,src:o.block.props.imageUrl,alt:o.block.props.alt,style:b({maxWidth:"100%",width:o.block.props.width,borderRadius:o.block.props.borderRadius,display:"block",margin:"0 auto"})},null,12,Ue)):(n(),p("div",De,[...e[0]||(e[0]=[i("i",{class:"fa-solid fa-image text-3xl"},null,-1),i("span",{class:"text-sm"},"Selecione uma imagem no painel de propriedades",-1)])]))],4)}const qe=Object.assign(x(Le,[["render",Ne]]),{__name:"EditorBlocksBlockImage"}),We={props:{block:{type:Object,required:!0},editing:{type:Boolean,default:!1}},computed:{embedUrl(){const t=this.block.props.videoUrl||"",e=t.match(/(?:youtube\.com\/(?:watch\?v=|embed\/|shorts\/)|youtu\.be\/)([a-zA-Z0-9_-]{11})/);if(e)return"https://www.youtube.com/embed/"+e[1];const o=t.match(/vimeo\.com\/(?:video\/)?(\d+)/);return o?"https://player.vimeo.com/video/"+o[1]:null},paddingPercent(){const t=this.block.props.aspectRatio||"16:9",[e,o]=t.split(":").map(Number);return(o/e*100).toFixed(2)}}},Ve={key:0,class:"overflow-hidden rounded-lg",style:{maxWidth:"800px",margin:"0 auto"}},Ke=["src"],Ge={key:1,class:"flex flex-col items-center justify-center gap-2 py-12 text-gray-400 border-2 border-dashed border-gray-300 rounded-lg",style:{"max-width":"800px",margin:"0 auto"}};function Je(t,e,o,d,s,a){return n(),p("div",{style:b({padding:o.block.props.padding})},[a.embedUrl?(n(),p("div",Ve,[i("iframe",{src:a.embedUrl,style:{width:"100%","aspect-ratio":"16/9","max-height":"460px",border:"0",display:"block"},allowfullscreen:""},null,8,Ke)])):(n(),p("div",Ge,[...e[0]||(e[0]=[i("i",{class:"fa-solid fa-play text-3xl"},null,-1),i("span",{class:"text-sm"},"Cole a URL do vÃdeo no painel de propriedades",-1)])]))],4)}const Ze=Object.assign(x(We,[["render",Je]]),{__name:"EditorBlocksBlockVideo"}),Qe={components:{TextToolbar:j},mixins:[M],props:{block:{type:Object,required:!0},editing:{type:Boolean,default:!1}}},Xe={style:{"max-width":"600px",margin:"0 auto",display:"flex","align-items":"center",gap:"20px"}},Ye={style:{flex:"1","min-width":"0"}},_e=["contenteditable","innerHTML"],et=["contenteditable","innerHTML"];function tt(t,e,o,d,s,a){const l=C("TextToolbar");return n(),p("div",{style:b({backgroundColor:o.block.props.bgColor,padding:o.block.props.padding+" 20px",position:"relative"})},[o.editing?(n(),P(l,{key:0,"show-align":!1,"current-color":t.activeColor,"current-font-size":t.activeFontSize,onFormat:t.execFormat,onFontSize:t.applyFontSize,onColor:t.applyColor},null,8,["current-color","current-font-size","onFormat","onFontSize","onColor"])):g("",!0),i("div",Xe,[e[6]||(e[6]=i("img",{src:"https://fiapy.nyc3.cdn.digitaloceanspaces.com/builder/landing/img/selo.png",alt:"Selo de garantia",style:{width:"100px",height:"100px","flex-shrink":"0","object-fit":"contain"}}
67,null,-1)),i("div",Ye,[i("h3",{contenteditable:o.editing,onBlur:e[0]||(e[0]=u=>t.$emit("update-prop","title",t.sanitize(u.target.innerHTML))),onMouseup:e[1]||(e[1]=(...u)=>t.updateActiveStyles&&t.updateActiveStyles(...u)),onKeyup:e[2]||(e[2]=(...u)=>t.updateActiveStyles&&t.updateActiveStyles(...u)),style:b({color:o.block.props.textColor,fontSize:"20px",fontWeight:o.block.props.fontWeight||"700",margin:"0 0 8px 0",outline:"none"}),innerHTML:t.sanitize(o.block.props.title)},null,44,_e),i("p",{contenteditable:o.editing,onBlur:e[3]||(e[3]=u=>t.$emit("update-prop","description",t.sanitize(u.target.innerHTML))),onMouseup:e[4]||(e[4]=(...u)=>t.updateActiveStyles&&t.updateActiveStyles(...u)),onKeyup:e[5]||(e[5]=(...u)=>t.updateActiveStyles&&t.updateActiveStyles(...u)),style:b({color:o.block.props.textColor,fontSize:"14px",opacity:"0.8",margin:"0",lineHeight:"1.5",outline:"none"}),innerHTML:t.sanitize(o.block.props.description)},null,44,et)])])],4)}const ot=Object.assign(x(Qe,[["render",tt]]),{__name:"EditorBlocksBlockGuarantee"}),it={components:{TextToolbar:j},mixins:[M],props:{block:{type:Object,required:!0},editing:{type:Boolean,default:!1}},data(){return{defaultAvatar:"https://fiapy.nyc3.cdn.digitaloceanspaces.com/builder/landing/img/120x120.png"}},methods:{updateItemProp(t,e,o){const d=this.block.props.items.map((s,a)=>a===t?{...s,[e]:o}:s);this.$emit("update-prop","items",d)}}},at={style:{display:"flex",gap:"24px",justifyContent:"center",flexWrap:"wrap",maxWidth:"1200px",margin:"0 auto"}},lt=["src"],rt=["contenteditable","onBlur","innerHTML"],nt=["contenteditable","onBlur","innerHTML"],st={style:{color:"#f59e0b",fontSize:"14px"}};function dt(t,e,o,d,s,a){const l=C("TextToolbar");return n(),p("div",{style:b({padding:o.block.props.padding,position:"relative"})},[o.editing?(n(),P(l,{key:0,"show-align":!1,"current-color":t.activeColor,"current-font-size":t.activeFontSize,onFormat:t.execFormat,onFontSize:t.applyFontSize,onColor:t.applyColor},null,8,["current-color","current-font-size","onFormat","onFontSize","onColor"])):g("",!0),i("div",at,[(n(!0),p(v,null,I(o.block.props.items,(u,m)=>(n(),p("div",{key:m,style:b({backgroundColor:o.block.props.bgColor,flex:"1",minWidth:"180px",maxWidth:o.block.props.items.length===1?"400px":"300px",textAlign:"center",padding:"24px",borderRadius:"8px"})},[o.block.props.showAvatar!==!1?(n(),p("img",{key:0,src:u.avatar||s.defaultAvatar,style:{width:"120px",height:"120px",borderRadius:"50%",objectFit:"cover",margin:"0 auto 16px",display:"block"}},null,8,lt)):g("",!0),i("p",{contenteditable:o.editing,onBlur:c=>a.updateItemProp(m,"name",t.sanitize(c.target.innerHTML)),onMouseup:e[0]||(e[0]=(...c)=>t.updateActiveStyles&&t.updateActiveStyles(...c)),onKeyup:e[1]||(e[1]=(...c)=>t.updateActiveStyles&&t.updateActiveStyles(...c)),style:b({color:o.block.props.textColor||"#1f2937",fontWeight:"700",fontSize:"16px",margin:"0 0 8px",outline:"none"}),innerHTML:t.sanitize(u.name)},null,44,rt),i("p",{contenteditable:o.editing,onBlur:c=>a.updateItemProp(m,"text",t.sanitize(c.target.innerHTML)),onMouseup:e[2]||(e[2]=(...c)=>t.updateActiveStyles&&t.updateActiveStyles(...c)),onKeyup:e[3]||(e[3]=(...c)=>t.updateActiveStyles&&t.updateActiveStyles(...c)),style:b({color:o.block.props.textColor||"#1f2937",fontSize:"14px",lineHeight:"1.6",margin:"0 0 12px",outline:"none"}),innerHTML:t.sanitize(u.text)},null,44,nt),i("div",st,[(n(!0),p(v,null,I(parseInt(u.rating||5),c=>(n(),p("i",{key:"star-"+m+"-"+c,class:"fa-solid fa-star"}))),128))])],4))),128))])],4)}const pt=Object.assign(x(it,[["render",dt]]),{__name:"EditorBlocksBlockTestimonial"}),ut={props:{block:{type:Object,required:!0},editing:{type:Boolean,default:!1}},computed:{whatsappUrl(){const t=(this.block.props.phone||"").replace(/\D/g,""),e=encodeURIComponent(this.block.props.message||"");return"https://wa.me/"+t+"?text="+e},positionLabel(){return{"top-left":"superior esquerdo","top-right":"superior direito","bottom-left":"inferior esquerdo","bottom-right":"inferior direito"}[this.block.props.position]||"inferior direito"}}},ct={style:{padding:"16px",display:"flex","align-items":"center",gap:"12px","background-color":"#f0fdf4",border:"1px dashed #86efac","border-radius":"8px"}},ft=["href"],gt={style:{flex:"1","min-width":"0"}},bt={style:{margin:"2px 0 0","font-size":"11px",color:"#666"}},mt={key:0,style:{margin:"2px 0 0","font-size":"11px",color:"#16a34a"}};function yt(t,e,o,d,s,a){return n(),p("div",ct,[i("a",{href:a.whatsappUrl,target:"_blank",rel:"noopener noreferrer",style:b({width:"56px",height:"56px",minWidth:"56px",backgroundColor:o.block.props.bgColor||"#25D366",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",textDecoration:"none",boxShadow:"0 4px 12px rgba(0,0,0,0.2)"}),onClick:e[0]||(e[0]=h(()=>{},["prevent"]))},[...e[1]||(e[1]=[i("i",{class:"fa-brands fa-whatsapp text-white text-2xl"},null,-1)])],12,ft),i("div",gt,[e[2]||(e[2]=i("p",{style:{margin:"0","font-size":"13px","font-weight":"600",color:"#333"}},"Botão WhatsApp flutuante",-1)),i("p",bt,"Fixo no canto "+y(a.positionLabel)+" do checkout",1),o.block.props.phone?(n(),p("p",mt,y(o.block.props.phone),1)):g("",!0)])])}const xt=Object.assign(x(ut,[["render",yt]]),{__name:"EditorBlocksBlockWhatsapp"}),vt={components:{TextToolbar:j},mixins:[M],props:{block:{type:Object,required:!0},editing:{type:Boolean,default:!1}},computed:{paddedMinutes(){return String(this.block.props.minutes||"15").padStart(2,"0")},paddedSeconds(){return String(this.block.props.seconds||"00").padStart(2,"0")},timerText(){return this.sanitize(this.block.props.text||"Oferta por tempo limitado")}}},ht={style:{display:"flex","justify-content":"center","align-items":"center"}},kt={id:"minute",style:{"font-weight":"bold","font-size":"21pt",margin:"0"}},wt={id:"second",style:{"font-weight":"bold","font-size":"21pt",margin:"0"}},Ct=["contenteditable","innerHTML"];function zt(t,e,o,d,s,a){const l=C("TextToolbar");return n(),p("div",{style:b({width:"100%",height:"80px",backgroundColor:o.block.props.bgColor,display:"flex",alignItems:"center",textAlign:"center",position:"relative"})},[o.editing?(n(),P(l,{key:0,"show-align":!1,"current-color":t.activeColor,"current-font-size":t.activeFontSize,onFormat:t.execFormat,onFontSize:t.applyFontSize,onColor:t.applyColor},null,8,["current-color","current-font-size","onFormat","onFontSize","onColor"])):g("",!0),i("div",{style:b({height:"100%",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",gap:"10px",color:o.block.props.textColor})},[i("div",ht,[i("p",kt,y(a.paddedMinutes),1),e[3]||(e[3]=i("p",{style:{margin:"0 5px","font-weight":"bold","font-size":"21pt"}},":",-1)),i("p",wt,y(a.paddedSeconds),1)]),i("i",{class:"fa-solid fa-clock",style:b({fontSize:"17pt",color:o.block.props.textColor,marginLeft:"10px"})},null,4),i("p",{contenteditable:o.editing,onBlur:e[0]||(e[0]=u=>t.$emit("update-prop","text",t.sanitize(u.target.innerHTML))),onMouseup:e[1]||(e[1]=(...u)=>t.updateActiveStyles&&t.updateActiveStyles(...u)),onKeyup:e[2]||(e[2]=(...u)=>t.updateActiveStyles&&t.updateActiveStyles(...u)),style:b({margin:"0 0 0 6px",fontSize:o.block.props.fontSize,fontWeight:o.block.props.fontWeight||"400",outline:"none"}),innerHTML:t.sanitize(o.block.props.text||"Oferta por tempo limitado")},null,44,Ct)],4)],4)}const St=Object.assign(x(vt,[["render",zt]]),{__name:"EditorBlocksBlockTimer"}),Pt={props:{block:{type:Object,required:!0},editing:{type:Boolean,default:!1}}},Bt={key:0,class:"absolute inset-0 flex items-center justify-center text-xs text-gray-400 border border-dashed border-gray-300"};function It(t,e,o,d,s,a){return n(),p("div",{style:b({height:o.block.props.height}),class:"relative group"},[o.editing?(n(),p("div",Bt,y(o.block.props.height),1)):g("",!0)],4)}const $t=Object.assign(x(Pt,[["render",It]]),{__name:"EditorBlocksBlockSpacer"}),Tt={props:{block:{type:Object,required:!0},editing:{type:Boolean,default:!1}},computed:{sanitizedHtml(){const t=D(this.block.props.customHtml);return!t||!t.trim()?"":t}}},At=["innerHTML"],jt={key:1,style:{padding:"24px","text-align":"center",color:"#9ca3af","background-color":"#f9fafb",border:"1px dashed #d1d5db","border-radius":"8px",margin:"8px"}};function Mt(t,e,o,d,s,a){return n(),p("div",null,[a.sanitizedHtml?(n(),p("div",{key:0,innerHTML:a.sanitizedHtml},null,8,At)):(n(),p("div",jt,[...e[0]||(e[0]=[i("i",{class:"fa-solid fa-code",style:{"font-size":"24px","margin-bottom":"8px",display:"block"}},null,-1),i("span",{style:{"font-size":"13px"}},"HTML personalizado (apenas html, não aceita script/css que não seja inline)",-1),i("p",{style:{"font-size":"11px",margin:"4px 0 0"}},"Adicione código no painel de propriedades",-1)])]))])}const Rt=Object.assign(x(Tt,[["render",Mt]]),{__name:"EditorBlocksBlockHtml"}),Ot={props:{block:{type:Object,required:!0},editing:{type:Boolean,default:!1}},computed:{positionLabel(){return{"top-left":"superior esquerda","top-right":"superior direita","bottom-left":"inferior esquerda","bottom-right":"inferior direita"}[this.block.props.position]||"inferior esquerda"}}},Et={style:{padding:"16px",display:"flex","align-items":"center",gap:"12px","background-color":"#fef9ee",border:"1px dashed #fbbf24","border-radius":"8px"}},Ht={style:{flex:"1","min-width":"0"}},Ft={style:{margin:"2px 0 0","font-size":"11px",color:"#666"}},Lt={style:{margin:"2px 0 0","font-size":"11px",color:"#666"}};function Ut(t,e,o,d,s,a){return n(),p("div",Et,[i("div",{style:b({width:"56px",height:"56px",minWidth:"56px",backgroundColor:o.block.props.bgColor||"#ffffff",borderRadius:(o.block.props.borderRadius||"8")+"px",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 4px 12px rgba(0,0,0,0.12)"})},[...e[0]||(e[0]=[i("i",{class:"fa-solid fa-bag-shopping",style:{color:"#00d769","font-size":"20px"}},null,-1)])],4),i("div",Ht,[e[1]||(e[1]=i("p",{style:{margin:"0","font-size":"13px","font-weight":"600",color:"#333"}},"Notificações de prova social",-1)),i("p",Ft,y((o.block.props.messages||[]).length)+" mensagem(ns) configurada(s)",1),i("p",Lt,"Posição: "+y(a.positionLabel),1)])])}const Dt=Object.assign(x(Ot,[["render",Ut]]),{__name:"EditorBlocksBlockNotification"}),Nt={props:{block:{type:Object,required:!0},editing:{type:Boolean,default:!1}}},qt={style:{padding:"20px",background:"#f4f5f7"}},Wt={style:{display:"flex","align-items":"center",gap:"6px","margin-bottom":"12px"}},Vt={style:{"font-size":"11px","font-weight":"600",color:"#888","text-transform":"uppercase","letter-spacing":"0.5px"}},Kt={style:{"max-width":"420px",margin:"0 auto","border-radius":"16px",overflow:"hidden","box-shadow":"0 8px 32px rgba(0,0,0,0.18)"}},Gt={key:0,style:{padding:"20px 28px 24px",background:"#ffffff","text-align":"center"}},Jt={style:{display:"flex","align-items":"center",gap:"8px","justify-content":"center"}},Zt={style:{flex:"1",background:"#f4f5f7",border:"2px dashed #d1d5db","border-radius":"8px",padding:"12px 16px","font-size":"18px","font-weight":"700","letter-spacing":"3px",color:"#1f2937","text-align":"center"}},Qt={key:1,style:{padding:"20px 28px 24px",background:"#ffffff","text-align":"center","font-size":"12px",color:"#aaa"}};function Xt(t,e,o,d,s,a){return n(),p("div",qt,[i("div",Wt,[i("i",{class:"fa-solid fa-tag",style:b({color:o.block.props.bgColor||"#ff4757",fontSize:"13px"})},null,4),i("span",Vt," Popup de Desconto · abre após "+y(o.block.props.delay||"60s"),1)]),i("div",Kt,[i("div",{style:b({background:o.block.props.bgColor||"#ff4757",padding:"28px 28px 20px",textAlign:"center",position:"relative"})},[i("div",{style:b({position:"absolute",top:"12px",right:"12px",width:"32px",height:"32px",borderRadius:"50%",background:"rgba(255,255,255,0.2)",display:"flex",alignItems:"center",justifyContent:"center",color:o.block.props.textColor||"#ffffff",fontSize:"14px"})},"â",4),e[0]||(e[0]=i("div",{style:{width:"56px",height:"56px",background:"rgba(255,255,255,0.2)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 14px",fontSize:"24px"}},"ð·ï¸",-1)),i("h3",{style:b({color:o.block.props.textColor||"#ffffff",fontSize:"20px",fontWeight:"700",margin:"0 0 8px",lineHeight:"1.3"})},y(o.block.props.title||"Oferta exclusiva para você!"),5),i("p",{style:b({color:o.block.props.textColor||"#ffffff",fontSize:"13px",margin:"0",opacity:"0.9",lineHeight:"1.5"})},y(o.block.props.description||"Use o cupom abaixo e garanta seu desconto agora."),5)],4),o.block.props.coupon?(n(),p("div",Gt,[e[1]||(e[1]=i("p",{style:{"font-size":"11px",color:"#888",margin:"0 0 10px","text-transform":"uppercase","letter-spacing":"0.5px"}},"Seu cupom de desconto",-1)),i("div",Jt,[i("div",Zt,y(o.block.props.coupon),1),i("div",{style:b({background:o.block.props.bgColor||"#ff4757",color:"#ffffff",borderRadius:"8px",padding:"12px 16px",fontSize:"13px",fontWeight:"600",whiteSpace:"nowrap"})},"Copiar",4)])])):(n(),p("div",Qt," Nenhum cupom configurado "))])])}const Yt=Object.assign(x(Nt,[["render",Xt]]),{__name:"EditorBlocksBlockDiscountPopup"}),_t={props:{block:{type:Object,required:!0},editing:{type:Boolean,default:!1}}},eo={style:{padding:"16px","text-align":"center",color:"#9ca3af","background-color":"#f9fafb",border:"1px dashed #d1d5db","border-radius":"8px",margin:"8px"}},to={style:{display:"flex","flex-direction":"column",gap:"8px"}},oo={style:{display:"flex","align-items":"center","justify-content":"center",gap:"16px"}},io={style:{display:"flex","align-items":"center",gap:"6px"}},ao={style:{display:"flex","align-items":"center",gap:"6px"}},lo={style:{display:"flex","align-items":"center","justify-content":"center",gap:"16px"}},ro={style:{display:"flex","align-items":"center",gap:"6px"}},no={style:{display:"flex","align-items":"center",gap:"6px"}};function so(t,e,o,d,s,a){return n(),p("div",eo,[e[6]||(e[6]=i("i",{class:"fa-solid fa-palette",style:{"font-size":"22px","margin-bottom":"8px",display:"block"}},null,-1)),e[7]||(e[7]=i("span",{style:{"font-size":"13px",display:"block"}},"Cor de destaque do Orderbump",-1)),e[8]||(e[8]=i("p",{style:{"font-size":"11px",margin:"4px 0 10px"}},' Não aparece aqui â aplica a cor no tÃtulo "Aproveite e leve junto", no tÃtulo do orderbump e no item "Levar todos", no checkout real. ',-1)),i("div",to,[i("div",oo,[e[2]||(e[2]=i("span",{style:{"font-size":"10px",width:"90px","text-align":"right"}},"Orderbumps",-1)),i("div",io,[i("span",{style:b({width:"16px",height:"16px",borderRadius:"4px",display:"inline-block",backgroundColor:o.block.props.colorLight,border:"1px solid #d1d5db"})},null,4),e[0]||(e[0]=i("span",{style:{"font-size":"11px"}},"Claro",-1))]),i("div",ao,[i("span",{style:b({width:"16px",height:"16px",borderRadius:"4px",display:"inline-block",backgroundColor:o.block.props.colorDark,border:"1px solid #d1d5db"})},null,4),e[1]||(e[1]=i("span",{style:{"font-size":"11px"}},"Escuro",-1))])]),i("div",lo,[e[5]||(e[5]=i("span",{style:{"font-size":"10px",width:"90px","text-align":"right"}},"Levar todos",-1)),i("div",ro,[i("span",{style:b({width:"16px",height:"16px",borderRadius:"4px",display:"inline-block",backgroundColor:o.block.props.allC
67olorLight,border:"1px solid #d1d5db"})},null,4),e[3]||(e[3]=i("span",{style:{"font-size":"11px"}},"Claro",-1))]),i("div",no,[i("span",{style:b({width:"16px",height:"16px",borderRadius:"4px",display:"inline-block",backgroundColor:o.block.props.allColorDark,border:"1px solid #d1d5db"})},null,4),e[4]||(e[4]=i("span",{style:{"font-size":"11px"}},"Escuro",-1))])])])])}const po=Object.assign(x(_t,[["render",so]]),{__name:"EditorBlocksBlockOrderbumpColor"}),uo={props:{checkoutTitle:{type:String,default:""},amount:{type:Number,default:0},paymentMethods:{type:Array,default:()=>["credit_card","pix"]}},computed:{formattedAmount(){return this.amount?"R$ "+(this.amount/100).toFixed(2).replace(".",",").replace(/\B(?=(\d{3})+(?!\d))/g,"."):"R$ 0,00"},installmentsText(){return this.amount?"1x de "+this.formattedAmount+" (sem juros)":"1x de R$ 0,00"},displayMethods(){const t={credit_card:{key:"credit_card",label:"Cartão de Crédito",active:!0},pix:{key:"pix",label:"Pix",active:!1},google_pay:{key:"google_pay",label:"Google Pay",active:!1}},e=(this.paymentMethods||[]).map(o=>t[o]).filter(Boolean);return e.length>0&&(e[0].active=!0),e.length>0?e:[t.credit_card,t.pix]}}},co={class:"relative select-none"},fo={class:"pointer-events-none",style:{fontFamily:"Roboto, sans-serif"}},go={style:{padding:"16px 24px","max-width":"100%"}},bo={style:{display:"flex",gap:"24px","flex-wrap":"wrap"}},mo={style:{flex:"2","min-width":"280px"}},yo={style:{"margin-bottom":"24px"}},xo={style:{display:"grid","grid-template-columns":"repeat(3, 1fr)",gap:"10px","margin-bottom":"16px"}},vo={style:{"font-size":"11px","font-weight":"600",color:"#555"}},ho={style:{display:"grid","grid-template-columns":"1fr 1fr",gap:"12px"}},ko={style:{"grid-column":"1 / -1"}},wo={style:{height:"40px",border:"1px solid #ddd","border-radius":"6px",background:"#f9f9f9",display:"flex","align-items":"center",padding:"0 12px",color:"#bbb","font-size":"13px"}},Co={style:{flex:"1","min-width":"220px"}},zo={style:{border:"1px solid #eee","border-radius":"8px",padding:"20px",background:"#fafafa"}},So={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"8px"}},Po={style:{"font-size":"13px",color:"#666"}},Bo={style:{"font-size":"13px","font-weight":"600",color:"#333"}},Io={style:{display:"flex","justify-content":"space-between","align-items":"center","padding-top":"12px","border-top":"1px solid #eee","margin-top":"12px"}},$o={style:{"font-size":"18px","font-weight":"700",color:"#00d769"}};function To(t,e,o,d,s,a){return n(),p("div",co,[e[7]||(e[7]=i("div",{class:"absolute inset-0 z-10 bg-black/60 backdrop-blur-[1px] flex items-center justify-center"},[i("div",{class:"flex flex-col items-center gap-2 text-white/80"},[i("i",{class:"fa-solid fa-lock text-2xl"}),i("span",{class:"text-sm font-medium tracking-wide uppercase"},"Ãrea não editável")])],-1)),i("div",fo,[i("div",go,[i("div",bo,[i("div",mo,[e[4]||(e[4]=A('<div style="margin-bottom:24px;"><div style="display:flex;align-items:center;gap:8px;padding-bottom:12px;border-bottom:2px solid #eee;margin-bottom:16px;"><svg width="20" height="20" viewBox="0 0 24 24" fill="#666"><path d="M12 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm-2 9a4 4 0 0 0-4 4v1a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-1a4 4 0 0 0-4-4h-4Z"></path></svg><span style="font-size:13px;font-weight:700;letter-spacing:0.5px;color:#444;">DADOS PESSOAIS</span></div><div style="display:grid;grid-template-columns:1fr 1fr;gap:12px;"><div><label style="display:block;font-size:12px;color:#666;margin-bottom:4px;">Nome Completo</label><div style="height:40px;border:1px solid #ddd;border-radius:6px;background:#f9f9f9;display:flex;align-items:center;padding:0 12px;color:#bbb;font-size:13px;">Sem abreviações</div></div><div><label style="display:block;font-size:12px;color:#666;margin-bottom:4px;">E-Mail</label><div style="height:40px;border:1px solid #ddd;border-radius:6px;background:#f9f9f9;display:flex;align-items:center;padding:0 12px;color:#bbb;font-size:13px;">Principal E-Mail</div></div><div><label style="display:block;font-size:12px;color:#666;margin-bottom:4px;">CPF/CNPJ</label><div style="height:40px;border:1px solid #ddd;border-radius:6px;background:#f9f9f9;display:flex;align-items:center;padding:0 12px;color:#bbb;font-size:13px;">Seu CPF</div></div><div><label style="display:block;font-size:12px;color:#666;margin-bottom:4px;">Celular (WhatsApp)</label><div style="height:40px;border:1px solid #ddd;border-radius:6px;background:#f9f9f9;display:flex;align-items:center;padding:0 12px;color:#bbb;font-size:13px;">(00) 00000-0000</div></div></div></div>',1)),i("div",yo,[e[2]||(e[2]=A('<div style="display:flex;align-items:center;gap:8px;padding-bottom:12px;border-bottom:2px solid #eee;margin-bottom:16px;"><svg width="20" height="20" viewBox="0 0 24 24" fill="#666"><path d="M2 7c0-1.1.9-2 2-2h16a2 2 0 0 1 2 2v4a1 1 0 1 1-2 0v-1H4v7h10a1 1 0 1 1 0 2H4a2 2 0 0 1-2-2V7Z"></path><path d="M5 14a1 1 0 0 1 1-1h2a1 1 0 1 1 0 2H6a1 1 0 0 1-1-1Zm5 0a1 1 0 0 1 1-1h4a1 1 0 1 1 0 2h-4a1 1 0 0 1-1-1Z"></path></svg><span style="font-size:13px;font-weight:700;letter-spacing:0.5px;color:#444;">PAGAMENTO</span></div>',1)),i("div",xo,[(n(!0),p(v,null,I(a.displayMethods,l=>(n(),p("div",{key:l.key,style:b({border:l.active?"2px solid #00d769":"1px solid #ddd",borderRadius:"8px",padding:"12px",textAlign:"center",background:l.active?"#f0fdf4":"#f4f5f7",cursor:"default"})},[i("div",vo,y(l.label),1)],4))),128))]),i("div",ho,[e[1]||(e[1]=A('<
67div style="grid-column:1 / -1;"><label style="display:block;font-size:12px;color:#666;margin-bottom:4px;">Nome no Cartão</label><div style="height:40px;border:1px solid #ddd;border-radius:6px;background:#f9f9f9;display:flex;align-items:center;padding:0 12px;color:#bbb;font-size:13px;">Nome impresso no cartão</div></div><div style="grid-column:1 / -1;"><label style="display:block;font-size:12px;color:#666;margin-bottom:4px;">Número do Cartão</label><div style="height:40px;border:1px solid #ddd;border-radius:6px;background:#f9f9f9;display:flex;align-items:center;padding:0 12px;color:#bbb;font-size:13px;">0000 0000 0000 0000</div></div><div><label style="display:block;font-size:12px;color:#666;margin-bottom:4px;">Validade</label><div style="height:40px;border:1px solid #ddd;border-radius:6px;background:#f9f9f9;display:flex;align-items:center;padding:0 12px;color:#bbb;font-size:13px;">MM/AA</div></div><div><label style="display:block;font-size:12px;color:#666;margin-bottom:4px;">CVV</label><div style="height:40px;border:1px solid #ddd;border-radius:6px;background:#f9f9f9;display:flex;align-items:center;padding:0 12px;color:#bbb;font-size:13px;">000</div></div>',4)),i("div",ko,[e[0]||(e[0]=i("label",{style:{display:"block","font-size":"12px",color:"#666","margin-bottom":"4px"}},"Parcelas",-1)),i("div",wo,y(a.installmentsText),1)])]),e[3]||(e[3]=A('<div style="margin-top:20px;"><div style="width:100%;height:48px;background:#00d769;border-radius:8px;display:flex;align-items:center;justify-content:center;color:white;font-weight:700;font-size:15px;letter-spacing:0.5px;"> FINALIZAR COMPRA </div></div><div style="display:flex;align-items:center;justify-content:center;gap:16px;margin-top:16px;opacity:0.5;"><div style="display:flex;align-items:center;gap:4px;font-size:11px;color:#888;"><svg width="14" height="14" viewBox="0 0 24 24" fill="#888"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4z"></path></svg> Compra segura </div><div style="display:flex;align-items:center;gap:4px;font-size:11px;color:#888;"><svg width="14" height="14" viewBox="0 0 24 24" fill="#888"><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"></path></svg> Dados protegidos </div></div>',2))])]),i("div",Co,[i("div",zo,[e[6]||(e[6]=i("div",{style:{"font-size":"14px","font-weight":"700",color:"#333","margin-bottom":"16px","padding-bottom":"12px","border-bottom":"1px solid #eee"}},"Resumo do Pedido",-1)),i("div",So,[i("span",Po,y(o.checkoutTitle||"Produto"),1),i("span",Bo,y(a.formattedAmount),1)]),i("div",Io,[e[5]||(e[5]=i("span",{style:{"font-size":"14px","font-weight":"700",color:"#333"}},"Total",-1)),i("span",$o,y(a.formattedAmount),1)])])])])])])])}const Ao=Object.assign(x(uo,[["render",To]]),{__name:"EditorCheckoutFormPreview"}),jo={},Mo={class:"relative select-none"};function Ro(t,e,o,d,s,a){return n(),p("div",Mo,[...e[0]||(e[0]=[A('<div class="absolute inset-0 z-10 bg-black/60 backdrop-blur-[1px] flex items-center justify-center"><div class="flex flex-col items-center gap-2 text-white/80"><i class="fa-solid fa-lock text-2xl"></i><span class="text-sm font-medium tracking-wide uppercase">Ãrea de Upsell</span></div></div><div class="pointer-events-none" style="font-family:Roboto, sans-serif;"><div style="padding:24px;max-width:100%;"><div style="border:1px solid #eee;border-radius:12px;padding:20px;background:#fafafa;max-width:600px;margin:0 auto;"><div style="display:flex;gap:16px;align-items:flex-start;"><div style="width:120px;min-width:120px;height:120px;background:#e5e7eb;border-radius:8px;display:flex;align-items:center;justify-content:center;"><svg width="40" height="40" viewBox="0 0 24 24" fill="#9ca3af"><path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"></path></svg></div><div style="flex:1;"><p style="font-size:15px;font-weight:700;color:#333;margin:0 0 6px;">Produto Upsell</p><p style="font-size:13px;color:#666;line-height:1.5;margin:0 0 12px;">Descrição do produto de upsell que aparece após a compra.</p><p style="margin:0;"><span style="font-size:16px;font-weight:700;color:#00d769;">R$ 97,00</span><span style="font-size:12px;color:#888;margin-left:8px;">à vista</span></p></div></div><div style="margin-top:16px;"><div style="width:100%;height:48px;background:#00d769;border-radius:8px;display:flex;align-items:center;justify-content:center;color:white;font-weight:700;font-size:14px;letter-spacing:0.5px;"> COMPRAR AGORA </div></div></div></div></div>',2)])])}const Oo=Object.assign(x(jo,[["render",Ro]]),{__name:"EditorThankPagePreview"}),Eo={components:{draggable:Q,BlockBanner:Re,BlockText:Fe,BlockImage:qe,BlockVideo:Ze,BlockGuarantee:ot,BlockTestimonial:pt,BlockWhatsapp:xt,BlockTimer:St,BlockSpacer:$t,BlockHtml:Rt,BlockNotification:Dt,BlockDiscountPopup:Yt,BlockOrderbumpColor:po,CheckoutFormPreview:Ao,ThankPagePreview:Oo},props:{headerBlocks:{type:Array,default:()=>[]},footerBlocks:{type:Array,default:()=>[]},selectedBlockId:{type:String,default:null},viewport:{type:String,default:"desktop"},checkoutTitle:{type:String,default:""},checkoutAmount:{type:Number,default:0},checkoutPaymentMethods:{type:Array,default:()=>[]},showCheckoutForm:{type:Boolean,default:!0},isThankPage:{type:Boolean,default:!1}},data(){return{activeSection:"header"}},computed:{viewportWidth(){return{desktop:"100%",tablet:"768px",mobile:"375px"}[this.viewport]||"100%"}},methods:{capitalize(t){return t.charAt(0).toUpperCase()+t.slice(1)},onBlockClick(t,e){this.activeSection=e,this.$emit("set-active-section",e),this.$emit("select",t)},setActiveSection(t){this.activeSection=t,this.$emit("set-active-section",t)}}},Ho={class:"absolute top-0 left-0 z-30 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider bg-secondary text-white rounded-br"},Fo=["onClick"],Lo={class:"absolute top-0 right-0 z-10 flex items-center gap-0.5 p-1 opacity-0 group-hover:opacity-100 transition-opacity"},Uo=["onClick"],Do=["onClick"],No=["onClick"],qo=["onClick"],Wo={class:"absolute top-0 left-0 z-10 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wider bg-secondary text-white rounded-br opacity-0 group-hover:opacity-100 transition-opacity"},Vo={class:"absolute top-0 left-0 z-30 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider bg-secondary text-white rounded-br"},Ko=["onClick"],Go={class:"absolute top-0 right-0 z-10 flex items-center gap-0.5 p-1 opacity-0 group-hover:opacity-100 transition-opacity"},Jo=["onClick"],Zo=["onClick"],Qo=["onClick"],Xo=["onClick"],Yo={class:"absolute top-0 left-0 z-10 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wider bg-secondary text-white rounded-br opacity-0 group-hover:opacity-100 transition-opacity"};function _o(t,e,o,d,s,a){const l=C("draggable"),u=C("CheckoutFormPreview"),m=C("ThankPagePreview");return n(),p("div",{class:"flex-1 bg-[#f4f5f7] dark:bg-primary-950 overflow-y-auto p-4",onClick:e[8]||(e[8]=h(c=>t.$emit("deselect"),["self"]))},[i("div",{class:"mx-auto bg-[#f4f5f7] shadow-lg transition-all duration-300 min-h-[400px]",style:b({maxWidth:a.viewportWidth})},[i("div",{class:"relative",style:b(s.activeSection==="header"?{border:"3px solid #00d769",zIndex:30}:{border:"3px solid transparent"}),onClick:e[3]||(e[3]=h(c=>
67a.setActiveSection("header"),["self"]))},[F(i("div",Ho," Cabeçalho ",512),[[q,s.activeSection==="header"]]),f(l,{modelValue:o.headerBlocks,"onUpdate:modelValue":e[0]||(e[0]=c=>t.$emit("update:header-blocks",c)),"item-key":"id",handle:".block-drag-handle","ghost-class":"opacity-30",animation:"200",onEnd:e[1]||(e[1]=c=>t.$emit("reorder")),class:"min-h-[40px]"},{item:E(({element:c,index:k})=>[i("div",{class:B(["relative group",{"ring-2 ring-secondary ring-offset-1":o.selectedBlockId===c.id}]),onClick:h(w=>a.onBlockClick(c.id,"header"),["stop"])},[i("div",Lo,[e[13]||(e[13]=i("button",{class:"block-drag-handle w-6 h-6 flex items-center justify-center rounded bg-white shadow text-gray-500 hover:text-primary cursor-grab text-xs",title:"Arrastar"},[i("i",{class:"fa-solid fa-grip-vertical"})],-1)),i("button",{onClick:h(w=>t.$emit("duplicate",c.id),["stop"]),class:"w-6 h-6 flex items-center justify-center rounded bg-white shadow text-gray-500 hover:text-primary text-xs",title:"Duplicar"},[...e[9]||(e[9]=[i("i",{class:"fa-solid fa-copy"},null,-1)])],8,Uo),k>0?(n(),p("button",{key:0,onClick:h(w=>t.$emit("move-up",c.id),["stop"]),class:"w-6 h-6 flex items-center justify-center rounded bg-white shadow text-gray-500 hover:text-primary text-xs",title:"Mover para cima"},[...e[10]||(e[10]=[i("i",{class:"fa-solid fa-arrow-up"},null,-1)])],8,Do)):g("",!0),k<o.headerBlocks.length-1?(n(),p("button",{key:1,onClick:h(w=>t.$emit("move-down",c.id),["stop"]),class:"w-6 h-6 flex items-center justify-center rounded bg-white shadow text-gray-500 hover:text-primary text-xs",title:"Mover para baixo"},[...e[11]||(e[11]=[i("i",{class:"fa-solid fa-arrow-down"},null,-1)])],8,No)):g("",!0),i("button",{onClick:h(w=>t.$emit("remove",c.id),["stop"]),class:"w-6 h-6 flex items-center justify-center rounded bg-red-500 shadow text-white hover:bg-red-600 text-xs",title:"Remover"},[...e[12]||(e[12]=[i("i",{class:"fa-solid fa-trash"},null,-1)])],8,qo)]),i("div",Wo,y(c.type),1),(n(),P(W("Block"+a.capitalize(c.type)),{block:c,editing:o.selectedBlockId===c.id,onUpdateProp:(w,r)=>t.$emit("update-block-prop",c.id,w,r)},null,40,["block","editing","onUpdateProp"]))],10,Fo)]),_:1},8,["modelValue"]),o.headerBlocks.length===0?(n(),p("div",{key:0,class:"flex flex-col items-center justify-center py-12 text-gray-400 cursor-pointer hover:bg-gray-50 transition-colors",onClick:e[2]||(e[2]=c=>a.setActiveSection("header"))},[...e[14]||(e[14]=[i("i",{class:"fa-solid fa-plus-circle text-2xl mb-2"},null,-1),i("p",{class:"text-xs"},"Adicione elementos no cabeçalho",-1)])])):g("",!0)],4),o.showCheckoutForm?(n(),P(u,{key:0,"checkout-title":o.checkoutTitle,amount:o.checkoutAmount,"payment-methods":o.checkoutPaymentMethods},null,8,["checkout-title","amount","payment-methods"])):g("",!0),o.isThankPage?(n(),P(m,{key:1})):g("",!0),i("div",{class:"relative",style:b(s.activeSection==="footer"?{border:"3px solid #00d769",zIndex:30}:{border:"3px solid transparent"}),onClick:e[7]||(e[7]=h(c=>a.setActiveSection("footer"),["self"]))},[F(i("div",Vo," Rodapé ",512),[[q,s.activeSection==="footer"]]),f(l,{modelValue:o.footerBlocks,"onUpdate:modelValue":e[4]||(e[4]=c=>t.$emit("update:footer-blocks",c)),"item-key":"id",handle:".block-drag-handle","ghost-class":"opacity-30",animation:"200",onEnd:e[5]||(e[5]=c=>t.$emit("reorder")),class:"min-h-[40px]"},{item:E(({element:c,index:k})=>[i("div",{class:B(["relative group",{"ring-2 ring-secondary ring-offset-1":o.selectedBlockId===c.id}]),onClick:h(w=>a.onBlockClick(c.id,"footer"),["stop"])},[i("div",Go,[e[19]||(e[19]=i("button",{class:"block-drag-handle w-6 h-6 flex items-center justify-center rounded bg-white shadow text-gray-500 hover:text-primary cursor-grab text-xs",title:"Arrastar"},[i("i",{class:"fa-solid fa-grip-vertical"})],-1)),i("button",{onClick:h(w=>t.$emit("duplicate",c.id),["stop"]),class:"w-6 h-6 flex items-center justify-center rounded bg-white shadow text-gray-500 hover:text-primary text-xs",title:"Duplicar"},[...e[15]||(e[15]=[i("i",{class:"fa-solid fa-copy"},null,-1)])],8,Jo),k>0?(n(),p("button",{key:0,onClick:h(w=>t.$emit("move-up",c.id),["stop"]),class:"w-6 h-6 flex items-center justify-center rounded bg-white shadow text-gray-500 hover:text-primary text-xs",title:"Mover para cima"},[...e[16]||(e[16]=[i("i",{class:"fa-solid fa-arrow-up"},null,-1)])],8,Zo)):g("",!0),k<o.footerBlocks.length-1?(n(),p("button",{key:1,onClick:h(w=>t.$emit("move-down",c.id),["stop"]),class:"w-6 h-6 flex items-center justify-center rounded bg-white shadow text-gray-500 hover:text-primary text-xs",title:"Mover para baixo"},[...e[17]||(e[17]=[i("i",{class:"fa-solid fa-arrow-down"},null,-1)])],8,Qo)):g("",!0),i("button",{onClick:h(w=>t.$emit("remove",c.id),["stop"]),class:"w-6 h-6 flex items-center justify-center rounded bg-red-500 shadow text-white hover:bg-red-600 text-xs",title:"Remover"}
67,[...e[18]||(e[18]=[i("i",{class:"fa-solid fa-trash"},null,-1)])],8,Xo)]),i("div",Yo,y(c.type),1),(n(),P(W("Block"+a.capitalize(c.type)),{block:c,editing:o.selectedBlockId===c.id,onUpdateProp:(w,r)=>t.$emit("update-block-prop",c.id,w,r)},null,40,["block","editing","onUpdateProp"]))],10,Ko)]),_:1},8,["modelValue"]),o.footerBlocks.length===0?(n(),p("div",{key:0,class:"flex flex-col items-center justify-center py-12 text-gray-400 cursor-pointer hover:bg-gray-50 transition-colors",onClick:e[6]||(e[6]=c=>a.setActiveSection("footer"))},[...e[20]||(e[20]=[i("i",{class:"fa-solid fa-plus-circle text-2xl mb-2"},null,-1),i("p",{class:"text-xs"},"Adicione elementos no rodapé",-1)])])):g("",!0)],4)],4)])}const J=Object.assign(x(Eo,[["render",_o]]),{__name:"EditorPreview"}),ei={emits:["input"],props:{label:{type:String,required:!0},value:{type:String,default:"#000000"}}},ti={class:"mb-3"},oi={class:"block text-xs font-medium text-gray-600 dark:text-primary-300 mb-1"},ii={class:"flex items-center gap-2"},ai=["value"],li=["value"];function ri(t,e,o,d,s,a){return n(),p("div",ti,[i("label",oi,y(o.label),1),i("div",ii,[i("input",{type:"color",value:o.value,onInput:e[0]||(e[0]=l=>t.$emit("input",l.target.value)),class:"w-8 h-8 rounded cursor-pointer border border-gray-300 dark:border-primary-700 bg-transparent p-0"},null,40,ai),i("input",{type:"text",value:o.value,onInput:e[1]||(e[1]=l=>t.$emit("input",l.target.value)),class:"flex-1 px-2 py-1.5 text-xs rounded border border-gray-300 dark:border-primary-700 bg-white dark:bg-primary-950 text-primary dark:text-primary-200 font-mono",maxlength:"7"},null,40,li)])])}const ni=Object.assign(x(ei,[["render",ri]]),{__name:"EditorPropsPropColor"}),si={emits:["input"],props:{label:{type:String,required:!0},value:{type:String,default:""},placeholder:{type:String,default:""},multiline:{type:Boolean,default:!1}}},di={class:"mb-3"},pi={class:"block text-xs font-medium text-gray-600 dark:text-primary-300 mb-1"},ui=["value","placeholder"],ci=["value","placeholder"];function fi(t,e,o,d,s,a){return n(),p("div",di,[i("label",pi,y(o.label),1),o.multiline?(n(),p("textarea",{key:0,value:o.value,onInput:e[0]||(e[0]=l=>t.$emit("input",l.target.value)),placeholder:o.placeholder,rows:"3",class:"w-full px-2 py-1.5 text-sm rounded border border-gray-300 dark:border-primary-700 bg-white dark:bg-primary-950 text-primary dark:text-primary-200 resize-y"},null,40,ui)):(n(),p("input",{key:1,type:"text",value:o.value,onInput:e[1]||(e[1]=l=>t.$emit("input",l.target.value)),placeholder:o.placeholder,class:"w-full px-2 py-1.5 text-sm rounded border border-gray-300 dark:border-primary-700 bg-white dark:bg-primary-950 text-primary dark:text-primary-200"},null,40,ci))])}const gi=Object.assign(x(si,[["render",fi]]),{__name:"EditorPropsPropText"}),bi={emits:["input"],props:{label:{type:String,required:!0},value:{type:String,default:""},options:{type:Array,default:()=>[]}}},mi={class:"mb-3"},yi={class:"block text-xs font-medium text-gray-600 dark:text-primary-300 mb-1"},xi=["value"],vi=["value"];function hi(t,e,o,d,s,a){return n(),p("div",mi,[i("label",yi,y(o.label),1),i("select",{value:o.value,onChange:e[0]||(e[0]=l=>t.$emit("input",l.target.value)),class:"w-full px-2 py-1.5 text-sm rounded border border-gray-300 dark:border-primary-700 bg-white dark:bg-primary-950 text-primary dark:text-primary-200"},[(n(!0),p(v,null,I(o.options,l=>(n(),p("option",{key:l.value,value:l.value},y(l.label),9,vi))),128))],40,xi)])}const ki=Object.assign(x(bi,[["render",hi]]),{__name:"EditorPropsPropSelect"}),wi={emits:["input"],props:{label:{type:String,required:!0},value:{type:String,default:"0px"},min:{type:Number,default:0},max:{type:Number,default:200},step:{type:Number,default:1},unit:{type:String,default:"px"}},computed:{numericValue(){return parseInt(this.value)||0},displayValue(){return this.numericValue+this.unit}},methods:{onInput(t){this.$emit("input",t+this.unit)}}},Ci={class:"mb-3"},zi={class:"block text-xs font-medium text-gray-600 dark:text-primary-300 mb-1"},Si={class:"text-gray-400 dark:text-primary-500 font-mono"},Pi={class:"flex items-center gap-2"},Bi=["min","max","step","value"],Ii=["value","min","max"];function $i(t,e,o,d,s,a){return n(),p("div",Ci,[i("label",zi,[S(y(o.label)+" ",1),i("span",Si,y(a.displayValue),1)]),i("div",Pi,[i("input",{type:"range",min:o.min,max:o.max,step:o.step,value:a.numericValue,onInput:e[0]||(e[0]=l=>a.onInput(l.target.value)),class:"prop-slider-range flex-1 h-1.5 rounded-lg appearance-none cursor-pointer"},null,40,Bi),i("input",{type:"number",value:a.numericValue,onInput:e[1]||(e[1]=l=>a.onInput(l.target.value)),min:o.min,max:o.max,class:"w-16 px-1.5 py-1 text-xs rounded border border-gray-300 dark:border-primary-700 bg-white dark:bg-primary-950 text-primary dark:text-primary-200 text-center"},null,40,Ii)])])}const Ti=Object.assign(x(wi,[["render",$i],["__scopeId","data-v-512a8677"]]),{__name:"EditorPropsPropSlider"}),Ai={emits:["input"],props:{label:{type:String,required:!0},value:{type:String,default:""}},data(){return{uploading:!1}},methods:{async onFileSelect(t){const e=t.target.files[0];if(e){if(e.size>5*1024*1024){window.notification("Imagem deve ter no máximo 5MB","danger",null);return}this.uploading=!0;try{const o=await this.httpPost(this.$config.public.baseURL+"/upload/getsignedurl",{filePath:e.name,contentType:e.type},{headers:{Authorization:this.cookieGet("auth-token")}}),d=o?.body||o?.data;if(!d||typeof d!="string"){this.uploading=!1,window.notification("Erro ao obter URL de upload","danger",null);return}const s=new XMLHttpRequest;s.open("PUT",d),s.setRequestHeader("x-amz-acl","public-read"),s.onreadystatechange=()=>{if(s.readyState===4)if(this.uploading=!1,s.status===200){const a=d.split("?")[0];this.$emit("input",a)}else window.notification("Erro ao enviar imagem","danger",null)},s.send(e)}catch{this.uploading=!1,window.notification("Erro ao enviar imagem","danger",null)}}}}},ji={class:"mb-3"},Mi={class:"block text-xs font-medium text-gray-600 dark:text-primary-300 mb
67-1"},Ri={key:0,class:"relative mb-2"},Oi=["src"],Ei={key:1},Hi=["value"],Fi={class:"flex items-center justify-center gap-2 w-full px-2 py-1.5 text-xs font-medium rounded border border-dashed border-gray-400 dark:border-primary-600 text-gray-500 dark:text-primary-400 hover:bg-gray-50 dark:hover:bg-primary-950 cursor-pointer transition-colors"},Li={key:2,class:"flex items-center gap-2 text-xs text-gray-500 dark:text-primary-400"};function Ui(t,e,o,d,s,a){return n(),p("div",ji,[i("label",Mi,y(o.label),1),o.value?(n(),p("div",Ri,[i("img",{src:o.value,class:"w-full h-24 object-cover rounded border border-gray-300 dark:border-primary-700"},null,8,Oi),i("button",{onClick:e[0]||(e[0]=l=>t.$emit("input","")),class:"absolute top-1 right-1 w-5 h-5 bg-red-500 text-white rounded-full text-xs flex items-center justify-center hover:bg-red-600"},[...e[3]||(e[3]=[i("i",{class:"fa-solid fa-xmark"},null,-1)])])])):g("",!0),s.uploading?(n(),p("div",Li,[...e[6]||(e[6]=[i("div",{class:"w-4 h-4 border-2 border-secondary border-t-transparent rounded-full animate-spin"},null,-1),S(" Enviando... ",-1)])])):(n(),p("div",Ei,[i("input",{type:"text",value:o.value,onInput:e[1]||(e[1]=l=>t.$emit("input",l.target.value)),placeholder:"Cole a URL da imagem",class:"w-full px-2 py-1.5 text-sm rounded border border-gray-300 dark:border-primary-700 bg-white dark:bg-primary-950 text-primary dark:text-primary-200 mb-1.5"},null,40,Hi),i("label",Fi,[e[4]||(e[4]=i("i",{class:"fa-solid fa-upload"},null,-1)),e[5]||(e[5]=S(" Fazer upload ",-1)),i("input",{type:"file",accept:"image/*",class:"hidden",onChange:e[2]||(e[2]=(...l)=>a.onFileSelect&&a.onFileSelect(...l))},null,32)])]))])}const Di=Object.assign(x(Ai,[["render",Ui]]),{__name:"EditorPropsPropImage"}),K=[{value:"fa-solid fa-bag-shopping",label:"bag shopping",keywords:"sacola compra bolsa"},{value:"fa-solid fa-cart-shopping",label:"cart shopping",keywords:"carrinho compra"},{value:"fa-solid fa-basket-shopping",label:"basket shopping",keywords:"cesta compra"},{value:"fa-solid fa-store",label:"store",keywords:"loja"},{value:"fa-solid fa-shop",label:"shop",keywords:"loja"},{value:"fa-solid fa-receipt",label:"receipt",keywords:"recibo nota"},{value:"fa-solid fa-barcode",label:"barcode",keywords:"codigo barras"},{value:"fa-solid fa-tags",label:"tags",keywords:"etiquetas preco"},{value:"fa-solid fa-tag",label:"tag",keywords:"etiqueta preco"},{value:"fa-solid fa-credit-card",label:"credit card",keywords:"cartao credito pagamento"},{value:"fa-solid fa-money-bill",label:"money bill",keywords:"dinheiro nota"},{value:"fa-solid fa-money-bill-wave",label:"money bill wave",keywords:"dinheiro nota"},{value:"fa-solid fa-wallet",label:"wallet",keywords:"carteira"},{value:"fa-solid fa-coins",label:"coins",keywords:"moedas dinheiro"},{value:"fa-solid fa-sack-dollar",label:"sack dollar",keywords:"saco dinheiro"},{value:"fa-solid fa-percent",label:"percent",keywords:"porcentagem desconto"},{value:"fa-solid fa-gift",label:"gift",keywords:"presente"},{value:"fa-solid fa-check",label:"check",keywords:"verificado ok"},{value:"fa-solid fa-check-circle",label:"check circle",keywords:"verificado ok circulo"},{value:"fa-solid fa-circle-check",label:"circle check",keywords:"verificado ok circulo"},{value:"fa-solid fa-thumbs-up",label:"thumbs up",keywords:"positivo curtir like"},{value:"fa-solid fa-trophy",label:"trophy",keywords:"trofeu premio"},{value:"fa-solid fa-medal",label:"medal",keywords:"medalha premio"},{value:"fa-solid fa-award",label:"award",keywords:"premio"},{value:"fa-solid fa-crown",label:"crown",keywords:"coroa rei"},{value:"fa-solid fa-gem",label:"gem",keywords:"diamante joia"},{value:"fa-solid fa-star",label:"star",keywords:"estrela avaliacao"},{value:"fa-solid fa-heart",label:"heart",keywords:"coracao amor"},{value:"fa-solid fa-fire",label:"fire",keywords:"fogo quente popular"},{value:"fa-solid fa-fire-flame-curved",label:"fire flame curved",keywords:"fogo chama"},{value:"fa-solid fa-bolt",label:"bolt",keywords:"raio rapido"},{value:"fa-solid fa-rocket",label:"rocket",keywords:"foguete lancamento"},{value:"fa-solid fa-hands-clapping",label:"hands clapping",keywords:"palmas aplausos"}
67,{value:"fa-solid fa-face-smile",label:"face smile",keywords:"rosto sorriso emoji"},{value:"fa-solid fa-face-grin-stars",label:"face grin stars",keywords:"rosto estrelas emoji"},{value:"fa-solid fa-bell",label:"bell",keywords:"sino notificacao alerta"},{value:"fa-solid fa-bullhorn",label:"bullhorn",keywords:"megafone anuncio"},{value:"fa-solid fa-circle-exclamation",label:"circle exclamation",keywords:"exclamacao alerta"},{value:"fa-solid fa-circle-info",label:"circle info",keywords:"informacao"},{value:"fa-solid fa-triangle-exclamation",label:"triangle exclamation",keywords:"aviso alerta"},{value:"fa-solid fa-volume-high",label:"volume high",keywords:"som alto"},{value:"fa-solid fa-user",label:"user",keywords:"usuario pessoa"},{value:"fa-solid fa-users",label:"users",keywords:"usuarios pessoas grupo"},{value:"fa-solid fa-user-check",label:"user check",keywords:"usuario verificado"},{value:"fa-solid fa-user-plus",label:"user plus",keywords:"usuario novo adicionar"},{value:"fa-solid fa-people-group",label:"people group",keywords:"grupo pessoas comunidade"},{value:"fa-solid fa-handshake",label:"handshake",keywords:"aperto mao acordo"},{value:"fa-solid fa-hand-holding-heart",label:"hand holding heart",keywords:"mao coracao doacao"},{value:"fa-solid fa-clock",label:"clock",keywords:"relogio tempo hora"},{value:"fa-solid fa-hourglass-half",label:"hourglass half",keywords:"ampulheta tempo"},{value:"fa-solid fa-stopwatch",label:"stopwatch",keywords:"cronometro tempo"},{value:"fa-solid fa-calendar-check",label:"calendar check",keywords:"calendario verificado"},{value:"fa-solid fa-shield",label:"shield",keywords:"escudo seguranca"},{value:"fa-solid fa-shield-halved",label:"shield halved",keywords:"escudo seguranca"},{value:"fa-solid fa-lock",label:"lock",keywords:"cadeado seguro"},{value:"fa-solid fa-key",label:"key",keywords:"chave acesso"},{value:"fa-solid fa-fingerprint",label:"fingerprint",keywords:"digital identidade"},{value:"fa-solid fa-comment",label:"comment",keywords:"comentario mensagem"},{value:"fa-solid fa-comments",label:"comments",keywords:"comentarios chat"},{value:"fa-solid fa-message",label:"message",keywords:"mensagem"},{value:"fa-solid fa-envelope",label:"envelope",keywords:"email carta"},{value:"fa-solid fa-paper-plane",label:"paper plane",keywords:"aviao papel enviar"},{value:"fa-solid fa-phone",label:"phone",keywords:"telefone ligar"},{value:"fa-solid fa-image",label:"image",keywords:"imagem foto"},{value:"fa-solid fa-video",label:"video",keywords:"video camera"},{value:"fa-solid fa-play",label:"play",keywords:"reproduzir assistir"},{value:"fa-solid fa-music",label:"music",keywords:"musica nota"},{value:"fa-solid fa-book",label:"book",keywords:"livro curso"},{value:"fa-solid fa-graduation-cap",label:"graduation cap",keywords:"formatura educacao curso"},{value:"fa-solid fa-certificate",label:"certificate",keywords:"certificado diploma"},{value:"fa-solid fa-file-lines",label:"file lines",keywords:"arquivo documento"},{value:"fa-solid fa-arrow-right",label:"arrow right",keywords:"seta direita"},{value:"fa-solid fa-arrow-up",label:"arrow up",keywords:"seta cima subir"},{value:"fa-solid fa-arrow-trend-up",label:"arrow trend up",keywords:"tendencia subir crescer"},{value:"fa-solid fa-chart-line",label:"chart line",keywords:"grafico linha crescimento"},{value:"fa-solid fa-chart-bar",label:"chart bar",keywords:"grafico barras"},{value:"fa-solid fa-download",label:"download",keywords:"baixar download"},{value:"fa-solid fa-cloud-arrow-down",label:"cloud arrow down",keywords:"nuvem baixar"},{value:"fa-solid fa-location-dot",label:"location dot",keywords:"localizacao mapa pin"},{value:"fa-solid fa-map-pin",label:"map pin",keywords:"mapa pin marcador"},{value:"fa-solid fa-globe",label:"globe",keywords:"globo mundo internacional"},{value:"fa-solid fa-earth-americas",label:"earth americas",keywords:"terra americas mundo"},{value:"fa-solid fa-house",label:"house",keywords:"casa home"},{value:"fa-solid fa-laptop",label:"laptop",keywords:"notebook computador"},{value:"fa-solid fa-mobile-screen",label:"mobile screen",keywords:"celular mobile"},{value:"fa-solid fa-wifi",label:"wifi",keywords:"internet conexao"},{value:"fa-solid fa-link",label:"link",keywords:"link url"},{value:"fa-solid fa-qrcode",label:"qrcode",keywords:"qr code"}
67,{value:"fa-solid fa-code",label:"code",keywords:"codigo programacao"},{value:"fa-solid fa-wand-magic-sparkles",label:"wand magic sparkles",keywords:"varinha magica"},{value:"fa-solid fa-solidbulb",label:"lightbulb",keywords:"lampada ideia"},{value:"fa-solid fa-puzzle-piece",label:"puzzle piece",keywords:"quebra cabeca peca"},{value:"fa-solid fa-gear",label:"gear",keywords:"engrenagem configuracao"},{value:"fa-solid fa-wrench",label:"wrench",keywords:"chave ferramenta"},{value:"fa-solid fa-eye",label:"eye",keywords:"olho ver visualizar"},{value:"fa-solid fa-magnifying-glass",label:"magnifying glass",keywords:"lupa busca pesquisa"},{value:"fa-solid fa-brush",label:"brush",keywords:"pincel arte"},{value:"fa-solid fa-pen",label:"pen",keywords:"caneta escrever"},{value:"fa-solid fa-palette",label:"palette",keywords:"paleta cores arte"},{value:"fa-solid fa-leaf",label:"leaf",keywords:"folha natureza eco"},{value:"fa-solid fa-seedling",label:"seedling",keywords:"broto planta crescimento"},{value:"fa-solid fa-sun",label:"sun",keywords:"sol dia"},{value:"fa-solid fa-moon",label:"moon",keywords:"lua noite"},{value:"fa-solid fa-cloud",label:"cloud",keywords:"nuvem"},{value:"fa-solid fa-heart-pulse",label:"heart pulse",keywords:"coracao saude batimento"},{value:"fa-solid fa-dumbbell",label:"dumbbell",keywords:"halter academia fitness"},{value:"fa-solid fa-truck",label:"truck",keywords:"caminhao entrega frete"},{value:"fa-solid fa-truck-fast",label:"truck fast",keywords:"caminhao rapido entrega"},{value:"fa-solid fa-box",label:"box",keywords:"caixa pacote"},{value:"fa-solid fa-box-open",label:"box open",keywords:"caixa aberta pacote"},{value:"fa-solid fa-dolly",label:"dolly",keywords:"carrinho carga"},{value:"fa-solid fa-gamepad",label:"gamepad",keywords:"controle jogo game"},{value:"fa-solid fa-dice",label:"dice",keywords:"dado jogo sorte"},{value:"fa-solid fa-camera",label:"camera",keywords:"camera foto"},{value:"fa-solid fa-headphones",label:"headphones",keywords:"fone ouvido audio"},{value:"fa-solid fa-microphone",label:"microphone",keywords:"microfone audio"},{value:"fa-solid fa-utensils",label:"utensils",keywords:"talheres comida restaurante"},{value:"fa-solid fa-mug-hot",label:"mug hot",keywords:"caneca cafe quente"},{value:"fa-solid fa-pizza-slice",label:"pizza slice",keywords:"pizza comida"},{value:"fa-solid fa-wine-glass",label:"wine glass",keywords:"vinho taca bebida"},{value:"fa-solid fa-flag",label:"flag",keywords:"bandeira"},{value:"fa-solid fa-bookmark",label:"bookmark",keywords:"marcador favorito"},{value:"fa-solid fa-hashtag",label:"hashtag",keywords:"hashtag"},{value:"fa-solid fa-at",label:"at",keywords:"arroba email"},{value:"fa-solid fa-infinity",label:"infinity",keywords:"infinito ilimitado"},{value:"fa-solid fa-sparkles",label:"sparkles",keywords:"brilho estrelas novo"},{value:"fa-solid fa-hand-point-right",label:"hand point right",keywords:"mao apontar direita"},{value:"fa-solid fa-circle-dot",label:"circle dot",keywords:"circulo ponto"},{value:"fa-solid fa-square-check",label:"square check",keywords:"quadrado verificado checkbox"}],Ni={props:{value:{type:String,default:"fa-solid fa-bag-shopping"}},data(){return{open:!1,search:"",dropdownPos:{top:"0px",left:"0px"}}},computed:{filteredIcons(){if(!this.search)return K;const t=this.search.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return K.filter(e=>(e.label+" "+e.keywords).toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").includes(t))},dropdownStyle(){return this.dropdownPos}},watch:{open(t){t&&(this.search="",this.$nextTick(()=>{this.updateDropdownPos(),this.$refs.searchInput&&this.$refs.searchInput.focus()}))}},mounted(){document.addEventListener("click",this.onClickOutside)},beforeUnmount(){document.removeEventListener("click",this.onClickOutside)},methods:{updateDropdownPos(){if(!this.$refs.wrapper)return;const t=this.$refs.wrapper.getBoundingClientRect(),e=256;let o=t.left;o+e>window.innerWidth&&(o=t.right-e),this.dropdownPos={top:t.bottom+4+"px",left:o+"px"}},select(t){this.$emit("input",t),this.open=!1},onClickOutside(t){this.open&&this.$refs.wrapper&&!this.$refs.wrapper.contains(t.target)&&(this.open=!1)}}},qi={class:"relative",ref:"wrapper"},Wi=["title"],Vi={class:"p-2 border-b border-gray-200 dark:border-primary-700"},Ki={class:"max-h-48 overflow-y-auto p-2 grid grid-cols-6 gap-1"},Gi=["onClick","title"],Ji={key:0,class:"col-span-6 py-3 text-center text-xs text-gray-400 dark:text-primary-500"};function Zi(t,e,o,d,s,a){return n(),p("div",qi,[i("button",{type:"button",onClick:e[0]||(e[0]=l=>s.open=!s.open),class:"w-8 h-8 flex items-center justify-center rounded border border-gray-300 dark:border-primary-700 bg-white dark:bg-primary-950 hover:border-secondary transition-colors",title:o.value||"Escolher Ãcone"},[i("i",{class:B([o.value||"fa-solid fa-bag-shopping","text-sm text-gray-700 dark:text-primary-200"])},null,2)],8,Wi),s.open?(n(),p("div",{key:0,class:"fixed z-[9999] w-64 bg-white dark:bg-primary-900 border border-gray-200 dark:border-primary-700 rounded-lg shadow-xl",style:b(a.dropdownStyle)},[i("div",Vi,[F(i("input",{ref:"searchInput","onUpdate:modelValue":e[1]||(e[1]=l=>s.search=l),type:"text",placeholder:"Buscar Ãcone...",class:"w-full px-2 py-1.5 text-xs rounded border border-gray-300 dark:border-primary-700 bg-white dark:bg-primary-950 text-primary dark:text-primary-200",onKeydown:e[2]||(e[2]=h(()=>{},["stop"]))},null,544),[[Z,s.search]])]),i("div",Ki,[(n(!0),p(v,null,I(a.filteredIcons,l=>(n(),p("button",{key:l.value,type:"button",onClick:u=>a.select(l.value),class:B(["w-9 h-9 flex items-center justify-center rounded hover:bg-secondary/10 transition-colors",o.value===l.value?"bg-secondary/20 ring-1 ring-secondary":""]),title:l.label},[i("i",{class:B([l.value,"text-sm text-gray-700 dark:text-primary-200"])},null,2)],10,Gi))),128)),a.filteredIcons.length===0?(n(),p("div",Ji," Nenhum Ãcone encontrado ")):g("",!0)])],4)):g("",!0)],512)}const Qi=Object.assign(x(Ni,[["render",Zi]]),{__name:"EditorPropsPropIconSelect"}),Xi={components:{PropColor:ni,PropText:gi,PropSelect:ki,PropSlider:Ti,PropImage:Di,PropIconSelect:Qi},props:{block:{type:Object,default:null}},data(){return{alignOptions:[{value:"left",label:"Esquerda"},{value:"center",label:"Centro"},{value:"right",label:"Direita"}],fontOptions:[{value:"Roboto, sans-serif",label:"Roboto"},{value:"Arial, sans-serif",label:"Arial"},{value:"Georgia, serif",label:"Georgia"},{value:"'Courier New', monospace",label:"Courier New"},{value:"'Trebuchet MS', sans-serif",label:"Trebuchet MS"},{value:"Verdana, sans-serif",label:"Verdana"},{value:"'Times New Roman', serif",label:"Times New Roman"},{value:"Inter, sans-serif",label:"Inter"},{value:"'Open Sans', sans-serif",label:"Open Sans"},{value:"Montserrat, sans-serif",label:"Montserrat"},{value:"Poppins, sans-serif",label:"Poppins"}],aspectRatioOptions:[{value:"16:9",label:"16:9 (Widescreen)"},{value:"4:3",label:"4:3 (Padrão)"},{value:"1:1",label:"1:1 (Quadrado)"},{value:"9:16",label:"9:16 (Vertical)"}],ratingOptions:[{value:"5",label:"5 estrelas"},{value:"4",label:"4 estrelas"},{value:"3",label:"3 estrelas"},{value:"2",label:"2 estrelas"},{value:"1",label:"1 estrela"}],fontWeightOptions:[{value:"100",label:"Thin (100)"},{value:"200",label:"Extra Light (200)"},{value:"300",label:"Light (300)"},{value:"400",label:"Normal (400)"},{value:"500",label:"Medium (500)"},{value:"600",label:"Semi Bold (600)"},{value:"700",label:"Bold (700)"},{value:"800",label:"Extra Bold (800)"},{value:"900",label:"Black (900)"}],toggleOptions:[{value:"true",label:"Sim"},{value:"false",label:"Não"}],whatsappPositionOptions:[{value:"bottom-right",label:"Inferior direita"},{value:"bottom-left",label:"Inferior esquerda"},{value:"top-right",label:"Superior direita"},{value:"top-left",label:"Superior esquerda"}],notifCycleOptions:[{value:"loop",label:"Loop"},{value:"stop",label:"Stop após a última"}]}},methods:{updateProp(t,e){this.$emit("update-prop",t,e)},updateTestimonialCount(t){const e=parseInt(t),o=[...this.block.props.items||[]];for(;o.length<e;)o.push({name:"Nome do cliente",text:"Depoimento do cliente depoimento do cliente depoimento do cliente",avatar:"",rating:"5"});o.length>e&&(o.length=e),this.updateProp("items",o)},updateTestimonialAvatar(t,e){this.updateTestimonialItemProp(t,"avatar",e)}
67,updateTestimonialItemProp(t,e,o){const d=(this.block.props.items||[]).map((s,a)=>a===t?{...s,[e]:o}:s);this.updateProp("items",d)},normalizeNotificationMessages(){return(this.block.props.messages||[]).map(t=>typeof t=="string"?{text:t,icon:"fa-solid fa-bag-shopping"}:{text:t&&typeof t.text=="string"?t.text:"",icon:t&&typeof t.icon=="string"&&t.icon.trim()?t.icon:"fa-solid fa-bag-shopping"})},getNotificationMessageText(t){return typeof t=="string"?t:t&&typeof t.text=="string"?t.text:""},addNotificationMessage(){const t=this.normalizeNotificationMessages();t.length>=10||(t.push({text:"Nova notificação",icon:"fa-solid fa-bag-shopping"}),this.updateProp("messages",t))},removeNotificationMessage(t){const e=this.normalizeNotificationMessages();e.length<=1||(e.splice(t,1),this.updateProp("messages",e))},updateNotificationMessage(t,e){const o=this.normalizeNotificationMessages();o[t]&&(o[t].text=e,this.updateProp("messages",o))},updateNotificationMessageIcon(t,e){const o=this.normalizeNotificationMessages();o[t]&&(o[t].icon=e||"fa-solid fa-bag-shopping",this.updateProp("messages",o))}}},Yi={class:"w-[280px] min-w-[280px] bg-white dark:bg-primary-900 border-l border-gray-200 dark:border-primary-800 overflow-y-auto"},_i={class:"p-3 border-b border-gray-200 dark:border-primary-800 flex items-center justify-between"},ea={key:0,class:"p-4 text-center text-sm text-gray-400 dark:text-primary-500"},ta={key:1,class:"p-3"},oa={class:"mb-3"},ia=["value","onInput","placeholder"],aa=["onClick"],la={key:12,class:"mb-3"},ra=["value"];function na(t,e,o,d,s,a){const l=C("PropColor"),u=C("PropImage"),m=C("PropSlider"),c=C("PropText"),k=C("PropSelect"),w=C("PropIconSelect");return n(),p("div",Yi,[i("div",_i,[e[52]||(e[52]=i("h3",{class:"text-xs font-semibold text-gray-500 dark:text-primary-400 uppercase tracking-wider"}," Propriedades ",-1)),i("button",{onClick:e[0]||(e[0]=r=>t.$emit("close")),class:"lg:hidden w-6 h-6 flex items-center justify-center rounded text-gray-400 dark:text-primary-500 hover:text-gray-600 dark:hover:text-primary-300 hover:bg-gray-100 dark:hover:bg-primary-800 transition-colors"},[...e[51]||(e[51]=[i("i",{class:"fa-solid fa-xmark text-sm"},null,-1)])])]),o.block?(n(),p("div",ta,[o.block.type==="banner"?(n(),p(v,{key:0},[e[54]||(e[54]=i("div",{class:"mb-3 px-2 py-1.5 rounded bg-gray-50 dark:bg-primary-800 text-xs text-gray-500 dark:text-primary-400"},[i("i",{class:"fa-solid fa-paintbrush mr-1"}),S(" Use a toolbar no texto para formatar ")],-1)),f(l,{label:"Cor de fundo",value:o.block.props.bgColor,onInput:e[1]||(e[1]=r=>a.updateProp("bgColor",r))},null,8,["value"]),f(l,{label:"Cor do texto",value:o.block.props.textColor,onInput:e[2]||(e[2]=r=>a.updateProp("textColor",r))},null,8,["value"]),f(u,{label:"Imagem de fundo",value:o.block.props.bgImage,onInput:e[3]||(e[3]=r=>a.updateProp("bgImage",r))},null,8,["value"]),f(m,{label:"Espaçamento",value:o.block.props.padding,min:0,max:100,onInput:e[4]||(e[4]=r=>a.updateProp("padding",r))},null,8,["value"])],64)):g("",!0),o.block.type==="text"?(n(),p(v,{key:1},[e[55]||(e[55]=i("div",{class:"mb-3 px-2 py-1.5 rounded bg-gray-50 dark:bg-primary-800 text-xs text-gray-500 dark:text-primary-400"},[i("i",{class:"fa-solid fa-paintbrush mr-1"}),S(" Use a toolbar no texto para formatar (cor, tamanho, negrito) ")],-1)),f(l,{label:"Cor de fundo",value:o.block.props.bgColor,onInput:e[5]||(e[5]=r=>a.updateProp("bgColor",r))},null,8,["value"]),f(m,{label:"Espaçamento",value:o.block.props.padding,min:0,max:100,onInput:e[6]||(e[6]=r=>a.updateProp("padding",r))},null,8,["value"])],64)):g("",!0),o.block.type==="image"?(n(),p(v,{key:2},[f(u,{label:"Imagem",value:o.block.props.imageUrl,onInput:e[7]||(e[7]=r=>a.updateProp("imageUrl",r))},null,8,["value"]),f(c,{label:"Texto alternativo",value:o.block.props.alt,onInput:e[8]||(e[8]=r=>a.updateProp("alt",r)),placeholder:"Descrição da imagem"},null,8,["value"]),f(c,{label:"Link (URL)",value:o.block.props.link,onInput:e[9]||(e[9]=r=>a.updateProp("link",r)),placeholder:"https://"},null,8,["value"]),f(m,{label:"Largura",value:o.block.props.width,min:10,max:100,unit:"%",onInput:e[10]||(e[10]=r=>a.updateProp("width",r))},null,8,["value"]),f(m,{label:"Borda arredondada",value:o.block.props.borderRadius,min:0,max:50,onInput:e[11]||(e[11]=r=>a.updateProp("borderRadius",r))},null,8,["value"]),f(m,{label:"Espaçamento",value:o.block.props.padding,min:0,max:100,onInput:e[12]||(e[12]=r=>a.updateProp("padding",r))},null,8,["value"])],64)):g("",!0),o.block.type==="video"?(n(),p(v,{key:3},[f(c,{label:"URL do vÃdeo",value:o.block.props.videoUrl,onInput:e[13]||(e[13]=r=>a.updateProp("videoUrl",r)),placeholder:"https://youtube.com/watch?v=..."},null,8,["value"]),f(k,{label:"Proporção",value:o.block.props.aspectRatio,options:s.aspectRatioOptions,onInput:e[14]||(e[14]=r=>a.updateProp("aspectRatio",r))}
67,null,8,["value","options"]),f(m,{label:"Espaçamento",value:o.block.props.padding,min:0,max:100,onInput:e[15]||(e[15]=r=>a.updateProp("padding",r))},null,8,["value"])],64)):g("",!0),o.block.type==="guarantee"?(n(),p(v,{key:4},[e[56]||(e[56]=i("div",{class:"mb-3 px-2 py-1.5 rounded bg-gray-50 dark:bg-primary-800 text-xs text-gray-500 dark:text-primary-400"},[i("i",{class:"fa-solid fa-paintbrush mr-1"}),S(" Use a toolbar no texto para formatar ")],-1)),f(l,{label:"Cor de fundo",value:o.block.props.bgColor,onInput:e[16]||(e[16]=r=>a.updateProp("bgColor",r))},null,8,["value"]),f(l,{label:"Cor do texto",value:o.block.props.textColor,onInput:e[17]||(e[17]=r=>a.updateProp("textColor",r))},null,8,["value"]),f(m,{label:"Espaçamento",value:o.block.props.padding,min:0,max:100,onInput:e[18]||(e[18]=r=>a.updateProp("padding",r))},null,8,["value"])],64)):g("",!0),o.block.type==="testimonial"?(n(),p(v,{key:5},[e[57]||(e[57]=i("div",{class:"mb-3 px-2 py-1.5 rounded bg-gray-50 dark:bg-primary-800 text-xs text-gray-500 dark:text-primary-400"},[i("i",{class:"fa-solid fa-paintbrush mr-1"}),S(" Use a toolbar no texto para formatar ")],-1)),f(m,{label:"Quantidade",value:String((o.block.props.items||[]).length),min:1,max:5,unit:"",onInput:e[19]||(e[19]=r=>a.updateTestimonialCount(r))},null,8,["value"]),f(k,{label:"Mostrar foto",value:o.block.props.showAvatar!==!1?"true":"false",options:s.toggleOptions,onInput:e[20]||(e[20]=r=>a.updateProp("showAvatar",r==="true"))},null,8,["value","options"]),o.block.props.showAvatar!==!1?(n(!0),p(v,{key:0},I(o.block.props.items||[],(r,z)=>(n(),P(u,{key:"avatar-"+z,label:"Foto "+(z+1),value:r.avatar,onInput:$=>a.updateTestimonialAvatar(z,$)},null,8,["label","value","onInput"]))),128)):g("",!0),(n(!0),p(v,null,I(o.block.props.items||[],(r,z)=>(n(),P(k,{key:"rating-"+z,label:"Estrelas "+(z+1),value:r.rating||"5",options:s.ratingOptions,onInput:$=>a.updateTestimonialItemProp(z,"rating",$)},null,8,["label","value","options","onInput"]))),128)),f(l,{label:"Cor de fundo",value:o.block.props.bgColor,onInput:e[21]||(e[21]=r=>a.updateProp("bgColor",r))},null,8,["value"]),f(l,{label:"Cor do texto",value:o.block.props.textColor,onInput:e[22]||(e[22]=r=>a.updateProp("textColor",r))},null,8,["value"]),f(m,{label:"Espaçamento",value:o.block.props.padding,min:0,max:100,onInput:e[23]||(e[23]=r=>a.updateProp("padding",r))},null,8,["value"])],64)):g("",!0),o.block.type==="whatsapp"?(n(),p(v,{key:6},[f(c,{label:"Telefone (com DDD)",value:o.block.props.phone,onInput:e[24]||(e[24]=r=>a.updateProp("phone",r)),placeholder:"5511999999999"},null,8,["value"]),f(c,{label:"Mensagem padrão",value:o.block.props.message,onInput:e[25]||(e[25]=r=>a.updateProp("message",r)),multiline:!0},null,8,["value"]),f(k,{label:"Posição",value:o.block.props.position||"bottom-right",options:s.whatsappPositionOptions,onInput:e[26]||(e[26]=r=>a.updateProp("position",r))},null,8,["value","options"]),f(l,{label:"Cor do botão",value:o.block.props.bgColor,onInput:e[27]||(e[27]=r=>a.updateProp("bgColor",r))},null,8,["value"])],64)):g("",!0),o.block.type==="spacer"?(n(),P(m,{key:7,label:"Altura",value:o.block.props.height,min:10,max:200,onInput:e[28]||(e[28]=r=>a.updateProp("height",r))},null,8,["value"])):g("",!0),o.block.type==="timer"?(n(),p(v,{key:8},[e[58]||(e[58]=i("div",{class:"mb-3 px-2 py-1.5 rounded bg-gray-50 dark:bg-primary-800 text-xs text-gray-500 dark:text-primary-400"},[i("i",{class:"fa-solid fa-paintbrush mr-1"}),S(" Use a toolbar no texto para formatar ")],-1)),f(c,{label:"Minutos",value:o.block.props.minutes,onInput:e[29]||(e[29]=r=>a.updateProp("minutes",r)),placeholder:"15"},null,8,["value"]),f(c,{label:"Segundos",value:o.block.props.seconds,onInput:e[30]||(e[30]=r=>a.updateProp("seconds",r)),placeholder:"00"},null,8,["value"]),f(l,{label:"Cor de fundo",value:o.block.props.bgColor,onInput:e[31]||(e[31]=r=>a.updateProp("bgColor",r))},null,8,["value"]),f(l,{label:"Cor do texto",value:o.block.props.textColor,onInput:e[32]||(e[32]=r=>a.updateProp("textColor",r))},null,8,["value"])],64)):g("",!0),o.block.type==="notification"?(n(),p(v,{key:9},[i("div",oa,[e[61]||(e[61]=i("label",{class:"block text-xs font-medium text-gray-600 dark:text-primary-300 mb
67-2"},"Mensagens",-1)),(n(!0),p(v,null,I(o.block.props.messages||[],(r,z)=>(n(),p("div",{key:"notif-msg-"+z,class:"flex items-center gap-1 mb-1.5"},[f(w,{value:r.icon||"fa-solid fa-bag-shopping",onInput:$=>a.updateNotificationMessageIcon(z,$)},null,8,["value","onInput"]),i("input",{type:"text",value:a.getNotificationMessageText(r),onInput:$=>a.updateNotificationMessage(z,$.target.value),class:"flex-1 px-2 py-1 text-xs rounded border border-gray-300 dark:border-primary-700 bg-white dark:bg-primary-950 text-primary dark:text-primary-200",placeholder:"Mensagem "+(z+1)},null,40,ia),(o.block.props.messages||[]).length>1?(n(),p("button",{key:0,onClick:$=>a.removeNotificationMessage(z),class:"w-6 h-6 flex items-center justify-center rounded text-red-400 hover:text-red-600 hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors text-xs",title:"Remover"},[...e[59]||(e[59]=[i("i",{class:"fa-solid fa-xmark"},null,-1)])],8,aa)):g("",!0)]))),128)),(o.block.props.messages||[]).length<10?(n(),p("button",{key:0,onClick:e[33]||(e[33]=(...r)=>a.addNotificationMessage&&a.addNotificationMessage(...r)),class:"w-full mt-1 px-2 py-1.5 text-xs rounded border border-dashed border-gray-300 dark:border-primary-700 text-gray-500 dark:text-primary-400 hover:border-secondary hover:text-secondary transition-colors"},[...e[60]||(e[60]=[i("i",{class:"fa-solid fa-plus mr-1"},null,-1),S(" Adicionar mensagem ",-1)])])):g("",!0)]),f(k,{label:"Ciclo",value:o.block.props.cycle||"loop",options:s.notifCycleOptions,onInput:e[34]||(e[34]=r=>a.updateProp("cycle",r))},null,8,["value","options"]),f(m,{label:"Tempo de exibição",value:o.block.props.displayTime,min:1,max:15,unit:"s",onInput:e[35]||(e[35]=r=>a.updateProp("displayTime",r))},null,8,["value"]),f(m,{label:"Intervalo",value:o.block.props.interval,min:3,max:30,unit:"s",onInput:e[36]||(e[36]=r=>a.updateProp("interval",r))},null,8,["value"]),f(k,{label:"Posição",value:o.block.props.position||"bottom-left",options:s.whatsappPositionOptions,onInput:e[37]||(e[37]=r=>a.updateProp("position",r))},null,8,["value","options"]),f(l,{label:"Cor de fundo",value:o.block.props.bgColor,onInput:e[38]||(e[38]=r=>a.updateProp("bgColor",r))},null,8,["value"]),f(m,{label:"Borda arredondada",value:o.block.props.borderRadius,min:0,max:30,onInput:e[39]||(e[39]=r=>a.updateProp("borderRadius",r))},null,8,["value"])],64)):g("",!0),o.block.type==="discountPopup"?(n(),p(v,{key:10},[f(c,{label:"TÃtulo",value:o.block.props.title,onInput:e[40]||(e[40]=r=>a.updateProp("title",r)),placeholder:"Oferta exclusiva para você!"},null,8,["value"]),f(c,{label:"Descrição",value:o.block.props.description,onInput:e[41]||(e[41]=r=>a.updateProp("description",r)),multiline:!0,placeholder:"Use o cupom e garanta seu desconto."},null,8,["value"]),f(c,{label:"Cupom",value:o.block.props.coupon,onInput:e[42]||(e[42]=r=>a.updateProp("coupon",r)),placeholder:"DESCONTO10"},null,8,["value"]),f(m,{label:"Abrir após (segundos)",value:o.block.props.delay,min:10,max:200,unit:"s",onInput:e[43]||(e[43]=r=>a.updateProp("delay",r))},null,8,["value"]),f(l,{label:"Cor do topo",value:o.block.props.bgColor,onInput:e[44]||(e[44]=r=>a.updateProp("bgColor",r))},null,8,["value"]),f(l,{label:"Cor do texto",value:o.block.props.textColor,onInput:e[45]||(e[45]=r=>a.updateProp("textColor",r))},null,8,["value"]),e[62]||(e[62]=i("div",{class:"mb-3 px-2 py-1.5 rounded bg-gray-50 dark:bg-primary-800 text-xs text-gray-500 dark:text-primary-400"},[i("i",{class:"fa-solid fa-circle-info mr-1"}),S(" O popup abre automaticamente após o tempo definido e também ao tentar fechar o checkout. ")],-1))],64)):g("",!0),o.block.type==="orderbumpColor"?(n(),p(v,{key:11},[e[63]||(e[63]=i("div",{class:"mb-3 px-2 py-1.5 rounded bg-gray-50 dark:bg-primary-800 text-xs text-gray-500 dark:text-primary-400"},[i("i",{class:"fa-solid fa-circle-info mr-1"}),S(' Define a cor do tÃtulo "Aproveite e leve junto" e do tÃtulo do orderbump, no checkout. ')],-1)),e[64]||(e[64]=i("p",{class:"text-[11px] font-semibold uppercase tracking-wider text-gray-400 dark:text-primary-500 mb-2"}," Cores orderbumps ",-1)),f(l,{label:"Cor no modo claro",value:o.block.props.colorLight,onInput:e[46]||(e[46]=r=>a.updateProp("colorLight",r))},null,8,["value"]),f(l,{label:"Cor no modo escuro",value:o.block.props.colorDark,onInput:e[47]||(e[47]=r=>a.updateProp("colorDark",r))},null,8,["value"]),e[65]||(e[65]=i("p",{class:"text-[11px] font-semibold uppercase tracking-wider text-gray-400 dark:text-primary-500 mb-2 mt-4"}," Cores levar todos orderbumps ",-1)),f(l,{label:"Cor no modo claro",value:o.block.props.allC
67olorLight,onInput:e[48]||(e[48]=r=>a.updateProp("allColorLight",r))},null,8,["value"]),f(l,{label:"Cor no modo escuro",value:o.block.props.allColorDark,onInput:e[49]||(e[49]=r=>a.updateProp("allColorDark",r))},null,8,["value"])],64)):g("",!0),o.block.type==="html"?(n(),p("div",la,[e[66]||(e[66]=i("label",{class:"block text-xs font-medium text-gray-600 dark:text-primary-300 mb-1"},"Código HTML",-1)),i("textarea",{value:o.block.props.customHtml,onInput:e[50]||(e[50]=r=>a.updateProp("customHtml",r.target.value)),rows:"10",class:"w-full px-2 py-1.5 text-xs rounded border border-gray-300 dark:border-primary-700 bg-white dark:bg-primary-950 text-primary dark:text-primary-200 resize-y font-mono",placeholder:"<div>Seu HTML aqui</div>"},null,40,ra)])):g("",!0)])):(n(),p("div",ea,[...e[53]||(e[53]=[i("i",{class:"fa-solid fa-mouse-pointer text-2xl mb-2 block"},null,-1),S(" Selecione um bloco para editar ",-1)])]))])}const U=Object.assign(x(Xi,[["render",na]]),{__name:"EditorPropsPanel"}),sa={class:"editor-fullscreen fixed inset-0 z-[9998] flex flex-col bg-[#f4f5f7] dark:bg-primary-950"},da={class:"relative w-full max-w-[900px] my-8 bg-[#f4f5f7] rounded-lg shadow-2xl"},pa=["innerHTML"],ua={class:"flex flex-1 overflow-hidden relative"},ca={class:"hidden lg:flex flex-shrink-0"},fa={key:0,class:"lg:hidden fixed inset-0 z-[100] flex"},ga={class:"hidden lg:flex flex-shrink-0"},ba={key:0,class:"lg:hidden fixed inset-0 z-[100] flex"},ma={key:1,class:"fixed inset-0 z-[99999] bg-[#f4f5f7]/85 dark:bg-primary-950/80 flex items-center justify-center"},ya={components:{EditorToolbar:G,EditorBlockPanel:L,EditorPreview:J,EditorPropsPanel:U},data(){return{loading:!0,saving:!1,headerBlocks:[],footerBlocks:[],activeSection:"header",selectedBlockId:null,viewport:"desktop",checkoutTitle:"",checkoutAmount:0,checkoutPaymentMethods:[],showPreview:!1,previewHtml:"",showBlockPanel:!1,showPropsPanel:!1,history:[],historyIndex:-1,maxHistory:50}},computed:{checkoutId(){return(this._.provides[N]||this.$route).query.id||""},editorPage(){return(this._.provides[N]||this.$route).query.page||"checkout"},isThankPage(){return this.editorPage==="thank_page"},editorTitle(){const t=this.isThankPage?"Página de Obrigado":"Editar Checkout";return this.checkoutTitle?`${t} - ${this.checkoutTitle}`:t},selectedBlock(){return this.selectedBlockId?this.findBlock(this.selectedBlockId):null}},async mounted(){await this.loadCheckout(),this.loading=!1,this.saveHistory(),document.addEventListener("keydown",this.handleKeydown)},beforeUnmount(){document.removeEventListener("keydown",this.handleKeydown)},methods:{findBlock(t){return this.headerBlocks.find(e=>e.id===t)||this.footerBlocks.find(e=>e.id===t)||null},findBlockContext(t){let e=this.headerBlocks.findIndex(o=>o.id===t);return e!==-1?{arr:this.headerBlocks,index:e,section:"header"}:(e=this.footerBlocks.findIndex(o=>o.id===t),e!==-1?{arr:this.footerBlocks,index:e,section:"footer"}:null)},async loadCheckout(){if(this.checkoutId)try{const t=await this.httpGet(this.$config.public.baseURL+"/editor/checkout",{params:{id:this.checkoutId,page:this.editorPage},headers:{Authorization:this.cookieGet("auth-token")}}),e=t?.body||t?.data||null;if(e){this.checkoutTitle=e.title||"",this.checkoutAmount=e.amount||0,this.checkoutPaymentMethods=Array.isArray(e.payment_methods)?e.payment_methods:Array.isArray(e.payment_method)?e.payment_method:[];let o=e.blocks;if(typeof o=="string")try{o=JSON.parse(o)}catch{o=[]}if(Array.isArray(o)&&o.length>0){const d=o.filter(s=>s&&typeof s=="object").map((s,a)=>{const l=H(s.type||"text").props||{},u=s.props&&typeof s.props=="object"?s.props:{},m={...l,...u};return Object.keys(m).forEach(c=>{const k=m[c];(k==="[object Event]"||typeof k=="string"&&k.trim()==="[object Event]")&&(m[c]=l[c]!==void 0?l[c]:"")}),{...s,id:s.id||`loaded-block-${a}`,props:m,section:(s.section||"header").toString().toLowerCase()}});this.headerBlocks=d.filter(s=>s.section==="header"),this.footerBlocks=d.filter(s=>s.section==="footer")}}}catch(t){console.error("Erro ao carregar checkout:",t)}},async save(){if(!this.checkoutId||this.saving)return;this.saving=!0;const t=O(this.headerBlocks),e=O(this.footerBlocks),o=[...this.headerBlocks.map(d=>({...d,section:"header"})),...this.footerBlocks.map(d=>({...d,section:"footer"}))];try{await this.httpPost(this.$config.public.baseURL+"/editor/checkout",{id:this.checkoutId,blocks:o,html:t,html_footer:e,page:this.editorPage},{headers:{Authorization:this.cookieGet("auth-token")}});const d=this.isThankPage?"Página de obrigado salva com sucesso!":"Checkout salvo com sucesso!";window.notification(d,"success",null)}catch(d){console.error("Erro ao salvar:",d),window.notification("Erro ao salvar checkout","danger",null)}finally{this.saving=!1}},addBlock(t){const e=H(t);this.activeSection==="footer"?this.footerBlocks.push(e):this.headerBlocks.push(e),this.selectedBlockId=e.id,this.saveHistory()},removeBlock(t){const e=this.findBlockContext(t);e&&(this.selectedBlockId===t&&(this.selectedBlockId=null),e.arr.splice(e.index,1),this.saveHistory())},duplicateBlock(t){const e=this.findBlockContext(t);if(!e)return;const o=e.arr[e.index],d=H(o.type);d.props=JSON.parse(JSON.stringify(o.props)),e.arr.splice(e.index+1,0,d),this.selectedBlockId=d.id,this.saveHistory()},moveBlockUp(t){const e=this.findBlockContext(t);if(!e||e.index<=0)return;const o=e.arr.splice(e.index,1)[0];e.arr.splice(e.index-1,0,o),this.saveHistory()},moveBlockDown(t){const e=this.findBlockContext(t);if(!e||e.index>=e.arr.length-1)return;const o=e.arr.splice(e.index,1)[0];e.arr.splice(e.index+1,0,o),this.saveHistory()},onSelectBlock(t){this.selectedBlockId=t;const e=this.findBlockContext(t);e&&(this.activeSection=e.section),this.selectedBlockId&&window.innerWidth<1024&&(this.showPropsPanel=!0)},onDeselectBlock(){this.selectedBlockId=null},updateBlockProp(t,e,o){const d=this.findBlock(t);d&&(d.props[e]=o,this.saveHistory())},onPropUpdate(t,e){this.selectedBlock&&(this.selectedBlock.props[t]=e,this.saveHistory())},onHeaderReorder(t){this.headerBlocks=t},onFooterReorder(t){this.footerBlocks=t},openPreview(){const t=O(this.headerBlocks),e=O(this.footerBlocks);this.previewHtml=t+e,this.showPreview=!0,this.$nextTick(()=>{const o=document.getElementById("fiapy-discount-popup");if(!o)return;o.style.display="flex";const d=o.dataset.coupon||"",s=document.getElementById("fiapy-discount-popup-copy"),a=document.getElementById("fiapy-discount-popup-copied"),l=d
67ocument.getElementById("fiapy-discount-popup-close");l&&l.addEventListener("click",()=>{o.style.display="none"}),o.addEventListener("click",u=>{u.target===o&&(o.style.display="none")}),s&&d&&s.addEventListener("click",()=>{navigator.clipboard&&navigator.clipboard.writeText(d).catch(()=>{}),a&&(a.style.display="block",setTimeout(()=>{a.style.display="none"},2500))})})},goBack(){this.$router.push("/producer/checkout/create?id="+this.checkoutId)},saveHistory(){const t=JSON.stringify({header:this.headerBlocks,footer:this.footerBlocks});this.historyIndex<this.history.length-1&&(this.history=this.history.slice(0,this.historyIndex+1)),this.history.push(t),this.history.length>this.maxHistory&&this.history.shift(),this.historyIndex=this.history.length-1},undo(){if(this.historyIndex>0){this.historyIndex--;const t=JSON.parse(this.history[this.historyIndex]);this.headerBlocks=t.header,this.footerBlocks=t.footer,this.selectedBlockId=null}},redo(){if(this.historyIndex<this.history.length-1){this.historyIndex++;const t=JSON.parse(this.history[this.historyIndex]);this.headerBlocks=t.header,this.footerBlocks=t.footer,this.selectedBlockId=null}},handleKeydown(t){if((t.ctrlKey||t.metaKey)&&t.key==="z"&&!t.shiftKey&&(t.preventDefault(),this.undo()),(t.ctrlKey||t.metaKey)&&t.key==="z"&&t.shiftKey&&(t.preventDefault(),this.redo()),(t.ctrlKey||t.metaKey)&&t.key==="s"&&(t.preventDefault(),this.save()),(t.key==="Delete"||t.key==="Backspace")&&this.selectedBlockId){const e=t.target.tagName.toLowerCase();e!=="input"&&e!=="textarea"&&!t.target.isContentEditable&&(t.preventDefault(),this.removeBlock(this.selectedBlockId))}t.key==="Escape"&&(this.showPreview?this.showPreview=!1:this.showBlockPanel?this.showBlockPanel=!1:this.showPropsPanel?this.showPropsPanel=!1:this.selectedBlockId=null)}}},xa=Object.assign(ya,{__name:"editor",setup(t){return(e,o)=>(n(),p("div",sa,[e.showPreview?(n(),p("div",{key:0,class:"fixed inset-0 z-[9999] bg-black/80 backdrop-blur-sm flex items-start justify-center overflow-y-auto",onClick:o[1]||(o[1]=h(d=>e.showPreview=!1,["self"]))},[i("div",da,[i("button",{onClick:o[0]||(o[0]=d=>e.showPreview=!1),class:"absolute top-3 right-3 z-10 w-8 h-8 flex items-center justify-center rounded-full bg-gray-800/50 text-white hover:bg-gray-800 transition-colors"},[...o[12]||(o[12]=[i("i",{class:"fa-solid fa-xmark"},null,-1)])]),i("div",{innerHTML:e.previewHtml,class:"checkout-preview bg-[#f4f5f7]"},null,8,pa)])])):g("",!0),f(G,{title:e.editorTitle,saving:e.saving,"can-undo":e.historyIndex>0,"can-redo":e.historyIndex<e.history.length-1,viewport:e.viewport,onBack:e.goBack,onSave:e.save,onUndo:e.undo,onRedo:e.redo,onViewport:o[2]||(o[2]=d=>e.viewport=d),onPreview:e.openPreview,onToggleBlocks:o[3]||(o[3]=d=>e.showBlockPanel=!e.showBlockPanel),onToggleProps:o[4]||(o[4]=d=>e.showPropsPanel=!e.showPropsPanel)},null,8,["title","saving","can-undo","can-redo","viewport","onBack","onSave","onUndo","onRedo","onPreview"]),i("div",ua,[i("div",ca,[f(L,{onAddBlock:e.addBlock,onClose:o[5]||(o[5]=d=>e.showBlockPanel=!1)},null,8,["onAddBlock"])]),f(V,{name:"slide-left"},{default:E(()=>[e.showBlockPanel?(n(),p("div",fa,[f(L,{onAddBlock:e.addBlock,onClose:o[6]||(o[6]=d=>e.showBlockPanel=!1),class:"shadow-2xl flex-shrink-0"},null,8,["onAddBlock"]),i("div",{class:"flex-1 bg-black/40",onClick:o[7]||(o[7]=d=>e.showBlockPanel=!1)})])):g("",!0)]),_:1}),f(J,{"header-blocks":e.headerBlocks,"footer-blocks":e.footerBlocks,"selected-block-id":e.selectedBlockId,viewport:e.viewport,"show-checkout-form":!e.isThankPage,"is-thank-page":e.isThankPage,"checkout-title":e.checkoutTitle,"checkout-amount":e.checkoutAmount,"checkout-payment-methods":e.checkoutPaymentMethods,onSelect:e.onSelectBlock,onDeselect:e.onDeselectBlock,onAddBlock:e.addBlock,onRemove:e.removeBlock,onDuplicate:e.duplicateBlock,onMoveUp:e.moveBlockUp,onMoveDown:e.moveBlockDown,"onUpdate:headerBlocks":e.onHeaderReorder,"onUpdate:footerBlocks":e.onFooterReorder,onUpdateBlockProp:e.updateBlockProp,onReorder:e.saveHistory,onSetActiveSection:o[8]||(o[8]=d=>e.activeSection=d)},null,8,["header-blocks","footer-blocks","selected-block-id","viewport","show-checkout-form","is-thank-page","checkout-title","checkout-amount","checkout-payment-methods","onSelect","onDeselect","onAddBlock","onRemove","onDuplicate","onMoveUp","onMoveDown","onUpdate:headerBlocks","onUpdate:footerBlocks","onUpdateBlockProp","onReorder"]),i("div",ga,[f(U,{block:e.selectedBlock,onUpdateProp:e.onPropUpdate,onClose:o[9]||(o[9]=d=>e.showPropsPanel=!1)},null,8,["block","onUpdateProp"])]),f(V,{name:"slide-right"},{default:E(()=>[e.showPropsPanel?(n(),p("div",ba,[i("div",{class:"flex-1 bg-black/40",onClick:o[10]||(o[10]=d=>e.showPropsPanel=!1)}),f(U,{block:e.selectedBlock,onUpdateProp:e.onPropUpdate,onClose:o[11]||(o[11]=d=>e.showPropsPanel=!1),class:"shadow-2xl flex-shrink-0"},null,8,["block","onUpdateProp"])])):g("",!0)]),_:1})]),e.loading?(n(),p("div",ma,[...o[13]||(o[13]=[i("div",{class:"flex flex-col items-center gap-3"},[i("div",{class:"w-8 h-8 border-3 border-secondary border-t-transparent roun
67ded-full animate-spin"}),i("span",{class:"text-sm text-gray-500 dark:text-primary-400"},"Carregando editor...")],-1)])])):g("",!0)]))}}),Ca=x(xa,[["__scopeId","data-v-8856b7b9"]]);export{Ca as default};
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.