PageSourceSearch

https://7maravilhas.pt/build/assets/application-Y6TWqxs_.js

js 7maravilhas.pt collected 2026-09-24 23:50:46 UTC 8,660 bytes, 1 lines download raw bytes

1import{r as w,v as z,j as e,$ as G}from"./app-Ce8cAmW-.js";import{X as R,S as U,M as W}from"./main-layout-C-X_DRHS.js";import{P as Z}from"./primary-button-hvRD1VpQ.js";import{L as b,I as J}from"./label-DMMt9_Zb.js";import{T as X}from"./textarea-BmDfqg1O.js";import{C,b as K,c as Q,d as Y,a as D}from"./card-BX0hYp-V.js";import{A as M,a as k}from"./alert-D9l9nM-a.js";import{G as I}from"./glowing-effect-DCFhAquA.js";import{B as _}from"./badge-BdOe8ugd.js";import{m as d}from"./proxy-MlirqW2_.js";import{U as A}from"./upload-BUlvwbqC.js";import{C as F}from"./circle-check-big-C7TBtmx5.js";import{C as H}from"./circle-alert-By6rAmmI.js";/* empty css            */import"./index-skiHflQy.js";import"./index-BLDRET_f.js";import"./single-value-DUybrRiC.js";function E({title:i="Candidate-se já!",description:l="Partilhe a sua proposta de monumento e participe na competição das 7 Maravilhas",badge:x="Candidaturas",errors:t,success:p,error:u,showHeader:c=!0,className:S=""}){const n=w.useRef(null),[g,h]=w.useState(!1),{data:s,setData:m,post:P,processing:j,errors:o,reset:q}=z({name:"",description:"",image:null}),f=p,N=u,B=a=>{a.preventDefault(),P("/candidaturas",{forceFormData:!0,onSuccess:()=>{q(),n.current&&(n.current.value="")}})},L=a=>{var v;const r=(v=a.target.files)==null?void 0:v[0];r&&y(r)},y=a=>{["image/jpeg","image/png","image/webp"].includes(a.type)&&(a.size>2*1024*1024||m("image",a))},O=a=>{a.preventDefault(),h(!0)},T=a=>{a.preventDefault(),h(!1)},V=a=>{a.preventDefault(),h(!1);const r=a.dataTransfer.files;r.length>0&&y(r[0])},$=()=>{m("image",null),n.current&&(n.current.value="")};return e.jsx("section",{className:`py-16 lg:py-24 ${S}`,children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsxs("div",{className:"max-w-2xl mx-auto",children:[c&&e.jsxs("div",{className:"text-center mb-16",children:[e.jsx(d.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"mb-6",children:e.jsxs(_,{variant:"outline",className:"bg-primary/10 border-primary/30 text-primary px-4 py-2",children:[e.jsx(A,{className:"h-4 w-4 mr-2"}),x]})}),e.jsx(d.h2,{className:"text-3xl md:text-4xl lg:text-5xl font-bold text-foreground mb-6",initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.8,delay:.2},children:i}),e.jsx(d.p,{className:"text-lg md:text-xl text-muted-foreground max-w-3xl mx-auto leading-relaxed",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.4},children:l})]}),f&&e.jsxs(M,{className:"mb-8 border-green-200 bg-green-50 text-green-800",children:[e.jsx(F,{className:"h-4 w-4"}),e.jsx(k,{children:f})]}),N&&e.jsxs(M,{className:"mb-8 border-red-200 bg-red-50 text-red-800",children:[e.jsx(H,{className:"h-4 w-4"}),e.jsx(k,{children:N})]}),e.jsxs(d.div,{initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.8,delay:c?.6:.2},className:"relative",children:[e.jsx(I,{spread:130,glow:!0,disabled:!1,proximity:64,inactiveZone:.01,variant:"primary",className:"rounded-lg"}),e.jsxs(C,{className:"relative shadow-xl bg-gray-600/20 backdrop-blur-md border border-border/20 rounded-lg",children:[!c&&e.jsxs(K,{className:"text-center pb-8",children:[e.jsx(Q,{className:"text-2xl md:text-3xl font-bold text-foreground",children:i}),e.jsx(Y,{className:"text-lg text-muted-foreground",children:l})]}),e.jsx(D,{className:c?"pt-8":"",children:e.jsxs("form",{onSubmit:B,className:"space-y-8",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(b,{htmlFor:"name",className:"text-base font-medium pb-2",children:"Nome do Monumento *"}),e.jsx(J,{id:"name",type:"text",value:s.name,onChange:a=>m("name",a.target.value),placeholder:"Introduza o nome do seu monumento",className:"h-12 text-base bg-background/50 border-border/40 focus:bg-background/80 transition-colors",required:!0}),(o.name||(t==null?void 0:t.name))&&e.jsx("p",{className:"text-sm text-red-600",children:o.name||(t==null?void 0:t.name)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(b,{htmlFor:"description",className:"text-base font-medium pb-2",children:"Descrição *"}),e.jsx(X,{id:"description",value:s.description,onChange:a=>m("description",a.target.value),placeholder:"Descreva o seu monumento, a sua história, importância e porque deve ser considerado para as 7 Marav
1ilhas...",className:"min-h-32 text-base resize-none bg-background/50 border-border/40 focus:bg-background/80 transition-colors",maxLength:1e3,required:!0}),e.jsxs("div",{className:"flex justify-between items-center",children:[(o.description||(t==null?void 0:t.description))&&e.jsx("p",{className:"text-sm text-red-600",children:o.description||(t==null?void 0:t.description)}),e.jsxs("p",{className:"text-sm text-muted-foreground ml-auto",children:[s.description.length,"/1000 caracteres"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(b,{htmlFor:"image",className:"text-base font-medium pb-2",children:"Imagem do Monumento *"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{ref:n,id:"image",type:"file",accept:"image/jpeg,image/png,image/webp",onChange:L,className:"hidden"}),e.jsx("div",{onClick:()=>{var a;return(a=n.current)==null?void 0:a.click()},onDragOver:O,onDragLeave:T,onDrop:V,className:`border-2 border-dashed rounded-lg p-8 text-center cursor-pointer bg-background/30 backdrop-blur-sm transition-all duration-200 ${g?"border-primary bg-primary/10 scale-[1.02]":s.image?"border-green-500/50 bg-green-50/10":"border-muted-foreground/25 hover:border-primary/50 hover:bg-primary/5"}`,children:s.image?e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"flex items-center justify-center mb-4",children:e.jsx(F,{className:"h-12 w-12 text-green-500"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-base font-medium text-green-600",children:s.image.name}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[(s.image.size/1024/1024).toFixed(2)," MB"]}),e.jsxs("button",{type:"button",onClick:a=>{a.stopPropagation(),$()},className:"inline-flex items-center gap-2 px-3 py-1 text-sm bg-red-500/10 text-red-600 rounded-md hover:bg-red-500/20 transition-colors",children:[e.jsx(R,{className:"h-4 w-4"}),"Remover"]})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(A,{className:`h-12 w-12 mx-auto mb-4 transition-colors ${g?"text-primary":"text-muted-foreground"}`}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-base font-medium",children:g?"Solte a imagem aqui":"Clique ou arraste uma imagem"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"JPEG, PNG ou WebP • Máx 2MB"})]})]})})]}),(o.image||(t==null?void 0:t.image))&&e.jsx("p",{className:"text-sm text-red-600",children:o.image||(t==null?void 0:t.image)})]}),e.jsx("div",{className:"pt-4",children:e.jsx(Z,{type:"submit",disabled:j,className:"w-full h-14 text-lg font-semibold",children:j?e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[e.jsx("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-white"}),"A submeter..."]}):e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[e.jsx(U,{className:"h-5 w-5"}),"Submeter Candidatura do Monumento"]})})})]})})]})]}),e.jsx(d.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:c?1.2:.8},className:"mt-12 text-center",children:e.jsxs("div",{className:"relative",children:[e.jsx(I,{variant:"primary",disabled:!1,glow:!0,blur:4,spread:20,proximity:80,inactiveZone:.5,movementDuration:2,borderWidth:1}),e.jsx(C,{className:"relative bg-muted/50 border-0",children:e.jsxs(D,{className:"pt-6",children:[e.jsx("h3",{className:"text-lg font-semibold mb-3",children:"O que acontece a seguir?"}),e.jsxs("div",{className:"space-y-2 text-sm text-muted-foreground",children:[e.jsx("p",{children:"• A sua candidatura será analisada pelo nosso painel de especialistas"}),e.jsx("p",{children:"• Avaliaremos a importância histórica e o impacto cultural"}),e.jsx("p",{children:"• Os monumentos aprovados serão apresentados na fase de votação pública"}),e.jsx("p",{children:"• A comunidade votará nos seus monumentos favoritos"})]})]})})]})})]})})})}function be({title:i,description:l,badge:x,errors:t,success:p,error:u}){return e.jsxs(W,{title:i,description:l,keywords:"monumento, candidatura, 7 maravilhas, submeter, competição",children:[e.jsx(G,{title:i}),e.jsx("div",{className:"min-h-screen bg-background",children:e.jsx(E,{title:i,description:l,badge:x,errors:t,success:p,error:u,showHeader:!0,className:"pt-20"})})]})}export{be 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.