PageSourceSearch

https://www.weatherwatch.co.nz/_next/static/chunks/769.2ee372437deb050c.js

js weatherwatch.co.nz collected 2026-09-24 09:57:06 UTC 10,857 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[769],{902:function(){L.GPlaceAutocomplete={},L.Control.GPlaceAutocomplete=L.Control.extend({options:{position:"topright",prepend:!0,collapsed_mode:!1,autocomplete_options:{}},collapsedModeIsExpanded:!0,autocomplete:null,icon:null,searchBox:null,initialize:function(e){e&&L.Util.setOptions(this,e),this.options.callback||(this.options.callback=this.onLocationComplete),this._buildContainer()},_buildContainer:function(){this.container=L.DomUtil.create("div","leaflet-gac-container leaflet-bar");var e=L.DomUtil.create("div","leaflet-gac-wrapper");this.searchBox=L.DomUtil.create("input","leaflet-gac-control"),this.autocomplete=new google.maps.places.Autocomplete(this.searchBox,this.options.autocomplete_options),this.options.collapsed_mode&&(this.collapsedModeIsExpanded=!1,this.icon=L.DomUtil.create("div","leaflet-gac-search-btn"),L.DomEvent.on(this.icon,"click",this._showSearchBar,this),this.icon.appendChild(L.DomUtil.create("div","leaflet-gac-search-icon")),e.appendChild(this.icon),L.DomUtil.addClass(this.searchBox,"leaflet-gac-hidden")),e.appendChild(this.searchBox),this.container.appendChild(e)},_showSearchBar:function(){this._toggleSearch(!0)},_hideSearchBar:function(){this.collapsedModeIsExpanded&&this._toggleSearch(!1)},_toggleSearch:function(e){e?(L.DomUtil.removeClass(this.searchBox,"leaflet-gac-hidden"),L.DomUtil.addClass(this.icon,"leaflet-gac-hidden"),this.searchBox.focus()):(L.DomUtil.addClass(this.searchBox,"leaflet-gac-hidden"),L.DomUtil.removeClass(this.icon,"leaflet-gac-hidden")),this.collapsedModeIsExpanded=e},onLocationComplete:function(e,t){if(!e.geometry){alert("Location not found");return}t.panTo([e.geometry.location.lat(),e.geometry.location.lng()])},onAdd:function(){return L.DomEvent.addListener(this.container,"click",L.DomEvent.stop),L.DomEvent.disableClickPropagation(this.container),this.options.collapsed_mode&&this._map.on("dragstart click",this._hideSearchBar,this),this.container},addTo:function(e){this._map=e;var t=this._container=this.onAdd(e),n=this.options.position,a=e._controlCorners[n];L.DomUtil.addClass(t,"leaflet-control"),this.options.prepend?a.insertBefore(t,a.firstChild):a.appendChild(t);var i=this.options.callback,o=this;return google.maps.event.addListener(this.autocomplete,"place_changed",function(){i(o.autocomplete.getPlace(),e)}),this}})},1538:function(e,t,n){"use strict";n.r(t);var a=n(29),i=n(2777),o=n(2262),s=n(748),r=n(5959),c=n(3553),l=n(7247),p=n(9499),d=n(135),h=n.n(d),m=n(4687),u=n.n(m),f=n(7294),g=n(5715),v=n(2013),w=n(4867);n(902);var y=n(5243),x=n.n(y),b=n(7113),Z=n(8525),k=n(2247),_=n(5893),C=[],S=function(e){(0,r.Z)(m,e);var t,n,d=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=(0,l.Z)(m);return e=t?Reflect.construct(n,arguments,(0,l.Z)(this).constructor):n.apply(this,arguments),(0,c.Z)(this,e)});function m(e){var t;return(0,i.Z)(this,m),t=d.call(this,e),(0,p.Z)((0,s.Z)(t),"mapRef",(0,f.createRef)()),(0,p.Z)((0,s.Z)(t),"getPointerIcon",function(e){return new(x()).divIcon({className:"customPin",popupAnchor:[-5,-5],html:'<div class="customPin"><img src="https://www.weatherwatch.co.nz/_imageProxy?url='.concat(e.properties.icon,'" alt="').concat(e.properties.formattedSummary,'" /></div>')})}),(0,p.Z)((0,s.Z)(t),"geoIcon",function(e,n){var a=t.getPointerIcon(e),i=x().marker(n,{icon:a});return C.push(i),i}),(0,p.Z)((0,s.Z)(t),"geoJSONStyle",function(){return{color:"#1f2021",weight:1,fillOpacity:.5,fillColor:"#fff2af"}}),(0,p.Z)((0,s.Z)(t),"onEachFeature",function(e,t){var n="",a="";e.properties.vars&&(n='\n        <span class="title">Swell</span>\n        <span class="title">Wave</span>\n        <span class="title">Set face</span>\n        <span class="title">Period</span>\n      ',a='\n        <span class="figure">'.concat(e.properties.vars.dpm.value," ").concat(e.properties.vars.hs_sw.value).concat(e.properties.vars.hs_
1sw.unit,'</span>\n        <span class="figure">').concat(e.properties.vars.hs.value).concat(e.properties.vars.hs.unit,'</span>\n        <span class="figure">').concat(e.properties.vars.wface.value).concat(e.properties.vars.wface.unit,'</span>\n        <span class="figure">').concat(e.properties.vars.tp.value).concat(e.properties.vars.tp.unit,"</span>\n      "));var i='\n            <div class="grid-container-4">\n                <div class="grid-item grid-width-4">\n                    <div class="location">'.concat(e.properties.title,'</div>\n                </div>\n                <div class="grid-item grid-width-4">\n                    <div class="summary">').concat(e.properties.formattedSummary,'</div>\n                </div>\n                <div class="bottom-section grid-item grid-width-4 grid-container-3">\n                    <div class="grid-item grid-width-1">\n                        <span class="title">Wind</span>\n                        <span class="title">Gust</span>\n                        <span class="title">Sea Temp</span>\n                        ').concat(n,'\n                        <span class="title">Tides</span>\n                    </div>\n                    <div class="grid-item grid-width-2">\n                        <span class="figure">').concat(e.properties.formattedWind,'</span>\n                        <span class="figure">').concat(e.properties.formattedGust,'</span>\n                        <span class="figure">').concat(e.properties.seatemp,"</span>\n                        ").concat(a,'\n                        <span class="figure">').concat(e.properties.tides,'</span>\n                    </div>\n                    <div class="grid-item grid-width-3">\n                      <div class="smaller">Forecast for ').concat(e.properties.formattedForecastTime,"</div>\n                    </div>\n                </div>\n            </div>\n        ");t.bindPopup(i)}),(0,p.Z)((0,s.Z)(t),"onZoomEnd",function(){return t.placeMarkersInBounds()}),(0,p.Z)((0,s.Z)(t),"onMoveEnd",function(){return t.placeMarkersInBounds()}),(0,p.Z)((0,s.Z)(t),"onResize",function(){return t.placeMarkersInBounds()}),(0,p.Z)((0,s.Z)(t),"placeMarkersInBounds",function(){var e=t.map;if(e)for(var n=e.getBounds(),a=C.length-1;a>=0;a--){var i=C[a],o=n.contains(i.getLatLng());i._icon&&!o?e.removeLayer(i):!i._icon&&o&&e.addLayer(i)}}),(0,p.Z)((0,s.Z)(t),"whenReady",function(e){var n=e.target;t.map=n,setTimeout(function(){n.invalidateSize()},0),n.addControl(y.control.zoom({position:"bottomright"})),new(x()).Control.GPlaceAutocomplete({position:"topright",autocomplete_options:{componentRestrictions:{country:"nz"}}
1,callback:function(e){var t=e.geometry.location;n.setView([t.lat(),t.lng()],13)}}).addTo(n)}),t.state={tidesData:null},t}return(0,o.Z)(m,[{key:"componentDidMount",value:(n=(0,a.Z)(u().mark(function e(){var t;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,b.Z.maps.getMarineMarkers();case 2:t=e.sent,this.setState({tidesData:t});case 4:case"end":return e.stop()}},e,this)})),function(){return n.apply(this,arguments)})},{key:"render",value:function(){return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(k.Z,{breaking:{acf:{style:"blue",prefix:"Note",linked_story:{post_name:""}},content:{rendered:"This mapping is supplied by MetOcean/MetService as a free service and they are ending this service. WeatherWatch is actively looking for replacement data and maps, please hang in there while we do so as it may take us a few months. We’re also still hoping MetOcean/MetService will continue to provide some open data / free services that we can share back with the public - and are currently in ongoing discussions with them."}},noLink:!0,noBg:!0}),(0,_.jsxs)("div",{className:"jsx-4294197903 map tides",children:[(0,_.jsxs)("div",{className:"jsx-4294197903 wwmap",children:[(0,_.jsx)("div",{className:"jsx-4294197903 wwmapbg"}),(0,_.jsxs)("div",{className:"jsx-4294197903 wwmapwrapper",children:[(0,_.jsx)("span",{className:"jsx-4294197903 svg-logo-wrap",children:(0,_.jsx)(Z.Z,{})}),(0,_.jsx)("p",{className:"jsx-4294197903 wwmapcredits",children:"Data provided by Weathermap.co.nz"})]})]}),(0,_.jsxs)(g.h,{ref:this.mapRef,center:[-41.1,172.28],zoom:6,minZoom:5,zoomControl:!1,onZoomEnd:this.onZoomEnd,onMoveEnd:this.onMoveEnd,onResize:this.onResize,whenReady:this.whenReady,children:[(0,_.jsx)(v.I,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'\xa9 <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'}),(0,_.jsx)(w.Q,{data:this.state.tidesData,style:this.geoJSONStyle,onEachFeature:this.onEachFeature,pointToLayer:this.geoIcon},this.state.tidesData)]}),(0,_.jsxs)("p",{className:"jsx-4294197903",children:["Map powered by"," ",(0,_.jsx)("a",{href:"http://www.weathermap.co.nz",target:"_blank",className:"jsx-4294197903",children:"Weathermap.co.nz"}),"."]})]}),(0,_.jsx)(h(),{id:"4294197903",children:[".tides{min-width:30rem;position:relative;}",".leaflet-container{position:relative;height:90rem;font-family:'NunitoSans-Regular',sans-serif;}",".leaflet-container a{font-size:1.1rem;}",".leaflet-popup-content p{margin:1rem 0;}",".leaflet-popup-content{min-width:30rem;}",".leaflet-gac-control{min-width:25rem;}",".customPin img{margin-left:-2rem;width:4rem;height:4rem;}",".location{font-size:2.4rem;line-height:2.4rem;color:#828282;margin-top:1rem;}",".summary{font-size:1.6rem;line-height:2.2rem;color:#212429;border-bottom:1px solid rgba(0,0,0,0.1);padding:1.5rem 0;}",".bottom-section{padding-top:1.5rem;}",".title{color:rgba(0,0,0,0.5);display:block;margin:1rem 0;font-size:1.4rem;}",".figure{display:block;margin:1rem 0;font-size:1.4rem;}",".smaller{padding-top:1.5rem;}",".wwmap{margin:1rem;text-align:center;z-index:1000;position:absolute;left:0;top:6rem;}",".wwmapbg{opacity:0.7;width:100%;height:100%;position:absolute;background-color:#ffffff;}",".wwmapwrapper{position:relative;white-space:nowrap;vertical-align:middle;display:inline-block;padding:0.5rem;}",".wwmapcredits{margin:0;font-size:0.9rem;line-height:1rem;}",".svg-logo-wrap{padding:0.5rem;}",".svg-logo-wrap svg{max-width:20rem;}",".leaflet-top.leaflet-right{right:auto;left:0;}",".leaflet-top.leaflet-right .leaflet-gac-container.leaflet-control{margin-left:1rem;}",".leaflet-touch .leaflet-bar{border:none;}","@media (min-width:576px){.leaflet-top.leaflet-right{right:0;}.wwmap{top:0;}}"]})]})}}]),m}(f.Component);t.default=S},4867:function(e,t,n){"use strict";n.d(t,{Q:function(){return r}});var a=n(1512),i=n(7999),o=n(1410),s=n(5243);let r=(0,a.Au)(function({data:e,...t},n){let a=new s.GeoJSON(e,t);return(0,i.O)(a,(0,o.sj)(n,{overlayContainer:a}))},function(e,t,n){t.style!==n.style&&(null==t.style?e.resetStyle():e.setStyle(t.style))})}}]);

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.