PageSourceSearch

https://www.nzism.org/static/js-mition/v3.8.38/1557.79475f74.chunk.js

js nzism.org collected 2026-10-07 17:58:08 UTC 17,182 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkmembers=self.webpackChunkmembers||[]).push([[1557],{61557:function(e,t,a){a.r(t),a.d(t,{default:function(){return L}});var n=a(5544),s=a(60436),i=a(91212),r=a(10467),l=a(23029),o=a(92901),c=a(39874),d=a(85501),u=a(88094),m=a(56508),h=a(49222),f=a(55197),p=a(19307),g=a(19318),y=a(33841),v=a(74410),x=a(25194),j=a(92329),b=a(99209),A=a(2897),C=a(32795),F=a(62564),w=a(15678),k=new A.a("AIzaSyDv25yoq5jC3QTiGiJWGemNGMPAdtCffYE"),N=function(e){var t=e.users,a=e.onSelectUser,s=(0,u.useRef)(null),i=(0,u.useRef)(null),r=(0,u.useRef)(null),l=(0,u.useRef)(null),o=(0,u.useRef)([]),c=(0,u.useState)(5),d=(0,n.A)(c,2),m=d[0],h=d[1],f=(0,u.useCallback)(function(e,t){i.current&&(i.current.setCenter({lat:e,lng:t}),i.current.setZoom(10),l.current&&(l.current.setMap(null),l.current.setClickable(!1)),l.current=new google.maps.Marker({position:{lat:e,lng:t},map:i.current,title:"You are here",icon:{path:google.maps.SymbolPath.CIRCLE,scale:8,fillColor:"#4285F4",fillOpacity:1,strokeColor:"#fff",strokeWeight:2}}))},[]);return(0,u.useEffect)(function(){var e=!1;k.load().then(function(a){if(!e){var r=t.find(function(e){return e.latitude&&e.longitude&&Math.abs(e.latitude)<90&&Math.abs(e.longitude)<180}),l=r?{lat:r.latitude,lng:r.longitude}:{lat:-27.4705,lng:153.026};i.current||(i.current=new a.maps.Map(s.current,{center:l,zoom:5,maxZoom:18}),i.current.addListener("idle",function(){var e,t,a=null!==(e=null===(t=i.current)||void 0===t?void 0:t.getZoom())&&void 0!==e?e:5;h(a)})),n()}});var n=function(){if(i.current)if(o.current.forEach(function(e){return e.setMap(null)}),o.current=[],r.current&&(r.current.clearMarkers(),r.current=null),m<=7){var e=t.filter(function(e){return e.latitude&&e.longitude&&Math.abs(e.latitude)<90&&Math.abs(e.longitude)<180}).map(function(e){return new google.maps.Marker({position:{lat:e.latitude,lng:e.longitude},title:e.fullName})});r.current=new C.w1({map:i.current,markers:e})}else{var n=t.reduce(function(e,t){if(!t.latitude||!t.longitude)return e;var a=t.postcode||"".concat(t.latitude,",").concat(t.longitude);return e[a]||(e[a]=[]),e[a].push(t),e},{});Object.values(n).forEach(function(e){var t=e[0],n=t.latitude,s=t.longitude,r=Math.max(800,3e4/Math.pow(1.6,m-5)),l=new google.maps.Circle({strokeColor:"#4285F4",strokeOpacity:.8,strokeWeight:2,fillColor:"#4285F4",f
1illOpacity:.3,map:i.current,center:{lat:n,lng:s},radius:r});l.addListener("click",function(t){t&&t.domEvent&&t.domEvent.stopPropagation();var r='\n    <div style="min-width:200px">\n      <strong>'.concat(e.length," member").concat(e.length>1?"s":"",'</strong><br/>\n      <ul style="padding-left:16px;margin:0;">\n        ').concat(e.map(function(e){return"<li>\n                <button class='btn btn-link clickable' data-guid='".concat(e.itemGuid,"'>\n                  ").concat(e.fullName).concat(e.organisation?" ("+e.organisation+")":"","\n                </button>\n              </li>")}).join(""),"\n      </ul>\n    </div>"),l=new google.maps.InfoWindow({content:r,position:{lat:n,lng:s},disableAutoPan:!0});l.open(i.current),google.maps.event.addListenerOnce(l,"domready",function(){var e=l.getContent();if(e){var t=document.createElement("div");t.innerHTML=e,t.querySelectorAll("button[data-guid]").forEach(function(e){e.addEventListener("click",function(t){t.preventDefault();var n=e.getAttribute("data-guid");n&&a&&a(n),l.close()})}),l.setContent(t)}})}),o.current.push(l)})}};return function(){e=!0,o.current.forEach(function(e){return e.setMap(null)}),o.current=[],r.current&&r.current.clearMarkers()}},[t,a,m]),(0,w.jsxs)("div",{style:{position:"relative",width:"100%",height:"100%"},children:[(0,w.jsx)("div",{ref:s,style:{width:"100%",height:"100%"}}),(0,w.jsx)("div",{className:"clickable",style:{position:"absolute",top:-50,right:10,zIndex:2},children:(0,w.jsx)(F.A,{onLocationChange:f})}),(0,w.jsxs)("p",{className:"alert alert-info info",children:["Location is postcode proximity only, not exact address.",(0,w.jsx)("div",{className:"desktoponly",children:" Use CNTRL-mouse wheel to zoom in/out."})]})]})},S=a(96864),D=a(53918),M=a(4557),L=function(e){function t(e){var a,n,s,o,d;(0,l.A)(this,t),(d=(0,c.A)(this,t,[e])).resetFilters=(0,r.A)((0,i.A)().m(function e(){return(0,i.A)().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,h.F.awaitSetState(d,{search:"",dynamicArray:null,maxDisplayed:d.state.PageSize});case 1:d.refresh();case 2:return e.a(2)}},e)})),d.openProfileModal=function(e){d.setState({showProfileModal:!0,selectedUserGuid:e})},d.closeProfileModal=function(){d.setState({showProfileModal:!1,selectedUserGuid:null})};var u=h.F.defaultDataTableFilter(),m=null!==(a=e.data)&&void 0!==a&&a.field2&&parseInt(e.data.field2)>0?parseInt(e.data.field2):12,f=null!==(n=e.data)&&void 0!==n&&n.field3&&parseInt(e.data.field3)>0?parseInt(e.data.field3):12;return d.state={data:e.data,userData:[],dynamicArray:null,dynamicFilterListSample:[{fieldname:"fullName",displayName:"Name",type:"system.string"},{fieldname:"occupation",displayName:"Occupation",type:"system.string"},{fieldname:"status",displayName:"Status",type:"system.string"}],dynamicFilterList:[{fieldname:"userCountry",displayName:"Country",type:"system.string"},{fieldname:"state",displayName:"State",type:"system.string"},{fieldname:"postcode",displayName:"Postcode",type:"system.string"},{fieldname:"currentRoles",displayName:"Role",type:"system.role"}],loading:!0,errors:{},hide:!1,advancedsearch:u,show:"",tablemode:!1,errorResponse:!1,messages:"",myGuid:null,Authenticated:null,search:"",customStyleData:{},maxDisplayed:m,PageSize:f,HideSearch:e.data.field6||"No",minimalmode:!1,filtercount:0,listOnly:((null===(s=e.data)||void 0===s?void 0:s.customClass)||"").split(/\s+/).some(function(e){return"directory-list-only"===e.toLowerCase()}),showMap:!((null===(o=e.data)||void 0===o?void 0:o.customClass)||"").split(/\s+/).some(function(e){return"directory-list-only"===e.toLowerCase()}),listMode:!0,showProfileModal:!1,selectedUserGuid:null,FiltersClass:"0"===h.F.getCookie("UserDirectoryFilter")?"hidden":""},d.isAuthenticated=d.isAuthenticated.bind(d),d.DynamicFilterChange=d.DynamicFilterChange.bind(d),d.resetFilters=d.resetFilters.bind(d),d.prepareDynamicFilters(),d.refresh(),h.F.CheckAuthentication(d.isAuthenticated),d}return(0,d.A)(t,e),(0,o.A)(t,[{key:"prepareDynamicFilters",value:function(){var e,t=(0,s.A)(this.state.dynamicFilterList);if(null!==(e=this.state.data)&&void 0!==e&&e.field7&&this.state.data.field7.length>0){var a=h.F.buildDisplayTagsFromString(this.state.data.field7).displayTags;(null==a?void 0:a.length)>0&&(t=t.concat(a))}this.state.dynamicFilterList=t}},{key:"DynamicFilterChange",value:function(e){this.setState({dynamicArray:e})}},{key:"isAuthenticated",value:function(e){var t=this;
1e?h.F.apiGet("api/MyDetails/GetPublicUserDetails").then(function(a){a.data.success?t.setState({Authenticated:e,myGuid:a.data.dataobject.itemGuid,messages:a.data.message+h.F.timestamp(),errorResponse:!1,loading:!1}):t.setState({Authenticated:e,myGuid:"",messages:a.data.message+h.F.timestamp(),errorResponse:!0,loading:!1})}):this.setState({Authenticated:e,myGuid:"",messages:""+h.F.timestamp(),errorResponse:!0,loading:!1})}},{key:"refresh",value:function(){var e=this,t=this.state,a=t.search,n=t.customStyleData,s=t.data,i=this.buildAdvancedSearch();h.F.apiPost("api/Website/GetMemberDirectory?WebpageComponentID=".concat(this.props.data.itemID,"&Rolename=").concat(s.field1,"&Keywords=").concat(a+" za2"),i).then(function(t){t.data.success?(null==s?void 0:s.customStyleID)>0?h.F.FetchCustomStyle(s.customStyleID).then(function(a){e.setState({customStyleData:a,userData:t.data.dataobject,messages:t.data.message+h.F.timestamp(),errorResponse:!1,loading:!1,filtercount:e.state.filtercount+1})}):e.setState({customStyleData:n,userData:t.data.dataobject,messages:t.data.message+h.F.timestamp(),errorResponse:!1,loading:!1,filtercount:e.state.filtercount+1}):e.setState({userData:[],messages:t.data.message+h.F.timestamp(),errorResponse:!0,loading:!1,filtercount:e.state.filtercount+1})})}},{key:"toggleHidden",value:function(e){var t=document.getElementById(e);t&&t.classList&&(t.classList.toggle("hidden"),t.classList.contains("hidden")?(h.F.setCookie("UserDirectoryFilter","0"),this.setState({FiltersClass:"hidden"})):(h.F.setCookie("UserDirectoryFilter","1"),this.setState({FiltersClass:""})))}},{key:"buildAdvancedSearch",value:function(){var e=this.state.dynamicArray,t=h.F.defaultDataTableFilter();if(e){var a=new Set;Object.entries(e).forEach(function(e){var s=(0,n.A)(e,2),i=s[0],r=s[1],l=i.toLowerCase();if(!a.has(l)){if(a.add(l),"string"===r.type&&(r.values||[]).forEach(function(e){t.queries.push({type:"system.string",name:i,value:"%".concat(e,"%"),joiner:"like"})}),"role"===r.type&&(r.values||[]).forEach(function(e){t.queries.push({type:"system.string",name:"currentRoles",value:"%".concat(e,"%"),joiner:"like"})}),"tag"===r.type){var o=Array.isArray(r.values)?r.values.filter(function(e){return null!=e&&""!==e}):r.values?[r.values]:[];1===o.length?t.queries.push({type:"system.string",name:"tags",value:"%".concat(o[0],"%"),joiner:"like"}):o.length>1&&t.queries.push({type:"system.string",name:"tags",value:"(".concat(o.map(function(e){return"'".concat(e,"'")}).join(","),")"),joiner:"in"})}"number"===r.type&&(r.min&&t.queries.push({type:"system.number",name:i,value:r.min,joiner:">="}),r.max&&t.queries.push({type:"system.number",name:i,value:r.max,joiner:"<="})),"date"===r.type&&(r.start&&t.queries.push({type:"system.date",name:i,value:r.start,joiner:">="}),r.end&&t.queries.push({type:"system.date",name:i,value:r.end,joiner:"<="}))}})}return t}},{key:"render",value:function(){var e,t,a=this,n=this.state,s=n.loading,i=n.Authenticated,r=n.hide,l=n.myGuid,o=n.messages,c=n.errorResponse,d=n.HideSearch,u=n.search,A=n.userData,C=n.maxDisplayed,F=n.PageSize,k=n.customStyleData,L=n.tablemode,I=n.dynamicArray,P=n.dynamicFilterList;if(s||null===i)return(0,w.jsx)(m.m,{});if(r||null===l)return null;var E=0,R=this.state.showMap,G=this.state.listMode,T=((null===(e=this.props.data)||void 0===e?void 0:e.customClass)||"").split(/\s+/).some(function(e){return"directory-exclude-jobinfo"===e.toLowerCase()}),U=R?6:12,O=(A||[]).filter(function(e){return h.F.dynamicFilterMatch(I,e)}),H=((null===(t=this.props.data)||void 0===t?void 0:t.field1)||"").split(",").map(function(e){return e.trim().toLowerCase()}).filter(function(e){return e.length>0});return(0,w.jsx)("div",{children:(0,w.jsxs)("div",{className:"members--component--userdirectorymap row p-0 m-0",children:[""!==o&&(0,w.jsx)(v.q,{message:o,error:c}),(u.length>0||"Yes"!==d)&&(0,w.jsxs)(f.A,{className:"col-12 p-0 m-0",children:[(0,w.jsx)("div",{className:"row clickable col-12 ",onClick:function(){return a.toggleHidden("DynamicFilter-"+a.props.data.itemID+"-wrapper")},children:(0,w.jsxs)("div",{className:"col-lg-3",children:[(0,w.jsx)("i",{className:"fas fa-filter TagFilter--Toggle float-left",title:"Advanced Filters"}),(0,w.jsx)("div",{className:"row col-12 clickable",style:{lineHeight:"3",paddingLeft:"3px"}})]})}),(0,w.jsxs)("div",{id:"DynamicFilter-"+this.props.data.itemID+"-wrapper",className:"row editor--form "+this.state.FiltersClass,children:[A&&A.length>0&&!this.state.listOnly&&(0,w.jsxs)("div",{className:"col-6 mb-3 d-flex align-items-center ",children:[(0,w.jsx)(p.A,{xs:"auto",children:(0,w.jsx)(S.f,{label:"Show Map",fieldName:"showMap",value:this.state.showMap,onChange:function(){return a.setState({showMap:!a.state.showMap})}})}),(0,w.jsx)(p.A,{xs:"auto",children:(0,w.jsx)(S.f,{label:"List View",fieldName:"listMode",value:this.state.listMode,onChange:function(){return a.setState({listMode:!a.state.listMode})}})})]}),A&&A.length>0&&(0,w.jsxs)("div",{className:"col-12 DynamicFilter--Wrapper  p-0 m-0",children:[(0,w.jsx)(j.A,{data:A,filters:P,onChange:this.DynamicFilterChange,allowedRoles:H},"DynamicFilters-"+this.state.data.itemID+"-"+A.length+this.state.filtercount),(0,w.jsx)(b.A,{sm:12,className:"control-label",children:"Keyword Search"}),(0,w.jsx)(g.A,{type:"text",id:"search",placeholder:"Enter keywords",maxLength:"200",className:"form-control  p-2",value:u||"",onChange:function(e){return a.setState({search:e.target.value})},onKeyDown:function(e){return"Enter"===e.key&&a.refresh()}})]}),(0,w.jsxs)(p.A,{lg:"12",className:"pt-2 ",children:[(0,w.jsx)(y.A,{variant:"primary",className:"btn--action btn btn-primary",onClick:function(){return a.refresh()},ref:function(e){return h.F.DynamicRefCSS(e,k,"button")},children:"Search"}),(0,w.jsx)(y.A,{variant:"secondary",className:"btn--action btn btn-secondary ml-2",onClick:this.resetFilters,children:"Reset"}),(0,w.jsx)(y.A,{variant:"secondary",className:"btn--action btn btn-seconary",onClick:function(){return a.toggleHidden("DynamicFilter-"+a.props.data.itemID+"-wrapper")},children:"Close"})]}),A&&A.length>0&&(0,w.jsx)(p.A,{lg:"12",className:"pt-2",children:(0,w.jsxs)("strong",{children:[" ",O.length," records foun
1d"]})})]})]}),(0,w.jsxs)(f.A,{className:"col-12  p-0 m-0",children:[(0,w.jsx)(p.A,{lg:U,md:12,style:{maxHeight:R?"100%":"auto",overflowY:R?"auto":"visible",minHeight:"300px"},className:" p-0 m-0",children:(0,w.jsxs)(f.A,{className:"col-12",children:[null!==A&&A.length>0&&!L&&(0,w.jsxs)(w.Fragment,{children:[!G&&A.map(function(e,t){return C<E+1?null:h.F.dynamicFilterMatch(I,e)?(E++,(0,w.jsx)(x.H,{customStyleData:k,Authenticated:i,data:e,myGuid:l,webpageComponentID:a.props.data.itemID,defaultSize:"3",onSelectUser:function(e){return a.openProfileModal(e)}},"UserDirectoryUserView_"+e.itemGuid+a.state.filtercount)):null}),G&&function(){var e=O.slice(0,C);return E=e.length,(0,w.jsx)(w.Fragment,{children:(0,w.jsxs)("table",{className:"table table-striped table-sm",children:[(0,w.jsx)("thead",{children:(0,w.jsxs)("tr",{children:[(0,w.jsx)("th",{children:"Name"}),!T&&(0,w.jsx)("th",{children:"Organisation"}),!T&&(0,w.jsx)("th",{children:"Role"}),(0,w.jsx)("th",{children:"Accreditation"}),(0,w.jsx)("th",{children:"Postcode"})]})}),(0,w.jsx)("tbody",{children:e.map(function(e){return(0,w.jsxs)("tr",{children:[(0,w.jsx)("td",{children:(0,w.jsx)("a",{href:"/profile/"+e.itemGuid,target:"_blank",rel:"noopener noreferrer",onClick:function(t){t.preventDefault(),a.openProfileModal(e.itemGuid)},children:e.fullName})}),!T&&(0,w.jsx)("td",{children:e.organisation||e.company||"-"}),!T&&(0,w.jsx)("td",{children:e.occupation||"-"}),(0,w.jsx)("td",{className:"text-center",children:e.accreditationRolesHTML?(0,w.jsx)("span",{dangerouslySetInnerHTML:{__html:e.accreditationRolesHTML}}):e.accreditationRoles||"-"}),(0,w.jsx)("td",{children:e.postcode||"-"})]},e.itemGuid)})})]})})}()]}),C<=E&&(0,w.jsx)(p.A,{sm:12,children:(0,w.jsx)("button",{variant:"primary",className:"btn--action btn btn-primary",onClick:function(){return a.setState({maxDisplayed:C+F})},children:"Show More"})})]})}),R&&null!==A&&A.length>0&&(0,w.jsx)(p.A,{lg:6,md:12,className:"mt-3 mt-lg-0 p-0 m-0",children:(0,w.jsx)("div",{style:{width:"100%",height:"100%",minHeight:"300px"},children:(0,w.jsx)(N,{users:O,onSelectUser:function(e){return a.openProfileModal(e)}},"usermapplugin"+this.state.data.itemID+"_"+this.state.filtercount)})}),this.state.showProfileModal&&(0,w.jsx)(D.A,{id:"UserProfileModal",visible:!0,onCloseClick:this.closeProfileModal,title:"User Profile",children:(0,w.jsx)("div",{className:"UserProfileModalBody",children:this.state.selectedUserGuid?(0,w.jsx)(M.default,{UserGuid:this.state.selectedUserGuid,webpageComponentID:this.props.data.itemID}):(0,w.jsx)(m.m,{})})})]})]})})}}])}(u.Component)},62564:function(e,t,a){a(88094);var n=a(15678);t.A=function(e){var t=e.onLocationChange;return(0,n.jsx)("i",{title:"Lookup my location",className:"fa-solid fa-location-crosshairs TagFilter--Toggle",onClick:function(){navigator.geolocation?navigator.geolocation.getCurrentPosition(function(e){t(e.coords.latitude,e.coords.longitude)},function(e){console.log(e);var t="Error: The Geolocation service failed.";switch(e.code){case e.PERMISSION_DENIED:t="Error: Permission denied.";break;case e.POSITION_UNAVAILABLE:t="Error: Position unavailable.";break;case e.TIMEOUT:t="Error: Timeout.";break;default:t="Error: An unknown error occurred."}alert(t)}):alert("Error: Your browser doesn't support geolocation.")}})}},96864:function(e,t,a){a.d(t,{f:function(){return m}});var n=a(5544),s=a(92387),i=a(33841),r=a(19307),l=a(27400),o=a(99209),c=a(55197),d=a(88094),u=a(15678),m=function(e){var t=e.activeButtonText,a=void 0===t?"ON":t,m=e.inactiveButtonText,h=void 0===m?"OFF":m,f=e.fieldName,p=e.label,g=e.value,y=e.onChange,v=e.warningOnToggleOff,x=(0,d.useState)(g),j=(0,n.A)(x,2),b=j[0],A=j[1],C=(0,d.useCallback)(function(){A(function(e){return!e}),y(f,!g)},[A,f,y,g]);return(0,u.jsxs)(l.A,{children:[(0,u.jsxs)(c.A,{children:[(0,u.jsx)(r.A,{sm:4,children:p&&(0,u.jsx)(o.A,{sm:12,className:"control-label",children:p})}),(0,u.jsx)(r.A,{sm:8,children:b?(0,u.jsxs)(i.A,{variant:"success",className:"btn--action",onClick:C,children:[(0,u.jsx)("i",{className:"fas fa-check"})," ",a]}):(0,u.jsxs)(i.A,{variant:"warning",className:"btn--action",onClick:C,children:[(0,u.jsx)("i",{className:"fas fa-times"})," ",h]})})]}),v&&!b&&(0,u.jsx)(s.A,{variant:"warning",children:v})]})}}}]);

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.