1/*! For license information please see 8835.6e742b57.chunk.js.LICENSE.txt */ 2"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[8835],{5194(e,s,a){a.d(s,{A:()=>w});var t=a(5043),l=a(7819),r=a(2024),n=a(6210),i=a(5414),o=a(67),c=a(7856),d=a(5040),m=a(1199),x=a(797),h=a(614),p=a(4613),g=a(2264),u=a(1140),b=a(4697),j=a(15),f=a(8365),v=a(579);const N={package_hero:{label:"Package Hero",aspect:null,flexible:!0,rec:"1920x1080 or wider",ratio:"Flexible",minWidth:1200,guidance:"Use a wide landscape image (approx 16:9 or wider). Keep important content centered to avoid cropping on mobile."},destination_hero:{label:"Destination Hero",aspect:null,flexible:!0,rec:"1920x1080 or wider",ratio:"Flexible",minWidth:1200,guidance:"Use a wide landscape image (approx 16:9 or wider). Keep important content centered to avoid cropping on mobile."},blog_cover:{label:"Blog Cover",aspect:null,flexible:!0,rec:"1920x1080 or wider",ratio:"Flexible",minWidth:1200,guidance:"Use a wide landscape image (approx 16:9 or wider). Keep important content centered to avoid cropping on mobile."},package_gallery:{label:"Gallery Image",aspect:1.5,rec:"1200x800",ratio:"3:2",minWidth:600},testimonial:{label:"Testimonial Avatar",aspect:1,rec:"400x400",ratio:"1:1",minWidth:100},logo:{label:"Logo",aspect:null,rec:"Any",ratio:"Free"},logo_square:{label:"Logo (Square)",aspect:1,rec:"400x400",ratio:"1:1",minWidth:100},logo_header:{label:"Logo (Header/Footer)",aspect:3.2,rec:"480x150",ratio:"16:5",minWidth:180},favicon:{label:"Favicon",aspect:1,rec:"64x64",ratio:"1:1",minWidth:32},default:{label:"Image",aspect:null,rec:"Any",ratio:"Free"}};const w=e=>{let{isOpen:s,onClose:a,onImageSelect:w,currentImage:y=null,imagePreset:k="default"}=e;const[A,_]=(0,t.useState)("upload"),[C,S]=(0,t.useState)(!1),[L,U]=(0,t.useState)(""),[F,P]=(0,t.useState)(""),[z,R]=(0,t.useState)(y),[I,W]=(0,t.useState)(!1),D=(0,t.useRef)(null),{profile:M,acceptString:O,helperText:T}=(0,f.U)("image"),[B,E]=(0,t.useState)(!1),[G,Z]=(0,t.useState)(null),[$,K]=(0,t.useState)(""),[H,q]=(0,t.useState)({x:0,y:0}),[V,J]=(0,t.useState)(1),[Q,X]=(0,t.useState)(null),[Y,ee]=(0,t.useState)(""),se=N[k]||N.default,ae=(0,t.useCallback)((e,s)=>{X(s)},[]);if(!s)return null;const te=e=>{const s=new FileReader;s.onload=()=>{Z(s.result),K(e.name),E(!0),q({x:0,y:0}),J(1)},s.readAsDataURL(e)},le=async e=>{S(!0),U("");try{const s=new FormData;s.append("file",e),s.append("alt_text",e.name);const t=localStorage.getItem("funstay_admin_token"),l=await fetch("".concat((0,j.G)(),"/api/media/upload"),{method:"POST",headers:{Authorization:"Bearer ".concat(t)},body:s});if(!l.ok)throw new Error("Upload failed");const r=(await l.json()).url;R(r),w(r),setTimeout(()=>{a(),ce()},800)}catch(s){U(s.message||"Upload failed. Please try again.")}finally{S(!1)}},re=async()=>{if(Q&&G){S(!0),U("");try{const e=await async function(e,s,a){const t=new Image;t.crossOrigin="anonymous",await new Promise((s,a)=>{t.onload=s,t.onerror=a,t.src=e});const l=document.createElement("canvas");l.width=s.width,l.height=s.height,l.getContext("2d").drawImage(t,s.x,s.y,s.width,s.height,0,0,s.width,s.height);const r=e.includes(".png")||e.includes("image/png"),n=r?"image/png":"image/jpeg",i=r?".png":".jpg";return new Promise(e=>{l.toBlob(s=>{const t=(a||"cropped").replace(/\.[^.]+$/,"")+i;e(new File([s],t,{type:n}))},n,"image/jpeg"===n?.92:void 0)})}(G,Q,$);E(!1),await le(e)}catch(e){U("Cropping failed. Please try again."),S(!1)}}},ne=async()=>{E(!1);try{const e=await fetch(G),s=await e.blob(),a=new File([s],$||"image.jpg",{type:s.type});await le(a)}catch(e){U("Upload failed."),S(!1)}},ie=e=>{if(!e)return;if(!(M.allowed_mime_types||["image/jpeg","image/jpg","image/png","image/webp","image/gif"]).includes(e.type))return void U("Invalid file type. Please upload ".concat(T.split(" \xb7 ")[0]));if(e.size>M.max_size_bytes)return void U("File too large. Maximum size is ".concat(M.max_size_mb," MB"));U(""),ee("");const s=new window.Image;s.onload=()=>{URL.revokeObjectURL(s.src),se.minWidth&&s.width<se.minWidth&&ee("Image is ".concat(s.width,"px wide \u2014 smaller than recommended (").concat(se.minWidth,"px). It may appear blurry.")),se.aspect?te(e):le(e)},s.onerror=()=>{se.aspect?te(e):le(e)},s.src=URL.createObjectURL(e)},oe=e=>{e.preventDefault(),e.stopPropagation(),W("dragenter"===e.type||"dragover"===e.type)},ce=()=>{P(""),R(y),U(""),ee(""),_("upload"),E(!1),Z(null)};return B&&G?(0,v.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-900/50 backdrop-blur-sm",children:(0,v.jsxs)(u.Zp,{className:"w-full max-w-2xl bg-white rounded-2xl shadow-2xl","data-testid":"crop-modal",children:[(0,v.jsxs)("div",{className:"flex items-center justify-between p-5 border-b border-slate-200",children:[(0,v.jsxs)("h3",{className:"text-lg font-bold text-slate-800 flex items-center gap-2",children:[(0,v.jsx)(i.A,{className:"w-5 h-5 text-rose-500"}),"Crop Image",(0,v.jsxs)("span",{className:"text-sm font-normal text-slate-400 ml-2",children:["(",se.ratio," \xb7 Rec: ",se.rec,")"]})]}),(0,v.jsx)("button",{onClick:()=>{E(!1),Z(null)},className:"w-8 h-8 rounded-full bg-slate-100 hover:bg-slate-200 flex items-center justify-center",children:(0,v.jsx)(h.A,{className:"w-5 h-5 text-slate-600"})})]}),(0,v.jsx)("div",{className:"relative w-full",style:{height:380},children:(0,v.jsx)(b.Ay,{image:G,crop:H,zoom:V,aspect:se.aspect,onCropChange:q,onZoomChange:J,onCropComplete:ae})}),(0,v.jsxs)("div",{className:"px-5 py-3 flex items-center gap-3",children:[(0,v.jsx)("span",{className:"text-xs text-slate-500",children:"Zoom"}),(0,v.jsx)("input",{type:"range",min:1,max:3,step:.05,value:V,onChange:e=>J(Number(e.target.value)),className:"flex-1 accent-rose-500","data-testid":"crop-zoom-slider"})]}),L&&(0,v.jsxs)("div",{className:"mx-5 mb-3 p-2 bg-red-50 border border-red-200 rounded-lg flex items-center gap-2 text-red-700",children:[(0,v.jsx)(l.A,{className:"w-4 h-4 flex-shrink-0"}),(0,v.jsx)("p",{className:"text-xs",children:L})]}),Y&&!L&&(0,v.jsxs)("div",{className:"mx-5 mb-3 p-2 bg-amber-50 border border-amber-200 rounded-lg flex items-center gap-2 text-amber-700","data-testid":"size-warning",children:[(0,v.jsx)(l.A,{className:"w-4 h-4 flex-shrink-0"}),(0,v.jsx)("p",{className:"text-xs",children:Y})]}),(0,v.jsxs)("div",{className:"p-5 border-t border-slate-200 flex justify-between",children:[(0,v.jsxs)(p.$,{variant:"ghost",onClick:ne,disabled:C,className:"text-slate-500 hover:text-slate-700","data-testid":"crop-skip-btn",children:[(0,v.jsx)(m.A,{className:"w-4 h-4 mr-1"})," Skip Crop"]}),(0,v.jsxs)(p.$,{onClick:re,disabled:C,className:"bg-gradient-to-r from-rose-500 to-orange-500 text-white rounded-full px-6","data-testid":"crop-confirm-btn",children:[C?(0,v.jsx)(r.A,{className:"w-4 h-4 mr-2 animate-spin"}):(0,v.jsx)(n.A,{className:"w-4 h-4 mr-2"}),C?"Uploading...":"Crop & Upload"]})]})]})}):(0,v.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-900/50 backdrop-blur-sm",children:(0,v.jsxs)(u.Zp,{className:"w-full max-w-2xl bg-white rounded-2xl shadow-2xl","data-testid":"image-upload-modal",children:[(0,v.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-slate-200",children:[(0,v.jsxs)("h3",{className:"text-xl font-bold text-slate-800 flex items-center gap-2",children:[(0,v.jsx)(o.A,{className:"w-5 h-5 text-rose-500"}),"Upload Image"]}),(0,v.jsx)("button",{onClick:()=>{a(),ce()},className:"w-8 h-8 rounded-full bg-slate-100 hover:bg-slate-200 flex items-center justify-center transition-colors",children:(0,v.jsx)(h.A,{className:"w-5 h-5 text-slate-600"})})]}),se.aspect&&(0,v.jsxs)("div",{className:"mx-6 mt-4 p-3 bg-blue-50 border border-blue-200 rounded-xl flex items-start gap-2","data-testid":"size-guidance",children:[(0,v.jsx)(c.A,{className:"w-4 h-4 text-blue-500 mt-0.5 flex-shrink-0"}),(0,v.jsxs)("div",{className:"text-xs text-blue-700",children:[(0,v.jsxs)("span",{className:"font-semibold",children:["Aspect Ratio: ",se.ratio]})," \u2014 Recommended: ",se.rec,". Image will be cropped after selection."]})]}),!se.aspect&&se.flexible&&(0,v.jsxs)("div",{className:"mx-6 mt-4 p-3 bg-amber-50 border border-amber-200 rounded-xl flex items-start gap-2","data-testid":"size-guidance",children:[(0,v.jsx)(c.A,{className:"w-4 h-4 text-amber-600 mt-0.5 flex-shrink-0"}),(0,v.jsxs)("div",{className:"text-xs text-amber-800",children:[(0,v.jsx)("span",{className:"font-semibold",children:"Flexible crop"})," \u2014 ",se.guidance]})]}),(0,v.jsx)("div",{className:"border-b border-slate-200 mt-2",children:(0,v.jsxs)("div",{className:"flex",children:[(0,v.jsxs)("button",{onClick:()=>_("upload"),className:"flex-1 py-3 px-4 font-semibold transition-colors ".concat("upload"===A?"text-rose-500 border-b-2 border-rose-500 bg-rose-50":"text-slate-600 hover:bg-slate-50"),children:[(0,v.jsx)(x.A,{className:"w-4 h-4 inline mr-2"}),"Upload File"]}),(0,v.jsxs)("button",{onClick:()=>_("url"),className:"flex-1 py-3 px-4 font-semibold transition-colors ".concat("url"===A?"text-rose-500 border-b-2 border-rose-500 bg-rose-50":"text-slate-600 hover:bg-slate-50"),children:[(0,v.jsx)(d.A,{className:"w-4 h-4 inline mr-2"}),"Image URL"]})]})}),(0,v.jsxs)("div",{className:"p-6",children:[L&&(0,v.jsxs)("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-lg flex items-center gap-2 text-red-700",children:[(0,v.jsx)(l.A,{className:"w-5 h-5 flex-shrink-0"}),(0,v.jsx)("p",{className:"text-sm",children:L})]}),"upload"===A?(0,v.jsx)("div",{onDragEnter:oe,onDragLeave:oe,onDragOver:oe,onDrop:e=>{var s;e.preventDefault(),e.stopPropagation(),W(!1),null!==(s=e.dataTransfer.files)&&void 0!==s&&s[0]&&ie(e.dataTransfer.files[0])},className:"border-2 border-dashed rounded-xl p-8 text-center transition-all ".concat(I?"border-rose-500 bg-rose-50":"border-slate-300 hover:border-rose-400 hover:bg-slate-50"),children:(0,v.jsxs)("div",{className:"flex flex-col items-center",children:[(0,v.jsx)("div",{className:"w-16 h-16 rounded-full bg-rose-100 flex items-center justify-center mb-4",children:(0,v.jsx)(x.A,{className:"w-8 h-8 text-rose-500"})}),(0,v.jsx)("p",{className:"text-lg font-semibold text-slate-800 mb-2",children:"Drop your image here"}),(0,v.jsx)("p",{className:"text-sm text-slate-500 mb-4",children:"or click to browse"}),(0,v.jsx)("input",{ref:D,type:"file",accept:O||"image/*",onChange:e=>{var s;return(null===(s=e.target.files)||void 0===s?void 0:s[0])&&ie(e.target.files[0])},className:"hidden"}),(0,v.jsxs)(p.$,{type:"button",onClick:()=>{var e;return null===(e=D.current)||void 0===e?void 0:e.click()},disabled:C,className:"bg-gradient-to-r from-rose-500 to-orange-500 text-white rounded-full px-6",children:[C?(0,v.jsx)(r.A,{className:"w-4 h-4 mr-2 animate-spin"}):null,"Choose File"]}),(0,v.jsx)("p",{className:"text-xs text-slate-400 mt-3","data-testid":"upload-l
2imit-helper",children:T})]})}):(0,v.jsxs)("div",{className:"space-y-4",children:[(0,v.jsxs)("div",{children:[(0,v.jsx)("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Image URL"}),(0,v.jsx)(g.p,{type:"url",value:F,onChange:e=>P(e.target.value),placeholder:"https://example.com/image.jpg",className:"rounded-lg"}),(0,v.jsx)("p",{className:"text-xs text-slate-500 mt-2",children:"Paste a link to an image from any website"})]}),(0,v.jsx)(p.$,{onClick:async()=>{if(F.trim())if(F.startsWith("http://")||F.startsWith("https://")){S(!0),U("");try{const e=localStorage.getItem("funstay_admin_token"),s=new FormData;s.append("url",F),s.append("alt_text","External image");const t=await fetch("".concat((0,j.G)(),"/api/media/url"),{method:"POST",headers:{Authorization:"Bearer ".concat(e)},body:s});if(!t.ok)throw new Error("URL validation failed");const l=await t.json();R(l.url),w(l.url),setTimeout(()=>{a(),ce()},800)}catch(e){U(e.message||"Failed to validate URL.")}finally{S(!1)}}else U("Please enter a valid URL");else U("Please enter an image URL")},disabled:C||!F.trim(),className:"w-full bg-gradient-to-r from-rose-500 to-orange-500 text-white rounded-full py-6",children:C?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(r.A,{className:"w-5 h-5 mr-2 animate-spin"}),"Validating..."]}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(n.A,{className:"w-5 h-5 mr-2"}),"Use This URL"]})})]}),z&&(0,v.jsxs)("div",{className:"mt-6",children:[(0,v.jsx)("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Preview"}),(0,v.jsxs)("div",{className:"relative rounded-xl overflow-hidden border-2 border-slate-200",children:[(0,v.jsx)("img",{src:z,alt:"Preview",className:"w-full h-64 object-cover",onError:()=>U("Failed to load image")}),C&&(0,v.jsx)("div",{className:"absolute inset-0 bg-slate-900/50 flex items-center justify-center",children:(0,v.jsx)(r.A,{className:"w-8 h-8 text-white animate-spin"})})]})]})]}),(0,v.jsx)("div",{className:"p-6 border-t border-slate-200 flex justify-end gap-3",children:(0,v.jsx)(p.$,{variant:"outline",onClick:()=>{a(),ce()},disabled:C,className:"rounded-full",children:"Cancel"})})]})})}},8365(e,s,a){a.d(s,{U:()=>i});var t=a(5043),l=a(15),r=a(1876);const n={image:{max_size_bytes:5242880,max_size_mb:5,allowed_extensions:[".jpg",".jpeg",".png",".webp",".gif"],allowed_mime_types:["image/jpeg","image/png","image/webp","image/gif"]},media:{max_size_bytes:10485760,max_size_mb:10,allowed_extensions:[".jpg",".jpeg",".png",".gif",".webp",".svg",".pdf",".doc",".docx"]}},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"image";const[s,a]=(0,t.useState)(n);(0,t.useEffect)(()=>{let e=!0;return(async()=>{try{const s=await(0,r.yI)("".concat((0,l.G)()||"","/api/media/limits"));e&&s&&s.image&&s.media&&a(s)}catch(s){}})(),()=>{e=!1}},[]);const i=s[e]||n[e]||n.image,o=(i.allowed_extensions||[]).join(","),c="".concat(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(e=>e.replace(/^\./,"").toUpperCase()).filter((e,s,a)=>a.indexOf(e)===s).join(", ")}(i.allowed_extensions)," \xb7 Max ").concat(i.max_size_mb," MB");return{limits:s,profile:i,acceptString:o,helperText:c}}},8393(e,s,a){a.d(s,{A:()=>t});const t=(0,a(7784).A)("moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]])},8835(e,s,a){a.r(s),a.d(s,{default:()=>v});var t=a(9379),l=a(5043),r=a(2024),n=a(6210),i=a(7856),o=a(67),c=a(8393);const d=(0,a(7784).A)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);var m=a(7819),x=a(797),h=a(1140),p=a(4613),g=a(2264),u=a(8406),b=a(4505),j=a(5194),f=a(579);const v=()=>{const[e,s]=(0,l.useState)({placements:[],favicon:""}),[a,v]=(0,l.useState)(!0),[N,w]=(0,l.useState)(!1),[y,k]=(0,l.useState)(!1),[A,_]=(0,l.useState)(""),[C,S]=(0,l.useState)(null),[L,U]=(0,l.useState)(!1),[F,P]=(0,l.useState)(null),[z,R]=(0,l.useState)(!1),I=[{id:"public_header",name:"Public Header",location:"Website header",currentLogo:"",background:"light",recommended_width:180,recommended_height:48},{id:"public_footer",name:"Public Footer",location:"Website footer",currentLogo:"",background:"dark",recommended_width:180,recommended_height:56}];(0,l.useEffect)(()=>{W()},[]);const W=async()=>{try{var e,a;v(!0),S(null);const l=await b.ur.getSettings(),r=(null===(e=l.logos)||void 0===e?void 0:e.placements)||[],n=I.map(e=>{const s=r.find(s=>
2s.id===e.id);return(0,t.A)((0,t.A)({},e),{},{currentLogo:(null===s||void 0===s?void 0:s.current_logo)||(null===s||void 0===s?void 0:s.currentLogo)||e.currentLogo||""})});s({placements:n,favicon:(null===(a=l.logos)||void 0===a?void 0:a.favicon)||""})}catch(l){console.error("Error fetching logos:",l),s({placements:I,favicon:""})}finally{v(!1)}};return a?(0,f.jsx)(u.A,{children:(0,f.jsxs)("div",{className:"flex items-center justify-center h-64",children:[(0,f.jsx)(r.A,{className:"w-8 h-8 animate-spin text-rose-500"}),(0,f.jsx)("span",{className:"ml-2 text-slate-600",children:"Loading logo settings..."})]})}):(0,f.jsxs)(u.A,{children:[(0,f.jsxs)("div",{className:"space-y-6",children:[(0,f.jsxs)("div",{className:"flex flex-col lg:flex-row lg:items-center lg:justify-between gap-4",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)("h1",{className:"text-2xl font-bold text-slate-800",children:"Logo Management"}),(0,f.jsx)("p",{className:"text-slate-500 mt-1",children:"Configure logos for all placements across the website"})]}),(0,f.jsxs)("div",{className:"flex items-center gap-3",children:[A&&(0,f.jsxs)("span",{className:"text-green-600 text-sm flex items-center",children:[(0,f.jsx)(n.A,{className:"w-4 h-4 mr-1"}),A]}),(0,f.jsxs)(p.$,{onClick:async()=>{try{w(!0);const s={placements:e.placements.map(e=>({id:e.id,name:e.name,location:e.location,current_logo:e.currentLogo||null,recommended_width:e.recommended_width||180,recommended_height:e.recommended_height||48})),favicon:e.favicon||null};await b.ur.updateLogos(s),k(!1),_("Logo settings saved successfully!"),setTimeout(()=>_(""),3e3)}catch(s){console.error("Error saving logos:",s),alert("Failed to save logo settings: "+s.message)}finally{w(!1)}},disabled:!y||N,className:"rounded-xl ".concat(y?"bg-gradient-to-r from-rose-500 to-orange-500":"bg-slate-300"),children:[N?(0,f.jsx)(r.A,{className:"w-4 h-4 mr-2 animate-spin"}):null,N?"Saving...":"Save Changes"]})]})]}),(0,f.jsx)(h.Zp,{className:"border-0 shadow-lg rounded-2xl bg-gradient-to-r from-blue-50 to-indigo-50",children:(0,f.jsx)(h.Wu,{className:"p-6",children:(0,f.jsxs)("div",{className:"flex items-start gap-4",children:[(0,f.jsx)("div",{className:"w-10 h-10 bg-blue-500 rounded-xl flex items-center justify-center flex-shrink-0",children:(0,f.jsx)(i.A,{className:"w-5 h-5 text-white"})}),(0,f.jsxs)("div",{children:[(0,f.jsx)("h3",{className:"font-semibold text-slate-800 mb-2",children:"Logo Guidelines"}),(0,f.jsxs)("ul",{className:"text-sm text-slate-600 space-y-1",children:[(0,f.jsxs)("li",{children:["\u2022 ",(0,f.jsx)("strong",{children:"Supported formats:"})," PNG (recommended for transparency), SVG, JPG, WebP"]}),(0,f.jsxs)("li",{children:["\u2022 ",(0,f.jsx)("strong",{children:"Light backgrounds:"})," Use the colored/dark logo version"]}),(0,f.jsxs)("li",{children:["\u2022 ",(0,f.jsx)("strong",{children:"Dark backgrounds:"})," Use the white/light logo version"]}),(0,f.jsxs)("li",{children:["\u2022 ",(0,f.jsx)("strong",{children:"Partner logos:"})," Keep consistent sizing (recommended: 120x60px)"]}),(0,f.jsxs)("li",{children:["\u2022 ",(0,f.jsx)("strong",{children:"File size:"})," Keep under 500KB for optimal loading"]})]})]})]})})}),(0,f.jsx)("div",{className:"grid lg:grid-cols-2 gap-6",children:e.placements.map(e=>{return(0,f.jsxs)(h.Zp,{className:"border-0 shadow-lg rounded-2xl overflow-hidden",children:[(0,f.jsx)(h.aR,{className:"bg-slate-50 border-b border-slate-100 pb-4",children:(0,f.jsxs)("div",{className:"flex items-center justify-between",children:[(0,f.jsxs)("div",{className:"flex items-center gap-3",children:[(0,f.jsx)("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center bg-rose-100 text-rose-600",children:(0,f.jsx)(o.A,{className:"w-5 h-5"})}),(0,f.jsxs)("div",{children:[(0,f.jsx)(h.ZB,{className:"text-lg",children:e.name}),(0,f.jsx)("p",{className:"text-sm text-slate-500",children:e.location})]})]}),(0,f.jsx)("div",{className:"flex items-center gap-2",children:"dark"===e.background?(0,f.jsx)(c.A,{className:"w-4 h-4 text-slate-400"}):(0,f.jsx)(d,{className:"w-4 h-4 text-amber-400"})})]})}),(0,f.jsxs)(h.Wu,{className:"p-6 space-y-4",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Preview"}),(0,f.jsx)("div",{className:"rounded-xl p-6 flex items-center justify-center min-h-[100px] ".concat((a=e.background,"dark"===a?"bg-slate-800":"bg-white border border-slate-200")),children:e.currentLogo?(0,f.jsx)("img",{src:e.currentLogo,alt:e.name,className:"max-h-16 w-auto object-contain",style:{maxWidth:"200px"}}):(0,f.jsxs)("div",{className:"text-slate-400 text-sm flex items-center gap-2",children:[(0,f.jsx)(m.A,{className:"w-4 h-4"}),"No logo uploaded"]})})]}),(0,f.jsxs)("div",{className:"bg-amber-50 rounded-xl p-4",children:[(0,f.jsxs)("div",{className:"flex items-center gap-2 text-amber-700 text-sm font-medium mb-1",children:[(0,f.jsx)(i.A,{className:"w-4 h-4"}),"Recommended Size"]}),(0,f.jsxs)("p",{className:"text-amber-600 text-sm",children:[(0,f.jsxs)("strong",{children:[e.recommended_width||180," x ",e.recommended_height||48,"px"]}),(0,f.jsx)("span",{className:"text-amber-500 ml-2",children:"(PNG with transparency)"})]})]}),(0,f.jsxs)("div",{className:"space-y-3",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Logo URL"}),(0,f.jsx)(g.p,{placeholder:"https://example.com/logo.png",value:e.currentLogo||"",onChange:a=>{return l=e.id,r=a.target.value,s(e=>(0,t.A)((0,t.A)({},e),{},{placements:e.placements.map(e=>e.id===l?(0,t.A)((0,t.A)({},e),{},{currentLogo:r}):e)})),void k(!0);var l,r},className:"rounded-xl"})]}),(0,f.jsx)("div",{className:"text-center text-slate-400 text-sm",children:"or"}),(0,f.jsxs)("div",{children:[(0,f.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Upload File"}),(0,f.jsxs)("button",{type:"button",className:"flex items-center justify-center gap-2 p-4 border-2 border-dashed border-slate-300 rounded-xl cursor-pointer hover:border-rose-400 hover:bg-rose-50 transition-colors w-full",onClick:()=>{P(e.id),U(!0)},children:[(0,f.jsx)(x.A,{className:"w-5 h-5 text-slate-400"}),(0,f.jsx)("span",{className:"text-sm text-slate-500",children:"Click to upload or drag and drop"})]})]})]})]})]},e.id);var a})}),(0,f.jsxs)(h.Zp,{className:"border-0 shadow-lg rounded-2xl",children:[(0,f.jsx)(h.aR,{className:"border-b border-slate-100",children:(0,f.jsxs)("div",{className:"flex items-center gap-3",children:[(0,f.jsx)("div",{className:"w-10 h-10 bg-green-100 rounded-xl flex items-center justify-center",children:(0,f.jsx)(o.A,{className:"w-5 h-5 text-green-600"})}),(0,f.jsxs)("div",{children:[(0,f.jsx)(h.ZB,{children:"Favicon"}),(0,f.jsx)("p",{className:"text-sm text-slate-500",children:"Browser tab icon and bookmark icon"})]})]})}),(0,f.jsx)(h.Wu,{className:"p-6",children:(0,f.jsxs)("div",{className:"grid md:grid-cols-2 gap-6",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Current Favicon"}),(0,f.jsxs)("div",{className:"bg-slate-100 rounded-xl p-6 flex items-center gap-4",children:[(0,f.jsx)("div",{className:"w-16 h-16 bg-white rounded-lg border border-slate-200 flex items-center justify-center",children:e.favicon?(0,f.jsx)("img",{src:e.favicon,alt:"Favicon",className:"w-8 h-8 object-contain"}):(0,f.jsx)("span",{className:"text-slate-300 text-xs",children:"No icon"})}),(0,f.jsxs)("div",{className:"text-sm text-slate-600",children:[(0,f.jsxs)("p",{children:[(0,f.jsx)("strong",{children:"32 \xd7 32px"})," - Standard size"]}),(0,f.jsx)("p",{className:"text-slate-400",children:"PNG or ICO format"})]})]})]}),(0,f.jsxs)("div",{children:[(0,f.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Upload New Favicon"}),(0,f.jsxs)("button",{type:"button",className:"flex items-center justify-center gap-2 p-6 border-2 border-dashed border-slate-300 rounded-xl cursor-pointer hover:border-green-400 hover:bg-green-50 transition-colors w-full h-full",onClick:()=>R(!0),children:[(0,f.jsx)(x.A,{className:"w-5 h-5 text-slate-400"}),(0,f.jsx)("span",{className:"text-sm text-slate-500",children:"Upload favicon (32x32px recommended)"})]})]})]})})]})]}),(0,f.jsx)(j.A,{isOpen:L,onClose:()=>{U(!1),P(null)},onImageSelect:e=>{F&&(async(e,a,l)=>{if(l)return s(s=>(0,t.A)((0,t.A)({},s),{},{placements:s.placements.map(s=>s.id===e?(0,t.A)((0,t.A)({},s),{},{currentLogo:l}):s)})),void k(!0);if(a)try{const l=await b.ur.uploadMedia(a);s(s=>(0,t.A)((0,t.A)({},s),{},{placements:s.placements.map(s=>s.id===e?(0,t.A)((0,t.A)({},s),{},{currentLogo:l.url}):s)})),k(!0)}catch(r){const l=new FileReader;l.onloadend=()=>{s(s=>(0,t.A)((0,t.A)({},s),{},{placements:s.placements.map(s=>s.id===e?(0,t.A)((0,t.A)({},s),{},{currentLogo:l.result}):s)})),k(!0)}
2,l.readAsDataURL(a)}})(F,null,e)},imagePreset:"logo_header"}),(0,f.jsx)(j.A,{isOpen:z,onClose:()=>R(!1),onImageSelect:e=>{s(s=>(0,t.A)((0,t.A)({},s),{},{favicon:e})),k(!0)},imagePreset:"favicon"})]})}}}]); 3//# sourceMappingURL=8835.6e742b57.chunk.js.map
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.