1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9730,5259],{84442:function(e,t,s){"use strict";s.d(t,{B:function(){return r}});var n=s(2784),a=s(63955),r=function(e){var t=e.as,s=e.errors,r=e.name,o=e.message,i=e.render,l=function(e,t){if(null==e)return{};var s,n,a={},r=Object.keys(e);for(n=0;n<r.length;n++)t.indexOf(s=r[n])>=0||(a[s]=e[s]);return a}(e,["as","errors","name","message","render"]),c=(0,a.Gc)(),d=(0,a.U2)(s||c.formState.errors,r);if(!d)return null;var u=d.message,m=d.types,f=Object.assign({},l,{children:u||o});return n.isValidElement(t)?n.cloneElement(t,f):i?i({message:u||o,messages:m}):n.createElement(t||n.Fragment,f)}},30187:function(e,t,s){"use strict";var n=s(2784);t.Z=e=>{const t=n.useRef(e);return n.useEffect((()=>{t.current=e})),t}},89068:function(e,t,s){"use strict";s.d(t,{f:function(){return l},z:function(){return i}});var n=s(2784),a=s(30187);const r="undefined"!==typeof performance?performance:Date,o=()=>r.now();function i(e,t=30,s=!1){const r=(0,a.Z)(e),i=1e3/t,l=n.useRef(0),c=n.useRef(),d=()=>c.current&&clearTimeout(c.current),u=[t,s,r];function m(){l.current=0,d()}return n.useEffect((()=>m),u),n.useCallback((function(){const e=arguments,t=o(),n=()=>{l.current=t,d(),r.current.apply(null,e)},a=l.current;if(s&&0===a)return n();if(t-a>i){if(a>0)return n();l.current=t}d(),c.current=setTimeout((()=>{n(),l.current=0}),i)}),u)}function l(e,t,s){const a=n.useState(e);return[a[0],i(a[1],t,s)]}},52094:function(e,t,s){"use strict";s.d(t,{L:function(){return a}});var n=s(2784),a=s(24947).jU?n.useLayoutEffect:n.useEffect},64928:function(e,t,s){"use strict";s.d(t,{G:function(){return o}});var n=s(2784);var a=s(24947);function r(e,t){var s=function(){var e=(0,n.useRef)(!0);return(0,n.useEffect)((function(){e.current=!1}),[]),e.current}();(0,n.useEffect)(s?a.ZT:e,t)}function o(e,t){void 0===t&&(t=a.p2);var s=(0,n.useState)(),o=s[0],i=s[1],l=(0,n.useRef)(e);return r((function(){t(l.current,e)||(i(l.current),l.current=e)}),[e]),o}},24947:function(e,t,s){"use strict";s.d(t,{ZT:function(){return n},jU:function(){return a},p2:function(){return r}});var n=function(){},a="undefined"!==typeof window&&"undefined"!==typeof navigator&&"undefined"!==typeof document,r=function(e,t){return e===t}},86129:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/inmobiliaria/evaluar",function(){return s(15332)}])},77292:function(e,t,s){"use strict";s.d(t,{z:function(){return l}});var n=s(52322),a=(s(2784),s(27850)),r=s(6277),o=s(5632),i=s(80217);function l(e){let{className:t,children:s,...l}=e;const c=(0,o.useRouter)().pathname;return(0,n.jsxs)("div",{className:(0,r.W)("flex flex-col items-center justify-center text-center w-full py-12 px-4",t),...l,children:[(0,n.jsx)(a.Z,{className:"mx-auto h-12 w-12 text-gray-400 dark:text-gray-400"}),(0,n.jsxs)("h3",{className:"mt-2 text-sm font-medium text-gray-900 dark:text-gray-100",children:[(0,n.jsx)("span",{children:"Solicita acceso "}),c.startsWith("/inmobiliaria")&&(0,n.jsx)("span",{children:"empresa"}),c.startsWith("/gov")&&(0,n.jsx)("span",{children:"gobierno"})]}),s&&(0,n.jsx)("div",{className:"mt-1",children:s}),(0,n.jsx)("div",{className:"mt-6 flex flex-col items-stretch space-y-2 w-full max-w-xs",children:(0,n.jsx)(i.N,{href:"/inmobiliaria/acceso",className:"btn btn-skin btn-3",children:"Solicitar acceso"})})]})}},64323:function(e,t,s){"use strict";s.d(t,{K:function(){return i}});var n=s(52322),a=(s(2784),s(27850)),r=s(6277),o=s(80217);function i(e){let{className:t,children:s,...i}=e;return(0,n.jsxs)("div",{className:(0,r.W)("flex flex-col items-center justify-center text-center w-full py-12 px-4",t),...i,children:[(0,n.jsx)(a.Z,{className:"mx-auto h-12 w-12 text-gray-400 dark:text-gray-400"}),(0,n.jsx)("h3",{className:"mt-2 text-sm font-medium text-gray-900 dark:text-gray-100",children:"Por favor inicia sesi\xf3n"}),s&&(0,n.jsx)("div",{className:"mt-1",children:s}),(0,n.jsxs)("div",{className:"mt-6 flex flex-col items-stretch space-y-2 w-full max-w-xs",children:[(0,n.jsx)(o.N,{href:"/inmobiliaria/auth",className:(0,r.W)("btn btn-skin btn-3"),children:"Iniciar sesi\xf3n"}),(0,n.jsx)(o.N,{href:"/inmobiliaria/auth/signup",className:(0,r.W)("btn btn-outline-skin btn-3"),children:"Crear cuenta"})]})]})}},23608:function(e,t,s){"use strict";s.d(t,{NY:function(){return d},Ol:function(){return i},d7:function(){return c},vi:function(){return o}});
1var n=s(52322),a=s(84442),r=s(6277);const o=(0,r.W)("text-sm text-red-600 dark:text-red-400");function i(e){let{className:t,name:s,...i}=e;return(0,n.jsx)(a.B,{name:s,as:"p",className:(0,r.W)(o,t),...i})}const l=(0,r.W)("block","text-sm font-medium text-gray-700 dark:text-gray-300","after:content-[attr(data-after)] after:ml-0.5 after:text-skin-600 dark:after:text-skin-400");function c(e){let{className:t,required:s,...a}=e;return(0,n.jsx)("label",{"data-after":!0===s?"*":s||void 0,className:(0,r.W)(l,t),...a})}function d(e){let{className:t,required:s,...a}=e;return(0,n.jsx)("legend",{"data-after":!0===s?"*":s||void 0,className:(0,r.W)(l,t),...a})}},65659:function(e,t,s){"use strict";s.d(t,{_:function(){return w}});var n=s(52322),a=s(2784),r=s(28192),o=s(6277),i=s(63955),l=s(32469),c=s(13212),d=s(36604),u=s(93257),m=s(96635),f=s(12732),p=s(13079),x=s(31226),g=s(59218),h=s(33235),v=s(48899),y=s(10105),k=s(81144);const b=(0,l.Z)("form:report:step:estates"),_=["id","disabled","updated_at","zoning","geography_gis","iso_3166_1","address_level1","address_level2"];function j(e){let{items:t,onEstatesReset:s,onEstateFocus:i,className:l,children:b,...j}=e;const w=(0,k.XG)(g.PE),N=(0,k.XG)(g.zv),E=(0,p.Pf)(),S=[];if(t)for(const n of t){const e=n.estate_id;e&&S.push(e)}const{data:C}=(0,p.Ml)(E,S,{revalidateOnFocus:!1,revalidateOnReconnect:!1,keepPreviousData:!0}),R=(0,y.j9)(),F=(0,u.B)(R),O=(0,m.J)(C,F),W=C&&(0,c.ay)(...Array.from(C.values(),(e=>e.geography_gis))),L=W&&W.geometry,{data:M}=(0,f.M8)(L&&!(0,c.zB)(L)?{rpc:["classifications_intersecting_with_geography",{geometry:L}],select:_}:null,{revalidateOnFocus:!1,keepPreviousData:!0}),B=(0,a.useMemo)((()=>{if(!C||!M)return null;const e=new Map;for(const[t,s]of C){const n=s.geography_gis;if(n){const s=(0,f.Ff)(M,n,"desc").map((e=>M.get(e.id)));e.set(t,s)}}return e}),[C,M]),A=i;let P=0,T=0;if(t&&C)for(const n of t){const e=n.estate_id?C.get(n.estate_id):void 0,t=e&&e.geography_gis;if(!t)continue;const s=r.SOn(t),a=42;if((0,g.fK)(s)&&(P+=s,(0,g.fK)(a))){T+=s*a}}return(0,n.jsxs)("fieldset",{className:(0,o.W)("relative","flex flex-col",l),...j,children:[t&&t.length>0&&(0,n.jsxs)("div",{className:"flex-none pl-4 pr-4 py-3 bg-gray-100 dark:bg-gray-800 flex flex-row justify-between items-center",children:[(0,n.jsx)("span",{className:"text-sm leading-none text-gray-700 dark:text-gray-300",children:"Direcci\xf3n aproximada"}),s&&(0,n.jsx)("span",{className:"text-xs font-semibold text-skin-600 dark:text-skin-400",role:"button",onClick:s,children:"Limpiar"})]}),t&&t.length>0?(0,n.jsx)("ul",{className:(0,o.W)("flex-1 min-h-0 h-full","overflow-y-scroll","grid grid-cols-1","border-t border-gray-300 dark:border-gray-600","divide-y divide-gray-300 dark:divide-gray-600"),children:t.map(((e,t)=>{var s;const a=e.estate_id;if(!a)return null;const i=C&&C.get(a),l=i&&i.geography_gis,c=l&&r.SOn(l),u=B?B.get(a):void 0,m=null===(s=O.value)||void 0===s?void 0:s.get(a),f=(m&&(0,d.I)(m),m&&(0,d.M1)(m)),p=(0,h.xK)(t),g=null===u||void 0===u?void 0:u.map((e=>null===e||void 0===e?void 0:e.zoning)).filter(x.I).join(" / "),y=A?()=>A(a):void 0;return(0,n.jsxs)("li",{className:(0,o.W)("px-4 py-3","grid grid-cols-10 gap-x-2"),children:[(0,n.jsx)("div",{role:"button",onClick:y,title:"id: ".concat(a),className:(0,o.W)("text-black text-sm font-medium whitespace-nowrap","bg-red-500 rounded ring-1 ring-white","col-span-1 md:col-span-1","flex flex-col items-center justify-center"),children:p}),(0,n.jsxs)("div",{role:"button",onClick:y,title:f||void 0,className:(0,o.W)("text-sm font-medium whitespace-nowrap","col-span-7 md:col-span-7","flex flex-col items-start justify-center space-y-1.5"),children:[(0,n.jsx)("span",{className:(0,o.W)("block truncate","text-sm leading-none","text-gray-900 dark:text-gray-100","whitespace-nowrap tabular-nums"),children:f||"-"}),(0,n.jsx)("span",{className:(0,o.W)("block truncate","text-sm leading-none","text-gray-500 dark:text-gray-400","whitespace-nowrap tabular-nums"),children:c?"".concat(N.format(c)).concat(v.M2):"-"})]}),(0,n.jsxs)("div",{role:"button",className:(0,o.W)("text-sm font-medium text-gray-900 dark:text-gray-100 whitespace-nowrap","col-span-2 md:col-span-2","flex flex-col items-end justify-center space-y-1"),children:[(0,n.jsx)("span",{className:(0,o.W)("flex items-center space-x-1","leading-none font-semibold truncate","text-gray-500 dark:text-gray-400","whitespace-nowrap tabular-nums"),children:g||"-"}),(0,n.jsx)("span",{className:(0,o.W)("flex items-center space-x-1","text-xs leading-none font-normal truncate","text-gray-500 dark:text-gray-400","whitespace-nowrap tabular-nums"),children:"Norma"})]})]},a)}))}):(0,n.jsx)(a.Fragment,{}),t&&t.length>0&&(0,n.jsx)("div",{className:"flex-none px-4 py-1 bg-gray-100 dark:bg-gray-800 flex flex-row justify-center items-center border-y border-gray-300 dark:border-gray-600",children:(0,n.jsxs)("span",{className:"text-xs leading-none text-gray-500 dark:text-gray-500",children:["Total: ",w.format(P)+v.M2]})}),b]})}function w(e){let{onChange:t,onBlur:s,onEstateFocus:a,...r}=e;b("[FormStepEstates] rendering"),t&&b("WARNING: fieldset's onChange not implemented"),s&&b("WARNING: fieldset's onBlur not implemented");const o=(0,i.Gc)(),l=o.watch("estates_reports");return(0,n.jsx)(j,{items:l,onEstatesReset:()=>{b("[handleResetEstates] execute"),o.setValue("estates_reports",[])},onEstateFocus:a,...r})}},16144:function(e,t,s){"use strict";s.d(t,{B:function(){return i}});var n=s(52322),a=s(2784),r=s(62606),o=JSON.parse('{"v":"4.8.0","meta":{"g"
1:"LottieFiles AE 1.0.0","a":"","k":"","d":"","tc":""},"fr":60,"ip":0,"op":130,"w":512,"h":512,"nm":"HDFC Success","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"check","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[256,256,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-82.5,4.5],[-31,55],[73,-52.5]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tm","s":{"a":0,"k":0,"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[1],"y":[0.076]},"t":60,"s":[0]},{"t":85,"s":[100]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":30,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":240,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[256,257.86,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0,0,0.833],"y":[0.98,0.98,-66.114]},"o":{"x":[0.656,0.656,0.167],"y":[0.872,0.872,67.114]},"t":20,"s":[0,0,100]},{"t":60,"s":[150,150,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[236,236],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.2901960784313726,0.8705882352941177,0.5019607843137255,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,-3],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":240,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.626],"y":[0.729]},"o":{"x":[0.912],"y":[0.073]},"t":76,"s":[100]},{"t":119,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[256,257.86,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0,0,0.667],"y":[0.999,0.999,1]},"o":{"x":[0.477,0.477,0.333],"y":[0.587,0.587,0]},"t":10,"s":[0,0,100]},{"i":{"x":[0.833,0.833,0.833],"y":[1,1,1]},"o":{"x":[0.167,0.167,0.167],"y":[0,0,0]},"t":50,"s":[150,150,100]},{"i":{"x":[0.833,0.833,0.833],"y":[1,1,1]},"o":{"x":[0.167,0.167,0.167],"y":[0,0,0]},"t":76,"s":[150,150,100]},{"t":123,"s":[210,210,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[236,236],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.7333333333333333,0.9686274509803922,0.8156862745098039,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,-3],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":240,"st":0,"bm":0}],"markers":[]}');const i=a.forwardRef(((e,t)=>(0,n.jsx)(r.J5,{autoplay:!0,src:o,loop:!1,keepLastFrame:!0,ref:t,...e})));i.displayName="LottieSuccess"},38823:function(e,t,s){"use strict";s.d(t,{j:function(){return a}});var n=s(95679);function a(){return(0,n.z$)()}},1343:function(e,t,s){"use strict";s.d(t,{V:function(){return r}});var n=s(70524);const a={mail:!1,chat:!0};async function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;return(await fetch("/api/events",{method:"post",headers:n.st,body:JSON.stringify({message:e,options:t})})).ok}},15332:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return X}});var n=s(92228),a=s(52322),r=s(2784),o=s(68810),i=s(37185),l=s(77263),c=s(17576),d=s(13253),u=s(6277),m=s(89022),f=s.n(m),p=s(5632),x=s(63955),g=s(32469),h=s(41545),v=s(51514),y=s(13781),k=s(116),b=s(13079),_=s(6612),j=s(48899),w=s(66040),N=s(6572),E=s(9580),S=s(80747),C=s(24492),R=s(77292),F=s(64323),O=s(23608),W=s(65659),L=s(39936),M=s(83054),B=s(16144),A=s(19839),P=s(23046),T=s(38823),V=s(1343),z=s(32773);function Z(){const e=(0,n.Z)(["\n [#urvana][#lift]\n Usuario "," de la inmobiliaria "," intenci\xf3n de levantar:\n ","\n "]);return Z=function(){return e},e}function D(){const e=(0,n.Z)(["\n [#urvana][#lift]\n Usuario "," de la inmobiliaria "," CONFIRMA levantar:\n ","\n "]);return D=function(){return e},e}const q=(0,g.Z)("pages:inmobiliaria:evaluar"),G={street_address:"",iso_3166_1:"CL",address_level1:"Regi\xf3n Metropolitana de Santiago",address_level2:"Santiago",address_level3:"Providencia",estates_reports:[]},I={zoomControl:!0,zoomControlOptions:{position:v._D.LEFT_BOTTOM},streetViewControl:!1,mapTypeControl:!0,mapTypeControlOptions:{position:v._D.TOP_CENTER}},U=["Asignando al corredor mejor calificado...","Ejecutando algoritmos cu\xe1nticos y libres de gluten...","Lanzando sonda espacial con drones a Marte...","Cruzando los dedos para que Bitcoin siga subiendo..."];var K;function J(e){let{className:t,...s}=e;const n=(0,p.useRouter)(),m=(0,T.j)(),{data:g}=(0,k.e)(),R=null===g||void 0===g?void 0:g.company,F=null===g||void 0===g?void 0:g.id,L=(0,r.useRef)(F);L.current=F;const z=n.query.estate_id,[G,J]=(0,N.v)("paso",K.ESTATES),[H,X]=(0,r.useState)(),[Y,$]=(0,r.useState)(),[Q,ee]=(0,r.useState)(),te=(0,x.Gc)(),se=(0,h.L)(te),ne=(0,x.Dq)({control:te.control,name:"estates_reports",keyName:"_id"});(0,r.useEffect)((()=>{z&&te.setValue("estates_reports",[{profile_id:L.current,estate_id:z}])}),[z]);const ae=(0,r.useRef)(ne);ae.current=ne;const re=(0,b.Pf)(),oe=[];for(const a of ne.fields){const e=a.estate_id;e&&oe.push(e)}const{data:ie}=(0,b.Ml)(re,oe,{revalidateOnFocus:!1,revalidateOnReconnect:!1,keepPreviousData:!0}),le=(0,r.useCallback)((e=>{const t=null===ie||void 0===ie?void 0:ie.get(e);if(!t)return;const s=t.geography_gis;q("[handleFocusEstate] will center polygon: %o",s),null===m||void 0===m||m.track("Estate focus",{id:e}),$(s),X(v.R7)}),[ie,m]),ce=(0,r.useCallback)((e=>{const t=e.id;q("[handleMapClickEstate] clicked: %s",t);const s=ae.current.fields.findIndex((e=>e.estate_id===t));s>=0?(null===m||void 0===m||m.track("Estate deselected",{id:t}),ae.current.remove(s)):(null===m||void 0===m||m.track("Estate selected",{id:t}),ae.current.append({estate_id:t,profile_id:L.current,report_id:void 0}))}),[m]),de=se.handleSubmit((async e=>{})),[ue,me]=(0,r.useState)(!1),[fe,pe]=(0,r.useState)(0);const xe=(0,r.useRef)(null),ge=(0,r.useRef)(null),[he,ve]=(0,r.useState)(!1),[ye,ke]=(0,r.useState)("idle"),[be,_e]=(0,r.useState)(U[0]);function je(){"loading"===ye||ve(!1)}const we=(0,E.aC)("developer");return(0,a.jsxs)("main",{id:"urvana-eval-main",className:(0,u.W)("grid grid-cols-2 xl:grid-cols-3 2xl:grid-cols-3",t),...s,children:[(0,a.jsxs)("div",{id:"urvana-form-body",className:(0,u.W)("relative","col-span-1 xl:col-span-2 2xl:col-span-2"),children:[(0,a.jsx)("div",{id:"urvana-form-body-map",className:(0,u.W)("absolute inset-0 flex"),children:(0,a.jsx)(y.Kj,{className:"flex-1",touching:"semi",searchRef:Q,focusZoom:H,focusGeometry:Y,estatesSelected:ie,onEstateSelected:ce,showsUserLocation:fe,options:I})}),(0,a.jsxs)("div",{id:"urvana-form-body-content",className:(0,u.W)("absolute inset-0","bg-transparent","flex flex-col",G===K.ESTATES?(0,u.W)("pointer-events-none","items-start justify-between py-4 sm:py-8 overflow-y-hidden"):(0,u.W)("pointer-events-auto","items-center justify-start py-4 sm:py-8 overflow-y-auto")),children:[(0,a.jsxs)("div",{className:(0,u.W)("w-full sm:max-w-md","px-2 sm:px-4","pointer-events-auto"),children:[(0,a.jsx)(O.d7,{className:"sr-only",htmlFor:"street_address",children:"Buscar en direcci\xf3n"}),(0,a.jsxs)("div",{className:"relative rounded shadow-sm",children:[(0,a.jsx)("div",{className:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none",children:(0,a.jsx)(l.Z,{className:"w-5 h-5 text-gray-400","aria-hidden":"true"})}),(0,a.jsx)("input",{ref:ee,onFocus:()=>{q("[handleFocusSearchbox] will block estate's submit button"),me(!0)},onBlur:()=>{q("[handleBlurSearchbox] will unblock estate's submit button"),me(!1)},type:"search",name:"street_address",id:"street_address",autoComplete:"street_address",inputMode:"search",enterKeyHint:"search",className:(0,u.W)("py-2 sm:py-3 pl-10 pr-10","block w-full","text-base","bg-white text-black dark:bg-gray-900 dark:text-gray-100","rounded border border-gray-300 dark:border-gray-600 shadow","ring-1 ring-black/10 focus:ring-skin-500 focus:border-skin-500","disabled:opacity-75"),placeholder:"Avenida Urvana 123"}),(0,a.jsxs)("button",{type:"button",className:"absolute inset-y-0 right-0 flex items-center pr-3 pl-1 pointer-events-auto",onClick:function(){null===m||void 0===m||m.track("Live location toggle",void 0),pe((e=>e+1))},children:[(0,a.jsx)("span",{className:"sr-only",children:"Usar mi localizaci\xf3n"}),(0,a.jsx)(S.c,{"aria-hidden":"true",className:(0,u.W)("w-5 h-5 hover:text-skin-500 dark:hover:text-skin-500",fe?"text-skin-400 dark:text-skin-400":"text-gray-400 dark:text-gray-400")})]})]})]}),(0,a.jsx)("form",{className:(0,u.W)("flex-shrink min-h-0","w-full sm:max-w-md","px-2 sm:px-4 pt-4","pointer-events-auto"),onSubmit:de,children:(0,a.jsx)(W._,{onEstateFocus:le,disabled:se.isLoading||ue,className:(0,u.W)("h-full max-h-80 sm:max-h-full","shadow rounded overflow-hidden border","bg-gray-50 dark:bg-gray-900 border-gray-300 dark:border-gray-600")})})]})]}),(0,a.jsx)("div",{className:(0,u.W)("relative col-span-1"),children:(0,a.jsxs)("div",{className:(0,u.W)("absolute inset-0 flex flex-col"),children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2 px-4 pt-6 pb-4 bg-skin-100/40 dark:bg-skin-900/40 border-b border-skin-500 shadow",children:[(0,a.jsx)("button",{onClick:function(){ke("idle"),(0,V.V)(f()(Z(),null===g||void 0===g?void 0:g.email,null===R||void 0===R?void 0:R.slug,oe.join("\n")||"NO SELECTION")),ve(!0)},type:"button",className:"btn btn-4 btn-skin",children:"Solicitar pa\xf1
1o"}),(0,a.jsxs)("p",{className:"text-sm text-gray-800 dark:text-gray-200 text-left col-span-2 max-w-xs",children:["URVANA enviar\xe1 a sus mejores corredores a levantar este pa\xf1o para ti."," "]})]}),(0,a.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[(0,a.jsx)("div",{className:"pt-6","aria-hidden":!0}),(0,a.jsx)(A.n,{modifier:1,showAskingPrice:!1,showMarketValues:!0,showUrvanaPrice:!1,controls:!0,report_id:null,estate_ids:oe,expected_price:null,twGrid:"grid grid-cols-2 2xl:grid-cols-2",twGridCellSecondary:"col-span-1",twGridCellPrimary:"col-span-2"}),(0,a.jsxs)("div",{className:"mt-6",children:[(0,a.jsx)("h3",{className:"px-4 sm:px-6 text-sm font-medium text-gray-500",children:"Antecedentes normativos"}),(0,a.jsx)(P.mB,{estate_ids:oe,className:(0,u.W)("mt-1","px-6 py-0","border-y border-gray-300 dark:border-gray-600","divide-y divide-gray-300 dark:divide-gray-600")})]}),(0,a.jsx)("div",{className:"pb-32","aria-hidden":!0})]})]})}),(0,a.jsx)(o.u.Root,{show:he,as:r.Fragment,children:(0,a.jsxs)(i.V,{as:"div",className:"relative z-10",initialFocus:ge,onClose:je,style:we,children:[(0,a.jsx)(o.u.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,a.jsx)("div",{className:"fixed inset-0 bg-gray-500/75 dark:bg-gray-800/75 transition-opacity"})}
1),(0,a.jsx)("div",{className:"fixed z-10 inset-0 overflow-y-auto",children:(0,a.jsx)("div",{className:"flex items-end sm:items-center justify-center min-h-full p-4 text-center sm:p-0",children:(0,a.jsx)(o.u.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:(0,a.jsxs)(i.V.Panel,{className:(0,u.W)("relative px-4 pt-5 pb-4 sm:p-6 text-left transform transition-all sm:my-8 sm:max-w-lg sm:w-full ","shadow rounded overflow-hidden border","bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-600"),children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mx-auto flex items-center justify-center",children:"done"===ye?(0,a.jsx)(B.B,{className:"w-36 h-36"}):(0,a.jsx)(M.p,{})}),(0,a.jsxs)("div",{className:"mt-3 text-center sm:mt-5",children:[(0,a.jsx)(i.V.Title,{as:"h3",className:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-100",children:"Enviar corredores URVANA"}),(0,a.jsx)("div",{className:"mt-2",children:"loading"===ye?(0,a.jsx)("p",{className:"text-sm text-gray-500",children:be}):"done"===ye?(0,a.jsxs)("p",{className:"text-sm text-gray-500",children:["Listo! Te avisaremos por correo o WhatsApp con novedades sobre este terreno.",(0,a.jsx)("br",{}),(0,a.jsx)("br",{}),"Si tienes dudas nos puedes escribir llamar al"," ",(0,a.jsx)("a",{className:"underline",href:"tel:".concat(j.NY),...(0,w.I)(),children:j.NY})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"text-sm text-gray-500",children:"Si te interesa este pa\xf1o podemos ir a levantarlo por ti."}),(0,a.jsx)("p",{className:"mt-2 text-sm text-gray-500",children:"Lo hacemos enviando nuestros corredores de confianza que bajo contrato mantendr\xe1n exclusividad con tu inmobiliaria por 60 d\xedas."})]})})]})]}),(0,a.jsxs)("div",{className:"mt-5 sm:mt-6 sm:grid sm:grid-cols-2 sm:gap-3 sm:grid-flow-row-dense",children:[(0,a.jsx)("button",{type:"button",className:"w-full btn btn-4 btn-skin sm:col-start-2 space-x-2",onClick:async function(){if((0,V.V)(f()(D(),null===g||void 0===g?void 0:g.email,null===R||void 0===R?void 0:R.slug,oe.join("\n")||"NO SELECTION")),0===oe.length)return alert("Debes seleccionar los terrenos en el mapa antes de solicitar un levantamiento"),void ve(!1);ke("loading");for(const e of U)_e(e),await(0,_.Z)(2500);ke("done")},disabled:"idle"!==ye,ref:ge,children:"loading"===ye?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{children:"Procesando"}),(0,a.jsx)(C.$,{className:"w-4 h-4"})]}):"done"===ye?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{children:"Solicitado"}),(0,a.jsx)(c.Z,{className:"w-4 h-4 inline"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{children:"Levantar terreno"}),(0,a.jsx)(d.Z,{className:"w-4 h-4 inline"})]})}),(0,a.jsx)("button",{type:"button",className:"mt-3 sm:mt-0 sm:col-start-1 w-full btn btn-4 btn-gray",onClick:je,disabled:"loading"===ye,ref:xe,children:"Volver"})]})]})})})})]})})]})}!function(e){e.ESTATES="1"}(K||(K={}));const H=r.memo(J);function X(e){let{className:t,...s}=e;const n=(0,x.cI)({reValidateMode:"onSubmit",shouldUnregister:!1,shouldFocusError:!0,defaultValues:G}),{data:r,isLoading:o}=(0,k.e)(),i=r&&r.company;return(0,a.jsxs)(z.q,{className:(0,u.W)(t),...s,children:[(0,a.jsx)(L.n,{title:"B\xfasqueda activa de terrenos | URVANA.net \u270c\ufe0f"}),i&&r?(0,a.jsx)("main",{className:"absolute inset-0 overflow-hidden flex",children:(0,a.jsx)(x.RV,{...n,children:(0,a.jsx)(H,{className:"flex-1"})})}):r?(0,a.jsx)("main",{className:"flex items-center justify-center py-10",children:(0,a.jsx)(R.z,{children:(0,a.jsx)("p",{className:"text-sm text-gray-500 dark:text-gray-500",children:"Para evaluar en tiempo real y solicitar pa\xf1os a URVANA"})})}):o?(0,a.jsx)("main",{className:"absolute inset-0 flex items-center justify-center",children:(0,a.jsx)(C.$,{className:"text-skin-600 w-10 h-10"})}):(0,a.jsx)("main",{className:"absolute inset-0 flex items-center justify-center",children:(0,a.jsx)(F.K,{children:(0,a.jsx)("p",{className:"text-sm text-gray-500 dark:text-gray-500",children:"Para evaluar en tiempo real y solicitar pa\xf1
1os a URVANA."})})})]})}},36604:function(e,t,s){"use strict";function n(e){return e.formatted_address.split(",")[0]}function a(e){for(const t of e.address_components)if(t.types.includes("route"))return t.short_name;return n(e)}function r(e){const t={};t.street_address=e.formatted_address||"";const[s,...n]=t.street_address.split(", ");t.address_line1=s,t.address_line2=n.join(", ");for(const a of e.address_components){const e=a.long_name,s=a.short_name;for(const n of a.types)n&&("street_number"===n||"route"===n||"locality"===n||"administrative_area_level_5"===n||("administrative_area_level_4"===n?t.address_level4=e:"administrative_area_level_3"===n?t.address_level3=e:"administrative_area_level_2"===n?t.address_level2=e:"administrative_area_level_1"===n?t.address_level1=e:"country"===n?(t.country=s,t.country_name=e):"postal_code"===n&&(t.postal_code=e)))}return t}s.d(t,{I:function(){return a},M1:function(){return n},dy:function(){return r}})},13781:function(e,t,s){"use strict";s.d(t,{Vw:function(){return F},Kj:function(){return O}});var n=s(52322),a=s(2784),r=s(89068),o=s(64928),i=s(52094),l=s(28192),c=s(27071),d=s(32469),u=s(13212),m=s(59071),f=s(39011),p=s(98982),x=s(89129),g=s(13079),h=s(12732),v=s(59218),y=s(10105),k=s(51514),b=s(76777),_=s(2641);const j=(0,d.Z)("use-user-location"),w={};const N=(0,d.Z)("components:google-map-handled");const E=["id","disabled","updated_at","iso_3166_1","address_level1","address_level2","address_level3","evaluable","zonable","geography_gis"],S=["id","updated_at","geography_gis","disabled","iso_3166_1","address_level1","address_level2","address_level3"],C=["id","disabled","updated_at","geography_gis","zoning","zones (id, landuse_residential, updated_at)"],R=["id","updated_at","geography_gis"];function F(e){let{map:t,searchRef:s,focusGeometry:d,focusZoom:F=k.y5,onDivisionChange:O,estatesSelected:W,onEstateSelected:L,showsUserLocation:M,classificationsMode:B="solid",options:A,...P}=e;const T=(0,c.m8)(),[V=t,z]=(0,a.useState)(),Z=(0,a.useRef)(V);Z.current=V;const[D,q]=(0,a.useState)(null),[G,I]=(0,a.useState)(k.y5),[U,K]=(0,a.useState)(void 0);(0,a.useEffect)((()=>N("[useEffect] boundsCenter changed: %o",D)),[D]),(0,a.useEffect)((()=>N("[useEffect] boundsZoom changed: %o",G)),[G]),(0,a.useEffect)((()=>N("[useEffect] boundsPolygon changed: %o",U)),[U]);const[J,H]=(0,a.useState)(F),[X,Y]=(0,a.useState)((()=>d?l.Scw(d).geometry:(0,u.pg)(k.fO).geometry));(0,a.useEffect)((()=>{(0,v.fK)(F)&&(H(F),I(F))}),[F]),(0,a.useEffect)((()=>{if(d){const e=l.Scw(d);Y(e.geometry),q(e)}}),[d]);let $=!1,Q=!1,ee=!1,te=!1;G>=k.Tk?(ee=!0,te=!0):G>=k.Nz?(Q=!0,te=!0):$=!0;const se=(0,a.useMemo)((()=>W?(0,f.tF)(W,(e=>e.id)):null),[W]),ne=(0,g.Pf)(),{data:ae}=(0,g.Ml)(ne,se,{revalidateOnFocus:!1,revalidateOnReconnect:!1,keepPreviousData:!0}),re=(0,a.useRef)(ae);re.current=ae;const{data:oe}=(0,x.lb)({table:"divisions",select:E,filter:[["iso_3166_1","eq","CL"],["address_level1","in","(Regi\xf3n Metropolitana de Santiago,Regi\xf3n de \xd1uble,Regi\xf3n del B\xedo-B\xedo)"]],limit:1e3},{revalidateOnFocus:!1,revalidateOnReconnect:!1}),ie=(0,a.useMemo)((()=>{if(oe&&D)for(const[,e]of oe){const t=e.geography_gis;if(t&&(((0,u.m7)(t)||(0,u.ex)(t))&&l.FWy(D,t)))return e}return null}),[oe,D]),le=!!ie&&ie.disabled;(0,a.useEffect)((()=>{ie?(N("[useEffect] current division is: %s - %s - %s - %s",ie.id,ie.address_level1,ie.address_level2,ie.address_level3),O&&O(ie)):(N("[useEffect] current division is null"),O&&O(null))}),[ie,O]);const{data:ce}=(0,h.FJ)(te&&ie&&"none"!==B?{table:"classifications",select:C,filter:[["iso_3166_1","eq",ie.iso_3166_1],["address_level1","eq",ie.address_level1],["address_level2","eq",ie.address_level2],["address_level3","eq",ie.address_level3],["disabled","eq",!1]]}:null,{revalidateOnFocus:!1,revalidateOnReconnect:!1}),{data:de}=(0,p.n)(Q&&ie?{table:"blocks",select:R,filter:[["iso_3166_1","eq",ie.iso_3166_1],["address_level1","eq",ie.address_level1],["address_level2","eq",ie.address_level2],["address_level3","eq",ie.address_level3]]}:null,{revalidateOnFocus:!1,revalidateOnReconnect:!1}),ue=(0,a.useRef)(de);ue.current=de;const{data:me,isValidating:fe}=(0,g.rh)(ee&&U&&ie?{rpc:["estates_intersecting_with_geography",{geometry:U.geometry}],select:S,filter:[["iso_3166_1","eq",ie.iso_3166_1],["address_level1","eq",ie.address_level1],["address_level2","eq",ie.address_level2],["address_level3","eq",ie.address_level3]],limit:2e3}:null,{revalidateOnFocus:!1,revalidateOnReconnect:!1,keepPreviousData:!0}),pe=(0,a.useRef)(me);pe.current=me;const xe=(0,a.useCallback)((()=>
1{if(!Z.current)return;const e=Z.current.getZoom();(0,v.fK)(e)&&I(Math.round(e))}),[]),ge=xe,he=(0,a.useCallback)((()=>{if(!Z.current)return;const e=Z.current.getBounds();if(!e)return;const t=(0,u.B1)(e.toJSON()),s=l.bAF(t),n=l.beQ(s);K(s),q(n)}),[]),ve=(0,r.z)(he,1),ye=(0,a.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:k.oe,s=arguments.length>2?arguments[2]:void 0;if(!Z.current)return;const n=e&&l.Scw(e);if(!n)return N("[handleFocusPolygon] no polygon to focus");const a=n.geometry,r=Z.current.getZoom();N("[handleFocusPolygon] current zoom vs wanted: %s v %s",r,t),s||(0,v.fK)(r)&&r<=t?(N("[handleFocusPolygon] will focus for force (%s) and zoom (%s): %o",s,r,{level:t,geometry:a}),Z.current.setZoom(t),H(t),Y(a)):N("[handleFocusPolygon] won't focus for force (%s) and zoom (%s): %o",s,r,{level:t,geometry:a})}),[]),ke=(0,a.useCallback)((e=>{N("[handleMapClickDivision] clicked id: %s",e);const t=null===oe||void 0===oe?void 0:oe.get(e);if(!t)return;const s=t.geography_gis;N("[handleMapClickDivision] got polygon: %o",s),ye(s,k.Rw,!0)}),[oe,ye]),be=(0,a.useCallback)((e=>{var t;N("[handleMapClickBlock] clicked id: %s",e);const s=null===(t=ue.current)||void 0===t?void 0:t.get(e);if(!s)return;const n=s.geography_gis;N("[handleMapClickBlock] got polygon: %o",n),ye(n,k.Jt,!0)}),[ye]),_e=(0,a.useCallback)((e=>{var t;N("[handleMapClickEstate] [handleEstateSelected] clicked id: %s",e);const s=null===(t=pe.current)||void 0===t?void 0:t.get(e);s&&L&&L(s)}),[L]),je=(0,a.useCallback)((e=>{var t;const s=null===(t=pe.current)||void 0===t?void 0:t.get(e);if(N("[handleMapRightClickEstate] estate is: %O",s),re.current){if(re.current.has(e)){const e=(0,u.ay)(...Array.from(re.current.values(),(e=>e.geography_gis)));N("[handleMapRightClickEstate] selected union polygon is: %O",e)}}}),[]),we=(0,o.G)(ae?ae.size:void 0);(0,i.L)((()=>{if(!ae)return;if(function(e,t){if("always"===k.Xn)return!0;if("single"===k.Xn){if(N("[SHOULD_AUTO_ZOOM] auto-zoom selected lengths to compare %s -> %s",e,t),!(0,v.fK)(t)&&(0,v.fK)(e)&&e>=1)return!0;if(1===e&&0===t)return!0}return!1}(ae.size,we))for(const e of ae.values()){const t=e.geography_gis;ye(t,k.oe,!1)}}),[ye,ae,we]);const Ne=(0,a.useMemo)((()=>({mapId:k.Pw,clickableIcons:!1,fullscreenControl:!1,gestureHandling:"greedy",zoomControl:!1,mapTypeControl:!1,streetViewControl:!1,...A})),[A]),Ee=G>=k._W?b.Lm.HYBRID:b.Lm.ROADMAP,Se=(0,a.useMemo)((()=>(0,u.Fc)(X.coordinates)),[X]),Ce=(0,y.j9)(),Re=(0,a.useMemo)((()=>{if(Ce&&ie&&s){const e=l.VWR(ie.geography_gis);N("[useMemo] will setup google places on field: %s",s);const t=new Ce.maps.places.SearchBox(s);if(e){const s=(0,u.Vh)(e);t.setBounds(s)}return t}return null}),[Ce,ie,s]);(0,i.L)((()=>
1{if(!s||!Re)return;N("[useIsomorphicLayoutEffect] executing effect for searchBox handler");return Re.addListener("places_changed",(async()=>{s.blur();const e=Re.getPlaces();N("[useIsomorphicLayoutEffect#handler] 'places_changed' executed with result: %o",e);for(const s of e||[]){var t,n;const e=null===(t=s.geometry)||void 0===t||null===(n=t.location)||void 0===n?void 0:n.toJSON();if(e){for(const t of s.address_components||[]){const n=s.place_id;if(t.types.some((e=>"street_number"===e))&&n){const t=(0,u.pg)(e).geometry,s=["id","disabled"],n=await T.rpc("estates_intersecting_with_geography",{geometry:t}).select(s.join(",")).eq("disabled",!1).limit(1).maybeSingle();N("[useIsomorphicLayoutEffect#handler] got for estate query: %o: %O",t,n);const a=n.data;if(L&&a)return void L(a)}}N("[useIsomorphicLayoutEffect#handler] position is: %o",e),Y((0,u.pg)(e).geometry),H(k.Tk)}}})).remove}),[T,L,Re,s]);const Fe=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w;const[s,n]=(0,a.useState)(null),[r,o]=(0,a.useState)(null),[i,l]=(0,a.useState)(null);return(0,a.useEffect)((()=>{const s=window.navigator;if(!s||!s.geolocation)return j("not supported"),void l(!1);if(l(!0),e){j("is supported and will enable");const e=e=>{n(e),o(null)},a=e=>{o(e)},r=s.geolocation.watchPosition(e,a,t);return()=>s.geolocation.clearWatch(r)}j("is supported but won't enable")}),[e,t.enableHighAccuracy,t.timeout,t.maximumAge]),{position:s,supported:i,error:r}}(!!M&&M>0),Oe=Fe.position&&(0,u.K_)(Fe.position.coords),We=(0,a.useRef)(Oe);We.current=Oe;return(0,m.g)((()=>{if(!Oe)throw new Error;ye(Oe,k.R7,!0)}),[ye,Oe]),(0,a.useEffect)((()=>{const e=We.current;e&&ye(e,k.R7,!0)}),[ye,M]),Ce?(0,n.jsx)(b.am,{options:Ne,mapTypeId:Ee,disabled:le,zoom:J,center:Se,onLoad:z,onZoomChanged:ge,onBoundsChanged:ve,blocks:Q?de:null,classifications:te?ce:null,classificationsMode:B,divisions:oe,divisionsMode:$?"solid":"outline",estates:ee?me:null,estatesSelected:ae,...P,onClickEstate:_e,onClickBlock:be,onClickDivision:ke,onRightClickEstate:je,children:Oe&&(0,n.jsx)(_.r,{id:"user",geometry:Oe.geometry,icon:"/icons/user-position.svg",onItemClick:()=>{Oe&&ye(Oe,k.R7,!0)},clickable:!0})}):null}const O=a.memo(F)},96635:function(e,t,s){"use strict";s.d(t,{J:function(){return r}});var n=s(4812),a=s(39011);function r(e,t){return(0,n.Z)((async()=>{if(!e||!t)return null;const s=await Promise.all((0,a.Up)(e,(async e=>{const s=e.id,n=e.geography_gis;return n?[s,await t.load({id:s,polygon:n})]:[s,null]})));return new Map(s)}),[t,e])}},93257:function(e,t,s){"use strict";s.d(t,{B:function(){return d}});var n=s(2784),a=s(28192),r=s(99798),o=s.n(r),i=s(32469),l=s(13212);const c=(0,i.Z)("use-google-geocoder");function d(e){return(0,n.useMemo)((()=>{if(!e)return null;return new(o())((async t=>{const s=new e.maps.Geocoder,n=t.map((async e=>{const t=e.polygon,n=a.MqI(t),r=(0,l.Fc)(n.geometry.coordinates),[o]=await async function(e,t){return await new Promise((s=>{e.geocode(t,((e,n)=>(c("[GEOSEARCH] for '%o' got: %o",t,e),s(e||[]))))}))}(s,{location:r});return o}
1));return Promise.all(n)}),{cacheKeyFn:e=>e.id})}),[e])}},59071:function(e,t,s){"use strict";s.d(t,{g:function(){return a}});var n=s(2784);function a(e,t){const s=(0,n.useRef)(!1),a=(0,n.useRef)(e);return a.current=e,(0,n.useEffect)((()=>{if(!s.current)try{const e=a.current();return s.current=!0,e}catch(e){}}),t),s.current}},98982:function(e,t,s){"use strict";s.d(t,{n:function(){return a}});var n=s(52123);function a(e,t){return(0,n.jd)(e,t)}},6572:function(e,t,s){"use strict";s.d(t,{v:function(){return d}});var n=s(2784),a=s(5632),r=s(32469),o=s(18994);const i=(0,r.Z)("use-query-state"),l={shallow:!0},c={pathname:!0,search:!0,hash:!0};function d(e,t){let s=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=(0,a.useRouter)(),d=(0,n.useRef)(r);d.current=r;const[,u]=(0,n.useState)(0),m=r.query[e]||t,f=(0,n.useCallback)((function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"replace",a=arguments.length>2?arguments[2]:void 0;const r=d.current,m=(0,o.O5)(r.asPath,"https://example.com"),f=m.searchParams,p=f.get(e),x=a||s;if(i("[useCallback] param '%s' for mode '%s' will set: %s -> %s (forced: %s)",e,n,p,t,x),p===t)return;null!==t&&void 0!==t&&""!==t?f.set(e,t):f.delete(e);const g=(0,o.Su)(m,c);"push"===n?r.push(g,void 0,l):"replace"===n&&r.replace(g,void 0,l),x&&u((e=>e+1))}),[e,s]);return[m,f]}},4812:function(e,t,s){"use strict";s.d(t,{Z:function(){return r}});var n=s(2784),a=s(66088);function r(e,t){void 0===t&&(t=[]);var s=(0,a.Z)(e,t,{loading:!0}),r=s[0],o=s[1];return(0,n.useEffect)((function(){o()}),[o]),r}},52579:function(e,t,s){"use strict";var n=s(2784);const a=n.forwardRef((function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))}));t.Z=a},29386:function(e,t,s){"use strict";var n=s(2784);const a=n.forwardRef((function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 10V3L4 14h7v7l9-11h-7z"}))}));t.Z=a},2048:function(e,t,s){"use strict";var n=s(2784);const a=n.forwardRef((function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"}))}));t.Z=a},85619:function(e,t,s){"use strict";var n=s(2784);const a=n.forwardRef((function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))}));t.Z=a},77263:function(e,t,s){"use strict";var n=s(2784);const a=n.forwardRef((function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"}))}));t.Z=a}},function(e){e.O(0,[2842,4688,480,6253,5873,9097,6577,1268,3955,3850,3324,8192,5087,1759,3813,6404,2410,2725,220,6750,7710,2773,3245,7887,9774,2888,179],(function(){return t=86129,e(e.s=t);var t}));var t=e.O();_N_E=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.