BankliPlus/temparea/solarbank/frontend/node_modules/.cache/babel-loader/eb1de22cb45a6dda5ce45d44b21a041872a1d3c10ad6a47edc22ddc7f08bedd6.json
2025-08-13 18:05:26 +02:00

1 line
6.9 KiB
JSON

{"ast":null,"code":"function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\nimport { LeafletProvider, createLeafletContext } from '@react-leaflet/core';\nimport { Map as LeafletMap } from 'leaflet';\nimport React, { forwardRef, useCallback, useEffect, useImperativeHandle, useState } from 'react';\nfunction MapContainerComponent(_ref, forwardedRef) {\n let {\n bounds,\n boundsOptions,\n center,\n children,\n className,\n id,\n placeholder,\n style,\n whenReady,\n zoom,\n ...options\n } = _ref;\n const [props] = useState({\n className,\n id,\n style\n });\n const [context, setContext] = useState(null);\n useImperativeHandle(forwardedRef, () => context?.map ?? null, [context]);\n const mapRef = useCallback(node => {\n if (node !== null && context === null) {\n const map = new LeafletMap(node, options);\n if (center != null && zoom != null) {\n map.setView(center, zoom);\n } else if (bounds != null) {\n map.fitBounds(bounds, boundsOptions);\n }\n if (whenReady != null) {\n map.whenReady(whenReady);\n }\n setContext(createLeafletContext(map));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n useEffect(() => {\n return () => {\n context?.map.remove();\n };\n }, [context]);\n const contents = context ? /*#__PURE__*/React.createElement(LeafletProvider, {\n value: context\n }, children) : placeholder ?? null;\n return /*#__PURE__*/React.createElement(\"div\", _extends({}, props, {\n ref: mapRef\n }), contents);\n}\nexport const MapContainer = /*#__PURE__*/forwardRef(MapContainerComponent);","map":{"version":3,"names":["_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","LeafletProvider","createLeafletContext","Map","LeafletMap","React","forwardRef","useCallback","useEffect","useImperativeHandle","useState","MapContainerComponent","_ref","forwardedRef","bounds","boundsOptions","center","children","className","id","placeholder","style","whenReady","zoom","options","props","context","setContext","map","mapRef","node","setView","fitBounds","remove","contents","createElement","value","ref","MapContainer"],"sources":["/home/m3mo/Desktop/temparea/solarbank/frontend/node_modules/react-leaflet/lib/MapContainer.js"],"sourcesContent":["function _extends() {\n _extends = Object.assign || function(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i];\n for(var key in source){\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\nimport { LeafletProvider, createLeafletContext } from '@react-leaflet/core';\nimport { Map as LeafletMap } from 'leaflet';\nimport React, { forwardRef, useCallback, useEffect, useImperativeHandle, useState } from 'react';\nfunction MapContainerComponent({ bounds , boundsOptions , center , children , className , id , placeholder , style , whenReady , zoom , ...options }, forwardedRef) {\n const [props] = useState({\n className,\n id,\n style\n });\n const [context, setContext] = useState(null);\n useImperativeHandle(forwardedRef, ()=>context?.map ?? null, [\n context\n ]);\n const mapRef = useCallback((node)=>{\n if (node !== null && context === null) {\n const map = new LeafletMap(node, options);\n if (center != null && zoom != null) {\n map.setView(center, zoom);\n } else if (bounds != null) {\n map.fitBounds(bounds, boundsOptions);\n }\n if (whenReady != null) {\n map.whenReady(whenReady);\n }\n setContext(createLeafletContext(map));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n useEffect(()=>{\n return ()=>{\n context?.map.remove();\n };\n }, [\n context\n ]);\n const contents = context ? /*#__PURE__*/ React.createElement(LeafletProvider, {\n value: context\n }, children) : placeholder ?? null;\n return /*#__PURE__*/ React.createElement(\"div\", _extends({}, props, {\n ref: mapRef\n }), contents);\n}\nexport const MapContainer = /*#__PURE__*/ forwardRef(MapContainerComponent);\n"],"mappings":"AAAA,SAASA,QAAQA,CAAA,EAAG;EAChBA,QAAQ,GAAGC,MAAM,CAACC,MAAM,IAAI,UAASC,MAAM,EAAE;IACzC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