PageSourceSearch

https://iarainteriors.com/_next/static/chunks/5806-6f20271c3739607c.js

js iarainteriors.com collected 2026-10-04 01:55:34 UTC 16,550 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5806],{1201:function(t,e,r){r.d(e,{I:function(){return i}});let i=[{id:"static_1",src:"/assets/gallery/residencial/1.jpg",category:"residential",title:"Sculptural Detailing",titleEs:"Detalle Escult\xf3rico",description:"Curated objects and textured ceramic surfaces dialogue in soft natural light.",descriptionEs:"Objetos curados y superficies cer\xe1micas texturizadas dialogando en una luz natural suave."},{id:"static_2",src:"/assets/gallery/residencial/2.jpg",category:"residential",title:"Sanctuary Living Room",titleEs:"Estancia Santuario",description:"Espresso-toned furnishings and warm limestone elements create quiet luxury.",descriptionEs:"Mobiliario en tonos espresso y elementos de piedra caliza c\xe1lida crean un lujo silencioso."},{id:"static_3",src:"/assets/gallery/residencial/3.jpg",category:"residential",title:"Noble Oak Materiality",titleEs:"Materialidad en Roble Noble",description:"A close study of linear wood patterns, raw linen, and warm mineral textures.",descriptionEs:"Un estudio cercano de patrones lineales de madera, lino crudo y texturas minerales c\xe1lidas."},{id:"static_4",src:"/assets/gallery/residencial/4.jpg",category:"residential",title:"Monolithic Kitchen Island",titleEs:"Isla de Cocina Monol\xedtica",description:"Raw stone surfaces anchoring the culinary space with geometric precision.",descriptionEs:"Superficies de piedra r\xfastica que anclan el espacio culinario con precisi\xf3n geom\xe9trica."},{id:"static_5",src:"/assets/gallery/residencial/5.jpg",category:"residential",title:"Poetic Light Play",titleEs:"Juego de Luz Po\xe9tico",description:"Subtle rays highlighting rich wall textures and creating cinematic shadows.",descriptionEs:"Rayos sutiles que resaltan ricas texturas de pared y crean sombras cinematogr\xe1ficas."},{id:"static_6",src:"/assets/gallery/comercial/6.jpg",category:"commercial",title:"Curated Workspace Lounge",titleEs:"Lounge de Trabajo Curado",description:"Sophisticated executive environments defined by tactile textures and deep comfort.",descriptionEs:"Ambientes ejecutivos sofisticados definidos por texturas t\xe1ctiles y profundo confort."},{id:"static_7",src:"/assets/gallery/residencial/7.jpg",category:"residential",title:"Atmospheric Dining Room",titleEs:"Comedor Atmosf\xe9rico",description:"Shadow-rich dining space
1s framed by warm timber and mineral textures.",descriptionEs:"Espacios de comedor ricos en sombras enmarcados por madera c\xe1lida y texturas minerales."},{id:"static_8",src:"/assets/gallery/residencial/8.jpg",category:"residential",title:"Travertine & Linen Harmony",titleEs:"Armon\xeda de Travertino y Lino",description:"A micro-view of organic cavities in natural stone juxtaposed with pure linen weaving.",descriptionEs:"Una micro-vista de cavidades org\xe1nicas en piedra natural yuxtapuestas con tejido de lino puro."},{id:"static_9",src:"/assets/gallery/residencial/9.jpg",category:"residential",title:"Sophisticated Reception Lounge",titleEs:"Lounge de Recepci\xf3n Sofisticado",description:"Quiet luxury hospitality space welcoming visitors with quiet, raw beauty.",descriptionEs:"Espacio de hospitalidad de lujo silencioso que recibe a los visitantes con belleza cruda y silenciosa."},{id:"static_10",src:"/assets/gallery/residencial/10.jpg",category:"residential",title:"Espresso Library Nook",titleEs:"Rinc\xf3n de Biblioteca Espresso",description:"A dark, moody reading retreat styled with rich textures and warm highlights.",descriptionEs:"Un refugio de lectura oscuro y melanc\xf3lico decorado con ricas texturas y luces c\xe1lidas."}]},5806:function(t,e,r){r.d(e,{Iz:function(){return _},vX:function(){return S},Pz:function(){return P},se:function(){return D},J$:function(){return j},yt:function(){return J},YI:function(){return x},KU:function(){return E},QI:function(){return v},Fn:function(){return A},L8:function(){return I},f9:function(){return w},Pi:function(){return b}});var i=r(3977),a=r(3059),o=r(1259),s=r(9828),n=r(6650);let c=(0,i.C6)().length?(0,i.C6)()[0]:(0,i.ZF)({apiKey:"AIzaSyARn4P45djm2ABsB57ff8kvVwU33iL3aEg",authDomain:"iarainteriors.firebaseapp.com",projectId:"iarainteriors",storageBucket:"iarainteriors.firebasestorage.app",messagingSenderId:"268086621436",appId:"1:268086621436:web:45a8929688f04d49605379"});(0,o.v0)(c);let l=(0,s.ad)(c),d=(0,n.cF)(c);(0,a.IH)(c);var g=r(1201);async function u(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.maxDimension||2048,i=void 0!==e.quality?e.quality:.85;return new Promise((e,a)=>{let o=new FileReader;o.onload=a=>{var o;let s=new Image;s.onload=()=>{let{width:a,height:o}=s;(a>r||o>r)&&(a>=o?(o=Math.round(o*r/a),a=r):(a=Math.round(a*r/o),o=r));let n=document.createElement("canvas");n.width=a,n.height=o;let c=n.getContext("2d");if(!c){e(t);return}c.imageSmoothingEnabled=!0,c.imageSmoothingQuality="high",c.drawImage(s,0,0,a,o),n.toBlob(r=>{if(!r){e(t);return}let i=t.name.replace(/\.[^/.]+$/,"");e(new File([r],"".concat(i,".webp"),{type:"image/webp",lastModified:Date.now()}))},"image/webp",i)},s.onerror=r=>{console.error("Error loading image for optimization:",r),e(t)},(null===(o=a.target)||void 0===o?void 0:o.result)?s.src=a.target.result:e(t)},o.onerror=r=>{console.error("FileReader error:",r),e(t)},o.readAsDataURL(t)})}let p="gallery_images",f="hidden_static_images",h="gallery_projects";function y(t,e){if(t&&"string"==typeof t&&t.trim().length>0)return t.trim();if(!e||"string"!=typeof e)return null;try{if(e.includes("firebasestorage.googleapis.com")){let t=e.match(/\/o\/([^?#]+)/);if(t&&t[1])return decodeURIComponent(t[1])}if(e.includes("storage.googleapis.com")){let t=new URL(e).pathname.split("/").filter(Boolean);if(t.length>=2)return t.slice(1).join("/")}}catch(t){console.warn("Error parsing storage path from src URL:",t)}return null}async function m(t,e){if(!t)return!1;try{for(let e of(await (0,s.PL)((0,s.hJ)(l,p))).docs){let r=e.data();if(y(r.storagePath,r.src)===t)return!0}for(let r of(await (0,s.PL)((0,s.hJ)(l,h))).docs)if(!e||r.id!==e){for(let e of r.data().images||[])if(y(e.storagePath,e.src)===t)return!0}}catch(t){return console.warn("Error checking if storagePath is in use:",t),!0}return!1}async function w(t,e,r,i){let a=t;try{a=await u(t,{maxDimension:2048,quality:.85})}catch(t){console.warn("Image optimization warning, proceeding with original:",t)}let o=a.name.replace(/[^a-zA-Z0-9.-]/g,"_"),c=Date.now(),g="gallery/".concat(c,"_").concat(o),f=(0,n.iH)(d,g),h=(0,n.B0)(f,a);return new Promise((i,a)=>{h.on("state_changed",t=>{let e=Math.round(t.bytesTransferred/t.totalBytes*100);r&&r(e)},t=>{console.error("Error uploading image to Firebase Storage:",t),a(t)},async()=>{try{let r=await (0,n.Jt)(h.snapshot.ref),a=y(g,r)||"",o={src:r,storagePath:a,category:e.category||"residential",title:e.title||t.name,titleEs:e.titleEs||e.title||t.name,description:e.description||"",descriptionEs:e.descriptionEs||e.description||"",createdAt:(0,s.Bt)()},c=await (0,s.ET)((0,s.hJ)(l,p),o);i({id:c.id,src:r,storagePath:a,category:o.category,title:o.title,titleEs:o.titleEs,description:o.description,descriptionEs:o.descriptionEs,createdAt:Date.now()})}catch(t){console.error("Error saving document to Firestore:",t),a(t)}})})}function E(t){try{let e=(0,s.IO)((0,s.hJ)(l,p)),r=(0,s.hJ)(l,f),i=[],a=new Set,o=new Set,n=()=>{let e=g.I.filter(t=>t&&t.src&&"string"==typeof t.src&&""!==t.src.trim()&&!t.src.startsWith("/assets/gallery/")&&!a.has(String(t.id))&&!o.has(t.src)).map(t=>({...t,isStatic:!0})),r=[...i.filter(t=>t&&t.src&&"string"==typeof t.src&&""!==t.src.trim()&&"undefined"!==t.src&&!t.src.startsWith("/assets/gallery/")),...e];r.sort((t,e)=>{let r=void 0!==t.sortOrder?t.sortOrder:Number.MAX_SAFE_INTEGER,i=void 0!==e.sortOrder?e.sortOrder:Number.MAX_SAFE_INTEGER;return r!==i?r-i:(e.createdAt||0)-(t.createdAt||0)}),t(r)},c=(0,s.cf)(r,t=>{a=new Set,o=new Set,t.forEach(t=>{a.add(String(t.id));let e=t.data();void 0!==e.staticId&&null!==e.staticId&&a.add(String(e.staticId)),e.src&&o.add(e.src)}),n()}),d=(0,s.cf)(e,t=>{i=[],t.forEach(t=>{let e=t.data();e.src&&"string"==typeof e.src&&""!==e.src.trim()&&"undefined"!==e.src&&!e.src.startsWith("/assets/gallery/")&&i.push({id:t.id,src:e.src,category:e.category||"residential",title:e.title||"",titleEs:e.titleEs||"",description:e.description||"",descriptionEs:e.descriptionEs||"",storagePath:e.storagePath||"",sortOrder:e.sortOrder,createdAt:e.createdAt instanceof s.EK?e.createdAt.toMillis():Date.now()})}),n()},t=>{console.error("Firestore gallery subscription error:",t),n()});return()=>{c(),d()}}catch(e){return console.error("Subscription setup failed:",e),t([]),()=>{}}}async function A(t,e,r){try{if(null==t)throw Error("Se requiere ID de la imagen.");let r=String(t),i=(0,s.JU)(l,p,r);if((await (0,s.QT)(i)).exists())return await (0,s.r7)(i,e),!0;{let t=g.I.find(t=>String(t.id)===r||t.src===r);if(t||e.src){let i=t?t.src:e.src||"",a={src:i,category:e.category||(t?t.category:"residential"),title:void 0!==e.title?e.title:t?t.title:"Foto de Galer\xeda",titleEs:void 0!==e.titleEs?e.titleEs:t?t.titleEs:"Foto de Galer\xeda",description:void 0!==e.description?e.description:t?t.description:"",descriptionEs:void 0!==e.descriptionEs?e.descriptionEs:t?t.descriptionEs:"",createdAt:(0,s.Bt)()};return await (0,s.ET)((0,s.hJ)(l,p),a),await (0,s.pl)((0,s.JU)(l,f,r),{staticId:r,src:i,hiddenAt:Date.now()}),!0}throw Error("Imagen no encontrada.")}}catch(t){throw console.error("Error updating image:",t),t}}async function S(t,e,r){try{if(null==t)throw Error("Se requiere ID de la imagen.");let r=y(e)||"",i="",a=String(t),o=(0,s.JU)(l,p,a),c=await (0,s.QT)(o);if(c.exists()){let t=c.data();r||(r=y(t.storagePath,t.src)||""),t.src&&(i=t.src),await (0,s.oe)(o)}else{let t=g.I.find(t=>String(t.id)===a||t.src===a);
1t&&(i=t.src,r=y(void 0,t.src)||""),await (0,s.pl)((0,s.JU)(l,f,a),{staticId:a,src:i,deletedAt:Date.now()})}try{for(let t of(await (0,s.PL)((0,s.hJ)(l,h))).docs){let e=t.data().images||[],o=!1,n=e.filter(t=>{let e=void 0!==t.id&&String(t.id)===a,s=y(t.storagePath,t.src),n=r&&s===r,c=i&&t.src===i;return!e&&!n&&!c||(o=!0,!1)});o&&await (0,s.r7)((0,s.JU)(l,h,t.id),{images:n})}}catch(t){console.error("Error updating projects on image delete:",t)}if(r&&!await m(r))try{let t=(0,n.iH)(d,r);await (0,n.oq)(t)}catch(t){console.warn("Storage deletion warning:",t)}return!0}catch(t){throw console.error("Error deleting image:",t),t}}async function b(t,e,r,i){let a=[],o=t?t.length:0;if(o>0)for(let e=0;e<o;e++){let i=t[e],s=i;try{s=await u(i,{maxDimension:2048,quality:.85})}catch(t){console.warn("Image optimization warning, proceeding with original:",t)}let c=s.name.replace(/[^a-zA-Z0-9.-]/g,"_"),l=Date.now(),g="projects/".concat(l,"_").concat(e,"_").concat(c),p=(0,n.iH)(d,g),f=(0,n.B0)(p,s);await new Promise((t,s)=>{f.on("state_changed",t=>{let i=t.bytesTransferred/t.totalBytes*100,a=Math.round((e+i/100)/o*100);r&&r(a)},t=>{console.error("Error uploading project image to Storage:",t),s(t)},async()=>{try{let r=await (0,n.Jt)(f.snapshot.ref);a.push({id:"".concat(l,"_").concat(e),src:r,storagePath:g,title:i.name}),t()}catch(t){s(t)}})})}let c=[...e.existingImages||[],...a];if(0===c.length)throw Error("No hay fotos seleccionadas ni archivos subidos para el proyecto.");let g=c.map(t=>({...t,storagePath:y(t.storagePath,t.src)||""})),p={title:e.title,titleEs:e.titleEs||e.title,description:e.description||"",descriptionEs:e.descriptionEs||e.description||"",category:e.category||"residential",images:g,createdAt:(0,s.Bt)()};return{id:(await (0,s.ET)((0,s.hJ)(l,h),p)).id,title:p.title,titleEs:p.titleEs,description:p.description,descriptionEs:p.descriptionEs,category:p.category,images:g,createdAt:Date.now()}}function v(t){try{let e=(0,s.IO)((0,s.hJ)(l,h));return(0,s.cf)(e,e=>{let r=[];e.forEach(t=>{let e=t.data(),i=(e.images||[]).filter(t=>t&&t.src&&"string"==typeof t.src&&""!==t.src.trim()&&"undefined"!==t.src&&!t.src.startsWith("/assets/gallery/"));r.push({id:t.id,title:e.title||"",titleEs:e.titleEs||"",description:e.description||"",descriptionEs:e.descriptionEs||"",category:e.category||"residential",images:i,sortOrder:e.sortOrder,createdAt:e.createdAt instanceof s.EK?e.createdAt.toMillis():Date.now()})}),r.sort((t,e)=>{let r=void 0!==t.sortOrder?t.sortOrder:Number.MAX_SAFE_INTEGER,i=void 0!==e.sortOrder?e.sortOrder:Number.MAX_SAFE_INTEGER;return r!==i?r-i:(e.createdAt||0)-(t.createdAt||0)}),t(r)},e=>{console.error("Firestore projects subscription error:",e),t([])})}catch(e){return console.error("Subscription setup for projects failed:",e),t([]),()=>{}}}async function I(t,e,r){try{if(!t)throw Error("Se requiere ID del proyecto.");if(e.images&&Array.isArray(e.images))try{let r=(0,s.JU)(l,h,t),i=await (0,s.QT)(r);if(i.exists()){let r=i.data().images||[],a=e.images;for(let i of(e.images=a.map(t=>({...t,storagePath:y(t.storagePath,t.src)||""})),r.filter(t=>{let e=y(t.storagePath,t.src);return!!e&&!a.some(t=>y(t.storagePath,t.src)===e)}))){let e=y(i.storagePath,i.src);if(e&&!await m(e,t))try{let t=(0,n.iH)(d,e);await (0,n.oq)(t)}catch(t){console.warn("Storage removal warning on update-project:",t)}}}}catch(t){console.warn("Error checking removed images during update-project:",t)}let r=(0,s.JU)(l,h,t);return await (0,s.r7)(r,e),!0}catch(t){throw console.error("Error updating project:",t),t}}async function P(t,e){try{if(!t||!t.id)throw Error("Se requiere ID del proyecto.");if(await (0,s.oe)((0,s.JU)(l,h,t.id)),t.images&&Array.isArray(t.images)&&t.images.length>0)for(let e of t.images){let r=y(e.storagePath,e.src);if(r&&!await m(r,t.id))try{let t=(0,n.iH)(d,r);await (0,n.oq)(t)}catch(t){console.warn("Storage deletion warning:",t)}}return!0}catch(t){throw console.error("Error deleting project:",t),t}}async function _(t,e,r,i,a){if(!r||0===r.length)return!1;let o=[],c=r.length;for(let t=0;t<c;t++){let e=r[t],a=e;try{a=await u(e,{maxDimension:2048,quality:.85})}catch(t){console.warn("Optimization warning:",t)}let s=a.name.replace(/[^a-zA-Z0-9.-]/g,"_"),l=Date.now(),g="projects/".concat(l,"_").concat(t,"_").concat(s),p=(0,n.iH)(d,g),f=(0,n.B0)(p,a);await new Promise((r,a)=>{f.on("state_changed",e=>{let r=e.bytesTransferred/e.totalBytes*100,a=Math.round((t+r/100)/c*100);i&&i(a)},t=>a(t),async()=>{try{let i=await (0,n.Jt)(f.snapshot.ref);o.push({id:"".concat(l,"_").concat(t),src:i,storagePath:g,title:e.name}),r()}catch(t){a(t)}})})}let g=[...e,...o].map(t=>({...t,storagePath:y(t.storagePath,t.src)||""})),p=(0,s.JU)(l,h,t);return await (0,s.r7)(p,{images:g}),!0}async function j(t,e,r,i){let a=e[r];if(!a)return!1;let o=e.filter((t,e)=>e!==r).map(t=>({...t,storagePath:y(t.storagePath,t.src)||""})),c=(0,s.JU)(l,h,t);await (0,s.r7)(c,{images:o});let g=y(null==a?void 0:a.storagePath,null==a?void 0:a.src);if(g&&!await m(g,t))try{let t=(0,n.iH)(d,g);await (0,n.oq)(t)}catch(t){console.warn("Storage removal warning:",t)}return!0}async function J(t,e){try{if(!t||!Array.isArray(t))return!1;for(let e of t){let{id:t,sortOrder:r}=e;if(null==t)continue;let i=String(t),a=(0,s.JU)(l,p,i);if((await (0,s.QT)(a)).exists())await (0,s.r7)(a,{sortOrder:r});else{let t=g.I.find(t=>String(t.id)===i||t.src===i);if(t){let e={src:t.src,category:t.category||"residential",title:t.title||"Foto de Galer\xeda",titleEs:t.titleEs||"Foto de Galer\xeda",description:t.description||"",descriptionEs:t.descriptionEs||"",sortOrder:r,createdAt:(0,s.Bt)()};await (0,s.ET)((0,s.hJ)(l,p),e),await (0,s.pl)((0,s.JU)(l,f,i),{staticId:i,src:t.src,hiddenAt:Date.now()})}}}return!0}catch(t){throw console.error("Error reordering images:",t),t}}async function x(t,e){try{if(!t||!Array.isArray(t))return!1;for(let e of t){let{id:t,sortOrder:r}=e;if(!t)continue;let i=(0,s.JU)(l,h,t);(await (0,s.QT)(i)).exists()&&await (0,s.r7)(i,{sortOrder:r})}return!0}catch(t){throw console.error("Error reordering projects:",t),t}}async function D(t,e,r){try{if(!t&&!r&&!e)return!1;if(console.warn("[Gallery] Cleaning up broken image: ID=".concat(t,", src=").concat(r)),t){let e=String(t),r=(0,s.JU)(l,p,e);(await (0,s.QT)(r)).exists()&&await (0,s.oe)(r)}if(r)try{for(let t of(await (0,s.PL)((0,s.hJ)(l,p))).docs)t.data().src===r&&await (0,s.oe)((0,s.JU)(l,p,t.id))}catch(t){}try{for(let e of(await (0,s.PL)((0,s.hJ)(l,h))).docs){let i=e.data().images||[],a=!1,o=i.filter(e=>(!t||!e.id||String(e.id)!==String(t))&&(!r||e.src!==r)||(a=!0,!1));a&&await (0,s.r7)((0,s.JU)(l,h,e.id),{images:o})}}catch(t){}let i=y(e,r);if(i&&!await m(i))try{let t=(0,n.iH)(d,i);await (0,n.oq)(t)}catch(t){}return!0}catch(t){return console.error("Error in handleBrokenImage:",t),!1}}}}]);

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.