PageSourceSearch

https://www.bathroombuddy.io/_next/static/chunks/2008-d3e097310c1bf430.js

js bathroombuddy.io collected 2026-10-02 01:57:54 UTC 16,805 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2008],{1799:(e,t,r)=>{"use strict";r.d(t,{pH:()=>R,ov:()=>z,Ay:()=>C});var n=r(7579);let o=n.createContext(null);function a(e,t){if(e===t)return!0;if(!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!a(e[r],t[r]))return!1;return!0}if(Array.isArray(t))return!1;if("object"==typeof e&&"object"==typeof t){let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n of r)if(!t.hasOwnProperty(n)||!a(e[n],t[n]))return!1;return!0}return!1}function i(e,t){if(!e.getProjection)return;let r=e.getProjection();a(r,t.getProjection())||t.setProjection(r)}function s(e){return{longitude:e.center.lng,latitude:e.center.lat,zoom:e.zoom,pitch:e.pitch,bearing:e.bearing,padding:e.padding}}function l(e,t){let r=t.viewState||t,n=!1;if("zoom"in r){let t=e.zoom;e.zoom=r.zoom,n=n||t!==e.zoom}if("bearing"in r){let t=e.bearing;e.bearing=r.bearing,n=n||t!==e.bearing}if("pitch"in r){let t=e.pitch;e.pitch=r.pitch,n=n||t!==e.pitch}if(r.padding&&!e.isPaddingEqual(r.padding)&&(n=!0,e.padding=r.padding),"longitude"in r&&"latitude"in r){let t=e.center;e.center=new t.constructor(r.longitude,r.latitude),n=n||t!==e.center}return n}let u=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function d(e){if(!e)return null;if("string"==typeof e||("toJS"in e&&(e=e.toJS()),!e.layers))return e;let t={};for(let r of e.layers)t[r.id]=r;let r=e.layers.map(e=>{let r=null;"interactive"in e&&(r=Object.assign({},e),delete r.interactive);let n=t[e.ref];if(n)for(let t of(r=r||Object.assign({},e),delete r.ref,u))t in n&&(r[t]=n[t]);return r||e});return{...e,layers:r}}var c=r(2688);let p={version:8,sources:{},layers:[]},f={mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",click:"onClick",dblclick:"onDblClick",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mouseout:"onMouseOut",contextmenu:"onContextMenu",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",touchcancel:"onTouchCancel"},m={movestart:"onMoveStart",move:"onMove",moveend:"onMoveEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",zoomstart:"onZoomStart",zoom:"onZoom",zoomend:"onZoomEnd",rotatestart:"onRotateStart",rotate:"onRotate",rotateend:"onRotateEnd",pitchstart:"onPitchStart",pitch:"onPitch",pitchend:"onPitchEnd"},h={wheel:"onWheel",boxzoomstart:"onBoxZoomStart",boxzoomend:"onBoxZoomEnd",boxzoomcancel:"onBoxZoomCancel",resize:"onResize",load:"onLoad",render:"onRender",idle:"onIdle",remove:"onRemove",data:"onData",styledata:"onStyleData",sourcedata:"onSourceData",error:"onError"},g=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],y=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class _{constructor(e,t,r){this._map=null,this._internalUpdate=!1,this._inRender=!1,this._hoveredFeatures=null,this._deferredEvents={move:!1,zoom:!1,pitch:!1,rotate:!1},this._onEvent=e=>{let t=this.props[h[e.type]];t?t(e):"error"===e.type&&console.error(e.error)},this._onPointerEvent=e=>{("mousemove"===e.type||"mouseout"===e.type)&&this._updateHover(e);let t=this.props[f[e.type]];t&&(this.props.interactiveLayerIds&&"mouseover"!==e.type&&"mouseout"!==e.type&&(e.features=this._hoveredFeatures||this._queryRenderedFeatures(e.point)),t(e),delete e.features)},this._onCameraEvent=e=>{if(!this._internalUpdate){let t=this.props[m[e.type]];t&&t(e)}e.type in this._deferredEvents&&(this._deferredEvents[e.type]=!1)},this._MapClass=e,this.props=t,this._initialize(r)}get map(){return this._map}get transform(){return this._renderTransform}setProps(e){let t=this.props;this.props=e;let r=this._updateSettings(e,t);r&&this._createShadowTransform(this._map);let n=this._updateSize(e),o=this._updateViewState(e,!0);this._updateStyle(e,t),this._updateStyleComponents(e,t),this._updateHandlers(e,t),(r||n||o&&!this._map.isMoving())&&this.redraw()}static reuse(e,t){let r=_.savedMaps.pop();if(!r)return null;let n=r.map,o=n.getContainer();for(t.className=o.className;o.childNodes.length>0;)t.appendChild(o.childNodes[0]);n._container=t,r.setProps({...e,styleDiffing:!1}),n.resize();let{initialViewState:a}=e;return a&&(a.bounds?n.fitBounds(a.bounds,{...a.fitBoundsOptions,duration:0}):r._updateViewState(a,!1)),n.isStyleLoaded()?n.fire("load"):n.once("styledata",()=>n.fire("load")),n._update(),r}_initialize(e){let{props:t}=this,{mapStyle:r=p}=t,n={...t,...t.initialViewState,accessToken:t.mapboxAccessToken||function(){let e=null;if("undefined"!=typeof location){let t=/access_token=([^&\/]*)/.exec(location.search);e=t&&t[1]}try{e=e||c.env.MapboxAccessToken}catch{}try{e=e||c.env.REACT_APP_MAPBOX_ACCESS_TOKEN}catch{}return e}()||null,container:e,style:d(r)},o=n.initialViewState||n.viewState||n;if(Object.assign(n,{center:[o.longitude||0,o.latitude||0],zoom:o.zoom||0,pitch:o.pitch||0,bearing:o.bearing||0}),t.gl){let e=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=e,t.gl)}let a=new this._MapClass(n);
1o.padding&&a.setPadding(o.padding),t.cursor&&(a.getCanvas().style.cursor=t.cursor),this._createShadowTransform(a);let s=a._render;a._render=e=>{this._inRender=!0,s.call(a,e),this._inRender=!1};let l=a._renderTaskQueue.run;a._renderTaskQueue.run=e=>{l.call(a._renderTaskQueue,e),this._onBeforeRepaint()},a.on("render",()=>this._onAfterRepaint());let u=a.fire;for(let e in a.fire=this._fireEvent.bind(this,u),a.on("resize",()=>{this._renderTransform.resize(a.transform.width,a.transform.height)}),a.on("styledata",()=>{this._updateStyleComponents(this.props,{}),i(a.transform,this._renderTransform)}),a.on("sourcedata",()=>this._updateStyleComponents(this.props,{})),f)a.on(e,this._onPointerEvent);for(let e in m)a.on(e,this._onCameraEvent);for(let e in h)a.on(e,this._onEvent);this._map=a}recycle(){let e=this.map.getContainer().querySelector("[mapboxgl-children]");e?.remove(),_.savedMaps.push(this)}destroy(){this._map.remove()}redraw(){let e=this._map;!this._inRender&&e.style&&(e._frame&&(e._frame.cancel(),e._frame=null),e._render())}_createShadowTransform(e){let t=function(e){let t=e.clone();return t.pixelsToGLUnits=e.pixelsToGLUnits,t}(e.transform);e.painter.transform=t,this._renderTransform=t}_updateSize(e){let{viewState:t}=e;if(t){let e=this._map;if(t.width!==e.transform.width||t.height!==e.transform.height)return e.resize(),!0}return!1}_updateViewState(e,t){if(this._internalUpdate)return!1;let r=this._map,n=this._renderTransform,{zoom:o,pitch:a,bearing:i}=n,u=r.isMoving();u&&(n.cameraElevationReference="sea");let d=l(n,{...s(r.transform),...e});if(u&&(n.cameraElevationReference="ground"),d&&t){let e=this._deferredEvents;e.move=!0,e.zoom||(e.zoom=o!==n.zoom),e.rotate||(e.rotate=i!==n.bearing),e.pitch||(e.pitch=a!==n.pitch)}return u||l(r.transform,e),d}_updateSettings(e,t){let r=this._map,n=!1;for(let o of g)if(o in e&&!a(e[o],t[o])){n=!0;let t=r[`set${o[0].toUpperCase()}${o.slice(1)}`];t?.call(r,e[o])}return n}_updateStyle(e,t){if(e.cursor!==t.cursor&&(this._map.getCanvas().style.cursor=e.cursor||""),e.mapStyle!==t.mapStyle){let{mapStyle:t=p,styleDiffing:r=!0}=e,n={diff:r};return"localIdeographFontFamily"in e&&(n.localIdeographFontFamily=e.localIdeographFontFamily),this._map.setStyle(d(t),n),!0}return!1}_updateStyleComponents(e,t){let r=this._map,n=!1;return r.isStyleLoaded()&&("light"in e&&r.setLight&&!a(e.light,t.light)&&(n=!0,r.setLight(e.light)),"fog"in e&&r.setFog&&!a(e.fog,t.fog)&&(n=!0,r.setFog(e.fog)),"terrain"in e&&r.setTerrain&&!a(e.terrain,t.terrain)&&(!e.terrain||r.getSource(e.terrain.source))&&(n=!0,r.setTerrain(e.terrain))),n}_updateHandlers(e,t){let r=this._map,n=!1;for(let o of y){let i=e[o]??!0;a(i,t[o]??!0)||(n=!0,i?r[o].enable(i):r[o].disable())}return n}_queryRenderedFeatures(e){let t=this._map,r=t.transform,{interactiveLayerIds:n=[]}=this.props;try{return t.transform=this._renderTransform,t.queryRenderedFeatures(e,{layers:n.filter(t.getLayer.bind(t))})}catch{return[]}finally{t.transform=r}}_updateHover(e){let{props:t}=this;if(t.interactiveLayerIds&&(t.onMouseMove||t.onMouseEnter||t.onMouseLeave)){let t=e.type,r=this._hoveredFeatures?.length>0,n=this._queryRenderedFeatures(e.point),o=n.length>0;!o&&r&&(e.type="mouseleave",this._onPointerEvent(e)),this._hoveredFeatures=n,o&&!r&&(e.type="mouseenter",this._onPointerEvent(e)),e.type=t}else this._hoveredFeatures=null}_fireEvent(e,t,r){let n=this._map,o=n.transform,a="string"==typeof t?t:t.type;return("move"===a&&this._updateViewState(this.props,!1),a in m&&("object"==typeof t&&(t.viewState=s(o)),this._map.isMoving()))?(n.transform=this._renderTransform,e.call(n,t,r),n.transform=o,n):(e.call(n,t,r),n)}_onBeforeRepaint(){let e=this._map;for(let t in this._internalUpdate=!0,this._deferredEvents)this._deferredEvents[t]&&e.fire(t);this._internalUpdate=!1;let t=this._map.transform;e.transform=this._renderTransform,this._onAfterRepaint=()=>{i(this._renderTransform,t),e.transform=t}}}_.savedMaps=[];let v=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"],E="undefined"!=typeof document?n.useLayoutEffect:n.useEffect,b=["baseApiUrl","maxParallelImageRequests","workerClass","workerCount","workerUrl"],x=n.createContext(null),C=n.forwardRef(function(e,t){let a=(0,n.useContext)(o),[i,s]=(0,n.use
1State)(null),l=(0,n.useRef)(),{current:u}=(0,n.useRef)({mapLib:null,map:null});(0,n.useEffect)(()=>{let t,n=e.mapLib,o=!0;return Promise.resolve(n||r.e(2753).then(r.t.bind(r,5649,19))).then(r=>{if(!o)return;if(!r)throw Error("Invalid mapLib");let n="Map"in r?r:r.default;if(!n.Map)throw Error("Invalid mapLib");for(let t of b)t in e&&(n[t]=e[t]);let{RTLTextPlugin:i="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.js"}=e;i&&n.getRTLTextPluginStatus&&"unavailable"===n.getRTLTextPluginStatus()&&n.setRTLTextPlugin(i,e=>{e&&console.error(e)},!0),e.reuseMaps&&(t=_.reuse(e,l.current)),t||(t=new _(n.Map,e,l.current)),u.map=function(e){if(!e)return null;let t=e.map,r={getMap:()=>t,getCenter:()=>e.transform.center,getZoom:()=>e.transform.zoom,getBearing:()=>e.transform.bearing,getPitch:()=>e.transform.pitch,getPadding:()=>e.transform.padding,getBounds:()=>e.transform.getBounds(),project:r=>{let n=t.transform;t.transform=e.transform;let o=t.project(r);return t.transform=n,o},unproject:r=>{let n=t.transform;t.transform=e.transform;let o=t.unproject(r);return t.transform=n,o},queryTerrainElevation:(r,n)=>{let o=t.transform;t.transform=e.transform;let a=t.queryTerrainElevation(r,n);return t.transform=o,a},queryRenderedFeatures:(r,n)=>{let o=t.transform;t.transform=e.transform;let a=t.queryRenderedFeatures(r,n);return t.transform=o,a}};for(let e of function(e){let t=new Set,r=e;for(;r;){for(let n of Object.getOwnPropertyNames(r))"_"!==n[0]&&"function"==typeof e[n]&&"fire"!==n&&"setEventedParent"!==n&&t.add(n);r=Object.getPrototypeOf(r)}return Array.from(t)}(t))e in r||v.includes(e)||(r[e]=t[e].bind(t));return r}(t),u.mapLib=n,s(t),a?.onMapMount(u.map,e.id)}).catch(t=>{let{onError:r}=e;r?r({type:"error",target:null,error:t}):console.error(t)}),()=>{o=!1,t&&(a?.onMapUnmount(e.id),e.reuseMaps?t.recycle():t.destroy())}},[]),E(()=>{i&&i.setProps(e)}),(0,n.useImperativeHandle)(t,()=>u.map,[i]);let d=(0,n.useMemo)(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]);return n.createElement("div",{id:e.id,ref:l,style:d},i&&n.createElement(x.Provider,{value:u},n.createElement("div",{"mapboxgl-children":"",style:{height:"100%"}},e.children)))});var L=r(266);let M=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function S(e,t){if(!e||!t)return;let r=e.style;for(let e in t){let n=t[e];Number.isFinite(n)&&!M.test(e)?r[e]=`${n}px`:r[e]=n}}function P(e,t){if(e===t)return null;let r=w(e),n=w(t),o=[];for(let e of n)r.has(e)||o.push(e);for(let e of r)n.has(e)||o.push(e);return 0===o.length?null:o}function w(e){return new Set(e?e.trim().split(/\s+/):[])}let R=(0,n.memo)((0,n.forwardRef)((e,t)=>{let{map:r,mapLib:o}=(0,n.useContext)(x),a=(0,n.useRef)({props:e}),i=(0,n.useMemo)(()=>{let t=!1;n.Children.forEach(e.children,e=>{e&&(t=!0)});let r={...e,element:t?document.createElement("div"):null},s=new o.Marker(r);return s.setLngLat([e.longitude,e.latitude]),s.getElement().addEventListener("click",e=>{a.current.props.onClick?.({type:"click",target:s,originalEvent:e})}),s.on("dragstart",e=>{e.lngLat=i.getLngLat(),a.current.props.onDragStart?.(e)}),s.on("drag",e=>{e.lngLat=i.getLngLat(),a.current.props.onDrag?.(e)}),s.on("dragend",e=>{e.lngLat=i.getLngLat(),a.current.props.onDragEnd?.(e)}),s},[]);(0,n.useEffect)(()=>(i.addTo(r.getMap()),()=>{i.remove()}),[]);let{longitude:s,latitude:l,offset:u,style:d,draggable:c=!1,popup:p=null,rotation:f=0,rotationAlignment:m="auto",pitchAlignment:h="auto"}=e;(0,n.useEffect)(()=>{S(i.getElement(),d)},[d]),(0,n.useImperativeHandle)(t,()=>i,[]);let g=a.current.props;(i.getLngLat().lng!==s||i.getLngLat().lat!==l)&&i.setLngLat([s,l]),u&&!function(e,t){let r=Array.isArray(e)?e[0]:e?e.x:0,n=Array.isArray(e)?e[1]:e?e.y:0,o=Array.isArray(t)?t[0]:t?t.x:0,a=Array.isArray(t)?t[1]:t?t.y:0;return r===o&&n===a}(i.getOffset(),u)&&i.setOffset(u),i.isDraggable()!==c&&i.setDraggable(c),i.getRotation()!==f&&i.setRotation(f),i.getRotationAlignment()!==m&&i.setRotationAlignment(m),i.getPitchAlignment()!==h&&i.setPitchAlignment(h),i.getPopup()!==p&&i.setPopup(p);let y=P(g.className,e.className);if(y)for(let e of y)i.toggleClassName(e);return a.current.props=e,(0,L.createPortal)(e.children,i.getElement())}
1));function T(e,t,r,o){let a=(0,n.useContext)(x),i=(0,n.useMemo)(()=>e(a),[]);return(0,n.useEffect)(()=>{let e="function"==typeof t&&"function"==typeof r?t:null,n="function"==typeof r?r:"function"==typeof t?t:null,{map:s}=a;return!s.hasControl(i)&&(s.addControl(i,(o||r||t)?.position),e&&e(a)),()=>{n&&n(a),s.hasControl(i)&&s.removeControl(i)}},[]),i}(0,n.memo)((0,n.forwardRef)((e,t)=>{let{map:r,mapLib:o}=(0,n.useContext)(x),i=(0,n.useMemo)(()=>document.createElement("div"),[]),s=(0,n.useRef)({props:e}),l=(0,n.useMemo)(()=>{let t={...e},r=new o.Popup(t);return r.setLngLat([e.longitude,e.latitude]),r.once("open",e=>{s.current.props.onOpen?.(e)}),r},[]);if((0,n.useEffect)(()=>{let e=e=>{s.current.props.onClose?.(e)};return l.on("close",e),l.setDOMContent(i).addTo(r.getMap()),()=>{l.off("close",e),l.isOpen()&&l.remove()}},[]),(0,n.useEffect)(()=>{S(l.getElement(),e.style)},[e.style]),(0,n.useImperativeHandle)(t,()=>l,[]),l.isOpen()){let t=s.current.props;(l.getLngLat().lng!==e.longitude||l.getLngLat().lat!==e.latitude)&&l.setLngLat([e.longitude,e.latitude]),e.offset&&!a(t.offset,e.offset)&&(l.options.anchor=e.anchor,l.setOffset(e.offset)),(t.anchor!==e.anchor||t.maxWidth!==e.maxWidth)&&l.setMaxWidth(e.maxWidth);let r=P(t.className,e.className);if(r)for(let e of r)l.toggleClassName(e);s.current.props=e}return(0,L.createPortal)(e.children,i)})),(0,n.memo)(function(e){let t=T(({mapLib:t})=>new t.AttributionControl(e),{position:e.position});return(0,n.useEffect)(()=>{S(t._container,e.style)},[e.style]),null}),(0,n.memo)(function(e){let t=T(({mapLib:t})=>new t.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return(0,n.useEffect)(()=>{S(t._controlContainer,e.style)},[e.style]),null}),(0,n.memo)((0,n.forwardRef)(function(e,t){let r=(0,n.useRef)({props:e}),o=T(({mapLib:t})=>{let n=new t.GeolocateControl(e),o=n._setupUI.bind(n);return n._setupUI=e=>{n._container.hasChildNodes()||o(e)},n.on("geolocate",e=>{r.current.props.onGeolocate?.(e)}),n.on("error",e=>{r.current.props.onError?.(e)}),n.on("outofmaxbounds",e=>{r.current.props.onOutOfMaxBounds?.(e)}),n.on("trackuserlocationstart",e=>{r.current.props.onTrackUserLocationStart?.(e)}),n.on("trackuserlocationend",e=>{r.current.props.onTrackUserLocationEnd?.(e)}),n},{position:e.position});return r.current.props=e,(0,n.useImperativeHandle)(t,()=>o,[]),(0,n.useEffect)(()=>{S(o._container,e.style)},[e.style]),null}));let z=(0,n.memo)(function(e){let t=T(({mapLib:t})=>new t.NavigationControl(e),{position:e.position});return(0,n.useEffect)(()=>{S(t._container,e.style)},[e.style]),null});(0,n.memo)(function(e){let t=T(({mapLib:t})=>new t.ScaleControl(e),{position:e.position}),r=(0,n.useRef)(e),o=r.current;r.current=e;let{style:a}=e;return void 0!==e.maxWidth&&e.maxWidth!==o.maxWidth&&(t.options.maxWidth=e.maxWidth),void 0!==e.unit&&e.unit!==o.unit&&t.setUnit(e.unit),(0,n.useEffect)(()=>{S(t._container,a)},[a]),null})},6272:()=>{}}]);

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.