PageSourceSearch

https://homesilo-africa.vercel.app/_next/static/chunks/pages/m/listing/files/edit-5373158342ffd340.js

js homesilo-africa.vercel.app collected 2026-10-03 07:05:09 UTC 8,116 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4558],{93024:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/m/listing/files/edit",function(){return t(31586)}])},73972:function(e,n,t){"use strict";var r=t(85893),a=(t(67294),function(e){var n=e.message,t=e.title,a=(e.infoButton,e.closeButton),s=e.onClose,i=(e.onInfo,e.type);return(0,r.jsxs)("div",{id:"alert-additional-content-1",className:"success"===i?"absolute flex flex-col justify-center items-center z-[500] w-[90%] md:w-[400px] p-4 mb-4 border border-blue-300 rounded-lg bg-blue-50 dark:bg-blue-300":"absolute flex flex-col justify-center items-center z-[500] w-[90%] md:w-[400px] p-4 mb-4 border border-red-300 rounded-lg bg-red-50 dark:bg-red-300",role:"alert",children:[(0,r.jsxs)("div",{className:"flex flex-col justify-center items-center",children:[(0,r.jsx)("svg",{"aria-hidden":"true",className:"w-5 h-5 mr-2 text-siloBlack animate-bounce",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})}),(0,r.jsx)("span",{className:"sr-only",children:"Info"}),(0,r.jsx)("h3",{className:"text-lg font-medium text-siloBlack font-cambon",children:t})]}),(0,r.jsx)("div",{className:"mt-2 mb-4 text-sm text-center text-siloBlack font-graphik",children:n}),(0,r.jsx)("div",{className:"flex font-graphik",children:(0,r.jsx)("button",{onClick:s,type:"button",className:"text-siloBlack bg-transparent border border-blue-900 hover:bg-blue-900 hover:text-white focus:ring-4 focus:outline-none focus:ring-blue-200 font-medium rounded-lg text-xs px-8 py-3 text-center dark:border-blue-800 dark:text-blue-800 dark:hover:text-white","data-dismiss-target":"#alert-additional-content-1","aria-label":"Close",children:a})})]})});a.defaultProps={type:"success"},n.Z=a},73286:function(e,n,t){"use strict";t.d(n,{OK:function(){return d},a7:function(){return l}});var r=t(7297),a=t(17283);function s(){var e=(0,r.Z)(["\nmutation CreateListing($createPropertyInput: CreatePropertyInput!) {\n  createListing(createPropertyInput: $createPropertyInput) {\n    _id\n  }\n}\n"]);return s=function(){return e},e}function i(){var e=(0,r.Z)(["\nmutation AddPropDocsMedia($createMediaSdkInput: CreatePropDocsMediaSdkInput!) {\n  addPropDocsMedia(createMediaSdkInput: $createMediaSdkInput) {\n    _id\n  }\n}\n"]);return i=function(){return e},e}function o(){var e=(0,r.Z)(["\nmutation AddPropDocument($documentInput: addPropDocumentInput!) {\n  addPropDocument(documentInput: $documentInput) {\n    document\n  }\n}\n"]);return o=function(){return e},e}var l=(0,a.Ps)(s()),d=(0,a.Ps)(i());(0,a.Ps)(o())},50695:function(e,n,t){"use strict";t.d(n,{f:function(){return s}});var r=t(7297);function a(){var e=(0,r.Z)(["\nquery FetchListing($propertyId: String!) {\n  fetchListing(property_id: $propertyId) {\n    _id\n    temp_id\n    address_line_1\n    city\n    country\n    currency\n    landmark_1\n    landmark_2\n    landmark_3\n    like_count\n    listing_purpose\n    listing_status\n    listing_type\n    listing {\n      ... on HomeQueryResponse {\n        _id\n        amenity_cctv\n        amenity_fully_tiled\n        amenity_garage\n        amenity_parking_space\n        amenity_prepaid_meter\n        amenity_security\n        amenity_smart_lock\n        amenity_stable_electricity\n        amenity_water_supply\n        created_at\n        home_type\n        isHome\n        no_of_bathroom\n        no_of_bedroom\n        no_of_toilet\n        security_deposit_fee\n        updated_at\n      }\n\n      ... on LandQueryResponse {\n        _id\n        created_at\n        isLand\n        length\n      \n      \n        updated_at\n        width\n      }\n    }\n    media {\n      media_urls\n      document_type\n      __typename\n    }\n    preview_image\n    price\n    state\n    property_slug\n    title\n    description\n    updated_at\n    zipcode\n    __typename\n  }\n}\n\n"]);return a=function(){return e},e}var s=(0,t(17283).Ps)(a())},31586:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return P}});var r=t(85893),a=t(11163),s=t(67294),i=t(33851),o=t(10253),l=t(47568),d=t(26042),c=t(69396),u=t(828),p=t(97582),m=t(25675),f=t.n(m),h=t(32512),g=t(37887),x=t(50319),_=t(37951),y=t(77843),b=t(74392),v=t(63827),j=t(50695),k=t(57745),w=t(73286),N=t(73972),I=function(){var e=(0,s.use
1State)(!1),n=e[0],t=(e[1],(0,s.useState)(!1)),i=t[0],o=t[1],m=(0,a.useRouter)(),I=m.query.propertyID,P=(0,g.a)(j.f,{variables:{propertyId:I}}),D=(P.data,P.loading,P.error,(0,k.Z)()),Z=D.uploading,C=D.imageLinks,B=D.previewUrls,S=D.handleUpload,M=(D.handleDelete,(0,h.uI)({maxSize:5242880,onDrop:S,multiple:!0})),$=M.getRootProps,L=M.getInputProps,z=M.isDragActive,E=(0,u.Z)((0,x.D)(w.OK,{variables:{createMediaSdkInput:{media_urls:C,property_id:I,media_type:"IMAGE"}},onCompleted:function(e){e&&m.push({pathname:"/m/listing/verify/edit",query:{propertyID:I}})}}),2),R=E[0],U=E[1],A=(U.data,U.loading),O=U.error,q=U.called;function F(){return(F=(0,l.Z)((function(e){var n;return(0,p.__generator)(this,(function(t){switch(t.label){case 0:e.preventDefault(),t.label=1;case 1:return t.trys.push([1,5,,6]),C.length>2?[4,R()]:[3,3];case 2:t.sent(),t.label=3;case 3:return[4,_.Z.resetStore()];case 4:return t.sent(),[3,6];case 5:return n=t.sent(),console.log(n),[3,6];case 6:return[2]}}))}))).apply(this,arguments)}var H=function(){o(!1),m.push("/m/properties")};return n?(0,r.jsx)("section",{className:"flex justify-center p-8 w-full",children:(0,r.jsx)(N.Z,{open:i,onInfo:function(){return H()},onClose:function(){return H()},title:"Details updated!",infoButton:"Start exploring",closeButton:"Okay, Close",message:""})}):(0,r.jsxs)(r.Fragment,{children:[O&&(0,r.jsx)(b.Z,{status:"error",message:O.message}),!O&&!A&&q&&(0,r.jsx)(b.Z,{status:"success",message:"Images Updated"}),(0,r.jsx)("section",{className:"listing_page w-full",children:(0,r.jsxs)("div",{className:"inputs",children:[(0,r.jsx)("h3",{className:"text-siloBlack opacity-75 font-cambon text-[18px] m:text-[32px] leading-[120%]",children:"Update Listing Photos (3/4)"}),(0,r.jsxs)("div",{className:"mt-[3rem]",children:[(0,r.jsxs)("div",(0,c.Z)((0,d.Z)({},$()),{className:!Z&&B.length>2&&C.length>2?"hidden":"w-full text-center p-5 cursor-pointer shadow-md md:h-[200px] bg-white hover:bg-siloSky border-2 border-gray-300 hover:border-siloBlue flex flex-col md:items-center md:justify-center rounded-md",children:[(0,r.jsx)("input",(0,c.Z)((0,d.Z)({},L()),{accept:"image/png, image/jpeg, image/jpg"})),Z?(0,r.jsx)(v.$,{message:"Uploading",color:"blue"}):z?(0,r.jsx)("p",{className:"font-cambon",children:"Almost there, drop the file(s) here..."}):(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"mb-2",children:"Drag and drop some files here, or click to select files"}),(0,r.jsxs)("ul",{className:"mt-5 list-disc list-inside text-[12px] md:text-[14px] font-graphik",children:[(0,r.jsx)("li",{children:"Each image should not exceed 20 MB "}),(0,r.jsx)("li",{children:"Do not upload image with white background "}),(0,r.jsx)("li",{children:"Upload at least 3 images and not more than 5"})]})]})]})),(0,r.jsx)("div",{className:"flex flex-row flex-wrap gap-3",children:B.map((function(e,n){return(0,r.jsx)("div",{className:"flex flex-row my-3 mr-1",children:(0,r.jsx)("span",{className:"relative",children:(0,r.jsx)(f(),{src:e,alt:"uploaded image ".concat(n+1),width:100,height:100,className:"rounded-md"})})},n)}))}),B.length>2&&B.length<6&&!Z&&(0,r.jsx)(y.Z,{disabled:A,variant:"contained",ClassName:"bg-siloBlue mt-5",onClick:function(e){return F.apply(this,arguments)},children:A?(0,r.jsx)(v.$,{message:"saving..."}):"Save Images"})]})]})})]})},P=function(){(0,a.useRouter)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.h,{title:"Upload Documents | My Dashboard"}),(0,r.jsx)(i.Z,{children:(0,r.jsx)(I,{})})]})}}},function(e){e.O(0,[436,604,4282,1737,8703,9669,25,3207,2822,9774,2888,179],(function(){return n=93024,e(e.s=n);var n}));var n=e.O();_N_E=n}]);

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.