1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3043],{61782:function(e,t,a){"use strict";var n=a(62086);t.Z=function(e){var t=e.color,a=void 0===t?"#E1BBB4":t,r=(e.width,e.height);return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:r||"19",height:r||"19",viewBox:"0 0 24 24",fill:"none",children:[(0,n.jsx)("g",{clipPath:"url(#clip0_144_1339)",children:(0,n.jsx)("path",{d:"M20.62 8.45C20.1763 6.5104 19.0758 4.78381 17.5048 3.56276C15.9338 2.34171 13.9891 1.70129 12 1.75H11.99C10.0022 1.70042 8.05828 2.33927 6.48743 3.55841C4.91658 4.77755 3.81528 6.50207 3.36997 8.44C2.19997 13.6 5.35997 17.97 8.21997 20.72C9.23163 21.7012 10.5856 22.25 11.995 22.25C13.4043 22.25 14.7583 21.7012 15.77 20.72C18.63 17.97 21.79 13.61 20.62 8.45ZM12 13.46C11.377 13.46 10.7679 13.2753 10.2499 12.9291C9.73191 12.583 9.32817 12.091 9.08975 11.5155C8.85134 10.9399 8.78896 10.3065 8.9105 9.69546C9.03204 9.08442 9.33205 8.52315 9.77259 8.08261C10.2131 7.64208 10.7744 7.34207 11.3854 7.22052C11.9965 7.09898 12.6298 7.16136 13.2054 7.39978C13.781 7.63819 14.273 8.04194 14.6191 8.55995C14.9652 9.07797 15.15 9.68699 15.15 10.31C15.15 11.1454 14.8181 11.9466 14.2274 12.5374C13.6366 13.1281 12.8354 13.46 12 13.46Z",fill:a})}),(0,n.jsx)("defs",{children:(0,n.jsx)("clipPath",{id:"clip0_144_1339",children:(0,n.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]})}},43043:function(e,t,a){"use strict";a.r(t);var n=a(57135),r=a(59072),i=a(15767),o=a(62086),l=a(93236),s=a(44234),c=a(49177),d=a(61782),u=a(83803),p=a(39808),f=a(18574),g=a(24695),v=a(44217),h=a(34951),b=a.n(h),m=a(61423),x=a.n(m),y=a(56691),C=a(89232),j=a(91915),N=(a(36141),a(70846)),w=a(37358),k=a.n(w),P=a(55803),L=a(45684),_=x()((function(){return Promise.all([a.e(2207),a.e(2098),a.e(3505),a.e(4387),a.e(1103),a.e(7836)]).then(a.bind(a,27836))}),{loadableGenerated:{webpack:function(){return[27836]}},ssr:!1}),E=x()((function(){return Promise.all([a.e(4911),a.e(1615)]).then(a.bind(a,71615))}),{loadableGenerated:{webpack:function(){return[71615]}},ssr:!1,priority:!0}),O=l.memo((function(){return(0,o.jsxs)("div",{className:"particularJobCard w-100 p-3 bg-white mb-3",style:{borderRadius:"10px"},children:[(0,o.jsx)(C.Z,{height:30,className:"w-100 m-0 mb-2"}),(0,o.jsx)(C.Z,{height:22,className:"w-75 m-0 mb-3"}),(0,o.jsxs)("div",{className:"d-flex gap-3 justify-content-between mb-2",children:[(0,o.jsx)(C.Z,{height:20,className:"w-25 m-0"}),(0,o.jsx)(C.Z,{height:20,className:"w-25 m-0"})]}),(0,o.jsxs)("div",{className:"d-flex gap-3 justify-content-between mb-3",children:[(0,o.jsx)(C.Z,{height:20,className:"w-50 m-0"}),(0,o.jsx)(C.Z,{height:20,className:"w-50 m-0"})]}),(0,o.jsxs)("div",{className:"d-flex gap-3 justify-content-between",children:[(0,o.jsx)(C.Z,{height:30,className:"w-50 m-0"}),(0,o.jsx)(C.Z,{height:30,className:"w-50 m-0"})]})]})}));O.displayName="ShimmerCard";t.default=function(e){var t,a,h=(0,r.Z)((0,j.Z)(),2),m=h[0],x=h[1],C=(0,f.useRouter)(),w=e.slugData,S=e.isMobile,D=(0,l.useState)(""),R=D[0],T=D[1],B=(0,l.useState)(!1),I=B[0],A=B[1],H=(0,l.useMemo)((function(){return[{value:"CREATED",label:m.acitve_jobs},{value:"CLOSED",label:m.closed_jobs}]}),[m]);(0,l.useEffect)((function(){if(null===C||void 0===C?void 0:C.isReady){var e,t,a=new URLSearchParams(C.asPath.split("?")[1]||""),n=a.get("jobId"),r=a.get("afterJobPosting");A("true"===r),T(n||(null===(t=null===w||void 0===w||null===(e=w[2])||void 0===e?void 0:e.split("="))||void 0===t?void 0:t[1])||(null===w||void 0===w?void 0:w[2])||"")}}),[w,C]);var M=(0,l.useState)(H[0]),F=M[0],Z=M[1],J=(0,l.useState)(!1),q=J[0],V=J[1],G=(0,l.useState)([]),Y=G[0],z=G[1],U=(0,l.useState)({}),W=U[0],K=U[1],Q=(0,l.useState)(""),X=Q[0],$=Q[1],ee=(0,l.useState)(1),te=ee[0],ae=ee[1],ne=(0,l.useState)(0),re=ne[0],ie=ne[1],oe=((0,N.H)().handleHomePageRoute,(0,l.useRef)(null)),le=(0,l.useState)(null),se=le[0],ce=le[1],de=(0,l.useCallback)(function(){var e=(0,n.Z)((function(e){var t,a,n,r,o,l=arguments;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:t=l.length>1&&void 0!==l[1]?l[1]:0,a=10*t,V(!0),z([]),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,(0,c.getJobsData)(F.value,e,a)];case 2:return o=i.sent(),z(null===o||void 0===o||null===(n=o.data)||void 0===n?void 0:n.data),ie((null===o||void 0===o||null===(r=o.data)||void 0===r?void 0:r.totalCount)/10),[3,5];case 3:return i.sent(),[3,5];case 4:return V(!1),[7];case 5:return[2]}}
1))}));return function(t){return e.apply(this,arguments)}}(),[F.value]),ue=(0,l.useMemo)((function(){return(0,y.Ds)((function(e){return de(e)}),500)}),[de]),pe=(0,l.useCallback)((function(e){var t=e.selected;ae(t),de("",t)}),[de]),fe=(0,l.useCallback)((function(e){$(e.target.value)}),[]),ge=(0,l.useCallback)((function(e){K(e),T(e.jobId);var t="/profile/job-postings?jobId=".concat(e.jobId);C.push(t,void 0,{shallow:!0})}),[C]),ve=(0,l.useCallback)((function(){T(""),A(!1),K({}),S&&C.push("/profile/job-postings",void 0,{shallow:!0})}),[S,C]),he=(0,l.useCallback)((function(e){e.value!==F.value&&(Z(e),ie(0),ae(0))}),[F.value]);(0,l.useEffect)((function(){de(X)}),[F]),(0,l.useEffect)((function(){X.length&&ue(X)}),[X]);var be=(0,l.useMemo)((function(){return null===Y||void 0===Y?void 0:Y.map((function(e){var t,a;return{lat:null===e||void 0===e||null===(t=e.jobLocation)||void 0===t?void 0:t.latitude,lng:null===e||void 0===e||null===(a=e.jobLocation)||void 0===a?void 0:a.longitude,jobTitle:null===e||void 0===e?void 0:e.jobTitle,jobId:null===e||void 0===e?void 0:e.jobId}}))}),[Y]),me=(0,l.useMemo)((function(){var e,t,a,n,r,i;return se?{lat:null===se||void 0===se||null===(e=se.jobLocation)||void 0===e?void 0:e.latitude,lng:null===se||void 0===se||null===(t=se.jobLocation)||void 0===t?void 0:t.longitude}:(null===Y||void 0===Y?void 0:Y.length)>0?{lat:null===(a=Y[0])||void 0===a||null===(n=a.jobLocation)||void 0===n?void 0:n.latitude,lng:null===(r=Y[0])||void 0===r||null===(i=r.jobLocation)||void 0===i?void 0:i.longitude}:P.ByO}),[Y,se]),xe=function(e){var t,a,n=document.getElementById(null===e||void 0===e?void 0:e.jobId);(null===oe||void 0===oe?void 0:oe.current)&&n&&(null===oe||void 0===oe||null===(t=oe.current)||void 0===t||t.scrollTo({top:(null===n||void 0===n?void 0:n.offsetTop)-(null===oe||void 0===oe||null===(a=oe.current)||void 0===a?void 0:a.offsetTop)-50,behavior:"smooth"}),ce(e))};return(0,o.jsxs)(o.Fragment,{children:[(null===R||void 0===R?void 0:R.length)>0&&!S&&(0,o.jsx)("div",{className:"d-none d-lg-block",children:(0,o.jsx)(_,{setlectedItem:W,selectedJobId:R,isMobile:S,afterJobPosting:I})}),(!(null===R||void 0===R?void 0:R.length)||S)&&(0,o.jsxs)("div",{className:"job-postings profileDetails h-100 mb-3 mb-lg-0 mt-2 mt-lg-0 mx-0 mx-lg-3 d-flex flex-column gap-4 gap-lg-0",children:[(0,o.jsxs)("div",{className:"w-100 m-0 d-block job-posting-header pb-3 px-3 bg-white",children:[(0,o.jsx)("div",{className:"col-12 col-md-6 p-0 mb-0",children:(0,o.jsx)("div",{className:"d-flex",children:(0,o.jsx)("h6",{className:"font-weight-700 h20 h25-lg font_Circular_Std pt-2 mb-3",children:null===m||void 0===m?void 0:m.job_postings})})}),(0,o.jsxs)("div",{className:"w-100 p-0 text-right pr-0 d-flex flex-column flex-lg-row justify-content-between align-items-end gap-3",children:[(0,o.jsxs)("div",{className:"d-flex justify-content-lg-start justify-content-between gap-3 col-12 col-xl-4 col-lg-5 px-0",children:[(0,o.jsx)(s.default,{className:"".concat("CREATED"==F.value?"btn text-dark bg-grey":"text-grey bg-white"," flex-grow-1 flex-grow-lg-0 border-bottom-grey px-5 py-2 tab"),buttonText:m.active,style:{borderRadius:"7px"},onClick:function(){he(H[0])},containerClassName:"".concat(S?"w-100":"")}),(0,o.jsx)(s.default,{className:"".concat("CLOSED"==F.value?"btn text-dark bg-grey":"text-grey bg-white"," flex-grow-1 flex-grow-lg-0 border-bottom-grey px-4 py-2 tab"),buttonText:m.closed_jobs,style:{borderRadius:"7px"},onClick:function(){he(H[1])},containerClassName:"".concat(S?"w-100":"")})]}),(null===Y||void 0===Y?void 0:Y.length)>0&&(0,o.jsxs)("div",{className:"position-relative searchBar",children:[(0,o.jsx)("div",{className:"position-absolute d-md-flex d-none searchIcon",children:(0,o.jsx)(b(),{src:v.tMf,alt:"search",title:"search icon",height:25,width:25})}),(0,o.jsx)("div",{className:"position-absolute d-flex d-md-none searchIcon",children:(0,o.jsx)(b(),{src:v.tMf,alt:"search",title:"search icon",height:20,width:20})}),(0,o.jsx)("input",{type:"text",placeholder:m.search_for_a_job,style:{outline:"none"},className:"search-input border-bottom-grey py-2 pr-2 pl-5 w-100",value:X,onChange:fe})]})]})]}),(0,o.jsxs)("div",{className:"w-100 m-0 d-flex px-0",children:[(0,o.jsxs)("div",{className:"col-12 col-md-5 p-0",children:[(0,o.jsx)("div",{ref:oe,className:"px-3 pt-lg-3 pt-0 cardListParent h-100",style:{backgroundColor:"#F5F5FB",overflowY:(null===Y||void 0===Y?void 0:Y.length)>1?"scroll":"hidden",maxHeight:(null===Y||void 0===Y?void 0:Y.length)>0&&"600px",minHeight:(null===Y||void 0===Y?void 0:Y.length)<3&&"600px"},children:(null===Y||void 0===Y?void 0:Y.length)>0?(0,o.jsx)(o.Fragment,{children:null===Y||void 0===Y?void 0:Y.map((function(e,t){var a;return(0,o.jsxs)("div",{id:null===e||void 0===e?void 0:e.jobId,className:"particularJobCard w-100 p-3 bg-white mb-3 ".concat((null===se||void 0===se?void 0:se.jobId)===(null===e||void 0===e?void 0:e.jobId)?"map-clicked-scale":""),style:{borderRadius:"10px"},onClick:function(){return xe(e)},children:["CREATED"==(null===F||void 0===F?void 0:F.value)?(0,o.jsxs)("div",{className:"applicantsCount center mb-2 h10 h12-lg",children:[e.numberOfApplicant," ",m.applicants]}):(0,o.jsx)("div",{className:"currentStatus center mb-2 text-capitalize h12 h14-lg",children:(0,P.Do2)(null===(a=e.currentStatus)||void 0===a?void 0:a.toLowerCase())}),(0,o.jsxs)("div",{className:"d-flex justify-content-between align-items-start mb-3",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:"font-Oswald-Medium font-weight-500 h18-lg h16 mb-1",children:e.jobTitle}),(0,o.jsxs)("div",{className:"jobLocation font_Circular_Std h15 dark-gray-color",children:[(0,o.jsx)(d.Z,{color:"#707070",height:18}),e.jobLocation.fullAddress]})]}),(0,o.jsx)("div",{className:"budgetRange font-Oswald-Medium font-weight-500 h25-lg h20 center",style:{color:"#45C917"},children:(0,g.UIC)(e.budget)})]}),(0,o.jsxs)("div",{className:"d-flex justify-content-between mb-3",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:"font_Circular_Std h15 dark-gray-color",children:m.start_date}),(0,o.jsx)("div",{className:"font_Circular_Std h18",children:(0,p.ZP)(null===e||void 0===e?void 0:e.startDate).locale(x).format(null===P.a1z||void 0===P.a1z?void 0:P.a1z.ddd_MM_DD_YYYY)})]}),(0,o.jsxs)("div",{className:"d-flex flex-column align-items-end",children:[(0,o.jsx)("div",{className:"font_Circular_Std h15 dark-gray-color",children:m.duration}),(0,o.jsxs)("div",{className:"font_Circular_Std h18",children:[e.JobDuration," ",1==e.JobDuration?"day":"days"]})]})]}),(0,o.jsxs)("div",{className:"d-flex justify-content-between align-items-center flex-wrap gap-2",children:[(0,o.jsx)(s.default,{className:"bg-theme-secondary d-flex py-2 px-3_5 center h6-lg h12 text-white text-capitalize rounded-pill border-bottom-grey",buttonText:"CREATED"==(null===F||void 0===F?void 0:F.value)?m.view_applications:m.view_details,onClick:function(t){t.stopPropagation(),ge(e)},containerClassName:"h-100"}),(0,o.jsx)(s.default,{className:"d-flex py-2 center px-2 h6-lg h12 bg-grey rounded border-bottom-grey",buttonText:"".concat(m.hired," ").concat(e.numberOfWorkerFill,"/").concat(e.numberOfWorkersRequired," ").concat(m.workers)})]})]},t)}))}):q?null===(a=null===(t=Array(3))||void 0===t?void 0:t.fill(0))||void 0===a?void 0:a.map((function(e,t){return(0,o.jsx)(O,{},t)})):(0,o.jsx)(u.Z,{message:"".concat(m.no," ").concat(F.label," ").concat(m.found)})}),(0,o.jsx)("div",{className:"w-100 p-lg-2 p-1",children:re>0&&(0,o.jsx)(k(),{previousLabel:"<",nextLabel:">",breakLabel:"...",breakClassName:"break-me",breakLinkClassName:"text-black",pageCount:re,marginPagesDisplayed:2,pageRangeDisplayed:2,onPageChange:pe,containerClassName:"pagination",subContainerClassName:"pages pagination",activeClassName:"active-pagination",pageClassName:"pageNumber",forcePage:te,disabledClassName:"disabled"})})]}),(0,o.jsx)("div",{className:"col-7 d-none d-md-flex center position-relative",children:(0,o.jsx)("div",{className:"mapParent position-relative rounded",children:(0,o.jsx)(E,{center:me,listLatLong:be,locale:m,containerHeight:"600px",zoom:15,handleMarkerClick:xe,fullscreenControl:!0,seoScreen:!0})})})]})]}),S&&(0,o.jsx)(L.default,{open:!!(null===R||void 0===R?void 0:R.length),onClose:ve,anchor:"right",fullScreen:!0,className:"job-application-drawer",closeIcon:!1,children:(0,o.jsx)("div",{className:"job-application-drawer__content h-100 overflow-auto bg-white",children:(0,o.jsx)(_,{setlectedItem:W,selectedJobId:R,isMobile:S,afterJobPosting:
1I,onBack:ve,inDrawer:!0})})}),(0,o.jsx)("style",{children:"\n\t\t\t\t.job-postings{\n\t\t\t\t\tbackground-color: #F5F5FB;\n\t\t\t\t}\n\t\t\t\t.job-posting-header{\n\t\t\t\t box-shadow: 0px 4px 10px 0px #787D8414;\n\t\t\t\t}\n\t\t\t\t.map-clicked-scale{\n\t\t\t\t\ttransform: scale(1.02);\n\t\t\t\t\tborder: 1px solid black;\n\t\t\t\t\tborder-radius: 10px !important;\n\t\t\t\t\ttransition: all 0.3s ease-in-out;\n\t\t\t\t\tbox-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);\n\t\t\t\t}\n\t\t\t\t.mapParent{\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tmin-height: 400px;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\t\t\t\t.applicantsCount{\n\t\t\t\t\tpadding: 4px;\n\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\tborder: 1px solid #F5E13080;\n\t\t\t\t\tcolor: #6B6500;\n\t\t\t\t\tbackground-color: #F5E1301A;\n\t\t\t\t}\n\t\t\t\t.currentStatus{\n\t\t\t\t\tpadding: 4px 8px;\n\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\tborder: 0px solid #fff;\n\t\t\t\t\tcolor: #5D76FF;\n\t\t\t\t\tbackground: #5D76FF33;\n\t\t\t\t\twidth: fit-content;\n\t\t\t\t}\n\t\t\t\t.searchIcon{\n\t\t\t\t\ttop:7px;\n\t\t\t\t\tleft: 15px;\t\t\t\t\n\t\t\t\t}\n\t\t\t\t.searchBar{\n\t\t\t\t height: 44px;\n\t\t\t\t\twidth: 247px;\n\t\t\t\t\tborder-radius: 7px;\n\t\t\t\t}\n\t\t\t\t.tab{\n\t\t\t\t\tmax-width:160px;\n\t\t\t\t\twidth:100%;\n\t\t\t\t}\n\t\t\t\t.pagination{\n\t\t\t\t\tgap: 0.75rem;\n\t\t\t\t}\n\t\t\t\t@media(max-width:768px){\n\t\t\t\t\t.searchIcon{\n\t\t\t\t\t\ttop:10px;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t@media(max-width:967px){\n\t\t\t\t\t.searchBar{\n\t\t\t\t\t\twidth:100%;\n\t\t\t\t\t}\n\t\t\t\t\t.pagination {\n\t\t\t\t\t\tgap: 0.75rem;\n\t\t\t\t\t\tjustify-content: center !important;\n\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t}\n\t\t\t\t\t.tab{\n\t\t\t\t\t\tmax-width:100%;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t.pageNumber{\n\t\t\t\t\tgap: 1.25rem;\n\t\t\t\t\tpadding: 5px;\n\t\t\t\t}\n\t\t\t\t.active-pagination{\n\t\t\t\t\tbackground-color: black;\n\t\t\t\t}\n\t\t\t\t.active-pagination > a{\n\t\t\t\t\tcolor: white!important;\n\t\t\t\t}\n\t\t\t\t.disabled.disabled > a{\n\t\t\t\t\tcolor: #8c8c8c !important;\n\t\t\t\t\tcursor: not-allowed !important;\n\t\t\t\t}\n\t\t\t\t.job-application-drawer__content {\n\t\t\t\t\tmin-height: 100dvh;\n\t\t\t\t}\n\t\t\t\t"})]})}},37358:function(e,t,a){var n;a.g,e.exports=(n=a(93236),function(e){var t={};function a(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}return a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=4)}([function(e,t,a){e.exports=a(2)()},function(e,t){e.exports=n},function(e,t,a){"use strict";var n=a(3);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,a,r,i,o){if(o!==n){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var a={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}},function(e,t,a){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,a,n){"use strict";n.r(a);var r=n(1),i=n.n(r),o=n(0),l=n.n(o);function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}var c=function(e){var t=e.pageClassName,a=e.pageLinkClassName,n=e.page,r=e.selected,o=e.activeClassName,l=e.activeLinkClassName,c=e.getEventListener,d=e.pageSelectedHandler,u=e.href,p=e.extraAriaContext,f
1=e.ariaLabel||"Page "+n+(p?" "+p:""),g=null;return r&&(g="page",f=e.ariaLabel||"Page "+n+" is your current page",t=void 0!==t?t+" "+o:o,void 0!==a?void 0!==l&&(a=a+" "+l):a=l),i.a.createElement("li",{className:t},i.a.createElement("a",s({role:"button",className:a,href:u,tabIndex:"0","aria-label":f,"aria-current":g,onKeyPress:d},c(d)),n))};c.propTypes={pageSelectedHandler:l.a.func.isRequired,selected:l.a.bool.isRequired,pageClassName:l.a.string,pageLinkClassName:l.a.string,activeClassName:l.a.string,activeLinkClassName:l.a.string,extraAriaContext:l.a.string,href:l.a.string,ariaLabel:l.a.string,page:l.a.number.isRequired,getEventListener:l.a.func.isRequired};var d=c;function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}!function(){var e="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0;if(e){var n=void 0!==a?a:t;if(n)if("function"!=typeof n){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=void 0;try{i=n[r]}catch(e){continue}e.register(i,r,"/home/adele/workspace/react-paginate/react_components/PageView.js")}}else e.register(n,"module.exports","/home/adele/workspace/react-paginate/react_components/PageView.js")}}();var p=function(e){var t=e.breakLabel,a=e.breakClassName,n=e.breakLinkClassName,r=e.breakHandler,o=e.getEventListener,l=a||"break";return i.a.createElement("li",{className:l},i.a.createElement("a",u({className:n,role:"button",tabIndex:"0",onKeyPress:r},o(r)),t))};p.propTypes={breakLabel:l.a.oneOfType([l.a.string,l.a.node]),breakClassName:l.a.string,breakLinkClassName:l.a.string,breakHandler:l.a.func.isRequired,getEventListener:l.a.func.isRequired};var f=p;function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(){return(v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}function h(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,n=C(e);if(t){var r=C(this).constructor;a=Reflect.construct(n,arguments,r)}else a=n.apply(this,arguments);return x(this,a)}}function x(e,t){return!t||"object"!==g(t)&&"function"!=typeof t?y(e):t}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function C(e){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function j(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}!function(){var e="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0;if(e){var n=void 0!==a?a:t;if(n)if("function"!=typeof n){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=void 0;try{i=n[r]}catch(e){continue}e.register(i,r,"/home/adele/workspace/react-paginate/react_components/BreakView.js")}}else e.register(n,"module.exports","/home/adele/workspace/react-paginate/react_components/BreakView.js")}}();var N=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(o,e);var t,a,n,r=m(o);function o(e){var t,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),j(y(t=r.call(this,e)),"handlePreviousPage",(function(e){var a=t.state.selected;e.preventDefault?e.preventDefault():e.returnValue=!1,a>0&&t.handlePageSelected(a-1,e)})),j(y(t),"handleNextPage",(function(e){var a=t.state.selected,n=t.props.pageCount;e.preventDefault?e.preventDefault():e.returnValue=!1,a<n-1&&t.handlePageSelected(a+1,e)})),j(y(t),"handlePageSelected",(function(e,a){a.preventDefault?a.preventDefault():a.returnValue=!1,t.state.selected!==e&&(t.setState({selected:e}),t.callCallback(e))})),j(y(t),"getEventListener",(function(e){return j({},t.props.eventListener,e)})),j(y(t),"handleBreakClick",(function(e,a){a.preventDefault?a.preventDefault():a.returnValue=!1;var n=t.state.selected;t.handlePageSelected(n<e?t.getForwardJump():t.getBackwardJump(),a)})),j(y(t),"callCallback",(function(e){void 0!==t.props.onPageChange&&"function"==typeof t.props.onPageChange&&t.props.onPageChange({selected:e})})),j(y(t),"pagination",(function(){var e=[],a=t.props,n=a.pageRangeDisplayed,r=a.pageCount,o=a.marginPagesDisplayed,l=a.breakLabel,s=a.breakClassName,c=a.breakLinkClassName,d=t.state.selected;if(r<=n)for(var u=0;u<r;u++)e.push(t.getPageElement(u));else{var p,g,v,h=n/2,b=n-h;d>r-n/2?h=n-(b=r-d):d<n/2&&(b=n-(h=d));var m=function(e){return t.getPageElement(e)};for(p=0;p<r;p++)(g=p+1)<=o||g>r-o||p>=d-h&&p<=d+b?e.push(m(p)):l&&e[e.length-1]!==v&&(v=i.a.createElement(f,{key:p,breakLabel:l,breakClassName:s,breakLinkClassName:c,breakHandler:t.handleBreakClick.bind(null,p),getEventListener:t.getEventListener}),e.push(v))}return e})),a=e.initialPage?e.initialPage:e.forcePage?e.forcePage:0,t.state={selected:a},t}return t=o,(a=[{key:"componentDidMount",value:function(){var e=this.props,t=e.initialPage,a=e.disableInitialCallback,n=e.extraAriaContext;void 0===t||a||this.callCallback(t),n&&console.warn("DEPRECATED (react-paginate): The extraAriaContext prop is deprecated. You should now use the ariaLabelBuilder instead.")}},{key:"componentDidUpdate",value:function(e){void 0!==this.props.forcePage&&this.props.forcePage!==e.forcePage&&this.setState({selected:this.props.forcePage})}},{key:"getForwardJump",value:function(){var e=this.state.selected,t=this.props,a=t.pageCount,n=e+t.pageRangeDisplayed;return n>=a?a-1:n}},{key:"getBackwardJump",value:function(){var e=this.state.selected-this.props.pageRangeDisplayed;return e<0?0:e}},{key:"hrefBuilder",value:function(e){var t=this.props,a=t.hrefBuilder,n=t.pageCount;if(a&&e!==this.state.selected&&e>=0&&e<n)return a(e+1)}},{key:"ariaLabelBuilder",value:function(e){var t=e===this.state.selected;if(this.props.ariaLabelBuilder&&e>=0&&e<this.props.pageCount){var a=this.props.ariaLabelBuilder(e+1,t);return this.props.extraAriaContext&&!t&&(a=a+" "+this.props.extraAriaContext),a}}},{key:"getPageElement",value:function(e){var t=this.state.selected,a=this.props,n=a.pageClassName,r=a.pageLinkClassName,o=a.activeClassName,l=a.activeLinkClassName,s=a.extraAriaContext;return i.a.createElement(d,{key:e,pageSelectedHandler:this.handlePageSelected.bind(null,e),selected:t===e,page
1ClassName:n,pageLinkClassName:r,activeClassName:o,activeLinkClassName:l,extraAriaContext:s,href:this.hrefBuilder(e),ariaLabel:this.ariaLabelBuilder(e),page:e+1,getEventListener:this.getEventListener})}},{key:"render",value:function(){var e=this.props,t=e.disabledClassName,a=e.pageCount,n=e.containerClassName,r=e.previousLabel,o=e.previousClassName,l=e.previousLinkClassName,s=e.previousAriaLabel,c=e.nextLabel,d=e.nextClassName,u=e.nextLinkClassName,p=e.nextAriaLabel,f=this.state.selected,g=o+(0===f?" ".concat(t):""),h=d+(f===a-1?" ".concat(t):""),b=0===f?"true":"false",m=f===a-1?"true":"false";return i.a.createElement("ul",{className:n},i.a.createElement("li",{className:g},i.a.createElement("a",v({className:l,href:this.hrefBuilder(f-1),tabIndex:"0",role:"button",onKeyPress:this.handlePreviousPage,"aria-disabled":b,"aria-label":s},this.getEventListener(this.handlePreviousPage)),r)),this.pagination(),i.a.createElement("li",{className:h},i.a.createElement("a",v({className:u,href:this.hrefBuilder(f+1),tabIndex:"0",role:"button",onKeyPress:this.handleNextPage,"aria-disabled":m,"aria-label":p},this.getEventListener(this.handleNextPage)),c)))}}])&&h(t.prototype,a),n&&h(t,n),o}(r.Component);j(N,"propTypes",{pageCount:l.a.number.isRequired,pageRangeDisplayed:l.a.number.isRequired,marginPagesDisplayed:l.a.number.isRequired,previousLabel:l.a.node,previousAriaLabel:l.a.string,nextLabel:l.a.node,nextAriaLabel:l.a.string,breakLabel:l.a.oneOfType([l.a.string,l.a.node]),hrefBuilder:l.a.func,onPageChange:l.a.func,initialPage:l.a.number,forcePage:l.a.number,disableInitialCallback:l.a.bool,containerClassName:l.a.string,pageClassName:l.a.string,pageLinkClassName:l.a.string,activeClassName:l.a.string,activeLinkClassName:l.a.string,previousClassName:l.a.string,nextClassName:l.a.string,previousLinkClassName:l.a.string,nextLinkClassName:l.a.string,disabledClassName:l.a.string,breakClassName:l.a.string,breakLinkClassName:l.a.string,extraAriaContext:l.a.string,ariaLabelBuilder:l.a.func,eventListener:l.a.string}),j(N,"defaultProps",{pageCount:10,pageRangeDisplayed:2,marginPagesDisplayed:3,activeClassName:"selected",previousLabel:"Previous",previousClassName:"previous",previousAriaLabel:"Previous page",nextLabel:"Next",nextClassName:"next",nextAriaLabel:"Next page",breakLabel:"...",disabledClassName:"disabled",disableInitialCallback:!1,eventListener:"onClick"}),function(){var e="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0;if(e){var n=void 0!==a?a:t;if(n)if("function"!=typeof n){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=void 0;try{i=n[r]}catch(e){continue}e.register(i,r,"/home/adele/workspace/react-paginate/react_components/PaginationBoxView.js")}}else e.register(n,"module.exports","/home/adele/workspace/react-paginate/react_components/PaginationBoxView.js")}}(),a.default=N,function(){var e="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0;if(e){var n=void 0!==a?a:t;if(n)if("function"!=typeof n){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=void 0;try{i=n[r]}catch(e){continue}e.register(i,r,"/home/adele/workspace/react-paginate/react_components/index.js")}}else e.register(n,"module.exports","/home/adele/workspace/react-paginate/react_components/index.js")}}()}]))}}]);
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.