PageSourceSearch

https://propiedades.cr/_next/static/chunks/6685-4e5bb45c3686c65b.js

js propiedades.cr collected 2026-10-02 00:35:35 UTC 12,461 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6685],{7862:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(95155),a=r(12115),i=r(39018),o=r(18955),l=r(14991);function s(e){let{triggerLabel:t,title:r,nameLabel:s,notesLabel:c="Notes",checkboxLabel:u,saveLabel:d,closeAriaLabel:p="Close",maxLength:g=50,charactersText:m="characters",onSave:h,externalOpen:f,onExternalClose:x,renderTrigger:b=!0}=e,y=(0,o.c3)("Common"),v=(0,o.c3)("FavoritesPage"),[w,N]=(0,a.useState)(!1),j="boolean"==typeof f,C=e=>{j?null==x||x():N(e)},[k,S]=(0,a.useState)(""),[E,L]=(0,a.useState)(""),[P,F]=(0,a.useState)(!1),[D,B]=(0,a.useState)(!1),R=k.trim().length>0&&k.length<=g,_=async()=>{if(R&&!D)try{let e;B(!0);let t={name:k.trim(),notes:E.trim(),setAsPredefined:P},r=await fetch("/api/wishlist",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){let e;try{let t=await r.json(),n=null==t?void 0:t.code;e="string"==typeof n?n:void 0}catch(e){}"wishlist_name_conflict_owner"===e?(0,i.P)("error",v("toasts.createListNameConflictOwner")):"wishlist_name_conflict_collaborator"===e?(0,i.P)("error",v("toasts.createListNameConflictCollaborator")):(0,i.P)("error",v("toasts.createListError"));return}try{e=await r.json()}catch(e){(0,i.P)("error",y("error"));return}let n=null==e?void 0:e.id;if("string"!=typeof n||!n)return void(0,i.P)("error",y("error"));await (null==h?void 0:h({id:n,name:k.trim(),notes:E.trim(),makePrimary:P})),C(!1),S(""),L(""),F(!1)}catch(e){(0,i.P)("error",y("error"))}finally{B(!1)}};return(0,n.jsxs)(n.Fragment,{children:[b?(0,n.jsx)("button",{type:"button",className:"inline-flex items-center rounded-md border border-gray-300 bg-white px-3 py-1.5 text-sm font-medium text-gray-900 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-gray-200 focus:ring-offset-2 cursor-pointer",onClick:()=>C(!0),children:t}):null,(j?f:w)?(0,n.jsxs)("div",{className:"fixed inset-0 z-[1100] flex items-center justify-center",role:"dialog","aria-modal":"true",children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-black/30",onClick:()=>C(!1)}),(0,n.jsxs)("div",{className:"relative z-[1101] w-full max-w-md rounded-lg bg-white shadow-xl",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b",children:[(0,n.jsx)("h2",{className:"text-base font-semibold",children:r}),(0,n.jsx)("button",{type:"button","aria-label":p,className:"p-1 rounded hover:bg-gray-100 cursor-pointer",onClick:()=>C(!1),children:"\xd7"})]}),(0,n.jsxs)("div",{className:"px-4 py-4 space-y-3",children:[(0,n.jsx)("label",{className:"block text-sm font-medium text-gray-700",children:s}),(0,n.jsx)("input",{type:"text",value:k,onChange:e=>S(e.target.value.slice(0,g)),maxLength:g,className:"w-full rounded-md border border-gray-300 px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-gray-200"}),(0,n.jsxs)("div",{className:"text-xs text-gray-500 ml-auto text-right",children:[k.length,"/",g," ",m]}),(0,n.jsx)("label",{className:"block text-sm font-medium text-gray-700",children:c}),(0,n.jsx)(l.A,{value:E,onChange:L,height:150,className:"w-full"}),(0,n.jsxs)("label",{className:"inline-flex items-center gap-2 text-sm select-none cursor-pointer",children:[(0,n.jsx)("input",{type:"checkbox",checked:P,onChange:e=>F(e.target.checked),className:"h-4 w-4 rounded border-gray-300 text-gray-900 focus:ring-gray-200 cursor-pointer"}),u]})]}),(0,n.jsx)("div",{className:"flex justify-end px-4 py-3 border-t",children:(0,n.jsx)("button",{type:"button",className:"inline-flex items-center rounded-md bg-blue-600 text-white px-4 py-2 text-sm font-medium hover:bg-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-200 cursor-pointer",disabled:!R||D,onClick:_,children:D?(0,n.jsx)("span",{className:"inline-flex items-center gap-2","aria-busy":"true",children:(0,n.jsxs)("svg",{className:"h-4 w-4 animate-spin",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]})}):d})})]})]}):null]})}},14991:(e,t,r)=>{r.d(t,{A:()=>v});var n=r(95155),a=r(12115),i=r(43719),o=r(62416),l=r(27250),s=r(64005),c=r(53063),u=r(96170),d=r(92941),p=r(66934),g=r(98801),m=r(30804),h=r(49948),f=r(86660),x=r(80003);function b(){let[e]=(0,p.DF)(),[t,r]=(0,a.useState)(!1),[i,o]=(0,a.useState)(!1),[l,s]=(0,a.useState)(!1),[c,u]=(0,a.useState)("paragraph");function d(t){e.update(()=>{var e,r;let n=(0,g.vJq)();if(!(0,g.I2P)(n))return;
1let a=null==(e=(r=n.anchor.getNode()).getTopLevelElement)?void 0:e.call(r);if(!a)return;let i=(0,h.fi)(t);a.getChildren().forEach(e=>i.append(e)),a.replace(i)})}return(0,a.useEffect)(()=>e.registerUpdateListener(e=>{let{editorState:t}=e;t.read(()=>{var e;let t=(0,g.vJq)();if(!(0,g.I2P)(t))return;r(t.hasFormat("bold")),o(t.hasFormat("italic")),s(t.hasFormat("underline"));let n=t.anchor.getNode(),a=null==(e=n.getTopLevelElement)?void 0:e.call(n);if(a&&(0,h.Pi)(a)){let e=a.getTag();"h1"===e||"h2"===e?u(e):u("paragraph")}else u("paragraph")})}),[e]),(0,a.useEffect)(()=>e.registerCommand(g.MvL,()=>(e.getEditorState().read(()=>{var e;let t=(0,g.vJq)();if(!(0,g.I2P)(t))return;let r=t.anchor.getNode(),n=null==(e=r.getTopLevelElement)?void 0:e.call(r);if(n&&(0,h.Pi)(n)){let e=n.getTag();"h1"===e||"h2"===e?u(e):u("paragraph")}else u("paragraph")}),!1),0),[e]),(0,n.jsxs)("div",{className:"flex items-center gap-2 border-b px-2 py-1 text-sm overflow-x-auto whitespace-nowrap",children:[(0,n.jsx)("button",{type:"button",className:"px-2 py-1 rounded hover:bg-gray-100 cursor-pointer ".concat("paragraph"===c?"bg-gray-200":""),onClick:function(){e.update(()=>{var e,t;let r=(0,g.vJq)();if(!(0,g.I2P)(r))return;let n=null==(e=(t=r.anchor.getNode()).getTopLevelElement)?void 0:e.call(t);if(!n)return;let a=(0,g.lJ7)();
1n.getChildren().forEach(e=>a.append(e)),n.replace(a)})},children:"p"}),(0,n.jsx)("button",{type:"button",className:"px-2 py-1 rounded hover:bg-gray-100 cursor-pointer ".concat("h1"===c?"bg-gray-200":""),onClick:()=>d("h1"),children:"H1"}),(0,n.jsx)("button",{type:"button",className:"px-2 py-1 rounded hover:bg-gray-100 cursor-pointer ".concat("h2"===c?"bg-gray-200":""),onClick:()=>d("h2"),children:"H2"}),(0,n.jsx)("button",{type:"button",className:"px-2 py-1 rounded hover:bg-gray-100 cursor-pointer",onClick:()=>e.dispatchCommand(f.q7,void 0),children:(0,n.jsx)(x.A,{className:"h-4 w-4","aria-hidden":!0})}),(0,n.jsx)("button",{type:"button",className:"px-2 py-1 rounded hover:bg-gray-100 cursor-pointer ".concat(t?"bg-gray-200":""),onClick:()=>e.dispatchCommand(g.mB,"bold"),children:(0,n.jsx)("strong",{children:"B"})}),(0,n.jsx)("button",{type:"button",className:"px-2 py-1 rounded hover:bg-gray-100 cursor-pointer italic ".concat(i?"bg-gray-200":""),onClick:()=>e.dispatchCommand(g.mB,"italic"),children:"I"}),(0,n.jsx)("button",{type:"button",className:"px-2 py-1 rounded hover:bg-gray-100 cursor-pointer underline ".concat(l?"bg-gray-200":""),onClick:()=>
1e.dispatchCommand(g.mB,"underline"),children:"U"})]})}function y(){let[e]=(0,p.DF)();return(0,a.useEffect)(()=>{function t(t){if(!t.ctrlKey&&!t.metaKey)return;let r=t.key.toLowerCase();"b"===r?(t.preventDefault(),e.dispatchCommand(g.mB,"bold")):"i"===r?(t.preventDefault(),e.dispatchCommand(g.mB,"italic")):"u"===r&&(t.preventDefault(),e.dispatchCommand(g.mB,"underline"))}return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e]),null}function v(e){let{value:t,onChange:r,className:x,height:v=200}=e,w=(0,a.useRef)(""),N=(0,a.useMemo)(()=>({namespace:"wishlist-wysiwyg",onError:e=>console.error(e),nodes:[h.jL,f.v5,f.YW],theme:{paragraph:"mb-1",text:{bold:"font-bold",italic:"italic",underline:"underline"},heading:{h1:"text-xl font-semibold",h2:"text-lg font-semibold"},list:{ul:"list-disc pl-5",listitem:"ml-1"}},editorState:void 0}),[]);return(0,n.jsx)(i.n,{initialConfig:N,children:(0,n.jsxs)("div",{className:x,style:{border:"1px solid #e5e7eb",borderRadius:6},children:[(0,n.jsx)(b,{}),(0,n.jsxs)("div",{className:"px-2 py-2",style:{minHeight:v},children:[(0,n.jsx)(o.$,{contentEditable:(0,n.jsx)(l.a,{className:"min-h-[120px] outline-none"}),placeholder:null,ErrorBoundary:()=>(0,n.jsx)("div",{className:"text-red-600 text-sm",children:"Editor error"})}),(0,n.jsx)(s.G,{}),(0,n.jsx)(u.Q,{}),(0,n.jsx)(d.x,{}),(0,n.jsx)(y,{}),(0,n.jsx)(c.D,{onChange:(e,t)=>
1{e.read(()=>{let e=(0,m.g)(t,null);e!==w.current&&(w.current=e,r(e))})}}),(0,n.jsx)(function(e){let{val:t}=e,[r]=(0,p.DF)();return(0,a.useEffect)(()=>{t!==w.current&&r.update(()=>{let e=new DOMParser().parseFromString(t||"","text/html"),n=(0,m.d)(r,e),a=(0,g.NiT)();if(a.clear(),!n.length)return void a.append((0,g.lJ7)());n.forEach(e=>{if((0,g.ff4)(e))a.append(e);else{let t=(0,g.lJ7)();t.append(e),a.append(t)}})})},[t,r]),null},{val:t})]})]})})}},39018:(e,t,r)=>{r.d(t,{O:()=>a,P:()=>l});var n=r(18720);let a=5e3,i=0,o=0;function l(e,t,r){var l;let s=Date.now();o=s-i>400?0:o+1,i=s;let c=(null!=(l=null==r?void 0:r.duration)?l:a)+180*o,u={...r,duration:c,style:{...null==r?void 0:r.style,"--toast-duration":"".concat(c,"ms")}};switch(e){case"success":n.oR.success(t,u);break;case"error":n.oR.error(t,u);break;case"warning":n.oR.warning(t,u);break;case"info":n.oR.info(t,u);break;default:(0,n.oR)(t,u)}}},77285:(e,t,r)=>{r.d(t,{$g:()=>l,FY:()=>s,Ih:()=>c,LN:()=>i,Ng:()=>u,Vg:()=>o,pS:()=>a});let n=/\B(?=(\d{3})+(?!\d))/g,a=(e,t)=>e||(null==t?void 0:t.toLowerCase()),i=e=>{if("string"==typeof e&&!e.trim())return"";let t="number"==typeof e?e:Number(String(e).trim());return Number.isFinite(t)?Math.round(t).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0}):""},o=e=>{if("string"==typeof e&&!e.trim())return"";let t="number"==typeof e?e:Number(String(e).trim());return Number.isFinite(t)?t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):""},l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"USD",a="string"==typeof e?Number(e.trim()):Number(e);if(!a||isNaN(a))return"";let i=Math.round(a),o=Math.abs(i).toString().replace(n,"es"===t?".":","),l=i<0?"-".concat(o):o;return"USD"===r?"$".concat(l):"CRC"===r?"₡".concat(l):l},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/images/property-placeholder.png";if(!e)return t;let r=e.replace(/['"\[\]]/g,"").trim();return r.startsWith("['")&&r.endsWith("']")&&(r=r.slice(2,-2)),r||t};function c(e){if(!e||e.startsWith("/")||!/^https?:\/\//i.test(e))return!1;let t="https://cdn.propiedades.cr";return!(t&&e.startsWith(t)||/firebasestorage\.googleapis\.com|storage\.googleapis\.com/i.test(e))}let u=(e,t)=>{let r=(null==e?void 0:e.toLowerCase())||"";return({available:{text:(null==t?void 0:t("availableStatus"))||"Available",class:"bg-green-200 text-green-900"},pending:{text:(null==t?void 0:t("pendingStatus"))||"Pending",class:"bg-yellow-200 text-yellow-900"},sold:{text:(null==t?void 0:t("soldStatus"))||"Sold",class:"bg-gray-200 text-gray-700"},rented:{text:(null==t?void 0:t("rentedStatus"))||"Rented",class:"bg-blue-200 text-blue-900"}})[r]||{text:"Unknown",class:"bg-gray-200 text-gray-700"}}},89330:(e,t,r)=>{r.r(t),r.d(t,{default:()=>i});let n=["blog/","wiki/condos/","wiki/provinces/","wiki/cantons/","wiki/districts/","projects/","profiles/","partner-logos/"];function a(e){if("string"!=typeof e)return!1;if(e.includes("/v0/b/"))return!0;let t=e.toLowerCase();return!!(t.includes("firebasestorage.googleapis.com")||t.includes("storage.googleapis.com")&&e.includes("/o/"))}function i(e){let{src:t,width:r,quality:i}=e,o="https://cdn.propiedades.cr";if(!o)return t;if(a(t)){let e=function(e){var t;let r;if(!a(e)||!e.includes("/o/"))return null;let i=null==(t=e.split("/o/")[1])?void 0:t.split("?")[0];if(!i)return null;try{r=decodeURIComponent(i)}catch(e){return null}return n.some(e=>r.startsWith(e))?r:null}(t);if(e)return"".concat(o,"/media/").concat(e,"?width=").concat(r,"&quality=").concat(i||75);let s=t;if(t.includes("/o/")){var l;s=(null==(l=t.split("/o/")[1])?void 0:l.split("?")[0])||t}return"".concat(o,"/media/").concat(s,"?width=").concat(r,"&quality=").concat(i||75)}if(/^https?:\/\//i.test(t))return t;if(t.startsWith("/")){let e=t.replace(/^\//,"");return"".concat(o,"/").concat(e,"?width=").concat(r,"&quality=").concat(i||75)}return t}}}]);

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.